diff options
| author | Francesco Potortì | 2002-06-20 08:43:57 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2002-06-20 08:43:57 +0000 |
| commit | 2b74996486237ed145c000062e20f0ef9c39ec26 (patch) | |
| tree | 5d386ae022bec1368e6f24e1f6273895fc718d73 /lib-src | |
| parent | 3848dd73d7a425f994286d4580b8fe3ac2f89cc5 (diff) | |
| download | emacs-2b74996486237ed145c000062e20f0ef9c39ec26.tar.gz emacs-2b74996486237ed145c000062e20f0ef9c39ec26.zip | |
(add_regex): Invalid regexp modifiers are ignored.
(Makefile_targets): Tag variables unless --no-globals.
(LOOP_ON_INPUT_LINES): Serious bug corrected.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/etags.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 5f46013153b..326e7d10988 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -31,10 +31,11 @@ | |||
| 31 | * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba). | 31 | * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba). |
| 32 | * 2002 #line directives by Francesco Potortì. | 32 | * 2002 #line directives by Francesco Potortì. |
| 33 | * | 33 | * |
| 34 | * Francesco Potortì <pot@gnu.org> has maintained it since 1993. | 34 | * Francesco Potortì <pot@gnu.org> has maintained and improved it since 1993. |
| 35 | * | ||
| 35 | */ | 36 | */ |
| 36 | 37 | ||
| 37 | char pot_etags_version[] = "@(#) pot revision number is 16.26"; | 38 | char pot_etags_version[] = "@(#) pot revision number is 16.27"; |
| 38 | 39 | ||
| 39 | #define TRUE 1 | 40 | #define TRUE 1 |
| 40 | #define FALSE 0 | 41 | #define FALSE 0 |
| @@ -3831,8 +3832,9 @@ Yacc_entries (inf) | |||
| 3831 | #define LOOP_ON_INPUT_LINES(file_pointer, line_buffer, char_pointer) \ | 3832 | #define LOOP_ON_INPUT_LINES(file_pointer, line_buffer, char_pointer) \ |
| 3832 | for (; /* loop initialization */ \ | 3833 | for (; /* loop initialization */ \ |
| 3833 | !feof (file_pointer) /* loop test */ \ | 3834 | !feof (file_pointer) /* loop test */ \ |
| 3834 | && (char_pointer = lb.buffer, /* instructions at start of loop */ \ | 3835 | && /* instructions at start of loop */ \ |
| 3835 | readline (&line_buffer, file_pointer), \ | 3836 | (readline (&line_buffer, file_pointer), \ |
| 3837 | char_pointer = line_buffer.buffer, \ | ||
| 3836 | TRUE); \ | 3838 | TRUE); \ |
| 3837 | ) | 3839 | ) |
| 3838 | #define LOOKING_AT(cp, keyword) /* keyword is a constant string */ \ | 3840 | #define LOOKING_AT(cp, keyword) /* keyword is a constant string */ \ |
| @@ -4398,7 +4400,7 @@ Cobol_paragraphs (inf) | |||
| 4398 | 4400 | ||
| 4399 | /* | 4401 | /* |
| 4400 | * Makefile support | 4402 | * Makefile support |
| 4401 | * Idea by Assar Westerlund <assar@sics.se> (2001) | 4403 | * Ideas by Assar Westerlund <assar@sics.se> (2001) |
| 4402 | */ | 4404 | */ |
| 4403 | static void | 4405 | static void |
| 4404 | Makefile_targets (inf) | 4406 | Makefile_targets (inf) |
| @@ -4412,7 +4414,7 @@ Makefile_targets (inf) | |||
| 4412 | continue; | 4414 | continue; |
| 4413 | while (*bp != '\0' && *bp != '=' && *bp != ':') | 4415 | while (*bp != '\0' && *bp != '=' && *bp != ':') |
| 4414 | bp++; | 4416 | bp++; |
| 4415 | if (*bp == ':') | 4417 | if (*bp == ':' || (globals && *bp == '=')) |
| 4416 | pfnote (savenstr (lb.buffer, bp - lb.buffer), TRUE, | 4418 | pfnote (savenstr (lb.buffer, bp - lb.buffer), TRUE, |
| 4417 | lb.buffer, bp - lb.buffer + 1, lineno, linecharno); | 4419 | lb.buffer, bp - lb.buffer + 1, lineno, linecharno); |
| 4418 | } | 4420 | } |
| @@ -5432,9 +5434,13 @@ add_regex (regexp_pattern, lang) | |||
| 5432 | need_filebuf = TRUE; | 5434 | need_filebuf = TRUE; |
| 5433 | break; | 5435 | break; |
| 5434 | default: | 5436 | default: |
| 5435 | modifiers[1] = '\0'; | 5437 | { |
| 5436 | error ("invalid regexp modifier `%s'", modifiers); | 5438 | char wrongmod [2]; |
| 5437 | return; | 5439 | wrongmod[0] = modifiers[0]; |
| 5440 | wrongmod[1] = '\0'; | ||
| 5441 | error ("invalid regexp modifier `%s', ignoring", wrongmod); | ||
| 5442 | } | ||
| 5443 | break; | ||
| 5438 | } | 5444 | } |
| 5439 | 5445 | ||
| 5440 | patbuf = xnew (1, struct re_pattern_buffer); | 5446 | patbuf = xnew (1, struct re_pattern_buffer); |