diff --git a/doc/mxml.man b/doc/mxml.man index f04d49d..c4f6fba 100644 --- a/doc/mxml.man +++ b/doc/mxml.man @@ -1,4 +1,4 @@ -.TH mxml 3 "Mini-XML API" "06/07/17" "Mini-XML API" +.TH mxml 3 "Mini-XML API" "06/08/17" "Mini-XML API" .SH NAME mxml \- Mini-XML API .SH INCLUDE FILE @@ -244,7 +244,7 @@ void mxmlAdd ( ); .fi .SS mxmlDelete -Insert node after this child... + .PP .nf void mxmlDelete ( diff --git a/doc/reference.html b/doc/reference.html index 11766aa..4ff8ced 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -122,8 +122,10 @@ span.info { white-space: nowrap; } h3 span.info, h4 span.info { + border-top-left-radius: 10px; + border-top-right-radius: 10px; float: right; - font-size: 100%; + padding: 3px 6px; } ul.code, ul.contents, ul.subcontents { list-style-type: none; @@ -139,15 +141,24 @@ ul.contents > li { ul.contents li ul.code, ul.contents li ul.subcontents { padding-left: 2em; } -div.body dl { - margin-top: 0; +table.list { + border-collapse: collapse; + width: 100%; } -div.body dt { - font-style: italic; - margin-top: 0; +table.list tr:nth-child(even) { + background: rgba(127,127,127,0.1);]n} +table.list th { + border-right: 2px solid gray; + font-family: monospace; + padding: 5px 10px 5px 2px; + text-align: right; + vertical-align: top; } -div.body dd { - margin-bottom: 0.5em; +table.list td { + padding: 5px 2px 5px 10px; + text-align: left; + vertical-align: top; + width: 100%; } h1.title { } @@ -264,23 +275,18 @@ h3.title {

mxmlAdd

-void mxmlAdd (
-    mxml_node_t *parent,
-    int where,
-    mxml_node_t *child,
-    mxml_node_t *node
-);

+void mxmlAdd(mxml_node_t *parent, int where, mxml_node_t *child, mxml_node_t *node);

Parameters

-
-
parent
-
Parent node
-
where
-
Where to add, MXML_ADD_BEFORE or MXML_ADD_AFTER
-
child
-
Child node for where or MXML_ADD_TO_PARENT
-
node
-
Node to add
-
+ + + + + + + + + +
parentParent node
whereWhere to add, MXML_ADD_BEFORE or MXML_ADD_AFTER
childChild node for where or MXML_ADD_TO_PARENT
nodeNode to add

Return Value

Add a node to a tree.

Adds the specified node to the parent. If the child argument is not @@ -290,16 +296,14 @@ puts the new node at the beginning of the child list (MXML_ADD_BEFOREMXML_ADD_AFTER). The constant MXML_ADD_TO_PARENT can be used to specify a NULL child pointer.

mxmlDelete

-

Insert node after this child...

+

-void mxmlDelete (
-    mxml_node_t *node
-);

+void mxmlDelete(mxml_node_t *node);

Parameters

-
-
node
-
Node to delete
-
+ + + +
nodeNode to delete

Return Value

Delete a node and all of its children.

If the specified node has a parent, this function first removes the @@ -307,34 +311,28 @@ node from its parent using the mxmlRemove

mxmlElementDeleteAttr

-void mxmlElementDeleteAttr (
-    mxml_node_t *node,
-    const char *name
-);

+void mxmlElementDeleteAttr(mxml_node_t *node, const char *name);

Parameters

-
-
node
-
Element
-
name
-
Attribute name
-
+ + + + + +
nodeElement
nameAttribute name

Return Value

Delete an attribute.

mxmlElementGetAttr

Get an attribute.

-const char *mxmlElementGetAttr (
-    mxml_node_t *node,
-    const char *name
-);

+const char *mxmlElementGetAttr(mxml_node_t *node, const char *name);

Parameters

-
-
node
-
Element node
-
name
-
Name of attribute
-
+ + + + + +
nodeElement node
nameName of attribute

Return Value

Attribute value or NULL

Discussion

@@ -343,20 +341,16 @@ named attribute does not exist.

 Mini-XML 2.11 mxmlElementGetAttrByIndex

Get an element attribute by index.

-const char *mxmlElementGetAttrByIndex (
-    mxml_node_t *node,
-    int idx,
-    const char **name
-);

+const char *mxmlElementGetAttrByIndex(mxml_node_t *node, int idx, const char **name);

Parameters

-
-
node
-
Node
-
idx
-
Attribute index, starting at 0
-
name
-
Attribute name
-
+ + + + + + + +
nodeNode
idxAttribute index, starting at 0
nameAttribute name

Return Value

Attribute value

Discussion

@@ -367,33 +361,27 @@ is out of range.

 Mini-XML 2.11 mxmlElementGetAttrCount

Get the number of element attributes.

-int mxmlElementGetAttrCount (
-    mxml_node_t *node
-);

+int mxmlElementGetAttrCount(mxml_node_t *node);

Parameters

-
-
node
-
Node
-
+ + + +
nodeNode

Return Value

Number of attributes

mxmlElementSetAttr

Node

-void mxmlElementSetAttr (
-    mxml_node_t *node,
-    const char *name,
-    const char *value
-);

+void mxmlElementSetAttr(mxml_node_t *node, const char *name, const char *value);

Parameters

-
-
node
-
Element node
-
name
-
Name of attribute
-
value
-
Attribute value
-
+ + + + + + + +
nodeElement node
nameName of attribute
valueAttribute value

Return Value

Set an attribute.

If the named attribute already exists, the value of the attribute @@ -403,23 +391,18 @@ not an element.

mxmlElementSetAttrf

Range check input...

-void mxmlElementSetAttrf (
-    mxml_node_t *node,
-    const char *name,
-    const char *format,
-    ...
-);

+void mxmlElementSetAttrf(mxml_node_t *node, const char *name, const char *format, ...);

Parameters

-
-
node
-
Element node
-
name
-
Name of attribute
-
format
-
Printf-style attribute value
-
...
-
Additional arguments as needed
-
+ + + + + + + + + +
nodeElement node
nameName of attribute
formatPrintf-style attribute value
...Additional arguments as needed

Return Value

Set an attribute with a formatted value.

If the named attribute already exists, the value of the attribute @@ -431,27 +414,23 @@ is not an element.

mxmlEntityAddCallback

Add a callback to convert entities to Unicode.

-int mxmlEntityAddCallback (
-    mxml_entity_cb_t cb
-);

+int mxmlEntityAddCallback(mxml_entity_cb_t cb);

Parameters

-
-
cb
-
Callback function to add
-
+ + + +
cbCallback function to add

Return Value

0 on success, -1 on failure

mxmlEntityGetName

Get the name that corresponds to the character value.

-const char *mxmlEntityGetName (
-    int val
-);

+const char *mxmlEntityGetName(int val);

Parameters

-
-
val
-
Character value
-
+ + + +
valCharacter value

Return Value

Entity name or NULL

Discussion

@@ -459,14 +438,12 @@ const char *mxmlEntityGetName (

mxmlEntityGetValue

Get the character corresponding to a named entity.

-int mxmlEntityGetValue (
-    const char *name
-);

+int mxmlEntityGetValue(const char *name);

Parameters

-
-
name
-
Entity name
-
+ + + +
nameEntity name

Return Value

Character value or -1 on error

Discussion

@@ -475,42 +452,33 @@ name is not known.

mxmlEntityRemoveCallback

Global data

-void mxmlEntityRemoveCallback (
-    mxml_entity_cb_t cb
-);

+void mxmlEntityRemoveCallback(mxml_entity_cb_t cb);

Parameters

-
-
cb
-
Callback function to remove
-
+ + + +
cbCallback function to remove

Return Value

Remove a callback.

mxmlFindElement

Find the named element.

-mxml_node_t *mxmlFindElement (
-    mxml_node_t *node,
-    mxml_node_t *top,
-    const char *element,
-    const char *attr,
-    const char *value,
-    int descend
-);

+mxml_node_t *mxmlFindElement(mxml_node_t *node, mxml_node_t *top, const char *element, const char *attr, const char *value, int descend);

Parameters

-
-
node
-
Current node
-
top
-
Top node
-
element
-
Element name or NULL for any
-
attr
-
Attribute name, or NULL for none
-
value
-
Attribute value, or NULL for any
-
descend
-
Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
-
+ + + + + + + + + + + + + +
nodeCurrent node
topTop node
elementElement name or NULL for any
attrAttribute name, or NULL for none
valueAttribute value, or NULL for any
descendDescend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST

Return Value

Element node or NULL

Discussion

@@ -525,17 +493,14 @@ constrains the search to a particular node's children.

 Mini-XML 2.7 mxmlFindPath

Find a node with the given path.

-mxml_node_t *mxmlFindPath (
-    mxml_node_t *top,
-    const char *path
-);

+mxml_node_t *mxmlFindPath(mxml_node_t *top, const char *path);

Parameters

-
-
top
-
Top node
-
path
-
Path to element
-
+ + + + + +
topTop node
pathPath to element

Return Value

Found node or NULL

Discussion

@@ -550,14 +515,12 @@ children and the first child is a value node.

 Mini-XML 2.7 mxmlGetCDATA

Get the value for a CDATA node.

-const char *mxmlGetCDATA (
-    mxml_node_t *node
-);

+const char *mxmlGetCDATA(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

CDATA value or NULL

Discussion

@@ -567,14 +530,12 @@ const char *mxmlGetCDATA (

 Mini-XML 2.7 mxmlGetCustom

Get the value for a custom node.

-const void *mxmlGetCustom (
-    mxml_node_t *node
-);

+const void *mxmlGetCustom(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Custom value or NULL

Discussion

@@ -585,14 +546,12 @@ value node.

 Mini-XML 2.7 mxmlGetElement

Get the name for an element node.

-const char *mxmlGetElement (
-    mxml_node_t *node
-);

+const char *mxmlGetElement(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Element name or NULL

Discussion

@@ -602,14 +561,12 @@ const char *mxmlGetElement (

 Mini-XML 2.7 mxmlGetFirstChild

Get the first child of an element node.

-mxml_node_t *mxmlGetFirstChild (
-    mxml_node_t *node
-);

+mxml_node_t *mxmlGetFirstChild(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

First child or NULL

Discussion

@@ -621,14 +578,12 @@ has no children.

Get the integer value from the specified node or its first child.

-int mxmlGetInteger (
-    mxml_node_t *node
-);

+int mxmlGetInteger(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Integer value or 0

Discussion

@@ -638,14 +593,12 @@ int mxmlGetInteger (

 Mini-XML 2.7 mxmlGetLastChild

Get the last child of an element node.

-mxml_node_t *mxmlGetLastChild (
-    mxml_node_t *node
-);

+mxml_node_t *mxmlGetLastChild(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Last child or NULL

Discussion

@@ -656,14 +609,12 @@ has no children.

mxmlGetNextSibling

Return the node type...

-mxml_node_t *mxmlGetNextSibling (
-    mxml_node_t *node
-);

+mxml_node_t *mxmlGetNextSibling(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Get the next node for the current parent.

NULL is returned if this is the last child for the current parent. @@ -672,14 +623,12 @@ has no children.

 Mini-XML 2.7 mxmlGetOpaque

Get an opaque string value for a node or its first child.

-const char *mxmlGetOpaque (
-    mxml_node_t *node
-);

+const char *mxmlGetOpaque(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Opaque string or NULL

Discussion

@@ -690,14 +639,12 @@ value node.

 Mini-XML 2.7 mxmlGetParent

Get the parent node.

-mxml_node_t *mxmlGetParent (
-    mxml_node_t *node
-);

+mxml_node_t *mxmlGetParent(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Parent node or NULL

Discussion

@@ -707,14 +654,12 @@ value node.

 Mini-XML 2.7 mxmlGetPrevSibling

Get the previous node for the current parent.

-mxml_node_t *mxmlGetPrevSibling (
-    mxml_node_t *node
-);

+mxml_node_t *mxmlGetPrevSibling(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Previous node or NULL

Discussion

@@ -724,14 +669,12 @@ value node.

 Mini-XML 2.7 mxmlGetReal

Get the real value for a node or its first child.

-double mxmlGetReal (
-    mxml_node_t *node
-);

+double mxmlGetReal(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Real value or 0.0

Discussion

@@ -741,14 +684,12 @@ double mxmlGetReal (

 Mini-XML 2.7 mxmlGetRefCount

Get the current reference (use) count for a node.

-int mxmlGetRefCount (
-    mxml_node_t *node
-);

+int mxmlGetRefCount(mxml_node_t *node);

Parameters

-
-
node
-
Node
-
+ + + +
nodeNode

Return Value

Reference count

Discussion

@@ -760,17 +701,14 @@ reference count.

 Mini-XML 2.7 mxmlGetText

Get the text value for a node or its first child.

-const char *mxmlGetText (
-    mxml_node_t *node,
-    int *whitespace
-);

+const char *mxmlGetText(mxml_node_t *node, int *whitespace);

Parameters

-
-
node
-
Node to get
-
whitespace
-
1 if string is preceded by whitespace, 0 otherwise
-
+ + + + + +
nodeNode to get
whitespace1 if string is preceded by whitespace, 0 otherwise

Return Value

Text string or NULL

Discussion

@@ -781,14 +719,12 @@ The "whitespace" argument can be NULL.

 Mini-XML 2.7 mxmlGetType

Get the node type.

-mxml_type_t mxmlGetType (
-    mxml_node_t *node
-);

+mxml_type_t mxmlGetType(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

Type of node

Discussion

@@ -798,40 +734,34 @@ The "whitespace" argument can be NULL.

 Mini-XML 2.7 mxmlGetUserData

Get the user data pointer for a node.

-void *mxmlGetUserData (
-    mxml_node_t *node
-);

+void *mxmlGetUserData(mxml_node_t *node);

Parameters

-
-
node
-
Node to get
-
+ + + +
nodeNode to get

Return Value

User data pointer

mxmlIndexDelete

-void mxmlIndexDelete (
-    mxml_index_t *ind
-);

+void mxmlIndexDelete(mxml_index_t *ind);

Parameters

-
-
ind
-
Index to delete
-
+ + + +
indIndex to delete

Return Value

Delete an index.

mxmlIndexEnum

Return the next node in the index.

-mxml_node_t *mxmlIndexEnum (
-    mxml_index_t *ind
-);

+mxml_node_t *mxmlIndexEnum(mxml_index_t *ind);

Parameters

-
-
ind
-
Index to enumerate
-
+ + + +
indIndex to enumerate

Return Value

Next node or NULL if there is none

Discussion

@@ -841,20 +771,16 @@ index.

mxmlIndexFind

Find the next matching node.

-mxml_node_t *mxmlIndexFind (
-    mxml_index_t *ind,
-    const char *element,
-    const char *value
-);

+mxml_node_t *mxmlIndexFind(mxml_index_t *ind, const char *element, const char *value);

Parameters

-
-
ind
-
Index to search
-
element
-
Element name to find, if any
-
value
-
Attribute value, if any
-
+ + + + + + + +
indIndex to search
elementElement name to find, if any
valueAttribute value, if any

Return Value

Node or NULL if none found

Discussion

@@ -865,33 +791,27 @@ to calling mxmlIndexEnum.

 Mini-XML 2.7 mxmlIndexGetCount

Get the number of nodes in an index.

-int mxmlIndexGetCount (
-    mxml_index_t *ind
-);

+int mxmlIndexGetCount(mxml_index_t *ind);

Parameters

-
-
ind
-
Index of nodes
-
+ + + +
indIndex of nodes

Return Value

Number of nodes in index

mxmlIndexNew

Create a new index.

-mxml_index_t *mxmlIndexNew (
-    mxml_node_t *node,
-    const char *element,
-    const char *attr
-);

+mxml_index_t *mxmlIndexNew(mxml_node_t *node, const char *element, const char *attr);

Parameters

-
-
node
-
XML node tree
-
element
-
Element to index or NULL for all
-
attr
-
Attribute to index or NULL for none
-
+ + + + + + + +
nodeXML node tree
elementElement to index or NULL for all
attrAttribute to index or NULL for none

Return Value

New index

Discussion

@@ -904,14 +824,12 @@ argument is not NULL.

Reset the enumeration/find pointer in the index and return the first node in the index.

-mxml_node_t *mxmlIndexReset (
-    mxml_index_t *ind
-);

+mxml_node_t *mxmlIndexReset(mxml_index_t *ind);

Parameters

-
-
ind
-
Index to reset
-
+ + + +
indIndex to reset

Return Value

First node or NULL if there is none

Discussion

@@ -920,20 +838,16 @@ return the first node in the index.

mxmlLoadFd

Load a file descriptor into an XML node tree.

-mxml_node_t *mxmlLoadFd (
-    mxml_node_t *top,
-    int fd,
-    mxml_load_cb_t cb
-);

+mxml_node_t *mxmlLoadFd(mxml_node_t *top, int fd, mxml_load_cb_t cb);

Parameters

-
-
top
-
Top node
-
fd
-
File descriptor to read from
-
cb
-
Callback function or constant
-
+ + + + + + + +
topTop node
fdFile descriptor to read from
cbCallback function or constant

Return Value

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

Discussion

@@ -947,20 +861,16 @@ loading child (data) nodes of the specified type.

mxmlLoadFile

Load a file into an XML node tree.

-mxml_node_t *mxmlLoadFile (
-    mxml_node_t *top,
-    FILE *fp,
-    mxml_load_cb_t cb
-);

+mxml_node_t *mxmlLoadFile(mxml_node_t *top, FILE *fp, mxml_load_cb_t cb);

Parameters

-
-
top
-
Top node
-
fp
-
File to read from
-
cb
-
Callback function or constant
-
+ + + + + + + +
topTop node
fpFile to read from
cbCallback function or constant

Return Value

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

Discussion

@@ -974,20 +884,16 @@ loading child (data) nodes of the specified type.

mxmlLoadString

Load a string into an XML node tree.

-mxml_node_t *mxmlLoadString (
-    mxml_node_t *top,
-    const char *s,
-    mxml_load_cb_t cb
-);

+mxml_node_t *mxmlLoadString(mxml_node_t *top, const char *s, mxml_load_cb_t cb);

Parameters

-
-
top
-
Top node
-
s
-
String to load
-
cb
-
Callback function or constant
-
+ + + + + + + +
topTop node
sString to load
cbCallback function or constant

Return Value

First node or NULL if the string has errors.

Discussion

@@ -1001,17 +907,14 @@ loading child (data) nodes of the specified type.

 Mini-XML 2.3 mxmlNewCDATA

Create a new CDATA node.

-mxml_node_t *mxmlNewCDATA (
-    mxml_node_t *parent,
-    const char *data
-);

+mxml_node_t *mxmlNewCDATA(mxml_node_t *parent, const char *data);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
data
-
Data string
-
+ + + + + +
parentParent node or MXML_NO_PARENT
dataData string

Return Value

New node

Discussion

@@ -1025,20 +928,16 @@ is copied into the new node. CDATA nodes currently use the

 Mini-XML 2.1 mxmlNewCustom

Create a new custom data node.

-mxml_node_t *mxmlNewCustom (
-    mxml_node_t *parent,
-    void *data,
-    mxml_custom_destroy_cb_t destroy
-);

+mxml_node_t *mxmlNewCustom(mxml_node_t *parent, void *data, mxml_custom_destroy_cb_t destroy);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
data
-
Pointer to data
-
destroy
-
Function to destroy data
-
+ + + + + + + +
parentParent node or MXML_NO_PARENT
dataPointer to data
destroyFunction to destroy data

Return Value

New node

Discussion

@@ -1051,17 +950,14 @@ node is not dynamically allocated or is separately managed.

mxmlNewElement

Create a new element node.

-mxml_node_t *mxmlNewElement (
-    mxml_node_t *parent,
-    const char *name
-);

+mxml_node_t *mxmlNewElement(mxml_node_t *parent, const char *name);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
name
-
Name of element
-
+ + + + + +
parentParent node or MXML_NO_PARENT
nameName of element

Return Value

New node

Discussion

@@ -1071,17 +967,14 @@ element node has no parent.

mxmlNewInteger

Create a new integer node.

-mxml_node_t *mxmlNewInteger (
-    mxml_node_t *parent,
-    int integer
-);

+mxml_node_t *mxmlNewInteger(mxml_node_t *parent, int integer);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
integer
-
Integer value
-
+ + + + + +
parentParent node or MXML_NO_PARENT
integerInteger value

Return Value

New node

Discussion

@@ -1091,17 +984,14 @@ integer node has no parent.

mxmlNewOpaque

Create a new opaque string.

-mxml_node_t *mxmlNewOpaque (
-    mxml_node_t *parent,
-    const char *opaque
-);

+mxml_node_t *mxmlNewOpaque(mxml_node_t *parent, const char *opaque);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
opaque
-
Opaque string
-
+ + + + + +
parentParent node or MXML_NO_PARENT
opaqueOpaque string

Return Value

New node

Discussion

@@ -1112,20 +1002,16 @@ terminated and is copied into the new node.

mxmlNewOpaquef

Create a new formatted opaque string node.

-mxml_node_t *mxmlNewOpaquef (
-    mxml_node_t *parent,
-    const char *format,
-    ...
-);

+mxml_node_t *mxmlNewOpaquef(mxml_node_t *parent, const char *format, ...);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
format
-
Printf-style format string
-
...
-
Additional args as needed
-
+ + + + + + + +
parentParent node or MXML_NO_PARENT
formatPrintf-style format string
...Additional args as needed

Return Value

New node

Discussion

@@ -1136,17 +1022,14 @@ nul-terminated and is formatted into the new node.

mxmlNewReal

Create a new real number node.

-mxml_node_t *mxmlNewReal (
-    mxml_node_t *parent,
-    double real
-);

+mxml_node_t *mxmlNewReal(mxml_node_t *parent, double real);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
real
-
Real number value
-
+ + + + + +
parentParent node or MXML_NO_PARENT
realReal number value

Return Value

New node

Discussion

@@ -1156,20 +1039,16 @@ the new real number node has no parent.

mxmlNewText

Create a new text fragment node.

-mxml_node_t *mxmlNewText (
-    mxml_node_t *parent,
-    int whitespace,
-    const char *string
-);

+mxml_node_t *mxmlNewText(mxml_node_t *parent, int whitespace, const char *string);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
whitespace
-
1 = leading whitespace, 0 = no whitespace
-
string
-
String
-
+ + + + + + + +
parentParent node or MXML_NO_PARENT
whitespace1 = leading whitespace, 0 = no whitespace
stringString

Return Value

New node

Discussion

@@ -1181,23 +1060,18 @@ string must be nul-terminated and is copied into the new node.

mxmlNewTextf

Create a new formatted text fragment node.

-mxml_node_t *mxmlNewTextf (
-    mxml_node_t *parent,
-    int whitespace,
-    const char *format,
-    ...
-);

+mxml_node_t *mxmlNewTextf(mxml_node_t *parent, int whitespace, const char *format, ...);

Parameters

-
-
parent
-
Parent node or MXML_NO_PARENT
-
whitespace
-
1 = leading whitespace, 0 = no whitespace
-
format
-
Printf-style format string
-
...
-
Additional args as needed
-
+ + + + + + + + + +
parentParent node or MXML_NO_PARENT
whitespace1 = leading whitespace, 0 = no whitespace
formatPrintf-style format string
...Additional args as needed

Return Value

New node

Discussion

@@ -1209,14 +1083,12 @@ string must be nul-terminated and is formatted into the new node.

 Mini-XML 2.3 mxmlNewXML

Create a new XML document tree.

-mxml_node_t *mxmlNewXML (
-    const char *version
-);

+mxml_node_t *mxmlNewXML(const char *version);

Parameters

-
-
version
-
Version number to use
-
+ + + +
versionVersion number to use

Return Value

New ?xml node

Discussion

@@ -1227,14 +1099,12 @@ string must be nul-terminated and is formatted into the new node.

 Mini-XML 2.3 mxmlRelease

Release a node.

-int mxmlRelease (
-    mxml_node_t *node
-);

+int mxmlRelease(mxml_node_t *node);

Parameters

-
-
node
-
Node
-
+ + + +
nodeNode

Return Value

New reference count

Discussion

@@ -1245,14 +1115,12 @@ is deleted via mxmlDelete.

mxmlRemove

Create the node and set the text value...

-void mxmlRemove (
-    mxml_node_t *node
-);

+void mxmlRemove(mxml_node_t *node);

Parameters

-
-
node
-
Node to remove
-
+ + + +
nodeNode to remove

Return Value

Remove a node from its parent.

This function does not free memory used by the node - use mxmlDelete @@ -1260,40 +1128,32 @@ for that. This function does nothing if the node has no parent.

 Mini-XML 2.3 mxmlRetain

Retain a node.

-int mxmlRetain (
-    mxml_node_t *node
-);

+int mxmlRetain(mxml_node_t *node);

Parameters

-
-
node
-
Node
-
+ + + +
nodeNode

Return Value

New reference count

 Mini-XML 2.3 mxmlSAXLoadFd

Load a file descriptor into an XML node tree using a SAX callback.

-mxml_node_t *mxmlSAXLoadFd (
-    mxml_node_t *top,
-    int fd,
-    mxml_load_cb_t cb,
-    mxml_sax_cb_t sax_cb,
-    void *sax_data
-);

+mxml_node_t *mxmlSAXLoadFd(mxml_node_t *top, int fd, mxml_load_cb_t cb, mxml_sax_cb_t sax_cb, void *sax_data);

Parameters

-
-
top
-
Top node
-
fd
-
File descriptor to read from
-
cb
-
Callback function or constant
-
sax_cb
-
SAX callback or MXML_NO_CALLBACK
-
sax_data
-
SAX user data
-
+ + + + + + + + + + + +
topTop node
fdFile descriptor to read from
cbCallback function or constant
sax_cbSAX callback or MXML_NO_CALLBACK
sax_dataSAX user data

Return Value

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

Discussion

@@ -1314,26 +1174,20 @@ node is closed or after each data, comment, CDATA, or directive node.

Load a file into an XML node tree using a SAX callback.

-mxml_node_t *mxmlSAXLoadFile (
-    mxml_node_t *top,
-    FILE *fp,
-    mxml_load_cb_t cb,
-    mxml_sax_cb_t sax_cb,
-    void *sax_data
-);

+mxml_node_t *mxmlSAXLoadFile(mxml_node_t *top, FILE *fp, mxml_load_cb_t cb, mxml_sax_cb_t sax_cb, void *sax_data);

Parameters

-
-
top
-
Top node
-
fp
-
File to read from
-
cb
-
Callback function or constant
-
sax_cb
-
SAX callback or MXML_NO_CALLBACK
-
sax_data
-
SAX user data
-
+ + + + + + + + + + + +
topTop node
fpFile to read from
cbCallback function or constant
sax_cbSAX callback or MXML_NO_CALLBACK
sax_dataSAX user data

Return Value

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

Discussion

@@ -1354,26 +1208,20 @@ node is closed or after each data, comment, CDATA, or directive node.

Load a string into an XML node tree using a SAX callback.

-mxml_node_t *mxmlSAXLoadString (
-    mxml_node_t *top,
-    const char *s,
-    mxml_load_cb_t cb,
-    mxml_sax_cb_t sax_cb,
-    void *sax_data
-);

+mxml_node_t *mxmlSAXLoadString(mxml_node_t *top, const char *s, mxml_load_cb_t cb, mxml_sax_cb_t sax_cb, void *sax_data);

Parameters

-
-
top
-
Top node
-
s
-
String to load
-
cb
-
Callback function or constant
-
sax_cb
-
SAX callback or MXML_NO_CALLBACK
-
sax_data
-
SAX user data
-
+ + + + + + + + + + + +
topTop node
sString to load
cbCallback function or constant
sax_cbSAX callback or MXML_NO_CALLBACK
sax_dataSAX user data

Return Value

First node or NULL if the string has errors.

Discussion

@@ -1393,17 +1241,14 @@ node is closed or after each data, comment, CDATA, or directive node.

mxmlSaveAllocString

Save an XML tree to an allocated string.

-char *mxmlSaveAllocString (
-    mxml_node_t *node,
-    mxml_save_cb_t cb
-);

+char *mxmlSaveAllocString(mxml_node_t *node, mxml_save_cb_t cb);

Parameters

-
-
node
-
Node to write
-
cb
-
Whitespace callback or MXML_NO_CALLBACK
-
+ + + + + +
nodeNode to write
cbWhitespace callback or MXML_NO_CALLBACK

Return Value

Allocated string or NULL

Discussion

@@ -1421,20 +1266,16 @@ element tags.

mxmlSaveFd

Save an XML tree to a file descriptor.

-int mxmlSaveFd (
-    mxml_node_t *node,
-    int fd,
-    mxml_save_cb_t cb
-);

+int mxmlSaveFd(mxml_node_t *node, int fd, mxml_save_cb_t cb);

Parameters

-
-
node
-
Node to write
-
fd
-
File descriptor to write to
-
cb
-
Whitespace callback or MXML_NO_CALLBACK
-
+ + + + + + + +
nodeNode to write
fdFile descriptor to write to
cbWhitespace callback or MXML_NO_CALLBACK

Return Value

0 on success, -1 on error.

Discussion

@@ -1446,20 +1287,16 @@ element tags.

mxmlSaveFile

Save an XML tree to a file.

-int mxmlSaveFile (
-    mxml_node_t *node,
-    FILE *fp,
-    mxml_save_cb_t cb
-);

+int mxmlSaveFile(mxml_node_t *node, FILE *fp, mxml_save_cb_t cb);

Parameters

-
-
node
-
Node to write
-
fp
-
File to write to
-
cb
-
Whitespace callback or MXML_NO_CALLBACK
-
+ + + + + + + +
nodeNode to write
fpFile to write to
cbWhitespace callback or MXML_NO_CALLBACK

Return Value

0 on success, -1 on error.

Discussion

@@ -1471,23 +1308,18 @@ element tags.

mxmlSaveString

Save an XML node tree to a string.

-int mxmlSaveString (
-    mxml_node_t *node,
-    char *buffer,
-    int bufsize,
-    mxml_save_cb_t cb
-);

+int mxmlSaveString(mxml_node_t *node, char *buffer, int bufsize, mxml_save_cb_t cb);

Parameters

-
-
node
-
Node to write
-
buffer
-
String buffer
-
bufsize
-
Size of string buffer
-
cb
-
Whitespace callback or MXML_NO_CALLBACK
-
+ + + + + + + + + +
nodeNode to write
bufferString buffer
bufsizeSize of string buffer
cbWhitespace callback or MXML_NO_CALLBACK

Return Value

Size of string

Discussion

@@ -1503,17 +1335,14 @@ element tags.

 Mini-XML 2.3 mxmlSetCDATA

Set the element name of a CDATA node.

-int mxmlSetCDATA (
-    mxml_node_t *node,
-    const char *data
-);

+int mxmlSetCDATA(mxml_node_t *node, const char *data);

Parameters

-
-
node
-
Node to set
-
data
-
New data string
-
+ + + + + +
nodeNode to set
dataNew data string

Return Value

0 on success, -1 on failure

Discussion

@@ -1523,20 +1352,16 @@ int mxmlSetCDATA (

 Mini-XML 2.1 mxmlSetCustom

Set the data and destructor of a custom data node.

-int mxmlSetCustom (
-    mxml_node_t *node,
-    void *data,
-    mxml_custom_destroy_cb_t destroy
-);

+int mxmlSetCustom(mxml_node_t *node, void *data, mxml_custom_destroy_cb_t destroy);

Parameters

-
-
node
-
Node to set
-
data
-
New data pointer
-
destroy
-
New destructor function
-
+ + + + + + + +
nodeNode to set
dataNew data pointer
destroyNew destructor function

Return Value

0 on success, -1 on failure

Discussion

@@ -1546,17 +1371,14 @@ int mxmlSetCustom (

mxmlSetCustomHandlers

Read the XML data...

-void mxmlSetCustomHandlers (
-    mxml_custom_load_cb_t load,
-    mxml_custom_save_cb_t save
-);

+void mxmlSetCustomHandlers(mxml_custom_load_cb_t load, mxml_custom_save_cb_t save);

Parameters

-
-
load
-
Load function
-
save
-
Save function
-
+ + + + + +
loadLoad function
saveSave function

Return Value

Set the handling functions for custom data.

The load function accepts a node pointer and a data string and must @@ -1567,17 +1389,14 @@ string on success and NULL on error.

mxmlSetElement

Set the name of an element node.

-int mxmlSetElement (
-    mxml_node_t *node,
-    const char *name
-);

+int mxmlSetElement(mxml_node_t *node, const char *name);

Parameters

-
-
node
-
Node to set
-
name
-
New name string
-
+ + + + + +
nodeNode to set
nameNew name string

Return Value

0 on success, -1 on failure

Discussion

@@ -1585,30 +1404,25 @@ int mxmlSetElement (

mxmlSetErrorCallback

Global data

-void mxmlSetErrorCallback (
-    mxml_error_cb_t cb
-);

+void mxmlSetErrorCallback(mxml_error_cb_t cb);

Parameters

-
-
cb
-
Error callback function
-
+ + + +
cbError callback function

Return Value

Set the error message callback.

mxmlSetInteger

Set the value of an integer node.

-int mxmlSetInteger (
-    mxml_node_t *node,
-    int integer
-);

+int mxmlSetInteger(mxml_node_t *node, int integer);

Parameters

-
-
node
-
Node to set
-
integer
-
Integer value
-
+ + + + + +
nodeNode to set
integerInteger value

Return Value

0 on success, -1 on failure

Discussion

@@ -1616,17 +1430,14 @@ int mxmlSetInteger (

mxmlSetOpaque

Set the value of an opaque node.

-int mxmlSetOpaque (
-    mxml_node_t *node,
-    const char *opaque
-);

+int mxmlSetOpaque(mxml_node_t *node, const char *opaque);

Parameters

-
-
node
-
Node to set
-
opaque
-
Opaque string
-
+ + + + + +
nodeNode to set
opaqueOpaque string

Return Value

0 on success, -1 on failure

Discussion

@@ -1634,20 +1445,16 @@ int mxmlSetOpaque (

 Mini-XML 2.11 mxmlSetOpaquef

Set the value of an opaque string node to a formatted string.

-int mxmlSetOpaquef (
-    mxml_node_t *node,
-    const char *format,
-    ...
-);

+int mxmlSetOpaquef(mxml_node_t *node, const char *format, ...);

Parameters

-
-
node
-
Node to set
-
format
-
Printf-style format string
-
...
-
Additional arguments as needed
-
+ + + + + + + +
nodeNode to set
formatPrintf-style format string
...Additional arguments as needed

Return Value

0 on success, -1 on failure

Discussion

@@ -1657,17 +1464,14 @@ int mxmlSetOpaquef (

mxmlSetReal

Set the value of a real number node.

-int mxmlSetReal (
-    mxml_node_t *node,
-    double real
-);

+int mxmlSetReal(mxml_node_t *node, double real);

Parameters

-
-
node
-
Node to set
-
real
-
Real number value
-
+ + + + + +
nodeNode to set
realReal number value

Return Value

0 on success, -1 on failure

Discussion

@@ -1675,20 +1479,16 @@ int mxmlSetReal (

mxmlSetText

Set the value of a text node.

-int mxmlSetText (
-    mxml_node_t *node,
-    int whitespace,
-    const char *string
-);

+int mxmlSetText(mxml_node_t *node, int whitespace, const char *string);

Parameters

-
-
node
-
Node to set
-
whitespace
-
1 = leading whitespace, 0 = no whitespace
-
string
-
String
-
+ + + + + + + +
nodeNode to set
whitespace1 = leading whitespace, 0 = no whitespace
stringString

Return Value

0 on success, -1 on failure

Discussion

@@ -1696,23 +1496,18 @@ int mxmlSetText (

mxmlSetTextf

Set the value of a text node to a formatted string.

-int mxmlSetTextf (
-    mxml_node_t *node,
-    int whitespace,
-    const char *format,
-    ...
-);

+int mxmlSetTextf(mxml_node_t *node, int whitespace, const char *format, ...);

Parameters

-
-
node
-
Node to set
-
whitespace
-
1 = leading whitespace, 0 = no whitespace
-
format
-
Printf-style format string
-
...
-
Additional arguments as needed
-
+ + + + + + + + + +
nodeNode to set
whitespace1 = leading whitespace, 0 = no whitespace
formatPrintf-style format string
...Additional arguments as needed

Return Value

0 on success, -1 on failure

Discussion

@@ -1720,30 +1515,25 @@ int mxmlSetTextf (

 Mini-XML 2.7 mxmlSetUserData

Set the user data pointer for a node.

-int mxmlSetUserData (
-    mxml_node_t *node,
-    void *data
-);

+int mxmlSetUserData(mxml_node_t *node, void *data);

Parameters

-
-
node
-
Node to set
-
data
-
User data pointer
-
+ + + + + +
nodeNode to set
dataUser data pointer

Return Value

0 on success, -1 on failure

mxmlSetWrapMargin

Global data

-void mxmlSetWrapMargin (
-    int column
-);

+void mxmlSetWrapMargin(int column);

Parameters

-
-
column
-
Column for wrapping, 0 to disable wrapping
-
+ + + +
columnColumn for wrapping, 0 to disable wrapping

Return Value

Set the wrap margin when saving XML data.

Wrapping is disabled when "column" is 0. @@ -1752,20 +1542,16 @@ void mxmlSetWrapMargin (

mxmlWalkNext

Walk to the next logical node in the tree.

-mxml_node_t *mxmlWalkNext (
-    mxml_node_t *node,
-    mxml_node_t *top,
-    int descend
-);

+mxml_node_t *mxmlWalkNext(mxml_node_t *node, mxml_node_t *top, int descend);

Parameters

-
-
node
-
Current node
-
top
-
Top node
-
descend
-
Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
-
+ + + + + + + +
nodeCurrent node
topTop node
descendDescend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST

Return Value

Next node or NULL

Discussion

@@ -1775,20 +1561,16 @@ the node's children.

mxmlWalkPrev

Walk to the previous logical node in the tree.

-mxml_node_t *mxmlWalkPrev (
-    mxml_node_t *node,
-    mxml_node_t *top,
-    int descend
-);

+mxml_node_t *mxmlWalkPrev(mxml_node_t *node, mxml_node_t *top, int descend);

Parameters

-
-
node
-
Current node
-
top
-
Top node
-
descend
-
Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST
-
+ + + + + + + +
nodeCurrent node
topTop node
descendDescend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST

Return Value

Previous node or NULL

Discussion

@@ -1860,39 +1642,26 @@ typedef enum mxml_type_e mxml_type_t;

mxml_sax_event_e

SAX event type.

Constants

-
-
MXML_SAX_CDATA
-
CDATA node
-
MXML_SAX_COMMENT
-
Comment node
-
MXML_SAX_DATA
-
Data node
-
MXML_SAX_DIRECTIVE
-
Processing directive node
-
MXML_SAX_ELEMENT_CLOSE
-
Element closed
-
MXML_SAX_ELEMENT_OPEN
-
Element opened
-
+ + + + + + + +
MXML_SAX_CDATA CDATA node
MXML_SAX_COMMENT Comment node
MXML_SAX_DATA Data node
MXML_SAX_DIRECTIVE Processing directive node
MXML_SAX_ELEMENT_CLOSE Element closed
MXML_SAX_ELEMENT_OPEN Element opened

mxml_type_e

The XML node type.

Constants

-
-
MXML_CUSTOM  Mini-XML 2.1 
-
Custom data
-
MXML_ELEMENT
-
XML element with attributes
-
MXML_IGNORE  Mini-XML 2.3 
-
Ignore/throw away node
-
MXML_INTEGER
-
Integer value
-
MXML_OPAQUE
-
Opaque string
-
MXML_REAL
-
Real value
-
MXML_TEXT
-
Text fragment
-
+ + + + + + + + +
MXML_CUSTOM  Mini-XML 2.1  Custom data
MXML_ELEMENT XML element with attributes
MXML_IGNORE  Mini-XML 2.3  Ignore/throw away node
MXML_INTEGER Integer value
MXML_OPAQUE Opaque string
MXML_REAL Real value
MXML_TEXT Text fragment
diff --git a/mxmldoc.c b/mxmldoc.c index 965969d..08d9010 100644 --- a/mxmldoc.c +++ b/mxmldoc.c @@ -2093,6 +2093,8 @@ scan_file(const char *filename, /* I - Filename */ fputs(" #preprocessor...\n", stderr); #endif /* DEBUG */ state = STATE_PREPROCESSOR; + while (comment->child) + mxmlDelete(comment->child); break; case '\'' : /* Character constant */ @@ -3726,7 +3728,7 @@ write_description( int mode, /* I - Output mode */ mxml_node_t *description, /* I - Description node */ const char *element, /* I - HTML element, if any */ - int summary) /* I - Show summary */ + int summary) /* I - Show summary (-1 for all) */ { char text[10240], /* Text for description */ *start, /* Start of code/link */ @@ -3748,9 +3750,9 @@ write_description( ptr = text; } - else if (!ptr || !ptr[2]) + else if (summary >= 0 && (!ptr || !ptr[2])) return; - else + else if (summary >= 0) ptr += 2; if (element && *element) @@ -3888,7 +3890,12 @@ write_description( } if (element && *element) - fprintf(out, "\n", element); + { + if (summary < 0) + fprintf(out, "", element); + else + fprintf(out, "\n", element); + } else if (!element) putc('\n', out); } @@ -4750,10 +4757,8 @@ write_function(FILE *out, /* I - Output file */ *node; /* Node in description */ const char *name, /* Name of function/type */ *defval; /* Default value */ - char prefix; /* Prefix character */ + const char *prefix; /* Prefix string */ char *sep; /* Newline separator */ - const char *br = mode == OUTPUT_EPUB ? "
" : "
"; - /* Break sequence */ name = mxmlElementGetAttr(function, "name"); @@ -4777,17 +4782,17 @@ write_function(FILE *out, /* I - Output file */ else fputs("void ", out); - fprintf(out, "%s ", name); + fputs(name, out); for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, - MXML_DESCEND_FIRST), prefix = '('; + MXML_DESCEND_FIRST), prefix = "("; arg; arg = mxmlFindElement(arg, function, "argument", NULL, NULL, - MXML_NO_DESCEND), prefix = ',') + MXML_NO_DESCEND), prefix = ", ") { type = mxmlFindElement(arg, arg, "type", NULL, NULL, MXML_DESCEND_FIRST); - fprintf(out, "%c%s\n    ", prefix, br); + fputs(prefix, out); if (type->child) write_element(out, doc, type, mode); @@ -4796,14 +4801,14 @@ write_function(FILE *out, /* I - Output file */ fprintf(out, " %s", defval); } - if (prefix == '(') + if (!strcmp(prefix, "(")) fputs("(void);

\n", out); else { fprintf(out, - "%s\n);

\n" + ");

\n" "Parameters\n" - "
\n", br, level + 1, level + 1); + "\n", level + 1, level + 1); for (arg = mxmlFindElement(function, function, "argument", NULL, NULL, MXML_DESCEND_FIRST); @@ -4811,16 +4816,16 @@ write_function(FILE *out, /* I - Output file */ arg = mxmlFindElement(arg, function, "argument", NULL, NULL, MXML_NO_DESCEND)) { - fprintf(out, "
%s
\n", mxmlElementGetAttr(arg, "name")); + fprintf(out, "\n", mxmlElementGetAttr(arg, "name")); adesc = mxmlFindElement(arg, arg, "description", NULL, NULL, MXML_DESCEND_FIRST); - write_description(out, mode, adesc, "dd", 1); - write_description(out, mode, adesc, "dd", 0); + write_description(out, mode, adesc, "td", -1); + fputs("\n", out); } - fputs("\n", out); + fputs("
%s
\n", out); } arg = mxmlFindElement(function, function, "returnvalue", NULL, @@ -5338,30 +5343,22 @@ write_html_body( write_description(out, mode, description, "p", 1); fputs("

Constants

\n" - "
\n", out); + " \n", out); -#if 0 - for (arg = mxmlFindElement(scut, scut, "constant", NULL, NULL, - MXML_DESCEND_FIRST); - arg; - arg = mxmlFindElement(arg, scut, "constant", NULL, NULL, - MXML_NO_DESCEND)) -#else for (arg = find_public(scut, scut, "constant", NULL, mode); arg; arg = find_public(arg, scut, "constant", NULL, mode)) -#endif // 0 { description = mxmlFindElement(arg, arg, "description", NULL, NULL, MXML_DESCEND_FIRST); - fprintf(out, "
%s %s
\n", + fprintf(out, " ", mxmlElementGetAttr(arg, "name"), get_comment_info(description)); - write_description(out, mode, description, "dd", 1); - write_description(out, mode, description, "dd", 0); + write_description(out, mode, description, "td", -1); + fputs("\n", out); } - fputs("\n", out); + fputs("
%s %s
\n", out); scut = find_public(scut, doc, "enumeration", NULL, mode); } @@ -5565,8 +5562,10 @@ write_html_head(FILE *out, /* I - Output file */ " white-space: nowrap;\n" "}\n" "h3 span.info, h4 span.info {\n" + " border-top-left-radius: 10px;\n" + " border-top-right-radius: 10px;\n" " float: right;\n" - " font-size: 100%;\n" + " padding: 3px 6px;\n" "}\n" "ul.code, ul.contents, ul.subcontents {\n" " list-style-type: none;\n" @@ -5582,15 +5581,25 @@ write_html_head(FILE *out, /* I - Output file */ "ul.contents li ul.code, ul.contents li ul.subcontents {\n" " padding-left: 2em;\n" "}\n" - "div.body dl {\n" - " margin-top: 0;\n" + "table.list {\n" + " border-collapse: collapse;\n" + " width: 100%;\n" "}\n" - "div.body dt {\n" - " font-style: italic;\n" - " margin-top: 0;\n" + "table.list tr:nth-child(even) {\n" + " background: rgba(127,127,127,0.1);]n" "}\n" - "div.body dd {\n" - " margin-bottom: 0.5em;\n" + "table.list th {\n" + " border-right: 2px solid gray;\n" + " font-family: monospace;\n" + " padding: 5px 10px 5px 2px;\n" + " text-align: right;\n" + " vertical-align: top;\n" + "}\n" + "table.list td {\n" + " padding: 5px 2px 5px 10px;\n" + " text-align: left;\n" + " vertical-align: top;\n" + " width: 100%;\n" "}\n" "h1.title {\n" "}\n" @@ -6371,7 +6380,7 @@ write_scu(FILE *out, /* I - Output file */ fputs("};

\n" "

Members

\n" - "
\n", out); + "\n", out); for (arg = mxmlFindElement(scut, scut, "variable", NULL, NULL, MXML_DESCEND_FIRST); @@ -6382,14 +6391,14 @@ write_scu(FILE *out, /* I - Output file */ description = mxmlFindElement(arg, arg, "description", NULL, NULL, MXML_DESCEND_FIRST); - fprintf(out, "
%s %s
\n", + fprintf(out, "\n", mxmlElementGetAttr(arg, "name"), get_comment_info(description)); - write_description(out, mode, description, "dd", 1); - write_description(out, mode, description, "dd", 0); + write_description(out, mode, description, "td", -1); + fputs("\n", out); } - fputs("\n", out); + fputs("
%s %s
\n", out); for (function = mxmlFindElement(scut, scut, "function", NULL, NULL, MXML_DESCEND_FIRST);