]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use locale-independent character handling.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Oct 2005 17:51:13 +0000 (17:51 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:56 +0000 (12:12 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/msgl-check.c
gettext-tools/src/x-librep.c
gettext-tools/src/x-rst.c
gettext-tools/src/x-ycp.c

index 7d21c48ffe89c748210bf10d28527ae71c06065b..5c5fe2ed9a606159d3352cd087a1f6f3269cedac 100644 (file)
@@ -1,3 +1,13 @@
+2005-10-09  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <bruno@clisp.org>
 
        * plural-exp.c: Renamed from plural.c.
index 3e12d56803eff53f020fc820b343261242c3c385..e585377130d049dcb3ebe46983a7a1fcc0cf9ce4 100644 (file)
@@ -23,7 +23,6 @@
 /* Specification.  */
 #include "msgl-check.h"
 
-#include <ctype.h>
 #include <limits.h>
 #include <setjmp.h>
 #include <signal.h>
@@ -31,6 +30,7 @@
 #include <string.h>
 #include <stdarg.h>
 
+#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;
index 4e53665af0ae60168ebe9dab466af1c1523bdca9..1a88998bc7eabab2a2a6971f934e6212def405ac 100644 (file)
 # include "config.h"
 #endif
 
-#include <ctype.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
+#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;
                        }
index be3aed1a916008571d45bc5460713f20796c5e7a..a252bdc07213968207111d4aa9b2cfd12a4b671f 100644 (file)
 # include "config.h"
 #endif
 
-#include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
 #include <stddef.h>
 
+#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');
                }
index d2e8769c0236ea977868a50723117909fc5ba3fd..9ea14e45bec91e146a700fa6a6c7d7565367736c 100644 (file)
@@ -21,7 +21,6 @@
 # include "config.h"
 #endif
 
-#include <ctype.h>
 #include <errno.h>
 #include <limits.h>
 #include <stdbool.h>