From 09be0e72ed4463dd6074383a363e46891c774fc8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 15 Jul 2000 09:57:19 +0000 Subject: [PATCH] (quote, quote_n): New file. Two functions taken verbatim from tar's src/misc.c. --- lib/quote.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/quote.c diff --git a/lib/quote.c b/lib/quote.c new file mode 100644 index 0000000000..fd1b57e924 --- /dev/null +++ b/lib/quote.c @@ -0,0 +1,25 @@ +/* Written by Paul Eggert */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +/* 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); +} -- 2.30.2