From: Jim Meyering Date: Sat, 15 Jul 2000 09:57:19 +0000 (+0000) Subject: (quote, quote_n): New file. Two functions taken verbatim X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09be0e72ed4463dd6074383a363e46891c774fc8;p=pspp (quote, quote_n): New file. Two functions taken verbatim from tar's src/misc.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); +}