You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

530 lines
25 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.8"/>
  7. <title>fuse: include/fuse_opt.h File Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body>
  14. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  15. <div id="titlearea">
  16. <table cellspacing="0" cellpadding="0">
  17. <tbody>
  18. <tr style="height: 56px;">
  19. <td style="padding-left: 0.5em;">
  20. <div id="projectname">fuse
  21. </div>
  22. </td>
  23. </tr>
  24. </tbody>
  25. </table>
  26. </div>
  27. <!-- end header part -->
  28. <!-- Generated by Doxygen 1.8.8 -->
  29. <div id="navrow1" class="tabs">
  30. <ul class="tablist">
  31. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  32. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  33. <li class="current"><a href="files.html"><span>Files</span></a></li>
  34. </ul>
  35. </div>
  36. <div id="navrow2" class="tabs2">
  37. <ul class="tablist">
  38. <li><a href="files.html"><span>File&#160;List</span></a></li>
  39. <li><a href="globals.html"><span>Globals</span></a></li>
  40. </ul>
  41. </div>
  42. <div id="nav-path" class="navpath">
  43. <ul>
  44. <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
  45. </div>
  46. </div><!-- top -->
  47. <div class="header">
  48. <div class="summary">
  49. <a href="#nested-classes">Data Structures</a> &#124;
  50. <a href="#define-members">Macros</a> &#124;
  51. <a href="#typedef-members">Typedefs</a> &#124;
  52. <a href="#func-members">Functions</a> </div>
  53. <div class="headertitle">
  54. <div class="title">fuse_opt.h File Reference</div> </div>
  55. </div><!--header-->
  56. <div class="contents">
  57. <table class="memberdecls">
  58. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  59. Data Structures</h2></td></tr>
  60. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html">fuse_opt</a></td></tr>
  61. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  62. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__args.html">fuse_args</a></td></tr>
  63. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  64. </table><table class="memberdecls">
  65. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  66. Macros</h2></td></tr>
  67. <tr class="memitem:a371d830a8aedd9e3f96d9bb31876a8f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a371d830a8aedd9e3f96d9bb31876a8f1">FUSE_OPT_KEY</a>(templ, key)&#160;&#160;&#160;{ templ, -1U, key }</td></tr>
  68. <tr class="separator:a371d830a8aedd9e3f96d9bb31876a8f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  69. <tr class="memitem:aca35962e17d189ceb5447f8eea11bd33"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#aca35962e17d189ceb5447f8eea11bd33">FUSE_OPT_END</a>&#160;&#160;&#160;{ NULL, 0, 0 }</td></tr>
  70. <tr class="separator:aca35962e17d189ceb5447f8eea11bd33"><td class="memSeparator" colspan="2">&#160;</td></tr>
  71. <tr class="memitem:a9bea40fe56b18be9aa110185ab7387ed"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a9bea40fe56b18be9aa110185ab7387ed">FUSE_ARGS_INIT</a>(argc, argv)&#160;&#160;&#160;{ argc, argv, 0 }</td></tr>
  72. <tr class="separator:a9bea40fe56b18be9aa110185ab7387ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
  73. <tr class="memitem:a48cb1aea482de904a848651360117748"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a48cb1aea482de904a848651360117748">FUSE_OPT_KEY_OPT</a>&#160;&#160;&#160;-1</td></tr>
  74. <tr class="separator:a48cb1aea482de904a848651360117748"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <tr class="memitem:a632b025441794a4e6fe59b7ab53bbfc4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a632b025441794a4e6fe59b7ab53bbfc4">FUSE_OPT_KEY_NONOPT</a>&#160;&#160;&#160;-2</td></tr>
  76. <tr class="separator:a632b025441794a4e6fe59b7ab53bbfc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:a8533ff341f910c1bd05f10c8fcc35a04"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a8533ff341f910c1bd05f10c8fcc35a04">FUSE_OPT_KEY_KEEP</a>&#160;&#160;&#160;-3</td></tr>
  78. <tr class="separator:a8533ff341f910c1bd05f10c8fcc35a04"><td class="memSeparator" colspan="2">&#160;</td></tr>
  79. <tr class="memitem:a6e97b6ce492f1baaaf0a4eb4970c9a2f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fuse__opt_8h.html#a6e97b6ce492f1baaaf0a4eb4970c9a2f">FUSE_OPT_KEY_DISCARD</a>&#160;&#160;&#160;-4</td></tr>
  80. <tr class="separator:a6e97b6ce492f1baaaf0a4eb4970c9a2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. </table><table class="memberdecls">
  82. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  83. Typedefs</h2></td></tr>
  84. <tr class="memitem:a975525ccd73368c818ef2e3e917aeb33"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</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>
  85. <tr class="separator:a975525ccd73368c818ef2e3e917aeb33"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. </table><table class="memberdecls">
  87. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  88. Functions</h2></td></tr>
  89. <tr class="memitem:a539ef1f571c34f516c60c4cbe2901c0e"><td class="memItemLeft" align="right" valign="top">int&#160;</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>
  90. <tr class="separator:a539ef1f571c34f516c60c4cbe2901c0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:aaae525d5e959c5394bc323be0c1d02b0"><td class="memItemLeft" align="right" valign="top">int&#160;</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>
  92. <tr class="separator:aaae525d5e959c5394bc323be0c1d02b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:a51a00d087d08bef250a53b9e4979b1cd"><td class="memItemLeft" align="right" valign="top">int&#160;</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>
  94. <tr class="separator:a51a00d087d08bef250a53b9e4979b1cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:a21602e6a0fff64fc9c7b642d12382094"><td class="memItemLeft" align="right" valign="top">int&#160;</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>
  96. <tr class="separator:a21602e6a0fff64fc9c7b642d12382094"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:adb2922444d67f58e4233d21320386bc0"><td class="memItemLeft" align="right" valign="top">int&#160;</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>
  98. <tr class="separator:adb2922444d67f58e4233d21320386bc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:a2cdf272429ab3869a5162976141b287d"><td class="memItemLeft" align="right" valign="top">void&#160;</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>
  100. <tr class="separator:a2cdf272429ab3869a5162976141b287d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:af16c684bd2b10b7ac0ae299afa1e0e06"><td class="memItemLeft" align="right" valign="top">int&#160;</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>
  102. <tr class="separator:af16c684bd2b10b7ac0ae299afa1e0e06"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. </table>
  104. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  105. <div class="textblock"><p>This file defines the option parsing interface of FUSE </p>
  106. </div><h2 class="groupheader">Macro Definition Documentation</h2>
  107. <a class="anchor" id="a9bea40fe56b18be9aa110185ab7387ed"></a>
  108. <div class="memitem">
  109. <div class="memproto">
  110. <table class="memname">
  111. <tr>
  112. <td class="memname">#define FUSE_ARGS_INIT</td>
  113. <td>(</td>
  114. <td class="paramtype">&#160;</td>
  115. <td class="paramname">argc, </td>
  116. </tr>
  117. <tr>
  118. <td class="paramkey"></td>
  119. <td></td>
  120. <td class="paramtype">&#160;</td>
  121. <td class="paramname">argv&#160;</td>
  122. </tr>
  123. <tr>
  124. <td></td>
  125. <td>)</td>
  126. <td></td><td>&#160;&#160;&#160;{ argc, argv, 0 }</td>
  127. </tr>
  128. </table>
  129. </div><div class="memdoc">
  130. <p>Initializer for 'struct <a class="el" href="structfuse__args.html">fuse_args</a>' </p>
  131. </div>
  132. </div>
  133. <a class="anchor" id="aca35962e17d189ceb5447f8eea11bd33"></a>
  134. <div class="memitem">
  135. <div class="memproto">
  136. <table class="memname">
  137. <tr>
  138. <td class="memname">#define FUSE_OPT_END&#160;&#160;&#160;{ NULL, 0, 0 }</td>
  139. </tr>
  140. </table>
  141. </div><div class="memdoc">
  142. <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>
  143. </div>
  144. </div>
  145. <a class="anchor" id="a371d830a8aedd9e3f96d9bb31876a8f1"></a>
  146. <div class="memitem">
  147. <div class="memproto">
  148. <table class="memname">
  149. <tr>
  150. <td class="memname">#define FUSE_OPT_KEY</td>
  151. <td>(</td>
  152. <td class="paramtype">&#160;</td>
  153. <td class="paramname">templ, </td>
  154. </tr>
  155. <tr>
  156. <td class="paramkey"></td>
  157. <td></td>
  158. <td class="paramtype">&#160;</td>
  159. <td class="paramname">key&#160;</td>
  160. </tr>
  161. <tr>
  162. <td></td>
  163. <td>)</td>
  164. <td></td><td>&#160;&#160;&#160;{ templ, -1U, key }</td>
  165. </tr>
  166. </table>
  167. </div><div class="memdoc">
  168. <p>Key option. In case of a match, the processing function will be called with the specified key. </p>
  169. </div>
  170. </div>
  171. <a class="anchor" id="a6e97b6ce492f1baaaf0a4eb4970c9a2f"></a>
  172. <div class="memitem">
  173. <div class="memproto">
  174. <table class="memname">
  175. <tr>
  176. <td class="memname">#define FUSE_OPT_KEY_DISCARD&#160;&#160;&#160;-4</td>
  177. </tr>
  178. </table>
  179. </div><div class="memdoc">
  180. <p>Special key value for options to discard</p>
  181. <p>Argument is not passed to processing function, but behave as if the processing function returned zero </p>
  182. </div>
  183. </div>
  184. <a class="anchor" id="a8533ff341f910c1bd05f10c8fcc35a04"></a>
  185. <div class="memitem">
  186. <div class="memproto">
  187. <table class="memname">
  188. <tr>
  189. <td class="memname">#define FUSE_OPT_KEY_KEEP&#160;&#160;&#160;-3</td>
  190. </tr>
  191. </table>
  192. </div><div class="memdoc">
  193. <p>Special key value for options to keep</p>
  194. <p>Argument is not passed to processing function, but behave as if the processing function returned 1 </p>
  195. </div>
  196. </div>
  197. <a class="anchor" id="a632b025441794a4e6fe59b7ab53bbfc4"></a>
  198. <div class="memitem">
  199. <div class="memproto">
  200. <table class="memname">
  201. <tr>
  202. <td class="memname">#define FUSE_OPT_KEY_NONOPT&#160;&#160;&#160;-2</td>
  203. </tr>
  204. </table>
  205. </div><div class="memdoc">
  206. <p>Key value passed to the processing function for all non-options</p>
  207. <p>Non-options are the arguments beginning with a character other than '-' or all arguments after the special '&ndash;' option </p>
  208. </div>
  209. </div>
  210. <a class="anchor" id="a48cb1aea482de904a848651360117748"></a>
  211. <div class="memitem">
  212. <div class="memproto">
  213. <table class="memname">
  214. <tr>
  215. <td class="memname">#define FUSE_OPT_KEY_OPT&#160;&#160;&#160;-1</td>
  216. </tr>
  217. </table>
  218. </div><div class="memdoc">
  219. <p>Key value passed to the processing function if an option did not match any template </p>
  220. </div>
  221. </div>
  222. <h2 class="groupheader">Typedef Documentation</h2>
  223. <a class="anchor" id="a975525ccd73368c818ef2e3e917aeb33"></a>
  224. <div class="memitem">
  225. <div class="memproto">
  226. <table class="memname">
  227. <tr>
  228. <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>
  229. </tr>
  230. </table>
  231. </div><div class="memdoc">
  232. <p>Processing function</p>
  233. <p>This function is called if</p><ul>
  234. <li>option did not match any 'struct <a class="el" href="structfuse__opt.html">fuse_opt</a>'</li>
  235. <li>argument is a non-option</li>
  236. <li>option did match and offset was set to -1</li>
  237. </ul>
  238. <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>
  239. <p>Options of the form '-ofoo' are passed to this function without the '-o' prefix.</p>
  240. <p>The return value of this function determines whether this argument is to be inserted into the output argument vector, or discarded.</p>
  241. <dl class="params"><dt>Parameters</dt><dd>
  242. <table class="params">
  243. <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>
  244. <tr><td class="paramname">arg</td><td>is the whole argument or option </td></tr>
  245. <tr><td class="paramname">key</td><td>determines why the processing function was called </td></tr>
  246. <tr><td class="paramname">outargs</td><td>the current output argument list </td></tr>
  247. </table>
  248. </dd>
  249. </dl>
  250. <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>
  251. </div>
  252. </div>
  253. <h2 class="groupheader">Function Documentation</h2>
  254. <a class="anchor" id="a21602e6a0fff64fc9c7b642d12382094"></a>
  255. <div class="memitem">
  256. <div class="memproto">
  257. <table class="memname">
  258. <tr>
  259. <td class="memname">int fuse_opt_add_arg </td>
  260. <td>(</td>
  261. <td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> *&#160;</td>
  262. <td class="paramname"><em>args</em>, </td>
  263. </tr>
  264. <tr>
  265. <td class="paramkey"></td>
  266. <td></td>
  267. <td class="paramtype">const char *&#160;</td>
  268. <td class="paramname"><em>arg</em>&#160;</td>
  269. </tr>
  270. <tr>
  271. <td></td>
  272. <td>)</td>
  273. <td></td><td></td>
  274. </tr>
  275. </table>
  276. </div><div class="memdoc">
  277. <p>Add an argument to a NULL terminated argument vector</p>
  278. <dl class="params"><dt>Parameters</dt><dd>
  279. <table class="params">
  280. <tr><td class="paramname">args</td><td>is the structure containing the current argument list </td></tr>
  281. <tr><td class="paramname">arg</td><td>is the new argument to add </td></tr>
  282. </table>
  283. </dd>
  284. </dl>
  285. <dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
  286. </div>
  287. </div>
  288. <a class="anchor" id="aaae525d5e959c5394bc323be0c1d02b0"></a>
  289. <div class="memitem">
  290. <div class="memproto">
  291. <table class="memname">
  292. <tr>
  293. <td class="memname">int fuse_opt_add_opt </td>
  294. <td>(</td>
  295. <td class="paramtype">char **&#160;</td>
  296. <td class="paramname"><em>opts</em>, </td>
  297. </tr>
  298. <tr>
  299. <td class="paramkey"></td>
  300. <td></td>
  301. <td class="paramtype">const char *&#160;</td>
  302. <td class="paramname"><em>opt</em>&#160;</td>
  303. </tr>
  304. <tr>
  305. <td></td>
  306. <td>)</td>
  307. <td></td><td></td>
  308. </tr>
  309. </table>
  310. </div><div class="memdoc">
  311. <p>Add an option to a comma separated option list</p>
  312. <dl class="params"><dt>Parameters</dt><dd>
  313. <table class="params">
  314. <tr><td class="paramname">opts</td><td>is a pointer to an option list, may point to a NULL value </td></tr>
  315. <tr><td class="paramname">opt</td><td>is the option to add </td></tr>
  316. </table>
  317. </dd>
  318. </dl>
  319. <dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
  320. </div>
  321. </div>
  322. <a class="anchor" id="a51a00d087d08bef250a53b9e4979b1cd"></a>
  323. <div class="memitem">
  324. <div class="memproto">
  325. <table class="memname">
  326. <tr>
  327. <td class="memname">int fuse_opt_add_opt_escaped </td>
  328. <td>(</td>
  329. <td class="paramtype">char **&#160;</td>
  330. <td class="paramname"><em>opts</em>, </td>
  331. </tr>
  332. <tr>
  333. <td class="paramkey"></td>
  334. <td></td>
  335. <td class="paramtype">const char *&#160;</td>
  336. <td class="paramname"><em>opt</em>&#160;</td>
  337. </tr>
  338. <tr>
  339. <td></td>
  340. <td>)</td>
  341. <td></td><td></td>
  342. </tr>
  343. </table>
  344. </div><div class="memdoc">
  345. <p>Add an option, escaping commas, to a comma separated option list</p>
  346. <dl class="params"><dt>Parameters</dt><dd>
  347. <table class="params">
  348. <tr><td class="paramname">opts</td><td>is a pointer to an option list, may point to a NULL value </td></tr>
  349. <tr><td class="paramname">opt</td><td>is the option to add </td></tr>
  350. </table>
  351. </dd>
  352. </dl>
  353. <dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
  354. </div>
  355. </div>
  356. <a class="anchor" id="a2cdf272429ab3869a5162976141b287d"></a>
  357. <div class="memitem">
  358. <div class="memproto">
  359. <table class="memname">
  360. <tr>
  361. <td class="memname">void fuse_opt_free_args </td>
  362. <td>(</td>
  363. <td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> *&#160;</td>
  364. <td class="paramname"><em>args</em></td><td>)</td>
  365. <td></td>
  366. </tr>
  367. </table>
  368. </div><div class="memdoc">
  369. <p>Free the contents of argument list</p>
  370. <p>The structure itself is not freed</p>
  371. <dl class="params"><dt>Parameters</dt><dd>
  372. <table class="params">
  373. <tr><td class="paramname">args</td><td>is the structure containing the argument list </td></tr>
  374. </table>
  375. </dd>
  376. </dl>
  377. </div>
  378. </div>
  379. <a class="anchor" id="adb2922444d67f58e4233d21320386bc0"></a>
  380. <div class="memitem">
  381. <div class="memproto">
  382. <table class="memname">
  383. <tr>
  384. <td class="memname">int fuse_opt_insert_arg </td>
  385. <td>(</td>
  386. <td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> *&#160;</td>
  387. <td class="paramname"><em>args</em>, </td>
  388. </tr>
  389. <tr>
  390. <td class="paramkey"></td>
  391. <td></td>
  392. <td class="paramtype">int&#160;</td>
  393. <td class="paramname"><em>pos</em>, </td>
  394. </tr>
  395. <tr>
  396. <td class="paramkey"></td>
  397. <td></td>
  398. <td class="paramtype">const char *&#160;</td>
  399. <td class="paramname"><em>arg</em>&#160;</td>
  400. </tr>
  401. <tr>
  402. <td></td>
  403. <td>)</td>
  404. <td></td><td></td>
  405. </tr>
  406. </table>
  407. </div><div class="memdoc">
  408. <p>Add an argument at the specified position in a NULL terminated argument vector</p>
  409. <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 '&ndash;' option.</p>
  410. <dl class="params"><dt>Parameters</dt><dd>
  411. <table class="params">
  412. <tr><td class="paramname">args</td><td>is the structure containing the current argument list </td></tr>
  413. <tr><td class="paramname">pos</td><td>is the position at which to add the argument </td></tr>
  414. <tr><td class="paramname">arg</td><td>is the new argument to add </td></tr>
  415. </table>
  416. </dd>
  417. </dl>
  418. <dl class="section return"><dt>Returns</dt><dd>-1 on allocation error, 0 on success </dd></dl>
  419. </div>
  420. </div>
  421. <a class="anchor" id="af16c684bd2b10b7ac0ae299afa1e0e06"></a>
  422. <div class="memitem">
  423. <div class="memproto">
  424. <table class="memname">
  425. <tr>
  426. <td class="memname">int fuse_opt_match </td>
  427. <td>(</td>
  428. <td class="paramtype">const struct <a class="el" href="structfuse__opt.html">fuse_opt</a>&#160;</td>
  429. <td class="paramname"><em>opts</em>[], </td>
  430. </tr>
  431. <tr>
  432. <td class="paramkey"></td>
  433. <td></td>
  434. <td class="paramtype">const char *&#160;</td>
  435. <td class="paramname"><em>opt</em>&#160;</td>
  436. </tr>
  437. <tr>
  438. <td></td>
  439. <td>)</td>
  440. <td></td><td></td>
  441. </tr>
  442. </table>
  443. </div><div class="memdoc">
  444. <p>Check if an option matches</p>
  445. <dl class="params"><dt>Parameters</dt><dd>
  446. <table class="params">
  447. <tr><td class="paramname">opts</td><td>is the option description array </td></tr>
  448. <tr><td class="paramname">opt</td><td>is the option to match </td></tr>
  449. </table>
  450. </dd>
  451. </dl>
  452. <dl class="section return"><dt>Returns</dt><dd>1 if a match is found, 0 if not </dd></dl>
  453. </div>
  454. </div>
  455. <a class="anchor" id="a539ef1f571c34f516c60c4cbe2901c0e"></a>
  456. <div class="memitem">
  457. <div class="memproto">
  458. <table class="memname">
  459. <tr>
  460. <td class="memname">int fuse_opt_parse </td>
  461. <td>(</td>
  462. <td class="paramtype">struct <a class="el" href="structfuse__args.html">fuse_args</a> *&#160;</td>
  463. <td class="paramname"><em>args</em>, </td>
  464. </tr>
  465. <tr>
  466. <td class="paramkey"></td>
  467. <td></td>
  468. <td class="paramtype">void *&#160;</td>
  469. <td class="paramname"><em>data</em>, </td>
  470. </tr>
  471. <tr>
  472. <td class="paramkey"></td>
  473. <td></td>
  474. <td class="paramtype">const struct <a class="el" href="structfuse__opt.html">fuse_opt</a>&#160;</td>
  475. <td class="paramname"><em>opts</em>[], </td>
  476. </tr>
  477. <tr>
  478. <td class="paramkey"></td>
  479. <td></td>
  480. <td class="paramtype"><a class="el" href="fuse__opt_8h.html#a975525ccd73368c818ef2e3e917aeb33">fuse_opt_proc_t</a>&#160;</td>
  481. <td class="paramname"><em>proc</em>&#160;</td>
  482. </tr>
  483. <tr>
  484. <td></td>
  485. <td>)</td>
  486. <td></td><td></td>
  487. </tr>
  488. </table>
  489. </div><div class="memdoc">
  490. <p>Option parsing function</p>
  491. <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>
  492. <p>A NULL 'args' is equivalent to an empty argument vector</p>
  493. <p>A NULL 'opts' is equivalent to an 'opts' array containing a single end marker</p>
  494. <p>A NULL 'proc' is equivalent to a processing function always returning '1'</p>
  495. <dl class="params"><dt>Parameters</dt><dd>
  496. <table class="params">
  497. <tr><td class="paramname">args</td><td>is the input and output argument list </td></tr>
  498. <tr><td class="paramname">data</td><td>is the user data </td></tr>
  499. <tr><td class="paramname">opts</td><td>is the option description array </td></tr>
  500. <tr><td class="paramname">proc</td><td>is the processing function </td></tr>
  501. </table>
  502. </dd>
  503. </dl>
  504. <dl class="section return"><dt>Returns</dt><dd>-1 on error, 0 on success </dd></dl>
  505. </div>
  506. </div>
  507. </div><!-- contents -->
  508. <!-- start footer part -->
  509. <hr class="footer"/><address class="footer"><small>
  510. Generated on Sat Apr 23 2016 09:43:20 for fuse by &#160;<a href="http://www.doxygen.org/index.html">
  511. <img class="footer" src="doxygen.png" alt="doxygen"/>
  512. </a> 1.8.8
  513. </small></address>
  514. </body>
  515. </html>