From: Bruno Haible Date: Thu, 20 Oct 2005 17:51:13 +0000 (+0000) Subject: Use locale-independent character handling. X-Git-Tag: v0.15~353 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f38ff5ffb9f39562d00e264d55da3dbeb2f2750e;p=thirdparty%2Fgettext.git Use locale-independent character handling. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 7d21c48ff..5c5fe2ed9 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,13 @@ +2005-10-09 Bruno Haible + + * msgl-check.c: Include c-ctype.h instead of ctype.h. + (check_plural): Use c_isspace instead of isspace. + * x-librep.c: Include c-ctype.h instead of ctype.h. + (read_token): Use c_isxdigit instead of isxdigit. + * x-rst.c: Include c-ctype.h instead of ctype.h. + (extract_rst): Use c_isdigit instead of isdigit. + * x-ycp.c: Don't include ctype.h. + 2005-10-09 Bruno Haible * plural-exp.c: Renamed from plural.c. diff --git a/gettext-tools/src/msgl-check.c b/gettext-tools/src/msgl-check.c index 3e12d5680..e58537713 100644 --- a/gettext-tools/src/msgl-check.c +++ b/gettext-tools/src/msgl-check.c @@ -23,7 +23,6 @@ /* Specification. */ #include "msgl-check.h" -#include #include #include #include @@ -31,6 +30,7 @@ #include #include +#include "c-ctype.h" #include "xalloc.h" #include "xerror.h" #include "po-xerror.h" @@ -387,7 +387,7 @@ check_plural (message_list_ty *mlp, unsigned char **plural_distribution) /* First check the number. */ nplurals += 9; - while (*nplurals != '\0' && isspace ((unsigned char) *nplurals)) + while (*nplurals != '\0' && c_isspace ((unsigned char) *nplurals)) ++nplurals; endp = nplurals; nplurals_value = 0; diff --git a/gettext-tools/src/x-librep.c b/gettext-tools/src/x-librep.c index 4e53665af..1a88998bc 100644 --- a/gettext-tools/src/x-librep.c +++ b/gettext-tools/src/x-librep.c @@ -21,13 +21,13 @@ # include "config.h" #endif -#include #include #include #include #include #include +#include "c-ctype.h" #include "message.h" #include "xgettext.h" #include "x-librep.h" @@ -376,7 +376,7 @@ read_token (struct token *tp, const int *first) break; if ((radix <= 10 && !(c >= '0' && c <= '0' + radix - 1)) - || (radix == 16 && !isxdigit (c))) + || (radix == 16 && !c_isxdigit (c))) radix = 0; break; } diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c index be3aed1a9..a252bdc07 100644 --- a/gettext-tools/src/x-rst.c +++ b/gettext-tools/src/x-rst.c @@ -21,11 +21,11 @@ # include "config.h" #endif -#include #include #include #include +#include "c-ctype.h" #include "message.h" #include "xgettext.h" #include "x-rst.h" @@ -165,7 +165,7 @@ extract_rst (FILE *f, c = getc (f); if (c == EOF && ferror (f)) goto bomb; - if (c == EOF || !isdigit (c)) + if (c == EOF || !c_isdigit (c)) { error_with_progname = false; error (EXIT_FAILURE, 0, _("%s:%d: missing number after #"), @@ -176,7 +176,7 @@ extract_rst (FILE *f, for (;;) { c = getc (f); - if (c == EOF || !isdigit (c)) + if (c == EOF || !c_isdigit (c)) break; n = n * 10 + (c - '0'); } diff --git a/gettext-tools/src/x-ycp.c b/gettext-tools/src/x-ycp.c index d2e8769c0..9ea14e45b 100644 --- a/gettext-tools/src/x-ycp.c +++ b/gettext-tools/src/x-ycp.c @@ -21,7 +21,6 @@ # include "config.h" #endif -#include #include #include #include