1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-13 08:24:40 +02:00

(quote, quote_n): New file. Two functions taken verbatim

from tar's src/misc.c.
This commit is contained in:
Jim Meyering
2000-07-15 09:57:19 +00:00
parent a956a46792
commit 4ee7d58704

25
lib/quote.c Normal file
View File

@@ -0,0 +1,25 @@
/* Written by Paul Eggert <eggert@twinsun.com> */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <quotearg.h>
#include <quote.h>
/* Return an unambiguous printable representated, allocated in slot N,
for NAME, 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);
}