bug-global
[Top][All Lists]
Advanced

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

[PATCH] seems_datatype in gctags


From: Hideki IWAMOTO
Subject: [PATCH] seems_datatype in gctags
Date: Sun, 09 Mar 2003 23:34:17 +0900

* C.c (seems_function_definition): Changed so that a symbol might not be 
registered into both GRTAGS and GSYMS. 
* Cpp.c (function_definition): Likewise.
* C.c (seems_datatype): Corrected the treatment of the return value of strcmp.
* Cpp.c (seems_datatype): Likewise.

Index: gctags/C.c
===================================================================
RCS file: /cvsroot/global/global/gctags/C.c,v
retrieving revision 1.23
diff -u -r1.23 C.c
--- gctags/C.c  5 Mar 2003 16:04:12 -0000       1.23
+++ gctags/C.c  9 Mar 2003 13:58:20 -0000
@@ -480,11 +480,13 @@
                }
                /* pick up symbol */
                if (c == SYMBOL) {
-                       if (target == REF) {
-                               if (seems_datatype(token))
+                       if (seems_datatype(token)) {
+                               if (target == REF)
                                        PUT(token, lineno, sp);
-                       } else if (target == SYM)
-                               PUT(token, lineno, sp);
+                       } else {
+                               if (target == SYM)
+                                       PUT(token, lineno, sp);
+                       }
                }
        }
        if (c == EOF)
@@ -522,11 +524,13 @@
 
                /* pick up symbol */
                if (c == SYMBOL) {
-                       if (target == REF) {
-                               if (seems_datatype(token))
+                       if (seems_datatype(token)) {
+                               if (target == REF)
                                        PUT(token, lineno, sp);
-                       } else if (target == SYM)
-                               PUT(token, lineno, sp);
+                       } else {
+                               if (target == SYM)
+                                       PUT(token, lineno, sp);
+                       }
                }
        }
        return 0;
@@ -601,7 +605,7 @@
 
        if (length < 3)
                return 0;
-       if (strcmp(p - 2, "_t"))
+       if (strcmp(p - 2, "_t") == 0)
                return 1;
        for (p = token; *p; p++)
                if (islower(*p))
Index: gctags/Cpp.c
===================================================================
RCS file: /cvsroot/global/global/gctags/Cpp.c,v
retrieving revision 1.21
diff -u -r1.21 Cpp.c
--- gctags/Cpp.c        5 Mar 2003 16:04:12 -0000       1.21
+++ gctags/Cpp.c        9 Mar 2003 13:58:20 -0000
@@ -526,11 +526,13 @@
                }
                /* pick up symbol */
                if (c == SYMBOL) {
-                       if (target == REF) {
-                               if (seems_datatype(token))
+                       if (seems_datatype(token)) {
+                               if (target == REF)
                                        PUT(token, lineno, sp);
-                       } else if (target == SYM)
-                               PUT(token, lineno, sp);
+                       } else {
+                               if (target == SYM)
+                                       PUT(token, lineno, sp);
+                       }
                }
        }
        if (c == EOF)
@@ -571,11 +573,13 @@
                        break;
                /* pick up symbol */
                if (c == SYMBOL) {
-                       if (target == REF) {
-                               if (seems_datatype(token))
+                       if (seems_datatype(token)) {
+                               if (target == REF)
                                        PUT(token, lineno, sp);
-                       } else if (target == SYM)
-                               PUT(token, lineno, sp);
+                       } else {
+                               if (target == SYM)
+                                       PUT(token, lineno, sp);
+                       }
                }
        }
        return 0;
@@ -650,7 +654,7 @@
 
        if (length < 3)
                return 0;
-       if (strcmp(p - 2, "_t"))
+       if (strcmp(p - 2, "_t") == 0)
                return 1;
        for (p = token; *p; p++)
                if (islower(*p))

----
Hideki IWAMOTO  address@hidden




reply via email to

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