mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
update to Expat Version 2.0
svn path=/trunk/; revision=20874
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
and Clark Cooper
|
||||
Copyright (c) 2001, 2002, 2003 Expat maintainers.
|
||||
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
Release 1.95.9 TBD
|
||||
Release 2.0.0 Wed Jan 11 2006
|
||||
- We no longer use the "check" library for C unit testing; we
|
||||
always use the (partial) internal implementation of the API.
|
||||
- Report XML_NS setting via XML_GetFeatureList().
|
||||
- Fixed headers for use from C++.
|
||||
- Updated to use libtool 1.5.10 (the most recent).
|
||||
- XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber()
|
||||
now return unsigned integers.
|
||||
- Added XML_LARGE_SIZE switch to enable 64-bit integers for
|
||||
byte indexes and line/column numbers.
|
||||
- Updated to use libtool 1.5.22 (the most recent).
|
||||
- Added support for AmigaOS.
|
||||
- Some mostly minor bug fixes. SF issues include: 1006708,
|
||||
1021776, 1023646, 1114960, 1156398, 1221160, 1271642.
|
||||
|
||||
Release 1.95.8 Fri Jul 23 2004
|
||||
- Major new feature: suspend/resume. Handlers can now request
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
amiga/stdlib.c
|
||||
amiga/launch.c
|
||||
amiga/expat_vectors.c
|
||||
amiga/expat_lib.c
|
||||
amiga/expat.xml
|
||||
amiga/README.txt
|
||||
amiga/Makefile
|
||||
amiga/include/proto/expat.h
|
||||
amiga/include/libraries/expat.h
|
||||
amiga/include/interfaces/expat.h
|
||||
amiga/include/inline4/expat.h
|
||||
bcb5/README.txt
|
||||
bcb5/all_projects.bpg
|
||||
bcb5/elements.bpf
|
||||
@@ -55,6 +66,7 @@ examples/elements.dsp
|
||||
examples/outline.c
|
||||
examples/outline.dsp
|
||||
lib/Makefile.MPW
|
||||
lib/amigaconfig.h
|
||||
lib/ascii.h
|
||||
lib/asciitab.h
|
||||
lib/expat.dsp
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
Expat, Release 1.95.8
|
||||
Expat, Release 2.0.0
|
||||
|
||||
This is Expat, a C library for parsing XML, written by James Clark.
|
||||
Expat is a stream-oriented XML parser. This means that you register
|
||||
@@ -9,7 +9,7 @@ document being parsed. A start tag is an example of the kind of
|
||||
structures for which you may register handlers.
|
||||
|
||||
Windows users should use the expat_win32bin package, which includes
|
||||
both precompiled libraries and executalbes, and source code for
|
||||
both precompiled libraries and executables, and source code for
|
||||
developers.
|
||||
|
||||
Expat is free software. You may copy, distribute, and modify it under
|
||||
@@ -48,14 +48,20 @@ into /home/me/mystuff/lib, /home/me/mystuff/include, and
|
||||
/home/me/mystuff/bin, you can tell configure about that with:
|
||||
|
||||
./configure --prefix=/home/me/mystuff
|
||||
|
||||
Another interesting option is to enable 64-bit integer support for
|
||||
line and column numbers and the over-all byte index:
|
||||
|
||||
./configure CPPFLAGS=-DXML_LARGE_SIZE
|
||||
|
||||
After running the configure script, the "make" command will build
|
||||
things and "make install" will install things into their proper
|
||||
location. Note that you need to have write permission into the
|
||||
directories into which things will be installed.
|
||||
location. Have a look at the "Makefile" to learn about additional
|
||||
"make" options. Note that you need to have write permission into
|
||||
the directories into which things will be installed.
|
||||
|
||||
If you are interested in building Expat to provide document
|
||||
information in UTF-16 rather than the default UTF-8, following these
|
||||
information in UTF-16 rather than the default UTF-8, follow these
|
||||
instructions:
|
||||
|
||||
1. For UTF-16 output as unsigned short (and version/error
|
||||
|
||||
@@ -25,8 +25,8 @@ dnl test. I believe this test will work, but I don't have a place with non-
|
||||
dnl GNU M4 to test it right now.
|
||||
define([expat_version], ifdef([__gnu__],
|
||||
[esyscmd(conftools/get-version.sh lib/expat.h)],
|
||||
[1.95.x]))
|
||||
AC_INIT(expat, expat_version, expat-bugs@mail.libexpat.org)
|
||||
[2.0.x]))
|
||||
AC_INIT(expat, expat_version, [email protected])
|
||||
undefine([expat_version])
|
||||
|
||||
AC_CONFIG_SRCDIR(Makefile.in)
|
||||
@@ -44,7 +44,7 @@ dnl
|
||||
dnl If the API changes incompatibly set LIBAGE back to 0
|
||||
dnl
|
||||
|
||||
LIBCURRENT=5
|
||||
LIBCURRENT=6
|
||||
LIBREVISION=0
|
||||
LIBAGE=5
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<td class="banner"><h1>The Expat XML Parser</h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="releaseno">Release 1.95.8</td>
|
||||
<td class="releaseno">Release 2.0.0</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -344,6 +344,16 @@ defined using the <code>wchar_t</code> type; otherwise, <code>unsigned
|
||||
short</code> is used. Defining this implies
|
||||
<code>XML_UNICODE</code>.</dd>
|
||||
|
||||
<dt>XML_LARGE_SIZE</dt>
|
||||
<dd>If defined, causes the <code>XML_Size</code> and <code>XML_Index</code>
|
||||
integer types to be at least 64 bits in size. This is intended to support
|
||||
processing of very large input streams, where the return values of
|
||||
<code><a href="#XML_GetCurrentByteIndex" >XML_GetCurrentByteIndex</a></code>,
|
||||
<code><a href="#XML_GetCurrentLineNumber" >XML_GetCurrentLineNumber</a></code> and
|
||||
<code><a href="#XML_GetCurrentColumnNumber" >XML_GetCurrentColumnNumber</a></code>
|
||||
could overflow. It may not be supported by all compilers, and is turned
|
||||
off by default.</dd>
|
||||
|
||||
<dt>XML_CONTEXT_BYTES</dt>
|
||||
<dd>The number of input bytes of markup context which the parser will
|
||||
ensure are available for reporting via <code><a href=
|
||||
@@ -984,14 +994,22 @@ dealing with any memory associated with <a href="#userdata">user data</a>.
|
||||
<p>To state the obvious: the three parsing functions <code><a href=
|
||||
"#XML_Parse" >XML_Parse</a></code>, <code><a href= "#XML_ParseBuffer">
|
||||
XML_ParseBuffer</a></code> and <code><a href= "#XML_GetBuffer">
|
||||
XML_GetBuffer</a></code> must not be
|
||||
called from within a handler unless they operate on a separate parser
|
||||
instance, that is, one that did not call the handler. For example, it
|
||||
is OK to call the parsing functions from within an
|
||||
<code>XML_ExternalEntityRefHandler</code>, if they apply to the parser
|
||||
created by <code><a href= "#XML_ExternalEntityParserCreate"
|
||||
XML_GetBuffer</a></code> must not be called from within a handler
|
||||
unless they operate on a separate parser instance, that is, one that
|
||||
did not call the handler. For example, it is OK to call the parsing
|
||||
functions from within an <code>XML_ExternalEntityRefHandler</code>,
|
||||
if they apply to the parser created by
|
||||
<code><a href= "#XML_ExternalEntityParserCreate"
|
||||
>XML_ExternalEntityParserCreate</a></code>.</p>
|
||||
|
||||
<p>Note: the <code>len</code> argument passed to these functions
|
||||
should be considerably less than the maximum value for an integer,
|
||||
as it could create an integer overflow situation if the added
|
||||
lengths of a buffer and the unprocessed portion of the previous buffer
|
||||
exceed the maximum integer value. Input data at the end of a buffer
|
||||
will remain unprocessed if it is part of an XML token for which the
|
||||
end is not part of that buffer.</p>
|
||||
|
||||
<pre class="fcndec" id="XML_Parse">
|
||||
enum XML_Status XMLCALL
|
||||
XML_Parse(XML_Parser p,
|
||||
@@ -1201,10 +1219,11 @@ appropriate handler setter. None of the handler setting functions have
|
||||
a return value.</p>
|
||||
|
||||
<p>Your handlers will be receiving strings in arrays of type
|
||||
<code>XML_Char</code>. This type is defined in expat.h as <code>char
|
||||
*</code> and contains bytes encoding UTF-8. Note that you'll receive
|
||||
them in this form independent of the original encoding of the
|
||||
document.</p>
|
||||
<code>XML_Char</code>. This type is conditionally defined in expat.h as
|
||||
either <code>char</code>, <code>wchar_t</code> or <code>unsigned short</code>.
|
||||
The former implies UTF-8 encoding, the latter two imply UTF-16 encoding.
|
||||
Note that you'll receive them in this form independent of the original
|
||||
encoding of the document.</p>
|
||||
|
||||
<div class="handler">
|
||||
<pre class="setter" id="XML_SetStartElementHandler">
|
||||
@@ -1896,7 +1915,7 @@ The code should be one of the enums that can be returned from
|
||||
</div>
|
||||
|
||||
<pre class="fcndec" id="XML_GetCurrentByteIndex">
|
||||
long XMLCALL
|
||||
XML_Index XMLCALL
|
||||
XML_GetCurrentByteIndex(XML_Parser p);
|
||||
</pre>
|
||||
<div class="fcndef">
|
||||
@@ -1907,7 +1926,7 @@ the values returned by <code><a href= "#XML_GetCurrentLineNumber"
|
||||
</div>
|
||||
|
||||
<pre class="fcndec" id="XML_GetCurrentLineNumber">
|
||||
int XMLCALL
|
||||
XML_Size XMLCALL
|
||||
XML_GetCurrentLineNumber(XML_Parser p);
|
||||
</pre>
|
||||
<div class="fcndef">
|
||||
@@ -1916,7 +1935,7 @@ Return the line number of the position. The first line is reported as
|
||||
</div>
|
||||
|
||||
<pre class="fcndec" id="XML_GetCurrentColumnNumber">
|
||||
int XMLCALL
|
||||
XML_Size XMLCALL
|
||||
XML_GetCurrentColumnNumber(XML_Parser p);
|
||||
</pre>
|
||||
<div class="fcndef">
|
||||
|
||||
@@ -2,11 +2,22 @@
|
||||
reads an XML document from standard input and writes a line with
|
||||
the name of each element to standard output indenting child
|
||||
elements by one tab stop more than their parent element.
|
||||
It must be used with Expat compiled for UTF-8 output.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "expat.h"
|
||||
|
||||
#ifdef XML_LARGE_SIZE
|
||||
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
|
||||
#define XML_FMT_INT_MOD "I64"
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "ll"
|
||||
#endif
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "l"
|
||||
#endif
|
||||
|
||||
static void XMLCALL
|
||||
startElement(void *userData, const char *name, const char **atts)
|
||||
{
|
||||
@@ -25,8 +36,14 @@ endElement(void *userData, const char *name)
|
||||
*depthPtr -= 1;
|
||||
}
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
#include <proto/expat.h>
|
||||
int
|
||||
amiga_main(int argc, char *argv[])
|
||||
#else
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
char buf[BUFSIZ];
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
@@ -39,7 +56,7 @@ main(int argc, char *argv[])
|
||||
done = len < sizeof(buf);
|
||||
if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) {
|
||||
fprintf(stderr,
|
||||
"%s at line %d\n",
|
||||
"%s at line %" XML_FMT_INT_MOD "u\n",
|
||||
XML_ErrorString(XML_GetErrorCode(parser)),
|
||||
XML_GetCurrentLineNumber(parser));
|
||||
return 1;
|
||||
|
||||
@@ -18,12 +18,23 @@
|
||||
*
|
||||
* Read an XML document from standard input and print an element
|
||||
* outline on standard output.
|
||||
* Must be used with Expat compiled for UTF-8 output.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <expat.h>
|
||||
|
||||
#ifdef XML_LARGE_SIZE
|
||||
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
|
||||
#define XML_FMT_INT_MOD "I64"
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "ll"
|
||||
#endif
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "l"
|
||||
#endif
|
||||
|
||||
#define BUFFSIZE 8192
|
||||
|
||||
char Buff[BUFFSIZE];
|
||||
@@ -54,8 +65,14 @@ end(void *data, const char *el)
|
||||
Depth--;
|
||||
}
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
#include <proto/expat.h>
|
||||
int
|
||||
amiga_main(int argc, char *argv[])
|
||||
#else
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
XML_Parser p = XML_ParserCreate(NULL);
|
||||
if (! p) {
|
||||
@@ -77,7 +94,7 @@ main(int argc, char *argv[])
|
||||
done = feof(stdin);
|
||||
|
||||
if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) {
|
||||
fprintf(stderr, "Parse error at line %d:\n%s\n",
|
||||
fprintf(stderr, "Parse error at line %" XML_FMT_INT_MOD "u:\n%s\n",
|
||||
XML_GetCurrentLineNumber(p),
|
||||
XML_ErrorString(XML_GetErrorCode(p)));
|
||||
exit(-1);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
and therefore subject to change.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__)
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
/* We'll use this version by default only where we know it helps.
|
||||
|
||||
regparm() generates warnings on Solaris boxes. See SF bug #692878.
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
#include "winconfig.h"
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
#elif defined(__amigaos4__)
|
||||
#include "amigaconfig.h"
|
||||
#elif defined(HAVE_EXPAT_CONFIG_H)
|
||||
#include <expat_config.h>
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include <expat/expat.h>
|
||||
#include "expat.h"
|
||||
|
||||
#ifdef XML_UNICODE
|
||||
#define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX
|
||||
@@ -456,7 +458,7 @@ struct XML_ParserStruct {
|
||||
char *m_bufferEnd;
|
||||
/* allocated end of buffer */
|
||||
const char *m_bufferLim;
|
||||
long m_parseEndByteIndex;
|
||||
XML_Index m_parseEndByteIndex;
|
||||
const char *m_parseEndPtr;
|
||||
XML_Char *m_dataBuf;
|
||||
XML_Char *m_dataBufEnd;
|
||||
@@ -1604,9 +1606,9 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
|
||||
if (len > bufferLim - bufferEnd) {
|
||||
/* FIXME avoid integer overflow */
|
||||
int neededSize = len + (bufferEnd - bufferPtr);
|
||||
int neededSize = len + (int)(bufferEnd - bufferPtr);
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
int keep = bufferPtr - buffer;
|
||||
int keep = (int)(bufferPtr - buffer);
|
||||
|
||||
if (keep > XML_CONTEXT_BYTES)
|
||||
keep = XML_CONTEXT_BYTES;
|
||||
@@ -1615,7 +1617,7 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
if (neededSize <= bufferLim - buffer) {
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
if (keep < bufferPtr - buffer) {
|
||||
int offset = (bufferPtr - buffer) - keep;
|
||||
int offset = (int)(bufferPtr - buffer) - keep;
|
||||
memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep);
|
||||
bufferEnd -= offset;
|
||||
bufferPtr -= offset;
|
||||
@@ -1628,7 +1630,7 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
}
|
||||
else {
|
||||
char *newBuf;
|
||||
int bufferSize = bufferLim - bufferPtr;
|
||||
int bufferSize = (int)(bufferLim - bufferPtr);
|
||||
if (bufferSize == 0)
|
||||
bufferSize = INIT_BUFFER_SIZE;
|
||||
do {
|
||||
@@ -1642,7 +1644,7 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
bufferLim = newBuf + bufferSize;
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
if (bufferPtr) {
|
||||
int keep = bufferPtr - buffer;
|
||||
int keep = (int)(bufferPtr - buffer);
|
||||
if (keep > XML_CONTEXT_BYTES)
|
||||
keep = XML_CONTEXT_BYTES;
|
||||
memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep);
|
||||
@@ -1749,7 +1751,7 @@ XML_GetErrorCode(XML_Parser parser)
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
long XMLCALL
|
||||
XML_Index XMLCALL
|
||||
XML_GetCurrentByteIndex(XML_Parser parser)
|
||||
{
|
||||
if (eventPtr)
|
||||
@@ -1761,7 +1763,7 @@ int XMLCALL
|
||||
XML_GetCurrentByteCount(XML_Parser parser)
|
||||
{
|
||||
if (eventEndPtr && eventPtr)
|
||||
return eventEndPtr - eventPtr;
|
||||
return (int)(eventEndPtr - eventPtr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1770,15 +1772,15 @@ XML_GetInputContext(XML_Parser parser, int *offset, int *size)
|
||||
{
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
if (eventPtr && buffer) {
|
||||
*offset = eventPtr - buffer;
|
||||
*size = bufferEnd - buffer;
|
||||
*offset = (int)(eventPtr - buffer);
|
||||
*size = (int)(bufferEnd - buffer);
|
||||
return buffer;
|
||||
}
|
||||
#endif /* defined XML_CONTEXT_BYTES */
|
||||
return (char *) 0;
|
||||
}
|
||||
|
||||
int XMLCALL
|
||||
XML_Size XMLCALL
|
||||
XML_GetCurrentLineNumber(XML_Parser parser)
|
||||
{
|
||||
if (eventPtr && eventPtr >= positionPtr) {
|
||||
@@ -1788,7 +1790,7 @@ XML_GetCurrentLineNumber(XML_Parser parser)
|
||||
return position.lineNumber + 1;
|
||||
}
|
||||
|
||||
int XMLCALL
|
||||
XML_Size XMLCALL
|
||||
XML_GetCurrentColumnNumber(XML_Parser parser)
|
||||
{
|
||||
if (eventPtr && eventPtr >= positionPtr) {
|
||||
@@ -2324,12 +2326,12 @@ doContent(XML_Parser parser,
|
||||
XmlConvert(enc,
|
||||
&fromPtr, rawNameEnd,
|
||||
(ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1);
|
||||
convLen = toPtr - (XML_Char *)tag->buf;
|
||||
convLen = (int)(toPtr - (XML_Char *)tag->buf);
|
||||
if (fromPtr == rawNameEnd) {
|
||||
tag->name.strLen = convLen;
|
||||
break;
|
||||
}
|
||||
bufSize = (tag->bufEnd - tag->buf) << 1;
|
||||
bufSize = (int)(tag->bufEnd - tag->buf) << 1;
|
||||
{
|
||||
char *temp = (char *)REALLOC(tag->buf, bufSize);
|
||||
if (temp == NULL)
|
||||
@@ -2517,12 +2519,12 @@ doContent(XML_Parser parser,
|
||||
ICHAR *dataPtr = (ICHAR *)dataBuf;
|
||||
XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd);
|
||||
characterDataHandler(handlerArg, dataBuf,
|
||||
dataPtr - (ICHAR *)dataBuf);
|
||||
(int)(dataPtr - (ICHAR *)dataBuf));
|
||||
}
|
||||
else
|
||||
characterDataHandler(handlerArg,
|
||||
(XML_Char *)s,
|
||||
(XML_Char *)end - (XML_Char *)s);
|
||||
(int)((XML_Char *)end - (XML_Char *)s));
|
||||
}
|
||||
else if (defaultHandler)
|
||||
reportDefault(parser, enc, s, end);
|
||||
@@ -2547,7 +2549,7 @@ doContent(XML_Parser parser,
|
||||
XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
|
||||
*eventEndPP = s;
|
||||
characterDataHandler(handlerArg, dataBuf,
|
||||
dataPtr - (ICHAR *)dataBuf);
|
||||
(int)(dataPtr - (ICHAR *)dataBuf));
|
||||
if (s == next)
|
||||
break;
|
||||
*eventPP = s;
|
||||
@@ -2556,7 +2558,7 @@ doContent(XML_Parser parser,
|
||||
else
|
||||
characterDataHandler(handlerArg,
|
||||
(XML_Char *)s,
|
||||
(XML_Char *)next - (XML_Char *)s);
|
||||
(int)((XML_Char *)next - (XML_Char *)s));
|
||||
}
|
||||
else if (defaultHandler)
|
||||
reportDefault(parser, enc, s, next);
|
||||
@@ -2854,8 +2856,10 @@ storeAtts(XML_Parser parser, const ENCODING *enc,
|
||||
nsAtts[j].hash = uriHash;
|
||||
nsAtts[j].uriName = s;
|
||||
|
||||
if (!--nPrefixes)
|
||||
if (!--nPrefixes) {
|
||||
i += 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else /* not prefixed */
|
||||
((XML_Char *)s)[-1] = 0; /* clear flag */
|
||||
@@ -3125,7 +3129,7 @@ doCdataSection(XML_Parser parser,
|
||||
XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
|
||||
*eventEndPP = next;
|
||||
characterDataHandler(handlerArg, dataBuf,
|
||||
dataPtr - (ICHAR *)dataBuf);
|
||||
(int)(dataPtr - (ICHAR *)dataBuf));
|
||||
if (s == next)
|
||||
break;
|
||||
*eventPP = s;
|
||||
@@ -3134,7 +3138,7 @@ doCdataSection(XML_Parser parser,
|
||||
else
|
||||
characterDataHandler(handlerArg,
|
||||
(XML_Char *)s,
|
||||
(XML_Char *)next - (XML_Char *)s);
|
||||
(int)((XML_Char *)next - (XML_Char *)s));
|
||||
}
|
||||
else if (defaultHandler)
|
||||
reportDefault(parser, enc, s, next);
|
||||
@@ -3799,7 +3803,8 @@ doProlog(XML_Parser parser,
|
||||
*/
|
||||
#ifdef XML_DTD
|
||||
if (doctypeSysid || useForeignDTD) {
|
||||
dtd->hasParamEntityRefs = XML_TRUE; /* when docTypeSysid == NULL */
|
||||
XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
|
||||
dtd->hasParamEntityRefs = XML_TRUE;
|
||||
if (paramEntityParsing && externalEntityRefHandler) {
|
||||
ENTITY *entity = (ENTITY *)lookup(&dtd->paramEntities,
|
||||
externalSubsetName,
|
||||
@@ -3815,11 +3820,17 @@ doProlog(XML_Parser parser,
|
||||
entity->systemId,
|
||||
entity->publicId))
|
||||
return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
|
||||
if (dtd->paramEntityRead &&
|
||||
!dtd->standalone &&
|
||||
notStandaloneHandler &&
|
||||
!notStandaloneHandler(handlerArg))
|
||||
return XML_ERROR_NOT_STANDALONE;
|
||||
if (dtd->paramEntityRead) {
|
||||
if (!dtd->standalone &&
|
||||
notStandaloneHandler &&
|
||||
!notStandaloneHandler(handlerArg))
|
||||
return XML_ERROR_NOT_STANDALONE;
|
||||
}
|
||||
/* if we didn't read the foreign DTD then this means that there
|
||||
is no external subset and we must reset dtd->hasParamEntityRefs
|
||||
*/
|
||||
else if (!doctypeSysid)
|
||||
dtd->hasParamEntityRefs = hadParamEntityRefs;
|
||||
/* end of DTD - no need to update dtd->keepProcessing */
|
||||
}
|
||||
useForeignDTD = XML_FALSE;
|
||||
@@ -3836,6 +3847,7 @@ doProlog(XML_Parser parser,
|
||||
last chance to read the foreign DTD
|
||||
*/
|
||||
if (useForeignDTD) {
|
||||
XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
|
||||
dtd->hasParamEntityRefs = XML_TRUE;
|
||||
if (paramEntityParsing && externalEntityRefHandler) {
|
||||
ENTITY *entity = (ENTITY *)lookup(&dtd->paramEntities,
|
||||
@@ -3851,11 +3863,17 @@ doProlog(XML_Parser parser,
|
||||
entity->systemId,
|
||||
entity->publicId))
|
||||
return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
|
||||
if (dtd->paramEntityRead &&
|
||||
!dtd->standalone &&
|
||||
notStandaloneHandler &&
|
||||
!notStandaloneHandler(handlerArg))
|
||||
return XML_ERROR_NOT_STANDALONE;
|
||||
if (dtd->paramEntityRead) {
|
||||
if (!dtd->standalone &&
|
||||
notStandaloneHandler &&
|
||||
!notStandaloneHandler(handlerArg))
|
||||
return XML_ERROR_NOT_STANDALONE;
|
||||
}
|
||||
/* if we didn't read the foreign DTD then this means that there
|
||||
is no external subset and we must reset dtd->hasParamEntityRefs
|
||||
*/
|
||||
else
|
||||
dtd->hasParamEntityRefs = hadParamEntityRefs;
|
||||
/* end of DTD - no need to update dtd->keepProcessing */
|
||||
}
|
||||
}
|
||||
@@ -3996,7 +4014,7 @@ doProlog(XML_Parser parser,
|
||||
next - enc->minBytesPerChar);
|
||||
if (declEntity) {
|
||||
declEntity->textPtr = poolStart(&dtd->entityValuePool);
|
||||
declEntity->textLen = poolLength(&dtd->entityValuePool);
|
||||
declEntity->textLen = (int)(poolLength(&dtd->entityValuePool));
|
||||
poolFinish(&dtd->entityValuePool);
|
||||
if (entityDeclHandler) {
|
||||
*eventEndPP = s;
|
||||
@@ -4681,7 +4699,7 @@ processInternalEntity(XML_Parser parser, ENTITY *entity,
|
||||
|
||||
if (result == XML_ERROR_NONE) {
|
||||
if (textEnd != next && ps_parsing == XML_SUSPENDED) {
|
||||
entity->processed = next - textStart;
|
||||
entity->processed = (int)(next - textStart);
|
||||
processor = internalEntityProcessor;
|
||||
}
|
||||
else {
|
||||
@@ -4727,7 +4745,7 @@ internalEntityProcessor(XML_Parser parser,
|
||||
if (result != XML_ERROR_NONE)
|
||||
return result;
|
||||
else if (textEnd != next && ps_parsing == XML_SUSPENDED) {
|
||||
entity->processed = next - (char *)entity->textPtr;
|
||||
entity->processed = (int)(next - (char *)entity->textPtr);
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
@@ -4861,9 +4879,8 @@ appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
|
||||
return XML_ERROR_NO_MEMORY;
|
||||
entity = (ENTITY *)lookup(&dtd->generalEntities, name, 0);
|
||||
poolDiscard(&temp2Pool);
|
||||
/* first, determine if a check for an existing declaration is needed;
|
||||
if yes, check that the entity exists, and that it is internal,
|
||||
otherwise call the default handler (if called from content)
|
||||
/* First, determine if a check for an existing declaration is needed;
|
||||
if yes, check that the entity exists, and that it is internal.
|
||||
*/
|
||||
if (pool == &dtd->pool) /* are we called from prolog? */
|
||||
checkEntityDecl =
|
||||
@@ -4882,13 +4899,16 @@ appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata,
|
||||
return XML_ERROR_ENTITY_DECLARED_IN_PE;
|
||||
}
|
||||
else if (!entity) {
|
||||
/* cannot report skipped entity here - see comments on
|
||||
skippedEntityHandler
|
||||
/* Cannot report skipped entity here - see comments on
|
||||
skippedEntityHandler.
|
||||
if (skippedEntityHandler)
|
||||
skippedEntityHandler(handlerArg, name, 0);
|
||||
*/
|
||||
/* Cannot call the default handler because this would be
|
||||
out of sync with the call to the startElementHandler.
|
||||
if ((pool == &tempPool) && defaultHandler)
|
||||
reportDefault(parser, enc, ptr, next);
|
||||
*/
|
||||
break;
|
||||
}
|
||||
if (entity->open) {
|
||||
@@ -5188,12 +5208,12 @@ reportDefault(XML_Parser parser, const ENCODING *enc,
|
||||
ICHAR *dataPtr = (ICHAR *)dataBuf;
|
||||
XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd);
|
||||
*eventEndPP = s;
|
||||
defaultHandler(handlerArg, dataBuf, dataPtr - (ICHAR *)dataBuf);
|
||||
defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf));
|
||||
*eventPP = s;
|
||||
} while (s != end);
|
||||
}
|
||||
else
|
||||
defaultHandler(handlerArg, (XML_Char *)s, (XML_Char *)end - (XML_Char *)s);
|
||||
defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s));
|
||||
}
|
||||
|
||||
|
||||
@@ -6075,7 +6095,7 @@ poolGrow(STRING_POOL *pool)
|
||||
}
|
||||
}
|
||||
if (pool->blocks && pool->start == pool->blocks->s) {
|
||||
int blockSize = (pool->end - pool->start)*2;
|
||||
int blockSize = (int)(pool->end - pool->start)*2;
|
||||
pool->blocks = (BLOCK *)
|
||||
pool->mem->realloc_fcn(pool->blocks,
|
||||
(offsetof(BLOCK, s)
|
||||
@@ -6089,7 +6109,7 @@ poolGrow(STRING_POOL *pool)
|
||||
}
|
||||
else {
|
||||
BLOCK *tem;
|
||||
int blockSize = pool->end - pool->start;
|
||||
int blockSize = (int)(pool->end - pool->start);
|
||||
if (blockSize < INIT_BLOCK_SIZE)
|
||||
blockSize = INIT_BLOCK_SIZE;
|
||||
else
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
#include "winconfig.h"
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
#elif defined(__amigaos4__)
|
||||
#include "amigaconfig.h"
|
||||
#else
|
||||
#ifdef HAVE_EXPAT_CONFIG_H
|
||||
#include <expat_config.h>
|
||||
#endif
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include <expat/expat_external.h>
|
||||
#include "expat_external.h"
|
||||
#include "internal.h"
|
||||
#include "xmlrole.h"
|
||||
#include "ascii.h"
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
#include "winconfig.h"
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
#elif defined(__amigaos4__)
|
||||
#include "amigaconfig.h"
|
||||
#else
|
||||
#ifdef HAVE_EXPAT_CONFIG_H
|
||||
#include <expat_config.h>
|
||||
#endif
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include <expat/expat_external.h>
|
||||
#include "expat_external.h"
|
||||
#include "internal.h"
|
||||
#include "xmltok.h"
|
||||
#include "nametab.h"
|
||||
|
||||
@@ -111,8 +111,8 @@ extern "C" {
|
||||
|
||||
typedef struct position {
|
||||
/* first line and first column are 0 not 1 */
|
||||
unsigned long lineNumber;
|
||||
unsigned long columnNumber;
|
||||
XML_Size lineNumber;
|
||||
XML_Size columnNumber;
|
||||
} POSITION;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -1714,7 +1714,7 @@ PREFIX(nameLength)(const ENCODING *enc, const char *ptr)
|
||||
ptr += MINBPC(enc);
|
||||
break;
|
||||
default:
|
||||
return ptr - start;
|
||||
return (int)(ptr - start);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1750,7 +1750,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
|
||||
LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)
|
||||
#undef LEAD_CASE
|
||||
case BT_LF:
|
||||
pos->columnNumber = (unsigned)-1;
|
||||
pos->columnNumber = (XML_Size)-1;
|
||||
pos->lineNumber++;
|
||||
ptr += MINBPC(enc);
|
||||
break;
|
||||
@@ -1759,7 +1759,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
|
||||
ptr += MINBPC(enc);
|
||||
if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
ptr += MINBPC(enc);
|
||||
pos->columnNumber = (unsigned)-1;
|
||||
pos->columnNumber = (XML_Size)-1;
|
||||
break;
|
||||
default:
|
||||
ptr += MINBPC(enc);
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
# Note: tagname may be HEAD to just grab the head revision (e.g. for testing)
|
||||
#
|
||||
|
||||
CVSROOT=':ext:cvs.libexpat.org:/cvsroot/expat'
|
||||
#CVSROOT=':pserver:[email protected]:/cvsroot/expat'
|
||||
#CVSROOT=':ext:cvs.libexpat.org:/cvsroot/expat'
|
||||
CVSROOT=':pserver:[email protected]:/cvsroot/expat'
|
||||
|
||||
if test $# != 1; then
|
||||
echo "USAGE: $0 tagname"
|
||||
|
||||
@@ -3,12 +3,12 @@ tests provide general unit testing and regression coverage. The tests
|
||||
are not expected to be useful examples of Expat usage; see the
|
||||
examples/ directory for that.
|
||||
|
||||
The Expat tests use the "Check" unit testing framework for C. More
|
||||
information on Check can be found at:
|
||||
The Expat tests use a partial internal implementation of the "Check"
|
||||
unit testing framework for C. More information on Check can be found at:
|
||||
|
||||
http://check.sourceforge.net/
|
||||
|
||||
Check 0.8 must be installed before the unit tests can be compiled & run.
|
||||
Expat must be built and installed before "make check" can be executed.
|
||||
|
||||
Since both Check and this test suite are young, it can all change in a
|
||||
later version.
|
||||
|
||||
@@ -4,7 +4,7 @@ Use this benchmark command line utility as follows:
|
||||
|
||||
The command line arguments are:
|
||||
|
||||
-n ... optional; if supplied, then namespace processing is turned on
|
||||
-n ... optional; if supplied, namespace processing is turned on
|
||||
<file name> ... name/path of test xml file
|
||||
<buffer size> ... size of processing buffer;
|
||||
the file is parsed in chunks of this size
|
||||
@@ -13,4 +13,4 @@ The command line arguments are:
|
||||
Returns:
|
||||
|
||||
The time (in seconds) it takes to parse the test file,
|
||||
averaged of the number of iterations.
|
||||
averaged over the number of iterations.
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <time.h>
|
||||
#include "expat.h"
|
||||
|
||||
#ifdef XML_LARGE_SIZE
|
||||
#define XML_FMT_INT_MOD "ll"
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "l"
|
||||
#endif
|
||||
|
||||
static void
|
||||
usage(const char *prog, int rc)
|
||||
{
|
||||
@@ -12,7 +18,13 @@ usage(const char *prog, int rc)
|
||||
exit(rc);
|
||||
}
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
#include <proto/expat.h>
|
||||
int
|
||||
amiga_main(int argc, char *argv[])
|
||||
#else
|
||||
int main (int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
XML_Parser parser;
|
||||
char *XMLBuf, *XMLBufEnd, *XMLBufPtr;
|
||||
@@ -77,7 +89,8 @@ int main (int argc, char *argv[])
|
||||
else
|
||||
parseBufferSize = bufferSize;
|
||||
if (!XML_Parse (parser, XMLBufPtr, parseBufferSize, isFinal)) {
|
||||
fprintf (stderr, "error '%s' at line %d character %d\n",
|
||||
fprintf (stderr, "error '%s' at line %" XML_FMT_INT_MOD \
|
||||
"u character %" XML_FMT_INT_MOD "u\n",
|
||||
XML_ErrorString (XML_GetErrorCode (parser)),
|
||||
XML_GetCurrentLineNumber (parser),
|
||||
XML_GetCurrentColumnNumber (parser));
|
||||
|
||||
@@ -17,6 +17,15 @@
|
||||
#include "chardata.h"
|
||||
#include "minicheck.h"
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
#include <proto/expat.h>
|
||||
#endif
|
||||
|
||||
#ifdef XML_LARGE_SIZE
|
||||
#define XML_FMT_INT_MOD "ll"
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "l"
|
||||
#endif
|
||||
|
||||
static XML_Parser parser;
|
||||
|
||||
@@ -45,7 +54,8 @@ _xml_failure(XML_Parser parser, const char *file, int line)
|
||||
{
|
||||
char buffer[1024];
|
||||
sprintf(buffer,
|
||||
"\n %s (line %d, offset %d)\n reported from %s, line %d",
|
||||
"\n %s (line %" XML_FMT_INT_MOD "u, offset %"\
|
||||
XML_FMT_INT_MOD "u)\n reported from %s, line %d",
|
||||
XML_ErrorString(XML_GetErrorCode(parser)),
|
||||
XML_GetCurrentLineNumber(parser),
|
||||
XML_GetCurrentColumnNumber(parser),
|
||||
@@ -397,14 +407,15 @@ START_TEST(test_line_number_after_parse)
|
||||
"<tag>\n"
|
||||
"\n"
|
||||
"\n</tag>";
|
||||
int lineno;
|
||||
XML_Size lineno;
|
||||
|
||||
if (XML_Parse(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR)
|
||||
xml_failure(parser);
|
||||
lineno = XML_GetCurrentLineNumber(parser);
|
||||
if (lineno != 4) {
|
||||
char buffer[100];
|
||||
sprintf(buffer, "expected 4 lines, saw %d", lineno);
|
||||
sprintf(buffer,
|
||||
"expected 4 lines, saw %" XML_FMT_INT_MOD "u", lineno);
|
||||
fail(buffer);
|
||||
}
|
||||
}
|
||||
@@ -414,14 +425,15 @@ END_TEST
|
||||
START_TEST(test_column_number_after_parse)
|
||||
{
|
||||
char *text = "<tag></tag>";
|
||||
int colno;
|
||||
XML_Size colno;
|
||||
|
||||
if (XML_Parse(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR)
|
||||
xml_failure(parser);
|
||||
colno = XML_GetCurrentColumnNumber(parser);
|
||||
if (colno != 11) {
|
||||
char buffer[100];
|
||||
sprintf(buffer, "expected 11 columns, saw %d", colno);
|
||||
sprintf(buffer,
|
||||
"expected 11 columns, saw %" XML_FMT_INT_MOD "u", colno);
|
||||
fail(buffer);
|
||||
}
|
||||
}
|
||||
@@ -434,7 +446,9 @@ start_element_event_handler2(void *userData, const XML_Char *name,
|
||||
CharData *storage = (CharData *) userData;
|
||||
char buffer[100];
|
||||
|
||||
sprintf(buffer, "<%s> at col:%d line:%d\n", name,
|
||||
sprintf(buffer,
|
||||
"<%s> at col:%" XML_FMT_INT_MOD "u line:%"\
|
||||
XML_FMT_INT_MOD "u\n", name,
|
||||
XML_GetCurrentColumnNumber(parser),
|
||||
XML_GetCurrentLineNumber(parser));
|
||||
CharData_AppendString(storage, buffer);
|
||||
@@ -446,7 +460,9 @@ end_element_event_handler2(void *userData, const XML_Char *name)
|
||||
CharData *storage = (CharData *) userData;
|
||||
char buffer[100];
|
||||
|
||||
sprintf(buffer, "</%s> at col:%d line:%d\n", name,
|
||||
sprintf(buffer,
|
||||
"</%s> at col:%" XML_FMT_INT_MOD "u line:%"\
|
||||
XML_FMT_INT_MOD "u\n", name,
|
||||
XML_GetCurrentColumnNumber(parser),
|
||||
XML_GetCurrentLineNumber(parser));
|
||||
CharData_AppendString(storage, buffer);
|
||||
@@ -495,14 +511,14 @@ START_TEST(test_line_number_after_error)
|
||||
"<a>\n"
|
||||
" <b>\n"
|
||||
" </a>"; /* missing </b> */
|
||||
int lineno;
|
||||
XML_Size lineno;
|
||||
if (XML_Parse(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR)
|
||||
fail("Expected a parse error");
|
||||
|
||||
lineno = XML_GetCurrentLineNumber(parser);
|
||||
if (lineno != 3) {
|
||||
char buffer[100];
|
||||
sprintf(buffer, "expected 3 lines, saw %d", lineno);
|
||||
sprintf(buffer, "expected 3 lines, saw %" XML_FMT_INT_MOD "u", lineno);
|
||||
fail(buffer);
|
||||
}
|
||||
}
|
||||
@@ -515,14 +531,15 @@ START_TEST(test_column_number_after_error)
|
||||
"<a>\n"
|
||||
" <b>\n"
|
||||
" </a>"; /* missing </b> */
|
||||
int colno;
|
||||
XML_Size colno;
|
||||
if (XML_Parse(parser, text, strlen(text), XML_FALSE) != XML_STATUS_ERROR)
|
||||
fail("Expected a parse error");
|
||||
|
||||
colno = XML_GetCurrentColumnNumber(parser);
|
||||
if (colno != 4) {
|
||||
char buffer[100];
|
||||
sprintf(buffer, "expected 4 columns, saw %d", colno);
|
||||
sprintf(buffer,
|
||||
"expected 4 columns, saw %" XML_FMT_INT_MOD "u", colno);
|
||||
fail(buffer);
|
||||
}
|
||||
}
|
||||
@@ -1385,8 +1402,13 @@ make_suite(void)
|
||||
}
|
||||
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
int
|
||||
amiga_main(int argc, char *argv[])
|
||||
#else
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
int i, nf;
|
||||
int forking = 0, forking_set = 0;
|
||||
|
||||
@@ -26,4 +26,4 @@ directory you specified to the installer.
|
||||
<top>\Source\bcb5\ Project files for Borland C++ Builder 5 and BCC
|
||||
5.5.
|
||||
|
||||
<top>\Unistall\ The uninstaller and its data files.
|
||||
|
||||
|
||||
@@ -13,9 +13,19 @@ Expat can be built on Windows in three ways:
|
||||
Based on the workspace file expat.dsw. The related project
|
||||
files (.dsp) are located in the lib subdirectory.
|
||||
|
||||
* MS Visual Studio .NET 2002, 2003:
|
||||
* MS Visual Studio .NET 2002, 2003, 2005:
|
||||
The VC++ 6 workspace file (expat.dsw) and project files (.dsp)
|
||||
can be opened and imported in VS.NET without problems.
|
||||
|
||||
* Creating MinGW dynamic libraries from MS VC++ DLLs:
|
||||
|
||||
On the command line, execute these steps:
|
||||
pexports libexpat.dll > expat.def
|
||||
pexports libexpatw.dll > expatw.def
|
||||
dlltool -d expat.def -l libexpat.a
|
||||
dlltool -d expatw.def -l libexpatw.a
|
||||
|
||||
The *.a files are mingw libraries.
|
||||
|
||||
* Special note about MS VC++ and runtime libraries:
|
||||
|
||||
@@ -46,6 +56,9 @@ Expat can be built on Windows in three ways:
|
||||
Multi-threaded Dll: libexpat(w)MD.lib
|
||||
The suffixes conform to the compiler switch settings
|
||||
/ML, /MT and /MD for MS VC++.
|
||||
|
||||
Note: In Visual Studio 2005 (Visual C++ 8.0) and later, the
|
||||
single-threaded runtime library is not supported anymore.
|
||||
|
||||
By default, the expat-static and expatw-static projects are set up
|
||||
to link statically against the multithreaded run-time library,
|
||||
@@ -60,4 +73,3 @@ Expat can be built on Windows in three ways:
|
||||
|
||||
An application linking to the static libraries must
|
||||
have the global macro XML_STATIC defined.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; Basic setup script for the Inno Setep installer builder. For more
|
||||
; Basic setup script for the Inno Setup installer builder. For more
|
||||
; information on the free installer builder, see www.jrsoftware.org.
|
||||
;
|
||||
; This script was contributed by Tim Peters.
|
||||
@@ -7,15 +7,15 @@
|
||||
[Setup]
|
||||
AppName=expat
|
||||
AppId=expat
|
||||
AppVersion=1.95.8
|
||||
AppVerName=expat 1.95.8
|
||||
AppCopyright=Copyright © 1998-2003 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
|
||||
DefaultDirName={sd}\Expat-1.95.8
|
||||
AppVersion=2.0.0
|
||||
AppVerName=expat 2.0.0
|
||||
AppCopyright=Copyright © 1998-2006 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
|
||||
DefaultDirName={sd}\Expat-2.0.0
|
||||
AppPublisher=The Expat Developers
|
||||
AppPublisherURL=http://www.libexpat.org/
|
||||
AppSupportURL=http://www.libexpat.org/
|
||||
AppUpdatesURL=http://www.libexpat.org/
|
||||
UninstallDisplayName=Expat XML Parser (version 1.95.8)
|
||||
UninstallDisplayName=Expat XML Parser (version 2.0.0)
|
||||
UninstallFilesDir={app}\Uninstall
|
||||
|
||||
Compression=bzip/9
|
||||
@@ -27,36 +27,43 @@ DisableProgramGroupPage=yes
|
||||
DisableReadyPage=yes
|
||||
|
||||
[Files]
|
||||
CopyMode: alwaysoverwrite; Source: xmlwf\Release\*.exe; DestDir: "{app}"
|
||||
CopyMode: alwaysoverwrite; Source: win32\MANIFEST.txt; DestDir: "{app}"
|
||||
CopyMode: alwaysoverwrite; Source: Changes; DestDir: "{app}"; DestName: Changes.txt
|
||||
CopyMode: alwaysoverwrite; Source: COPYING; DestDir: "{app}"; DestName: COPYING.txt
|
||||
CopyMode: alwaysoverwrite; Source: README; DestDir: "{app}"; DestName: README.txt
|
||||
CopyMode: alwaysoverwrite; Source: doc\*.html; DestDir: "{app}\Doc"
|
||||
CopyMode: alwaysoverwrite; Source: doc\*.css; DestDir: "{app}\Doc"
|
||||
CopyMode: alwaysoverwrite; Source: doc\*.png; DestDir: "{app}\Doc"
|
||||
CopyMode: alwaysoverwrite; Source: lib\Release\*.dll; DestDir: "{app}\Libs"
|
||||
CopyMode: alwaysoverwrite; Source: lib\Release\*.lib; DestDir: "{app}\Libs"
|
||||
CopyMode: alwaysoverwrite; Source: lib\Release-w\*.dll; DestDir: "{app}\Libs"
|
||||
CopyMode: alwaysoverwrite; Source: lib\Release-w\*.lib; DestDir: "{app}\Libs"
|
||||
CopyMode: alwaysoverwrite; Source: lib\Release_static\*.lib; DestDir: "{app}\StaticLibs"
|
||||
CopyMode: alwaysoverwrite; Source: lib\Release-w_static\*.lib; DestDir: "{app}\StaticLibs"
|
||||
CopyMode: alwaysoverwrite; Source: expat.dsw; DestDir: "{app}\Source"
|
||||
CopyMode: alwaysoverwrite; Source: win32\README.txt; DestDir: "{app}\Source"
|
||||
CopyMode: alwaysoverwrite; Source: bcb5\*.*; DestDir: "{app}\Source\bcb5"
|
||||
CopyMode: alwaysoverwrite; Source: lib\*.c; DestDir: "{app}\Source\lib"
|
||||
CopyMode: alwaysoverwrite; Source: lib\*.h; DestDir: "{app}\Source\lib"
|
||||
CopyMode: alwaysoverwrite; Source: lib\*.def; DestDir: "{app}\Source\lib"
|
||||
CopyMode: alwaysoverwrite; Source: lib\*.dsp; DestDir: "{app}\Source\lib"
|
||||
CopyMode: alwaysoverwrite; Source: examples\*.c; DestDir: "{app}\Source\examples"
|
||||
CopyMode: alwaysoverwrite; Source: examples\*.dsp; DestDir: "{app}\Source\examples"
|
||||
CopyMode: alwaysoverwrite; Source: tests\*.c; DestDir: "{app}\Source\tests"
|
||||
CopyMode: alwaysoverwrite; Source: tests\*.cpp; DestDir: "{app}\Source\tests"
|
||||
CopyMode: alwaysoverwrite; Source: tests\*.h; DestDir: "{app}\Source\tests"
|
||||
CopyMode: alwaysoverwrite; Source: tests\README.txt; DestDir: "{app}\Source\tests"
|
||||
CopyMode: alwaysoverwrite; Source: xmlwf\*.c*; DestDir: "{app}\Source\xmlwf"
|
||||
CopyMode: alwaysoverwrite; Source: xmlwf\*.h; DestDir: "{app}\Source\xmlwf"
|
||||
CopyMode: alwaysoverwrite; Source: xmlwf\*.dsp; DestDir: "{app}\Source\xmlwf"
|
||||
Flags: ignoreversion; Source: xmlwf\Release\*.exe; DestDir: "{app}"
|
||||
Flags: ignoreversion; Source: win32\MANIFEST.txt; DestDir: "{app}"
|
||||
Flags: ignoreversion; Source: Changes; DestDir: "{app}"; DestName: Changes.txt
|
||||
Flags: ignoreversion; Source: COPYING; DestDir: "{app}"; DestName: COPYING.txt
|
||||
Flags: ignoreversion; Source: README; DestDir: "{app}"; DestName: README.txt
|
||||
Flags: ignoreversion; Source: doc\*.html; DestDir: "{app}\Doc"
|
||||
Flags: ignoreversion; Source: doc\*.css; DestDir: "{app}\Doc"
|
||||
Flags: ignoreversion; Source: doc\*.png; DestDir: "{app}\Doc"
|
||||
Flags: ignoreversion; Source: lib\Release\*.dll; DestDir: "{app}\Libs"
|
||||
Flags: ignoreversion; Source: lib\Release\*.lib; DestDir: "{app}\Libs"
|
||||
Flags: ignoreversion; Source: lib\Release-w\*.dll; DestDir: "{app}\Libs"
|
||||
Flags: ignoreversion; Source: lib\Release-w\*.lib; DestDir: "{app}\Libs"
|
||||
Flags: ignoreversion; Source: lib\Release_static\*.lib; DestDir: "{app}\StaticLibs"
|
||||
Flags: ignoreversion; Source: lib\Release-w_static\*.lib; DestDir: "{app}\StaticLibs"
|
||||
Flags: ignoreversion; Source: expat.dsw; DestDir: "{app}\Source"
|
||||
Flags: ignoreversion; Source: win32\README.txt; DestDir: "{app}\Source"
|
||||
Flags: ignoreversion; Source: bcb5\*.bp*; DestDir: "{app}\Source\bcb5"
|
||||
Flags: ignoreversion; Source: bcb5\*.mak; DestDir: "{app}\Source\bcb5"
|
||||
Flags: ignoreversion; Source: bcb5\*.def; DestDir: "{app}\Source\bcb5"
|
||||
Flags: ignoreversion; Source: bcb5\*.txt; DestDir: "{app}\Source\bcb5"
|
||||
Flags: ignoreversion; Source: bcb5\*.bat; DestDir: "{app}\Source\bcb5"
|
||||
Flags: ignoreversion; Source: lib\*.c; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: lib\*.h; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: lib\*.def; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: lib\*.dsp; DestDir: "{app}\Source\lib"
|
||||
Flags: ignoreversion; Source: examples\*.c; DestDir: "{app}\Source\examples"
|
||||
Flags: ignoreversion; Source: examples\*.dsp; DestDir: "{app}\Source\examples"
|
||||
Flags: ignoreversion; Source: tests\*.c; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.cpp; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\*.h; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\README.txt; DestDir: "{app}\Source\tests"
|
||||
Flags: ignoreversion; Source: tests\benchmark\*.c; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: tests\benchmark\*.ds*; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: tests\benchmark\README.txt; DestDir: "{app}\Source\tests\benchmark"
|
||||
Flags: ignoreversion; Source: xmlwf\*.c*; DestDir: "{app}\Source\xmlwf"
|
||||
Flags: ignoreversion; Source: xmlwf\*.h; DestDir: "{app}\Source\xmlwf"
|
||||
Flags: ignoreversion; Source: xmlwf\*.dsp; DestDir: "{app}\Source\xmlwf"
|
||||
|
||||
[Messages]
|
||||
WelcomeLabel1=Welcome to the Expat XML Parser Setup Wizard
|
||||
|
||||
@@ -20,12 +20,12 @@ codepageMap(int cp, int *map)
|
||||
for (i = 0; i < 256; i++)
|
||||
map[i] = -1;
|
||||
if (info.MaxCharSize > 1) {
|
||||
for (i = 0; i < MAX_LEADBYTES; i++) {
|
||||
for (i = 0; i < MAX_LEADBYTES; i+=2) {
|
||||
int j, lim;
|
||||
if (info.LeadByte[i] == 0 && info.LeadByte[i + 1] == 0)
|
||||
break;
|
||||
lim = info.LeadByte[i + 1];
|
||||
for (j = info.LeadByte[i]; j < lim; j++)
|
||||
for (j = info.LeadByte[i]; j <= lim; j++)
|
||||
map[j] = -2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,17 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef COMPILED_FROM_DSP
|
||||
#include "winconfig.h"
|
||||
#else
|
||||
#ifdef HAVE_EXPAT_CONFIG_H
|
||||
#include "expat_config.h"
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(MACOS_CLASSIC)
|
||||
#include "macconfig.h"
|
||||
#elif defined(__amigaos4__)
|
||||
#include "amigaconfig.h"
|
||||
#elif defined(HAVE_EXPAT_CONFIG_H)
|
||||
#include <expat_config.h>
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include "expat.h"
|
||||
#include "xmlfile.h"
|
||||
#include "xmltchar.h"
|
||||
@@ -23,6 +27,10 @@
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
#include <proto/expat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -53,7 +61,7 @@ reportError(XML_Parser parser, const XML_Char *filename)
|
||||
enum XML_Error code = XML_GetErrorCode(parser);
|
||||
const XML_Char *message = XML_ErrorString(code);
|
||||
if (message)
|
||||
ftprintf(stdout, T("%s:%d:%d: %s\n"),
|
||||
ftprintf(stdout, T("%s:%" XML_FMT_INT_MOD "u:%" XML_FMT_INT_MOD "u: %s\n"),
|
||||
filename,
|
||||
XML_GetErrorLineNumber(parser),
|
||||
XML_GetErrorColumnNumber(parser),
|
||||
|
||||
@@ -5,6 +5,16 @@
|
||||
#define XML_MAP_FILE 01
|
||||
#define XML_EXTERNAL_ENTITIES 02
|
||||
|
||||
#ifdef XML_LARGE_SIZE
|
||||
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
|
||||
#define XML_FMT_INT_MOD "I64"
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "ll"
|
||||
#endif
|
||||
#else
|
||||
#define XML_FMT_INT_MOD "l"
|
||||
#endif
|
||||
|
||||
extern int XML_ProcessFile(XML_Parser parser,
|
||||
const XML_Char *filename,
|
||||
unsigned flags);
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
#include <proto/expat.h>
|
||||
#endif
|
||||
|
||||
/* This ensures proper sorting. */
|
||||
|
||||
#define NSSEP T('\001')
|
||||
@@ -305,7 +309,8 @@ metaLocation(XML_Parser parser)
|
||||
if (uri)
|
||||
ftprintf((FILE *)XML_GetUserData(parser), T(" uri=\"%s\""), uri);
|
||||
ftprintf((FILE *)XML_GetUserData(parser),
|
||||
T(" byte=\"%ld\" nbytes=\"%d\" line=\"%d\" col=\"%d\""),
|
||||
T(" byte=\"%" XML_FMT_INT_MOD "d\" nbytes=\"%d\" \
|
||||
line=\"%" XML_FMT_INT_MOD "u\" col=\"%" XML_FMT_INT_MOD "u\""),
|
||||
XML_GetCurrentByteIndex(parser),
|
||||
XML_GetCurrentByteCount(parser),
|
||||
XML_GetCurrentLineNumber(parser),
|
||||
@@ -634,8 +639,13 @@ usage(const XML_Char *prog, int rc)
|
||||
exit(rc);
|
||||
}
|
||||
|
||||
#ifdef AMIGA_SHARED_LIB
|
||||
int
|
||||
amiga_main(int argc, char *argv[])
|
||||
#else
|
||||
int
|
||||
tmain(int argc, XML_Char **argv)
|
||||
#endif
|
||||
{
|
||||
int i, j;
|
||||
const XML_Char *outputDir = NULL;
|
||||
|
||||
Reference in New Issue
Block a user