]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
New file localcharset.h.
authorBruno Haible <bruno@clisp.org>
Tue, 14 Jan 2003 13:35:05 +0000 (13:35 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:08:56 +0000 (12:08 +0200)
12 files changed:
intl/ChangeLog
intl/Makefile.in
intl/localcharset.c
intl/localcharset.h [new file with mode: 0644]
lib/ChangeLog
lib/Makefile.am
lib/localcharset.c
lib/localcharset.h [new file with mode: 0644]
src/ChangeLog
src/msgconv.c
src/msginit.c
src/msgl-charset.c

index 233f72b667eebd6c4f9a4e3e183ab8d3441db188..1a507a3c5075d79f88795a646509b8786e4f106c 100644 (file)
@@ -1,3 +1,11 @@
+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.
index 65cd6b5fe9bc64fba06b74325ea791eeea855db1..79fa7cc04c068d3e434900f1976f5168c38c2b28 100644 (file)
@@ -1,5 +1,5 @@
 # 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
@@ -59,13 +59,12 @@ LDFLAGS = @LDFLAGS@
 
 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 \
index 2b1564e2fd8d00b71cd112d2e26d3da6bd37d560..dad97308c79a6e50cfd7bc2ce1946caa0dd11e92 100644 (file)
@@ -23,6 +23,9 @@
 # include <config.h>
 #endif
 
+/* Specification.  */
+#include "localcharset.h"
+
 #if HAVE_STDDEF_H
 # include <stddef.h>
 #endif
diff --git a/intl/localcharset.h b/intl/localcharset.h
new file mode 100644 (file)
index 0000000..2522e92
--- /dev/null
@@ -0,0 +1,23 @@
+/* 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);
index fd8e89af4a29a9c3d88cdf7ce2b5fa5c180ddf66..84bbb4f1c41fb0856797ae35394ca81ee16928c9 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 3caa9cb95bf9edda81a573604b8478de5bfe2b3f..c300e0e389ff2ffb553328f27ae98c05f4bd7b3c 100644 (file)
@@ -151,7 +151,7 @@ MOSTLYCLEANFILES += alloca.h
 
 
 # >>> 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)\"
 
index 2b1564e2fd8d00b71cd112d2e26d3da6bd37d560..dad97308c79a6e50cfd7bc2ce1946caa0dd11e92 100644 (file)
@@ -23,6 +23,9 @@
 # include <config.h>
 #endif
 
+/* Specification.  */
+#include "localcharset.h"
+
 #if HAVE_STDDEF_H
 # include <stddef.h>
 #endif
diff --git a/lib/localcharset.h b/lib/localcharset.h
new file mode 100644 (file)
index 0000000..2522e92
--- /dev/null
@@ -0,0 +1,23 @@
+/* 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);
index 550e1565f5c5e6e00aaa5c2a1d779d77a5454756..1ecccb412faf5aa71143097f9de5e26d0656d1eb 100644 (file)
@@ -1,3 +1,12 @@
+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.
index a95094662922e3d36ad0996c7e826589c8052fc6..e5eda85797501f703ab913fb9e6df233cb50898e 100644 (file)
@@ -1,5 +1,5 @@
 /* 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;
index 75c926fd2de078e1df88d9fb28f2c305c995487f..339a8ab239e6bb5aef525a202906dafc09bf5681 100644 (file)
@@ -75,6 +75,7 @@
 #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"
@@ -94,7 +95,6 @@
 
 #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);
 
index 777f809e7be6a24e1814cd11fff206f2b7a0f63e..582193cf209a7a6dfbc03c9b051bed333b88e7bb 100644 (file)
@@ -29,6 +29,7 @@
 #include <string.h>
 
 #include "po-charset.h"
+#include "localcharset.h"
 #include "error.h"
 #include "progname.h"
 #include "basename.h"
@@ -40,8 +41,6 @@
 
 #define _(str) gettext (str)
 
-extern const char * locale_charset (void);
-
 void
 compare_po_locale_charsets (const msgdomain_list_ty *mdlp)
 {