gshell.h

Go to the documentation of this file.
00001 /* gshell.h - Shell-related utilities
00002  *
00003  *  Copyright 2000 Red Hat, Inc.
00004  * Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
00005  *
00006  * GLib is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public License as
00008  * published by the Free Software Foundation; either version 2 of the
00009  * License, or (at your option) any later version.
00010  *
00011  * GLib is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with GLib; see the file COPYING.LIB.  If not, write
00018  * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019  * Boston, MA 02111-1307, USA.
00020  */
00021 
00022 #ifndef __G_SHELL_H__
00023 #define __G_SHELL_H__
00024 
00025 #include <_ansi.h>
00026 #include <glib/gerror.h>
00027 
00028 G_BEGIN_DECLS
00029 
00030 #define G_SHELL_ERROR g_shell_error_quark ()
00031 
00032 typedef enum
00033 {
00034   /* mismatched or otherwise mangled quoting */
00035   G_SHELL_ERROR_BAD_QUOTING,
00036   /* string to be parsed was empty */
00037   G_SHELL_ERROR_EMPTY_STRING,
00038   G_SHELL_ERROR_FAILED
00039 } GShellError;
00040 
00041 IMPORT_C GQuark g_shell_error_quark (void);
00042 
00043 IMPORT_C gchar*   g_shell_quote      (const gchar   *unquoted_string);
00044 IMPORT_C gchar*   g_shell_unquote    (const gchar   *quoted_string,
00045                              GError       **error);
00046 IMPORT_C gboolean g_shell_parse_argv (const gchar   *command_line,
00047                              gint          *argcp,
00048                              gchar       ***argvp,
00049                              GError       **error);
00050 
00051 G_END_DECLS
00052 
00053 #endif /* __G_SHELL_H__ */
00054 
00055 

Copyright © Nokia Corporation 2001-2008
Back to top