Fix support for @private@, and make it universal for all things.

mxmldoc.c:
    - find_public(): Added
    - scan_file(): Revert previous @private@ changes, clear
      typedefnode after we assign a comment, and remove
      unnecessary @private@ comment check.
    - write_documentation(): Use find_public() instead of
      mxmlFindElement() when enumerating public types, structs,
      etc.

test/dotest.sh:
    - Run "make mxmldoc-static" so that the test uses a current
      executable.

test/function.cxx:
    - Add @private@ function.

test/struct.cxx:
    - Add @private@ struct.

test/type.cxx:
    - Added (simple typedef types)
This commit is contained in:
Michael R Sweet 2005-11-30 15:31:58 +00:00
parent 735989840c
commit f7fdbeb2c9
7 changed files with 236 additions and 212 deletions

View File

@ -92,7 +92,7 @@
<h3><a name='mxmlAdd'>mxmlAdd()</a> </h3> <h3><a name='mxmlAdd'>mxmlAdd()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlAdd()' - Add a node to a tree. <p>Add a node to a tree.
Adds the specified node to the parent. If the child argument is not Adds the specified node to the parent. If the child argument is not
NULL, puts the new node before or after the specified child depending NULL, puts the new node before or after the specified child depending
@ -124,7 +124,7 @@ mxmlAdd(
<h3><a name='mxmlDelete'>mxmlDelete()</a> </h3> <h3><a name='mxmlDelete'>mxmlDelete()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlDelete()' - Delete a node and all of its children. <p>Delete a node and all of its children.
If the specified node has a parent, this function first removes the If the specified node has a parent, this function first removes the
node from its parent using the mxmlRemove() function.</p> node from its parent using the mxmlRemove() function.</p>
@ -165,12 +165,12 @@ mxmlElementGetAttr(
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr> <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Attribute value or NULL</p> <p>Attribute value or NULL</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlElementSetAttr'>mxmlElementSetAttr()</a> </h3> <h3><a name='mxmlElementSetAttr'>mxmlElementSetAttr()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlElementSetAttr()' - Set an attribute. <p>Set an attribute.
If the named attribute already exists, the value of the attribute If the named attribute already exists, the value of the attribute
is replaced by the new string value. The string value is copied is replaced by the new string value. The string value is copied
@ -207,7 +207,7 @@ mxmlEntityAddCallback(void);
<h4>Arguments</h4> <h4>Arguments</h4>
<p>None.</p> <p>None.</p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlEntityGetName'>mxmlEntityGetName()</a> </h3> <h3><a name='mxmlEntityGetName'>mxmlEntityGetName()</a> </h3>
<hr noshade/> <hr noshade/>
@ -228,7 +228,7 @@ mxmlEntityGetName(
<tr><td><tt>val</tt></td><td>Character value</td></tr> <tr><td><tt>val</tt></td><td>Character value</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Entity name or NULL</p> <p>Entity name or NULL</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlEntityGetValue'>mxmlEntityGetValue()</a> </h3> <h3><a name='mxmlEntityGetValue'>mxmlEntityGetValue()</a> </h3>
<hr noshade/> <hr noshade/>
@ -250,12 +250,12 @@ mxmlEntityGetValue(
<tr><td><tt>name</tt></td><td>Entity name</td></tr> <tr><td><tt>name</tt></td><td>Entity name</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Character value or -1 on error</p> <p>Character value or -1 on error</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlEntityRemoveCallback'>mxmlEntityRemoveCallback()</a> </h3> <h3><a name='mxmlEntityRemoveCallback'>mxmlEntityRemoveCallback()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlEntityRemoveCallback()' - Remove a callback.</p> <p>Remove a callback.</p>
<h4>Syntax</h4> <h4>Syntax</h4>
<pre> <pre>
void void
@ -302,12 +302,12 @@ mxmlFindElement(
<tr><td><tt>descend</tt></td><td>Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST</td></tr> <tr><td><tt>descend</tt></td><td>Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Element node or NULL</p> <p>Element node or NULL</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlIndexDelete'>mxmlIndexDelete()</a> </h3> <h3><a name='mxmlIndexDelete'>mxmlIndexDelete()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlIndexDelete()' - Delete an index.</p> <p>Delete an index.</p>
<h4>Syntax</h4> <h4>Syntax</h4>
<pre> <pre>
void void
@ -342,7 +342,7 @@ mxmlIndexEnum(
<tr><td><tt>ind</tt></td><td>Index to enumerate</td></tr> <tr><td><tt>ind</tt></td><td>Index to enumerate</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Next node or NULL if there is none</p> <p>Next node or NULL if there is none</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlIndexFind'>mxmlIndexFind()</a> </h3> <h3><a name='mxmlIndexFind'>mxmlIndexFind()</a> </h3>
<hr noshade/> <hr noshade/>
@ -370,7 +370,7 @@ mxmlIndexFind(
<tr><td><tt>value</tt></td><td>Attribute value, if any</td></tr> <tr><td><tt>value</tt></td><td>Attribute value, if any</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Node or NULL if none found</p> <p>Node or NULL if none found</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlIndexNew'>mxmlIndexNew()</a> </h3> <h3><a name='mxmlIndexNew'>mxmlIndexNew()</a> </h3>
<hr noshade/> <hr noshade/>
@ -399,7 +399,7 @@ mxmlIndexNew(
<tr><td><tt>attr</tt></td><td>Attribute to index or NULL for none</td></tr> <tr><td><tt>attr</tt></td><td>Attribute to index or NULL for none</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New index</p> <p>New index</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlIndexReset'>mxmlIndexReset()</a> </h3> <h3><a name='mxmlIndexReset'>mxmlIndexReset()</a> </h3>
<hr noshade/> <hr noshade/>
@ -422,7 +422,7 @@ mxmlIndexReset(
<tr><td><tt>ind</tt></td><td>Index to reset</td></tr> <tr><td><tt>ind</tt></td><td>Index to reset</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - First node or NULL if there is none</p> <p>First node or NULL if there is none</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlLoadFd'>mxmlLoadFd()</a> </h3> <h3><a name='mxmlLoadFd'>mxmlLoadFd()</a> </h3>
<hr noshade/> <hr noshade/>
@ -454,7 +454,7 @@ mxmlLoadFd(
<tr><td><tt>fd</tt></td><td>File descriptor to read from</td></tr> <tr><td><tt>fd</tt></td><td>File descriptor to read from</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - First node or NULL if the file could not be read.</p> <p>First node or NULL if the file could not be read.</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlLoadFile'>mxmlLoadFile()</a> </h3> <h3><a name='mxmlLoadFile'>mxmlLoadFile()</a> </h3>
<hr noshade/> <hr noshade/>
@ -486,7 +486,7 @@ mxmlLoadFile(
<tr><td><tt>fp</tt></td><td>File to read from</td></tr> <tr><td><tt>fp</tt></td><td>File to read from</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - First node or NULL if the file could not be read.</p> <p>First node or NULL if the file could not be read.</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlLoadString'>mxmlLoadString()</a> </h3> <h3><a name='mxmlLoadString'>mxmlLoadString()</a> </h3>
<hr noshade/> <hr noshade/>
@ -518,7 +518,7 @@ mxmlLoadString(
<tr><td><tt>s</tt></td><td>String to load</td></tr> <tr><td><tt>s</tt></td><td>String to load</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - First node or NULL if the string has errors.</p> <p>First node or NULL if the string has errors.</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewCDATA'>mxmlNewCDATA()</a> <span class='info'>&nbsp;Mini-XML 2.3&nbsp;</span></h3> <h3><a name='mxmlNewCDATA'>mxmlNewCDATA()</a> <span class='info'>&nbsp;Mini-XML 2.3&nbsp;</span></h3>
<hr noshade/> <hr noshade/>
@ -546,7 +546,7 @@ mxmlNewCDATA(
<tr><td><tt>data</tt></td><td>Data string</td></tr> <tr><td><tt>data</tt></td><td>Data string</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewCustom'>mxmlNewCustom()</a> <span class='info'>&nbsp;Mini-XML 2.1&nbsp;</span></h3> <h3><a name='mxmlNewCustom'>mxmlNewCustom()</a> <span class='info'>&nbsp;Mini-XML 2.1&nbsp;</span></h3>
<hr noshade/> <hr noshade/>
@ -574,7 +574,7 @@ mxmlNewCustom(
<tr><td><tt>data</tt></td><td>Pointer to data</td></tr> <tr><td><tt>data</tt></td><td>Pointer to data</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewElement'>mxmlNewElement()</a> </h3> <h3><a name='mxmlNewElement'>mxmlNewElement()</a> </h3>
<hr noshade/> <hr noshade/>
@ -599,7 +599,7 @@ mxmlNewElement(
<tr><td><tt>name</tt></td><td>Name of element</td></tr> <tr><td><tt>name</tt></td><td>Name of element</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewInteger'>mxmlNewInteger()</a> </h3> <h3><a name='mxmlNewInteger'>mxmlNewInteger()</a> </h3>
<hr noshade/> <hr noshade/>
@ -624,7 +624,7 @@ mxmlNewInteger(
<tr><td><tt>integer</tt></td><td>Integer value</td></tr> <tr><td><tt>integer</tt></td><td>Integer value</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewOpaque'>mxmlNewOpaque()</a> </h3> <h3><a name='mxmlNewOpaque'>mxmlNewOpaque()</a> </h3>
<hr noshade/> <hr noshade/>
@ -650,7 +650,7 @@ mxmlNewOpaque(
<tr><td><tt>opaque</tt></td><td>Opaque string</td></tr> <tr><td><tt>opaque</tt></td><td>Opaque string</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewReal'>mxmlNewReal()</a> </h3> <h3><a name='mxmlNewReal'>mxmlNewReal()</a> </h3>
<hr noshade/> <hr noshade/>
@ -675,7 +675,7 @@ mxmlNewReal(
<tr><td><tt>real</tt></td><td>Real number value</td></tr> <tr><td><tt>real</tt></td><td>Real number value</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewText'>mxmlNewText()</a> </h3> <h3><a name='mxmlNewText'>mxmlNewText()</a> </h3>
<hr noshade/> <hr noshade/>
@ -704,7 +704,7 @@ mxmlNewText(
<tr><td><tt>string</tt></td><td>String</td></tr> <tr><td><tt>string</tt></td><td>String</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlNewTextf'>mxmlNewTextf()</a> </h3> <h3><a name='mxmlNewTextf'>mxmlNewTextf()</a> </h3>
<hr noshade/> <hr noshade/>
@ -735,12 +735,12 @@ mxmlNewTextf(
<tr><td><tt>...</tt></td><td>Additional args as needed</td></tr> <tr><td><tt>...</tt></td><td>Additional args as needed</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - New node</p> <p>New node</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlRemove'>mxmlRemove()</a> </h3> <h3><a name='mxmlRemove'>mxmlRemove()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlRemove()' - Remove a node from its parent. <p>Remove a node from its parent.
Does not free memory used by the node - use mxmlDelete() for that. Does not free memory used by the node - use mxmlDelete() for that.
This function does nothing if the node has no parent.</p> This function does nothing if the node has no parent.</p>
@ -788,7 +788,7 @@ mxmlSaveAllocString(
<tr><td><tt>node</tt></td><td>Node to write</td></tr> <tr><td><tt>node</tt></td><td>Node to write</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Allocated string or NULL</p> <p>Allocated string or NULL</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSaveFd'>mxmlSaveFd()</a> </h3> <h3><a name='mxmlSaveFd'>mxmlSaveFd()</a> </h3>
<hr noshade/> <hr noshade/>
@ -815,7 +815,7 @@ mxmlSaveFd(
<tr><td><tt>fd</tt></td><td>File descriptor to write to</td></tr> <tr><td><tt>fd</tt></td><td>File descriptor to write to</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on error.</p> <p>0 on success, -1 on error.</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSaveFile'>mxmlSaveFile()</a> </h3> <h3><a name='mxmlSaveFile'>mxmlSaveFile()</a> </h3>
<hr noshade/> <hr noshade/>
@ -842,7 +842,7 @@ mxmlSaveFile(
<tr><td><tt>fp</tt></td><td>File to write to</td></tr> <tr><td><tt>fp</tt></td><td>File to write to</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on error.</p> <p>0 on success, -1 on error.</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSaveString'>mxmlSaveString()</a> </h3> <h3><a name='mxmlSaveString'>mxmlSaveString()</a> </h3>
<hr noshade/> <hr noshade/>
@ -875,7 +875,7 @@ mxmlSaveString(
<tr><td><tt>bufsize</tt></td><td>Size of string buffer</td></tr> <tr><td><tt>bufsize</tt></td><td>Size of string buffer</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Size of string</p> <p>Size of string</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetCDATA'>mxmlSetCDATA()</a> <span class='info'>&nbsp;Mini-XML 2.3&nbsp;</span></h3> <h3><a name='mxmlSetCDATA'>mxmlSetCDATA()</a> <span class='info'>&nbsp;Mini-XML 2.3&nbsp;</span></h3>
<hr noshade/> <hr noshade/>
@ -900,7 +900,7 @@ mxmlSetCDATA(
<tr><td><tt>data</tt></td><td>New data string</td></tr> <tr><td><tt>data</tt></td><td>New data string</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetCustom'>mxmlSetCustom()</a> <span class='info'>&nbsp;Mini-XML 2.1&nbsp;</span></h3> <h3><a name='mxmlSetCustom'>mxmlSetCustom()</a> <span class='info'>&nbsp;Mini-XML 2.1&nbsp;</span></h3>
<hr noshade/> <hr noshade/>
@ -925,19 +925,18 @@ mxmlSetCustom(
<tr><td><tt>data</tt></td><td>New data pointer</td></tr> <tr><td><tt>data</tt></td><td>New data pointer</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetCustomHandlers'>mxmlSetCustomHandlers()</a> </h3> <h3><a name='mxmlSetCustomHandlers'>mxmlSetCustomHandlers()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlSetCustomHandlers()' - Set the handling functions for custom data. <p>Set the handling functions for custom data.
The load function accepts a node pointer and a data string and must The load function accepts a node pointer and a data string and must
return 0 on success and non-zero on error. return 0 on success and non-zero on error.
The save function accepts a node pointer and must return a malloc'd The save function accepts a node pointer and must return a malloc'd
string on success and NULL on error. string on success and NULL on error.</p>
</p>
<h4>Syntax</h4> <h4>Syntax</h4>
<pre> <pre>
void void
@ -976,12 +975,12 @@ mxmlSetElement(
<tr><td><tt>name</tt></td><td>New name string</td></tr> <tr><td><tt>name</tt></td><td>New name string</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetErrorCallback'>mxmlSetErrorCallback()</a> </h3> <h3><a name='mxmlSetErrorCallback'>mxmlSetErrorCallback()</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>'mxmlSetErrorCallback()' - Set the error message callback.</p> <p>Set the error message callback.</p>
<h4>Syntax</h4> <h4>Syntax</h4>
<pre> <pre>
void void
@ -1013,7 +1012,7 @@ mxmlSetInteger(
<tr><td><tt>integer</tt></td><td>Integer value</td></tr> <tr><td><tt>integer</tt></td><td>Integer value</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetOpaque'>mxmlSetOpaque()</a> </h3> <h3><a name='mxmlSetOpaque'>mxmlSetOpaque()</a> </h3>
<hr noshade/> <hr noshade/>
@ -1036,7 +1035,7 @@ mxmlSetOpaque(
<tr><td><tt>opaque</tt></td><td>Opaque string</td></tr> <tr><td><tt>opaque</tt></td><td>Opaque string</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetReal'>mxmlSetReal()</a> </h3> <h3><a name='mxmlSetReal'>mxmlSetReal()</a> </h3>
<hr noshade/> <hr noshade/>
@ -1059,7 +1058,7 @@ mxmlSetReal(
<tr><td><tt>real</tt></td><td>Real number value</td></tr> <tr><td><tt>real</tt></td><td>Real number value</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetText'>mxmlSetText()</a> </h3> <h3><a name='mxmlSetText'>mxmlSetText()</a> </h3>
<hr noshade/> <hr noshade/>
@ -1084,7 +1083,7 @@ mxmlSetText(
<tr><td><tt>string</tt></td><td>String</td></tr> <tr><td><tt>string</tt></td><td>String</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlSetTextf'>mxmlSetTextf()</a> </h3> <h3><a name='mxmlSetTextf'>mxmlSetTextf()</a> </h3>
<hr noshade/> <hr noshade/>
@ -1111,7 +1110,7 @@ mxmlSetTextf(
<tr><td><tt>...</tt></td><td>Additional arguments as needed</td></tr> <tr><td><tt>...</tt></td><td>Additional arguments as needed</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - 0 on success, -1 on failure</p> <p>0 on success, -1 on failure</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlWalkNext'>mxmlWalkNext()</a> </h3> <h3><a name='mxmlWalkNext'>mxmlWalkNext()</a> </h3>
<hr noshade/> <hr noshade/>
@ -1138,7 +1137,7 @@ mxmlWalkNext(
<tr><td><tt>descend</tt></td><td>Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST</td></tr> <tr><td><tt>descend</tt></td><td>Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Next node or NULL</p> <p>Next node or NULL</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h3><a name='mxmlWalkPrev'>mxmlWalkPrev()</a> </h3> <h3><a name='mxmlWalkPrev'>mxmlWalkPrev()</a> </h3>
<hr noshade/> <hr noshade/>
@ -1165,7 +1164,7 @@ mxmlWalkPrev(
<tr><td><tt>descend</tt></td><td>Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST</td></tr> <tr><td><tt>descend</tt></td><td>Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST</td></tr>
</tbody></table></p> </tbody></table></p>
<h4>Returns</h4> <h4>Returns</h4>
<p>O - Previous node or NULL</p> <p>Previous node or NULL</p>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<h2><a name='_structures'>Structures</a></h2> <h2><a name='_structures'>Structures</a></h2>
<ul> <ul>
@ -1356,7 +1355,7 @@ typedef char * (*mxml_custom_save_cb_t)(<a href='#mxml_node_t'>mxml_node_t</a> *
<h3><a name='mxml_custom_t'>mxml_custom_t</a> <span class='info'>&nbsp;Mini-XML 2.1&nbsp;</span></h3> <h3><a name='mxml_custom_t'>mxml_custom_t</a> <span class='info'>&nbsp;Mini-XML 2.1&nbsp;</span></h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>*** An XML custom value. </p> <p>An XML custom value. </p>
<h4>Definition</h4> <h4>Definition</h4>
<pre> <pre>
typedef struct <a href='#mxml_custom_s'>mxml_custom_s</a> mxml_custom_t; typedef struct <a href='#mxml_custom_s'>mxml_custom_s</a> mxml_custom_t;
@ -1365,7 +1364,7 @@ typedef struct <a href='#mxml_custom_s'>mxml_custom_s</a> mxml_custom_t;
<h3><a name='mxml_element_t'>mxml_element_t</a> </h3> <h3><a name='mxml_element_t'>mxml_element_t</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>*** An XML element value.</p> <p>An XML element value.</p>
<h4>Definition</h4> <h4>Definition</h4>
<pre> <pre>
typedef struct <a href='#mxml_element_s'>mxml_element_s</a> mxml_element_t; typedef struct <a href='#mxml_element_s'>mxml_element_s</a> mxml_element_t;
@ -1374,7 +1373,7 @@ typedef struct <a href='#mxml_element_s'>mxml_element_s</a> mxml_element_t;
<h3><a name='mxml_index_t'>mxml_index_t</a> </h3> <h3><a name='mxml_index_t'>mxml_index_t</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>*** An XML node index.</p> <p>An XML node index.</p>
<h4>Definition</h4> <h4>Definition</h4>
<pre> <pre>
typedef struct <a href='#mxml_index_s'>mxml_index_s</a> mxml_index_t; typedef struct <a href='#mxml_index_s'>mxml_index_s</a> mxml_index_t;
@ -1383,7 +1382,7 @@ typedef struct <a href='#mxml_index_s'>mxml_index_s</a> mxml_index_t;
<h3><a name='mxml_node_t'>mxml_node_t</a> </h3> <h3><a name='mxml_node_t'>mxml_node_t</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>*** An XML node.</p> <p>An XML node.</p>
<h4>Definition</h4> <h4>Definition</h4>
<pre> <pre>
typedef struct <a href='#mxml_node_s'>mxml_node_s</a> mxml_node_t; typedef struct <a href='#mxml_node_s'>mxml_node_s</a> mxml_node_t;
@ -1392,7 +1391,7 @@ typedef struct <a href='#mxml_node_s'>mxml_node_s</a> mxml_node_t;
<h3><a name='mxml_text_t'>mxml_text_t</a> </h3> <h3><a name='mxml_text_t'>mxml_text_t</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>*** An XML text value.</p> <p>An XML text value.</p>
<h4>Definition</h4> <h4>Definition</h4>
<pre> <pre>
typedef struct <a href='#mxml_text_s'>mxml_text_s</a> mxml_text_t; typedef struct <a href='#mxml_text_s'>mxml_text_s</a> mxml_text_t;
@ -1401,7 +1400,7 @@ typedef struct <a href='#mxml_text_s'>mxml_text_s</a> mxml_text_t;
<h3><a name='mxml_value_t'>mxml_value_t</a> </h3> <h3><a name='mxml_value_t'>mxml_value_t</a> </h3>
<hr noshade/> <hr noshade/>
<h4>Description</h4> <h4>Description</h4>
<p>*** An XML node value.</p> <p>An XML node value.</p>
<h4>Definition</h4> <h4>Definition</h4>
<pre> <pre>
typedef union <a href='#mxml_value_u'>mxml_value_u</a> mxml_value_t; typedef union <a href='#mxml_value_u'>mxml_value_u</a> mxml_value_t;

View File

@ -3,7 +3,7 @@ xmlns="http://www.easysw.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.easysw.com/~mike/mxml/mxmldoc.xsd"> xsi:schemaLocation="http://www.easysw.com/~mike/mxml/mxmldoc.xsd">
<function name="mxmlAdd"> <function name="mxmlAdd">
<description>'mxmlAdd()' - Add a node to a tree. <description>Add a node to a tree.
Adds the specified node to the parent. If the child argument is not Adds the specified node to the parent. If the child argument is not
NULL, puts the new node before or after the specified child depending NULL, puts the new node before or after the specified child depending
@ -29,7 +29,7 @@ MXML_ADD_TO_PARENT can be used to specify a NULL child pointer.</description>
</argument> </argument>
</function> </function>
<function name="mxmlDelete"> <function name="mxmlDelete">
<description>'mxmlDelete()' - Delete a node and all of its children. <description>Delete a node and all of its children.
If the specified node has a parent, this function first removes the If the specified node has a parent, this function first removes the
node from its parent using the mxmlRemove() function.</description> node from its parent using the mxmlRemove() function.</description>
@ -41,7 +41,7 @@ node from its parent using the mxmlRemove() function.</description>
<function name="mxmlElementGetAttr"> <function name="mxmlElementGetAttr">
<returnvalue> <returnvalue>
<type>const char *</type> <type>const char *</type>
<description>O - Attribute value or NULL</description> <description>Attribute value or NULL</description>
</returnvalue> </returnvalue>
<description>Get an attribute. <description>Get an attribute.
@ -57,7 +57,7 @@ named attribute does not exist.</description>
</argument> </argument>
</function> </function>
<function name="mxmlElementSetAttr"> <function name="mxmlElementSetAttr">
<description>'mxmlElementSetAttr()' - Set an attribute. <description>Set an attribute.
If the named attribute already exists, the value of the attribute If the named attribute already exists, the value of the attribute
is replaced by the new string value. The string value is copied is replaced by the new string value. The string value is copied
@ -79,14 +79,14 @@ not an element.</description>
<function name="mxmlEntityAddCallback"> <function name="mxmlEntityAddCallback">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Add a callback to convert entities to Unicode.</description> <description>Add a callback to convert entities to Unicode.</description>
</function> </function>
<function name="mxmlEntityGetName"> <function name="mxmlEntityGetName">
<returnvalue> <returnvalue>
<type>const char *</type> <type>const char *</type>
<description>O - Entity name or NULL</description> <description>Entity name or NULL</description>
</returnvalue> </returnvalue>
<description>Get the name that corresponds to the character value. <description>Get the name that corresponds to the character value.
@ -99,7 +99,7 @@ If val does not need to be represented by a named entity, NULL is returned.</des
<function name="mxmlEntityGetValue"> <function name="mxmlEntityGetValue">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - Character value or -1 on error</description> <description>Character value or -1 on error</description>
</returnvalue> </returnvalue>
<description>Get the character corresponding to a named entity. <description>Get the character corresponding to a named entity.
@ -111,12 +111,12 @@ name is not known.</description>
</argument> </argument>
</function> </function>
<function name="mxmlEntityRemoveCallback"> <function name="mxmlEntityRemoveCallback">
<description>'mxmlEntityRemoveCallback()' - Remove a callback.</description> <description>Remove a callback.</description>
</function> </function>
<function name="mxmlFindElement"> <function name="mxmlFindElement">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - Element node or NULL</description> <description>Element node or NULL</description>
</returnvalue> </returnvalue>
<description>Find the named element. <description>Find the named element.
@ -154,7 +154,7 @@ constrains the search to a particular node's children.</description>
</argument> </argument>
</function> </function>
<function name="mxmlIndexDelete"> <function name="mxmlIndexDelete">
<description>'mxmlIndexDelete()' - Delete an index.</description> <description>Delete an index.</description>
<argument name="ind" direction="I"> <argument name="ind" direction="I">
<type>mxml_index_t *</type> <type>mxml_index_t *</type>
<description>Index to delete</description> <description>Index to delete</description>
@ -163,7 +163,7 @@ constrains the search to a particular node's children.</description>
<function name="mxmlIndexEnum"> <function name="mxmlIndexEnum">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - Next node or NULL if there is none</description> <description>Next node or NULL if there is none</description>
</returnvalue> </returnvalue>
<description>Return the next node in the index. <description>Return the next node in the index.
@ -176,7 +176,7 @@ Nodes are returned in the sorted order of the index.</description>
<function name="mxmlIndexFind"> <function name="mxmlIndexFind">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - Node or NULL if none found</description> <description>Node or NULL if none found</description>
</returnvalue> </returnvalue>
<description>Find the next matching node. <description>Find the next matching node.
@ -200,7 +200,7 @@ to calling mxmlIndexEnum().</description>
<function name="mxmlIndexNew"> <function name="mxmlIndexNew">
<returnvalue> <returnvalue>
<type>mxml_index_t *</type> <type>mxml_index_t *</type>
<description>O - New index</description> <description>New index</description>
</returnvalue> </returnvalue>
<description>Create a new index. <description>Create a new index.
@ -225,7 +225,7 @@ argument is not NULL.</description>
<function name="mxmlIndexReset"> <function name="mxmlIndexReset">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - First node or NULL if there is none</description> <description>First node or NULL if there is none</description>
</returnvalue> </returnvalue>
<description>Reset the enumeration/find pointer in the index and <description>Reset the enumeration/find pointer in the index and
return the first node in the index. return the first node in the index.
@ -240,7 +240,7 @@ mxmlIndexFind() for the first time.</description>
<function name="mxmlLoadFd"> <function name="mxmlLoadFd">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - First node or NULL if the file could not be read.</description> <description>First node or NULL if the file could not be read.</description>
</returnvalue> </returnvalue>
<description>Load a file descriptor into an XML node tree. <description>Load a file descriptor into an XML node tree.
@ -266,7 +266,7 @@ child nodes of the specified type.</description>
<function name="mxmlLoadFile"> <function name="mxmlLoadFile">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - First node or NULL if the file could not be read.</description> <description>First node or NULL if the file could not be read.</description>
</returnvalue> </returnvalue>
<description>Load a file into an XML node tree. <description>Load a file into an XML node tree.
@ -292,7 +292,7 @@ child nodes of the specified type.</description>
<function name="mxmlLoadString"> <function name="mxmlLoadString">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - First node or NULL if the string has errors.</description> <description>First node or NULL if the string has errors.</description>
</returnvalue> </returnvalue>
<description>Load a string into an XML node tree. <description>Load a string into an XML node tree.
@ -318,7 +318,7 @@ child nodes of the specified type.</description>
<function name="mxmlNewCDATA"> <function name="mxmlNewCDATA">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new CDATA node. <description>Create a new CDATA node.
@ -340,7 +340,7 @@ is copied into the new node. CDATA nodes use the MXML_ELEMENT type.
<function name="mxmlNewCustom"> <function name="mxmlNewCustom">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new custom data node. <description>Create a new custom data node.
@ -362,7 +362,7 @@ node is not dynamically allocated or is separately managed.
<function name="mxmlNewElement"> <function name="mxmlNewElement">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new element node. <description>Create a new element node.
@ -381,7 +381,7 @@ element node has no parent.</description>
<function name="mxmlNewInteger"> <function name="mxmlNewInteger">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new integer node. <description>Create a new integer node.
@ -400,7 +400,7 @@ integer node has no parent.</description>
<function name="mxmlNewOpaque"> <function name="mxmlNewOpaque">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new opaque string. <description>Create a new opaque string.
@ -420,7 +420,7 @@ is copied into the new node.</description>
<function name="mxmlNewReal"> <function name="mxmlNewReal">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new real number node. <description>Create a new real number node.
@ -439,7 +439,7 @@ the new real number node has no parent.</description>
<function name="mxmlNewText"> <function name="mxmlNewText">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new text fragment node. <description>Create a new text fragment node.
@ -464,7 +464,7 @@ string must be nul-terminated and is copied into the new node.</description>
<function name="mxmlNewTextf"> <function name="mxmlNewTextf">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - New node</description> <description>New node</description>
</returnvalue> </returnvalue>
<description>Create a new formatted text fragment node. <description>Create a new formatted text fragment node.
@ -490,7 +490,7 @@ string must be nul-terminated and is formatted into the new node.</description>
</argument> </argument>
</function> </function>
<function name="mxmlRemove"> <function name="mxmlRemove">
<description>'mxmlRemove()' - Remove a node from its parent. <description>Remove a node from its parent.
Does not free memory used by the node - use mxmlDelete() for that. Does not free memory used by the node - use mxmlDelete() for that.
This function does nothing if the node has no parent.</description> This function does nothing if the node has no parent.</description>
@ -502,7 +502,7 @@ This function does nothing if the node has no parent.</description>
<function name="mxmlSaveAllocString"> <function name="mxmlSaveAllocString">
<returnvalue> <returnvalue>
<type>char *</type> <type>char *</type>
<description>O - Allocated string or NULL</description> <description>Allocated string or NULL</description>
</returnvalue> </returnvalue>
<description>Save an XML node tree to an allocated string. <description>Save an XML node tree to an allocated string.
@ -525,7 +525,7 @@ element tags.</description>
<function name="mxmlSaveFd"> <function name="mxmlSaveFd">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on error.</description> <description>0 on success, -1 on error.</description>
</returnvalue> </returnvalue>
<description>Save an XML tree to a file descriptor. <description>Save an XML tree to a file descriptor.
@ -546,7 +546,7 @@ element tags.</description>
<function name="mxmlSaveFile"> <function name="mxmlSaveFile">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on error.</description> <description>0 on success, -1 on error.</description>
</returnvalue> </returnvalue>
<description>Save an XML tree to a file. <description>Save an XML tree to a file.
@ -567,7 +567,7 @@ element tags.</description>
<function name="mxmlSaveString"> <function name="mxmlSaveString">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - Size of string</description> <description>Size of string</description>
</returnvalue> </returnvalue>
<description>Save an XML node tree to a string. <description>Save an XML node tree to a string.
@ -596,7 +596,7 @@ element tags.</description>
<function name="mxmlSetCDATA"> <function name="mxmlSetCDATA">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the element name of a CDATA node. <description>Set the element name of a CDATA node.
@ -615,7 +615,7 @@ The node is not changed if it is not a CDATA element node.
<function name="mxmlSetCustom"> <function name="mxmlSetCustom">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the data and destructor of a custom data node. <description>Set the data and destructor of a custom data node.
@ -632,14 +632,13 @@ The node is not changed if it is not a custom node.
</argument> </argument>
</function> </function>
<function name="mxmlSetCustomHandlers"> <function name="mxmlSetCustomHandlers">
<description>'mxmlSetCustomHandlers()' - Set the handling functions for custom data. <description>Set the handling functions for custom data.
The load function accepts a node pointer and a data string and must The load function accepts a node pointer and a data string and must
return 0 on success and non-zero on error. return 0 on success and non-zero on error.
The save function accepts a node pointer and must return a malloc'd The save function accepts a node pointer and must return a malloc'd
string on success and NULL on error. string on success and NULL on error.</description>
</description>
<argument name="load" direction="I"> <argument name="load" direction="I">
<type>mxml_custom_load_cb_t</type> <type>mxml_custom_load_cb_t</type>
<description>Load function</description> <description>Load function</description>
@ -652,7 +651,7 @@ string on success and NULL on error.
<function name="mxmlSetElement"> <function name="mxmlSetElement">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the name of an element node. <description>Set the name of an element node.
@ -667,12 +666,12 @@ The node is not changed if it is not an element node.</description>
</argument> </argument>
</function> </function>
<function name="mxmlSetErrorCallback"> <function name="mxmlSetErrorCallback">
<description>'mxmlSetErrorCallback()' - Set the error message callback.</description> <description>Set the error message callback.</description>
</function> </function>
<function name="mxmlSetInteger"> <function name="mxmlSetInteger">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the value of an integer node. <description>Set the value of an integer node.
@ -689,7 +688,7 @@ The node is not changed if it is not an integer node.</description>
<function name="mxmlSetOpaque"> <function name="mxmlSetOpaque">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the value of an opaque node. <description>Set the value of an opaque node.
@ -706,7 +705,7 @@ The node is not changed if it is not an opaque node.</description>
<function name="mxmlSetReal"> <function name="mxmlSetReal">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the value of a real number node. <description>Set the value of a real number node.
@ -723,7 +722,7 @@ The node is not changed if it is not a real number node.</description>
<function name="mxmlSetText"> <function name="mxmlSetText">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the value of a text node. <description>Set the value of a text node.
@ -744,7 +743,7 @@ The node is not changed if it is not a text node.</description>
<function name="mxmlSetTextf"> <function name="mxmlSetTextf">
<returnvalue> <returnvalue>
<type>int</type> <type>int</type>
<description>O - 0 on success, -1 on failure</description> <description>0 on success, -1 on failure</description>
</returnvalue> </returnvalue>
<description>Set the value of a text node to a formatted string. <description>Set the value of a text node to a formatted string.
@ -768,7 +767,7 @@ The node is not changed if it is not a text node.</description>
<function name="mxmlWalkNext"> <function name="mxmlWalkNext">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - Next node or NULL</description> <description>Next node or NULL</description>
</returnvalue> </returnvalue>
<description>Walk to the next logical node in the tree. <description>Walk to the next logical node in the tree.
@ -791,7 +790,7 @@ the node's children.</description>
<function name="mxmlWalkPrev"> <function name="mxmlWalkPrev">
<returnvalue> <returnvalue>
<type>mxml_node_t *</type> <type>mxml_node_t *</type>
<description>O - Previous node or NULL</description> <description>Previous node or NULL</description>
</returnvalue> </returnvalue>
<description>Walk to the previous logical node in the tree. <description>Walk to the previous logical node in the tree.
@ -845,7 +844,7 @@ the walk to the node's children.</description>
</typedef> </typedef>
<typedef name="mxml_custom_t"> <typedef name="mxml_custom_t">
<type>struct mxml_custom_s</type> <type>struct mxml_custom_s</type>
<description>*** An XML custom value. @since Mini-XML 2.1@</description> <description>An XML custom value. @since Mini-XML 2.1@</description>
</typedef> </typedef>
<struct name="mxml_element_s"> <struct name="mxml_element_s">
<description>An XML element value.</description> <description>An XML element value.</description>
@ -864,7 +863,7 @@ the walk to the node's children.</description>
</struct> </struct>
<typedef name="mxml_element_t"> <typedef name="mxml_element_t">
<type>struct mxml_element_s</type> <type>struct mxml_element_s</type>
<description>*** An XML element value.</description> <description>An XML element value.</description>
</typedef> </typedef>
<struct name="mxml_index_s"> <struct name="mxml_index_s">
<description>An XML node index.</description> <description>An XML node index.</description>
@ -891,7 +890,7 @@ the walk to the node's children.</description>
</struct> </struct>
<typedef name="mxml_index_t"> <typedef name="mxml_index_t">
<type>struct mxml_index_s</type> <type>struct mxml_index_s</type>
<description>*** An XML node index.</description> <description>An XML node index.</description>
</typedef> </typedef>
<struct name="mxml_node_s"> <struct name="mxml_node_s">
<description>An XML node.</description> <description>An XML node.</description>
@ -926,7 +925,7 @@ the walk to the node's children.</description>
</struct> </struct>
<typedef name="mxml_node_t"> <typedef name="mxml_node_t">
<type>struct mxml_node_s</type> <type>struct mxml_node_s</type>
<description>*** An XML node.</description> <description>An XML node.</description>
</typedef> </typedef>
<struct name="mxml_text_s"> <struct name="mxml_text_s">
<description>An XML text value.</description> <description>An XML text value.</description>
@ -941,7 +940,7 @@ the walk to the node's children.</description>
</struct> </struct>
<typedef name="mxml_text_t"> <typedef name="mxml_text_t">
<type>struct mxml_text_s</type> <type>struct mxml_text_s</type>
<description>*** An XML text value.</description> <description>An XML text value.</description>
</typedef> </typedef>
<enumeration name="mxml_type_e"> <enumeration name="mxml_type_e">
<description>The XML node type.</description> <description>The XML node type.</description>
@ -969,7 +968,7 @@ the walk to the node's children.</description>
</enumeration> </enumeration>
<typedef name="mxml_value_t"> <typedef name="mxml_value_t">
<type>union mxml_value_u</type> <type>union mxml_value_u</type>
<description>*** An XML node value.</description> <description>An XML node value.</description>
</typedef> </typedef>
<union name="mxml_value_u"> <union name="mxml_value_u">
<description>An XML node value.</description> <description>An XML node value.</description>

227
mxmldoc.c
View File

@ -1,4 +1,3 @@
#define DEBUG 1
/* /*
* "$Id$" * "$Id$"
* *
@ -138,6 +137,8 @@
static mxml_node_t *add_variable(mxml_node_t *parent, const char *name, static mxml_node_t *add_variable(mxml_node_t *parent, const char *name,
mxml_node_t *type); mxml_node_t *type);
static mxml_node_t *find_public(mxml_node_t *node, mxml_node_t *top,
const char *name);
static char *get_comment_info(mxml_node_t *description); static char *get_comment_info(mxml_node_t *description);
static char *get_text(mxml_node_t *node, char *buffer, int buflen); static char *get_text(mxml_node_t *node, char *buffer, int buflen);
static mxml_node_t *new_documentation(mxml_node_t **mxmldoc); static mxml_node_t *new_documentation(mxml_node_t **mxmldoc);
@ -473,6 +474,65 @@ add_variable(mxml_node_t *parent, /* I - Parent node */
} }
/*
* 'find_public()' - Find a public function, type, etc.
*/
static mxml_node_t * /* I - Found node or NULL */
find_public(mxml_node_t *node, /* I - Current node */
mxml_node_t *top, /* I - Top node */
const char *name) /* I - Name of element */
{
mxml_node_t *description, /* Description node */
*comment; /* Comment node */
for (node = mxmlFindElement(node, top, name, NULL, NULL,
node == top ? MXML_DESCEND_FIRST :
MXML_NO_DESCEND);
node;
node = mxmlFindElement(node, top, name, NULL, NULL, MXML_NO_DESCEND))
{
/*
* Get the description for this node...
*/
description = mxmlFindElement(node, node, "description", NULL, NULL,
MXML_DESCEND_FIRST);
/*
* A missing or empty description signals a private node...
*/
if (!description || !description->child)
continue;
/*
* Look for @private@ in the comment text...
*/
for (comment = description->child; comment; comment = comment->next)
if (strstr(comment->value.text.string, "@private@"))
break;
if (!comment)
{
/*
* No @private@, so return this node...
*/
return (node);
}
}
/*
* If we get here, there are no (more) public nodes...
*/
return (NULL);
}
/* /*
* 'get_comment_info()' - Get info from comment. * 'get_comment_info()' - Get info from comment.
*/ */
@ -792,27 +852,6 @@ scan_file(const char *filename, /* I - Filename */
fprintf(stderr, " scope = %s\n", scope ? scope : "(null)"); fprintf(stderr, " scope = %s\n", scope ? scope : "(null)");
#endif /* DEBUG */ #endif /* DEBUG */
if (comment->last_child &&
strstr(comment->last_child->value.text.string, "@private@"))
{
mxmlDelete(type);
type = NULL;
if (typedefnode)
{
mxmlDelete(typedefnode);
typedefnode = NULL;
}
mxmlDelete(structclass);
structclass = NULL;
braces ++;
function = NULL;
variable = NULL;
break;
}
if (type->child->next) if (type->child->next)
{ {
mxmlElementSetAttr(structclass, "name", mxmlElementSetAttr(structclass, "name",
@ -862,9 +901,9 @@ scan_file(const char *filename, /* I - Filename */
#ifdef DEBUG #ifdef DEBUG
fputs(" duplicating comment for typedef...\n", stderr); fputs(" duplicating comment for typedef...\n", stderr);
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(typedefnode, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
comment->last_child); comment->last_child);
update_comment(typedefnode, comment->last_child);
} }
description = mxmlNewElement(structclass, "description"); description = mxmlNewElement(structclass, "description");
@ -872,9 +911,9 @@ scan_file(const char *filename, /* I - Filename */
fprintf(stderr, " adding comment to %s...\n", fprintf(stderr, " adding comment to %s...\n",
structclass->value.element.name); structclass->value.element.name);
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(structclass, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
comment->last_child); comment->last_child);
update_comment(structclass, comment->last_child);
if (scan_file(filename, fp, structclass)) if (scan_file(filename, fp, structclass))
{ {
@ -944,18 +983,18 @@ scan_file(const char *filename, /* I - Filename */
#ifdef DEBUG #ifdef DEBUG
fputs(" duplicating comment for typedef...\n", stderr); fputs(" duplicating comment for typedef...\n", stderr);
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(typedefnode, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
comment->last_child); comment->last_child);
update_comment(typedefnode, comment->last_child);
} }
description = mxmlNewElement(enumeration, "description"); description = mxmlNewElement(enumeration, "description");
#ifdef DEBUG #ifdef DEBUG
fputs(" adding comment to enumeration...\n", stderr); fputs(" adding comment to enumeration...\n", stderr);
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(enumeration, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
comment->last_child); comment->last_child);
update_comment(enumeration, comment->last_child);
} }
else if (type && type->child && else if (type && type->child &&
!strcmp(type->child->value.text.string, "extern")) !strcmp(type->child->value.text.string, "extern"))
@ -1259,6 +1298,7 @@ scan_file(const char *filename, /* I - Filename */
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(typedefnode, update_comment(typedefnode,
mxmlNewText(description, 0, buffer)); mxmlNewText(description, 0, buffer));
typedefnode = NULL;
} }
else if (strcmp(tree->value.element.name, "mxmldoc") && else if (strcmp(tree->value.element.name, "mxmldoc") &&
!mxmlFindElement(tree, tree, "description", !mxmlFindElement(tree, tree, "description",
@ -1364,6 +1404,7 @@ scan_file(const char *filename, /* I - Filename */
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(typedefnode, update_comment(typedefnode,
mxmlNewText(description, 0, buffer)); mxmlNewText(description, 0, buffer));
typedefnode = NULL;
} }
else if (strcmp(tree->value.element.name, "mxmldoc") && else if (strcmp(tree->value.element.name, "mxmldoc") &&
!mxmlFindElement(tree, tree, "description", !mxmlFindElement(tree, tree, "description",
@ -1640,9 +1681,9 @@ scan_file(const char *filename, /* I - Filename */
#ifdef DEBUG #ifdef DEBUG
fputs(" adding comment to returnvalue...\n", stderr); fputs(" adding comment to returnvalue...\n", stderr);
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(returnvalue, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
comment->last_child); comment->last_child);
update_comment(returnvalue, comment->last_child);
} }
else else
mxmlDelete(type); mxmlDelete(type);
@ -1651,9 +1692,9 @@ scan_file(const char *filename, /* I - Filename */
#ifdef DEBUG #ifdef DEBUG
fputs(" adding comment to function...\n", stderr); fputs(" adding comment to function...\n", stderr);
#endif /* DEBUG */ #endif /* DEBUG */
update_comment(function, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
comment->last_child); comment->last_child);
update_comment(function, comment->last_child);
type = NULL; type = NULL;
} }
@ -2026,16 +2067,6 @@ update_comment(mxml_node_t *parent, /* I - Parent node */
for (; ptr > comment->value.text.string && isspace(*ptr & 255); ptr --) for (; ptr > comment->value.text.string && isspace(*ptr & 255); ptr --)
*ptr = '\0'; *ptr = '\0';
/*
* Remove private types, variables, etc.
*/
if (strstr(comment->value.text.string, "@private@"))
{
fputs("Deleting private node!\n", stderr);
mxmlDelete(parent);
}
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, " updated comment = %s\n", comment->value.text.string); fprintf(stderr, " updated comment = %s\n", comment->value.text.string);
#endif /* DEBUG */ #endif /* DEBUG */
@ -2211,19 +2242,19 @@ write_documentation(
puts("<h2>Contents</h2>"); puts("<h2>Contents</h2>");
puts("<ul>"); puts("<ul>");
if (mxmlFindElement(doc, doc, "class", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "class"))
puts("\t<li><a href='#_classes'>Classes</a></li>"); puts("\t<li><a href='#_classes'>Classes</a></li>");
if (mxmlFindElement(doc, doc, "enumeration", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "enumeration"))
puts("\t<li><a href='#_enumerations'>Enumerations</a></li>"); puts("\t<li><a href='#_enumerations'>Enumerations</a></li>");
if (mxmlFindElement(doc, doc, "function", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "function"))
puts("\t<li><a href='#_functions'>Functions</a></li>"); puts("\t<li><a href='#_functions'>Functions</a></li>");
if (mxmlFindElement(doc, doc, "struct", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "struct"))
puts("\t<li><a href='#_structures'>Structures</a></li>"); puts("\t<li><a href='#_structures'>Structures</a></li>");
if (mxmlFindElement(doc, doc, "typedef", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "typedef"))
puts("\t<li><a href='#_types'>Types</a></li>"); puts("\t<li><a href='#_types'>Types</a></li>");
if (mxmlFindElement(doc, doc, "union", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "union"))
puts("\t<li><a href='#_unions'>Unions</a></li>"); puts("\t<li><a href='#_unions'>Unions</a></li>");
if (mxmlFindElement(doc, doc, "variable", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "variable"))
puts("\t<li><a href='#_variables'>Variables</a></li>"); puts("\t<li><a href='#_variables'>Variables</a></li>");
puts("</ul>"); puts("</ul>");
@ -2231,17 +2262,15 @@ write_documentation(
* List of classes... * List of classes...
*/ */
if (mxmlFindElement(doc, doc, "class", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "class"))
{ {
puts("<!-- NEW PAGE -->\n" puts("<!-- NEW PAGE -->\n"
"<h2><a name='_classes'>Classes</a></h2>\n" "<h2><a name='_classes'>Classes</a></h2>\n"
"<ul>"); "<ul>");
for (scut = mxmlFindElement(doc, doc, "class", NULL, NULL, for (scut = find_public(doc, doc, "class");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "class", NULL, NULL, scut = find_public(scut, doc, "class"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name, printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name,
@ -2251,11 +2280,9 @@ write_documentation(
puts("</ul>"); puts("</ul>");
for (scut = mxmlFindElement(doc, doc, "class", NULL, NULL, for (scut = find_public(doc, doc, "class");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "class", NULL, NULL, scut = find_public(scut, doc, "class"))
MXML_NO_DESCEND))
{ {
cname = mxmlElementGetAttr(scut, "name"); cname = mxmlElementGetAttr(scut, "name");
description = mxmlFindElement(scut, scut, "description", NULL, description = mxmlFindElement(scut, scut, "description", NULL,
@ -2301,11 +2328,11 @@ write_documentation(
printf(" %s;\n", mxmlElementGetAttr(arg, "name")); printf(" %s;\n", mxmlElementGetAttr(arg, "name"));
} }
for (function = mxmlFindElement(scut, scut, "function", "scope", scopes[i], for (function = mxmlFindElement(scut, scut, "function", "scope",
MXML_DESCEND_FIRST); scopes[i], MXML_DESCEND_FIRST);
function; function;
function = mxmlFindElement(function, scut, "function", "scope", scopes[i], function = mxmlFindElement(function, scut, "function", "scope",
MXML_NO_DESCEND)) scopes[i], MXML_NO_DESCEND))
{ {
if (!inscope) if (!inscope)
{ {
@ -2420,17 +2447,15 @@ write_documentation(
* List of enumerations... * List of enumerations...
*/ */
if (mxmlFindElement(doc, doc, "enumeration", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "enumeration"))
{ {
puts("<!-- NEW PAGE -->\n" puts("<!-- NEW PAGE -->\n"
"<h2><a name='_enumerations'>Enumerations</a></h2>\n" "<h2><a name='_enumerations'>Enumerations</a></h2>\n"
"<ul>"); "<ul>");
for (scut = mxmlFindElement(doc, doc, "enumeration", NULL, NULL, for (scut = find_public(doc, doc, "enumeration");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "enumeration", NULL, NULL, scut = find_public(scut, doc, "enumeration"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name, printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name,
@ -2440,11 +2465,9 @@ write_documentation(
puts("</ul>"); puts("</ul>");
for (scut = mxmlFindElement(doc, doc, "enumeration", NULL, NULL, for (scut = find_public(doc, doc, "enumeration");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "enumeration", NULL, NULL, scut = find_public(scut, doc, "enumeration"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
description = mxmlFindElement(scut, scut, "description", NULL, description = mxmlFindElement(scut, scut, "description", NULL,
@ -2490,17 +2513,15 @@ write_documentation(
* List of functions... * List of functions...
*/ */
if (mxmlFindElement(doc, doc, "function", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "function"))
{ {
puts("<!-- NEW PAGE -->\n" puts("<!-- NEW PAGE -->\n"
"<h2><a name='_functions'>Functions</a></h2>\n" "<h2><a name='_functions'>Functions</a></h2>\n"
"<ul>"); "<ul>");
for (function = mxmlFindElement(doc, doc, "function", NULL, NULL, for (function = find_public(doc, doc, "function");
MXML_DESCEND_FIRST);
function; function;
function = mxmlFindElement(function, doc, "function", NULL, NULL, function = find_public(function, doc, "function"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(function, "name"); name = mxmlElementGetAttr(function, "name");
printf("\t<li><a href='#%s'><tt>%s()</tt></a> %s</li>\n", name, name, printf("\t<li><a href='#%s'><tt>%s()</tt></a> %s</li>\n", name, name,
@ -2510,11 +2531,9 @@ write_documentation(
puts("</ul>"); puts("</ul>");
for (function = mxmlFindElement(doc, doc, "function", NULL, NULL, for (function = find_public(doc, doc, "function");
MXML_DESCEND_FIRST);
function; function;
function = mxmlFindElement(function, doc, "function", NULL, NULL, function = find_public(function, doc, "function"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(function, "name"); name = mxmlElementGetAttr(function, "name");
description = mxmlFindElement(function, function, "description", NULL, description = mxmlFindElement(function, function, "description", NULL,
@ -2618,17 +2637,15 @@ write_documentation(
* List of structures... * List of structures...
*/ */
if (mxmlFindElement(doc, doc, "struct", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "struct"))
{ {
puts("<!-- NEW PAGE -->\n" puts("<!-- NEW PAGE -->\n"
"<h2><a name='_structures'>Structures</a></h2>\n" "<h2><a name='_structures'>Structures</a></h2>\n"
"<ul>"); "<ul>");
for (scut = mxmlFindElement(doc, doc, "struct", NULL, NULL, for (scut = find_public(doc, doc, "struct");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "struct", NULL, NULL, scut = find_public(scut, doc, "struct"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name, printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name,
@ -2638,11 +2655,9 @@ write_documentation(
puts("</ul>"); puts("</ul>");
for (scut = mxmlFindElement(doc, doc, "struct", NULL, NULL, for (scut = find_public(doc, doc, "struct");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "struct", NULL, NULL, scut = find_public(scut, doc, "struct"))
MXML_NO_DESCEND))
{ {
cname = mxmlElementGetAttr(scut, "name"); cname = mxmlElementGetAttr(scut, "name");
description = mxmlFindElement(scut, scut, "description", NULL, description = mxmlFindElement(scut, scut, "description", NULL,
@ -2785,17 +2800,15 @@ write_documentation(
* List of types... * List of types...
*/ */
if (mxmlFindElement(doc, doc, "typedef", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "typedef"))
{ {
puts("<!-- NEW PAGE -->\n" puts("<!-- NEW PAGE -->\n"
"<h2><a name='_types'>Types</a></h2>\n" "<h2><a name='_types'>Types</a></h2>\n"
"<ul>"); "<ul>");
for (scut = mxmlFindElement(doc, doc, "typedef", NULL, NULL, for (scut = find_public(doc, doc, "typedef");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "typedef", NULL, NULL, scut = find_public(scut, doc, "typedef"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name, printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name,
@ -2805,11 +2818,9 @@ write_documentation(
puts("</ul>"); puts("</ul>");
for (scut = mxmlFindElement(doc, doc, "typedef", NULL, NULL, for (scut = find_public(doc, doc, "typedef");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "typedef", NULL, NULL, scut = find_public(scut, doc, "typedef"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
description = mxmlFindElement(scut, scut, "description", NULL, description = mxmlFindElement(scut, scut, "description", NULL,
@ -2909,17 +2920,15 @@ write_documentation(
* List of unions... * List of unions...
*/ */
if (mxmlFindElement(doc, doc, "union", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "union"))
{ {
puts("<!-- NEW PAGE -->\n" puts("<!-- NEW PAGE -->\n"
"<h2><a name='_unions'>Unions</a></h2>\n" "<h2><a name='_unions'>Unions</a></h2>\n"
"<ul>"); "<ul>");
for (scut = mxmlFindElement(doc, doc, "union", NULL, NULL, for (scut = find_public(doc, doc, "union");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "union", NULL, NULL, scut = find_public(scut, doc, "union"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name, printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name,
@ -2929,11 +2938,9 @@ write_documentation(
puts("</ul>"); puts("</ul>");
for (scut = mxmlFindElement(doc, doc, "union", NULL, NULL, for (scut = find_public(doc, doc, "union");
MXML_DESCEND_FIRST);
scut; scut;
scut = mxmlFindElement(scut, doc, "union", NULL, NULL, scut = find_public(scut, doc, "union"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(scut, "name"); name = mxmlElementGetAttr(scut, "name");
description = mxmlFindElement(scut, scut, "description", NULL, description = mxmlFindElement(scut, scut, "description", NULL,
@ -2995,17 +3002,15 @@ write_documentation(
* Variables... * Variables...
*/ */
if (mxmlFindElement(doc, doc, "variable", NULL, NULL, MXML_DESCEND_FIRST)) if (find_public(doc, doc, "variable"))
{ {
puts("<!-- NEW PAGE -->\n" puts("<!-- NEW PAGE -->\n"
"<h2><a name='_variables'>Variables</a></h2>\n" "<h2><a name='_variables'>Variables</a></h2>\n"
"<ul>"); "<ul>");
for (arg = mxmlFindElement(doc, doc, "variable", NULL, NULL, for (arg = find_public(doc, doc, "variable");
MXML_DESCEND_FIRST);
arg; arg;
arg = mxmlFindElement(arg, doc, "variable", NULL, NULL, arg = find_public(arg, doc, "variable"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(arg, "name"); name = mxmlElementGetAttr(arg, "name");
printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name, printf("\t<li><a href='#%s'><tt>%s</tt></a> %s</li>\n", name, name,
@ -3015,11 +3020,9 @@ write_documentation(
puts("</ul>"); puts("</ul>");
for (arg = mxmlFindElement(doc, doc, "variable", NULL, NULL, for (arg = find_public(doc, doc, "variable");
MXML_DESCEND_FIRST);
arg; arg;
arg = mxmlFindElement(arg, doc, "variable", NULL, NULL, arg = find_public(arg, doc, "variable"))
MXML_NO_DESCEND))
{ {
name = mxmlElementGetAttr(arg, "name"); name = mxmlElementGetAttr(arg, "name");
description = mxmlFindElement(arg, arg, "description", NULL, description = mxmlFindElement(arg, arg, "description", NULL,

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
(cd ..; make mxmldoc-static)
if test $# -gt 0; then if test $# -gt 0; then
files=$* files=$*

View File

@ -89,3 +89,16 @@ foo_void_func(void)
{ {
puts("foo_void_func()"); puts("foo_void_func()");
} }
/*
* 'foo_private_func()' - Private function.
*
* @private@
*/
void
foo_private_func(void)
{
puts("foo_private_func()");
}

View File

@ -46,3 +46,9 @@ foo_s::foo_s(float f, int b)
foo_s::~foo_s() foo_s::~foo_s()
{ {
} }
typedef struct foo_private_s /* @private@ */
{
int a; /* Value of "a" */
char b[255]; /* Value of "b" */
} foo_private_t;

3
test/type.cxx Normal file
View File

@ -0,0 +1,3 @@
typedef int foo_simple_t; /* Simple integer type */
typedef int foo_simple_private_t; /* @private@ */