diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-11-03 21:51:46 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-11-03 21:51:46 +0000 |
commit | e6313aee750b42582127c521f51f341118dcef10 (patch) | |
tree | bb10aeffada80441c6422c40d4c6094c28cc4670 /gcc/intl | |
parent | 2e80c17d6ded7a23dae395eb6f93587ffe7f934d (diff) | |
download | gcc-e6313aee750b42582127c521f51f341118dcef10.zip gcc-e6313aee750b42582127c521f51f341118dcef10.tar.gz gcc-e6313aee750b42582127c521f51f341118dcef10.tar.bz2 |
l10nflist.c (_nl_normalize_codeset): Cast argument of ctype function to `unsigned char'.
* 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.
From-SVN: r46743
Diffstat (limited to 'gcc/intl')
-rw-r--r-- | gcc/intl/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/intl/l10nflist.c | 10 | ||||
-rw-r--r-- | gcc/intl/loadmsgcat.c | 2 | ||||
-rw-r--r-- | gcc/intl/localcharset.c | 2 | ||||
-rw-r--r-- | gcc/intl/localealias.c | 12 | ||||
-rw-r--r-- | gcc/intl/plural.c | 5 | ||||
-rw-r--r-- | gcc/intl/plural.y | 5 |
7 files changed, 33 insertions, 14 deletions
diff --git a/gcc/intl/ChangeLog b/gcc/intl/ChangeLog index a677ba5..4e11a8d 100644 --- a/gcc/intl/ChangeLog +++ b/gcc/intl/ChangeLog @@ -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, diff --git a/gcc/intl/l10nflist.c b/gcc/intl/l10nflist.c index 533e94b..3a1cbd0 100644 --- a/gcc/intl/l10nflist.c +++ b/gcc/intl/l10nflist.c @@ -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'; diff --git a/gcc/intl/loadmsgcat.c b/gcc/intl/loadmsgcat.c index 7055e52..bf444f6 100644 --- a/gcc/intl/loadmsgcat.c +++ b/gcc/intl/loadmsgcat.c @@ -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); diff --git a/gcc/intl/localcharset.c b/gcc/intl/localcharset.c index 07c5058..b528ea7 100644 --- a/gcc/intl/localcharset.c +++ b/gcc/intl/localcharset.c @@ -55,6 +55,8 @@ # include <windows.h> #endif +#include "gettextP.h" + #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif diff --git a/gcc/intl/localealias.c b/gcc/intl/localealias.c index a1679bf..85e5c90 100644 --- a/gcc/intl/localealias.c +++ b/gcc/intl/localealias.c @@ -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; diff --git a/gcc/intl/plural.c b/gcc/intl/plural.c index 640d43c..7d7e6af 100644 --- a/gcc/intl/plural.c +++ b/gcc/intl/plural.c @@ -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. */ } diff --git a/gcc/intl/plural.y b/gcc/intl/plural.y index be049a6..4eff3e0 100644 --- a/gcc/intl/plural.y +++ b/gcc/intl/plural.y @@ -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. */ } |