From 011d8d34d7dc9e7adcca748c1a5af092b1e1632a Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 4 Mar 2004 22:02:01 +0000 Subject: [PATCH] More HTMLDOC output tweeks... --- documentation.html | 120 +++++++++++++++++++++++++++++++++++++++++++++ mxmldoc.c | 25 +++++++++- 2 files changed, 143 insertions(+), 2 deletions(-) diff --git a/documentation.html b/documentation.html index 953d19e..f5f8b5b 100644 --- a/documentation.html +++ b/documentation.html @@ -22,7 +22,10 @@ +

mxml_type_e

+
+

Description

The XML node type.

Values

@@ -66,7 +69,10 @@
  • mxmlWalkNext()
  • mxmlWalkPrev()
  • +

    mxmlAdd()

    +
    +

    Description

    Add a node to a tree. Adds the specified node to the parent. If the child argument is not @@ -95,7 +101,10 @@ mxmlAdd(

    Returns

    Nothing.

    +

    mxmlDelete()

    +
    +

    Description

    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(

    Returns

    Nothing.

    +

    mxmlElementGetAttr()

    +
    +

    Description

    Get an attribute. This function returns NULL if the node is not an element or the @@ -135,7 +147,10 @@ mxmlElementGetAttr(

    Returns

    Attribute value or NULL

    +

    mxmlElementSetAttr()

    +
    +

    Description

    Set an attribute. If the named attribute already exists, the value of the attribute @@ -160,7 +175,10 @@ mxmlElementSetAttr(

    Returns

    Nothing.

    +

    mxmlEntityGetName()

    +
    +

    Description

    Get the name that corresponds to the character value. If val does not need to be represented by a named entity, NULL is returned.

    @@ -178,7 +196,10 @@ mxmlEntityGetName(

    Returns

    Entity name or NULL

    +

    mxmlEntityGetValue()

    +
    +

    Description

    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(

    Returns

    Character value or -1 on error

    +

    mxmlFindElement()

    +
    +

    Description

    Find the named element. The search is constrained by the name, attribute name, and value; any @@ -232,7 +256,10 @@ mxmlFindElement(

    Returns

    Element node or NULL

    +

    mxmlLoadFile()

    +
    +

    Description

    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(

    Returns

    First node or NULL if the file could not be read.

    +

    mxmlLoadString()

    +
    +

    Description

    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(

    Returns

    First node or NULL if the string has errors.

    +

    mxmlNewElement()

    +
    +

    Description

    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(

    Returns

    New node

    +

    mxmlNewInteger()

    +
    +

    Description

    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(

    Returns

    New node

    +

    mxmlNewOpaque()

    +
    +

    Description

    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(

    Returns

    New node

    +

    mxmlNewReal()

    +
    +

    Description

    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(

    Returns

    New node

    +

    mxmlNewText()

    +
    +

    Description

    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(

    Returns

    New node

    +

    mxmlNewTextf()

    +
    +

    Description

    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(

    Returns

    New node

    +

    mxmlRemove()

    +
    +

    Description

    Remove a node from its parent. Does not free memory used by the node - use mxmlDelete() for that. @@ -456,7 +507,10 @@ mxmlRemove(

    Returns

    Nothing.

    +

    mxmlSaveAllocString()

    +
    +

    Description

    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(

    Returns

    Allocated string or NULL

    +

    mxmlSaveFile()

    +
    +

    Description

    Save an XML tree to a file. The callback argument specifies a function that returns a whitespace @@ -506,7 +563,10 @@ mxmlSaveFile(

    Returns

    0 on success, -1 on error.

    +

    mxmlSaveString()

    +
    +

    Description

    Save an XML node tree to a string. This function returns the total number of bytes that would be @@ -532,7 +592,10 @@ mxmlSaveString(

    Returns

    Size of string

    +

    mxmlSetElement()

    +
    +

    Description

    Set the name of an element node. The node is not changed if it is not an element node.

    @@ -552,7 +615,10 @@ mxmlSetElement(

    Returns

    0 on success, -1 on failure

    +

    mxmlSetErrorCallback()

    +
    +

    Description

    Set the error message callback.

    Syntax

    @@ -568,7 +634,10 @@ mxmlSetErrorCallback(
     

    Returns

    Nothing.

    +

    mxmlSetInteger()

    +
    +

    Description

    Set the value of an integer node. The node is not changed if it is not an integer node.

    @@ -588,7 +657,10 @@ mxmlSetInteger(

    Returns

    0 on success, -1 on failure

    +

    mxmlSetOpaque()

    +
    +

    Description

    Set the value of an opaque node. The node is not changed if it is not an opaque node.

    @@ -608,7 +680,10 @@ mxmlSetOpaque(

    Returns

    0 on success, -1 on failure

    +

    mxmlSetReal()

    +
    +

    Description

    Set the value of a real number node. The node is not changed if it is not a real number node.

    @@ -628,7 +703,10 @@ mxmlSetReal(

    Returns

    0 on success, -1 on failure

    +

    mxmlSetText()

    +
    +

    Description

    Set the value of a text node. The node is not changed if it is not a text node.

    @@ -650,7 +728,10 @@ mxmlSetText(

    Returns

    0 on success, -1 on failure

    +

    mxmlSetTextf()

    +
    +

    Description

    Set the value of a text node to a formatted string. The node is not changed if it is not a text node.

    @@ -674,7 +755,10 @@ mxmlSetTextf(

    Returns

    0 on success, -1 on failure

    +

    mxmlWalkNext()

    +
    +

    Description

    Walk to the next logical node in the tree. The descend argument controls whether the first child is considered @@ -698,7 +782,10 @@ mxmlWalkNext(

    Returns

    Next node or NULL

    +

    mxmlWalkPrev()

    +
    +

    Description

    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(

  • mxml_text_s
  • mxml_value_s
  • +

    mxml_attr_s

    +
    +

    Description

    An XML element attribute value.

    Definition

    @@ -747,7 +837,10 @@ struct mxml_attr_s
     nameAttribute name
     valueAttribute value
     

    +

    mxml_node_s

    +
    +

    Description

    An XML node.

    Definition

    @@ -774,7 +867,10 @@ struct mxml_node_s
     typeNode type
     valueNode value
     

    +

    mxml_text_s

    +
    +

    Description

    An XML text value.

    Definition

    @@ -791,7 +887,10 @@ struct mxml_text_s
     stringFragment string
     whitespaceLeading whitespace?
     

    +

    mxml_value_s

    +
    +

    Description

    An XML element value.

    Definition

    @@ -820,37 +919,55 @@ struct mxml_value_s
     	
  • mxml_type_t
  • mxml_value_t
  • +

    mxml_attr_t

    +
    +

    Description

    An XML element attribute value.

    Definition

     typedef struct mxml_attr_s mxml_attr_t;
     
    +

    mxml_element_t

    +
    +

    Description

    An XML element value.

    Definition

     typedef struct mxml_value_s mxml_element_t;
     
    +

    mxml_node_t

    +
    +

    Description

    An XML node.

    Definition

     typedef struct mxml_node_s mxml_node_t;
     
    +

    mxml_text_t

    +
    +

    Description

    An XML text value.

    Definition

     typedef struct mxml_text_s mxml_text_t;
     
    +

    mxml_type_t

    +
    +

    Description

    The XML node type.

    Definition

     typedef enum mxml_type_e mxml_type_t;
     
    +

    mxml_value_t

    +
    +

    Description

    An XML node value.

    Definition

    @@ -861,7 +978,10 @@ typedef union mxml_value_u mxml_value_t;
     
    +
     

    mxml_value_u

    +
    +

    Description

    An XML node value.

    Definition

    diff --git a/mxmldoc.c b/mxmldoc.c
    index 6f59934..76e06ea 100644
    --- a/mxmldoc.c
    +++ b/mxmldoc.c
    @@ -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("");
           printf("

    %s

    \n", name, name); + puts("
    "); description = mxmlFindElement(scut, scut, "description", NULL, NULL, MXML_DESCEND_FIRST); if (description) { + puts("

    Description

    "); fputs("

    ", stdout); write_element(NULL, description); puts("

    "); @@ -1643,12 +1646,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */ MXML_NO_DESCEND)) { name = mxmlElementGetAttr(scut, "name"); + puts(""); printf("

    %s

    \n", name, name); + puts("
    "); description = mxmlFindElement(scut, scut, "description", NULL, NULL, MXML_DESCEND_FIRST); if (description) { + puts("

    Description

    "); fputs("

    ", stdout); write_element(NULL, description); puts("

    "); @@ -1708,12 +1714,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */ MXML_NO_DESCEND)) { name = mxmlElementGetAttr(function, "name"); + puts(""); printf("

    %s()

    \n", name, name); + puts("
    "); description = mxmlFindElement(function, function, "description", NULL, NULL, MXML_DESCEND_FIRST); if (description) { + puts("

    Description

    "); fputs("

    ", stdout); write_element(NULL, description); puts("

    "); @@ -1825,12 +1834,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */ MXML_NO_DESCEND)) { name = mxmlElementGetAttr(scut, "name"); + puts(""); printf("

    %s

    \n", name, name); + puts("
    "); description = mxmlFindElement(scut, scut, "description", NULL, NULL, MXML_DESCEND_FIRST); if (description) { + puts("

    Description

    "); fputs("

    ", stdout); write_element(NULL, description); puts("

    "); @@ -1908,12 +1920,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */ MXML_NO_DESCEND)) { name = mxmlElementGetAttr(scut, "name"); + puts(""); printf("

    %s

    \n", name, name); + puts("
    "); description = mxmlFindElement(scut, scut, "description", NULL, NULL, MXML_DESCEND_FIRST); if (description) { + puts("

    Description

    "); fputs("

    ", stdout); write_element(NULL, description); puts("

    "); @@ -1958,12 +1973,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */ MXML_NO_DESCEND)) { name = mxmlElementGetAttr(scut, "name"); + puts(""); printf("

    %s

    \n", name, name); + puts("
    "); description = mxmlFindElement(scut, scut, "description", NULL, NULL, MXML_DESCEND_FIRST); if (description) { + puts("

    Description

    "); fputs("

    ", stdout); write_element(NULL, description); puts("

    "); @@ -2041,12 +2059,15 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */ MXML_NO_DESCEND)) { name = mxmlElementGetAttr(arg, "name"); + puts(""); printf("

    %s

    \n", name, name); + puts("
    "); description = mxmlFindElement(arg, arg, "description", NULL, NULL, MXML_DESCEND_FIRST); if (description) { + puts("

    Description

    "); fputs("

    ", stdout); write_element(NULL, description); puts("

    "); @@ -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 $". */