1f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines/* quote.h - prototypes for quote.c
2f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
3f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   Copyright (C) 1998-2001, 2003, 2009-2012 Free Software Foundation, Inc.
4f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
5f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   This program is free software: you can redistribute it and/or modify
6f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   it under the terms of the GNU General Public License as published by
7f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   the Free Software Foundation; either version 3 of the License, or
8f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   (at your option) any later version.
9f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
10f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   This program is distributed in the hope that it will be useful,
11f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   but WITHOUT ANY WARRANTY; without even the implied warranty of
12f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   GNU General Public License for more details.
14f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
15f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   You should have received a copy of the GNU General Public License
16f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
18f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines#ifndef QUOTE_H_
19f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines# define QUOTE_H_ 1
20f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
21f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines# include <stddef.h>
22f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
23f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines/* The quoting options used by quote_n and quote.  Its type is incomplete,
24f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   so it's useful only in expressions like '&quote_quoting_options'.  */
25f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hinesextern struct quoting_options quote_quoting_options;
26f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
27f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines/* Return an unambiguous printable representation of ARG (of size
28f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   ARGSIZE), allocated in slot N, suitable for diagnostics.  If
29f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   ARGSIZE is SIZE_MAX, use the string length of the argument for
30f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   ARGSIZE.  */
31f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hineschar const *quote_n_mem (int n, char const *arg, size_t argsize);
32f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
33f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines/* Return an unambiguous printable representation of ARG (of size
34f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   ARGSIZE), suitable for diagnostics.  If ARGSIZE is SIZE_MAX, use
35f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   the string length of the argument for ARGSIZE.  */
36f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hineschar const *quote_mem (char const *arg, size_t argsize);
37f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines
38f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines/* Return an unambiguous printable representation of ARG, allocated in
39f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hines   slot N, suitable for diagnostics.  */
40f33f6de54db174aa679a4b6d1e040d37e95541c0Stephen Hineschar const *quote_n (int n, char const *arg);
41
42/* Return an unambiguous printable representation of ARG, suitable for
43   diagnostics.  */
44char const *quote (char const *arg);
45
46#endif /* !QUOTE_H_ */
47