Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
28796b3a
Commit
28796b3a
authored
Dec 25, 2011
by
Andreas Schwab
Browse files
* etags.c (C_entries): Properly skip over string and character
constants inside brackets. (Bug#10357)
parent
ca22b785
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
17 deletions
+24
-17
lib-src/ChangeLog
lib-src/ChangeLog
+5
-0
lib-src/etags.c
lib-src/etags.c
+19
-17
No files found.
lib-src/ChangeLog
View file @
28796b3a
2011-12-25 Andreas Schwab <schwab@linux-m68k.org>
* etags.c (C_entries): Properly skip over string and character
constants and comments inside brackets. (Bug#10357)
2011-12-04 Juanma Barranquero <lekktu@gmail.com>
* emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0;
...
...
lib-src/etags.c
View file @
28796b3a
...
...
@@ -3189,24 +3189,12 @@ C_entries (int c_ext, FILE *inf)
}
continue
;
}
else
if
(
bracketlev
>
0
)
{
switch
(
c
)
{
case
']'
:
if
(
--
bracketlev
>
0
)
continue
;
break
;
case
'\0'
:
CNL_SAVE_DEFINEDEF
();
break
;
}
continue
;
}
else
switch
(
c
)
{
case
'"'
:
inquote
=
TRUE
;
if
(
bracketlev
>
0
)
continue
;
if
(
inattribute
)
break
;
switch
(
fvdef
)
...
...
@@ -3224,9 +3212,11 @@ C_entries (int c_ext, FILE *inf)
continue
;
case
'\''
:
inchar
=
TRUE
;
if
(
bracketlev
>
0
)
continue
;
if
(
inattribute
)
break
;
if
(
fvdef
!=
finlist
&&
fvdef
!=
fignore
&&
fvdef
!=
vignore
)
if
(
fvdef
!=
finlist
&&
fvdef
!=
fignore
&&
fvdef
!=
vignore
)
{
fvextern
=
FALSE
;
fvdef
=
fvnone
;
...
...
@@ -3238,6 +3228,8 @@ C_entries (int c_ext, FILE *inf)
incomm
=
TRUE
;
lp
++
;
c
=
' '
;
if
(
bracketlev
>
0
)
continue
;
}
else
if
(
/* cplpl && */
*
lp
==
'/'
)
{
...
...
@@ -3270,7 +3262,7 @@ C_entries (int c_ext, FILE *inf)
for
(
cp
=
newlb
.
buffer
;
cp
<
lp
-
1
;
cp
++
)
if
(
!
iswhite
(
*
cp
))
{
if
(
*
cp
==
'*'
&&
*
(
cp
+
1
)
==
'/'
)
if
(
*
cp
==
'*'
&&
cp
[
1
]
==
'/'
)
{
cp
++
;
cpptoken
=
TRUE
;
...
...
@@ -3284,7 +3276,17 @@ C_entries (int c_ext, FILE *inf)
continue
;
case
'['
:
bracketlev
++
;
continue
;
continue
;
default:
if
(
bracketlev
>
0
)
{
if
(
c
==
']'
)
--
bracketlev
;
else
if
(
c
==
'\0'
)
CNL_SAVE_DEFINEDEF
();
continue
;
}
break
;
}
/* switch (c) */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment