* fixinc/fixfixes.c (fix_char_macro_uses): Correct regular
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Jan 2000 04:53:58 +0000 (04:53 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Jan 2000 04:53:58 +0000 (04:53 +0000)
expression to allow underscores in macro names.
(fix_char_macro_defines): Increment scanning pointer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31580 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fixinc/fixfixes.c

index 1d5a61f..3dbfb11 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * alpha/osf.h (TARGET_HAS_XFLOATING_LIBS): Define.
index 8477589..597ce38 100644 (file)
@@ -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.  */