summaryrefslogtreecommitdiff
path: root/lib/quote.c
blob: fd1b57e924a3129bb0a28654eab656cad9d3755a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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);
}