From: Bruno Haible Date: Wed, 12 Jan 2005 12:50:34 +0000 (+0000) Subject: gnulib module 'quote'. X-Git-Tag: v0.14.2~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5032bc6a6c743cbce7d19cc4c736ff198e6c9e86;p=thirdparty%2Fgettext.git gnulib module 'quote'. --- diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index 1b84e1d3b..b78085806 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,7 @@ +2005-01-06 Bruno Haible + + * configure.ac: Invoke gl_QUOTE. + 2005-01-06 Bruno Haible * configure.ac: Invoke gl_EXITFAIL. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index d68e9a62d..a094db3cf 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -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 diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 76285dc82..cbc0a6fe1 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,13 @@ +2005-01-06 Bruno Haible + + * 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 * exitfail.h: New file, from gnulib. diff --git a/gettext-tools/lib/Makefile.am b/gettext-tools/lib/Makefile.am index 42340ecaf..ffa08123b 100644 --- a/gettext-tools/lib/Makefile.am +++ b/gettext-tools/lib/Makefile.am @@ -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 \ diff --git a/gettext-tools/lib/Makefile.msvc b/gettext-tools/lib/Makefile.msvc index ba4a3389f..3ad625913 100644 --- a/gettext-tools/lib/Makefile.msvc +++ b/gettext-tools/lib/Makefile.msvc @@ -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 diff --git a/gettext-tools/lib/Makefile.vms b/gettext-tools/lib/Makefile.vms index 957d172c6..4b7cd4d02 100644 --- a/gettext-tools/lib/Makefile.vms +++ b/gettext-tools/lib/Makefile.vms @@ -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 index 000000000..5f11d836b --- /dev/null +++ b/gettext-tools/lib/quote.c @@ -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 */ + +#if HAVE_CONFIG_H +# include +#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 index 000000000..682f9d1fd --- /dev/null +++ b/gettext-tools/lib/quote.h @@ -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); diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index d2cd96c56..4cab5d624 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Bruno Haible + + * quote.m4: New file, from gnulib. + * Makefile.am (EXTRA_DIST): Add quote.m4. + 2005-01-06 Bruno Haible * exitfail.m4: New file, from gnulib. diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am index 41a9b35c7..e2fefa31c 100644 --- a/gettext-tools/m4/Makefile.am +++ b/gettext-tools/m4/Makefile.am @@ -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 index 000000000..14ce1b619 --- /dev/null +++ b/gettext-tools/m4/quote.m4 @@ -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) +])