mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-27 02:34:17 +08:00
531 lines
25 KiB
HTML
531 lines
25 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.8"/>
|
|
<title>fuse: include/fuse_opt.h File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">fuse
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.8 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Data Structures</a> |
|
|
<a href="#define-members">Macros</a> |
|
|
<a href="#typedef-members">Typedefs</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">fuse_opt.h File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Data Structures</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html">fuse_opt</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__args.html">fuse_args</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
|
Macros</h2></td></tr>
|
|
<tr class="memitem:a371d830a8aedd9e3f96d9bb31876a8f1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a371d830a8aedd9e3f96d9bb31876a8f1">FUSE_OPT_KEY</a>(templ, key)   { templ, -1U, key }</td></tr>
|
|
<tr class="separator:a371d830a8aedd9e3f96d9bb31876a8f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aca35962e17d189ceb5447f8eea11bd33"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#aca35962e17d189ceb5447f8eea11bd33">FUSE_OPT_END</a>   { NULL, 0, 0 }</td></tr>
|
|
<tr class="separator:aca35962e17d189ceb5447f8eea11bd33"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9bea40fe56b18be9aa110185ab7387ed"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a9bea40fe56b18be9aa110185ab7387ed">FUSE_ARGS_INIT</a>(argc, argv)   { argc, argv, 0 }</td></tr>
|
|
<tr class="separator:a9bea40fe56b18be9aa110185ab7387ed"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a48cb1aea482de904a848651360117748"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a48cb1aea482de904a848651360117748">FUSE_OPT_KEY_OPT</a>   -1</td></tr>
|
|
<tr class="separator:a48cb1aea482de904a848651360117748"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a632b025441794a4e6fe59b7ab53bbfc4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a632b025441794a4e6fe59b7ab53bbfc4">FUSE_OPT_KEY_NONOPT</a>   -2</td></tr>
|
|
<tr class="separator:a632b025441794a4e6fe59b7ab53bbfc4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8533ff341f910c1bd05f10c8fcc35a04"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a8533ff341f910c1bd05f10c8fcc35a04">FUSE_OPT_KEY_KEEP</a>   -3</td></tr>
|
|
<tr class="separator:a8533ff341f910c1bd05f10c8fcc35a04"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6e97b6ce492f1baaaf0a4eb4970c9a2f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a6e97b6ce492f1baaaf0a4eb4970c9a2f">FUSE_OPT_KEY_DISCARD</a>   -4</td></tr>
|
|
<tr class="separator:a6e97b6ce492f1baaaf0a4eb4970c9a2f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
Typedefs</h2></td></tr>
|
|
<tr class="memitem:a975525ccd73368c818ef2e3e917aeb33"><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a975525ccd73368c818ef2e3e917aeb33">fuse_opt_proc_t</a> )(void *data, const char *arg, int key, struct <a class="el" href="structfuse__args.html">fuse_args</a> *outargs)</td></tr>
|
|
<tr class="separator:a975525ccd73368c818ef2e3e917aeb33"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:a539ef1f571c34f516c60c4cbe2901c0e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a539ef1f571c34f516c60c4cbe2901c0e">fuse_opt_parse</a> (struct <a class="el" href="structfuse__args.html">fuse_args</a> *args, void *data, const struct <a class="el" href="structfuse__opt.html">fuse_opt</a> opts[], <a class="el" href="fuse__opt_8h.html#a975525ccd73368c818ef2e3e917aeb33">fuse_opt_proc_t</a> proc)</td></tr>
|
|
<tr class="separator:a539ef1f571c34f516c60c4cbe2901c0e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aaae525d5e959c5394bc323be0c1d02b0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#aaae525d5e959c5394bc323be0c1d02b0">fuse_opt_add_opt</a> (char **opts, const char *opt)</td></tr>
|
|
<tr class="separator:aaae525d5e959c5394bc323be0c1d02b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a51a00d087d08bef250a53b9e4979b1cd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a51a00d087d08bef250a53b9e4979b1cd">fuse_opt_add_opt_escaped</a> (char **opts, const char *opt)</td></tr>
|
|
<tr class="separator:a51a00d087d08bef250a53b9e4979b1cd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a21602e6a0fff64fc9c7b642d12382094"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a21602e6a0fff64fc9c7b642d12382094">fuse_opt_add_arg</a> (struct <a class="el" href="structfuse__args.html">fuse_args</a> *args, const char *arg)</td></tr>
|
|
<tr class="separator:a21602e6a0fff64fc9c7b642d12382094"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adb2922444d67f58e4233d21320386bc0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#adb2922444d67f58e4233d21320386bc0">fuse_opt_insert_arg</a> (struct <a class="el" href="structfuse__args.html">fuse_args</a> *args, int pos, const char *arg)</td></tr>
|
|
<tr class="separator:adb2922444d67f58e4233d21320386bc0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2cdf272429ab3869a5162976141b287d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a2cdf272429ab3869a5162976141b287d">fuse_opt_free_args</a> (struct <a class="el" href="structfuse__args.html">fuse_args</a> *args)</td></tr>
|
|
<tr class="separator:a2cdf272429ab3869a5162976141b287d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af16c684bd2b10b7ac0ae299afa1e0e06"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#af16c684bd2b10b7ac0ae299afa1e0e06">fuse_opt_match</a> (const struct <a class="el" href="structfuse__opt.html">fuse_opt</a> opts[], const char *opt)</td></tr>
|
|
<tr class="separator:af16c684bd2b10b7ac0ae299afa1e0e06"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This file defines the option parsing interface of FUSE </p>
|
|
</div><h2 class="groupheader">Macro Definition Documentation</h2>
|
|
<a class="anchor" id="a9bea40fe56b18be9aa110185ab7387ed"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define FUSE_ARGS_INIT</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">argc, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">argv </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td>   { argc, argv, 0 }</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Initializer for 'struct <a class="el" href="structfuse__args.html">fuse_args</a>' </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aca35962e17d189ceb5447f8eea11bd33"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define FUSE_OPT_END   { NULL, 0, 0 }</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Last option. An array of 'struct <a class="el" href="structfuse__opt.html">fuse_opt</a>' must end with a NULL template value </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a371d830a8aedd9e3f96d9bb31876a8f1"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define FUSE_OPT_KEY</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">templ, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">key </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td>   { templ, -1U, key }</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Key option. In case of a match, the processing function will be called with the specified key. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6e97b6ce492f1baaaf0a4eb4970c9a2f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define FUSE_OPT_KEY_DISCARD   -4</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Special key value for options to discard</p>
|
|
<p>Argument is not passed to processing function, but behave as if the processing function returned zero </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8533ff341f910c1bd05f10c8fcc35a04"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define FUSE_OPT_KEY_KEEP   -3</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Special key value for options to keep</p>
|
|
<p>Argument is not passed to processing function, but behave as if the processing function returned 1 </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a632b025441794a4e6fe59b7ab53bbfc4"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define FUSE_OPT_KEY_NONOPT   -2</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Key value passed to the processing function for all non-options</p>
|
|
<p>Non-options are the arguments beginning with a character other than '-' or all arguments after the special '–' option </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a48cb1aea482de904a848651360117748"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define FUSE_OPT_KEY_OPT   -1</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Key value passed to the processing function if an option did not match any template </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Typedef Documentation</h2>
|
|
<a class="anchor" id="a975525ccd73368c818ef2e3e917aeb33"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef int(* fuse_opt_proc_t)(void *data, const char *arg, int key, struct <a class="el" href="structfuse__args.html">fuse_args</a> *outargs)</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Processing function</p>
|
|
<p>This function is called if</p><ul>
|
|
<li>option did not match any 'struct <a class="el" href="structfuse__opt.html">fuse_opt</a>'</li>
|
|
<li>argument is a non-option</li>
|
|
<li>option did match and offset was set to -1</li>
|
|
</ul>
|
|
<p>The 'arg' parameter will always contain the whole argument or option including the parameter if exists. A two-argument option ("-x foo") is always converted to single argument option of the form "-xfoo" before this function is called.</p>
|
|
<p>Options of the form '-ofoo' are passed to this function without the '-o' prefix.</p>
|
|
<p>The return value of this function determines whether this argument is to be inserted into the output argument vector, or discarded.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">data</td><td>is the user data passed to the <a class="el" href="fuse__opt_8h.html#a539ef1f571c34f516c60c4cbe2901c0e">fuse_opt_parse()</a> function </td></tr>
|
|
<tr><td class="paramname">arg</td><td>is the whole argument or option </td></tr>
|
|
<tr><td class="paramname">key</td><td>determines why the processing function was called </td></tr>
|
|
<tr><td class="paramname">outargs</td><td>the current output argument list </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>-1 on error, 0 if arg is to be discarded, 1 if arg should be kept </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a class="anchor" id="a21602e6a0fff64fc9c7b642d12382094"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int fuse_opt_add_arg </td>
|
|
<td>(</td>
|
|
<td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> * </td>
|
|
<td class="paramname"><em>args</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>arg</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Add an argument to a NULL terminated argument vector</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">args</td><td>is the structure containing the current argument list </td></tr>
|
|
<tr><td class="paramname">arg</td><td>is the new argument to add </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aaae525d5e959c5394bc323be0c1d02b0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int fuse_opt_add_opt </td>
|
|
<td>(</td>
|
|
<td class="paramtype">char ** </td>
|
|
<td class="paramname"><em>opts</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>opt</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Add an option to a comma separated option list</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">opts</td><td>is a pointer to an option list, may point to a NULL value </td></tr>
|
|
<tr><td class="paramname">opt</td><td>is the option to add </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a51a00d087d08bef250a53b9e4979b1cd"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int fuse_opt_add_opt_escaped </td>
|
|
<td>(</td>
|
|
<td class="paramtype">char ** </td>
|
|
<td class="paramname"><em>opts</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>opt</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Add an option, escaping commas, to a comma separated option list</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">opts</td><td>is a pointer to an option list, may point to a NULL value </td></tr>
|
|
<tr><td class="paramname">opt</td><td>is the option to add </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2cdf272429ab3869a5162976141b287d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fuse_opt_free_args </td>
|
|
<td>(</td>
|
|
<td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> * </td>
|
|
<td class="paramname"><em>args</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Free the contents of argument list</p>
|
|
<p>The structure itself is not freed</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">args</td><td>is the structure containing the argument list </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="adb2922444d67f58e4233d21320386bc0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int fuse_opt_insert_arg </td>
|
|
<td>(</td>
|
|
<td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> * </td>
|
|
<td class="paramname"><em>args</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>pos</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>arg</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Add an argument at the specified position in a NULL terminated argument vector</p>
|
|
<p>Adds the argument to the N-th position. This is useful for adding options at the beginning of the array which must not come after the special '–' option.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">args</td><td>is the structure containing the current argument list </td></tr>
|
|
<tr><td class="paramname">pos</td><td>is the position at which to add the argument </td></tr>
|
|
<tr><td class="paramname">arg</td><td>is the new argument to add </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af16c684bd2b10b7ac0ae299afa1e0e06"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int fuse_opt_match </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const struct <a class="el" href="structfuse__opt.html">fuse_opt</a> </td>
|
|
<td class="paramname"><em>opts</em>[], </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>opt</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Check if an option matches</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">opts</td><td>is the option description array </td></tr>
|
|
<tr><td class="paramname">opt</td><td>is the option to match </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>1 if a match is found, 0 if not </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a539ef1f571c34f516c60c4cbe2901c0e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int fuse_opt_parse </td>
|
|
<td>(</td>
|
|
<td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> * </td>
|
|
<td class="paramname"><em>args</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const struct <a class="el" href="structfuse__opt.html">fuse_opt</a> </td>
|
|
<td class="paramname"><em>opts</em>[], </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="fuse__opt_8h.html#a975525ccd73368c818ef2e3e917aeb33">fuse_opt_proc_t</a> </td>
|
|
<td class="paramname"><em>proc</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Option parsing function</p>
|
|
<p>If 'args' was returned from a previous call to <a class="el" href="fuse__opt_8h.html#a539ef1f571c34f516c60c4cbe2901c0e">fuse_opt_parse()</a> or it was constructed from</p>
|
|
<p>A NULL 'args' is equivalent to an empty argument vector</p>
|
|
<p>A NULL 'opts' is equivalent to an 'opts' array containing a single end marker</p>
|
|
<p>A NULL 'proc' is equivalent to a processing function always returning '1'</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">args</td><td>is the input and output argument list </td></tr>
|
|
<tr><td class="paramname">data</td><td>is the user data </td></tr>
|
|
<tr><td class="paramname">opts</td><td>is the option description array </td></tr>
|
|
<tr><td class="paramname">proc</td><td>is the processing function </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>-1 on error, 0 on success </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Sat Apr 23 2016 09:43:20 for fuse by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.8
|
|
</small></address>
|
|
</body>
|
|
</html>
|