<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Shell-related Utilities</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-Hostname-Utilities.html" title="Hostname Utilities">
<link rel="next" href="glib-Commandline-option-parser.html" title="Commandline option parser">
-<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
-<link rel="chapter" href="glib.html" title="GLib Overview">
-<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
-<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
-<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
-<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
-<link rel="chapter" href="tools.html" title="GLib Tools">
-<link rel="index" href="api-index-full.html" title="Index">
-<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
-<link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
-<link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
-<link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
-<link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
-<link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
-<link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
-<link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
-<link rel="index" href="api-index-2-16.html" title="Index of new symbols in 2.16">
-<link rel="index" href="api-index-2-18.html" title="Index of new symbols in 2.18">
-<link rel="index" href="api-index-2-20.html" title="Index of new symbols in 2.20">
-<link rel="index" href="api-index-2-22.html" title="Index of new symbols in 2.22">
-<link rel="index" href="api-index-2-24.html" title="Index of new symbols in 2.24">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<a href="#glib-Shell-related-Utilities.description" class="shortcut">Description</a>
</td></tr>
</table>
-<div class="refentry" title="Shell-related Utilities">
+<div class="refentry">
<a name="glib-Shell-related-Utilities"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
</td>
<td valign="top" align="right"></td>
</tr></table></div>
-<div class="refsynopsisdiv" title="Synopsis">
+<div class="refsynopsisdiv">
<a name="glib-Shell-related-Utilities.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <glib.h>
enum <a class="link" href="glib-Shell-related-Utilities.html#GShellError" title="enum GShellError">GShellError</a>;
#define <a class="link" href="glib-Shell-related-Utilities.html#G-SHELL-ERROR:CAPS" title="G_SHELL_ERROR">G_SHELL_ERROR</a>
-<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Shell-related-Utilities.html#g-shell-parse-argv" title="g_shell_parse_argv ()">g_shell_parse_argv</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *command_line,
- <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> *argcp,
- <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ***argvp,
- <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
-<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a>* <a class="link" href="glib-Shell-related-Utilities.html#g-shell-quote" title="g_shell_quote ()">g_shell_quote</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *unquoted_string);
-<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a>* <a class="link" href="glib-Shell-related-Utilities.html#g-shell-unquote" title="g_shell_unquote ()">g_shell_unquote</a> (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *quoted_string,
- <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
+<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Shell-related-Utilities.html#g-shell-parse-argv" title="g_shell_parse_argv ()">g_shell_parse_argv</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *command_line</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *argcp</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> ***argvp</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
+<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Shell-related-Utilities.html#g-shell-quote" title="g_shell_quote ()">g_shell_quote</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *unquoted_string</code></em>);
+<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Shell-related-Utilities.html#g-shell-unquote" title="g_shell_unquote ()">g_shell_unquote</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *quoted_string</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
</pre>
</div>
-<div class="refsect1" title="Description">
+<div class="refsect1">
<a name="glib-Shell-related-Utilities.description"></a><h2>Description</h2>
</div>
-<div class="refsect1" title="Details">
+<div class="refsect1">
<a name="glib-Shell-related-Utilities.details"></a><h2>Details</h2>
-<div class="refsect2" title="enum GShellError">
+<div class="refsect2">
<a name="GShellError"></a><h3>enum GShellError</h3>
-<pre class="programlisting">typedef enum
-{
+<pre class="programlisting">typedef enum {
/* mismatched or otherwise mangled quoting */
G_SHELL_ERROR_BAD_QUOTING,
/* string to be parsed was empty */
} GShellError;
</pre>
<p>
-Error codes returned by shell functions.</p>
+Error codes returned by shell functions.
+</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-SHELL-ERROR-BAD-QUOTING:CAPS"></a><span class="term"><code class="literal">G_SHELL_ERROR_BAD_QUOTING</code></span></p></td>
-<td> Mismatched or otherwise mangled quoting.
+<td>Mismatched or otherwise mangled quoting.
</td>
</tr>
<tr>
<td><p><a name="G-SHELL-ERROR-EMPTY-STRING:CAPS"></a><span class="term"><code class="literal">G_SHELL_ERROR_EMPTY_STRING</code></span></p></td>
-<td> String to be parsed was empty.
+<td>String to be parsed was empty.
</td>
</tr>
<tr>
<td><p><a name="G-SHELL-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">G_SHELL_ERROR_FAILED</code></span></p></td>
-<td> Some other error.
+<td>Some other error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
-<div class="refsect2" title="G_SHELL_ERROR">
+<div class="refsect2">
<a name="G-SHELL-ERROR:CAPS"></a><h3>G_SHELL_ERROR</h3>
<pre class="programlisting">#define G_SHELL_ERROR g_shell_error_quark ()
</pre>
<p>
Error domain for shell functions. Errors in this domain will be from
-the <a class="link" href="glib-Shell-related-Utilities.html#GShellError" title="enum GShellError"><span class="type">GShellError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> for information on error
-domains.</p>
+the <a class="link" href="glib-Shell-related-Utilities.html#GShellError" title="enum GShellError"><span class="type">GShellError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for information on error
+domains.
+</p>
</div>
<hr>
-<div class="refsect2" title="g_shell_parse_argv ()">
+<div class="refsect2">
<a name="g-shell-parse-argv"></a><h3>g_shell_parse_argv ()</h3>
-<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_shell_parse_argv (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *command_line,
- <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> *argcp,
- <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ***argvp,
- <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
+<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_shell_parse_argv (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *command_line</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *argcp</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> ***argvp</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
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
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 <a class="link" href="glib-Shell-related-Utilities.html#G-SHELL-ERROR:CAPS" title="G_SHELL_ERROR"><span class="type">G_SHELL_ERROR</span></a>
-domain. Free the returned vector with <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>.</p>
+domain. Free the returned vector with <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>.
+</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>command_line</code></em> :</span></p></td>
-<td> command line to parse
-</td>
+<td>command line to parse</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argcp</code></em> :</span></p></td>
-<td> return location for number of args
+<td>return location for number of args. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argvp</code></em> :</span></p></td>
-<td> return location for array of args
+<td>return location for array of args. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argcp zero-terminated=1]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
-<td> return location for error
-</td>
+<td>return location for error</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> on success, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if error set
-</td>
+<td>
+<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> on success, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if error set</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
-<div class="refsect2" title="g_shell_quote ()">
+<div class="refsect2">
<a name="g-shell-quote"></a><h3>g_shell_quote ()</h3>
-<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a>* g_shell_quote (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *unquoted_string);</pre>
+<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_shell_quote (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *unquoted_string</code></em>);</pre>
<p>
Quotes a string so that the shell (/bin/sh) will interpret the
quoted string to mean <em class="parameter"><code>unquoted_string</code></em>. If you pass a filename to
the shell, for example, you should first quote it with this
function. The return value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. The
quoting style used is undefined (single or double quotes may be
-used).</p>
+used).
+</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>unquoted_string</code></em> :</span></p></td>
-<td> a literal string
-</td>
+<td>a literal string</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td> quoted string
-</td>
+<td>quoted string</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
-<div class="refsect2" title="g_shell_unquote ()">
+<div class="refsect2">
<a name="g-shell-unquote"></a><h3>g_shell_unquote ()</h3>
-<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a>* g_shell_unquote (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *quoted_string,
- <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
+<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_shell_unquote (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *quoted_string</code></em>,
+ <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Unquotes a string as the shell (/bin/sh) would. Only handles
quotes; if a string contains file globs, arithmetic operators,
\' - if you want a ' in the quoted text, you have to do something
like 'foo'\''bar'. Double quotes allow $, `, ", \, and newline to
be escaped with backslash. Otherwise double quotes preserve things
-literally.</p>
+literally.
+</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>quoted_string</code></em> :</span></p></td>
-<td> shell-quoted string
-</td>
+<td>shell-quoted string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
-<td> error return location or NULL
-</td>
+<td>error return location or NULL</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
-<td> an unquoted string
-</td>
+<td>an unquoted string</td>
</tr>
</tbody>
</table></div>
</div>
<div class="footer">
<hr>
- Generated by GTK-Doc V1.13</div>
+ Generated by GTK-Doc V1.18</div>
</body>
</html>
\ No newline at end of file