1 gshell.h |
1 /* gshell.h - Shell-related utilities |
|
2 * |
|
3 * Copyright 2000 Red Hat, Inc. |
|
4 * Portions copyright (c) 2006 Nokia Corporation. All rights reserved. |
|
5 * |
|
6 * GLib is free software; you can redistribute it and/or |
|
7 * modify it under the terms of the GNU Lesser General Public License as |
|
8 * published by the Free Software Foundation; either version 2 of the |
|
9 * License, or (at your option) any later version. |
|
10 * |
|
11 * GLib is distributed in the hope that it will be useful, |
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 * Lesser General Public License for more details. |
|
15 * |
|
16 * You should have received a copy of the GNU Lesser General Public |
|
17 * License along with GLib; see the file COPYING.LIB. If not, write |
|
18 * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
19 * Boston, MA 02111-1307, USA. |
|
20 */ |
|
21 |
|
22 #ifndef __G_SHELL_H__ |
|
23 #define __G_SHELL_H__ |
|
24 |
|
25 #include <_ansi.h> |
|
26 #include <glib/gerror.h> |
|
27 |
|
28 G_BEGIN_DECLS |
|
29 |
|
30 #define G_SHELL_ERROR g_shell_error_quark () |
|
31 |
|
32 typedef enum |
|
33 { |
|
34 /* mismatched or otherwise mangled quoting */ |
|
35 G_SHELL_ERROR_BAD_QUOTING, |
|
36 /* string to be parsed was empty */ |
|
37 G_SHELL_ERROR_EMPTY_STRING, |
|
38 G_SHELL_ERROR_FAILED |
|
39 } GShellError; |
|
40 |
|
41 IMPORT_C GQuark g_shell_error_quark (void); |
|
42 |
|
43 IMPORT_C gchar* g_shell_quote (const gchar *unquoted_string); |
|
44 IMPORT_C gchar* g_shell_unquote (const gchar *quoted_string, |
|
45 GError **error); |
|
46 IMPORT_C gboolean g_shell_parse_argv (const gchar *command_line, |
|
47 gint *argcp, |
|
48 gchar ***argvp, |
|
49 GError **error); |
|
50 |
|
51 G_END_DECLS |
|
52 |
|
53 #endif /* __G_SHELL_H__ */ |
|
54 |
|
55 |