Commit ec997057 authored by Michael R Sweet's avatar Michael R Sweet

Fix typedef documentation (STR #72)

parent 9ac64182
CHANGES - 2009-04-18
CHANGES - 2009-05-04
--------------------
CHANGES IN Mini-XML 2.6
- Documentation fixes (STR #91, STR #92)
- The mxmldoc program did handle typedef comments properly (STR #72)
- Added support for "long long" printf formats.
- The XML parser now rejects UTF-8 XML files that start with a BOM
(STR #89)
- The mxmldoc program now supports generating Xcode documentation
sets.
- The mxmldoc program now supports generating Xcode documentation sets.
- mxmlSave*() did not output UTF-8 correctly on some platforms.
- mxmlNewXML() now adds encoding="utf-8" in the ?xml directive
to avoid problems with non-conformant XML parsers that assume
something other than UTF-8 as the default encoding.
- Wrapping was not disabled when mxmlSetWrapMargin(0) was
called, and "<?xml ... ?>" was always followed by a newline
(STR #76)
- mxmlNewXML() now adds encoding="utf-8" in the ?xml directive to avoid
problems with non-conformant XML parsers that assume something other
than UTF-8 as the default encoding.
- Wrapping was not disabled when mxmlSetWrapMargin(0) was called, and
"<?xml ... ?>" was always followed by a newline (STR #76)
- The mxml.pc.in file was broken (STR #79)
- The mxmldoc program now handles "typedef enum name {} name"
correctly (STR #72)
- The mxmldoc program now handles "typedef enum name {} name" correctly
(STR #72)
CHANGES IN Mini-XML 2.5
......
......@@ -1236,7 +1236,9 @@ scan_file(const char *filename, /* I - Filename */
comment->last_child->value.text.string);
description = mxmlNewElement(typedefnode, "description");
#ifdef DEBUG
fputs(" duplicating comment for typedef...\n", stderr);
fprintf(stderr,
" duplicating comment %p/%p for typedef...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
update_comment(typedefnode, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
......@@ -1245,8 +1247,9 @@ scan_file(const char *filename, /* I - Filename */
description = mxmlNewElement(structclass, "description");
#ifdef DEBUG
fprintf(stderr, " adding comment to %s...\n",
structclass->value.element.name);
fprintf(stderr, " adding comment %p/%p to %s...\n",
comment->last_child, comment->child,
structclass->value.element.name);
#endif /* DEBUG */
update_comment(structclass, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
......@@ -1318,7 +1321,9 @@ scan_file(const char *filename, /* I - Filename */
comment->last_child->value.text.string);
description = mxmlNewElement(typedefnode, "description");
#ifdef DEBUG
fputs(" duplicating comment for typedef...\n", stderr);
fprintf(stderr,
" duplicating comment %p/%p for typedef...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
update_comment(typedefnode, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
......@@ -1327,7 +1332,8 @@ scan_file(const char *filename, /* I - Filename */
description = mxmlNewElement(enumeration, "description");
#ifdef DEBUG
fputs(" adding comment to enumeration...\n", stderr);
fprintf(stderr, " adding comment %p/%p to enumeration...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
update_comment(enumeration, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
......@@ -1664,8 +1670,11 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(variable, "description");
#ifdef DEBUG
fputs(" adding comment to variable...\n", stderr);
fprintf(stderr,
" adding comment %p/%p to variable...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(variable,
mxmlNewText(description, 0, buffer));
}
......@@ -1686,8 +1695,11 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(constant, "description");
#ifdef DEBUG
fputs(" adding comment to constant...\n", stderr);
fprintf(stderr,
" adding comment %p/%p to constant...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(constant,
mxmlNewText(description, 0, buffer));
}
......@@ -1720,9 +1732,12 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(typedefnode, "description");
#ifdef DEBUG
fprintf(stderr, " adding comment to typedef %s...\n",
fprintf(stderr,
" adding comment %p/%p to typedef %s...\n",
comment->last_child, comment->child,
mxmlElementGetAttr(typedefnode, "name"));
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(typedefnode,
mxmlNewText(description, 0, buffer));
......@@ -1748,8 +1763,10 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(tree, "description");
#ifdef DEBUG
fputs(" adding comment to parent...\n", stderr);
fprintf(stderr, " adding comment %p/%p to parent...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(tree,
mxmlNewText(description, 0, buffer));
}
......@@ -1834,8 +1851,10 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(variable, "description");
#ifdef DEBUG
fputs(" adding comment to variable...\n", stderr);
fprintf(stderr, " adding comment %p/%p to variable...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(variable,
mxmlNewText(description, 0, buffer));
}
......@@ -1856,8 +1875,10 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(constant, "description");
#ifdef DEBUG
fputs(" adding comment to constant...\n", stderr);
fprintf(stderr, " adding comment %p/%p to constant...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(constant,
mxmlNewText(description, 0, buffer));
}
......@@ -1890,9 +1911,12 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(typedefnode, "description");
#ifdef DEBUG
fprintf(stderr, " adding comment to typedef %s...\n",
fprintf(stderr,
" adding comment %p/%p to typedef %s...\n",
comment->last_child, comment->child,
mxmlElementGetAttr(typedefnode, "name"));
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(typedefnode,
mxmlNewText(description, 0, buffer));
......@@ -1918,8 +1942,10 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(tree, "description");
#ifdef DEBUG
fputs(" adding comment to parent...\n", stderr);
fprintf(stderr, " adding comment %p/%p to parent...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(tree,
mxmlNewText(description, 0, buffer));
}
......@@ -1980,8 +2006,10 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(variable, "description");
#ifdef DEBUG
fputs(" adding comment to variable...\n", stderr);
fprintf(stderr, " adding comment %p/%p to variable...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(variable,
mxmlNewText(description, 0, buffer));
}
......@@ -2002,8 +2030,10 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(constant, "description");
#ifdef DEBUG
fputs(" adding comment to constant...\n", stderr);
fprintf(stderr, " adding comment %p/%p to constant...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(constant,
mxmlNewText(description, 0, buffer));
}
......@@ -2037,9 +2067,11 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(typedefnode, "description");
#ifdef DEBUG
fprintf(stderr, " adding comment to typedef %s...\n",
fprintf(stderr, " adding comment %p/%p to typedef %s...\n",
comment->last_child, comment->child,
mxmlElementGetAttr(typedefnode, "name"));
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(typedefnode,
mxmlNewText(description, 0, buffer));
......@@ -2063,8 +2095,10 @@ scan_file(const char *filename, /* I - Filename */
{
description = mxmlNewElement(tree, "description");
#ifdef DEBUG
fputs(" adding comment to parent...\n", stderr);
fprintf(stderr, " adding comment %p/%p to parent...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
mxmlNewText(comment, 0, buffer);
update_comment(tree,
mxmlNewText(description, 0, buffer));
}
......@@ -2249,7 +2283,8 @@ scan_file(const char *filename, /* I - Filename */
description = mxmlNewElement(returnvalue, "description");
#ifdef DEBUG
fputs(" adding comment to returnvalue...\n", stderr);
fprintf(stderr, " adding comment %p/%p to returnvalue...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
update_comment(returnvalue, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
......@@ -2260,7 +2295,8 @@ scan_file(const char *filename, /* I - Filename */
description = mxmlNewElement(function, "description");
#ifdef DEBUG
fputs(" adding comment to function...\n", stderr);
fprintf(stderr, " adding comment %p/%p to function...\n",
comment->last_child, comment->child);
#endif /* DEBUG */
update_comment(function, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
......
......@@ -6,3 +6,12 @@ typedef enum foo_enum_e /* Sample enumeration type */
FOO_BLUE, /* Blue fish */
FOO_PRIVATE /* Private fish @private@ */
} foo_enum_t;
typedef enum foo_enum2_e /* Sample enumeration type #2 */
{
FOO2_ONE, /* One fish #2 */
FOO2_TWO, /* Two fish #2 */
FOO2_RED, /* Red fish #2 */
FOO2_BLUE, /* Blue fish #2 */
FOO2_PRIVATE /* Private fish #2 @private@ */
} foo_enum2_t;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment