[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106731: * etags.c (C_entries): Prope
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106731: * etags.c (C_entries): Properly skip over string and character |
Date: |
Sun, 25 Dec 2011 10:55:37 +0100 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106731
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Sun 2011-12-25 10:55:37 +0100
message:
* etags.c (C_entries): Properly skip over string and character
constants inside brackets. (Bug#10357)
modified:
lib-src/ChangeLog
lib-src/etags.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2011-12-12 05:32:49 +0000
+++ b/lib-src/ChangeLog 2011-12-25 09:55:37 +0000
@@ -1,3 +1,8 @@
+2011-12-25 Andreas Schwab <address@hidden>
+
+ * etags.c (C_entries): Properly skip over string and character
+ constants and comments inside brackets. (Bug#10357)
+
2011-12-04 Juanma Barranquero <address@hidden>
* emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0;
=== modified file 'lib-src/etags.c'
--- a/lib-src/etags.c 2011-11-20 02:29:42 +0000
+++ b/lib-src/etags.c 2011-12-25 09:55:37 +0000
@@ -3189,24 +3189,12 @@
}
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 @@
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 @@
incomm = TRUE;
lp++;
c = ' ';
+ if (bracketlev > 0)
+ continue;
}
else if (/* cplpl && */ *lp == '/')
{
@@ -3270,7 +3262,7 @@
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 @@
continue;
case '[':
bracketlev++;
- continue;
+ continue;
+ default:
+ if (bracketlev > 0)
+ {
+ if (c == ']')
+ --bracketlev;
+ else if (c == '\0')
+ CNL_SAVE_DEFINEDEF ();
+ continue;
+ }
+ break;
} /* switch (c) */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106731: * etags.c (C_entries): Properly skip over string and character,
Andreas Schwab <=