mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-13 23:35:30 +00:00
Escape HTML special characters inside @code foo@.
Use xcrun to run the docsetutil program.
This commit is contained in:
parent
d5af089cc3
commit
6338dccaac
9
CHANGES
9
CHANGES
@ -1,6 +1,13 @@
|
||||
CHANGES - 2011-12-20
|
||||
CHANGES - 2013-07-03
|
||||
--------------------
|
||||
|
||||
CHANGES IN Mini-XML 2.8
|
||||
|
||||
- Now call docsetutil using xcrun on OS X.
|
||||
- mxmldoc did not escape special HTML characters inside @code foo@
|
||||
comments.
|
||||
|
||||
|
||||
CHANGES IN Mini-XML 2.7
|
||||
|
||||
- Added 64-bit configurations to the VC++ project files (STR #129)
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
# Makefile for Mini-XML, a small XML-like file parsing library.
|
||||
#
|
||||
# Copyright 2003-2011 by Michael R Sweet.
|
||||
# Copyright 2003-2013 by Michael R Sweet.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Michael R Sweet and are protected by Federal copyright
|
||||
@ -396,7 +396,7 @@ mxml.xml: mxmldoc-static mxml.h $(PUBLIBOBJS:.o=.c)
|
||||
--css doc/docset.css --title "Mini-XML API Reference" \
|
||||
mxml.xml || exit 1; \
|
||||
$(RM) org.minixml.atom; \
|
||||
/Developer/usr/bin/docsetutil package --output org.minixml.xar \
|
||||
xcrun docsetutil package --output org.minixml.xar \
|
||||
--atom org.minixml.atom \
|
||||
--download-url http://www.minixml.org/org.minixml.xar \
|
||||
org.minixml.docset || exit 1; \
|
||||
|
30
mxmldoc.c
30
mxmldoc.c
@ -5,7 +5,7 @@
|
||||
* Documentation generator using Mini-XML, a small XML-like file parsing
|
||||
* library.
|
||||
*
|
||||
* Copyright 2003-2011 by Michael R Sweet.
|
||||
* Copyright 2003-2013 by Michael R Sweet.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Michael R Sweet and are protected by Federal copyright
|
||||
@ -2824,7 +2824,21 @@ write_description(
|
||||
ptr --;
|
||||
|
||||
if (element && *element)
|
||||
fprintf(out, "<code>%s</code>", start);
|
||||
{
|
||||
fputs("<code>", out);
|
||||
for (; *start; start ++)
|
||||
{
|
||||
if (*start == '<')
|
||||
fputs("<", out);
|
||||
else if (*start == '>')
|
||||
fputs(">", out);
|
||||
else if (*start == '&')
|
||||
fputs("&", out);
|
||||
else
|
||||
putc(*start, out);
|
||||
}
|
||||
fputs("</code>", out);
|
||||
}
|
||||
else if (element)
|
||||
fputs(start, out);
|
||||
else
|
||||
@ -3778,15 +3792,17 @@ write_html(const char *section, /* I - Section */
|
||||
|
||||
if (docset)
|
||||
{
|
||||
const char *args[4]; /* Argument array */
|
||||
int argc = 0; /* Argument count */
|
||||
const char *args[5]; /* Argument array */
|
||||
pid_t pid; /* Process ID */
|
||||
int status; /* Exit status */
|
||||
|
||||
|
||||
args[0] = "/Developer/usr/bin/docsetutil";
|
||||
args[1] = "index";
|
||||
args[2] = docset;
|
||||
args[3] = NULL;
|
||||
args[argc++] = "/usr/bin/xcrun";
|
||||
args[argc++] = "docsetutil";
|
||||
args[argc++] = "index";
|
||||
args[argc++] = docset;
|
||||
args[argc ] = NULL;
|
||||
|
||||
if (posix_spawn(&pid, args[0], NULL, NULL, (char **)args, environ))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user