Commit 3e59fc52 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

added support for large file, tested with a 3+GB instance, and some

* 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
Daniel
parent e81765f6
Fri Apr 18 14:31:15 CEST 2003 Daniel Veillard <daniel@veillard.com>
* 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 <daniel@veillard.com>
 
* relaxng.c: some cleanups
......
......@@ -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);
......
......@@ -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 \
......
......@@ -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 <richard@cogsci.ed.ac.uk>
*> 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, \
......
......@@ -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 */
......
......@@ -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)
......
......@@ -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];
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment