Blame lib/sh-quote.h

Packit Service fdd496
/* Shell quoting.
Packit Service fdd496
   Copyright (C) 2001-2002, 2004, 2009-2017 Free Software Foundation, Inc.
Packit Service fdd496
   Written by Bruno Haible <haible@clisp.cons.org>, 2001.
Packit Service fdd496
Packit Service fdd496
   This program is free software: you can redistribute it and/or modify
Packit Service fdd496
   it under the terms of the GNU General Public License as published by
Packit Service fdd496
   the Free Software Foundation; either version 3 of the License, or
Packit Service fdd496
   (at your option) any later version.
Packit Service fdd496
Packit Service fdd496
   This program is distributed in the hope that it will be useful,
Packit Service fdd496
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service fdd496
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service fdd496
   GNU General Public License for more details.
Packit Service fdd496
Packit Service fdd496
   You should have received a copy of the GNU General Public License
Packit Service fdd496
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit Service fdd496
Packit Service fdd496
#ifndef _SH_QUOTE_H
Packit Service fdd496
#define _SH_QUOTE_H
Packit Service fdd496
Packit Service fdd496
/* When passing a command to a shell, we must quote the program name and
Packit Service fdd496
   arguments, since Unix shells interpret characters like " ", "'", "<", ">",
Packit Service fdd496
   "$", '*', '?' etc. in a special way.  */
Packit Service fdd496
Packit Service fdd496
#include <stddef.h>
Packit Service fdd496
Packit Service fdd496
#ifdef __cplusplus
Packit Service fdd496
extern "C" {
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
/* Returns the number of bytes needed for the quoted string.  */
Packit Service fdd496
extern size_t shell_quote_length (const char *string);
Packit Service fdd496
Packit Service fdd496
/* Copies the quoted string to p and returns the incremented p.
Packit Service fdd496
   There must be room for shell_quote_length (string) + 1 bytes at p.  */
Packit Service fdd496
extern char * shell_quote_copy (char *p, const char *string);
Packit Service fdd496
Packit Service fdd496
/* Returns the freshly allocated quoted string.  */
Packit Service fdd496
extern char * shell_quote (const char *string);
Packit Service fdd496
Packit Service fdd496
/* Returns a freshly allocated string containing all argument strings, quoted,
Packit Service fdd496
   separated through spaces.  */
Packit Service fdd496
extern char * shell_quote_argv (char * const *argv);
Packit Service fdd496
Packit Service fdd496
#ifdef __cplusplus
Packit Service fdd496
}
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#endif /* _SH_QUOTE_H */