]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xallocsa was renamed to xmalloca.
authorBruno Haible <bruno@clisp.org>
Sat, 9 Jun 2007 11:51:33 +0000 (11:51 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:55 +0000 (12:14 +0200)
21 files changed:
ChangeLog
autogen.sh
gettext-tools/gnulib-lib/.cvsignore
gettext-tools/libgettextpo/.cvsignore
gettext-tools/src/ChangeLog
gettext-tools/src/format-java.c
gettext-tools/src/message.c
gettext-tools/src/msggrep.c
gettext-tools/src/msginit.c
gettext-tools/src/msgl-cat.c
gettext-tools/src/msgl-charset.c
gettext-tools/src/msgl-iconv.c
gettext-tools/src/msgmerge.c
gettext-tools/src/po-charset.c
gettext-tools/src/read-tcl.c
gettext-tools/src/write-java.c
gettext-tools/src/write-mo.c
gettext-tools/src/write-po.c
gettext-tools/src/write-tcl.c
gettext-tools/src/xgettext.c
gettext-tools/tests/Makefile.am

index e57edca68e319f3a43a97f57b6a653d6cf9e2471..2960dfe98cbff6e889dd4df62df3b50ed25d9886 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-09  Bruno Haible  <bruno@clisp.org>
+
+       * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Use xmalloca instead of
+       xallocsa.
+       (GNULIB_MODULES_LIBGETTEXTPO): Likewise.
+
 2007-06-08  Bruno Haible  <bruno@clisp.org>
 
        * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add module 'localename'.
index 7198ce0c8fdd7108f36b4492c927ac8b08d163a7..e2482ba701833431877ee7c82569669ecacad645 100755 (executable)
@@ -158,7 +158,7 @@ if test -n "$GNULIB_TOOL"; then
   vasprintf
   wait-process
   xalloc
-  xallocsa
+  xmalloca
   xerror
   xsetenv
   xstriconv
@@ -217,7 +217,7 @@ if test -n "$GNULIB_TOOL"; then
   utf16-ucs4
   vasprintf
   xalloc
-  xallocsa
+  xmalloca
   xerror
   xstriconv
   xvasprintf
index ee3447e55ef610925d650a4cb2e7023011592c81..894c235ecd44e627693081e13426327144eadf73 100644 (file)
@@ -2,9 +2,6 @@ Makefile.gnulib
 Makefile.in
 acl.c
 acl.h
-allocsa.c
-allocsa.h
-allocsa.valgrind
 argmatch.c
 argmatch.h
 atexit.c
@@ -191,8 +188,6 @@ wait-process.h
 wchar_.h
 wctype_.h
 wcwidth.h
-xallocsa.c
-xallocsa.h
 xasprintf.c
 xsetenv.c
 xsetenv.h
index 690714bd95d58ae35421130320d13548fdb4d3f8..fd3ba766a02bf3e8dd40ffc7985a2e69ea3d2fb9 100644 (file)
@@ -7,9 +7,6 @@ _libs
 *.lo
 *.la
 alloca_.h
-allocsa.c
-allocsa.h
-allocsa.valgrind
 basename.c
 basename.h
 c-ctype.c
@@ -90,8 +87,6 @@ wchar_.h
 wctype_.h
 wcwidth.h
 xalloc.h
-xallocsa.c
-xallocsa.h
 xasprintf.c
 xerror.c
 xerror.h
index cc2bb0ff7c23da259c5722cde1885030bc06cf7f..6bfb700784e26377786c6419c29e9a560f77cdd5 100644 (file)
@@ -1,3 +1,44 @@
+2007-06-09  Bruno Haible  <bruno@clisp.org>
+
+       * format-java.c: Include xmalloca.h instead of xallocsa.h.
+       (message_format_parse): Use xmalloca/freea instead of xallocsa/freesa.
+       * message.c: Include xmalloca.h instead of xallocsa.h.
+       (message_list_hash_insert_entry, message_list_search): Use
+       xmalloca/freea instead of xallocsa/freesa.
+       * msggrep.c: Include xmalloca.h instead of xallocsa.h.
+       (is_message_selected_no_invert): Use xmalloca/freea instead of
+       xallocsa/freesa.
+       * msginit.c: Include xmalloca.h instead of xallocsa.h.
+       (subst_string): Use xmalloca/freea instead of xallocsa/freesa.
+       * msgl-cat.c: Include xmalloca.h instead of xallocsa.h.
+       (catenate_msgdomain_list): Use xmalloca/freea instead of
+       xallocsa/freesa.
+       * msgl-charset.c: Include xmalloca.h instead of xallocsa.h.
+       (compare_po_locale_charsets): Use xmalloca/freea instead of
+       xallocsa/freesa.
+       * msgl-iconv.c: Include xmalloca.h instead of xallocsa.h.
+       (iconv_message_list_internal, is_message_list_iconvable): Use
+       xmalloca/freea instead of xallocsa/freesa.
+       * msgmerge.c: Include xmalloca.h instead of xallocsa.h.
+       (merge): Use xmalloca/freea instead of xallocsa/freesa.
+       * po-charset.c: Include xmalloca.h instead of xallocsa.h.
+       (po_lex_charset_set): Use xmalloca/freea instead of xallocsa/freesa.
+       * read-tcl.c: Include xmalloca.h instead of xallocsa.h.
+       (msgdomain_read_tcl): Use xmalloca/freea instead of xallocsa/freesa.
+       * write-java.c: Include xmalloca.h instead of xallocsa.h.
+       (compute_hashsize, msgdomain_write_java): Use xmalloca/freea instead of
+       xallocsa/freesa.
+       * write-mo.c: Include xmalloca.h instead of xallocsa.h.
+       (write_table): Use xmalloca/freea instead of xallocsa/freesa.
+       * write-po.c: Include xmalloca.h instead of xallocsa.h.
+       (msgdomain_list_print_po): Use xmalloca/freea instead of
+       xallocsa/freesa.
+       * write-tcl.c: Include xmalloca.h instead of xallocsa.h.
+       (msgdomain_write_tcl): Use xmalloca/freea instead of xallocsa/freesa.
+       * xgettext.c: Include xmalloca.h instead of xallocsa.h.
+       (flag_context_list_table_insert): Use xmalloca/freea instead of
+       xallocsa/freesa.
+
 2007-06-08  Bruno Haible  <bruno@clisp.org>
 
        * msgattrib.c (main): Update year in --version output.
index 5135e3adb3f770a0f85b1a13bb427d4a37bfa938..010a37dd89b0419d74ac7c50fba3edc82dc4a0b3 100644 (file)
@@ -1,5 +1,5 @@
 /* Java format strings.
-   Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,7 @@
 #include "format.h"
 #include "c-ctype.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "xvasprintf.h"
 #include "format-invalid.h"
 #include "gettext.h"
@@ -196,7 +196,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
          element_end = format++;
 
          n = element_end - element_start;
-         element = element_alloced = (char *) xallocsa (n + 1);
+         element = element_alloced = (char *) xmalloca (n + 1);
          memcpy (element, element_start, n);
          element[n] = '\0';
 
@@ -205,7 +205,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
              *invalid_reason =
                xasprintf (_("In the directive number %u, '{' is not followed by an argument number."), spec->directives);
              FDI_SET (format - 1, FMTDIR_ERROR);
-             freesa (element_alloced);
+             freea (element_alloced);
              return false;
            }
          number = 0;
@@ -240,7 +240,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
                      *invalid_reason =
                        xasprintf (_("In the directive number %u, the substring \"%s\" is not a valid date/time style."), spec->directives, element);
                      FDI_SET (format - 1, FMTDIR_ERROR);
-                     freesa (element_alloced);
+                     freea (element_alloced);
                      return false;
                    }
                }
@@ -251,7 +251,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
                  *invalid_reason =
                    xasprintf (_("In the directive number %u, \"%s\" is not followed by a comma."), spec->directives, element);
                  FDI_SET (format - 1, FMTDIR_ERROR);
-                 freesa (element_alloced);
+                 freea (element_alloced);
                  return false;
                }
            }
@@ -274,7 +274,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
                      *invalid_reason =
                        xasprintf (_("In the directive number %u, the substring \"%s\" is not a valid number style."), spec->directives, element);
                      FDI_SET (format - 1, FMTDIR_ERROR);
-                     freesa (element_alloced);
+                     freea (element_alloced);
                      return false;
                    }
                }
@@ -285,7 +285,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
                  *invalid_reason =
                    xasprintf (_("In the directive number %u, \"%s\" is not followed by a comma."), spec->directives, element);
                  FDI_SET (format - 1, FMTDIR_ERROR);
-                 freesa (element_alloced);
+                 freea (element_alloced);
                  return false;
                }
            }
@@ -303,7 +303,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
                  else
                    {
                      FDI_SET (format - 1, FMTDIR_ERROR);
-                     freesa (element_alloced);
+                     freea (element_alloced);
                      return false;
                    }
                }
@@ -314,7 +314,7 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
                  *invalid_reason =
                    xasprintf (_("In the directive number %u, \"%s\" is not followed by a comma."), spec->directives, element);
                  FDI_SET (format - 1, FMTDIR_ERROR);
-                 freesa (element_alloced);
+                 freea (element_alloced);
                  return false;
                }
            }
@@ -323,10 +323,10 @@ message_format_parse (const char *format, char *fdi, struct spec *spec,
              *invalid_reason =
                xasprintf (_("In the directive number %u, the argument number is not followed by a comma and one of \"%s\", \"%s\", \"%s\", \"%s\"."), spec->directives, "time", "date", "number", "choice");
              FDI_SET (format - 1, FMTDIR_ERROR);
-             freesa (element_alloced);
+             freea (element_alloced);
              return false;
            }
-         freesa (element_alloced);
+         freea (element_alloced);
 
          if (spec->allocated == spec->numbered_arg_count)
            {
@@ -586,7 +586,7 @@ choice_format_parse (const char *format, struct spec *spec,
        }
       HANDLE_QUOTE;
 
-      msgformat = (char *) xallocsa (strlen (format) + 1);
+      msgformat = (char *) xmalloca (strlen (format) + 1);
       mp = msgformat;
 
       while (*format != '\0' && !(!quoting && *format == '|'))
@@ -599,7 +599,7 @@ choice_format_parse (const char *format, struct spec *spec,
       msgformat_valid =
        message_format_parse (msgformat, NULL, spec, invalid_reason);
 
-      freesa (msgformat);
+      freea (msgformat);
 
       if (!msgformat_valid)
        return false;
index 6bacc7fbfd6efb86062f06f82b1035232169abfb..c608a9bea5f0d31ad93ab7ab8525b39f60104f85 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -30,7 +30,7 @@
 #include "fstrcmp.h"
 #include "hash.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 
 
 const char *const format_language[NFORMATS] =
@@ -281,7 +281,7 @@ message_list_hash_insert_entry (hash_table *htable, message_ty *mp)
       size_t msgctxt_len = strlen (mp->msgctxt);
       size_t msgid_len = strlen (mp->msgid);
       keylen = msgctxt_len + 1 + msgid_len + 1;
-      alloced_key = (char *) xallocsa (keylen);
+      alloced_key = (char *) xmalloca (keylen);
       memcpy (alloced_key, mp->msgctxt, msgctxt_len);
       alloced_key[msgctxt_len] = MSGCTXT_SEPARATOR;
       memcpy (alloced_key + msgctxt_len + 1, mp->msgid, msgid_len + 1);
@@ -297,7 +297,7 @@ message_list_hash_insert_entry (hash_table *htable, message_ty *mp)
   found = (hash_insert_entry (htable, key, keylen, mp) == NULL);
 
   if (mp->msgctxt != NULL)
-    freesa (alloced_key);
+    freea (alloced_key);
 
   return found;
 }
@@ -482,7 +482,7 @@ message_list_search (message_list_ty *mlp,
          size_t msgctxt_len = strlen (msgctxt);
          size_t msgid_len = strlen (msgid);
          keylen = msgctxt_len + 1 + msgid_len + 1;
-         alloced_key = (char *) xallocsa (keylen);
+         alloced_key = (char *) xmalloca (keylen);
          memcpy (alloced_key, msgctxt, msgctxt_len);
          alloced_key[msgctxt_len] = MSGCTXT_SEPARATOR;
          memcpy (alloced_key + msgctxt_len + 1, msgid, msgid_len + 1);
@@ -500,7 +500,7 @@ message_list_search (message_list_ty *mlp,
        int found = !hash_find_entry (&mlp->htable, key, keylen, &htable_value);
 
        if (msgctxt != NULL)
-         freesa (alloced_key);
+         freea (alloced_key);
 
        if (found)
          return (message_ty *) htable_value;
index ce07a6c99fad8a82f820f4d8f43a76ebd34a7e38..2405dc1f595b828ebd56d6c4ea2a82ea02dc8436 100644 (file)
@@ -57,7 +57,7 @@
 #include "str-list.h"
 #include "msgl-charset.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "libgrep.h"
 #include "propername.h"
 #include "gettext.h"
@@ -733,7 +733,7 @@ is_message_selected_no_invert (const message_ty *mp)
       length = 0;
       for (j = 0; j < mp->comment->nitems; j++)
        length += strlen (mp->comment->item[j]) + 1;
-      total_comment = (char *) xallocsa (length);
+      total_comment = (char *) xmalloca (length);
 
       q = total_comment;
       for (j = 0; j < mp->comment->nitems; j++)
@@ -749,7 +749,7 @@ is_message_selected_no_invert (const message_ty *mp)
 
       selected = is_string_selected (3, total_comment, length);
 
-      freesa (total_comment);
+      freea (total_comment);
 
       if (selected)
        return true;
@@ -768,7 +768,7 @@ is_message_selected_no_invert (const message_ty *mp)
       length = 0;
       for (j = 0; j < mp->comment_dot->nitems; j++)
        length += strlen (mp->comment_dot->item[j]) + 1;
-      total_comment = (char *) xallocsa (length);
+      total_comment = (char *) xmalloca (length);
 
       q = total_comment;
       for (j = 0; j < mp->comment_dot->nitems; j++)
@@ -784,7 +784,7 @@ is_message_selected_no_invert (const message_ty *mp)
 
       selected = is_string_selected (4, total_comment, length);
 
-      freesa (total_comment);
+      freea (total_comment);
 
       if (selected)
        return true;
index 89946898a0ddaf082d1e74b85db9801db974de72..60232cfc164d274470938e19c608d0ad68f7dbcc 100644 (file)
@@ -73,7 +73,7 @@
 #include "plural-table.h"
 #include "lang-table.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "filename.h"
 #include "xerror.h"
 #include "xvasprintf.h"
@@ -1489,7 +1489,7 @@ subst_string (const char *str,
       size_t i;
       unsigned int j;
 
-      substlen = (size_t *) xallocsa (nsubst * sizeof (size_t));
+      substlen = (size_t *) xmalloca (nsubst * sizeof (size_t));
       for (j = 0; j < nsubst; j++)
        {
          substlen[j] = strlen (subst[j][0]);
@@ -1522,7 +1522,7 @@ subst_string (const char *str,
            i++;
        }
 
-      freesa (substlen);
+      freea (substlen);
     }
 
   return str;
index aa275938a0ff696a38d1b5b66d851345d8a4b36a..402de704b10bc109ad78aca2b9c1f3ba23b53410 100644 (file)
@@ -40,7 +40,7 @@
 #include "msgl-equal.h"
 #include "msgl-iconv.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "c-strstr.h"
 #include "basename.h"
 #include "gettext.h"
@@ -154,7 +154,7 @@ catenate_msgdomain_list (string_list_ty *file_list,
 
                            charsetstr += strlen ("charset=");
                            len = strcspn (charsetstr, " \t\n");
-                           charset = (char *) xallocsa (len + 1);
+                           charset = (char *) xmalloca (len + 1);
                            memcpy (charset, charsetstr, len);
                            charset[len] = '\0';
 
@@ -179,7 +179,7 @@ present charset \"%s\" is not a portable encoding name"),
                                         charset);
                              }
 
-                           freesa (charset);
+                           freea (charset);
 
                            if (canon_from_code == NULL)
                              canon_from_code = canon_charset;
index 4276458677076e88000bfd4379cc3cfad50323ab..75ddd0038c465eb8c363881977fb72f0c8c8a83b 100644 (file)
@@ -34,7 +34,7 @@
 #include "error.h"
 #include "progname.h"
 #include "basename.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "xerror.h"
 #include "xvasprintf.h"
 #include "message.h"
@@ -78,7 +78,7 @@ compare_po_locale_charsets (const msgdomain_list_ty *mdlp)
 
                    charsetstr += strlen ("charset=");
                    len = strcspn (charsetstr, " \t\n");
-                   charset = (char *) xallocsa (len + 1);
+                   charset = (char *) xmalloca (len + 1);
                    memcpy (charset, charsetstr, len);
                    charset[len] = '\0';
 
@@ -88,7 +88,7 @@ compare_po_locale_charsets (const msgdomain_list_ty *mdlp)
                             _("\
 present charset \"%s\" is not a portable encoding name"),
                             charset);
-                   freesa (charset);
+                   freea (charset);
                    if (canon_locale_code != canon_charset)
                      {
                        multiline_warning (xasprintf (_("warning: ")),
index 340b8266026faa272769c077b147b20e43af8df8..29d0a431357eba70631eea199eca381cc260a75d 100644 (file)
@@ -40,7 +40,7 @@
 #include "xstriconv.h"
 #include "msgl-ascii.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "c-strstr.h"
 #include "xvasprintf.h"
 #include "po-xerror.h"
@@ -201,7 +201,7 @@ iconv_message_list_internal (message_list_ty *mlp,
 
                charsetstr += strlen ("charset=");
                len = strcspn (charsetstr, " \t\n");
-               charset = (char *) xallocsa (len + 1);
+               charset = (char *) xmalloca (len + 1);
                memcpy (charset, charsetstr, len);
                charset[len] = '\0';
 
@@ -239,7 +239,7 @@ present charset \"%s\" is not a portable encoding name"),
 two different charsets \"%s\" and \"%s\" in input file"),
                                            canon_from_code, canon_charset));
                  }
-               freesa (charset);
+               freea (charset);
 
                if (update_header)
                  {
@@ -503,7 +503,7 @@ is_message_list_iconvable (message_list_ty *mlp,
 
                charsetstr += strlen ("charset=");
                len = strcspn (charsetstr, " \t\n");
-               charset = (char *) xallocsa (len + 1);
+               charset = (char *) xmalloca (len + 1);
                memcpy (charset, charsetstr, len);
                charset[len] = '\0';
 
@@ -519,7 +519,7 @@ is_message_list_iconvable (message_list_ty *mlp,
                        else
                          {
                            /* charset is not a portable encoding name.  */
-                           freesa (charset);
+                           freea (charset);
                            return false;
                          }
                      }
@@ -531,11 +531,11 @@ is_message_list_iconvable (message_list_ty *mlp,
                    else if (canon_from_code != canon_charset)
                      {
                        /* Two different charsets in input file.  */
-                       freesa (charset);
+                       freea (charset);
                        return false;
                      }
                  }
-               freesa (charset);
+               freea (charset);
              }
          }
       }
index 986c3ff50d82ade58fbe94f44643871944b0053d..6e1894da6c52e75a6d36a6e2d1aff79170017286 100644 (file)
@@ -47,7 +47,7 @@
 #include "write-stringtable.h"
 #include "format.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "obstack.h"
 #include "c-strstr.h"
 #include "c-strcase.h"
@@ -1460,7 +1460,7 @@ merge (const char *fn1, const char *fn2, catalog_input_format_ty input_syntax,
 
                            charsetstr += strlen ("charset=");
                            len = strcspn (charsetstr, " \t\n");
-                           charset = (char *) xallocsa (len + 1);
+                           charset = (char *) xmalloca (len + 1);
                            memcpy (charset, charsetstr, len);
                            charset[len] = '\0';
                            break;
@@ -1498,7 +1498,7 @@ merge (const char *fn1, const char *fn2, catalog_input_format_ty input_syntax,
                      conversion_done = true;
                    }
                }
-             freesa (charset);
+             freea (charset);
            }
        }
        if (!conversion_done)
@@ -1532,7 +1532,7 @@ merge (const char *fn1, const char *fn2, catalog_input_format_ty input_syntax,
 
                                  charsetstr += strlen ("charset=");
                                  len = strcspn (charsetstr, " \t\n");
-                                 charset = (char *) xallocsa (len + 1);
+                                 charset = (char *) xmalloca (len + 1);
                                  memcpy (charset, charsetstr, len);
                                  charset[len] = '\0';
 
@@ -1543,7 +1543,7 @@ merge (const char *fn1, const char *fn2, catalog_input_format_ty input_syntax,
                    if (charset != NULL)
                      {
                        canon_charset = po_charset_canonicalize (charset);
-                       freesa (charset);
+                       freea (charset);
                      }
                    /* If no charset declaration was found in this file,
                       or if it is not a valid encoding name, or if it
index f46cd409c3631d50e4d6d43b0c873f0276631164..a782512e7204f521b98fc28feae895255c9d0cec 100644 (file)
@@ -1,5 +1,5 @@
 /* Charset handling while reading PO files.
-   Copyright (C) 2001-2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "xvasprintf.h"
 #include "po-xerror.h"
 #include "basename.h"
@@ -471,7 +471,7 @@ po_lex_charset_set (const char *header_entry, const char *filename)
 
       charsetstr += strlen ("charset=");
       len = strcspn (charsetstr, " \t\n");
-      charset = (char *) xallocsa (len + 1);
+      charset = (char *) xmalloca (len + 1);
       memcpy (charset, charsetstr, len);
       charset[len] = '\0';
 
@@ -629,7 +629,7 @@ would fix this problem.\n");
 #endif
            }
        }
-      freesa (charset);
+      freea (charset);
     }
   else
     {
index f98a3e06e2ebe58b190bc7044ad519cc46e5cefe..ee0d223597065dba1989cefceae1a2e1f5258d08 100644 (file)
@@ -36,7 +36,7 @@
 #include "wait-process.h"
 #include "read-catalog.h"
 #include "read-po.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "error.h"
 #include "gettext.h"
 
@@ -74,7 +74,7 @@ msgdomain_read_tcl (const char *locale_name, const char *directory)
 
   /* Convert the locale name to lowercase and remove any encoding.  */
   len = strlen (locale_name);
-  frobbed_locale_name = (char *) xallocsa (len + 1);
+  frobbed_locale_name = (char *) xmalloca (len + 1);
   memcpy (frobbed_locale_name, locale_name, len + 1);
   for (p = frobbed_locale_name; *p != '\0'; p++)
     if (*p >= 'A' && *p <= 'Z')
@@ -87,7 +87,7 @@ msgdomain_read_tcl (const char *locale_name, const char *directory)
 
   file_name = concatenated_filename (directory, frobbed_locale_name, ".msg");
 
-  freesa (frobbed_locale_name);
+  freea (frobbed_locale_name);
 
   /* Prepare arguments.  */
   argv[0] = "tclsh";
index 9b70a2f9d6fdf85b2bd1fe9a3c09dd1feb839b6b..b426bac7c220c0a8989f6e9fb86b59efddf2e347 100644 (file)
@@ -65,7 +65,7 @@
 #include "plural-exp.h"
 #include "po-charset.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "filename.h"
 #include "fwriteerror.h"
 #include "clean-temp.h"
@@ -146,7 +146,7 @@ compute_hashsize (message_list_ty *mlp, bool *collisionp)
 #define XXS 3  /* can be tweaked */
   unsigned int n = mlp->nitems;
   unsigned int *hashcodes =
-    (unsigned int *) xallocsa (n * sizeof (unsigned int));
+    (unsigned int *) xmalloca (n * sizeof (unsigned int));
   unsigned int hashsize;
   unsigned int best_hashsize;
   unsigned int best_score;
@@ -263,7 +263,7 @@ compute_hashsize (message_list_ty *mlp, bool *collisionp)
   if (best_hashsize == 0 || best_score < best_hashsize)
     abort ();
 
-  freesa (hashcodes);
+  freea (hashcodes);
 
   /* There are collisions if and only if best_score > best_hashsize.  */
   *collisionp = (best_score > best_hashsize);
@@ -943,7 +943,7 @@ but the Java ResourceBundle format doesn't support contexts\n")));
   else
     class_name = xstrdup (resource_name);
 
-  subdirs = (ndots > 0 ? (char **) xallocsa (ndots * sizeof (char *)) : NULL);
+  subdirs = (ndots > 0 ? (char **) xmalloca (ndots * sizeof (char *)) : NULL);
   {
     const char *p;
     const char *last_dir;
@@ -955,11 +955,11 @@ but the Java ResourceBundle format doesn't support contexts\n")));
       {
        const char *q = strchr (p, '.');
        size_t n = q - p;
-       char *part = (char *) xallocsa (n + 1);
+       char *part = (char *) xmalloca (n + 1);
        memcpy (part, p, n);
        part[n] = '\0';
        subdirs[i] = concatenated_filename (last_dir, part, NULL);
-       freesa (part);
+       freea (part);
        last_dir = subdirs[i];
        p = q + 1;
       }
@@ -1032,7 +1032,7 @@ compilation of Java class failed, please try --verbose or set $JAVAC"));
     for (i = 0; i < ndots; i++)
       free (subdirs[i]);
   }
-  freesa (subdirs);
+  freea (subdirs);
   free (class_name);
  quit2:
   cleanup_temp_dir (tmpdir);
index d16b34ac2e7e43b2534b35b7deebd3be3028c851..f14f3b84f171336800184db87dac3541307f0348 100644 (file)
@@ -45,7 +45,7 @@
 #include "format.h"
 #include "xsize.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "binary-io.h"
 #include "fwriteerror.h"
 #include "gettext.h"
@@ -653,7 +653,7 @@ write_table (FILE *output_file, message_list_ty *mlp)
            struct pre_sysdep_string *pre = msg->str[m];
            struct sysdep_string *str =
              (struct sysdep_string *)
-             xallocsa (sizeof (struct sysdep_string)
+             xmalloca (sizeof (struct sysdep_string)
                        + pre->segmentcount * sizeof (struct segment_pair));
            unsigned int i;
 
@@ -684,7 +684,7 @@ write_table (FILE *output_file, message_list_ty *mlp)
                    + pre->segmentcount * sizeof (struct segment_pair),
                    1, output_file);
 
-           freesa (str);
+           freea (str);
          }
     }
 
index 733375e7e565c062137a886dfb90b469fa991683..85bb77e6f0f393893a28b892f3433bf1e67b283f 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -42,7 +42,7 @@
 #include "msgl-ascii.h"
 #include "write-catalog.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "c-strstr.h"
 #include "ostream.h"
 #ifdef GETTEXTDATADIR
@@ -1453,7 +1453,7 @@ msgdomain_list_print_po (msgdomain_list_ty *mdlp, ostream_t stream,
 
              charsetstr += strlen ("charset=");
              len = strcspn (charsetstr, " \t\n");
-             allocated_charset = (char *) xallocsa (len + 1);
+             allocated_charset = (char *) xmalloca (len + 1);
              memcpy (allocated_charset, charsetstr, len);
              allocated_charset[len] = '\0';
              charset = allocated_charset;
@@ -1483,7 +1483,7 @@ msgdomain_list_print_po (msgdomain_list_ty *mdlp, ostream_t stream,
          }
 
       if (allocated_charset != NULL)
-       freesa (allocated_charset);
+       freea (allocated_charset);
     }
 }
 
index bc1675041b262bf41594d743e0d7abaf01b444e9..1244d41cd17786f7cb1fd86bab5bbf7641e9c029 100644 (file)
@@ -36,7 +36,7 @@
 #include "msgl-iconv.h"
 #include "po-charset.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "filename.h"
 #include "fwriteerror.h"
 #include "unistr.h"
@@ -194,7 +194,7 @@ but the Tcl message catalog format doesn't support plural handling\n")));
 
     /* Convert the locale name to lowercase and remove any encoding.  */
     len = strlen (locale_name);
-    frobbed_locale_name = (char *) xallocsa (len + 1);
+    frobbed_locale_name = (char *) xmalloca (len + 1);
     memcpy (frobbed_locale_name, locale_name, len + 1);
     for (p = frobbed_locale_name; *p != '\0'; p++)
       if (*p >= 'A' && *p <= 'Z')
@@ -212,7 +212,7 @@ but the Tcl message catalog format doesn't support plural handling\n")));
       {
        error (0, errno, _("error while opening \"%s\" for writing"),
               file_name);
-       freesa (frobbed_locale_name);
+       freea (frobbed_locale_name);
        return 1;
       }
 
@@ -223,7 +223,7 @@ but the Tcl message catalog format doesn't support plural handling\n")));
       error (EXIT_FAILURE, errno, _("error while writing \"%s\" file"),
             file_name);
 
-    freesa (frobbed_locale_name);
+    freea (frobbed_locale_name);
   }
 
   return 0;
index fc0e8dd43ff3e8b88290f21e6720dab8f8cb1556..6145990d7125f4ded548f2fc25820aa26fc98cc0 100644 (file)
@@ -46,7 +46,7 @@
 #include "xvasprintf.h"
 #include "xsize.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "c-strstr.h"
 #include "xerror.h"
 #include "filename.h"
@@ -1292,7 +1292,7 @@ flag_context_list_table_insert (flag_context_list_table_ty *table,
     {
       /* Convert NAME to upper case.  */
       size_t name_len = name_end - name_start;
-      char *name = allocated_name = (char *) xallocsa (name_len);
+      char *name = allocated_name = (char *) xmalloca (name_len);
       size_t i;
 
       for (i = 0; i < name_len; i++)
@@ -1418,7 +1418,7 @@ flag_context_list_table_insert (flag_context_list_table_ty *table,
   }
 
   if (allocated_name != NULL)
-    freesa (allocated_name);
+    freea (allocated_name);
 }
 
 
index ae9e9541e270d3e740e72f7b4012d3ca7dd6f8d8..745a88a1562c3bdfc10f539130a060883ad66b95 100644 (file)
@@ -135,7 +135,7 @@ XGETTEXT = ../src/xgettext
 # For debugging memory leaks and memory allocation bugs.
 # You should build with --disable-shared when using valgrind.
 CHECKER =
-#CHECKER = valgrind --tool=memcheck --suppressions=$(srcdir)/../gnulib-lib/allocsa.valgrind --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes
+#CHECKER = valgrind --tool=memcheck --suppressions=$(srcdir)/../gnulib-lib/malloca.valgrind --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes
 #CHECKER = valgrind --tool=massif --format=html --depth=10 --alloc-fn=xmalloc --alloc-fn=xrealloc --stacks=no
 
 TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \