[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] brace level in typedef
From: |
Shigio Yamaguchi |
Subject: |
Re: [PATCH] brace level in typedef |
Date: |
Wed, 19 Mar 2003 17:18:24 +0900 |
Committed. Thank you.
> If the brace level of the beginning of typedef is not 0,
> gctags does not escape from a loop until it reaches the end of a file.
>
> ? 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.23
> diff -u -r1.23 C.c
> --- gctags/C.c 5 Mar 2003 16:04:12 -0000 1.23
> +++ gctags/C.c 6 Mar 2003 14:35:08 -0000
> @@ -403,7 +403,7 @@
> else if (c == ')')
> level--;
> else if (c == SYMBOL) {
> - if (level > 0) {
> + if (level > typedef_savelevel)
{
> if (target == SYM)
> PUT(token, line
no, sp);
> } else {
> @@ -423,13 +423,13 @@
> savetok[0] = 0;
> }
> }
> - if (level == 0 && c == ';')
> + if (level == typedef_savelevel && c ==
';')
> break;
> }
> if (wflag) {
> if (c == EOF)
> fprintf(stderr, "Warning: unexp
ected eof. [+%d %s]\n", lineno, curfile);
> - else if (level > 0)
> + else if (level != typedef_savelevel)
> fprintf(stderr, "Warning: () bl
ock unmatched. (last at level %d.)[+%d %s]\n", level, lineno, curfile);
> }
> }
> 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 6 Mar 2003 14:35:08 -0000
> @@ -449,7 +449,7 @@
> else if (c == ')')
> level--;
> else if (c == SYMBOL) {
> - if (level > 0) {
> + if (level > typedef_savelevel)
{
> if (target == SYM)
> PUT(token, line
no, sp);
> } else {
> @@ -469,13 +469,13 @@
> savetok[0] = 0;
> }
> }
> - if (level == 0 && c == ';')
> + if (level == typedef_savelevel && c ==
';')
> break;
> }
> if (wflag) {
> if (c == EOF)
> fprintf(stderr, "Warning: unexp
ected eof. [+%d %s]\n", lineno, curfile);
> - else if (level > 0)
> + else if (level != typedef_savelevel)
> fprintf(stderr, "Warning: () bl
ock unmatched. (last at level %d.)[+%d %s]\n", level, lineno, curfile);
> }
> }
>
> ----
> Hideki IWAMOTO address@hidden
>
>
> _______________________________________________
> Bug-global mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-global
>
>
--
Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3