]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use size_t instead of ssize_t where possible.
authorBruno Haible <bruno@clisp.org>
Wed, 26 Nov 2003 11:19:46 +0000 (11:19 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:21 +0000 (12:11 +0200)
21 files changed:
ChangeLog
PACKAGING
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/printf-parse.c
gettext-runtime/intl/printf-parse.h
gettext-runtime/intl/vasnprintf.c
gettext-runtime/intl/wprintf-parse.h
gettext-runtime/libasprintf/ChangeLog
gettext-runtime/libasprintf/configure.ac
gettext-runtime/libasprintf/printf-parse.c
gettext-runtime/libasprintf/printf-parse.h
gettext-runtime/libasprintf/vasnprintf.c
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/Makefile.am
gettext-runtime/m4/gettext.m4
gettext-tools/doc/ChangeLog
gettext-tools/doc/gettext.texi
gettext-tools/m4/ChangeLog
gettext-tools/m4/Makefile.am
gettext-tools/misc/ChangeLog
gettext-tools/misc/gettextize.in

index 69db3d062275d90e9b82f4604b7d81f11c19ca68..e57c60d60455bf8cb65452043b75ce0349816b70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-11-23  Bruno Haible  <bruno@clisp.org>
+
+       * PACKAGING: Remove ssize_t.m4.
+
 2003-11-16  Bruno Haible  <bruno@clisp.org>
 
        * PACKAGING: Add size_max.m4, ssize_t.m4, xsize.m4.
index 677984ddb519a777c6d6a62afbbf58c03bf92c3e..e65abf58a51fb9f28eeebb476a6c5aa6b528b732 100644 (file)
--- a/PACKAGING
+++ b/PACKAGING
@@ -133,7 +133,6 @@ following file list.
       $prefix/share/aclocal/progtest.m4
       $prefix/share/aclocal/signed.m4
       $prefix/share/aclocal/size_max.m4
-      $prefix/share/aclocal/ssize_t.m4
       $prefix/share/aclocal/stdint_h.m4
       $prefix/share/aclocal/uintmax_t.m4
       $prefix/share/aclocal/ulonglong.m4
index 1d13498bb0da068f50b4e5b2233465aa9a9ab641..af5bac440ae718792397de4cb0e1b7416de17589 100644 (file)
@@ -1,3 +1,19 @@
+2003-11-23  Paul Eggert  <eggert@twinsun.com>
+            Bruno Haible  <bruno@clisp.org>
+
+       * printf-parse.h: Don't include sys/types.h.
+       (ARG_NONE): New macro.
+       (char_directive): Change type of *arg_index fields to size_t.
+       * wprintf-parse.h: Don't include sys/types.h.
+       (ARG_NONE): New macro.
+       (wchar_t_directive): Change type of *arg_index fields to size_t.
+       * printf-parse.c: Don't include sys/types.h.
+       (SSIZE_MAX): Remove macro.
+       (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
+       Remove unnecessary overflow check.
+       * vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
+       fields.
+
 2003-11-17  Bruno Haible  <bruno@clisp.org>
 
        * vasnprintf.c (alloca): Remove fallback definition.
index d760960c1c5fde863f53cffa9a1f4f1a3a68807f..d19f903d72c8fe94daa2b636a4151e422b891eeb 100644 (file)
@@ -30,9 +30,6 @@
 /* Get size_t, NULL.  */
 #include <stddef.h>
 
-/* Get ssize_t.  */
-#include <sys/types.h>
-
 /* Get intmax_t.  */
 #if HAVE_STDINT_H_WITH_UINTMAX
 # include <stdint.h>
 /* Checked size_t computations.  */
 #include "xsize.h"
 
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
-
 #if WIDE_CHAR_VERSION
 # define PRINTF_PARSE wprintf_parse
 # define CHAR_T wchar_t
@@ -70,7 +63,7 @@ int
 PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
 {
   const CHAR_T *cp = format;           /* pointer into format */
-  ssize_t arg_posn = 0;                /* number of regular arguments consumed */
+  size_t arg_posn = 0;         /* number of regular arguments consumed */
   size_t d_allocated;                  /* allocated elements of d->dir */
   size_t a_allocated;                  /* allocated elements of a->arg */
   size_t max_width_length = 0;
@@ -124,7 +117,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
       CHAR_T c = *cp++;
       if (c == '%')
        {
-         ssize_t arg_index = -1;
+         size_t arg_index = ARG_NONE;
          DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
 
          /* Initialize the next directive.  */
@@ -132,11 +125,11 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
          dp->flags = 0;
          dp->width_start = NULL;
          dp->width_end = NULL;
-         dp->width_arg_index = -1;
+         dp->width_arg_index = ARG_NONE;
          dp->precision_start = NULL;
          dp->precision_end = NULL;
-         dp->precision_arg_index = -1;
-         dp->arg_index = -1;
+         dp->precision_arg_index = ARG_NONE;
+         dp->arg_index = ARG_NONE;
 
          /* Test for positional argument.  */
          if (*cp >= '0' && *cp <= '9')
@@ -154,7 +147,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  if (n == 0)
                    /* Positional argument 0.  */
                    goto error;
-                 if (size_overflow_p (n) || n - 1 > SSIZE_MAX)
+                 if (size_overflow_p (n))
                    /* n too large, would lead to out of memory later.  */
                    goto error;
                  arg_index = n - 1;
@@ -224,18 +217,18 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                      if (n == 0)
                        /* Positional argument 0.  */
                        goto error;
-                     if (size_overflow_p (n) || n - 1 > SSIZE_MAX)
+                     if (size_overflow_p (n))
                        /* n too large, would lead to out of memory later.  */
                        goto error;
                      dp->width_arg_index = n - 1;
                      cp = np + 1;
                    }
                }
-             if (dp->width_arg_index < 0)
+             if (dp->width_arg_index == ARG_NONE)
                {
                  dp->width_arg_index = arg_posn++;
-                 if (dp->width_arg_index < 0)
-                   /* arg_posn wrapped around at SSIZE_MAX.  */
+                 if (dp->width_arg_index == ARG_NONE)
+                   /* arg_posn wrapped around.  */
                    goto error;
                }
              REGISTER_ARG (dp->width_arg_index, TYPE_INT);
@@ -281,7 +274,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                          if (n == 0)
                            /* Positional argument 0.  */
                            goto error;
-                         if (size_overflow_p (n) || n - 1 > SSIZE_MAX)
+                         if (size_overflow_p (n))
                            /* n too large, would lead to out of memory
                               later.  */
                            goto error;
@@ -289,11 +282,11 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                          cp = np + 1;
                        }
                    }
-                 if (dp->precision_arg_index < 0)
+                 if (dp->precision_arg_index == ARG_NONE)
                    {
                      dp->precision_arg_index = arg_posn++;
-                     if (dp->precision_arg_index < 0)
-                       /* arg_posn wrapped around at SSIZE_MAX.  */
+                     if (dp->precision_arg_index == ARG_NONE)
+                       /* arg_posn wrapped around.  */
                        goto error;
                    }
                  REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
@@ -492,11 +485,11 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
            if (type != TYPE_NONE)
              {
                dp->arg_index = arg_index;
-               if (dp->arg_index < 0)
+               if (dp->arg_index == ARG_NONE)
                  {
                    dp->arg_index = arg_posn++;
-                   if (dp->arg_index < 0)
-                     /* arg_posn wrapped around at SSIZE_MAX.  */
+                   if (dp->arg_index == ARG_NONE)
+                     /* arg_posn wrapped around.  */
                      goto error;
                  }
                REGISTER_ARG (dp->arg_index, type);
@@ -512,9 +505,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
              DIRECTIVE *memory;
 
              d_allocated = xtimes (d_allocated, 2);
-             if (size_overflow_p (d_allocated))
-               /* Overflow, would lead to out of memory.  */
-               goto error;
              memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
              if (size_overflow_p (memory_size))
                /* Overflow, would lead to out of memory.  */
index 754aaf2e5de07f791bbaadbbfb6c411babd1c5d8..8aec50e2a3f9feacb085c038372e1f9f23875307 100644 (file)
@@ -21,9 +21,6 @@
 
 #include "printf-args.h"
 
-/* Get ssize_t.  */
-#include <sys/types.h>
-
 
 /* Flags */
 #define FLAG_GROUP      1      /* ' flag */
@@ -33,6 +30,9 @@
 #define FLAG_ALT       16      /* # flag */
 #define FLAG_ZERO      32
 
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE       (~(size_t)0)
+
 /* A parsed directive.  */
 typedef struct
 {
@@ -41,12 +41,12 @@ typedef struct
   int flags;
   const char* width_start;
   const char* width_end;
-  ssize_t width_arg_index;
+  size_t width_arg_index;
   const char* precision_start;
   const char* precision_end;
-  ssize_t precision_arg_index;
+  size_t precision_arg_index;
   char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
-  ssize_t arg_index;
+  size_t arg_index;
 }
 char_directive;
 
index 05a08bcfb3a23b0e27196054df834a7356b89cb8..8a62282d73e4aec341776bac1605e6abf8ad1ff7 100644 (file)
@@ -223,7 +223,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
          {
            size_t augmented_length;
 
-           if (!(dp->arg_index < 0))
+           if (!(dp->arg_index == ARG_NONE))
              abort ();
            augmented_length = xsum (length, 1);
            ENSURE_ALLOCATION (augmented_length);
@@ -232,7 +232,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
          }
        else
          {
-           if (!(dp->arg_index >= 0))
+           if (!(dp->arg_index != ARG_NONE))
              abort ();
 
            if (dp->conversion == 'n')
@@ -280,7 +280,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
                  width = 0;
                  if (dp->width_start != dp->width_end)
                    {
-                     if (dp->width_arg_index >= 0)
+                     if (dp->width_arg_index != ARG_NONE)
                        {
                          int arg;
 
@@ -302,7 +302,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
                  precision = 6;
                  if (dp->precision_start != dp->precision_end)
                    {
-                     if (dp->precision_arg_index >= 0)
+                     if (dp->precision_arg_index != ARG_NONE)
                        {
                          int arg;
 
@@ -564,13 +564,13 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
 
                /* Construct the arguments for calling snprintf or sprintf.  */
                prefix_count = 0;
-               if (dp->width_arg_index >= 0)
+               if (dp->width_arg_index != ARG_NONE)
                  {
                    if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
                      abort ();
                    prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
                  }
-               if (dp->precision_arg_index >= 0)
+               if (dp->precision_arg_index != ARG_NONE)
                  {
                    if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
                      abort ();
index 549865fd66cbd02d2ced0651c61d76f2a3e8a47e..24a2cfc28f326df451a3ddf01f5c6e7f4eb9cae6 100644 (file)
@@ -21,9 +21,6 @@
 
 #include "printf-args.h"
 
-/* Get ssize_t.  */
-#include <sys/types.h>
-
 
 /* Flags */
 #define FLAG_GROUP      1      /* ' flag */
@@ -33,6 +30,9 @@
 #define FLAG_ALT       16      /* # flag */
 #define FLAG_ZERO      32
 
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE       (~(size_t)0)
+
 /* A parsed directive.  */
 typedef struct
 {
@@ -41,12 +41,12 @@ typedef struct
   int flags;
   const wchar_t* width_start;
   const wchar_t* width_end;
-  ssize_t width_arg_index;
+  size_t width_arg_index;
   const wchar_t* precision_start;
   const wchar_t* precision_end;
-  ssize_t precision_arg_index;
+  size_t precision_arg_index;
   wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
-  ssize_t arg_index;
+  size_t arg_index;
 }
 wchar_t_directive;
 
index 85faef96ab2a73a72e7b803fa8918a5d9a577a9f..30f576500ea5451c45b901b16b783ef1ecbf46fb 100644 (file)
@@ -1,3 +1,17 @@
+2003-11-23  Paul Eggert  <eggert@twinsun.com>
+            Bruno Haible  <bruno@clisp.org>
+
+       * printf-parse.h: Don't include sys/types.h.
+       (ARG_NONE): New macro.
+       (char_directive): Change type of *arg_index fields to size_t.
+       * printf-parse.c: Don't include sys/types.h.
+       (SSIZE_MAX): Remove macro.
+       (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
+       Remove unnecessary overflow check.
+       * vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
+       fields.
+       * configure.ac: Don't invoke gt_TYPE_SSIZE_T.
+
 2003-11-19  Bruno Haible  <bruno@clisp.org>
 
        * configure.ac: Better test for ptrdiff_t. Invoke gt_TYPE_SSIZE_T and
index d08c9c9c7ffb9f71d90e4187eb02039caf03cdd7..00ec3945b38992e75eec22bf4f721384ef9d1289 100644 (file)
@@ -57,7 +57,6 @@ AC_CHECK_TYPE([ptrdiff_t], ,
      [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
   ])
 gt_TYPE_INTMAX_T
-gt_TYPE_SSIZE_T
 gl_XSIZE
 
 dnl Checks for library functions.
index d760960c1c5fde863f53cffa9a1f4f1a3a68807f..d19f903d72c8fe94daa2b636a4151e422b891eeb 100644 (file)
@@ -30,9 +30,6 @@
 /* Get size_t, NULL.  */
 #include <stddef.h>
 
-/* Get ssize_t.  */
-#include <sys/types.h>
-
 /* Get intmax_t.  */
 #if HAVE_STDINT_H_WITH_UINTMAX
 # include <stdint.h>
 /* Checked size_t computations.  */
 #include "xsize.h"
 
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
-
 #if WIDE_CHAR_VERSION
 # define PRINTF_PARSE wprintf_parse
 # define CHAR_T wchar_t
@@ -70,7 +63,7 @@ int
 PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
 {
   const CHAR_T *cp = format;           /* pointer into format */
-  ssize_t arg_posn = 0;                /* number of regular arguments consumed */
+  size_t arg_posn = 0;         /* number of regular arguments consumed */
   size_t d_allocated;                  /* allocated elements of d->dir */
   size_t a_allocated;                  /* allocated elements of a->arg */
   size_t max_width_length = 0;
@@ -124,7 +117,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
       CHAR_T c = *cp++;
       if (c == '%')
        {
-         ssize_t arg_index = -1;
+         size_t arg_index = ARG_NONE;
          DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
 
          /* Initialize the next directive.  */
@@ -132,11 +125,11 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
          dp->flags = 0;
          dp->width_start = NULL;
          dp->width_end = NULL;
-         dp->width_arg_index = -1;
+         dp->width_arg_index = ARG_NONE;
          dp->precision_start = NULL;
          dp->precision_end = NULL;
-         dp->precision_arg_index = -1;
-         dp->arg_index = -1;
+         dp->precision_arg_index = ARG_NONE;
+         dp->arg_index = ARG_NONE;
 
          /* Test for positional argument.  */
          if (*cp >= '0' && *cp <= '9')
@@ -154,7 +147,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  if (n == 0)
                    /* Positional argument 0.  */
                    goto error;
-                 if (size_overflow_p (n) || n - 1 > SSIZE_MAX)
+                 if (size_overflow_p (n))
                    /* n too large, would lead to out of memory later.  */
                    goto error;
                  arg_index = n - 1;
@@ -224,18 +217,18 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                      if (n == 0)
                        /* Positional argument 0.  */
                        goto error;
-                     if (size_overflow_p (n) || n - 1 > SSIZE_MAX)
+                     if (size_overflow_p (n))
                        /* n too large, would lead to out of memory later.  */
                        goto error;
                      dp->width_arg_index = n - 1;
                      cp = np + 1;
                    }
                }
-             if (dp->width_arg_index < 0)
+             if (dp->width_arg_index == ARG_NONE)
                {
                  dp->width_arg_index = arg_posn++;
-                 if (dp->width_arg_index < 0)
-                   /* arg_posn wrapped around at SSIZE_MAX.  */
+                 if (dp->width_arg_index == ARG_NONE)
+                   /* arg_posn wrapped around.  */
                    goto error;
                }
              REGISTER_ARG (dp->width_arg_index, TYPE_INT);
@@ -281,7 +274,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                          if (n == 0)
                            /* Positional argument 0.  */
                            goto error;
-                         if (size_overflow_p (n) || n - 1 > SSIZE_MAX)
+                         if (size_overflow_p (n))
                            /* n too large, would lead to out of memory
                               later.  */
                            goto error;
@@ -289,11 +282,11 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                          cp = np + 1;
                        }
                    }
-                 if (dp->precision_arg_index < 0)
+                 if (dp->precision_arg_index == ARG_NONE)
                    {
                      dp->precision_arg_index = arg_posn++;
-                     if (dp->precision_arg_index < 0)
-                       /* arg_posn wrapped around at SSIZE_MAX.  */
+                     if (dp->precision_arg_index == ARG_NONE)
+                       /* arg_posn wrapped around.  */
                        goto error;
                    }
                  REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
@@ -492,11 +485,11 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
            if (type != TYPE_NONE)
              {
                dp->arg_index = arg_index;
-               if (dp->arg_index < 0)
+               if (dp->arg_index == ARG_NONE)
                  {
                    dp->arg_index = arg_posn++;
-                   if (dp->arg_index < 0)
-                     /* arg_posn wrapped around at SSIZE_MAX.  */
+                   if (dp->arg_index == ARG_NONE)
+                     /* arg_posn wrapped around.  */
                      goto error;
                  }
                REGISTER_ARG (dp->arg_index, type);
@@ -512,9 +505,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
              DIRECTIVE *memory;
 
              d_allocated = xtimes (d_allocated, 2);
-             if (size_overflow_p (d_allocated))
-               /* Overflow, would lead to out of memory.  */
-               goto error;
              memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
              if (size_overflow_p (memory_size))
                /* Overflow, would lead to out of memory.  */
index 754aaf2e5de07f791bbaadbbfb6c411babd1c5d8..8aec50e2a3f9feacb085c038372e1f9f23875307 100644 (file)
@@ -21,9 +21,6 @@
 
 #include "printf-args.h"
 
-/* Get ssize_t.  */
-#include <sys/types.h>
-
 
 /* Flags */
 #define FLAG_GROUP      1      /* ' flag */
@@ -33,6 +30,9 @@
 #define FLAG_ALT       16      /* # flag */
 #define FLAG_ZERO      32
 
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE       (~(size_t)0)
+
 /* A parsed directive.  */
 typedef struct
 {
@@ -41,12 +41,12 @@ typedef struct
   int flags;
   const char* width_start;
   const char* width_end;
-  ssize_t width_arg_index;
+  size_t width_arg_index;
   const char* precision_start;
   const char* precision_end;
-  ssize_t precision_arg_index;
+  size_t precision_arg_index;
   char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
-  ssize_t arg_index;
+  size_t arg_index;
 }
 char_directive;
 
index 05a08bcfb3a23b0e27196054df834a7356b89cb8..8a62282d73e4aec341776bac1605e6abf8ad1ff7 100644 (file)
@@ -223,7 +223,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
          {
            size_t augmented_length;
 
-           if (!(dp->arg_index < 0))
+           if (!(dp->arg_index == ARG_NONE))
              abort ();
            augmented_length = xsum (length, 1);
            ENSURE_ALLOCATION (augmented_length);
@@ -232,7 +232,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
          }
        else
          {
-           if (!(dp->arg_index >= 0))
+           if (!(dp->arg_index != ARG_NONE))
              abort ();
 
            if (dp->conversion == 'n')
@@ -280,7 +280,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
                  width = 0;
                  if (dp->width_start != dp->width_end)
                    {
-                     if (dp->width_arg_index >= 0)
+                     if (dp->width_arg_index != ARG_NONE)
                        {
                          int arg;
 
@@ -302,7 +302,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
                  precision = 6;
                  if (dp->precision_start != dp->precision_end)
                    {
-                     if (dp->precision_arg_index >= 0)
+                     if (dp->precision_arg_index != ARG_NONE)
                        {
                          int arg;
 
@@ -564,13 +564,13 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
 
                /* Construct the arguments for calling snprintf or sprintf.  */
                prefix_count = 0;
-               if (dp->width_arg_index >= 0)
+               if (dp->width_arg_index != ARG_NONE)
                  {
                    if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
                      abort ();
                    prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
                  }
-               if (dp->precision_arg_index >= 0)
+               if (dp->precision_arg_index != ARG_NONE)
                  {
                    if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
                      abort ();
index f40f7c34d98541e4afa9b2953f28e95087ccffd3..bceef1bce2c349d29ec7c72b85705a557e815450 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-23  Bruno Haible  <bruno@clisp.org>
+
+       * ssize_t.m4: Remove file, moved to ../../gettext-tools/m4/.
+       * gettext.m4 (AM_INTL_SUBDIR): Don't require gt_TYPE_SSIZE_T.
+       * Makefile.am (EXTRA_DIST): Remove ssize_t.m4.
+
 2003-11-19  Bruno Haible  <bruno@clisp.org>
 
        * size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
index bf9f24fb3073a180046bc239403213e5e4bd1984..aadecfe40f88c8dd2c9fe73fb06431eeaf9bdac7 100644 (file)
@@ -23,7 +23,6 @@ printf-posix.m4 \
 progtest.m4 \
 signed.m4 \
 size_max.m4 \
-ssize_t.m4 \
 stdint_h.m4 \
 uintmax_t.m4 \
 ulonglong.m4 \
index cfa6dddd897d474a231d829e78b2169e6aed01a5..a374f03fa57f13f72b6e29a0a86a50228a3d2d01 100644 (file)
@@ -1,4 +1,4 @@
-# gettext.m4 serial 27 (gettext-0.13)
+# gettext.m4 serial 28 (gettext-0.13)
 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -373,7 +373,6 @@ AC_DEFUN([AM_INTL_SUBDIR],
   AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
   AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
   AC_REQUIRE([gt_INTTYPES_PRI])dnl
-  AC_REQUIRE([gt_TYPE_SSIZE_T])dnl
   AC_REQUIRE([gl_XSIZE])dnl
 
   AC_CHECK_TYPE([ptrdiff_t], ,
index e1c648084b3af486d0960c771130946508e77d9f..e6960681dcb79a5bab4575c5063fbf3b5ccb4a93 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-23  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.texi (aclocal): Don't mention ssize_t.m4.
+
 2003-11-16  Bruno Haible  <bruno@clisp.org>
 
        * gettext.texi (aclocal): Mention size_max.m4, ssize_t.m4, xsize.m4.
index 88e4cb33926b526d150fbca5b26c5913c919aada..badb609e76d9a93b32fbcff1beefba281f3eb697 100644 (file)
@@ -6511,8 +6511,8 @@ the simplest is to concatenate the files @file{codeset.m4},
 @file{lib-ld.m4}, @file{lib-link.m4}, @file{lib-prefix.m4},
 @file{longdouble.m4}, @file{longlong.m4}, @file{printf-posix.m4},
 @file{progtest.m4}, @file{signed.m4}, @file{size_max.m4},
-@file{ssize_t.m4}, @file{stdint_h.m4}, @file{uintmax_t.m4},
-@file{ulonglong.m4}, @file{wchar_t.m4}, @file{wint_t.m4}, @file{xsize.m4}
+@file{stdint_h.m4}, @file{uintmax_t.m4}, @file{ulonglong.m4},
+@file{wchar_t.m4}, @file{wint_t.m4}, @file{xsize.m4}
 from GNU @code{gettext}'s
 @file{m4/} directory into a single file.  If you have suppressed the
 @file{intl/} directory, only @file{gettext.m4}, @file{iconv.m4},
index ca6e95c0729a71815e75626514bce78a9c32204d..4620e2a6716a35dec42c72d98d2da3cb8913cb1c 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-23  Bruno Haible  <bruno@clisp.org>
+
+       * ssize_t.m4: New file, moved here from ../../gettext-runtime/m4/.
+       * Makefile.am (aclocal_DATA): Remove ssize_t.m4.
+       (EXTRA_DIST): Add ssize_t.m4.
+
 2003-11-16  Bruno Haible  <bruno@clisp.org>
 
        * size_max.m4: Remove file, moved to ../../gettext-runtime/m4/.
index 364faa8f18ba9b68c268fddd56cd3f5fec252f3e..8c6fdea1c2fa954be8110f7ca8f4025271598b4f 100644 (file)
@@ -26,7 +26,6 @@ aclocal_DATA = \
   ../../gettext-runtime/m4/progtest.m4 \
   ../../gettext-runtime/m4/signed.m4 \
   ../../gettext-runtime/m4/size_max.m4 \
-  ../../gettext-runtime/m4/ssize_t.m4 \
   ../../gettext-runtime/m4/stdint_h.m4 \
   ../../gettext-runtime/m4/uintmax_t.m4 \
   ../../gettext-runtime/m4/ulonglong.m4 \
@@ -70,6 +69,7 @@ setlocale.m4 \
 sig_atomic_t.m4 \
 siginfo.m4 \
 signalblocking.m4 \
+ssize_t.m4 \
 stdbool.m4 \
 strerror.m4 \
 strerror_r.m4 \
index f5bb3025f00a8278d5823e17d1c180f4c96e8caa..addbf2649f348b5c3e6e2fd98bb934d5e4399859 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-23  Bruno Haible  <bruno@clisp.org>
+
+       * gettextize.in (m4filelist): Remove ssize_t.m4.
+
 2003-11-16  Bruno Haible  <bruno@clisp.org>
 
        * gettextize.in (m4filelist): Add size_max.m4, ssize_t.m4, xsize.m4.
index 7a1ac51366b7dbdc073d5a2fb89af38bdffdbaf8..97ae140d8b509954699a5f57bb2e08f4471ec936 100644 (file)
@@ -641,13 +641,12 @@ $do_changelog && func_poChangeLog_finish
 m4filelist='  codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4
   inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4
   lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4
-  printf-posix.m4 progtest.m4 signed.m4 size_max.m4 ssize_t.m4 stdint_h.m4
-  uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4'
+  printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4
+  ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4'
 # We cannot omit codeset.m4, glibc21.m4, intdiv0.m4, intmax.m4, inttypes.m4,
 # inttypes_h.m4, inttypes-pri.m4, isc-posix.m4, lcmessage.m4, longdouble.m4,
 # longlong.m4, nls.m4, po.m4, printf-posix.m4, signed.m4, size_max.m4,
-# ssize_t.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, wchar_t.m4, wint_t.m4,
-# xsize.m4
+# stdint_h.m4, uintmax_t.m4, ulonglong.m4, wchar_t.m4, wint_t.m4, xsize.m4
 # if test -z "$intldir", otherwise "aclocal -I m4" might give an error.
 # (aclocal doesn't know which macros are really needed, it looks which macros
 # are potentially needed.)