From 3b4a9a6f4f1a0bf2ab1c2949743036756280d543 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 7 May 2006 18:07:39 +0000 Subject: [PATCH] Save changes to mxmldoc.c (debug stuff) Update svn:ignore properties. --- mxml.xml | 2 ++ mxmldoc.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/mxml.xml b/mxml.xml index 188b25b..9a6945c 100644 --- a/mxml.xml +++ b/mxml.xml @@ -839,6 +839,8 @@ the walk to the node's children. char *(*)(mxml_node_t *) Custom data save callback function + C++ support... + End of "$Id$". struct mxml_custom_s diff --git a/mxmldoc.c b/mxmldoc.c index 6b13661..c1107cf 100644 --- a/mxmldoc.c +++ b/mxmldoc.c @@ -1,3 +1,4 @@ +#define DEBUG 1 /* * "$Id$" * @@ -520,8 +521,13 @@ find_public(mxml_node_t *node, /* I - Current node */ * A missing or empty description signals a private node... */ +#if 0 if (!description || !description->child) continue; +#else + if (!description) + continue; +#endif /* 0 */ /* * Look for @private@ in the comment text... @@ -1317,7 +1323,21 @@ scan_file(const char *filename, /* I - Filename */ #endif /* DEBUG */ update_comment(typedefnode, mxmlNewText(description, 0, buffer)); - typedefnode = NULL; + + if (structclass) + { + description = mxmlNewElement(structclass, "description"); + update_comment(structclass, + mxmlNewText(description, 0, buffer)); + } + else if (enumeration) + { + description = mxmlNewElement(enumeration, "description"); + update_comment(enumeration, + mxmlNewText(description, 0, buffer)); + } + +// typedefnode = NULL; } else if (strcmp(tree->value.element.name, "mxmldoc") && !mxmlFindElement(tree, tree, "description", @@ -1423,7 +1443,21 @@ scan_file(const char *filename, /* I - Filename */ #endif /* DEBUG */ update_comment(typedefnode, mxmlNewText(description, 0, buffer)); - typedefnode = NULL; + + if (structclass) + { + description = mxmlNewElement(structclass, "description"); + update_comment(structclass, + mxmlNewText(description, 0, buffer)); + } + else if (enumeration) + { + description = mxmlNewElement(enumeration, "description"); + update_comment(enumeration, + mxmlNewText(description, 0, buffer)); + } + +// typedefnode = NULL; } else if (strcmp(tree->value.element.name, "mxmldoc") && !mxmlFindElement(tree, tree, "description", @@ -1505,6 +1539,19 @@ scan_file(const char *filename, /* I - Filename */ #endif /* DEBUG */ update_comment(typedefnode, mxmlNewText(description, 0, buffer)); + + if (structclass) + { + description = mxmlNewElement(structclass, "description"); + update_comment(structclass, + mxmlNewText(description, 0, buffer)); + } + else if (enumeration) + { + description = mxmlNewElement(enumeration, "description"); + update_comment(enumeration, + mxmlNewText(description, 0, buffer)); + } } else if (strcmp(tree->value.element.name, "mxmldoc") && !mxmlFindElement(tree, tree, "description",