1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-27 18:50:07 +03:00

applied patch from Mark Vadoc avoiding using xmlParse* option and use

* debugXML.c testXPath.c xmllint.c xmlschemastypes.c: applied
  patch from Mark Vadoc avoiding using xmlParse* option and use
  xmlRead* instead
* win32/Makefile.bcb: patch to Borland C++ builder from Eric Zurcher
  to avoid problems with some pathnames.
Daniel
This commit is contained in:
Daniel Veillard 2004-03-25 09:35:49 +00:00
parent 520f17ad9a
commit ebe25d4920
6 changed files with 41 additions and 30 deletions

View File

@ -1,3 +1,11 @@
Thu Mar 25 10:33:05 CET 2004 Daniel Veillard <daniel@veillard.com>
* debugXML.c testXPath.c xmllint.c xmlschemastypes.c: applied
patch from Mark Vadoc avoiding using xmlParse* option and use
xmlRead* instead
* win32/Makefile.bcb: patch to Borland C++ builder from Eric Zurcher
to avoid problems with some pathnames.
Tue Mar 23 12:35:08 CET 2004 Daniel Veillard <daniel@veillard.com>
* configure.in doc/* News: preparing 2.6.8 release, updated and rebuilt

View File

@ -1806,7 +1806,7 @@ xmlShellLoad(xmlShellCtxtPtr ctxt, char *filename,
doc = NULL;
#endif /* LIBXML_HTML_ENABLED */
} else {
doc = xmlParseFile(filename);
doc = xmlReadFile(filename,NULL,0);
}
if (doc != NULL) {
if (ctxt->loaded == 1) {

View File

@ -178,9 +178,9 @@ int main(int argc, char **argv) {
}
if (document == NULL) {
if (filename == NULL)
document = xmlParseDoc(buffer);
document = xmlReadDoc(buffer,NULL,NULL,0);
else
document = xmlParseFile(filename);
document = xmlReadFile(filename,NULL,0);
}
for (i = 1; i < argc ; i++) {
if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input"))) {

View File

@ -43,7 +43,7 @@ UTILS_INTDIR = int.utils.bcb
# The preprocessor and its options.
CPP = cpp32.exe -P- -DWIN32
CPPFLAGS = -I$(XML_SRCDIR)\include
CPPFLAGS = -I"$(XML_SRCDIR)\include"
!if "$(WITH_THREADS)" != "no"
CPPFLAGS = $(CPPFLAGS) -D_REENTRANT -D__MT__
!endif
@ -51,7 +51,7 @@ CPPFLAGS = $(CPPFLAGS) -D_REENTRANT -D__MT__
# The compiler and its options.
CC = bcc32.exe
CFLAGS = -q -DWIN32 -D_NO_VCL -D_WINDOWS -D_MBCS -DEILSEQ=2 -w-
CFLAGS = $(CFLAGS) -I$(XML_SRCDIR) -I$(XML_SRCDIR)\include -I$(INCPREFIX) -I$(INCLUDE)
CFLAGS = $(CFLAGS) -I"$(XML_SRCDIR)" -I"$(XML_SRCDIR)\include" -I"$(INCPREFIX)" -I"$(INCLUDE)"
!if "$(WITH_THREADS)" != "no"
CFLAGS = $(CFLAGS) -D_REENTRANT -tWM
!endif
@ -72,7 +72,7 @@ CFLAGS = $(CFLAGS) -DHAVE_ZLIB_H
# The linker and its options.
LD = ilink32.exe
LDFLAGS = -q -U$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
LDFLAGS = $(LDFLAGS) -L$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib\PSdk
LDFLAGS = $(LDFLAGS) -L"$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib\PSdk"
LIBS = import32.lib
!if "$(WITH_THREADS)" != "no" && "$(DYNRUNTIME)" == "1"
LIBS = $(LIBS) cw32mti.lib
@ -239,15 +239,14 @@ distclean : clean
rebuild : clean all
install : all
if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml
if not exist $(BINPREFIX) mkdir $(BINPREFIX)
if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)
copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml
copy $(BINDIR)\$(XML_SO) $(SOPREFIX)
copy $(BINDIR)\$(XML_A) $(LIBPREFIX)
copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)
copy $(BINDIR)\*.exe $(BINPREFIX)
-copy $(BINDIR)\*.pdb $(BINPREFIX)
if not exist "$(INCPREFIX)\libxml" mkdir "$(INCPREFIX)\libxml"
if not exist "$(BINPREFIX)" mkdir "$(BINPREFIX)"
if not exist "$(LIBPREFIX)" mkdir "$(LIBPREFIX)"
copy $(XML_SRCDIR)\include\libxml\*.h "$(INCPREFIX)\libxml"
copy $(BINDIR)\$(XML_SO) "$(SOPREFIX)"
copy $(BINDIR)\$(XML_A) "$(LIBPREFIX)"
copy $(BINDIR)\$(XML_IMP) "$(LIBPREFIX)"
copy $(BINDIR)\*.exe "$(BINPREFIX)"
# This is a target for me, to make a binary distribution. Not for the public use,
# keep your hands off :-)

View File

@ -1873,7 +1873,11 @@ main(int argc, char **argv) {
if (timing) {
endTimer("Compiling the schemas");
}
} else if ((schema != NULL) && (stream == 0)) {
} else if ((schema != NULL)
#ifdef LIBXML_READER_ENABLED
&& (stream == 0)
#endif
) {
xmlSchemaParserCtxtPtr ctxt;
if (timing) {

View File

@ -506,9 +506,9 @@ xmlSchemaGetPredefinedType(const xmlChar *name, const xmlChar *ns) {
#define IS_LEAP(y) \
(((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0))
static const long daysInMonth[12] =
static const unsigned int daysInMonth[12] =
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static const long daysInMonthLeap[12] =
static const unsigned int daysInMonthLeap[12] =
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
#define MAX_DAYINMONTH(yr,mon) \
@ -2651,8 +2651,8 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
/* month */
carry = d->mon + u->mon;
r->mon = MODULO_RANGE(carry, 1, 13);
carry = FQUOTIENT_RANGE(carry, 1, 13);
r->mon = (unsigned int) MODULO_RANGE(carry, 1, 13);
carry = (long) FQUOTIENT_RANGE(carry, 1, 13);
/* year (may be modified later) */
r->year = d->year + carry;
@ -2669,20 +2669,20 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
/* seconds */
r->sec = d->sec + u->sec;
carry = FQUOTIENT((long)r->sec, 60);
carry = (long) FQUOTIENT((long)r->sec, 60);
if (r->sec != 0.0) {
r->sec = MODULO(r->sec, 60.0);
}
/* minute */
carry += d->min;
r->min = MODULO(carry, 60);
carry = FQUOTIENT(carry, 60);
r->min = (unsigned int) MODULO(carry, 60);
carry = (long) FQUOTIENT(carry, 60);
/* hours */
carry += d->hour;
r->hour = MODULO(carry, 24);
carry = FQUOTIENT(carry, 24);
r->hour = (unsigned int) MODULO(carry, 24);
carry = (long)FQUOTIENT(carry, 24);
/*
* days
@ -2701,21 +2701,21 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
while (1) {
if (tempdays < 1) {
long tmon = MODULO_RANGE(r->mon-1, 1, 13);
long tyr = r->year + FQUOTIENT_RANGE(r->mon-1, 1, 13);
long tmon = (long) MODULO_RANGE(r->mon-1, 1, 13);
long tyr = r->year + (long)FQUOTIENT_RANGE(r->mon-1, 1, 13);
if (tyr == 0)
tyr--;
tempdays += MAX_DAYINMONTH(tyr, tmon);
carry = -1;
} else if (tempdays > MAX_DAYINMONTH(r->year, r->mon)) {
} else if (tempdays > (long) MAX_DAYINMONTH(r->year, r->mon)) {
tempdays = tempdays - MAX_DAYINMONTH(r->year, r->mon);
carry = 1;
} else
break;
temp = r->mon + carry;
r->mon = MODULO_RANGE(temp, 1, 13);
r->year = r->year + FQUOTIENT_RANGE(temp, 1, 13);
r->mon = (unsigned int) MODULO_RANGE(temp, 1, 13);
r->year = r->year + (unsigned int) FQUOTIENT_RANGE(temp, 1, 13);
if (r->year == 0) {
if (temp < 1)
r->year--;