diff --git a/Makefile.in b/Makefile.in
index 2930c83..8c4408b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -105,7 +105,7 @@ all: Makefile config.h $(TARGETS)
clean:
echo Cleaning build files...
$(RM) $(OBJS) $(TARGETS)
- $(RM) mxmldoc-static libmxml.a
+ $(RM) mxmldoc-static libmxml.a libmxml.so.1.5 libmxml.sl.1 libmxml.1.dylib
#
diff --git a/mxmldoc.c b/mxmldoc.c
index b365c60..fc26633 100644
--- a/mxmldoc.c
+++ b/mxmldoc.c
@@ -5,7 +5,7 @@
* Documentation generator using 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
* property of Michael R Sweet and are protected by Federal copyright
@@ -82,17 +82,17 @@ extern char **environ;
*
* descriptive text
*
- *
+ *
*
* descriptive text
* ...
*
- *
+ *
*
* descriptive text
* type string
*
- *
+ *
*
* descriptive text
*
@@ -105,23 +105,23 @@ extern char **environ;
*
* function names separated by spaces
*
- *
+ *
*
* descriptive text
* type string
*
- *
+ *
*
* descriptive text
* ...
* ...
*
- *
+ *
*
* descriptive text
* ...
*
- *
+ *
*
* descriptive text
* ...
@@ -133,7 +133,7 @@ extern char **environ;
*
*
*/
-
+
/*
* Basic states for file parser...
@@ -274,6 +274,15 @@ main(int argc, /* I - Number of command-line args */
usage(NULL);
}
+ else if (!strcmp(argv[i], "--version"))
+ {
+ /*
+ * Show version...
+ */
+
+ puts(MXML_VERSION + 10);
+ return (0);
+ }
else if (!strcmp(argv[i], "--css") && !cssfile)
{
/*
@@ -1196,7 +1205,7 @@ scan_file(const char *filename, /* I - Filename */
}
else
typedefnode = NULL;
-
+
structclass = mxmlNewElement(MXML_NO_PARENT,
type->child->value.text.string);
@@ -1313,7 +1322,7 @@ scan_file(const char *filename, /* I - Filename */
}
else
typedefnode = NULL;
-
+
enumeration = mxmlNewElement(MXML_NO_PARENT, "enumeration");
#ifdef DEBUG
@@ -1547,7 +1556,7 @@ scan_file(const char *filename, /* I - Filename */
type = NULL;
break;
}
-
+
mxmlDelete(type);
type = NULL;
}
@@ -2740,6 +2749,7 @@ usage(const char *option) /* I - Unknown option */
puts(" --section section Set section name");
puts(" --title title Set documentation title");
puts(" --tokens path Generate Xcode docset Tokens.xml file");
+ puts(" --version Show mxmldoc/Mini-XML version");
exit(1);
}
@@ -5017,7 +5027,7 @@ write_toc(FILE *out, /* I - Output file */
fputs("\n", out);
}
}
-
+
fclose(fp);
}
diff --git a/testmxml.c b/testmxml.c
index d06a9dc..092090f 100644
--- a/testmxml.c
+++ b/testmxml.c
@@ -3,7 +3,7 @@
*
* 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
* 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);
}
- 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]);
return (1);
}