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.

136 lines
6.4 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: fuse_opt Struct 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 class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  33. <li><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="annotated.html"><span>Data&#160;Structures</span></a></li>
  39. <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
  40. </ul>
  41. </div>
  42. </div><!-- top -->
  43. <div class="header">
  44. <div class="summary">
  45. <a href="#pub-attribs">Data Fields</a> </div>
  46. <div class="headertitle">
  47. <div class="title">fuse_opt Struct Reference</div> </div>
  48. </div><!--header-->
  49. <div class="contents">
  50. <p><code>#include &lt;fuse_opt.h&gt;</code></p>
  51. <table class="memberdecls">
  52. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
  53. Data Fields</h2></td></tr>
  54. <tr class="memitem:a215255be3ed5c0f6c3e0d5dcc96d7b12"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#a215255be3ed5c0f6c3e0d5dcc96d7b12">templ</a></td></tr>
  55. <tr class="separator:a215255be3ed5c0f6c3e0d5dcc96d7b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
  56. <tr class="memitem:a333dcd849a3bd54df06084a69b5a8d39"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#a333dcd849a3bd54df06084a69b5a8d39">offset</a></td></tr>
  57. <tr class="separator:a333dcd849a3bd54df06084a69b5a8d39"><td class="memSeparator" colspan="2">&#160;</td></tr>
  58. <tr class="memitem:aeb76339e1ce6948ad94bd2d4d5d01e20"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#aeb76339e1ce6948ad94bd2d4d5d01e20">value</a></td></tr>
  59. <tr class="separator:aeb76339e1ce6948ad94bd2d4d5d01e20"><td class="memSeparator" colspan="2">&#160;</td></tr>
  60. </table>
  61. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  62. <div class="textblock"><p>Option description</p>
  63. <p>This structure describes a single option, and action associated with it, in case it matches.</p>
  64. <p>More than one such match may occur, in which case the action for each match is executed.</p>
  65. <p>There are three possible actions in case of a match:</p>
  66. <p>i) An integer (int or unsigned) variable determined by 'offset' is set to 'value'</p>
  67. <p>ii) The processing function is called, with 'value' as the key</p>
  68. <p>iii) An integer (any) or string (char *) variable determined by 'offset' is set to the value of an option parameter</p>
  69. <p>'offset' should normally be either set to</p>
  70. <ul>
  71. <li>'offsetof(struct foo, member)' actions i) and iii)</li>
  72. <li>-1 action ii)</li>
  73. </ul>
  74. <p>The 'offsetof()' macro is defined in the &lt;stddef.h&gt; header.</p>
  75. <p>The template determines which options match, and also have an effect on the action. Normally the action is either i) or ii), but if a format is present in the template, then action iii) is performed.</p>
  76. <p>The types of templates are:</p>
  77. <p>1) "-x", "-foo", "--foo", "--foo-bar", etc. These match only themselves. Invalid values are "--" and anything beginning with "-o"</p>
  78. <p>2) "foo", "foo-bar", etc. These match "-ofoo", "-ofoo-bar" or the relevant option in a comma separated option list</p>
  79. <p>3) "bar=", "--foo=", etc. These are variations of 1) and 2) which have a parameter</p>
  80. <p>4) "bar=%s", "--foo=%lu", etc. Same matching as above but perform action iii).</p>
  81. <p>5) "-x ", etc. Matches either "-xparam" or "-x param" as two separate arguments</p>
  82. <p>6) "-x %s", etc. Combination of 4) and 5)</p>
  83. <p>If the format is "%s", memory is allocated for the string unlike with scanf(). </p>
  84. </div><h2 class="groupheader">Field Documentation</h2>
  85. <a class="anchor" id="a333dcd849a3bd54df06084a69b5a8d39"></a>
  86. <div class="memitem">
  87. <div class="memproto">
  88. <table class="memname">
  89. <tr>
  90. <td class="memname">unsigned long fuse_opt::offset</td>
  91. </tr>
  92. </table>
  93. </div><div class="memdoc">
  94. <p>Offset of variable within 'data' parameter of <a class="el" href="fuse__opt_8h.html#a539ef1f571c34f516c60c4cbe2901c0e">fuse_opt_parse()</a> or -1 </p>
  95. </div>
  96. </div>
  97. <a class="anchor" id="a215255be3ed5c0f6c3e0d5dcc96d7b12"></a>
  98. <div class="memitem">
  99. <div class="memproto">
  100. <table class="memname">
  101. <tr>
  102. <td class="memname">const char* fuse_opt::templ</td>
  103. </tr>
  104. </table>
  105. </div><div class="memdoc">
  106. <p>Matching template and optional parameter formatting </p>
  107. </div>
  108. </div>
  109. <a class="anchor" id="aeb76339e1ce6948ad94bd2d4d5d01e20"></a>
  110. <div class="memitem">
  111. <div class="memproto">
  112. <table class="memname">
  113. <tr>
  114. <td class="memname">int fuse_opt::value</td>
  115. </tr>
  116. </table>
  117. </div><div class="memdoc">
  118. <p>Value to set the variable to, or to be passed as 'key' to the processing function. Ignored if template has a format </p>
  119. </div>
  120. </div>
  121. <hr/>The documentation for this struct was generated from the following file:<ul>
  122. <li>include/<a class="el" href="fuse__opt_8h.html">fuse_opt.h</a></li>
  123. </ul>
  124. </div><!-- contents -->
  125. <!-- start footer part -->
  126. <hr class="footer"/><address class="footer"><small>
  127. Generated on Sat Apr 23 2016 09:43:20 for fuse by &#160;<a href="http://www.doxygen.org/index.html">
  128. <img class="footer" src="doxygen.png" alt="doxygen"/>
  129. </a> 1.8.8
  130. </small></address>
  131. </body>
  132. </html>