diff options
author | ache <ache@FreeBSD.org> | 2002-06-08 07:47:23 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2002-06-08 07:47:23 +0000 |
commit | 0ec16ad8f3387117932b28e20a6db5928a4fde52 (patch) | |
tree | df6286a6fcf07f34f9d04f5eb0fb2d7fa679a09c /contrib/gnu-sort/lib/quote.c | |
download | FreeBSD-src-0ec16ad8f3387117932b28e20a6db5928a4fde52.zip FreeBSD-src-0ec16ad8f3387117932b28e20a6db5928a4fde52.tar.gz |
Virgin import (trimmed) of GNU Sort, textutils 2.0.21
Diffstat (limited to 'contrib/gnu-sort/lib/quote.c')
-rw-r--r-- | contrib/gnu-sort/lib/quote.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/gnu-sort/lib/quote.c b/contrib/gnu-sort/lib/quote.c new file mode 100644 index 0000000..0ce935c --- /dev/null +++ b/contrib/gnu-sort/lib/quote.c @@ -0,0 +1,28 @@ +/* Written by Paul Eggert <eggert@twinsun.com> */ + +#if HAVE_CONFIG_H +# include <config.h> +#endif + +#if HAVE_STDDEF_H +# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */ +#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); +} |