diff options
author | Bruno Haible <bruno@clisp.org> | 2001-08-14 11:49:07 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-08-14 11:49:07 +0000 |
commit | 8af193fbf37556ba3797f59cbdc78439f7c32224 (patch) | |
tree | 3ed31e9f5ada81562b37c7ae60d6e52ddf9befe8 /intl | |
parent | 68e84ecc9decc4630ba4d327d7e2383d3200f485 (diff) | |
download | external_gettext-8af193fbf37556ba3797f59cbdc78439f7c32224.zip external_gettext-8af193fbf37556ba3797f59cbdc78439f7c32224.tar.gz external_gettext-8af193fbf37556ba3797f59cbdc78439f7c32224.tar.bz2 |
Correct use of <ctype.h> functions.
Diffstat (limited to 'intl')
-rw-r--r-- | intl/ChangeLog | 9 | ||||
-rw-r--r-- | intl/l10nflist.c | 10 | ||||
-rw-r--r-- | intl/loadmsgcat.c | 2 | ||||
-rw-r--r-- | intl/localealias.c | 8 |
4 files changed, 19 insertions, 10 deletions
diff --git a/intl/ChangeLog b/intl/ChangeLog index b70893b..cbe031f 100644 --- a/intl/ChangeLog +++ b/intl/ChangeLog @@ -1,3 +1,12 @@ +2001-07-28 Bruno Haible <haible@clisp.cons.org> + + * l10nflist.c (_nl_normalize_codeset): Cast isalnum, isalpha, isdigit, + tolower argument to 'unsigned char'. + * loadmsgcat.c (_nl_load_domain): Cast isspace argument to + 'unsigned char'. + * localealias.c (read_alias_file): Cast isspace argument to + 'unsigned char'. + 2001-07-23 Bruno Haible <haible@clisp.cons.org> * gettext.h: Assume <limits.h> exists. diff --git a/intl/l10nflist.c b/intl/l10nflist.c index 557253e..291a742 100644 --- a/intl/l10nflist.c +++ b/intl/l10nflist.c @@ -355,11 +355,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; } @@ -373,9 +373,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 d589243..fd73bd9 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -507,7 +507,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 76f19a9..76d99fc 100644 --- a/intl/localealias.c +++ b/intl/localealias.c @@ -243,21 +243,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') @@ -266,7 +266,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') |