Commit 3a2e9dd2 by Zack Weinberg Committed by Zack Weinberg

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
parent 5495cc55
2000-01-23 Zack Weinberg <zack@wolery.cumb.org>
* fixinc/fixfixes.c (fix_char_macro_uses): Correct regular
expression to allow underscores in macro names.
(fix_char_macro_defines): Increment scanning pointer.
2000-01-23 Richard Henderson <rth@cygnus.com> 2000-01-23 Richard Henderson <rth@cygnus.com>
* alpha/osf.h (TARGET_HAS_XFLOATING_LIBS): Define. * alpha/osf.h (TARGET_HAS_XFLOATING_LIBS): Define.
......
...@@ -378,7 +378,7 @@ fix_char_macro_uses (text, str) ...@@ -378,7 +378,7 @@ fix_char_macro_uses (text, str)
/* This regexp looks for a traditional-syntax #define (# in column 1) /* This regexp looks for a traditional-syntax #define (# in column 1)
of an object-like macro. */ of an object-like macro. */
static const char pat[] = 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; static regex_t re;
regmatch_t rm[1]; regmatch_t rm[1];
...@@ -486,6 +486,7 @@ fix_char_macro_defines (text, str) ...@@ -486,6 +486,7 @@ fix_char_macro_defines (text, str)
{ {
if (*p == str[0] && !strncmp (p+1, str+1, len-1)) if (*p == str[0] && !strncmp (p+1, str+1, len-1))
goto found; goto found;
p++;
} }
while (isalpha (*p) || isalnum (*p) || *p == '_'); while (isalpha (*p) || isalnum (*p) || *p == '_');
/* Hit end of macro name without finding the string. */ /* Hit end of macro name without finding the string. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment