1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 5 <title>File Index</title> 6 <link href="doxygen.css" rel="stylesheet" type="text/css"> 7 </head> 8 <body> 9<!-- Generated by Doxygen 1.7.4 --> 10 <div id="navrow1" class="tabs"> 11 <ul class="tablist"> 12 <li><a href="index.html"><span>Main Page</span></a></li> 13 <li><a href="annotated.html"><span>Data Structures</span></a></li> 14 <li class="current"><a href="files.html"><span>Files</span></a></li> 15 </ul> 16 </div> 17 <div id="navrow2" class="tabs2"> 18 <ul class="tablist"> 19 <li><a href="files.html"><span>File List</span></a></li> 20 <li><a href="globals.html"><span>Globals</span></a></li> 21 </ul> 22 </div> 23</div> 24<div id="side-nav" class="ui-resizable side-nav-resizable"> 25 <div id="nav-tree"> 26 <div id="nav-tree-contents"> 27 </div> 28 </div> 29 <div id="splitbar" style="-moz-user-select:none;" 30 class="ui-resizable-handle"> 31 </div> 32</div> 33<script type="text/javascript"> 34 initNavTree('dmxarg_8c.html',''); 35</script> 36<div id="doc-content"> 37<div class="header"> 38 <div class="summary"> 39<a href="#nested-classes">Data Structures</a> | 40<a href="#define-members">Defines</a> | 41<a href="#func-members">Functions</a> </div> 42 <div class="headertitle"> 43<div class="title">dmxarg.c File Reference</div> </div> 44</div> 45<div class="contents"> 46<div class="textblock"><code>#include "<a class="el" href="dmx_8h_source.html">dmx.h</a>"</code><br/> 47<code>#include "<a class="el" href="dmxarg_8h_source.html">dmxarg.h</a>"</code><br/> 48<code>#include <stdio.h></code><br/> 49<code>#include <string.h></code><br/> 50</div><table class="memberdecls"> 51<tr><td colspan="2"><h2><a name="nested-classes"></a> 52Data Structures</h2></td></tr> 53<tr><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct__dmxArg.html">_dmxArg</a></td></tr> 54<tr><td colspan="2"><h2><a name="define-members"></a> 55Defines</h2></td></tr> 56<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="dmxarg_8c.html#a6da7af093c10727644c84f2c0de19dae">DMX_ARG_TEST</a>   0</td></tr> 57<tr><td colspan="2"><h2><a name="func-members"></a> 58Functions</h2></td></tr> 59<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct__dmxArg.html">dmxArg</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dmxarg_8c.html#af4ecb9595303a7fcac5eae840766b6fb">dmxArgCreate</a> (void)</td></tr> 60<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dmxarg_8c.html#aa6b362f314787cc0e0fd7ca55b53a5cc">dmxArgFree</a> (<a class="el" href="struct__dmxArg.html">dmxArg</a> a)</td></tr> 61<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="dmxarg_8c.html#a6d41e61a00975e123ed72a269d653d23">dmxArgAdd</a> (<a class="el" href="struct__dmxArg.html">dmxArg</a> a, const char *string)</td></tr> 62<tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="dmxarg_8c.html#a7de14f607c61ecac05f9c45d002e36ab">dmxArgV</a> (<a class="el" href="struct__dmxArg.html">dmxArg</a> a, int item)</td></tr> 63<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dmxarg_8c.html#a94e36fd228f49fb0a77c34709cbd3a69">dmxArgC</a> (<a class="el" href="struct__dmxArg.html">dmxArg</a> a)</td></tr> 64<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct__dmxArg.html">dmxArg</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="dmxarg_8c.html#a7d872851e86ae8063cd13e85ed203d09">dmxArgParse</a> (const char *string)</td></tr> 65</table> 66<hr/><a name="details" id="details"></a><h2>Detailed Description</h2> 67<div class="textblock"><p>Generic comma-delimited argument processing. </p> 68</div><hr/><h2>Define Documentation</h2> 69<a class="anchor" id="a6da7af093c10727644c84f2c0de19dae"></a><!-- doxytag: member="dmxarg.c::DMX_ARG_TEST" ref="a6da7af093c10727644c84f2c0de19dae" args="" --> 70<div class="memitem"> 71<div class="memproto"> 72 <table class="memname"> 73 <tr> 74 <td class="memname">#define DMX_ARG_TEST   0</td> 75 </tr> 76 </table> 77</div> 78<div class="memdoc"> 79 80</div> 81</div> 82<hr/><h2>Function Documentation</h2> 83<a class="anchor" id="a6d41e61a00975e123ed72a269d653d23"></a><!-- doxytag: member="dmxarg.c::dmxArgAdd" ref="a6d41e61a00975e123ed72a269d653d23" args="(dmxArg a, const char *string)" --> 84<div class="memitem"> 85<div class="memproto"> 86 <table class="memname"> 87 <tr> 88 <td class="memname">void dmxArgAdd </td> 89 <td>(</td> 90 <td class="paramtype"><a class="el" href="struct__dmxArg.html">dmxArg</a> </td> 91 <td class="paramname"><em>a</em>, </td> 92 </tr> 93 <tr> 94 <td class="paramkey"></td> 95 <td></td> 96 <td class="paramtype">const char * </td> 97 <td class="paramname"><em>string</em> </td> 98 </tr> 99 <tr> 100 <td></td> 101 <td>)</td> 102 <td></td><td></td> 103 </tr> 104 </table> 105</div> 106<div class="memdoc"> 107<p>Add the <em>string</em> as the next argument in the <em>dmxArg</em> object. </p> 108 109<p>References <a class="el" href="struct__dmxArg.html#aca6cdc10b22ae5fa4b790c0758eb70c9">_dmxArg::argc</a>, <a class="el" href="struct__dmxArg.html#aa9baf81a4fabcd2d3f6bbbecd0ebd748">_dmxArg::argm</a>, and <a class="el" href="struct__dmxArg.html#aade18557285f464ec800a9ed1fc6c3f5">_dmxArg::argv</a>.</p> 110 111<p>Referenced by <a class="el" href="dmxarg_8h.html#a7d872851e86ae8063cd13e85ed203d09">dmxArgParse()</a>.</p> 112 113</div> 114</div> 115<a class="anchor" id="a94e36fd228f49fb0a77c34709cbd3a69"></a><!-- doxytag: member="dmxarg.c::dmxArgC" ref="a94e36fd228f49fb0a77c34709cbd3a69" args="(dmxArg a)" --> 116<div class="memitem"> 117<div class="memproto"> 118 <table class="memname"> 119 <tr> 120 <td class="memname">int dmxArgC </td> 121 <td>(</td> 122 <td class="paramtype"><a class="el" href="struct__dmxArg.html">dmxArg</a> </td> 123 <td class="paramname"><em>a</em></td><td>)</td> 124 <td></td> 125 </tr> 126 </table> 127</div> 128<div class="memdoc"> 129<p>Return the number of arguments in the <em>dmxArg</em> object. </p> 130 131<p>References <a class="el" href="struct__dmxArg.html#aca6cdc10b22ae5fa4b790c0758eb70c9">_dmxArg::argc</a>.</p> 132 133<p>Referenced by <a class="el" href="dmxinputinit_8c.html#a5845f0dbf305a8a233d3747489745faa">dmxInputInit()</a>, and <a class="el" href="dmxinputinit_8c.html#ac4ea57a3ba798705d63254cdbbefb63d">dmxPopulateLocal()</a>.</p> 134 135</div> 136</div> 137<a class="anchor" id="af4ecb9595303a7fcac5eae840766b6fb"></a><!-- doxytag: member="dmxarg.c::dmxArgCreate" ref="af4ecb9595303a7fcac5eae840766b6fb" args="(void)" --> 138<div class="memitem"> 139<div class="memproto"> 140 <table class="memname"> 141 <tr> 142 <td class="memname"><a class="el" href="struct__dmxArg.html">dmxArg</a> dmxArgCreate </td> 143 <td>(</td> 144 <td class="paramtype">void </td> 145 <td class="paramname"></td><td>)</td> 146 <td></td> 147 </tr> 148 </table> 149</div> 150<div class="memdoc"> 151<p>Create an (externally opaque) <em>dmxArg</em> object. </p> 152 153<p>References <a class="el" href="struct__dmxArg.html#aca6cdc10b22ae5fa4b790c0758eb70c9">_dmxArg::argc</a>, <a class="el" href="struct__dmxArg.html#aa9baf81a4fabcd2d3f6bbbecd0ebd748">_dmxArg::argm</a>, and <a class="el" href="struct__dmxArg.html#aade18557285f464ec800a9ed1fc6c3f5">_dmxArg::argv</a>.</p> 154 155<p>Referenced by <a class="el" href="dmxarg_8h.html#a7d872851e86ae8063cd13e85ed203d09">dmxArgParse()</a>.</p> 156 157</div> 158</div> 159<a class="anchor" id="aa6b362f314787cc0e0fd7ca55b53a5cc"></a><!-- doxytag: member="dmxarg.c::dmxArgFree" ref="aa6b362f314787cc0e0fd7ca55b53a5cc" args="(dmxArg a)" --> 160<div class="memitem"> 161<div class="memproto"> 162 <table class="memname"> 163 <tr> 164 <td class="memname">void dmxArgFree </td> 165 <td>(</td> 166 <td class="paramtype"><a class="el" href="struct__dmxArg.html">dmxArg</a> </td> 167 <td class="paramname"><em>a</em></td><td>)</td> 168 <td></td> 169 </tr> 170 </table> 171</div> 172<div class="memdoc"> 173<p>Free the specified <em>dmxArg</em> object. </p> 174 175<p>References <a class="el" href="struct__dmxArg.html#aca6cdc10b22ae5fa4b790c0758eb70c9">_dmxArg::argc</a>, and <a class="el" href="struct__dmxArg.html#aade18557285f464ec800a9ed1fc6c3f5">_dmxArg::argv</a>.</p> 176 177<p>Referenced by <a class="el" href="dmxinputinit_8c.html#a5845f0dbf305a8a233d3747489745faa">dmxInputInit()</a>.</p> 178 179</div> 180</div> 181<a class="anchor" id="a7d872851e86ae8063cd13e85ed203d09"></a><!-- doxytag: member="dmxarg.c::dmxArgParse" ref="a7d872851e86ae8063cd13e85ed203d09" args="(const char *string)" --> 182<div class="memitem"> 183<div class="memproto"> 184 <table class="memname"> 185 <tr> 186 <td class="memname"><a class="el" href="struct__dmxArg.html">dmxArg</a> dmxArgParse </td> 187 <td>(</td> 188 <td class="paramtype">const char * </td> 189 <td class="paramname"><em>string</em></td><td>)</td> 190 <td></td> 191 </tr> 192 </table> 193</div> 194<div class="memdoc"> 195<p>Parse a string into arguments delimited by commas. Return a new <em>dmxArg</em> object containing the arguments. </p> 196 197<p>References <a class="el" href="dmxarg_8c.html#a6d41e61a00975e123ed72a269d653d23">dmxArgAdd()</a>, and <a class="el" href="dmxarg_8c.html#af4ecb9595303a7fcac5eae840766b6fb">dmxArgCreate()</a>.</p> 198 199<p>Referenced by <a class="el" href="dmxinputinit_8c.html#a5845f0dbf305a8a233d3747489745faa">dmxInputInit()</a>.</p> 200 201</div> 202</div> 203<a class="anchor" id="a7de14f607c61ecac05f9c45d002e36ab"></a><!-- doxytag: member="dmxarg.c::dmxArgV" ref="a7de14f607c61ecac05f9c45d002e36ab" args="(dmxArg a, int item)" --> 204<div class="memitem"> 205<div class="memproto"> 206 <table class="memname"> 207 <tr> 208 <td class="memname">const char* dmxArgV </td> 209 <td>(</td> 210 <td class="paramtype"><a class="el" href="struct__dmxArg.html">dmxArg</a> </td> 211 <td class="paramname"><em>a</em>, </td> 212 </tr> 213 <tr> 214 <td class="paramkey"></td> 215 <td></td> 216 <td class="paramtype">int </td> 217 <td class="paramname"><em>item</em> </td> 218 </tr> 219 <tr> 220 <td></td> 221 <td>)</td> 222 <td></td><td></td> 223 </tr> 224 </table> 225</div> 226<div class="memdoc"> 227<p>Return the argument number <em>item</em> in the <em>dmxArg</em> object. Arguments are 0 based. NULL will be returned for values less than 0 or equal to or greater than the number of arguments in the object. </p> 228 229<p>References <a class="el" href="struct__dmxArg.html#aca6cdc10b22ae5fa4b790c0758eb70c9">_dmxArg::argc</a>, and <a class="el" href="struct__dmxArg.html#aade18557285f464ec800a9ed1fc6c3f5">_dmxArg::argv</a>.</p> 230 231<p>Referenced by <a class="el" href="dmxinputinit_8c.html#a5845f0dbf305a8a233d3747489745faa">dmxInputInit()</a>, and <a class="el" href="dmxinputinit_8c.html#ac4ea57a3ba798705d63254cdbbefb63d">dmxPopulateLocal()</a>.</p> 232 233</div> 234</div> 235</div> 236</div> 237 <div id="nav-path" class="navpath"> 238 <ul> 239 <li class="navelem"><a class="el" href="dmxarg_8c.html">dmxarg.c</a> </li> 240 <hr> 241 <address> 242 <small> 243 Generated June 29, 2004 for <a 244 href="http://dmx.sourceforge.net">Distributed Multihead X</a> by 245 <a href="http://www.doxygen.org/index.html">doxygen</a> 246 1.3.4. 247 </small> 248 </addres> 249 </hr> 250 </body> 251</html> 252