D7net Mini Sh3LL v1
Current File : /var/www/html/../../../usr/share/doc/psmisc/../libapr1-dev/html/group__apr__getopt.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Apache Portable Runtime: Command Argument Parsing</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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Apache Portable Runtime
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Command Argument Parsing<div class="ingroups"><a class="el" href="group___a_p_r.html">Apache Portability Runtime library</a></div></div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Collaboration diagram for Command Argument Parsing:</div>
<div class="dyncontent">
<div class="center"><img src="group__apr__getopt.png" border="0" usemap="#group____apr____getopt" alt=""/></div>
<!-- MAP 0 -->
</div>
<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="structapr__getopt__t.html">apr_getopt_t</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="structapr__getopt__option__t.html">apr_getopt_option_t</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="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gad0f6c9baec81bc84293e0f1e2262656e"><td class="memItemLeft" align="right" valign="top">typedef void() </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__getopt.html#gad0f6c9baec81bc84293e0f1e2262656e">apr_getopt_err_fn_t</a>(void *arg, const char *err,...)</td></tr>
<tr class="separator:gad0f6c9baec81bc84293e0f1e2262656e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaed49565eab64803e93f76d0c40d6873d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__getopt.html#gaed49565eab64803e93f76d0c40d6873d">apr_getopt_t</a></td></tr>
<tr class="separator:gaed49565eab64803e93f76d0c40d6873d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga114d2af52f3573eaeee2ffa73b2c4ff5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__getopt.html#ga114d2af52f3573eaeee2ffa73b2c4ff5">apr_getopt_option_t</a></td></tr>
<tr class="separator:ga114d2af52f3573eaeee2ffa73b2c4ff5"><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:gaaab2b4bfb62361af7a2d427f5f29a3d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__getopt.html#gaaab2b4bfb62361af7a2d427f5f29a3d4">apr_getopt_init</a> (<a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> **os, <a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *cont, int argc, const char *const *argv)</td></tr>
<tr class="separator:gaaab2b4bfb62361af7a2d427f5f29a3d4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga289cdcf7eacc997eb91fea7c02d08934"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__getopt.html#ga289cdcf7eacc997eb91fea7c02d08934">apr_getopt</a> (<a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> *os, const char *opts, char *option_ch, const char **option_arg)</td></tr>
<tr class="separator:ga289cdcf7eacc997eb91fea7c02d08934"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga80d6ff2213da4e25406b3f179fa13989"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__getopt.html#ga80d6ff2213da4e25406b3f179fa13989">apr_getopt_long</a> (<a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> *os, const <a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a> *opts, int *option_ch, const char **option_arg)</td></tr>
<tr class="separator:ga80d6ff2213da4e25406b3f179fa13989"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="gad0f6c9baec81bc84293e0f1e2262656e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad0f6c9baec81bc84293e0f1e2262656e">◆ </a></span>apr_getopt_err_fn_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void() apr_getopt_err_fn_t(void *arg, const char *err,...)</td>
</tr>
</table>
</div><div class="memdoc">
<p>An <code><a class="el" href="structapr__getopt__t.html">apr_getopt_t</a></code> error callback function.</p>
<p><em>arg</em> is this <code><a class="el" href="structapr__getopt__t.html">apr_getopt_t</a>'s</code> <code>errarg</code> member. </p>
</div>
</div>
<a id="ga114d2af52f3573eaeee2ffa73b2c4ff5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga114d2af52f3573eaeee2ffa73b2c4ff5">◆ </a></span>apr_getopt_option_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a> <a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a> </dd></dl>
</div>
</div>
<a id="gaed49565eab64803e93f76d0c40d6873d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaed49565eab64803e93f76d0c40d6873d">◆ </a></span>apr_getopt_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> <a class="el" href="structapr__getopt__t.html">apr_getopt_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> </dd></dl>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga289cdcf7eacc997eb91fea7c02d08934"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga289cdcf7eacc997eb91fea7c02d08934">◆ </a></span>apr_getopt()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_getopt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> * </td>
<td class="paramname"><em>os</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>option_ch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"><em>option_arg</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse the options initialized by <a class="el" href="group__apr__getopt.html#gaaab2b4bfb62361af7a2d427f5f29a3d4">apr_getopt_init()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">os</td><td>The apr_opt_t structure returned by <a class="el" href="group__apr__getopt.html#gaaab2b4bfb62361af7a2d427f5f29a3d4">apr_getopt_init()</a> </td></tr>
<tr><td class="paramname">opts</td><td>A string of characters that are acceptable options to the program. Characters followed by ":" are required to have an option associated </td></tr>
<tr><td class="paramname">option_ch</td><td>The next option character parsed </td></tr>
<tr><td class="paramname">option_arg</td><td>The argument following the option character: </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>There are four potential status values on exit. They are: <pre>
APR_EOF -- No more options to parse
APR_BADCH -- Found a bad option character
APR_BADARG -- No argument followed the option flag
APR_SUCCESS -- The next option was found.
</pre> </dd></dl>
</div>
</div>
<a id="gaaab2b4bfb62361af7a2d427f5f29a3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaab2b4bfb62361af7a2d427f5f29a3d4">◆ </a></span>apr_getopt_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_getopt_init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> ** </td>
<td class="paramname"><em>os</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td>
<td class="paramname"><em>cont</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *const * </td>
<td class="paramname"><em>argv</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the arguments for parsing by <a class="el" href="group__apr__getopt.html#ga289cdcf7eacc997eb91fea7c02d08934">apr_getopt()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">os</td><td>The options structure created for <a class="el" href="group__apr__getopt.html#ga289cdcf7eacc997eb91fea7c02d08934">apr_getopt()</a> </td></tr>
<tr><td class="paramname">cont</td><td>The pool to operate on </td></tr>
<tr><td class="paramname">argc</td><td>The number of arguments to parse </td></tr>
<tr><td class="paramname">argv</td><td>The array of arguments to parse </td></tr>
</table>
</dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>Arguments 3 and 4 are most commonly argc and argv from main(argc, argv) The (*os)->errfn is initialized to fprintf(stderr... but may be overridden. </dd></dl>
</div>
</div>
<a id="ga80d6ff2213da4e25406b3f179fa13989"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga80d6ff2213da4e25406b3f179fa13989">◆ </a></span>apr_getopt_long()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_getopt_long </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> * </td>
<td class="paramname"><em>os</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a> * </td>
<td class="paramname"><em>opts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>option_ch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"><em>option_arg</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse the options initialized by <a class="el" href="group__apr__getopt.html#gaaab2b4bfb62361af7a2d427f5f29a3d4">apr_getopt_init()</a>, accepting long options beginning with "--" in addition to single-character options beginning with "-". </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">os</td><td>The <a class="el" href="structapr__getopt__t.html">apr_getopt_t</a> structure created by <a class="el" href="group__apr__getopt.html#gaaab2b4bfb62361af7a2d427f5f29a3d4">apr_getopt_init()</a> </td></tr>
<tr><td class="paramname">opts</td><td>A pointer to a list of <a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a> structures, which can be initialized with { "name", optch, has_args }. has_args is nonzero if the option requires an argument. A structure with an optch value of 0 terminates the list. </td></tr>
<tr><td class="paramname">option_ch</td><td>Receives the value of "optch" from the <a class="el" href="structapr__getopt__option__t.html">apr_getopt_option_t</a> structure corresponding to the next option matched. </td></tr>
<tr><td class="paramname">option_arg</td><td>Receives the argument following the option, if any. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>There are four potential status values on exit. They are: <pre>
APR_EOF -- No more options to parse
APR_BADCH -- Found a bad option character
APR_BADARG -- No argument followed the option flag
APR_SUCCESS -- The next option was found.
</pre> When APR_SUCCESS is returned, os->ind gives the index of the first non-option argument. On error, a message will be printed to stdout unless os->err is set to 0. If os->interleave is set to nonzero, options can come after arguments, and os->argv will be permuted to leave non-option arguments at the end (the original argv is unaffected). </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
AnonSec - 2021 | Recode By D7net