]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
gnulib module 'quote'.
authorBruno Haible <bruno@clisp.org>
Wed, 12 Jan 2005 12:50:34 +0000 (12:50 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:01 +0000 (12:12 +0200)
gettext-tools/ChangeLog
gettext-tools/configure.ac
gettext-tools/lib/ChangeLog
gettext-tools/lib/Makefile.am
gettext-tools/lib/Makefile.msvc
gettext-tools/lib/Makefile.vms
gettext-tools/lib/quote.c [new file with mode: 0644]
gettext-tools/lib/quote.h [new file with mode: 0644]
gettext-tools/m4/ChangeLog
gettext-tools/m4/Makefile.am
gettext-tools/m4/quote.m4 [new file with mode: 0644]

index 1b84e1d3b28d06419e45bfbc8e7c97544aba78f0..b78085806d8bdd2be29285b34ee7dd9826f0b410 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-06  Bruno Haible  <bruno@clisp.org>
+
+       * configure.ac: Invoke gl_QUOTE.
+
 2005-01-06  Bruno Haible  <bruno@clisp.org>
 
        * configure.ac: Invoke gl_EXITFAIL.
index d68e9a62de36da3243447e496c139d89fc5e1d72..a094db3cf291fd90c7e920b8a8cd6c42ef035ce7 100644 (file)
@@ -144,6 +144,7 @@ gl_FUNC_STRERROR
 gl_FUNC_GLIBC_UNLOCKED_IO
 gt_FUNC_ERROR_AT_LINE
 gl_QUOTEARG
+gl_QUOTE
 gl_PATHMAX
 gl_FUNC_READLINK
 gl_XREADLINK
index 76285dc820668bd000758866000b7093a3ee1706..cbc0a6fe1c908461dd5a75bca74064716b3ee07c 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-06  Bruno Haible  <bruno@clisp.org>
+
+       * quote.h: New file, from gnulib.
+       * quote.c: New file, from gnulib.
+       * Makefile.am (libgettextlib_la_SOURCES): Add quote.h, quote.c.
+       * Makefile.msvc (OBJECTS): Add quote.obj.
+       (quote.obj): New rule.
+       * Makefile.vms (OBJECTS): Add quote.obj.
+       (quote.obj): New rule.
+
 2005-01-06  Bruno Haible  <bruno@clisp.org>
 
        * exitfail.h: New file, from gnulib.
index 42340ecaf09f6a996703ee32c64f855f6a99c440..ffa08123b4cf1e955b7ee35be11183df2170b732 100644 (file)
@@ -65,6 +65,7 @@ libgettextlib_la_SOURCES = \
   pathname.h concatpath.c \
   pipe.h pipe.c w32spawn.h \
   progname.h progname.c progreloc.c \
+  quote.h quote.c \
   quotearg.h quotearg.c \
   safe-read.h safe-read.c \
   safe-write.h safe-write.c \
index ba4a3389fc6e5458b61661167cd1f643b712fc63..3ad6259131ce00e5de5062466bffc752fc9b71d9 100644 (file)
@@ -109,6 +109,7 @@ OBJECTS = \
   concatpath.obj \
   pipe.obj \
   progname.obj progreloc.obj \
+  quote.obj \
   quotearg.obj \
   safe-read.obj \
   safe-write.obj \
@@ -230,6 +231,9 @@ progname.obj : progname.c
 progreloc.obj : progreloc.c
        $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c progreloc.c
 
+quote.obj : quote.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c quote.c
+
 quotearg.obj : quotearg.c
        $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c quotearg.c
 
index 957d172c6eab12bb3120aa31776f7618ea82af79..4b7cd4d026bcc4638aef65a3875f777fede924a0 100644 (file)
@@ -67,6 +67,7 @@ OBJECTS = \
   concatpath.obj, \
   pipe.obj, \
   progname.obj, progreloc.obj, \
+  quote.obj, \
   quotearg.obj, \
   safe-read.obj, \
   safe-write.obj, \
@@ -191,6 +192,9 @@ progname.obj : progname.c
 progreloc.obj : progreloc.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) progreloc.c
 
+quote.obj : quote.c
+       $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) quote.c
+
 quotearg.obj : quotearg.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) quotearg.c
 
diff --git a/gettext-tools/lib/quote.c b/gettext-tools/lib/quote.c
new file mode 100644 (file)
index 0000000..5f11d83
--- /dev/null
@@ -0,0 +1,41 @@
+/* quote.c - quote arguments for output
+   Copyright (C) 1998, 1999, 2000, 2001, 2003 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.  */
+
+/* Written by Paul Eggert <eggert@twinsun.com> */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "quotearg.h"
+#include "quote.h"
+
+/* Return an unambiguous printable representation of NAME,
+   allocated in slot N, suitable for diagnostics.  */
+char const *
+quote_n (int n, char const *name)
+{
+  return quotearg_n_style (n, locale_quoting_style, name);
+}
+
+/* Return an unambiguous printable representation of NAME,
+   suitable for diagnostics.  */
+char const *
+quote (char const *name)
+{
+  return quote_n (0, name);
+}
diff --git a/gettext-tools/lib/quote.h b/gettext-tools/lib/quote.h
new file mode 100644 (file)
index 0000000..682f9d1
--- /dev/null
@@ -0,0 +1,22 @@
+/* quote.h - prototypes for quote.c
+
+   Copyright (C) 1998, 1999, 2000, 2001, 2003 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.  */
+
+
+char const *quote_n (int n, char const *name);
+char const *quote (char const *name);
index d2cd96c563642fda156960401fa1e6123384d171..4cab5d624785016a1f950ccceb199643993c9345 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-06  Bruno Haible  <bruno@clisp.org>
+
+       * quote.m4: New file, from gnulib.
+       * Makefile.am (EXTRA_DIST): Add quote.m4.
+
 2005-01-06  Bruno Haible  <bruno@clisp.org>
 
        * exitfail.m4: New file, from gnulib.
index 41a9b35c713e7fe347b81bbb9d2943e2a782c64a..e2fefa31c7c7054a3982e836e0d4823a087e463c 100644 (file)
@@ -72,6 +72,7 @@ mbswidth.m4 \
 mkdtemp.m4 \
 onceonly.m4 \
 pathmax.m4 \
+quote.m4 \
 quotearg.m4 \
 readlink.m4 \
 relocatable.m4 \
diff --git a/gettext-tools/m4/quote.m4 b/gettext-tools/m4/quote.m4
new file mode 100644 (file)
index 0000000..14ce1b6
--- /dev/null
@@ -0,0 +1,13 @@
+# quote.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+AC_DEFUN([gl_QUOTE],
+[
+  dnl Prerequisites of lib/quote.c.
+  dnl (none)
+])