diff options
author | Vincent Lefevre <vincent@vinc17.net> | 2003-07-24 18:40:50 +0000 |
---|---|---|
committer | Vincent Lefevre <vincent@vinc17.net> | 2003-07-24 18:40:50 +0000 |
commit | 553ef91d6b72bf403c608b81d00f5112bae6da46 (patch) | |
tree | 3e37980522ca3dff6edbf237a7cc4ef7c3378147 /intl | |
parent | 8fe7e1b4e615dbbc655a96e292af24f045987282 (diff) |
Some functions/macros like isspace take an int and require the
argument to have the value of an unsigned char (or EOF). Under
Solaris, gcc complains when the argument is a char (as this is a
possible bug, on platforms where char is signed, like Solaris). The
attached patch fixes such problems (well, perhaps I've changed more
than necessary, but this doesn't hurt).
Diffstat (limited to 'intl')
-rw-r--r-- | intl/l10nflist.c | 10 | ||||
-rw-r--r-- | intl/loadmsgcat.c | 2 | ||||
-rw-r--r-- | intl/localealias.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/intl/l10nflist.c b/intl/l10nflist.c index 533e94be..8e2605bc 100644 --- a/intl/l10nflist.c +++ b/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/intl/loadmsgcat.c b/intl/loadmsgcat.c index f99ebee3..a06134a1 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -508,7 +508,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/intl/localealias.c b/intl/localealias.c index 91e7acc9..f57d7644 100644 --- a/intl/localealias.c +++ b/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') |