+2003-01-12 Bruno Haible <bruno@clisp.org>
+
+ * localcharset.h: New file.
+ * localcharset.c: Include it.
+ * Makefile.in (HEADERS): Add localcharset.h.
+ (COMHDRS): Remove variable, fold into HEADERS.
+ (COMSRCS): Remove variable, fold into SOURCES.
+
2002-12-12 Bruno Haible <bruno@clisp.org>
* dcigettext.c (INTVARDEF): Correct fallback definition.
# Makefile for directory with message catalog handling in GNU NLS Utilities.
-# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
-HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
-COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
-SOURCES = $(COMSRCS) intl-compat.c
-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+HEADERS = gmo.h gettextP.h hash-string.h loadinfo.h plural-exp.h \
+eval-plural.h localcharset.h os2compat.h libgnuintl.h
+SOURCES = bindtextdom.c dcgettext.c dgettext.c gettext.c \
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
-plural-exp.c localcharset.c localename.c osdep.c os2compat.c
+plural-exp.c localcharset.c localename.c osdep.c os2compat.c intl-compat.c
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
# include <config.h>
#endif
+/* Specification. */
+#include "localcharset.h"
+
#if HAVE_STDDEF_H
# include <stddef.h>
#endif
--- /dev/null
+/* Determine a canonical name for the current locale's character encoding.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+ 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. */
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+extern const char * locale_charset (void);
+2003-01-12 Bruno Haible <bruno@clisp.org>
+
+ * localcharset.h: New file.
+ * localcharset.c: Include it.
+ * Makefile.am (libgettextlib_la_SOURCES): Add localcharset.h.
+
2003-01-12 Bruno Haible <bruno@clisp.org>
* alloca_.h: New file, from gnulib.
# >>> gnulib module localcharset.
-libgettextlib_la_SOURCES += localcharset.c
+libgettextlib_la_SOURCES += localcharset.h localcharset.c
EXTRA_DIST += config.charset ref-add.sin ref-del.sin
DEFS += -DLIBDIR=\"$(libdir)\"
# include <config.h>
#endif
+/* Specification. */
+#include "localcharset.h"
+
#if HAVE_STDDEF_H
# include <stddef.h>
#endif
--- /dev/null
+/* Determine a canonical name for the current locale's character encoding.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+ 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. */
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+extern const char * locale_charset (void);
+2003-01-12 Bruno Haible <bruno@clisp.org>
+
+ * msgconv.c: Include localcharset.h.
+ (locale_charset): Remove declaration.
+ * msginit.c: Include localcharset.h.
+ (locale_charset): Remove declaration.
+ * msgl-charset.c: Include localcharset.h.
+ (locale_charset): Remove declaration.
+
2003-01-12 Bruno Haible <bruno@clisp.org>
* format-java.c: Include alloca.h instead of liballoca.h.
/* Converts a translation catalog to a different character encoding.
- 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 "read-po.h"
#include "write-po.h"
#include "msgl-iconv.h"
+#include "localcharset.h"
#include "exit.h"
#include "gettext.h"
#define _(str) gettext (str)
-extern const char * locale_charset (void);
-
/* Force output of PO file even if empty. */
static int force_po;
#include "read-po.h"
#include "write-po.h"
#include "po-charset.h"
+#include "localcharset.h"
#include "po-time.h"
#include "plural-table.h"
#include "xmalloc.h"
#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
-extern const char * locale_charset (void);
extern const char * _nl_locale_name (int category, const char *categoryname);
extern const char * _nl_expand_alias (const char *name);
#include <string.h>
#include "po-charset.h"
+#include "localcharset.h"
#include "error.h"
#include "progname.h"
#include "basename.h"
#define _(str) gettext (str)
-extern const char * locale_charset (void);
-
void
compare_po_locale_charsets (const msgdomain_list_ty *mdlp)
{