diff --git a/ChangeLog b/ChangeLog index 64ed432e..da5ec32c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Apr 18 14:31:15 CEST 2003 Daniel Veillard + + * libxml.h include/libxml/parser.h parser.c xmlIO.c DOCBparser.c: + added support for large file, tested with a 3+GB instance, + and some cleanup. + * catalog.c: added a TODO + * Makefile.am: added some "make tests" comments + Thu Apr 17 14:51:57 CEST 2003 Daniel Veillard * relaxng.c: some cleanups diff --git a/DOCBparser.c b/DOCBparser.c index 4673a6c4..232c5a54 100644 --- a/DOCBparser.c +++ b/DOCBparser.c @@ -4713,7 +4713,7 @@ docbParseInternalSubset(xmlParserCtxtPtr ctxt) { */ while (RAW != ']') { const xmlChar *check = CUR_PTR; - int cons = ctxt->input->consumed; + unsigned int cons = ctxt->input->consumed; SKIP_BLANKS; docbParseMarkupDecl(ctxt); diff --git a/Makefile.am b/Makefile.am index 216af1b7..9d32c31b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -408,6 +408,8 @@ XIncludetests : xmllint$(EXEEXT) @echo "##" @echo "## XInclude regression tests" @echo "##" + @echo "## the warning reported on fallback.xml test is expected" + @echo "##" -@(for i in $(srcdir)/test/XInclude/docs/* ; do \ name=`basename $$i`; \ if [ ! -d $$i ] ; then \ @@ -736,6 +738,9 @@ Relaxtests: xmllint$(EXEEXT) @echo "##" @echo "## Relax-NG streaming regression tests" @echo "##" + @echo "## Some error messages are different than non-streaming" + @echo "## and generate small diffs" + @echo "##" -@(for i in $(srcdir)/test/relaxng/*.rng ; do \ name=`basename $$i | sed 's+\.rng++'`; \ for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \ diff --git a/catalog.c b/catalog.c index 040d99ca..a9dc3a48 100644 --- a/catalog.c +++ b/catalog.c @@ -47,6 +47,11 @@ * TODO: * * macro to flag unimplemented blocks + * XML_CATALOG_PREFER user env to select between system/public prefered + * option. C.f. Richard Tobin + *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with + *> values "system" and "public". I have made the default be "system" to + *> match yours. */ #define TODO \ xmlGenericError(xmlGenericErrorContext, \ diff --git a/include/libxml/parser.h b/include/libxml/parser.h index d221825f..d623e73f 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -55,7 +55,12 @@ struct _xmlParserInput { int length; /* length if known */ int line; /* Current line */ int col; /* Current column */ - int consumed; /* How many xmlChars already consumed */ + /* + * NOTE: consumed is only tested for equality in the parser code, + * so even if there is an overflow this should not give troubles + * for parsing very large instances. + */ + unsigned long consumed; /* How many xmlChars already consumed */ xmlParserInputDeallocate free; /* function to deallocate the base */ const xmlChar *encoding; /* the encoding string for entity */ const xmlChar *version; /* the version string for entity */ diff --git a/libxml.h b/libxml.h index 6b7476f5..8b1b9495 100644 --- a/libxml.h +++ b/libxml.h @@ -9,6 +9,15 @@ #ifndef __XML_LIBXML_H__ #define __XML_LIBXML_H__ +#ifndef NO_LARGEFILE_SOURCE +#ifndef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE +#endif +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif +#endif + #if defined(WIN32) && !defined(__CYGWIN__) #include "win32config.h" #elif defined(macintosh) diff --git a/parser.c b/parser.c index 5c7af3d1..19da8069 100644 --- a/parser.c +++ b/parser.c @@ -5044,7 +5044,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { while ((RAW != 0) && ((RAW != ']') || (NXT(1) != ']') || (NXT(2) != '>'))) { const xmlChar *check = CUR_PTR; - int cons = ctxt->input->consumed; + unsigned int cons = ctxt->input->consumed; if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) { xmlParseConditionalSections(ctxt); @@ -5352,7 +5352,7 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, ((RAW == '<') && (NXT(1) == '!')) || (RAW == '%') || IS_BLANK(CUR)) { const xmlChar *check = CUR_PTR; - int cons = ctxt->input->consumed; + unsigned int cons = ctxt->input->consumed; GROW; if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) { @@ -6485,7 +6485,7 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) { */ while (RAW != ']') { const xmlChar *check = CUR_PTR; - int cons = ctxt->input->consumed; + unsigned int cons = ctxt->input->consumed; SKIP_BLANKS; xmlParseMarkupDecl(ctxt); @@ -6695,7 +6695,7 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) { ((RAW != '/') || (NXT(1) != '>')) && (IS_CHAR(RAW))) { const xmlChar *q = CUR_PTR; - int cons = ctxt->input->consumed; + unsigned int cons = ctxt->input->consumed; attname = xmlParseAttribute(ctxt, &attvalue); if ((attname != NULL) && (attvalue != NULL)) { @@ -7030,7 +7030,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) { while ((RAW != 0) && ((RAW != '<') || (NXT(1) != '/'))) { const xmlChar *test = CUR_PTR; - int cons = ctxt->input->consumed; + unsigned int cons = ctxt->input->consumed; const xmlChar *cur = ctxt->input->cur; /* @@ -8709,7 +8709,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { } case XML_PARSER_CONTENT: { const xmlChar *test; - int cons; + unsigned int cons; if ((avail < 2) && (ctxt->inputNr == 1)) goto done; cur = ctxt->input->cur[0]; diff --git a/xmlIO.c b/xmlIO.c index f137d66d..a3b1dc07 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -1713,8 +1713,7 @@ xmlOutputBufferClose(xmlOutputBufferPtr out) { * Returns the new parser input or NULL */ xmlParserInputBufferPtr -xmlParserInputBufferCreateFilename -(const char *URI, xmlCharEncoding enc) { +xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) { xmlParserInputBufferPtr ret; int i = 0; void *context = NULL;