More HTMLDOC output tweeks...

web
Michael R Sweet 21 years ago
parent 885cf929af
commit 011d8d34d7
  1. 120
      documentation.html
  2. 25
      mxmldoc.c

@ -22,7 +22,10 @@
<ul>
<li><a href='#mxml_type_e'><tt>mxml_type_e</tt></a></li>
</ul>
<!-- NEW PAGE -->
<h3><a name='mxml_type_e'>mxml_type_e</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>The XML node type.</p>
<h4>Values</h4>
<p class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' width='80%'>
@ -66,7 +69,10 @@
<li><a href='#mxmlWalkNext'><tt>mxmlWalkNext()</tt></a></li>
<li><a href='#mxmlWalkPrev'><tt>mxmlWalkPrev()</tt></a></li>
</ul>
<!-- NEW PAGE -->
<h3><a name='mxmlAdd'>mxmlAdd()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Add a node to a tree.
Adds the specified node to the parent. If the child argument is not
@ -95,7 +101,10 @@ mxmlAdd(
</tbody></table></p>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlDelete'>mxmlDelete()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Delete a node and all of its children.
If the specified node has a parent, this function first removes the
@ -114,7 +123,10 @@ mxmlDelete(
</tbody></table></p>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlElementGetAttr'>mxmlElementGetAttr()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Get an attribute.
This function returns NULL if the node is not an element or the
@ -135,7 +147,10 @@ mxmlElementGetAttr(
</tbody></table></p>
<h4>Returns</h4>
<p>Attribute value or NULL</p>
<!-- NEW PAGE -->
<h3><a name='mxmlElementSetAttr'>mxmlElementSetAttr()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set an attribute.
If the named attribute already exists, the value of the attribute
@ -160,7 +175,10 @@ mxmlElementSetAttr(
</tbody></table></p>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlEntityGetName'>mxmlEntityGetName()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Get the name that corresponds to the character value.
If val does not need to be represented by a named entity, NULL is returned.</p>
@ -178,7 +196,10 @@ mxmlEntityGetName(
</tbody></table></p>
<h4>Returns</h4>
<p>Entity name or NULL</p>
<!-- NEW PAGE -->
<h3><a name='mxmlEntityGetValue'>mxmlEntityGetValue()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Get the character corresponding to a named entity.
The entity name can also be a numeric constant. -1 is returned if the
@ -197,7 +218,10 @@ mxmlEntityGetValue(
</tbody></table></p>
<h4>Returns</h4>
<p>Character value or -1 on error</p>
<!-- NEW PAGE -->
<h3><a name='mxmlFindElement'>mxmlFindElement()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Find the named element.
The search is constrained by the name, attribute name, and value; any
@ -232,7 +256,10 @@ mxmlFindElement(
</tbody></table></p>
<h4>Returns</h4>
<p>Element node or NULL</p>
<!-- NEW PAGE -->
<h3><a name='mxmlLoadFile'>mxmlLoadFile()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Load a file into an XML node tree.
The nodes in the specified file are added to the specified top node.
@ -263,7 +290,10 @@ mxmlLoadFile(
</tbody></table></p>
<h4>Returns</h4>
<p>First node or NULL if the file could not be read.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlLoadString'>mxmlLoadString()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Load a string into an XML node tree.
The nodes in the specified string are added to the specified top node.
@ -294,7 +324,10 @@ mxmlLoadString(
</tbody></table></p>
<h4>Returns</h4>
<p>First node or NULL if the string has errors.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlNewElement'>mxmlNewElement()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Create a new element node.
The new element node is added to the end of the specified parent's child
@ -316,7 +349,10 @@ mxmlNewElement(
</tbody></table></p>
<h4>Returns</h4>
<p>New node</p>
<!-- NEW PAGE -->
<h3><a name='mxmlNewInteger'>mxmlNewInteger()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Create a new integer node.
The new integer node is added to the end of the specified parent's child
@ -338,7 +374,10 @@ mxmlNewInteger(
</tbody></table></p>
<h4>Returns</h4>
<p>New node</p>
<!-- NEW PAGE -->
<h3><a name='mxmlNewOpaque'>mxmlNewOpaque()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Create a new opaque string.
The new opaque node is added to the end of the specified parent's child
@ -361,7 +400,10 @@ mxmlNewOpaque(
</tbody></table></p>
<h4>Returns</h4>
<p>New node</p>
<!-- NEW PAGE -->
<h3><a name='mxmlNewReal'>mxmlNewReal()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Create a new real number node.
The new real number node is added to the end of the specified parent's
@ -383,7 +425,10 @@ mxmlNewReal(
</tbody></table></p>
<h4>Returns</h4>
<p>New node</p>
<!-- NEW PAGE -->
<h3><a name='mxmlNewText'>mxmlNewText()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Create a new text fragment node.
The new text node is added to the end of the specified parent's child
@ -409,7 +454,10 @@ mxmlNewText(
</tbody></table></p>
<h4>Returns</h4>
<p>New node</p>
<!-- NEW PAGE -->
<h3><a name='mxmlNewTextf'>mxmlNewTextf()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Create a new formatted text fragment node.
The new text node is added to the end of the specified parent's child
@ -437,7 +485,10 @@ mxmlNewTextf(
</tbody></table></p>
<h4>Returns</h4>
<p>New node</p>
<!-- NEW PAGE -->
<h3><a name='mxmlRemove'>mxmlRemove()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Remove a node from its parent.
Does not free memory used by the node - use mxmlDelete() for that.
@ -456,7 +507,10 @@ mxmlRemove(
</tbody></table></p>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSaveAllocString'>mxmlSaveAllocString()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Save an XML node tree to an allocated string.
This function returns a pointer to a string containing the textual
@ -480,7 +534,10 @@ mxmlSaveAllocString(
</tbody></table></p>
<h4>Returns</h4>
<p>Allocated string or NULL</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSaveFile'>mxmlSaveFile()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Save an XML tree to a file.
The callback argument specifies a function that returns a whitespace
@ -506,7 +563,10 @@ mxmlSaveFile(
</tbody></table></p>
<h4>Returns</h4>
<p>0 on success, -1 on error.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSaveString'>mxmlSaveString()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Save an XML node tree to a string.
This function returns the total number of bytes that would be
@ -532,7 +592,10 @@ mxmlSaveString(
</tbody></table></p>
<h4>Returns</h4>
<p>Size of string</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSetElement'>mxmlSetElement()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set the name of an element node.
The node is not changed if it is not an element node.</p>
@ -552,7 +615,10 @@ mxmlSetElement(
</tbody></table></p>
<h4>Returns</h4>
<p>0 on success, -1 on failure</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSetErrorCallback'>mxmlSetErrorCallback()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set the error message callback.</p>
<h4>Syntax</h4>
<pre>
@ -568,7 +634,10 @@ mxmlSetErrorCallback(
</tbody></table></p>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSetInteger'>mxmlSetInteger()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set the value of an integer node.
The node is not changed if it is not an integer node.</p>
@ -588,7 +657,10 @@ mxmlSetInteger(
</tbody></table></p>
<h4>Returns</h4>
<p>0 on success, -1 on failure</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSetOpaque'>mxmlSetOpaque()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set the value of an opaque node.
The node is not changed if it is not an opaque node.</p>
@ -608,7 +680,10 @@ mxmlSetOpaque(
</tbody></table></p>
<h4>Returns</h4>
<p>0 on success, -1 on failure</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSetReal'>mxmlSetReal()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set the value of a real number node.
The node is not changed if it is not a real number node.</p>
@ -628,7 +703,10 @@ mxmlSetReal(
</tbody></table></p>
<h4>Returns</h4>
<p>0 on success, -1 on failure</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSetText'>mxmlSetText()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set the value of a text node.
The node is not changed if it is not a text node.</p>
@ -650,7 +728,10 @@ mxmlSetText(
</tbody></table></p>
<h4>Returns</h4>
<p>0 on success, -1 on failure</p>
<!-- NEW PAGE -->
<h3><a name='mxmlSetTextf'>mxmlSetTextf()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Set the value of a text node to a formatted string.
The node is not changed if it is not a text node.</p>
@ -674,7 +755,10 @@ mxmlSetTextf(
</tbody></table></p>
<h4>Returns</h4>
<p>0 on success, -1 on failure</p>
<!-- NEW PAGE -->
<h3><a name='mxmlWalkNext'>mxmlWalkNext()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Walk to the next logical node in the tree.
The descend argument controls whether the first child is considered
@ -698,7 +782,10 @@ mxmlWalkNext(
</tbody></table></p>
<h4>Returns</h4>
<p>Next node or NULL</p>
<!-- NEW PAGE -->
<h3><a name='mxmlWalkPrev'>mxmlWalkPrev()</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>Walk to the previous logical node in the tree.
The descend argument controls whether the previous node's last child
@ -730,7 +817,10 @@ mxmlWalkPrev(
<li><a href='#mxml_text_s'><tt>mxml_text_s</tt></a></li>
<li><a href='#mxml_value_s'><tt>mxml_value_s</tt></a></li>
</ul>
<!-- NEW PAGE -->
<h3><a name='mxml_attr_s'>mxml_attr_s</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML element attribute value.</p>
<h4>Definition</h4>
<pre>
@ -747,7 +837,10 @@ struct mxml_attr_s
<tr><td><tt>name</tt></td><td>Attribute name</td></tr>
<tr><td><tt>value</tt></td><td>Attribute value</td></tr>
</tbody></table></p>
<!-- NEW PAGE -->
<h3><a name='mxml_node_s'>mxml_node_s</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML node.</p>
<h4>Definition</h4>
<pre>
@ -774,7 +867,10 @@ struct mxml_node_s
<tr><td><tt>type</tt></td><td>Node type</td></tr>
<tr><td><tt>value</tt></td><td>Node value</td></tr>
</tbody></table></p>
<!-- NEW PAGE -->
<h3><a name='mxml_text_s'>mxml_text_s</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML text value.</p>
<h4>Definition</h4>
<pre>
@ -791,7 +887,10 @@ struct mxml_text_s
<tr><td><tt>string</tt></td><td>Fragment string</td></tr>
<tr><td><tt>whitespace</tt></td><td>Leading whitespace?</td></tr>
</tbody></table></p>
<!-- NEW PAGE -->
<h3><a name='mxml_value_s'>mxml_value_s</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML element value.</p>
<h4>Definition</h4>
<pre>
@ -820,37 +919,55 @@ struct mxml_value_s
<li><a href='#mxml_type_t'><tt>mxml_type_t</tt></a></li>
<li><a href='#mxml_value_t'><tt>mxml_value_t</tt></a></li>
</ul>
<!-- NEW PAGE -->
<h3><a name='mxml_attr_t'>mxml_attr_t</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML element attribute value.</p>
<h4>Definition</h4>
<pre>
typedef struct <a href='#mxml_attr_s'>mxml_attr_s</a> mxml_attr_t;
</pre>
<!-- NEW PAGE -->
<h3><a name='mxml_element_t'>mxml_element_t</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML element value.</p>
<h4>Definition</h4>
<pre>
typedef struct <a href='#mxml_value_s'>mxml_value_s</a> mxml_element_t;
</pre>
<!-- NEW PAGE -->
<h3><a name='mxml_node_t'>mxml_node_t</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML node.</p>
<h4>Definition</h4>
<pre>
typedef struct <a href='#mxml_node_s'>mxml_node_s</a> mxml_node_t;
</pre>
<!-- NEW PAGE -->
<h3><a name='mxml_text_t'>mxml_text_t</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML text value.</p>
<h4>Definition</h4>
<pre>
typedef struct <a href='#mxml_text_s'>mxml_text_s</a> mxml_text_t;
</pre>
<!-- NEW PAGE -->
<h3><a name='mxml_type_t'>mxml_type_t</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>The XML node type.</p>
<h4>Definition</h4>
<pre>
typedef enum <a href='#mxml_type_e'>mxml_type_e</a> mxml_type_t;
</pre>
<!-- NEW PAGE -->
<h3><a name='mxml_value_t'>mxml_value_t</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML node value.</p>
<h4>Definition</h4>
<pre>
@ -861,7 +978,10 @@ typedef union <a href='#mxml_value_u'>mxml_value_u</a> mxml_value_t;
<ul>
<li><a href='#mxml_value_u'><tt>mxml_value_u</tt></a></li>
</ul>
<!-- NEW PAGE -->
<h3><a name='mxml_value_u'>mxml_value_u</a></h3>
<hr noshade/>
<h4>Description</h4>
<p>An XML node value.</p>
<h4>Definition</h4>
<pre>

@ -1,5 +1,5 @@
/*
* "$Id: mxmldoc.c,v 1.24 2004/03/04 21:51:30 mike Exp $"
* "$Id: mxmldoc.c,v 1.25 2004/03/04 22:02:01 mike Exp $"
*
* Documentation generator using mini-XML, a small XML-like file parsing
* library.
@ -1560,12 +1560,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
MXML_NO_DESCEND))
{
name = mxmlElementGetAttr(scut, "name");
puts("<!-- NEW PAGE -->");
printf("<h3><a name='%s'>%s</a></h3>\n", name, name);
puts("<hr noshade/>");
description = mxmlFindElement(scut, scut, "description", NULL,
NULL, MXML_DESCEND_FIRST);
if (description)
{
puts("<h4>Description</h4>");
fputs("<p>", stdout);
write_element(NULL, description);
puts("</p>");
@ -1643,12 +1646,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
MXML_NO_DESCEND))
{
name = mxmlElementGetAttr(scut, "name");
puts("<!-- NEW PAGE -->");
printf("<h3><a name='%s'>%s</a></h3>\n", name, name);
puts("<hr noshade/>");
description = mxmlFindElement(scut, scut, "description", NULL,
NULL, MXML_DESCEND_FIRST);
if (description)
{
puts("<h4>Description</h4>");
fputs("<p>", stdout);
write_element(NULL, description);
puts("</p>");
@ -1708,12 +1714,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
MXML_NO_DESCEND))
{
name = mxmlElementGetAttr(function, "name");
puts("<!-- NEW PAGE -->");
printf("<h3><a name='%s'>%s()</a></h3>\n", name, name);
puts("<hr noshade/>");
description = mxmlFindElement(function, function, "description", NULL,
NULL, MXML_DESCEND_FIRST);
if (description)
{
puts("<h4>Description</h4>");
fputs("<p>", stdout);
write_element(NULL, description);
puts("</p>");
@ -1825,12 +1834,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
MXML_NO_DESCEND))
{
name = mxmlElementGetAttr(scut, "name");
puts("<!-- NEW PAGE -->");
printf("<h3><a name='%s'>%s</a></h3>\n", name, name);
puts("<hr noshade/>");
description = mxmlFindElement(scut, scut, "description", NULL,
NULL, MXML_DESCEND_FIRST);
if (description)
{
puts("<h4>Description</h4>");
fputs("<p>", stdout);
write_element(NULL, description);
puts("</p>");
@ -1908,12 +1920,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
MXML_NO_DESCEND))
{
name = mxmlElementGetAttr(scut, "name");
puts("<!-- NEW PAGE -->");
printf("<h3><a name='%s'>%s</a></h3>\n", name, name);
puts("<hr noshade/>");
description = mxmlFindElement(scut, scut, "description", NULL,
NULL, MXML_DESCEND_FIRST);
if (description)
{
puts("<h4>Description</h4>");
fputs("<p>", stdout);
write_element(NULL, description);
puts("</p>");
@ -1958,12 +1973,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
MXML_NO_DESCEND))
{
name = mxmlElementGetAttr(scut, "name");
puts("<!-- NEW PAGE -->");
printf("<h3><a name='%s'>%s</a></h3>\n", name, name);
puts("<hr noshade/>");
description = mxmlFindElement(scut, scut, "description", NULL,
NULL, MXML_DESCEND_FIRST);
if (description)
{
puts("<h4>Description</h4>");
fputs("<p>", stdout);
write_element(NULL, description);
puts("</p>");
@ -2041,12 +2059,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
MXML_NO_DESCEND))
{
name = mxmlElementGetAttr(arg, "name");
puts("<!-- NEW PAGE -->");
printf("<h3><a name='%s'>%s</a></h3>\n", name, name);
puts("<hr noshade/>");
description = mxmlFindElement(arg, arg, "description", NULL,
NULL, MXML_DESCEND_FIRST);
if (description)
{
puts("<h4>Description</h4>");
fputs("<p>", stdout);
write_element(NULL, description);
puts("</p>");
@ -2201,5 +2222,5 @@ ws_cb(mxml_node_t *node, /* I - Element node */
/*
* End of "$Id: mxmldoc.c,v 1.24 2004/03/04 21:51:30 mike Exp $".
* End of "$Id: mxmldoc.c,v 1.25 2004/03/04 22:02:01 mike Exp $".
*/

Loading…
Cancel
Save