diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-01-24 04:53:58 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-01-24 04:53:58 +0000 |
commit | 3a2e9dd24d9dfc96e966ec77629ba82b777ae5d8 (patch) | |
tree | 519c8c9b012e8b086f2fd1005f709f50936a9246 /gcc/fixinc/fixfixes.c | |
parent | 5495cc558b494be9449fca09896a9ca355386089 (diff) | |
download | gcc-3a2e9dd24d9dfc96e966ec77629ba82b777ae5d8.zip gcc-3a2e9dd24d9dfc96e966ec77629ba82b777ae5d8.tar.gz gcc-3a2e9dd24d9dfc96e966ec77629ba82b777ae5d8.tar.bz2 |
fixfixes.c (fix_char_macro_uses): Correct regular expression to allow underscores in macro names.
* fixinc/fixfixes.c (fix_char_macro_uses): Correct regular
expression to allow underscores in macro names.
(fix_char_macro_defines): Increment scanning pointer.
From-SVN: r31580
Diffstat (limited to 'gcc/fixinc/fixfixes.c')
-rw-r--r-- | gcc/fixinc/fixfixes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fixinc/fixfixes.c b/gcc/fixinc/fixfixes.c index 8477589..597ce38 100644 --- a/gcc/fixinc/fixfixes.c +++ b/gcc/fixinc/fixfixes.c @@ -378,7 +378,7 @@ fix_char_macro_uses (text, str) /* This regexp looks for a traditional-syntax #define (# in column 1) of an object-like macro. */ static const char pat[] = - "^#[ \t]*define[ \t]+[A-Za-z][A-Za-z0-9]*[ \t]+"; + "^#[ \t]*define[ \t]+[_A-Za-z][_A-Za-z0-9]*[ \t]+"; static regex_t re; regmatch_t rm[1]; @@ -486,6 +486,7 @@ fix_char_macro_defines (text, str) { if (*p == str[0] && !strncmp (p+1, str+1, len-1)) goto found; + p++; } while (isalpha (*p) || isalnum (*p) || *p == '_'); /* Hit end of macro name without finding the string. */ |