2000-10-09 16:24:57 +00:00
|
|
|
/* gshell.h - Shell-related utilities
|
|
|
|
*
|
|
|
|
* Copyright 2000 Red Hat, Inc.
|
|
|
|
*
|
2022-05-18 09:15:38 +01:00
|
|
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
*
|
2016-12-27 19:14:03 +01:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2017-01-05 12:47:07 +01:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2000-10-09 16:24:57 +00:00
|
|
|
*
|
2016-12-27 19:14:03 +01:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2000-10-09 16:24:57 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
2016-12-27 19:14:03 +01:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this library; if not, see <http://www.gnu.org/licenses/>.
|
2000-10-09 16:24:57 +00:00
|
|
|
*/
|
|
|
|
|
2012-12-27 23:43:14 -05:00
|
|
|
#ifndef __G_SHELL_H__
|
|
|
|
#define __G_SHELL_H__
|
|
|
|
|
2011-10-12 00:24:46 -04:00
|
|
|
#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
2008-03-14 19:30:38 +00:00
|
|
|
#error "Only <glib.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2001-06-26 16:01:21 +00:00
|
|
|
#include <glib/gerror.h>
|
2000-10-09 16:24:57 +00:00
|
|
|
|
Split glib.h into many header files mostly according to the resp.
2000-10-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h, galloca.h, garray.h, gasyncqueue.h, gbacktrace.h,
gcache.h, gcompletion.h, gconvert.h, gdataset.h, gdate.h, ghash.h,
ghook.h, giochannel.h, glist.h , gmacros.h, gmain.h, gmem.h,
gmessages.h, gnode.h, gprimes.h, gquark.h, gqueue.h, grand.h,
grel.h, gscanner.h, gslist.h, gstrfuncs.h, gstring.h, gthread.h,
gthreadpool.h, gtimer.h, gtree.h, gtypes.h, gutils.h: Split glib.h
into many header files mostly according to the resp. *.c-files.
* gmacros.h: Added G_BEGIN_DECLS and G_END_DECLS to mean: 'in case
of C++: extern "C" { ... }' analogous to glibc __BEGIN_DECLS and
__END_DECLS.
* configure.in, gerror.h, gfileutils.h, gshell.h, gspawn.h,
gunicode.h, : Changed guard-macro names to something more
consistent.
* configure.in, *.h: Use G_BEGIN_DECLS and G_END_DECLS.
2000-10-12 11:52:07 +00:00
|
|
|
G_BEGIN_DECLS
|
2000-10-09 16:24:57 +00:00
|
|
|
|
|
|
|
#define G_SHELL_ERROR g_shell_error_quark ()
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
/* mismatched or otherwise mangled quoting */
|
|
|
|
G_SHELL_ERROR_BAD_QUOTING,
|
|
|
|
/* string to be parsed was empty */
|
|
|
|
G_SHELL_ERROR_EMPTY_STRING,
|
|
|
|
G_SHELL_ERROR_FAILED
|
|
|
|
} GShellError;
|
|
|
|
|
2012-12-06 14:04:59 -05:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-10-09 16:24:57 +00:00
|
|
|
GQuark g_shell_error_quark (void);
|
|
|
|
|
2012-12-06 14:04:59 -05:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-10-09 16:24:57 +00:00
|
|
|
gchar* g_shell_quote (const gchar *unquoted_string);
|
2012-12-06 14:04:59 -05:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-10-09 16:24:57 +00:00
|
|
|
gchar* g_shell_unquote (const gchar *quoted_string,
|
|
|
|
GError **error);
|
2012-12-06 14:04:59 -05:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-10-09 16:24:57 +00:00
|
|
|
gboolean g_shell_parse_argv (const gchar *command_line,
|
2000-11-05 16:38:16 +00:00
|
|
|
gint *argcp,
|
|
|
|
gchar ***argvp,
|
2000-10-09 16:24:57 +00:00
|
|
|
GError **error);
|
|
|
|
|
Split glib.h into many header files mostly according to the resp.
2000-10-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h, galloca.h, garray.h, gasyncqueue.h, gbacktrace.h,
gcache.h, gcompletion.h, gconvert.h, gdataset.h, gdate.h, ghash.h,
ghook.h, giochannel.h, glist.h , gmacros.h, gmain.h, gmem.h,
gmessages.h, gnode.h, gprimes.h, gquark.h, gqueue.h, grand.h,
grel.h, gscanner.h, gslist.h, gstrfuncs.h, gstring.h, gthread.h,
gthreadpool.h, gtimer.h, gtree.h, gtypes.h, gutils.h: Split glib.h
into many header files mostly according to the resp. *.c-files.
* gmacros.h: Added G_BEGIN_DECLS and G_END_DECLS to mean: 'in case
of C++: extern "C" { ... }' analogous to glibc __BEGIN_DECLS and
__END_DECLS.
* configure.in, gerror.h, gfileutils.h, gshell.h, gspawn.h,
gunicode.h, : Changed guard-macro names to something more
consistent.
* configure.in, *.h: Use G_BEGIN_DECLS and G_END_DECLS.
2000-10-12 11:52:07 +00:00
|
|
|
G_END_DECLS
|
2000-10-09 16:24:57 +00:00
|
|
|
|
Split glib.h into many header files mostly according to the resp.
2000-10-12 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h, galloca.h, garray.h, gasyncqueue.h, gbacktrace.h,
gcache.h, gcompletion.h, gconvert.h, gdataset.h, gdate.h, ghash.h,
ghook.h, giochannel.h, glist.h , gmacros.h, gmain.h, gmem.h,
gmessages.h, gnode.h, gprimes.h, gquark.h, gqueue.h, grand.h,
grel.h, gscanner.h, gslist.h, gstrfuncs.h, gstring.h, gthread.h,
gthreadpool.h, gtimer.h, gtree.h, gtypes.h, gutils.h: Split glib.h
into many header files mostly according to the resp. *.c-files.
* gmacros.h: Added G_BEGIN_DECLS and G_END_DECLS to mean: 'in case
of C++: extern "C" { ... }' analogous to glibc __BEGIN_DECLS and
__END_DECLS.
* configure.in, gerror.h, gfileutils.h, gshell.h, gspawn.h,
gunicode.h, : Changed guard-macro names to something more
consistent.
* configure.in, *.h: Use G_BEGIN_DECLS and G_END_DECLS.
2000-10-12 11:52:07 +00:00
|
|
|
#endif /* __G_SHELL_H__ */
|