195b7b453SJohn Marino /* quote.h - prototypes for quote.c 295b7b453SJohn Marino 3*09d4459fSDaniel Fojt Copyright (C) 1998-2001, 2003, 2009-2020 Free Software Foundation, Inc. 495b7b453SJohn Marino 595b7b453SJohn Marino This program is free software: you can redistribute it and/or modify 695b7b453SJohn Marino it under the terms of the GNU General Public License as published by 795b7b453SJohn Marino the Free Software Foundation; either version 3 of the License, or 895b7b453SJohn Marino (at your option) any later version. 995b7b453SJohn Marino 1095b7b453SJohn Marino This program is distributed in the hope that it will be useful, 1195b7b453SJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of 1295b7b453SJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1395b7b453SJohn Marino GNU General Public License for more details. 1495b7b453SJohn Marino 1595b7b453SJohn Marino You should have received a copy of the GNU General Public License 16*09d4459fSDaniel Fojt along with this program. If not, see <https://www.gnu.org/licenses/>. */ 1795b7b453SJohn Marino 18cf28ed85SJohn Marino #ifndef QUOTE_H_ 19cf28ed85SJohn Marino # define QUOTE_H_ 1 2095b7b453SJohn Marino 21680a9cb8SJohn Marino # include <stddef.h> 22680a9cb8SJohn Marino 23cf28ed85SJohn Marino /* The quoting options used by quote_n and quote. Its type is incomplete, 24cf28ed85SJohn Marino so it's useful only in expressions like '"e_quoting_options'. */ 25cf28ed85SJohn Marino extern struct quoting_options quote_quoting_options; 26cf28ed85SJohn Marino 27680a9cb8SJohn Marino /* Return an unambiguous printable representation of ARG (of size 28680a9cb8SJohn Marino ARGSIZE), allocated in slot N, suitable for diagnostics. If 29680a9cb8SJohn Marino ARGSIZE is SIZE_MAX, use the string length of the argument for 30680a9cb8SJohn Marino ARGSIZE. */ 31680a9cb8SJohn Marino char const *quote_n_mem (int n, char const *arg, size_t argsize); 32cf28ed85SJohn Marino 33680a9cb8SJohn Marino /* Return an unambiguous printable representation of ARG (of size 34680a9cb8SJohn Marino ARGSIZE), suitable for diagnostics. If ARGSIZE is SIZE_MAX, use 35680a9cb8SJohn Marino the string length of the argument for ARGSIZE. */ 36680a9cb8SJohn Marino char const *quote_mem (char const *arg, size_t argsize); 37680a9cb8SJohn Marino 38680a9cb8SJohn Marino /* Return an unambiguous printable representation of ARG, allocated in 39680a9cb8SJohn Marino slot N, suitable for diagnostics. */ 40680a9cb8SJohn Marino char const *quote_n (int n, char const *arg); 41680a9cb8SJohn Marino 42680a9cb8SJohn Marino /* Return an unambiguous printable representation of ARG, suitable for 43680a9cb8SJohn Marino diagnostics. */ 44680a9cb8SJohn Marino char const *quote (char const *arg); 45cf28ed85SJohn Marino 46cf28ed85SJohn Marino #endif /* !QUOTE_H_ */ 47