'error-progname'.
+2003-08-22 Bruno Haible <bruno@clisp.org>
+
+ * error-progname.h: New file, extracted from progname.h.
+ * error-progname.c: New file, extracted from progname.c.
+ * progname.h (error_with_progname, maybe_print_progname): Remove
+ declarations.
+ * progname.c (error_with_progname): Remove variable.
+ (maybe_print_progname): Remove function.
+ * xerror.c: Include error-progname.h.
+ * Makefile.am (libgettextlib_la_SOURCES): Add error-progname.h and
+ error-progname.c.
+
2003-08-20 Bruno Haible <bruno@clisp.org>
* config.charset (linux-gnulibc1*): Change hr_HR, ro_RO to ISO-8859-2.
classpath.h classpath.c \
copy-file.h copy-file.c \
error.h error.c \
+ error-progname.h error-progname.c \
execute.h execute.c w32spawn.h \
exit.h \
findprog.h findprog.c \
--- /dev/null
+/* Use of program name in error-reporting functions.
+ Copyright (C) 2001-2003 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
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+/* Specification. */
+#include "error-progname.h"
+
+#include <stdio.h>
+
+#include "progname.h"
+
+
+/* Indicates whether errors and warnings get prefixed with program_name.
+ Default is true. */
+bool error_with_progname = true;
+
+/* Print program_name prefix on stderr if and only if error_with_progname
+ is true. */
+void
+maybe_print_progname ()
+{
+ if (error_with_progname)
+ fprintf (stderr, "%s: ", program_name);
+}
--- /dev/null
+/* Use of program name in error-reporting functions.
+ Copyright (C) 2001-2003 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
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ERROR_PROGNAME_H
+#define _ERROR_PROGNAME_H
+
+#include <stdbool.h>
+
+/* This file supports selectively prefixing or nor prefixing error messages
+ with the program name.
+
+ Programs using this file should do the following in main():
+ error_print_progname = maybe_print_progname;
+ */
+
+/* Indicates whether errors and warnings get prefixed with program_name.
+ Default is true.
+ A reason to omit the prefix is for better interoperability with Emacs'
+ compile.el. */
+extern bool error_with_progname;
+
+/* Print program_name prefix on stderr if and only if error_with_progname
+ is true. */
+extern void maybe_print_progname (void);
+
+#endif /* _ERROR_PROGNAME_H */
/* Specification. */
#include "progname.h"
-#include <stdio.h>
#include <string.h>
#undef set_program_name
argv0 = base + 3;
program_name = argv0;
}
-
-
-/* Indicates whether errors and warnings get prefixed with program_name.
- Default is true. */
-bool error_with_progname = true;
-
-/* Print program_name prefix on stderr if and only if error_with_progname
- is true. */
-void
-maybe_print_progname ()
-{
- if (error_with_progname)
- fprintf (stderr, "%s: ", program_name);
-}
#include <stdbool.h>
-/* This file supports selectively prefixing or nor prefixing error messages
- with the program name.
-
- Programs using this file should do the following in main():
+/* Programs using this file should do the following in main():
set_program_name (argv[0]);
- error_print_progname = maybe_print_progname;
*/
/* String containing name the program is called with. */
#endif
-/* Indicates whether errors and warnings get prefixed with program_name.
- Default is true.
- A reason to omit the prefix is for better interoperability with Emacs'
- compile.el. */
-extern bool error_with_progname;
-
-/* Print program_name prefix on stderr if and only if error_with_progname
- is true. */
-extern void maybe_print_progname (void);
-
#endif /* _PROGNAME_H */
/* Multiline error-reporting functions.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 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 "progname.h"
+#include "error-progname.h"
#include "exit.h"
#include "mbswidth.h"
#include "vasprintf.h"
+2003-08-22 Bruno Haible <bruno@clisp.org>
+
+ * format-awk.c: Include error-progname.h instead of progname.h.
+ * format-c.c: Likewise.
+ * format-elisp.c: Likewise.
+ * format-gcc-internal.c: Likewise.
+ * format-java.c: Likewise.
+ * format-librep.c: Likewise.
+ * format-lisp.c: Likewise.
+ * format-pascal.c: Likewise.
+ * format-perl.c: Likewise.
+ * format-perl-brace.c: Likewise.
+ * format-php.c: Likewise.
+ * format-python.c: Likewise.
+ * format-tcl.c: Likewise.
+ * format-ycp.c: Likewise.
+ * po-lex.h: Likewise.
+ * read-properties.c: Likewise.
+ * write-po.c: Likewise.
+ * x-awk.c: Likewise.
+ * x-c.c: Likewise.
+ * x-perl.c: Likewise.
+ * x-python.c: Likewise.
+ * x-rst.c: Likewise.
+ * hostname.c: Include error-progname.h.
+ * msgattrib.c: Likewise.
+ * msgcat.c: Likewise.
+ * msgcmp.c: Likewise.
+ * msgcomm.c: Likewise.
+ * msgconv.c: Likewise.
+ * msgen.c: Likewise.
+ * msgexec.c: Likewise.
+ * msgfilter.c: Likewise.
+ * msgfmt.c: Likewise.
+ * msggrep.c: Likewise.
+ * msginit.c: Likewise.
+ * msgmerge.c: Likewise.
+ * msgunfmt.c: Likewise.
+ * msguniq.c: Likewise.
+ * urlget.c: Likewise.
+ * xgettext.c: Likewise.
+ * po-lex.c: Include error-progname.h and pos.h.
+
2003-08-15 Bruno Haible <bruno@clisp.org>
* msginit.c (catalogname_for_locale): Add entries for Aragonese,
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "format-invalid.h"
#include "minmax.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "format.h"
#include "xmalloc.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include "xerror.h"
#include "format-invalid.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "gettext.h"
#define _(str) gettext (str)
#include <stdbool.h>
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "str-list.h"
#include "file-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "str-list.h"
#include "file-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
#include "xerror.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#endif
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include <locale.h>
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "dir-list.h"
#include "str-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "xmalloc.h"
#include "exit.h"
#include "error.h"
+#include "error-progname.h"
+#include "pos.h"
#include "str-list.h"
#include "po-gram-gen2.h"
#include <stdio.h>
#include <stdbool.h>
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "pos.h"
#include "xerror.h"
#include <string.h>
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "message.h"
#include "read-po-abstract.h"
#include "xmalloc.h"
#endif
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"
#include "xmalloc.h"
#include "strstr.h"
#include "exit.h"
-#include "progname.h"
+#include "error-progname.h"
#include "error.h"
#include "xerror.h"
#include "gettext.h"
#include "x-awk.h"
#include "xgettext.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "xmalloc.h"
#include "exit.h"
#include "gettext.h"
#include "x-c.h"
#include "xgettext.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "xmalloc.h"
#include "exit.h"
#include "hash.h"
#include "x-perl.h"
#include "xgettext.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "xmalloc.h"
#include "exit.h"
#include "po-charset.h"
#include "x-python.h"
#include "xgettext.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "xmalloc.h"
#include "exit.h"
#include "po-charset.h"
#include "x-rst.h"
#include "xgettext.h"
#include "error.h"
-#include "progname.h"
+#include "error-progname.h"
#include "xmalloc.h"
#include "exit.h"
#include "gettext.h"
#include "file-list.h"
#include "str-list.h"
#include "error.h"
+#include "error-progname.h"
#include "progname.h"
#include "relocatable.h"
#include "basename.h"