mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-08 13:39:58 +00:00
Fixed a MingW/Cygwin compilation problem (STR #18)
This commit is contained in:
parent
d05a2f8d52
commit
523aa629b8
1
CHANGES
1
CHANGES
@ -6,6 +6,7 @@ CHANGES IN Mini-XML 2.2.1
|
||||
- Fixed an XML output bug in mxmldoc.
|
||||
- The "make install" target now uses the install command
|
||||
to set the proper permissions on UNIX/Linux/OSX.
|
||||
- Fixed a MingW/Cygwin compilation problem (STR #18)
|
||||
|
||||
|
||||
CHANGES IN Mini-XML 2.2
|
||||
|
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Mini-XML Programmers Manual, Version 2.2</title>
|
||||
<title>Mini-XML Programmers Manual, Version 2.2.1</title>
|
||||
<meta name='copyright' content='Copyright 2003-2005'/>
|
||||
<meta name='author' content='Michael Sweet'/>
|
||||
<meta name='keywords' content='XML, C, C++, library'/>
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
<h1 align='right'><a name='INTRO'>Introduction</a></h1>
|
||||
|
||||
<p>This programmers manual describes Mini-XML version 2.2, a
|
||||
<p>This programmers manual describes Mini-XML version 2.2.1, a
|
||||
small XML parsing library that you can use to read and write XML
|
||||
and XML-like data files in your application without requiring
|
||||
large non-standard libraries. Mini-XML only requires an ANSI C
|
||||
|
@ -1,5 +1,5 @@
|
||||
#HTMLDOC 1.8.24mrc1
|
||||
-t pdf12 -f mxml.pdf --book --toclevels 3 --no-numbered --toctitle "Table of Contents" --title --titleimage logo.png --linkstyle underline --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --footer h.1 --nup 1 --tocheader .t. --tocfooter ..i --duplex --portrait --grayscale --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 11.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 11.0 --headfootfont Helvetica --charset iso-8859-1 --links --embedfonts --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680
|
||||
#HTMLDOC 1.8.25 Commercial
|
||||
-t pdf12 -f mxml.pdf --book --toclevels 3 --no-numbered --toctitle "Table of Contents" --title --titleimage logo.png --linkstyle underline --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --header1 ... --footer h.1 --nup 1 --tocheader .t. --tocfooter ..i --duplex --portrait --grayscale --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 11.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 11.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow
|
||||
intro.html
|
||||
install.html
|
||||
basics.html
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.2</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.2.1</TITLE>
|
||||
<META NAME="author" CONTENT="Michael Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2005">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
@ -19,8 +19,8 @@ PRE { font-family: monospace }
|
||||
--></STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<CENTER><A HREF="#CONTENTS"><IMG SRC="logo.png" BORDER="0" WIDTH="222" HEIGHT="181" ALT="Mini-XML Programmers Manual, Version 2.2"><BR>
|
||||
<H1>Mini-XML Programmers Manual, Version 2.2</H1></A><BR>
|
||||
<CENTER><A HREF="#CONTENTS"><IMG SRC="logo.png" BORDER="0" WIDTH="222" HEIGHT="181" ALT="Mini-XML Programmers Manual, Version 2.2.1"><BR>
|
||||
<H1>Mini-XML Programmers Manual, Version 2.2.1</H1></A><BR>
|
||||
Michael Sweet<BR>
|
||||
Copyright 2003-2005<BR>
|
||||
</CENTER>
|
||||
@ -179,7 +179,7 @@ Copyright 2003-2005<BR>
|
||||
</UL>
|
||||
<HR NOSHADE>
|
||||
<H1 align="right"><A name="INTRO">Introduction</A></H1>
|
||||
<P>This programmers manual describes Mini-XML version 2.2, a small XML
|
||||
<P>This programmers manual describes Mini-XML version 2.2.1, a small XML
|
||||
parsing library that you can use to read and write XML and XML-like
|
||||
data files in your application without requiring large non-standard
|
||||
libraries. Mini-XML only requires an ANSI C compatible compiler (GCC
|
||||
|
11
testmxml.c
11
testmxml.c
@ -33,8 +33,11 @@
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
#endif /* WIN32 */
|
||||
#include <fcntl.h>
|
||||
#ifndef O_BINARY
|
||||
# define O_BINARY 0
|
||||
#endif /* !O_BINARY */
|
||||
|
||||
|
||||
/*
|
||||
@ -403,7 +406,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
if (argv[1][0] == '<')
|
||||
tree = mxmlLoadString(NULL, argv[1], type_cb);
|
||||
else if ((fp = fopen(argv[1], "r")) == NULL)
|
||||
else if ((fp = fopen(argv[1], "rb")) == NULL)
|
||||
{
|
||||
perror(argv[1]);
|
||||
return (1);
|
||||
@ -478,7 +481,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Open the file again...
|
||||
*/
|
||||
|
||||
if ((fd = open(argv[1], O_RDONLY)) < 0)
|
||||
if ((fd = open(argv[1], O_RDONLY | O_BINARY)) < 0)
|
||||
{
|
||||
perror(argv[1]);
|
||||
return (1);
|
||||
@ -498,7 +501,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "%sfd", argv[1]);
|
||||
|
||||
if ((fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
|
||||
if ((fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666)) < 0)
|
||||
{
|
||||
perror(buffer);
|
||||
mxmlDelete(tree);
|
||||
|
Loading…
Reference in New Issue
Block a user