Locale changes from Bruno Haible <haible@clisp.cons.org>.
[deliverable/binutils-gdb.git] / binutils / nlmheader.y
index 3ab5a794a1394ae17b34b2c11eb7759be86c8ea6..5d83f31fcb2b299fcefe3a05e93dda80845dfae7 100644 (file)
@@ -1,5 +1,5 @@
 %{/* nlmheader.y - parse NLM header specification keywords.
-     Copyright 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+     Copyright 1993, 1994, 1995, 1997, 1998, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU Binutils.
 
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <ansidecl.h>
 #include <stdio.h>
-#include <ctype.h>
+#include "safe-ctype.h"
 #include "bfd.h"
 #include "bucomm.h"
 #include "nlm/common.h"
@@ -682,7 +682,7 @@ tail_recurse:
   c = getc (current.file);
 
   /* Commas are treated as whitespace characters.  */
-  while (isspace ((unsigned char) c) || c == ',')
+  while (ISSPACE (c) || c == ',')
     {
       current.state = IN_LINE;
       if (c == '\n')
@@ -735,9 +735,9 @@ tail_recurse:
          if (c == '\n')
            ++current.lineno;
        }
-      while (isspace ((unsigned char) c));
+      while (ISSPACE (c));
       BUF_INIT ();
-      while (! isspace ((unsigned char) c) && c != EOF)
+      while (! ISSPACE (c) && c != EOF)
        {
          BUF_ADD (c);
          c = getc (current.file);
@@ -755,17 +755,14 @@ tail_recurse:
   if (current.state == BEGINNING_OF_LINE)
     {
       BUF_INIT ();
-      while (isalnum ((unsigned char) c) || c == '_')
+      while (ISALNUM (c) || c == '_')
        {
-         if (islower ((unsigned char) c))
-           BUF_ADD (toupper ((unsigned char) c));
-         else
-           BUF_ADD (c);
+         BUF_ADD (TOUPPER (c));
          c = getc (current.file);
        }
       BUF_FINISH ();
 
-      if (c != EOF && ! isspace ((unsigned char) c) && c != ',')
+      if (c != EOF && ! ISSPACE (c) && c != ',')
        {
          nlmheader_identify ();
          fprintf (stderr, _("%s:%d: illegal character in keyword: %c\n"),
@@ -838,7 +835,7 @@ tail_recurse:
 
   /* Gather a generic argument.  */
   BUF_INIT ();
-  while (! isspace (c)
+  while (! ISSPACE (c)
         && c != ','
         && c != COMMENT_CHAR
         && c != '('
This page took 0.024865 seconds and 4 git commands to generate.