From 0381fdaf3c06429eaced71ba6507fa598f83d09a Mon Sep 17 00:00:00 2001 From: Michael Sweet Date: Fri, 7 Apr 2017 12:01:21 -0400 Subject: [PATCH] Normalize on passing "mode" instead of "xhtml" flag. Update generated documentation. --- doc/mxml.man | 2 +- doc/reference.html | 430 ++++++++++++++++++++++----------------------- mxmldoc.c | 39 ++-- 3 files changed, 243 insertions(+), 228 deletions(-) diff --git a/doc/mxml.man b/doc/mxml.man index 8b0a900..9c7bb25 100644 --- a/doc/mxml.man +++ b/doc/mxml.man @@ -1,4 +1,4 @@ -.TH mxml 3 "Mini-XML API" "04/06/17" "Mini-XML API" +.TH mxml 3 "Mini-XML API" "04/07/17" "Mini-XML API" .SH NAME mxml \- Mini-XML API .SH INCLUDE FILE diff --git a/doc/reference.html b/doc/reference.html index dbdd38e..1a77e31 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -239,11 +239,11 @@ h3.title {

mxmlAdd

Add a node to a tree.

-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

@@ -266,8 +266,8 @@ MXML_ADD_TO_PARENT can be used to specify a NULL child pointer.

mxmlDelete

Delete a node and all of its children.

-void mxmlDelete (
-    mxml_node_t *node
+void mxmlDelete (
+    mxml_node_t *node
);

Parameters

@@ -280,9 +280,9 @@ node from its parent using the mxmlRemove() function.

 Mini-XML 2.4 mxmlElementDeleteAttr

Delete an attribute.

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

Parameters

@@ -294,9 +294,9 @@ void mxmlElementDeleteAttr (

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

@@ -313,10 +313,10 @@ named attribute does not exist.

mxmlElementSetAttr

Set an attribute.

-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

@@ -335,11 +335,11 @@ not an element.

 Mini-XML 2.3 mxmlElementSetAttrf

Set an attribute with a formatted value.

-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

@@ -362,8 +362,8 @@ 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

@@ -375,8 +375,8 @@ int mxmlEntityAddCallback (

mxmlEntityGetName

Get the name that corresponds to the character value.

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

Parameters

@@ -390,8 +390,8 @@ const char *mxmlEntityGetName (

mxmlEntityGetValue

Get the character corresponding to a named entity.

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

Parameters

@@ -406,8 +406,8 @@ name is not known.

mxmlEntityRemoveCallback

Remove a callback.

-void mxmlEntityRemoveCallback (
-    mxml_entity_cb_t cb
+void mxmlEntityRemoveCallback (
+    mxml_entity_cb_t cb
);

Parameters

@@ -417,13 +417,13 @@ void mxmlEntityRemoveCallback (

mxmlFindElement

Find the named element.

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

Parameters

@@ -454,9 +454,9 @@ 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

@@ -479,8 +479,8 @@ 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

@@ -496,8 +496,8 @@ 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

@@ -514,8 +514,8 @@ 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

@@ -531,8 +531,8 @@ 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

@@ -550,8 +550,8 @@ 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

@@ -567,8 +567,8 @@ 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

@@ -585,8 +585,8 @@ 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

@@ -601,8 +601,8 @@ 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

@@ -619,8 +619,8 @@ 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

@@ -636,8 +636,8 @@ 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

@@ -653,8 +653,8 @@ 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

@@ -670,8 +670,8 @@ 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

@@ -689,9 +689,9 @@ 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

@@ -710,8 +710,8 @@ 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

@@ -727,8 +727,8 @@ 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

@@ -740,8 +740,8 @@ void *mxmlGetUserData (

mxmlIndexDelete

Delete an index.

-void mxmlIndexDelete (
-    mxml_index_t *ind
+void mxmlIndexDelete (
+    mxml_index_t *ind
);

Parameters

@@ -751,8 +751,8 @@ void mxmlIndexDelete (

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

@@ -766,10 +766,10 @@ void mxmlIndexDelete (

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

@@ -790,8 +790,8 @@ 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

@@ -803,10 +803,10 @@ int mxmlIndexGetCount (

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

@@ -829,8 +829,8 @@ 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

@@ -845,10 +845,10 @@ mxmlIndexFind() for the first time.

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

@@ -875,10 +875,10 @@ child 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

@@ -905,10 +905,10 @@ child 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

@@ -935,9 +935,9 @@ child 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

@@ -958,10 +958,10 @@ is copied into the new node. CDATA nodes use the MXML_ELEMENT type.

 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

@@ -984,9 +984,9 @@ 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

@@ -1004,9 +1004,9 @@ 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

@@ -1024,9 +1024,9 @@ 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

@@ -1045,9 +1045,9 @@ is copied 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

@@ -1065,10 +1065,10 @@ 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

@@ -1090,11 +1090,11 @@ 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

@@ -1118,8 +1118,8 @@ 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

@@ -1136,8 +1136,8 @@ 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

@@ -1154,8 +1154,8 @@ is deleted via mxmlDelete().

mxmlRemove

Remove a node from its parent.

-void mxmlRemove (
-    mxml_node_t *node
+void mxmlRemove (
+    mxml_node_t *node
);

Parameters

@@ -1168,8 +1168,8 @@ 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

@@ -1182,12 +1182,12 @@ int mxmlRetain (

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

@@ -1225,12 +1225,12 @@ 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

@@ -1268,12 +1268,12 @@ 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

@@ -1310,9 +1310,9 @@ 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

@@ -1338,10 +1338,10 @@ 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

@@ -1363,10 +1363,10 @@ 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

@@ -1388,11 +1388,11 @@ 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

@@ -1420,9 +1420,9 @@ 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

@@ -1440,10 +1440,10 @@ 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

@@ -1463,9 +1463,9 @@ int mxmlSetCustom (

mxmlSetCustomHandlers

Set the handling functions for custom 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

@@ -1483,9 +1483,9 @@ 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

@@ -1501,8 +1501,8 @@ int mxmlSetElement (

mxmlSetErrorCallback

Set the error message callback.

-void mxmlSetErrorCallback (
-    mxml_error_cb_t cb
+void mxmlSetErrorCallback (
+    mxml_error_cb_t cb
);

Parameters

@@ -1512,9 +1512,9 @@ void mxmlSetErrorCallback (

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

@@ -1530,9 +1530,9 @@ 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

@@ -1548,9 +1548,9 @@ int mxmlSetOpaque (

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

@@ -1566,10 +1566,10 @@ 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

@@ -1587,11 +1587,11 @@ 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

@@ -1611,9 +1611,9 @@ 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

@@ -1627,8 +1627,8 @@ int mxmlSetUserData (

 Mini-XML 2.3 mxmlSetWrapMargin

Set the wrap margin when saving XML data.

-void mxmlSetWrapMargin (
-    int column
+void mxmlSetWrapMargin (
+    int column
);

Parameters

@@ -1642,10 +1642,10 @@ 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

@@ -1665,10 +1665,10 @@ 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

diff --git a/mxmldoc.c b/mxmldoc.c index e672e5b..2f7e83c 100644 --- a/mxmldoc.c +++ b/mxmldoc.c @@ -179,13 +179,13 @@ static void write_description(FILE *out, mxml_node_t *description, const char * static void write_element(FILE *out, mxml_node_t *doc, mxml_node_t *element, int mode); static void write_epub(const char *epubfile, const char *section, const char *title, const char *author, const char *copyright, const char *docversion, const char *cssfile, const char *headerfile, const char *introfile, mxml_node_t *doc, const char *footerfile); static void write_file(FILE *out, const char *file, int mode); -static void write_function(FILE *out, int xhtml, mxml_node_t *doc, mxml_node_t *function, int level); +static void write_function(FILE *out, int mode, mxml_node_t *doc, mxml_node_t *function, int level); static void write_html(const char *framefile, const char *docset, const char *section, const char *title, const char *author, const char *copyright, const char *docversion, const char *feedname, const char *feedurl, const char *cssfile, const char *headerfile, const char *introfile, mxml_node_t *doc, const char *footerfile); static void write_html_body(FILE *out, int mode, const char *introfile, mxml_node_t *doc); static void write_html_head(FILE *out, int mode, const char *section, const char *title, const char *author, const char *copyright, const char *cssfile); static void write_html_toc(FILE *out, const char *title, toc_t *toc, const char *filename, const char *target); static void write_man(const char *man_name, const char *section, const char *title, const char *author, const char *copyright, const char *headerfile, const char *introfile, mxml_node_t *doc, const char *footerfile); -static void write_scu(FILE *out, int xhtml, mxml_node_t *doc, mxml_node_t *scut); +static void write_scu(FILE *out, int mode, mxml_node_t *doc, mxml_node_t *scut); static void write_string(FILE *out, const char *s, int mode); static void write_tokens(FILE *out, mxml_node_t *doc, const char *path); static const char *ws_cb(mxml_node_t *node, int where); @@ -3743,11 +3743,26 @@ write_file(FILE *out, /* I - Output file */ { for (ptr = line; *ptr; ptr ++) { - if (*ptr == '&' && !strncmp(ptr + 1, "nbsp;", 5)) + if (!strncmp(ptr, " ", 6)) { ptr += 5; fputs(" ", out); } + else if (!strncmp(ptr, "©", 6)) + { + ptr += 5; + fputs("©", out); + } + else if (!strncmp(ptr, "®", 5)) + { + ptr += 4; + fputs("®", out); + } + else if (!strncmp(ptr, "™", 7)) + { + ptr += 6; + fputs("™", out); + } else fputc(*ptr, out); } @@ -3769,7 +3784,7 @@ write_file(FILE *out, /* I - Output file */ static void write_function(FILE *out, /* I - Output file */ - int xhtml, /* I - XHTML output? */ + int mode, /* I - Output mode */ mxml_node_t *doc, /* I - Document */ mxml_node_t *function, /* I - Function */ int level) /* I - Base heading level */ @@ -3783,7 +3798,7 @@ write_function(FILE *out, /* I - Output file */ *defval; /* Default value */ char prefix; /* Prefix character */ char *sep; /* Newline separator */ - const char *br = xhtml ? "
" : "
"; + const char *br = mode == OUTPUT_EPUB ? "
" : "
"; /* Break sequence */ @@ -4422,7 +4437,7 @@ write_html_body( while (scut) { - write_scu(out, 1, doc, scut); + write_scu(out, mode, doc, scut); scut = find_public(scut, doc, "class", NULL); } @@ -4438,7 +4453,7 @@ write_html_body( while (function) { - write_function(out, 1, doc, function, 3); + write_function(out, mode, doc, function, 3); function = find_public(function, doc, "function", NULL); } @@ -4551,7 +4566,7 @@ write_html_body( while (scut) { - write_scu(out, 1, doc, scut); + write_scu(out, mode, doc, scut); scut = find_public(scut, doc, "struct", NULL); } @@ -4567,7 +4582,7 @@ write_html_body( while (scut) { - write_scu(out, 1, doc, scut); + write_scu(out, mode, doc, scut); scut = find_public(scut, doc, "union", NULL); } @@ -5479,7 +5494,7 @@ write_man(const char *man_name, /* I - Name of manpage */ static void write_scu(FILE *out, /* I - Output file */ - int xhtml, /* I - XHTML output? */ + int mode, /* I - Output mode */ mxml_node_t *doc, /* I - Document */ mxml_node_t *scut) /* I - Structure, class, or union */ { @@ -5496,7 +5511,7 @@ write_scu(FILE *out, /* I - Output file */ int inscope, /* Variable/method scope */ maxscope; /* Maximum scope */ char prefix; /* Prefix character */ - const char *br = xhtml ? "
" : "
"; + const char *br = mode == OUTPUT_EPUB ? "
" : "
"; /* Break sequence */ static const char * const scopes[] = /* Scope strings */ { @@ -5639,7 +5654,7 @@ write_scu(FILE *out, /* I - Output file */ function = mxmlFindElement(function, scut, "function", NULL, NULL, MXML_NO_DESCEND)) { - write_function(out, xhtml, doc, function, 4); + write_function(out, mode, doc, function, 4); } }