OSDN Git Service

* l10nflist.c (_nl_normalize_codeset): Cast argument of ctype
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Nov 2001 21:51:46 +0000 (21:51 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Nov 2001 21:51:46 +0000 (21:51 +0000)
function to `unsigned char'.
* loadmsgcat.c (_nl_load_domain): Likewise.
* localealias.c (read_alias_file, alias_compare): Likewise.
* localcharset.c: Include "gettextP.h".
* plural.y (__attribute__): Define.
(yyerror): Mark parameter with __attribute__ ((__unused__)).
* plural.c: Regenerate.

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

gcc/intl/ChangeLog
gcc/intl/l10nflist.c
gcc/intl/loadmsgcat.c
gcc/intl/localcharset.c
gcc/intl/localealias.c
gcc/intl/plural.c
gcc/intl/plural.y

index a677ba5..4e11a8d 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * l10nflist.c (_nl_normalize_codeset): Cast argument of ctype
+       function to `unsigned char'.
+       * loadmsgcat.c (_nl_load_domain): Likewise.
+       * localealias.c (read_alias_file, alias_compare): Likewise.
+       * localcharset.c: Include "gettextP.h".
+       * plural.y (__attribute__): Define.
+       (yyerror): Mark parameter with __attribute__ ((__unused__)).
+       * plural.c: Regenerate.
+
 2001-10-24  Zack Weinberg  <zack@codesourcery.com>
 
        * loadmsgcat.c (INTTYPE_SIGNED, INTTYPE_MINIMUM,
index 533e94b..3a1cbd0 100644 (file)
@@ -356,11 +356,11 @@ _nl_normalize_codeset (codeset, name_len)
   size_t cnt;
 
   for (cnt = 0; cnt < name_len; ++cnt)
-    if (isalnum (codeset[cnt]))
+    if (isalnum ((unsigned char)codeset[cnt]))
       {
        ++len;
 
-       if (isalpha (codeset[cnt]))
+       if (isalpha ((unsigned char)codeset[cnt]))
          only_digit = 0;
       }
 
@@ -374,9 +374,9 @@ _nl_normalize_codeset (codeset, name_len)
        wp = retval;
 
       for (cnt = 0; cnt < name_len; ++cnt)
-       if (isalpha (codeset[cnt]))
-         *wp++ = tolower (codeset[cnt]);
-       else if (isdigit (codeset[cnt]))
+       if (isalpha ((unsigned char)codeset[cnt]))
+         *wp++ = tolower ((unsigned char)codeset[cnt]);
+       else if (isdigit ((unsigned char)codeset[cnt]))
          *wp++ = codeset[cnt];
 
       *wp = '\0';
index 7055e52..bf444f6 100644 (file)
@@ -521,7 +521,7 @@ _nl_load_domain (domain_file, domainbinding)
          struct parse_args args;
 
          nplurals += 9;
-         while (*nplurals != '\0' && isspace (*nplurals))
+         while (*nplurals != '\0' && isspace ((unsigned char)*nplurals))
            ++nplurals;
 #if defined HAVE_STRTOUL || defined _LIBC
          n = strtoul (nplurals, &endp, 10);
index 07c5058..b528ea7 100644 (file)
@@ -55,6 +55,8 @@
 # include <windows.h>
 #endif
 
+#include "gettextP.h"
+
 #ifndef DIRECTORY_SEPARATOR
 # define DIRECTORY_SEPARATOR '/'
 #endif
index a1679bf..85e5c90 100644 (file)
@@ -244,21 +244,21 @@ read_alias_file (fname, fname_len)
 
       cp = buf;
       /* Ignore leading white space.  */
-      while (isspace (cp[0]))
+      while (isspace ((unsigned char)cp[0]))
        ++cp;
 
       /* A leading '#' signals a comment line.  */
       if (cp[0] != '\0' && cp[0] != '#')
        {
          alias = cp++;
-         while (cp[0] != '\0' && !isspace (cp[0]))
+         while (cp[0] != '\0' && !isspace ((unsigned char)cp[0]))
            ++cp;
          /* Terminate alias name.  */
          if (cp[0] != '\0')
            *cp++ = '\0';
 
          /* Now look for the beginning of the value.  */
-         while (isspace (cp[0]))
+         while (isspace ((unsigned char)cp[0]))
            ++cp;
 
          if (cp[0] != '\0')
@@ -267,7 +267,7 @@ read_alias_file (fname, fname_len)
              size_t value_len;
 
              value = cp++;
-             while (cp[0] != '\0' && !isspace (cp[0]))
+             while (cp[0] != '\0' && !isspace ((unsigned char)cp[0]))
                ++cp;
              /* Terminate value.  */
              if (cp[0] == '\n')
@@ -390,8 +390,8 @@ alias_compare (map1, map2)
     {
       /* I know this seems to be odd but the tolower() function in
         some systems libc cannot handle nonalpha characters.  */
-      c1 = isupper (*p1) ? tolower (*p1) : *p1;
-      c2 = isupper (*p2) ? tolower (*p2) : *p2;
+      c1 = isupper ((unsigned char)*p1) ? tolower ((unsigned char)*p1) : *p1;
+      c2 = isupper ((unsigned char)*p2) ? tolower ((unsigned char)*p2) : *p2;
       if (c1 == '\0')
        break;
       ++p1;
index 640d43c..7d7e6af 100644 (file)
@@ -1317,10 +1317,13 @@ yylex (lval, pexp)
   return result;
 }
 
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#define __attribute__(x)
+#endif
 
 static void
 yyerror (str)
-     const char *str;
+     const char *str __attribute__ ((__unused__));
 {
   /* Do nothing.  We don't print error messages here.  */
 }
index be049a6..4eff3e0 100644 (file)
@@ -404,10 +404,13 @@ yylex (lval, pexp)
   return result;
 }
 
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#define __attribute__(x)
+#endif
 
 static void
 yyerror (str)
-     const char *str;
+     const char *str __attribute__ ((__unused__));
 {
   /* Do nothing.  We don't print error messages here.  */
 }