Thursday, December 4, 2008

Shell-related Utilities

Shell-related Utilities: "g_shell_parse_argv ()

gboolean g_shell_parse_argv (const gchar *command_line,
gint *argcp,
gchar ***argvp,
GError **error);

Parses a command line into an argument vector, in much the same way the shell would, but without many of the expansions the shell would perform (variable expansion, globs, operators, filename expansion, etc. are not supported). The results are defined to be the same as those you would get from a UNIX98 /bin/sh, as long as the input contains none of the unsupported shell expansions. If the input does contain such expansions, they are passed through literally. Possible errors are those from the G_SHELL_ERROR domain. Free the returned vector with g_strfreev().

command_line : command line to parse
argcp : return location for number of args
argvp : return location for array of args
error : return location for error
Returns : TRUE on success, FALSE if error set"

No comments:

Post a Comment

發表一下意見,互動一下唄!

LinkWithin

Related Posts Plugin for WordPress, Blogger...

Adventure Book 2.0 Headline Animator

GoogleAd

funP Android 相關文章