bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] pick up reference to macro in conditional directive


From: Hideki IWAMOTO
Subject: [PATCH] pick up reference to macro in conditional directive
Date: Thu, 06 Mar 2003 00:10:56 +0900

? gctags/.deps
? gctags/Makefile
? gctags/Makefile.in
? gctags/const.h
? gctags/gctags
? gctags/gctags.1
Index: gctags/C.c
===================================================================
RCS file: /cvsroot/global/global/gctags/C.c,v
retrieving revision 1.22
diff -u -r1.22 C.c
--- gctags/C.c  1 Mar 2003 15:24:17 -0000       1.22
+++ gctags/C.c  5 Mar 2003 15:00:24 -0000
@@ -261,7 +261,11 @@
                        while ((c = nexttoken(interested, reserved)) != EOF && 
c != '\n') {
                                if (!strcmp(token, "defined"))
                                        continue;
-                               if (c == SYMBOL && target == SYM)
+                               if (c == SYMBOL
+                                   && (dflag
+                                       ? ((target == REF && defined(token))
+                                          || (target == SYM && 
!defined(token)))
+                                       : target == SYM))
                                        PUT(token, lineno, sp);
                        }
                        break;
Index: gctags/Cpp.c
===================================================================
RCS file: /cvsroot/global/global/gctags/Cpp.c,v
retrieving revision 1.20
diff -u -r1.20 Cpp.c
--- gctags/Cpp.c        1 Mar 2003 15:24:17 -0000       1.20
+++ gctags/Cpp.c        5 Mar 2003 15:00:24 -0000
@@ -263,7 +263,11 @@
                        while ((c = nexttoken(interested, reserved)) != EOF && 
c != '\n') {
                                if (!strcmp(token, "defined"))
                                        continue;
-                               if (c == SYMBOL && target == SYM)
+                               if (c == SYMBOL
+                                   && (dflag
+                                       ? ((target == REF && defined(token))
+                                          || (target == SYM && 
!defined(token)))
+                                       : target == SYM))
                                        PUT(token, lineno, sp);
                        }
                        break;

----
Hideki IWAMOTO  address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]