]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Rename src/gettextp.c to src/gettext.c, and
authorBruno Haible <bruno@clisp.org>
Tue, 23 Jan 2001 17:25:58 +0000 (17:25 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jan 2001 17:25:58 +0000 (17:25 +0000)
move src/setlocale.c to tests/setlocale.c.

12 files changed:
doc/gettext.texi
po/ChangeLog
po/POTFILES.in
src/ChangeLog
src/FILES
src/Makefile.am
src/gettext.c [moved from src/gettextp.c with 96% similarity]
tests/ChangeLog
tests/Makefile.am
tests/setlocale.c [moved from src/setlocale.c with 100% similarity]
tests/tstgettext.c [new file with mode: 0644]
tests/xgettext-1

index 67747acade9034f13b3b5145377730479966a596..f78925c2743302edb7de3afefe330705c0ff5404 100644 (file)
@@ -4837,7 +4837,7 @@ lib/getopt.c
 lib/xmalloc.c
 
 # Package source files
-src/gettextp.c
+src/gettext.c
 src/msgfmt.c
 src/xgettext.c
 @end group
index d805ad46affe2de62eea70bd4181a1e92508ffaa..948c301df69b3483f8bd4f74d320eb9e63b5750d 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-07  Bruno Haible  <haible@clisp.cons.org>
+
+       * POTFILES.in: src/gettext.c was renamed from src/gettextp.c.
+       Add lib/obstack.c, src/open-po.c, src/po-lex.h.
+
 2001-01-06  Bruno Haible  <haible@clisp.cons.org>
 
        * Makefile.in.in (.po.gmo): Pass --statistics to msgfmt.
index 41e92de589bccb542947f4f7e3e2e6da45289f43..ce3da0f9f107ecc2ad3b64ce04e936647107ed37 100644 (file)
@@ -1,20 +1,23 @@
 # List of files which containing translatable strings.
-# Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1998, 2001 Free Software Foundation, Inc.
 
 # Files from the compatibility library
 lib/error.c
 lib/getopt.c
+lib/obstack.c
 lib/xmalloc.c
 
 # Package source files
-src/gettextp.c
+src/gettext.c
 src/message.c
 src/msgcmp.c
 src/msgcomm.c
 src/msgfmt.c
 src/msgmerge.c
 src/msgunfmt.c
+src/open-po.c
 src/po-gram-gen.c
+src/po-lex.h
 src/po-lex.c
 src/xget-lex.c
 src/xgettext.c
index 1562734e443404f4dfeca4eae9c9a92a2182779e..d6456022b9625e8a2f81af7a6f7e89ac662b8762 100644 (file)
@@ -1,3 +1,12 @@
+2001-01-07  Bruno Haible  <haible@clisp.cons.org>
+
+       * gettext.c: Renamed from gettextp.c. Use included libintl if TESTS
+       is defined.
+       * setlocale.c: Move to ../tests.
+       * Makefile.am (EXTRA_PROGRAMS, all-local, CLEANFILES): Remove.
+       (tstgettext_SOURCES): Remove.
+       (gettext_SOURCES): Update.
+
 2001-01-07  Bruno Haible  <haible@clisp.cons.org>
 
        * msgcmp.c: Include libgettext.h instead of libintl.h, so that the
index 320bb9bee544f47438db4d799be8b8e219c1f7f1..cb8d47ce6a65702cce23e5d9dba69b01a30d8df3 100644 (file)
--- a/src/FILES
+++ b/src/FILES
@@ -2,7 +2,7 @@
                 =====================================
 
 1)
-gettextp.c      Source for the 'gettext' program.
+gettext.c       Source for the 'gettext' program.
 
 2) The msgfmt, msgunfmt, msgcmp, msgcomm, msgmerge, xgettext programs.
 
index a2da9b2387aa5ac8e6328edbf4f6b8d76cdd1f68..24c7a77990d8e97590c71af76d9d1e98f5b6bd96 100644 (file)
@@ -39,13 +39,8 @@ LDADD = ../lib/libnlsut.a @INTLLIBS@ ../intl/libintl.$la
 SED = sed
 YACC = @YACC@ -d
 
-EXTRA_PROGRAMS = tstgettext
-all-local: $(EXTRA_PROGRAMS)
-CLEANFILES = $(EXTRA_PROGRAMS)
-
 # Source dependencies.
-gettext_SOURCES = gettextp.c
-tstgettext_SOURCES = gettextp.c setlocale.c
+gettext_SOURCES = gettext.c
 msgcmp_SOURCES = message.c msgcmp.c open-po.c po-gram-gen.y po-hash-gen.y \
 po-lex.c po.c str-list.c dir-list.c
 msgfmt_SOURCES = msgfmt.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c po.c \
similarity index 96%
rename from src/gettextp.c
rename to src/gettext.c
index e7475676d54c1202c39aee12715479625b7b9b53..9692b50be01cb812d1c1d3cafeb00872da4e298a 100644 (file)
 #include "error.h"
 #include "system.h"
 
-#include "libgettext.h"
+#ifdef TESTS
+/* Make sure we use the included libintl, not the system's one. */
+# define textdomain textdomain__
+# define bindtextdomain bindtextdomain__
+# define gettext gettext__
+# define dgettext dgettext__
+# include <libgnuintl.h>
+#else
+# include "libgettext.h"
+#endif
 
 #define _(str) gettext (str)
 
index 4f24852733d5707ba665b444a443374da6e1dde5..64b790fe9bf3948164b080810a8acdad41b62f95 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-07  Bruno Haible  <haible@clisp.cons.org>
+
+       * setlocale.c: New file, moved here from ../src.
+       * tstgettext.c: New file.
+       * Makefile.am (TESTS_ENVIRONMENT): Add "." to the PATH.
+       (xg-test1.ok.po): Use src/gettext.c instead of src/gettextp.c.
+       (INCLUDES): Add more dirs.
+       (DEFS): Add defines needed for gettext.c.
+       (LDADD): New variable.
+       (EXTRA_PROGRAMS, all-local, CLEANFILES): Add tstgettext.
+       (tstgettext_SOURCES, tstgettext_LDADD): New variable.
+       (cake_SOURCES): Update.
+       * xgettext-1: Use src/gettext.c instead of src/gettextp.c.
+
 2001-01-07  Bruno Haible  <haible@clisp.cons.org>
 
        * plural-1-prg.c: Include libgnuintl.h instead of libgettext.h.
index a7f7d5c3970162d562b5cf7949effe08006243f4..742bf2936763035ce2de46ce486151b9ebfed083 100644 (file)
@@ -28,7 +28,7 @@ EXTRA_DIST = $(TESTS) test.mo xg-test1.ok.po
 
 XGETTEXT = ../src/xgettext
 
-TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src:$$PATH \
+TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=.:../src:$$PATH \
                    GETTEXT=tstgettext \
                    XGETTEXT=`echo xgettext|sed '$(transform)'` \
                    MSGFMT=`echo msgfmt|sed '$(transform)'` \
@@ -38,15 +38,18 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src:$$PATH \
                    $(SHELL)
 
 xg-test1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
-               $(top_srcdir)/src/gettextp.c
+               $(top_srcdir)/src/gettext.c
        $(XGETTEXT) -d xg-test1.ok -p $(srcdir) -k_ --omit-header \
          $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
-         $(top_srcdir)/src/gettextp.c
-
-# An auxiliary program used by the plural-1 test.
-INCLUDES = -I${top_srcdir}/intl
-EXTRA_PROGRAMS = cake
-cake_SOURCES = plural-1-prg.c
-cake_LDADD = ../src/setlocale.o ../intl/libintl.a
-all-local: cake
-CLEANFILES = cake
+         $(top_srcdir)/src/gettext.c
+
+# Two auxiliary programs used by the tests.
+INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+LDADD = ../intl/libintl.a
+EXTRA_PROGRAMS = tstgettext cake
+tstgettext_SOURCES = tstgettext.c setlocale.c
+tstgettext_LDADD = ../lib/libnlsut.a $(LDADD)
+cake_SOURCES = plural-1-prg.c setlocale.c
+all-local: $(EXTRA_PROGRAMS)
+CLEANFILES = $(EXTRA_PROGRAMS)
similarity index 100%
rename from src/setlocale.c
rename to tests/setlocale.c
diff --git a/tests/tstgettext.c b/tests/tstgettext.c
new file mode 100644 (file)
index 0000000..98cd74d
--- /dev/null
@@ -0,0 +1,3 @@
+/* A version of the gettext program that uses the included libintl.  */
+#define TESTS
+#include "../src/gettext.c"
index 84cb1e87b87bede0101984f0d36edd875095078d..7faaee7e00b6fa92e0c4af7a324445e2aa07f9d3 100755 (executable)
@@ -7,7 +7,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15
 tmpfiles="xg-test1.po"
 : ${XGETTEXT=xgettext}
 ${XGETTEXT} -d xg-test1 -k_ --omit-header \
- $top_srcdir/src/xgettext.c $top_srcdir/src/msgfmt.c $top_srcdir/src/gettextp.c
+ $top_srcdir/src/xgettext.c $top_srcdir/src/msgfmt.c $top_srcdir/src/gettext.c
 
 : ${DIFF=diff}
 ${DIFF} $top_srcdir/tests/xg-test1.ok.po xg-test1.po