pkg-config support.

Update mxmldoc to produce XML conforming to the schema.

Update the schema so that it works.

Add version number to XML output.
This commit is contained in:
Michael R Sweet 2004-05-02 22:02:36 +00:00
parent 537afc37da
commit 08896f33e5
11 changed files with 817 additions and 687 deletions

View File

@ -1,9 +1,12 @@
README - 05/01/2004
README - 05/02/2004
-------------------
CHANGES IN Mini-XML 2.0
- New programmers manual.
- The mxmldoc utility now produces XML output which
conforms to an updated XML schema, described in the file
"doc/mxmldoc.xsd".
- Changed the whitespace callback interface to return
strings instead of a single character, allowing for
greater control over the formatting of XML files

View File

@ -1,5 +1,5 @@
#
# "$Id: Makefile.in,v 1.19 2004/05/02 16:04:40 mike Exp $"
# "$Id: Makefile.in,v 1.20 2004/05/02 22:02:36 mike Exp $"
#
# Makefile for Mini-XML, a small XML-like file parsing library.
#
@ -74,7 +74,8 @@ MAN3EXT = @MAN3EXT@
# Targets...
#
DOCFILES = doc/mxml.html doc/mxml.pdf README COPYING CHANGES
DOCFILES = doc/mxml.html doc/mxml.pdf doc/mxmldoc.xsd \
README COPYING CHANGES
PUBLIBOBJS = mxml-attr.o mxml-entity.o mxml-file.o mxml-node.o \
mxml-search.o mxml-set.o
LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o
@ -256,5 +257,5 @@ $(OBJS): Makefile config.h
#
# End of "$Id: Makefile.in,v 1.19 2004/05/02 16:04:40 mike Exp $".
# End of "$Id: Makefile.in,v 1.20 2004/05/02 22:02:36 mike Exp $".
#

2
TODO
View File

@ -1,4 +1,4 @@
TODO - 05/01/2004
TODO - 05/02/2004
-----------------
- UTF-16 support.

30
configure vendored
View File

@ -271,7 +271,7 @@ PACKAGE_STRING=
PACKAGE_BUGREPORT=
ac_unique_file="mxml.h"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LDFLAGS OPTIM docdir CC CFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX RANLIB ac_ct_RANLIB AR CP MKDIR NROFF GROFF RM ARFLAGS CAT1EXT CAT3EXT MAN1EXT MAN3EXT LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION LDFLAGS OPTIM docdir CC CFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX RANLIB ac_ct_RANLIB AR CP MKDIR NROFF GROFF RM ARFLAGS CAT1EXT CAT3EXT MAN1EXT MAN3EXT PC_CFLAGS PC_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1235,6 +1235,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h"
VERSION=2.0rc1
cat >>confdefs.h <<_ACEOF
#define MXML_VERSION "Mini-XML v$VERSION"
_ACEOF
CFLAGS="${CFLAGS:=}"
CXXFLAGS="${CXXFLAGS:=}"
LDFLAGS="${LDFLAGS:=}"
@ -3042,7 +3049,22 @@ esac
ac_config_files="$ac_config_files Makefile mxml.list"
if test "$includedir" != /usr/include; then
PC_CFLAGS="-I$includedir"
else
PC_CFLAGS=""
fi
if test "$libdir" != /usr/lib; then
PC_LIBS="-L$libdir -lmxml"
else
PC_LIBS="-lmxml"
fi
ac_config_files="$ac_config_files Makefile mxml.list mxml.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@ -3568,6 +3590,7 @@ do
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"mxml.list" ) CONFIG_FILES="$CONFIG_FILES mxml.list" ;;
"mxml.pc" ) CONFIG_FILES="$CONFIG_FILES mxml.pc" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@ -3653,6 +3676,7 @@ s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@VERSION@,$VERSION,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@OPTIM@,$OPTIM,;t t
s,@docdir@,$docdir,;t t
@ -3678,6 +3702,8 @@ s,@CAT1EXT@,$CAT1EXT,;t t
s,@CAT3EXT@,$CAT3EXT,;t t
s,@MAN1EXT@,$MAN1EXT,;t t
s,@MAN3EXT@,$MAN3EXT,;t t
s,@PC_CFLAGS@,$PC_CFLAGS,;t t
s,@PC_LIBS@,$PC_LIBS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF

View File

@ -1,5 +1,5 @@
dnl
dnl "$Id: configure.in,v 1.10 2004/05/02 16:04:40 mike Exp $"
dnl "$Id: configure.in,v 1.11 2004/05/02 22:02:36 mike Exp $"
dnl
dnl Configuration script for Mini-XML, a small XML-like file parsing library.
dnl
@ -16,17 +16,17 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl Version number...
VERSION="2.0rc1"
AC_SUBST(VERSION)
AC_DEFINE(MXML_VERSION, "$VERSION")
dnl Specify a source file from the distribution...
AC_INIT(mxml.h)
dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number...
VERSION=2.0rc1
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(MXML_VERSION, "Mini-XML v$VERSION")
dnl Clear default debugging options and set normal optimization by
dnl default unless the user asks for debugging specifically.
CFLAGS="${CFLAGS:=}"
@ -168,9 +168,25 @@ AC_SUBST(CAT3EXT)
AC_SUBST(MAN1EXT)
AC_SUBST(MAN3EXT)
dnl pkg-config stuff...
if test "$includedir" != /usr/include; then
PC_CFLAGS="-I$includedir"
else
PC_CFLAGS=""
fi
if test "$libdir" != /usr/lib; then
PC_LIBS="-L$libdir -lmxml"
else
PC_LIBS="-lmxml"
fi
AC_SUBST(PC_CFLAGS)
AC_SUBST(PC_LIBS)
dnl Output the makefile, etc...
AC_OUTPUT(Makefile mxml.list mxml.pc)
dnl
dnl End of "$Id: configure.in,v 1.10 2004/05/02 16:04:40 mike Exp $".
dnl End of "$Id: configure.in,v 1.11 2004/05/02 22:02:36 mike Exp $".
dnl

View File

@ -23,9 +23,10 @@
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="enumeration" type="enumerationType"/>
<xsd:element name="function" type="functionType"/>
<xsd:element name="mxmldoc" type="mxmldocType"/>
<xsd:element name="namespace" type="namespaceType"/>
<xsd:element name="returnvalue" type="returnvalueType"/>
<xsd:element name="seealso" type="xsd:string"/>
<xsd:element name="seealso" type="identifierList"/>
<xsd:element name="struct" type="structType"/>
<xsd:element name="typedef" type="typedefType"/>
<xsd:element name="type" type="xsd:string"/>
@ -35,8 +36,8 @@
<!-- descriptions of complex elements -->
<xsd:complexType name="argumentType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="default" type="xsd:string" use="optional"/>
<xsd:attribute name="name" type="identifier" use="required"/>
@ -46,12 +47,15 @@
<xsd:complexType name="classType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="class" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="enumeration" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="function" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="struct" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="union" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="class"/>
<xsd:element ref="enumeration"/>
<xsd:element ref="function"/>
<xsd:element ref="struct"/>
<xsd:element ref="typedef"/>
<xsd:element ref="union"/>
<xsd:element ref="variable"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="identifier" use="required"/>
<xsd:attribute name="parent" type="xsd:string" use="optional"/>
@ -66,6 +70,7 @@
<xsd:complexType name="enumerationType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="constant" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="name" type="identifier" use="required"/>
@ -73,48 +78,66 @@
<xsd:complexType name="functionType">
<xsd:sequence>
<xsd:element ref="returnvalue" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="argument" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element ref="returnvalue" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="seealso" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="identifier" use="required"/>
<xsd:attribute name="scope" type="scope" use="optional"/>
</xsd:complexType>
<xsd:complexType name="mxmldocType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="class"/>
<xsd:element ref="enumeration"/>
<xsd:element ref="function"/>
<xsd:element ref="namespace"/>
<xsd:element ref="struct"/>
<xsd:element ref="typedef"/>
<xsd:element ref="union"/>
<xsd:element ref="variable"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="namespaceType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="class" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="enumeration" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="function" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="struct" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="union" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="class"/>
<xsd:element ref="enumeration"/>
<xsd:element ref="function"/>
<xsd:element ref="struct"/>
<xsd:element ref="typedef"/>
<xsd:element ref="union"/>
<xsd:element ref="variable"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="identifier" use="required"/>
</xsd:complexType>
<xsd:complexType name="returnvalueType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="structType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="function" minOccurs="0" maxOccurs="unbounded"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="variable"/>
<xsd:element ref="function"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="identifier" use="required"/>
</xsd:complexType>
<xsd:complexType name="typedefType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="identifier" use="required"/>
</xsd:complexType>
@ -129,8 +152,8 @@
<xsd:complexType name="variableType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="type" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="identifier" use="required"/>
</xsd:complexType>
@ -146,10 +169,14 @@
<xsd:simpleType name="identifier">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[a-zA-Z_][a-zA-Z_0-9]*"/>
<xsd:pattern value="[a-zA-Z_(.]([a-zA-Z_(.,)* 0-9])*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="identifierList">
<xsd:list itemType="identifier"/>
</xsd:simpleType>
<xsd:simpleType name="scope">
<xsd:restriction base="xsd:string">
<xsd:enumeration value=""/>

View File

@ -2,6 +2,7 @@
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>Documentation</title>
<meta name='creator' content='Mini-XML v2.0rc1'/>
<style><!--
h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }

View File

@ -9,6 +9,10 @@
<li>New programmers manual.</li>
<li>The mxmldoc utility now produces XML output which
conforms to an updated XML schema, described in the file
"doc/mxmldoc.xsd".</li>
<li>Changed the whitespace callback interface to return
strings instead of a single character, allowing for
greater control over the formatting of XML files written

10
mxml.pc.in Normal file
View File

@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: Mini-XML
Description: Lightweight XML support library
Version: @VERSION@
Libs: @PC_LIBS@
Cflags: @PC_CFLAGS@

1184
mxml.xml

File diff suppressed because it is too large Load Diff

162
mxmldoc.c
View File

@ -1,5 +1,5 @@
/*
* "$Id: mxmldoc.c,v 1.35 2004/05/02 16:04:40 mike Exp $"
* "$Id: mxmldoc.c,v 1.36 2004/05/02 22:02:36 mike Exp $"
*
* Documentation generator using Mini-XML, a small XML-like file parsing
* library.
@ -52,58 +52,64 @@
* as desired. The following is a poor-man's schema:
*
* <?xml version="1.0"?>
* <namespace name=""> [optional...]
* <constant name="">
* <description>descriptive text</description>
* </constant>
* <mxmldoc xmlns="http://www.easysw.com"
* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
* xsi:schemaLocation="http://www.easysw.com/~mike/mxml/mxmldoc.xsd">
*
* <enumeration name="">
* <constant name="">...</constant>
* </enumeration>
*
* <typedef name="">
* <description>descriptive text</description>
* <type>type string</type>
* </typedef>
*
* <function name="" scope="">
* <description>descriptive text</description>
* <argument name="" direction="I|O|IO" default="">
* <namespace name=""> [optional...]
* <constant name="">
* <description>descriptive text</description>
* </constant>
*
* <enumeration name="">
* <description>descriptive text</description>
* <constant name="">...</constant>
* </enumeration>
*
* <typedef name="">
* <description>descriptive text</description>
* <type>type string</type>
* </argument>
* <returnvalue>
* </typedef>
*
* <function name="" scope="">
* <description>descriptive text</description>
* <argument name="" direction="I|O|IO" default="">
* <description>descriptive text</description>
* <type>type string</type>
* </argument>
* <returnvalue>
* <description>descriptive text</description>
* <type>type string</type>
* </returnvalue>
* <seealso>function names separated by spaces</seealso>
* </function>
*
* <variable name="" scope="">
* <description>descriptive text</description>
* <type>type string</type>
* </returnvalue>
* <seealso>function names separated by spaces</seealso>
* </function>
*
* <variable name="" scope="">
* <description>descriptive text</description>
* <type>type string</type>
* </variable>
*
* <struct name="">
* <description>descriptive text</description>
* <variable name="">...</variable>
* <function name="">...</function>
* </struct>
*
* <union name="">
* <description>descriptive text</description>
* <variable name="">...</variable>
* </union>
*
* <class name="" parent="">
* <description>descriptive text</description>
* <class name="">...</class>
* <enumeration name="">...</enumeration>
* <function name="">...</function>
* <struct name="">...</struct>
* <variable name="">...</variable>
* </class>
* </namespace>
* </variable>
*
* <struct name="">
* <description>descriptive text</description>
* <variable name="">...</variable>
* <function name="">...</function>
* </struct>
*
* <union name="">
* <description>descriptive text</description>
* <variable name="">...</variable>
* </union>
*
* <class name="" parent="">
* <description>descriptive text</description>
* <class name="">...</class>
* <enumeration name="">...</enumeration>
* <function name="">...</function>
* <struct name="">...</struct>
* <variable name="">...</variable>
* </class>
* </namespace>
* </mxmldoc>
*/
@ -149,6 +155,7 @@ main(int argc, /* I - Number of command-line args */
int i; /* Looping var */
FILE *fp; /* File to read */
mxml_node_t *doc; /* XML documentation tree */
mxml_node_t *mxmldoc; /* mxmldoc node */
/*
@ -177,13 +184,28 @@ main(int argc, /* I - Number of command-line args */
if (!doc)
{
mxmldoc = NULL;
fprintf(stderr, "mxmldoc: Unable to read the XML documentation file \"%s\"!\n",
argv[1]);
doc = mxmlNewElement(NULL, "?xml");
mxmlElementSetAttr(doc, "version", "1.0");
}
else if ((mxmldoc = mxmlFindElement(doc, doc, "mxmldoc", NULL,
NULL, MXML_DESCEND)) == NULL)
{
fprintf(stderr, "mxmldoc: XML documentation file \"%s\" is missing <mxmldoc> node!!\n",
argv[1]);
mxmlDelete(doc);
doc = NULL;
}
}
else
{
doc = NULL;
mxmldoc = NULL;
}
if (!doc)
{
/*
* Create an empty XML documentation file...
@ -191,6 +213,21 @@ main(int argc, /* I - Number of command-line args */
doc = mxmlNewElement(NULL, "?xml");
mxmlElementSetAttr(doc, "version", "1.0");
mxmldoc = mxmlNewElement(doc, "mxmldoc");
#ifdef MXML_INCLUDE_SCHEMA
/*
* Currently we don't include the schema/namespace stuff with the
* XML output since some validators don't seem to like it...
*/
mxmlElementSetAttr(mxmldoc, "xmlns", "http://www.easysw.com");
mxmlElementSetAttr(mxmldoc, "xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance");
mxmlElementSetAttr(mxmldoc, "xsi:schemaLocation",
"http://www.easysw.com/~mike/mxml/mxmldoc.xsd");
#endif /* MXML_INCLUDE_SCHEMA */
}
/*
@ -205,7 +242,7 @@ main(int argc, /* I - Number of command-line args */
mxmlDelete(doc);
return (1);
}
else if (scan_file(argv[i], fp, doc))
else if (scan_file(argv[i], fp, mxmldoc))
{
fclose(fp);
mxmlDelete(doc);
@ -250,7 +287,7 @@ main(int argc, /* I - Number of command-line args */
* Write HTML documentation...
*/
write_documentation(doc);
write_documentation(mxmldoc);
/*
* Delete the tree and return...
@ -969,7 +1006,7 @@ scan_file(const char *filename, /* I - Filename */
update_comment(typedefnode,
mxmlNewText(description, 0, buffer));
}
else if (strcmp(tree->value.element.name, "?xml") &&
else if (strcmp(tree->value.element.name, "mxmldoc") &&
!mxmlFindElement(tree, tree, "description",
NULL, NULL, MXML_DESCEND_FIRST))
{
@ -1066,7 +1103,7 @@ scan_file(const char *filename, /* I - Filename */
update_comment(typedefnode,
mxmlNewText(description, 0, buffer));
}
else if (strcmp(tree->value.element.name, "?xml") &&
else if (strcmp(tree->value.element.name, "mxmldoc") &&
!mxmlFindElement(tree, tree, "description",
NULL, NULL, MXML_DESCEND_FIRST))
{
@ -1147,7 +1184,7 @@ scan_file(const char *filename, /* I - Filename */
update_comment(typedefnode,
mxmlNewText(description, 0, buffer));
}
else if (strcmp(tree->value.element.name, "?xml") &&
else if (strcmp(tree->value.element.name, "mxmldoc") &&
!mxmlFindElement(tree, tree, "description",
NULL, NULL, MXML_DESCEND_FIRST))
{
@ -1283,7 +1320,7 @@ scan_file(const char *filename, /* I - Filename */
if (type->child &&
!strcmp(type->child->value.text.string, "static") &&
!strcmp(tree->value.element.name, "?xml"))
!strcmp(tree->value.element.name, "mxmldoc"))
{
/*
* Remove static functions...
@ -1334,6 +1371,8 @@ scan_file(const char *filename, /* I - Filename */
{
returnvalue = mxmlNewElement(function, "returnvalue");
mxmlAdd(returnvalue, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, type);
description = mxmlNewElement(returnvalue, "description");
#ifdef DEBUG
fputs(" adding comment to returnvalue...\n", stderr);
@ -1341,8 +1380,6 @@ scan_file(const char *filename, /* I - Filename */
update_comment(returnvalue, comment->last_child);
mxmlAdd(description, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
comment->last_child);
mxmlAdd(returnvalue, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, type);
}
else
mxmlDelete(type);
@ -1408,7 +1445,7 @@ scan_file(const char *filename, /* I - Filename */
}
if (typedefnode)
mxmlAdd(typedefnode, MXML_ADD_AFTER, MXML_ADD_TO_PARENT,
mxmlAdd(typedefnode, MXML_ADD_BEFORE, MXML_ADD_TO_PARENT,
type);
else
mxmlDelete(type);
@ -1746,6 +1783,7 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
puts("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>");
puts("<head>");
puts("\t<title>Documentation</title>");
puts("\t<meta name='creator' content='" MXML_VERSION "'/>");
puts("\t<style><!--");
puts("\th1, h2, h3, p { font-family: sans-serif; text-align: justify; }");
puts("\ttt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }");
@ -1823,7 +1861,7 @@ write_documentation(mxml_node_t *doc) /* I - XML documentation */
puts("<h4>Definition</h4>");
puts("<pre>");
printf("class %s", name);
printf("class %s", cname);
if ((parent = mxmlElementGetAttr(scut, "parent")) != NULL)
printf(" %s", parent);
puts("\n{");
@ -2659,6 +2697,7 @@ ws_cb(mxml_node_t *node, /* I - Element node */
strcmp(name, "constant") &&
strcmp(name, "enumeration") &&
strcmp(name, "function") &&
strcmp(name, "mxmldoc") &&
strcmp(name, "namespace") &&
strcmp(name, "returnvalue") &&
strcmp(name, "struct") &&
@ -2694,6 +2733,7 @@ ws_cb(mxml_node_t *node, /* I - Element node */
strcmp(name, "constant") &&
strcmp(name, "enumeration") &&
strcmp(name, "function") &&
strcmp(name, "mxmldoc") &&
strcmp(name, "namespace") &&
strcmp(name, "returnvalue") &&
strcmp(name, "struct") &&
@ -2708,5 +2748,5 @@ ws_cb(mxml_node_t *node, /* I - Element node */
/*
* End of "$Id: mxmldoc.c,v 1.35 2004/05/02 16:04:40 mike Exp $".
* End of "$Id: mxmldoc.c,v 1.36 2004/05/02 22:02:36 mike Exp $".
*/