From kwaclaw at users.sourceforge.net Wed Jan 7 12:10:55 2004 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Wed Jan 7 12:10:58 2004 Subject: [Expat-checkins] expat/lib expat.h, 1.58, 1.59 libexpat.def, 1.5, 1.6 libexpatw.def, 1.5, 1.6 xmlparse.c, 1.120, 1.121 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv28999 Modified Files: expat.h libexpat.def libexpatw.def xmlparse.c Log Message: Applied patch #835123: Suspend/Resume functionality. For details check the patch description. Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- expat.h 2 Nov 2003 20:37:22 -0000 1.58 +++ expat.h 7 Jan 2004 17:10:52 -0000 1.59 @@ -127,8 +127,10 @@ enum XML_Status { XML_STATUS_ERROR = 0, #define XML_STATUS_ERROR XML_STATUS_ERROR - XML_STATUS_OK = 1 + XML_STATUS_OK = 1, #define XML_STATUS_OK XML_STATUS_OK + XML_STATUS_SUSPENDED = 2, +#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED }; enum XML_Error { @@ -159,7 +161,11 @@ XML_ERROR_ENTITY_DECLARED_IN_PE, XML_ERROR_FEATURE_REQUIRES_XML_DTD, XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING, - XML_ERROR_UNBOUND_PREFIX + XML_ERROR_UNBOUND_PREFIX, + XML_ERROR_SUSPENDED, + XML_ERROR_NOT_SUSPENDED, + XML_ERROR_ABORTED, + XML_ERROR_FINISHED }; enum XML_Content_Type { @@ -817,6 +823,53 @@ XMLPARSEAPI(enum XML_Status) XML_ParseBuffer(XML_Parser parser, int len, int isFinal); + +/* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return as + soon as possible, but some handler call-backs - which would otherwise + get lost - may still follow. Examples: endElementHandler() for empty + elements when stopped in startElementHandler(), endNameSpaceDeclHandler() + when stopped in endElementHandler(), and possibly others. + + Can be called from most handlers, including DTD related call-backs. + Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise. + Possible error codes: XML_ERROR_SUSPENDED, XML_ERROR_FINISHED. + When resumable = XML_TRUE then parsing is suspended, that is, + XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED. + Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer() + return XML_STATUS_ERROR with error code XML_ERROR_ABORTED. + + When suspended, parsing can be resumed by calling XML_ResumeParser(). +*/ +XMLPARSEAPI(enum XML_Status) +XML_StopParser(XML_Parser parser, XML_Bool resumable); + +/* Resumes parsing after it has been suspended with XML_StopParser(). + Must not be called from within a handler call-back. Returns same + status codes as XML_Parse() or XML_ParseBuffer(). + Additional error code XML_ERROR_NOT_SUSPENDED possible. +*/ +XMLPARSEAPI(enum XML_Status) +XML_ResumeParser(XML_Parser parser); + +enum XML_Parsing { + XML_INITIALIZED, + XML_PARSING, + XML_FINISHED, + XML_SUSPENDED +}; + +typedef struct { + enum XML_Parsing parsing; + XML_Bool finalBuffer; +} XML_ParsingStatus; + +/* Returns status of parser with respect to being initialized, parsing, + finished, or suspended and processing the final buffer. + XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus, + XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED +*/ +XMLPARSEAPI(XML_ParsingStatus) +XML_GetParsingStatus(XML_Parser parser); /* Creates an XML_Parser object that can parse an external general entity; context is a '\0'-terminated string specifying the parse Index: libexpat.def =================================================================== RCS file: /cvsroot/expat/expat/lib/libexpat.def,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- libexpat.def 16 Jan 2003 23:22:56 -0000 1.5 +++ libexpat.def 7 Jan 2004 17:10:52 -0000 1.6 @@ -67,3 +67,7 @@ XML_MemMalloc @60 XML_MemRealloc @61 XML_MemFree @62 +; added with version 1.95.8 + XML_StopParser @63 + XML_ResumeParser @64 + XML_GetParsingStatus @65 Index: libexpatw.def =================================================================== RCS file: /cvsroot/expat/expat/lib/libexpatw.def,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- libexpatw.def 16 Jan 2003 23:22:56 -0000 1.5 +++ libexpatw.def 7 Jan 2004 17:10:52 -0000 1.6 @@ -67,3 +67,7 @@ XML_MemMalloc @60 XML_MemRealloc @61 XML_MemFree @62 +; added with version 1.95.8 + XML_StopParser @63 + XML_ResumeParser @64 + XML_GetParsingStatus @65 Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- xmlparse.c 2 Nov 2003 09:44:55 -0000 1.120 +++ xmlparse.c 7 Jan 2004 17:10:52 -0000 1.121 @@ -182,7 +182,8 @@ typedef struct { const XML_Char *name; const XML_Char *textPtr; - int textLen; + int textLen; /* length in XML_Chars */ + int processed; /* # of processed bytes - when suspended */ const XML_Char *systemId; const XML_Char *base; const XML_Char *publicId; @@ -307,29 +308,32 @@ static Processor externalEntityInitProcessor2; [...1257 lines suppressed...] + +#ifdef XML_DTD + if (entity->is_param) { + int tok; + processor = prologProcessor; + tok = XmlPrologTok(encoding, s, end, &next); + return doProlog(parser, encoding, s, end, tok, next, nextPtr, + (XML_Bool)!finalBuffer); + } + else +#endif /* XML_DTD */ + { + processor = contentProcessor; + return doContent(parser, processorTagLevel, encoding, s, end, nextPtr, + (XML_Bool)!finalBuffer); + } +} static enum XML_Error PTRCALL errorProcessor(XML_Parser parser, From kwaclaw at users.sourceforge.net Wed Jan 7 12:12:06 2004 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Wed Jan 7 12:12:09 2004 Subject: [Expat-checkins] expat/bcb5 libexpat_mtd.def, 1.3, 1.4 libexpatw_mtd.def, 1.3, 1.4 Message-ID: Update of /cvsroot/expat/expat/bcb5 In directory sc8-pr-cvs1:/tmp/cvs-serv29243 Modified Files: libexpat_mtd.def libexpatw_mtd.def Log Message: Applied patch #835123: Suspend/Resume functionality. For details check the patch description. Index: libexpat_mtd.def =================================================================== RCS file: /cvsroot/expat/expat/bcb5/libexpat_mtd.def,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- libexpat_mtd.def 17 Jan 2003 00:49:12 -0000 1.3 +++ libexpat_mtd.def 7 Jan 2004 17:12:04 -0000 1.4 @@ -67,6 +67,10 @@ _XML_MemMalloc @60 _XML_MemRealloc @61 _XML_MemFree @62 +; added with version 1.95.8 + _XML_StopParser @63 + _XML_ResumeParser @64 + _XML_GetParsingStatus @65 ; Aliases for MS compatible names XML_DefaultCurrent = _XML_DefaultCurrent @@ -131,3 +135,7 @@ XML_MemMalloc = _XML_MemMalloc XML_MemRealloc = _XML_MemRealloc XML_MemFree = _XML_MemFree + XML_StopParser = _XML_StopParser + XML_ResumeParser = _XML_ResumeParser + XML_GetParsingStatus = _XML_GetParsingStatus + Index: libexpatw_mtd.def =================================================================== RCS file: /cvsroot/expat/expat/bcb5/libexpatw_mtd.def,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- libexpatw_mtd.def 17 Jan 2003 00:49:12 -0000 1.3 +++ libexpatw_mtd.def 7 Jan 2004 17:12:04 -0000 1.4 @@ -67,6 +67,10 @@ _XML_MemMalloc @60 _XML_MemRealloc @61 _XML_MemFree @62 +; added with version 1.95.8 + _XML_StopParser @63 + _XML_ResumeParser @64 + _XML_GetParsingStatus @65 ; Aliases for MS compatible names XML_DefaultCurrent = _XML_DefaultCurrent @@ -131,3 +135,6 @@ XML_MemMalloc = _XML_MemMalloc XML_MemRealloc = _XML_MemRealloc XML_MemFree = _XML_MemFree + XML_StopParser = _XML_StopParser + XML_ResumeParser = _XML_ResumeParser + XML_GetParsingStatus = _XML_GetParsingStatus From fdrake at users.sourceforge.net Tue Jan 20 09:42:02 2004 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Tue Jan 20 09:42:06 2004 Subject: [Expat-checkins] htdocs index.html,1.47,1.48 Message-ID: Update of /cvsroot/expat/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv13438 Modified Files: index.html Log Message: - add a link-less entry for XML::Parser - fix punctuation Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- index.html 16 Dec 2003 17:24:29 -0000 1.47 +++ index.html 20 Jan 2004 14:41:59 -0000 1.48 @@ -173,6 +173,9 @@ >Introductory article on using Expat on xml.com
  • + Perl's XML::Parser module is a wrapper built around a + binding to Expat in the XML::Parser::Expat module.
  • +
  • XML Tools 2 is an AppleScript scripting addition that allows AppleScript applications to work with XML data; it is based on Expat.
  • @@ -188,7 +191,7 @@
  • Documentation for the Python interface to Expat, part of the - standard documentation for Python
  • + standard documentation for Python.
  • C++ Wrappers From fdrake at users.sourceforge.net Tue Jan 20 11:04:49 2004 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Tue Jan 20 11:04:53 2004 Subject: [Expat-checkins] expat/lib expat.h,1.59,1.60 Message-ID: Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1:/tmp/cvs-serv29252 Modified Files: expat.h Log Message: suggested patch from SF bug #846309: avoid generating spurious warning from GCC on non-x86 platforms Index: expat.h =================================================================== RCS file: /cvsroot/expat/expat/lib/expat.h,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- expat.h 7 Jan 2004 17:10:52 -0000 1.59 +++ expat.h 20 Jan 2004 16:04:47 -0000 1.60 @@ -45,7 +45,7 @@ #ifndef XMLCALL #if defined(XML_USE_MSC_EXTENSIONS) #define XMLCALL __cdecl -#elif defined(__GNUC__) +#elif defined(__GNUC__) && defined(__i386) #define XMLCALL __attribute__((cdecl)) #else /* For any platform which uses this definition and supports more than From fdrake at users.sourceforge.net Wed Jan 21 16:30:56 2004 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Jan 21 16:35:22 2004 Subject: [Expat-checkins] expat MANIFEST,1.19,1.20 Message-ID: Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv19657 Modified Files: MANIFEST Log Message: add MSVC 6 project files to the source distribution closes SF bug #856659 Index: MANIFEST =================================================================== RCS file: /cvsroot/expat/expat/MANIFEST,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- MANIFEST 20 Jan 2003 15:00:57 -0000 1.19 +++ MANIFEST 21 Jan 2004 21:30:54 -0000 1.20 @@ -6,6 +6,7 @@ configure configure.in expat_config.h.in +expat.dsw bcb5/README.txt bcb5/elements.bpf bcb5/elements.bpr @@ -47,13 +48,20 @@ doc/xmlwf.1 doc/xmlwf.sgml examples/elements.c +examples/elements.dsp examples/outline.c +examples/outline.dsp lib/ascii.h lib/asciitab.h +lib/expat.dsp lib/expat.h +lib/expatw.dsp +lib/expat_static.dsp +lib/expatw_static.dsp lib/iasciitab.h lib/internal.h lib/latin1tab.h +lib/libexpatw.def lib/nametab.h lib/utf8tab.h lib/xmlparse.c @@ -89,4 +97,5 @@ xmlwf/xmltchar.h xmlwf/xmlurl.h xmlwf/xmlwf.c +xmlwf/xmlwf.dsp xmlwf/xmlwin32url.cxx From fdrake at users.sourceforge.net Wed Jan 21 23:22:20 2004 From: fdrake at users.sourceforge.net (Fred L. Drake) Date: Wed Jan 21 23:22:24 2004 Subject: [Expat-checkins] htdocs index.html,1.48,1.49 Message-ID: Update of /cvsroot/expat/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv4100 Modified Files: index.html Log Message: add link to OCaml Expat Index: index.html =================================================================== RCS file: /cvsroot/expat/htdocs/index.html,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- index.html 20 Jan 2004 14:41:59 -0000 1.48 +++ index.html 22 Jan 2004 04:22:17 -0000 1.49 @@ -176,6 +176,10 @@ Perl's XML::Parser module is a wrapper built around a binding to Expat in the XML::Parser::Expat module.
  • + OCaml Expat is a + wrapper around Expat for the Objective Caml language.
  • +
  • XML Tools 2 is an AppleScript scripting addition that allows AppleScript applications to work with XML data; it is based on Expat.