mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-13 23:35:30 +00:00
Add --tokens option.
This commit is contained in:
parent
ec99705731
commit
58712ee6fc
@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" mxmldoc man page for mini-XML, a small XML-like file parsing library.
|
||||
.\"
|
||||
.\" Copyright 2003-2008 by Michael Sweet.
|
||||
.\" Copyright 2003-2009 by Michael Sweet.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or
|
||||
.\" modify it under the terms of the GNU Library General Public
|
||||
@ -15,7 +15,7 @@
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.TH mxmldoc 1 "Mini-XML" "28 November 2008" "Michael Sweet"
|
||||
.TH mxmldoc 1 "Mini-XML" "4 May 2009" "Michael Sweet"
|
||||
.SH NAME
|
||||
mxmldoc \- mini-xml documentation generator
|
||||
.SH SYNOPSIS
|
||||
@ -45,9 +45,9 @@ mxmldoc \- mini-xml documentation generator
|
||||
.I filename.html
|
||||
.br
|
||||
.B mxmldoc
|
||||
[ \-\-docset
|
||||
\-\-docset
|
||||
.I directory.docset
|
||||
] [ \-\-docversion
|
||||
[ \-\-docversion
|
||||
.I version
|
||||
] [ \-\-feedname
|
||||
.I name
|
||||
@ -70,10 +70,17 @@ mxmldoc \- mini-xml documentation generator
|
||||
]
|
||||
.br
|
||||
.B mxmldoc
|
||||
\-\-tokens [
|
||||
.I filename.xml
|
||||
] [
|
||||
.I source file(s)
|
||||
] > tokens.xml
|
||||
.br
|
||||
.B mxmldoc
|
||||
\-\-framed
|
||||
.I basename
|
||||
[ \-\-footer
|
||||
.I footerfile
|
||||
] [ \-\-framed
|
||||
.I basename
|
||||
] [ \-\-header
|
||||
.I headerfile
|
||||
] [ \-\-intro
|
||||
@ -176,10 +183,14 @@ Sets the section/keywords in the output documentation.
|
||||
\-\-title title
|
||||
.br
|
||||
Sets the title of the output documentation.
|
||||
.TP 5
|
||||
\-\-tokens
|
||||
.br
|
||||
Generates a Tokens.xml file for use with the Xcode documentation tools.
|
||||
.SH SEE ALSO
|
||||
mxml(3), Mini-XML Programmers Manual, http://www.minixml.org/
|
||||
.SH COPYRIGHT
|
||||
Copyright 2003-2008 by Michael Sweet.
|
||||
Copyright 2003-2009 by Michael Sweet.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
19
mxmldoc.c
19
mxmldoc.c
@ -158,6 +158,8 @@ extern char **environ;
|
||||
#define OUTPUT_HTML 1 /* Output HTML */
|
||||
#define OUTPUT_XML 2 /* Output XML */
|
||||
#define OUTPUT_MAN 3 /* Output nroff/man */
|
||||
#define OUTPUT_TOKENS 4 /* Output docset Tokens.xml file */
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
@ -420,6 +422,14 @@ main(int argc, /* I - Number of command-line args */
|
||||
else
|
||||
usage(NULL);
|
||||
}
|
||||
else if (!strcmp(argv[i], "--tokens"))
|
||||
{
|
||||
/*
|
||||
* Output Tokens.xml file...
|
||||
*/
|
||||
|
||||
mode = OUTPUT_TOKENS;
|
||||
}
|
||||
else if (argv[i][0] == '-')
|
||||
{
|
||||
/*
|
||||
@ -572,6 +582,15 @@ main(int argc, /* I - Number of command-line args */
|
||||
write_man(name, section, title, footerfile, headerfile, introfile,
|
||||
mxmldoc);
|
||||
break;
|
||||
|
||||
case OUTPUT_TOKENS :
|
||||
fputs("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
"<Tokens version=\"1.0\">\n", stdout);
|
||||
|
||||
write_tokens(stdout, mxmldoc);
|
||||
|
||||
fputs("</Tokens>\n", stdout);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user