Clean share libraries, and fix SAX unit test to look for the right number of data nodes.

Add --version option to mxmldoc.
pull/193/head
Michael R Sweet 13 years ago
parent 682852c289
commit f5b0b9270d
  1. 2
      Makefile.in
  2. 36
      mxmldoc.c
  3. 6
      testmxml.c

@ -105,7 +105,7 @@ all: Makefile config.h $(TARGETS)
clean: clean:
echo Cleaning build files... echo Cleaning build files...
$(RM) $(OBJS) $(TARGETS) $(RM) $(OBJS) $(TARGETS)
$(RM) mxmldoc-static libmxml.a $(RM) mxmldoc-static libmxml.a libmxml.so.1.5 libmxml.sl.1 libmxml.1.dylib
# #

@ -5,7 +5,7 @@
* Documentation generator using Mini-XML, a small XML-like file parsing * Documentation generator using Mini-XML, a small XML-like file parsing
* library. * library.
* *
* Copyright 2003-2010 by Michael R Sweet. * Copyright 2003-2011 by Michael R Sweet.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Michael R Sweet and are protected by Federal copyright * property of Michael R Sweet and are protected by Federal copyright
@ -82,17 +82,17 @@ extern char **environ;
* <constant name=""> * <constant name="">
* <description>descriptive text</description> * <description>descriptive text</description>
* </constant> * </constant>
* *
* <enumeration name=""> * <enumeration name="">
* <description>descriptive text</description> * <description>descriptive text</description>
* <constant name="">...</constant> * <constant name="">...</constant>
* </enumeration> * </enumeration>
* *
* <typedef name=""> * <typedef name="">
* <description>descriptive text</description> * <description>descriptive text</description>
* <type>type string</type> * <type>type string</type>
* </typedef> * </typedef>
* *
* <function name="" scope=""> * <function name="" scope="">
* <description>descriptive text</description> * <description>descriptive text</description>
* <argument name="" direction="I|O|IO" default=""> * <argument name="" direction="I|O|IO" default="">
@ -105,23 +105,23 @@ extern char **environ;
* </returnvalue> * </returnvalue>
* <seealso>function names separated by spaces</seealso> * <seealso>function names separated by spaces</seealso>
* </function> * </function>
* *
* <variable name="" scope=""> * <variable name="" scope="">
* <description>descriptive text</description> * <description>descriptive text</description>
* <type>type string</type> * <type>type string</type>
* </variable> * </variable>
* *
* <struct name=""> * <struct name="">
* <description>descriptive text</description> * <description>descriptive text</description>
* <variable name="">...</variable> * <variable name="">...</variable>
* <function name="">...</function> * <function name="">...</function>
* </struct> * </struct>
* *
* <union name=""> * <union name="">
* <description>descriptive text</description> * <description>descriptive text</description>
* <variable name="">...</variable> * <variable name="">...</variable>
* </union> * </union>
* *
* <class name="" parent=""> * <class name="" parent="">
* <description>descriptive text</description> * <description>descriptive text</description>
* <class name="">...</class> * <class name="">...</class>
@ -133,7 +133,7 @@ extern char **environ;
* </namespace> * </namespace>
* </mxmldoc> * </mxmldoc>
*/ */
/* /*
* Basic states for file parser... * Basic states for file parser...
@ -274,6 +274,15 @@ main(int argc, /* I - Number of command-line args */
usage(NULL); usage(NULL);
} }
else if (!strcmp(argv[i], "--version"))
{
/*
* Show version...
*/
puts(MXML_VERSION + 10);
return (0);
}
else if (!strcmp(argv[i], "--css") && !cssfile) else if (!strcmp(argv[i], "--css") && !cssfile)
{ {
/* /*
@ -1196,7 +1205,7 @@ scan_file(const char *filename, /* I - Filename */
} }
else else
typedefnode = NULL; typedefnode = NULL;
structclass = mxmlNewElement(MXML_NO_PARENT, structclass = mxmlNewElement(MXML_NO_PARENT,
type->child->value.text.string); type->child->value.text.string);
@ -1313,7 +1322,7 @@ scan_file(const char *filename, /* I - Filename */
} }
else else
typedefnode = NULL; typedefnode = NULL;
enumeration = mxmlNewElement(MXML_NO_PARENT, "enumeration"); enumeration = mxmlNewElement(MXML_NO_PARENT, "enumeration");
#ifdef DEBUG #ifdef DEBUG
@ -1547,7 +1556,7 @@ scan_file(const char *filename, /* I - Filename */
type = NULL; type = NULL;
break; break;
} }
mxmlDelete(type); mxmlDelete(type);
type = NULL; type = NULL;
} }
@ -2740,6 +2749,7 @@ usage(const char *option) /* I - Unknown option */
puts(" --section section Set section name"); puts(" --section section Set section name");
puts(" --title title Set documentation title"); puts(" --title title Set documentation title");
puts(" --tokens path Generate Xcode docset Tokens.xml file"); puts(" --tokens path Generate Xcode docset Tokens.xml file");
puts(" --version Show mxmldoc/Mini-XML version");
exit(1); exit(1);
} }
@ -5017,7 +5027,7 @@ write_toc(FILE *out, /* I - Output file */
fputs("</ul></li>\n", out); fputs("</ul></li>\n", out);
} }
} }
fclose(fp); fclose(fp);
} }

@ -3,7 +3,7 @@
* *
* Test program for Mini-XML, a small XML-like file parsing library. * Test program for Mini-XML, a small XML-like file parsing library.
* *
* Copyright 2003-2010 by Michael R Sweet. * Copyright 2003-2011 by Michael R Sweet.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Michael R Sweet and are protected by Federal copyright * property of Michael R Sweet and are protected by Federal copyright
@ -615,9 +615,9 @@ main(int argc, /* I - Number of command-line args */
return (1); return (1);
} }
if (event_counts[MXML_SAX_DATA] != 61) if (event_counts[MXML_SAX_DATA] != 60)
{ {
fprintf(stderr, "MXML_SAX_DATA seen %d times, expected 61 times!\n", fprintf(stderr, "MXML_SAX_DATA seen %d times, expected 60 times!\n",
event_counts[MXML_SAX_DATA]); event_counts[MXML_SAX_DATA]);
return (1); return (1);
} }

Loading…
Cancel
Save