module.
+2006-04-30 Bruno Haible <bruno@clisp.org>
+
+ * xvasprintf.h: New file, from gnulib.
+ * xvasprintf.c: New file, from gnulib.
+ * xasprintf.c: New file, from gnulib.
+ * xerror.h (xasprintf): Remove declaration.
+ * xerror.c: Don't include stdarg.h, error.h, exit.h, vasprintf.h,
+ gettext.h.
+ (_): Remove macro.
+ (xasprintf): Remove function.
+ * Makefile.am (libgettextlib_la_SOURCES): Add xvasprintf.h,
+ xvasprintf.c, xasprintf.c.
+ * Makefile.msvc (OBJECTS): Add xvasprintf.obj, xasprintf.obj.
+ (xvasprintf.obj, xasprintf.obj): New rules.
+ * Makefile.vms (OBJECTS): Add xvasprintf.obj, xasprintf.obj.
+ (xvasprintf.obj, xasprintf.obj): New rules.
+
2006-05-01 Bruno Haible <bruno@clisp.org>
* javacomp.sh.in: Update for changed javacomp.m4.
* Makefile.am (EXTRA_DIST): Add ChangeLog.0.
-See ChangeLog.0 for earlier changes.
+See ChangeLog.0 for earlier changes.
\ No newline at end of file
xerror.h xerror.c \
xreadlink.h xreadlink.c \
xsetenv.h xsetenv.c \
- xsize.h
+ xsize.h \
+ xvasprintf.h xvasprintf.c xasprintf.c
# Sources that are compiled only on platforms that lack the functions.
xallocsa.obj \
xerror.obj \
xsetenv.obj \
+ xvasprintf.obj xasprintf.obj \
\
error.obj \
fnmatch.obj \
xsetenv.obj : xsetenv.c
$(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xsetenv.c
+xvasprintf.obj : xvasprintf.c
+ $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xvasprintf.c
+
+xasprintf.obj : xasprintf.c
+ $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c xasprintf.c
+
error.obj : error.c
$(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c error.c
xallocsa.obj, \
xerror.obj, \
xsetenv.obj, \
+ xvasprintf.obj, xasprintf.obj, \
\
error.obj, \
fnmatch.obj, \
xsetenv.obj : xsetenv.c
$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xsetenv.c
+xvasprintf.obj : xvasprintf.c
+ $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xvasprintf.c
+
+xasprintf.obj : xasprintf.c
+ $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) xasprintf.c
+
error.obj : error.c
$(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) error.c
/* Multiline error-reporting functions.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006 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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdarg.h>
-#include "error.h"
#include "progname.h"
#include "error-progname.h"
-#include "exit.h"
#include "mbswidth.h"
-#include "vasprintf.h"
-#include "gettext.h"
-
-#define _(str) gettext (str)
-
-/* Format a message and return the freshly allocated resulting string. */
-char *
-xasprintf (const char *format, ...)
-{
- va_list args;
- char *result;
-
- va_start (args, format);
- if (vasprintf (&result, format, args) < 0)
- error (EXIT_FAILURE, 0, _("memory exhausted"));
- va_end (args);
- return result;
-}
/* Emit a multiline warning to stderr, consisting of MESSAGE, with the
first line prefixed with PREFIX and the remaining lines prefixed with
/* Multiline error-reporting functions.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006 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
#endif
-/* Format a message and return the freshly allocated resulting string. */
-extern char *xasprintf (const char *format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
-
/* Emit a multiline warning to stderr, consisting of MESSAGE, with the
first line prefixed with PREFIX and the remaining lines prefixed with
the same amount of spaces. Reuse the spaces of the previous call if
+2006-04-30 Bruno Haible <bruno@clisp.org>
+
+ * msgfmt.c: Include xvasprintf.h.
+ * msginit.c: Likewise.
+ * msgl-cat.c: Likewise.
+ * msgl-charset.c: Likewise.
+ * po-xerror.c: Likewise.
+ * x-csharp.c: Likewise.
+ * x-glade.c: Likewise.
+ * x-python.c: Likewise.
+ * xgettext.c: Likewise.
+ * format-boost.c: Include xvasprintf.h instead of xerror.h.
+ * format-c.c: Likewise.
+ * format-csharp.c: Likewise.
+ * format-gcc-internal.c: Likewise.
+ * format-java.c: Likewise.
+ * format-lisp.c: Likewise.
+ * format-perl.c: Likewise.
+ * format-python.c: Likewise.
+ * format-qt.c: Likewise.
+ * format-scheme.c: Likewise.
+ * format-ycp.c: Likewise.
+ * msgexec.c: Likewise.
+ * msgl-check.c: Likewise.
+ * msgl-iconv.c: Likewise.
+ * open-po.c: Likewise.
+ * po-charset.c: Likewise.
+ * po-lex.c: Likewise.
+ * po-time.c: Likewise.
+ * read-po-abstract.c: Likewise.
+ * read-properties.c: Likewise.
+ * read-stringtable.c: Likewise.
+ * write-po.c: Likewise.
+
2006-04-30 Bruno Haible <bruno@clisp.org>
* msginit.c (project_id, project_id_version, get_user_email): Close
#include "format.h"
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "gettext.h"
#include "format.h"
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "gettext.h"
#include "format.h"
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "format.h"
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "gettext.h"
#include "c-ctype.h"
#include "xalloc.h"
#include "xallocsa.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "gettext.h"
#include "c-ctype.h"
#include "gcd.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "minmax.h"
#include "gettext.h"
#include "format.h"
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "gettext.h"
#include "format.h"
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "gettext.h"
#include "format.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "c-ctype.h"
#include "gcd.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "minmax.h"
#include "error.h"
#include "format.h"
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "format-invalid.h"
#include "gettext.h"
#include "closeout.h"
#include "dir-list.h"
#include "error.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "relocatable.h"
#include "basename.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "xalloc.h"
#include "stpcpy.h"
#include "exit.h"
#include "exit.h"
#include "pathname.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "msgl-english.h"
#include "plural-count.h"
#include "pipe.h"
/* Message list concatenation and duplicate handling.
- Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006 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
#include "error.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "message.h"
#include "read-po.h"
#include "po-charset.h"
/* Message list charset and locale charset handling.
- Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006 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
#include "basename.h"
#include "xallocsa.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "message.h"
#include "strstr.h"
#include "exit.h"
/* Checking of messages in PO files.
- Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software; you can redistribute it and/or modify
#include "c-ctype.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "format.h"
#include "plural-exp.h"
#include "xalloc.h"
#include "xallocsa.h"
#include "strstr.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "gettext.h"
/* open-po - search for .po file along search path list and open for reading
- Copyright (C) 1995-1996, 2000-2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2000-2003, 2005-2006 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software; you can redistribute it and/or modify
#include "dir-list.h"
#include "pathname.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "gettext.h"
#include <string.h>
#include "xallocsa.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "basename.h"
#include "progname.h"
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>.
Multibyte character handling by Bruno Haible <haible@clisp.cons.org>.
#include "exit.h"
#include "error.h"
#include "error-progname.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-error.h"
#include "po-xerror.h"
#include "pos.h"
/* PO/POT file timestamps.
- Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2003, 2006 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software; you can redistribute it and/or modify
/* Specification. */
#include "po-time.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#define TM_YEAR_ORIGIN 1900
/* Error handling during reading and writing of PO files.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software; you can redistribute it and/or modify
#include "error-progname.h"
#include "xalloc.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "po-error.h"
#include "gettext.h"
/* Reading PO files, abstract class.
- Copyright (C) 1995-1996, 1998, 2000-2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 1998, 2000-2006 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
#include "read-properties.h"
#include "read-stringtable.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "gettext.h"
/* Reading Java .properties files.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
#include "message.h"
#include "read-po-abstract.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "msgl-ascii.h"
#include "utf16-ucs4.h"
/* Reading NeXTstep/GNUstep .strings files.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
#include "error-progname.h"
#include "read-po-abstract.h"
#include "xalloc.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "utf8-ucs4.h"
#include "ucs4-utf8.h"
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
#include "strstr.h"
#include "fwriteerror.h"
#include "error-progname.h"
-#include "xerror.h"
+#include "xvasprintf.h"
#include "po-xerror.h"
#include "gettext.h"
#include "error-progname.h"
#include "xalloc.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "exit.h"
#include "hash.h"
#include "po-charset.h"
#include "x-glade.h"
#include "error.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "basename.h"
#include "progname.h"
#include "xalloc.h"
#include "progname.h"
#include "basename.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "xalloc.h"
#include "exit.h"
#include "strstr.h"
#include "relocatable.h"
#include "basename.h"
#include "xerror.h"
+#include "xvasprintf.h"
#include "xalloc.h"
#include "xallocsa.h"
#include "strstr.h"