[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] insert closetoken() before continue
From: |
Shigio Yamaguchi |
Subject: |
Re: [PATCH] insert closetoken() before continue |
Date: |
Wed, 26 Feb 2003 10:13:01 +0900 |
Hi,
I have fixed this bug by moving opentoken() after continue.
Thank you!
Index: gctags/gctags.c
===================================================================
RCS file: /cvsroot/global/global/gctags/gctags.c,v
retrieving revision 1.16
diff -c -r1.16 gctags.c
*** gctags/gctags.c 24 Feb 2003 06:50:19 -0000 1.16
--- gctags/gctags.c 26 Feb 2003 01:06:29 -0000
***************
*** 246,254 ****
char *lang = NULL;
char *suffix, *list, *tail;
- /* initialize token parser. */
- if (!opentoken(argv[0]))
- die("'%s' cannot open.", argv[0]);
#if defined(_WIN32) || defined(__DJGPP__)
/* Lower case the file name since names are case insensitive */
strlwr(argv[0]);
--- 246,251 ----
***************
*** 273,278 ****
--- 270,279 ----
continue;
if (vflag)
fprintf(stderr, "suffix '%s' assumed language '%s'.\n",
suffix, lang);
+
+ /* initialize token parser. */
+ if (!opentoken(argv[0]))
+ die("'%s' cannot open.", argv[0]);
/*
* call language specific parser.
*/
> ? gctags/.deps
> ? gctags/Makefile
> ? gctags/Makefile.in
> ? gctags/const.h
> ? gctags/gctags
> ? gctags/gctags.1
> Index: gctags/gctags.c
> ===================================================================
> RCS file: /cvsroot/global/global/gctags/gctags.c,v
> retrieving revision 1.16
> diff -u -r1.16 gctags.c
> --- gctags/gctags.c 24 Feb 2003 06:50:19 -0000 1.16
> +++ gctags/gctags.c 25 Feb 2003 15:04:47 -0000
> @@ -255,8 +255,10 @@
> #endif
> /* get suffix of the path. */
> suffix = locatestring(argv[0], ".", MATCH_LAST);
> - if (!suffix)
> + if (!suffix) {
> + closetoken();
> continue;
> + }
> list = strbuf_value(active_map);
> tail = list + strbuf_getlen(active_map);
>
> @@ -269,8 +271,10 @@
> lang = NULL;
> list += strlen(list) + 1;
> }
> - if (lang == NULL)
> + if (lang == NULL) {
> + closetoken();
> continue;
> + }
> if (vflag)
> fprintf(stderr, "suffix '%s' assumed language '%s'.\n",
suffix, lang);
> /*
>
> ----
> 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