]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Link the msg* and xgettext programs against libtextstyle.
authorBruno Haible <bruno@clisp.org>
Tue, 2 Apr 2019 15:53:00 +0000 (17:53 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 2 Apr 2019 15:53:00 +0000 (17:53 +0200)
* libtextstyle/autogen.sh: Don't generate lib/color.h and lib/color.c.
* libtextstyle/lib/color.h: Moved to here from gettext-tools/src/color.h.
* libtextstyle/lib/color.c: Moved to here from gettext-tools/src/color.c.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Remove fd-ostream, file-ostream,
html-styled-ostream, ostream, styled-ostream, term-styled-ostream. Add libxml.
* gettext-tools/gnulib-lib/Makefile.am (MOOPPFLAGS): Remove customization.
* gettext-tools/gnulib-tests/Makefile.am (test_term_ostream_LDADD): Remove
customization.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Remove color.h.
(AM_CPPFLAGS): Add -I directives to the libtextstyle/lib directory.
(libgettextsrc_la_SOURCES): Remove color.c.
(libgettextsrc_la_LDFLAGS): Link with libtextstyle.la.
* gettext-tools/src/FILES: Update.
* gettext-tools/src/write-catalog.h: Include <textstyle.h> instead of ostream.h.
* gettext-tools/src/write-catalog.c: Include <textstyle.h> instead of color.h
and *-ostream.h.
(msgdomain_list_print): Use styled_ostream_create and
noop_styled_ostream_create.
* gettext-tools/src/write-po.h: Include <textstyle.h> instead of ostream.h.
* gettext-tools/src/write-po.c: Include <textstyle.h> instead of *-ostream.h.
(is_stylable): Remove function.
(begin_css_class, end_css_class): Update. Mark as inline.
* gettext-tools/src/write-properties.c: Include <textstyle.h> instead of
ostream.h.
* gettext-tools/src/write-stringtable.c: Likewise.
* gettext-tools/src/msgattrib.c: Include <textstyle.h> instead of color.h.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.

27 files changed:
autogen.sh
gettext-tools/gnulib-lib/Makefile.am
gettext-tools/gnulib-tests/Makefile.am
gettext-tools/src/FILES
gettext-tools/src/Makefile.am
gettext-tools/src/msgattrib.c
gettext-tools/src/msgcat.c
gettext-tools/src/msgcomm.c
gettext-tools/src/msgconv.c
gettext-tools/src/msgen.c
gettext-tools/src/msgfilter.c
gettext-tools/src/msggrep.c
gettext-tools/src/msginit.c
gettext-tools/src/msgmerge.c
gettext-tools/src/msgunfmt.c
gettext-tools/src/msguniq.c
gettext-tools/src/write-catalog.c
gettext-tools/src/write-catalog.h
gettext-tools/src/write-po.c
gettext-tools/src/write-po.h
gettext-tools/src/write-properties.c
gettext-tools/src/write-stringtable.c
gettext-tools/src/xgettext.c
libtextstyle/.gitignore
libtextstyle/autogen.sh
libtextstyle/lib/color.c [moved from gettext-tools/src/color.c with 100% similarity]
libtextstyle/lib/color.h [moved from gettext-tools/src/color.h with 92% similarity]

index 1642793f525c0e601053810f387399537d9eb163..fb0af6e970250c9deb192137ba7e58850cd80080 100755 (executable)
@@ -136,8 +136,6 @@ if ! $skip_gnulib; then
     error
     error-progname
     execute
-    fd-ostream
-    file-ostream
     filename
     findprog
     fnmatch
@@ -151,11 +149,11 @@ if ! $skip_gnulib; then
     gettext
     gettext-h
     hash
-    html-styled-ostream
     iconv
     javacomp
     javaexec
     libunistring-optional
+    libxml
     localcharset
     locale
     localename
@@ -169,7 +167,6 @@ if ! $skip_gnulib; then
     open
     opendir
     openmp
-    ostream
     pipe-filter-ii
     progname
     propername
@@ -193,11 +190,9 @@ if ! $skip_gnulib; then
     strpbrk
     strtol
     strtoul
-    styled-ostream
     sys_select
     sys_stat
     sys_time
-    term-styled-ostream
     trim
     unictype/ctype-space
     unilbrk/ulc-width-linebreaks
index 939b4ba383f8b18a1cf39b1293836f24f5c809d6..73fa0abe6c3dac7cb5d6cabca57b4219ee7c0164 100644 (file)
@@ -58,9 +58,6 @@ endif
 # Rules generated and collected by gnulib-tool.
 include Makefile.gnulib
 
-# Which classes to export from the shared library.
-MOOPPFLAGS += --dllexport=styled_ostream
-
 # OS/2 does not support a DLL name longer than 8 characters.
 if OS2
 libgettextlib_la_LDFLAGS += -os2dllname gtlib
index e30881a014a4aeff7945bc2ffda9037a8b330f24..0d13afc3e420c49ac2b9f37ff4a997953bbc1597 100644 (file)
@@ -24,10 +24,6 @@ AUTOMAKE_OPTIONS += 1.11 color-tests
 # Ensure that test-quotearg.c finds libintl.h.
 AM_CPPFLAGS += -I../intl
 
-# Ensure that test-term-ostream links correctly when using --disable-shared
-# on macOS.
-test_term_ostream_LDADD += @INTL_MACOSX_LIBS@
-
 
 # Remove .deps directories creates by 'configure'.
 # I would say that this left-over is an Automake 1.16.1 bug.
index c88750388fb624567330be41be48903ae2f841f2..2bbeb01f0bcfbfa55cae837522fb2612fdd0c8c2 100644 (file)
@@ -43,9 +43,6 @@ po-xerror.c
                 Error handling during writing and reading of PO files.
 
 +-------------- Writing PO files
-| color.h
-| color.c
-|               Color and style handling.
 | write-catalog.h
 | write-catalog.c
 |               Output of a list-of-messages.
index d08d9d2e9f044951260f0470ac2bb14b13e7a9a8..afd25f21bb6e32f1b1ca59c1ee6e28adef892379 100644 (file)
@@ -39,7 +39,7 @@ noinst_HEADERS = pos.h message.h po-error.h po-xerror.h po-gram.h po-charset.h \
 po-lex.h open-catalog.h read-catalog-abstract.h read-catalog.h \
 read-po.h read-properties.h read-stringtable.h \
 str-list.h \
-color.h write-catalog.h write-po.h write-properties.h write-stringtable.h \
+write-catalog.h write-po.h write-properties.h write-stringtable.h \
 dir-list.h file-list.h po-gram-gen.h po-gram-gen2.h cldr-plural.h \
 cldr-plural-exp.h locating-rule.h its.h search-path.h \
 msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-cat.h msgl-header.h \
@@ -75,6 +75,7 @@ AM_CPPFLAGS = \
   -I.. -I$(top_srcdir) \
   -I$(top_srcdir)/libgrep \
   -I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
+  -I../../libtextstyle/lib -I$(top_srcdir)/../libtextstyle/lib \
   -I../intl -I$(top_srcdir)/../gettext-runtime/intl
 DEFS = \
   -DLOCALEDIR=\"$(localedir)\" -DBISON_LOCALEDIR=\"$(BISON_LOCALEDIR)\" \
@@ -149,7 +150,7 @@ FORMAT_SOURCE += \
 # libgettextsrc contains all code that is needed by at least two programs.
 libgettextsrc_la_SOURCES = \
 $(COMMON_SOURCE) read-catalog.c \
-color.c write-catalog.c write-properties.c write-stringtable.c write-po.c \
+write-catalog.c write-properties.c write-stringtable.c write-po.c \
 msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \
 msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c \
 plural-table.c quote.h sentence.h sentence.c \
@@ -259,7 +260,7 @@ cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
 # use iconv().
 libgettextsrc_la_LDFLAGS = \
   -release @VERSION@ \
-  ../gnulib-lib/libgettextlib.la $(LTLIBUNISTRING) @LTLIBINTL@ @LTLIBICONV@ -lc -no-undefined
+  ../gnulib-lib/libgettextlib.la $(LTLIBUNISTRING) ../../libtextstyle/lib/libtextstyle.la @LTLIBINTL@ @LTLIBICONV@ -lc -no-undefined
 
 # OS/2 does not support a DLL name longer than 8 characters.
 if OS2
index cc345fe67c62bf6469a2d49ca8b81bd2d0dae4a8..d577490040b252d273e0391b4d880233ab5591ce 100644 (file)
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <locale.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "error.h"
@@ -43,7 +45,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "propername.h"
 #include "xalloc.h"
 #include "gettext.h"
index 53df1851d34fdb8a5e8d96bf1666dc96f776dc0b..08ee2ffcfadf1d3360f80811fa326962c1bb1217 100644 (file)
@@ -26,6 +26,8 @@
 #include <stdlib.h>
 #include <locale.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "str-list.h"
@@ -44,7 +46,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "msgl-cat.h"
 #include "msgl-header.h"
 #include "propername.h"
index 42e0a591fc47c3bdb0f01d1b994be3a8e64731e1..d79c2eb0e1b8fa65e114907bd085e7d295b2c4a0 100644 (file)
@@ -26,6 +26,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "str-list.h"
@@ -44,7 +46,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "msgl-cat.h"
 #include "propername.h"
 #include "gettext.h"
index eebbb0cb35e1caa0c1b9348850fdf21f79f33174..111c5eb73a0f0582b9eb5fc3bf4861e3d4909f94 100644 (file)
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <locale.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "error.h"
@@ -43,7 +45,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "msgl-iconv.h"
 #include "localcharset.h"
 #include "propername.h"
index 143905d071ef1147113de85752cff0584ff503bb..68849ef7a3fb613643fc54b82417320b088eb2f4 100644 (file)
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <locale.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "error.h"
@@ -45,7 +47,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "propername.h"
 #include "gettext.h"
 
index fa8c37bed8f1636991c1ee6b44fe05226f8cf505..ad147f3da38dbf5e57d90271afd840567d61330e 100644 (file)
@@ -30,6 +30,8 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "error.h"
@@ -47,7 +49,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "msgl-charset.h"
 #include "xalloc.h"
 #include "findprog.h"
index 462728ec8c6ae3d2ffadeeed6e9a5f3156930d1f..b3ced0002487d169f9d3b1c1ec2789ecc455f3a0 100644 (file)
@@ -38,6 +38,8 @@
 
 #include <fnmatch.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "error.h"
@@ -54,7 +56,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "str-list.h"
 #include "msgl-charset.h"
 #include "xalloc.h"
index d3a09abd602ecbb3453b7064394080ee71103344..d179d8ca41bc2f74f52f95d2c659854b54a62081 100644 (file)
@@ -49,6 +49,8 @@
 # define HAVE_DIR 0
 #endif
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "error.h"
 #include "error-progname.h"
@@ -66,7 +68,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "po-charset.h"
 #include "localcharset.h"
 #include "localename.h"
index e2f533ed6d09ce1897df41a4f7d115cd657df784..be45c82e4f4b307c880882de1cf9ecbeb53e7c0e 100644 (file)
@@ -29,6 +29,8 @@
 #include <string.h>
 #include <locale.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "error.h"
@@ -45,7 +47,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "format.h"
 #include "xalloc.h"
 #include "xmalloca.h"
index 8767691246488d6e29cfc55d9351ca3295ec35fe..59fa06839f60eec1cba8947ddacce3d855285be4 100644 (file)
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <locale.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "error.h"
 #include "error-progname.h"
@@ -44,7 +46,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "propername.h"
 #include "gettext.h"
 
index ddb7640aa7bb4d0acfb74a1f80e2c9fb766a02d2..892ba89b2ccb3790b4bb4f57c3ac820ccae84e27 100644 (file)
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <locale.h>
 
+#include <textstyle.h>
+
 #include "closeout.h"
 #include "dir-list.h"
 #include "str-list.h"
@@ -44,7 +46,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "msgl-cat.h"
 #include "propername.h"
 #include "gettext.h"
index d67436f4cad816576df8a68026205f4e98de4b07..354f7be12972b39ee05de87c1afaf9dd3eabce97 100644 (file)
 # define STDOUT_FILENO 1
 #endif
 
-#include "ostream.h"
-#include "file-ostream.h"
+#ifdef GETTEXTDATADIR
+# include <textstyle.h>
+#else
+# include "ostream.h"
+# include "file-ostream.h"
+#endif
+
 #include "fwriteerror.h"
 #include "error-progname.h"
 #include "xvasprintf.h"
 
 # define ENABLE_COLOR 1
 
-# include "styled-ostream.h"
-# include "term-styled-ostream.h"
-# include "html-styled-ostream.h"
-# include "fd-ostream.h"
-
-# include "color.h"
 # include "relocatable.h"
 # include "po-charset.h"
 # include "msgl-iconv.h"
@@ -247,9 +246,7 @@ msgdomain_list_print (msgdomain_list_ty *mdlp, const char *filename,
                           "GETTEXTSTYLESDIR", relocate (GETTEXTSTYLESDIR),
                           "po-default.css");
       stream =
-        term_styled_ostream_create (fd, filename, TTYCTL_AUTO, style_file_name);
-      if (stream == NULL)
-        stream = fd_ostream_create (fd, filename, true);
+        styled_ostream_create (fd, filename, TTYCTL_AUTO, style_file_name);
       output_syntax->print (mdlp, stream, page_width, debug);
       ostream_free (stream);
 
@@ -312,10 +309,16 @@ msgdomain_list_print (msgdomain_list_ty *mdlp, const char *filename,
           ostream_free (html_stream);
         }
       else
-#endif
         {
-          output_syntax->print (mdlp, stream, page_width, debug);
+          noop_styled_ostream_t styled_stream;
+
+          styled_stream = noop_styled_ostream_create (stream, false);
+          output_syntax->print (mdlp, styled_stream, page_width, debug);
+          ostream_free (styled_stream);
         }
+#else
+      output_syntax->print (mdlp, stream, page_width, debug);
+#endif
 
       ostream_free (stream);
 
index 6df2067d473692c9149c762b2d4919b4e6362cde..5f8138fe6adbfe31658d487da963b98179cd560b 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2003, 2006, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2019 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
 
 #include <stdbool.h>
 
-#include "ostream.h"
+#ifdef GETTEXTDATADIR
+# include <textstyle.h>
+#else
+# include "ostream.h"
+#endif
+
 #include "message.h"
 
 
index d917e4cbf8148fb839f9a4dd8f55ab5b27183bcb..1e2642a0aa1f76ecf8c2661f07a4921046490545 100644 (file)
 # include <iconv.h>
 #endif
 
+#ifdef GETTEXTDATADIR
+# include <textstyle.h>
+#else
+# include "ostream.h"
+#endif
+
 #include "c-ctype.h"
 #include "po-charset.h"
 #include "format.h"
 #include "xalloc.h"
 #include "xmalloca.h"
 #include "c-strstr.h"
-#include "ostream.h"
-#ifdef GETTEXTDATADIR
-# include "styled-ostream.h"
-#endif
 #include "xvasprintf.h"
 #include "po-xerror.h"
 #include "gettext.h"
@@ -160,27 +162,20 @@ make_c_width_description_string (enum is_wrap do_wrap)
    When compiled in libgettextpo, don't enable styling support.  */
 #ifdef GETTEXTDATADIR
 
-/* Return true if the stream is an instance of styled_ostream_t.  */
-static inline bool
-is_stylable (ostream_t stream)
-{
-  return IS_INSTANCE (stream, ostream, styled_ostream);
-}
+/* All ostream_t instances are in fact styled_ostream_t instances.  */
 
 /* Start a run of text belonging to a given CSS class.  */
-static void
+static inline void
 begin_css_class (ostream_t stream, const char *classname)
 {
-  if (is_stylable (stream))
-    styled_ostream_begin_use_class ((styled_ostream_t) stream, classname);
+  styled_ostream_begin_use_class ((styled_ostream_t) stream, classname);
 }
 
 /* End a run of text belonging to a given CSS class.  */
-static void
+static inline void
 end_css_class (ostream_t stream, const char *classname)
 {
-  if (is_stylable (stream))
-    styled_ostream_end_use_class ((styled_ostream_t) stream, classname);
+  styled_ostream_end_use_class ((styled_ostream_t) stream, classname);
 }
 
 #else
index f0995ea677e3e42b36e3c4654fb476e3111ccca7..37f676146fa889c698d085ca84f29d54ed5775ce 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2014, 2018 Free Software
+   Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2014, 2018-2019 Free Software
    Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 #ifndef _WRITE_PO_H
 #define _WRITE_PO_H
 
-#include "ostream.h"
-#include "message.h"
-
 #include <stdbool.h>
 
+#ifdef GETTEXTDATADIR
+# include <textstyle.h>
+#else
+# include "ostream.h"
+#endif
+
+#include "message.h"
+
 
 #ifdef __cplusplus
 extern "C" {
index 4c8bb70c95d7a86f4ca7b0a0304279db047158e2..19eb228c3e8d15b6e51bc056ddccc3c4ffd8fb77 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing Java .properties files.
-   Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005-2009, 2019 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 <stdlib.h>
 #include <string.h>
 
+#include <textstyle.h>
+
 #include "error.h"
 #include "message.h"
 #include "msgl-ascii.h"
 #include "msgl-iconv.h"
 #include "po-charset.h"
 #include "unistr.h"
-#include "ostream.h"
 #include "write-po.h"
 #include "xalloc.h"
 
index dbba7e9ef62bb72f80aee3a1c2ff5e4d2d93aac7..bf0f63de2ccd548020c48e7ba835522704bc1336 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing NeXTstep/GNUstep .strings files.
-   Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2008, 2019 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 <stdlib.h>
 #include <string.h>
 
+#include <textstyle.h>
+
 #include "message.h"
 #include "msgl-ascii.h"
 #include "msgl-iconv.h"
 #include "po-charset.h"
 #include "c-strstr.h"
-#include "ostream.h"
 #include "xvasprintf.h"
 #include "write-po.h"
 
index af3f4a2fa0883d9784d594ed30d218a59d0dfcf6..67e9cb55dae2e76f89987f1281c87febb2ebed86 100644 (file)
@@ -39,6 +39,8 @@
 #include <iconv.h>
 #endif
 
+#include <textstyle.h>
+
 #include "rc-str-list.h"
 #include "xg-encoding.h"
 #include "xg-arglist-context.h"
@@ -74,7 +76,6 @@
 #include "write-po.h"
 #include "write-properties.h"
 #include "write-stringtable.h"
-#include "color.h"
 #include "format.h"
 #include "propername.h"
 #include "sentence.h"
index 5dab4fbe747d07a54dd210c4cc735f9f7791b8a2..c7e8708921ec42476aac2e56e60a8dd686f2593d 100644 (file)
 /build-aux/run-test
 /build-aux/test-driver.diff
 /build-aux/texinfo.tex
-/lib/color.c
-/lib/color.h
 /lib/declared.sh
 /lib/exported.sh.in
 /m4/exported.m4
index dd7765672ee3548c48fbab4e15817eb64540cc2c..b0d5664126436d445e204e9734defaca3669a527 100755 (executable)
@@ -117,8 +117,6 @@ cp -p ../m4/woe32-dll.m4 m4/
 cp -p ../build-aux/ltmain.sh build-aux/
 cp -p ../gettext-tools/m4/exported.m4 m4/
 cp -p ../gettext-tools/libgettextpo/exported.sh.in lib/
-sed -e 's/DLL_VARIABLE/LIBTEXTSTYLE_DLL_VARIABLE/g' < ../gettext-tools/src/color.h > lib/color.h
-cp -p ../gettext-tools/src/color.c lib/
 
 aclocal -I m4 -I gnulib-m4
 autoconf
similarity index 92%
rename from gettext-tools/src/color.h
rename to libtextstyle/lib/color.h
index bec031a96023682c5855140e857535d8ee761e02..673338f720d9266ccaeab318a8117f25c0975a79 100644 (file)
@@ -27,14 +27,14 @@ extern "C" {
 
 
 /* Whether to output a test page.  */
-extern DLL_VARIABLE bool color_test_mode;
+extern LIBTEXTSTYLE_DLL_VARIABLE bool color_test_mode;
 
 /* Color option.  */
 enum color_option { color_no, color_tty, color_yes, color_html };
-extern DLL_VARIABLE enum color_option color_mode;
+extern LIBTEXTSTYLE_DLL_VARIABLE enum color_option color_mode;
 
 /* Style to use when coloring.  */
-extern DLL_VARIABLE const char *style_file_name;
+extern LIBTEXTSTYLE_DLL_VARIABLE const char *style_file_name;
 
 /* --color argument handling.  Return an error indicator.  */
 extern bool handle_color_option (const char *option);