diff --git a/ChangeLog b/ChangeLog index 91167b6b..afbf1952 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Nov 17 17:28:06 CET 2000 Daniel Veillard + + * HTMLparser.c: fixed handling of broken charrefs + * xmlmemory.h libxml2.dsp include/win32config.h: reporting Windows + patches + Mon Nov 13 19:17:20 CET 2000 Daniel Veillard * doc/xml.html doc/html/* : rebuilt the docs after adding diff --git a/HTMLparser.c b/HTMLparser.c index 0e2d4cc8..7e3f239c 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -2593,8 +2593,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "htmlParseCharRef: invalid hexadecimal value\n"); ctxt->wellFormed = 0; - val = 0; - break; + return(0); } NEXT; } @@ -2610,8 +2609,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "htmlParseCharRef: invalid decimal value\n"); ctxt->wellFormed = 0; - val = 0; - break; + return(0); } NEXT; } @@ -3171,6 +3169,9 @@ htmlParseReference(htmlParserCtxtPtr ctxt) { int bits, i = 0; c = htmlParseCharRef(ctxt); + if (c == 0) + return; + if (c < 0x80) { out[i++]= c; bits= -6; } else if (c < 0x800) { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; } diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h index 02378205..1e533d15 100644 --- a/include/libxml/xmlmemory.h +++ b/include/libxml/xmlmemory.h @@ -42,10 +42,10 @@ typedef char *(*xmlStrdupFunc)(const char *); /* * The 4 interfaces used for all memory handling within libxml */ -extern xmlFreeFunc xmlFree; -extern xmlMallocFunc xmlMalloc; -extern xmlReallocFunc xmlRealloc; -extern xmlStrdupFunc xmlMemStrdup; +LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; +LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc; +LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc; +LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup; /* * The way to overload the existing functions @@ -78,9 +78,9 @@ int xmlInitMemory (void); #define xmlRealloc(p, x) xmlReallocLoc((p), (x), __FILE__, __LINE__) #define xmlMemStrdup(x) xmlMemStrdupLoc((x), __FILE__, __LINE__) -extern void * xmlMallocLoc(int size, const char *file, int line); -extern void * xmlReallocLoc(void *ptr,int size, const char *file, int line); -extern char * xmlMemStrdupLoc(const char *str, const char *file, int line); +void * xmlMallocLoc(int size, const char *file, int line); +void * xmlReallocLoc(void *ptr,int size, const char *file, int line); +char * xmlMemStrdupLoc(const char *str, const char *file, int line); #endif /* DEBUG_MEMORY_LOCATION */ #ifdef __cplusplus diff --git a/include/win32config.h b/include/win32config.h index f09c8409..5f544a6b 100644 --- a/include/win32config.h +++ b/include/win32config.h @@ -6,6 +6,9 @@ #include +#define LIBXML_DLL_IMPORT +#define SOCKLEN_T int + #ifdef INCLUDE_WINSOCK #include @@ -48,7 +51,8 @@ #define EREMOTE WSAEREMOTE #endif /* INCLUDE_WINSOCK */ -#define HAVE_ISINF #define HAVE_ISNAN +#define HAVE_ISINF +#define HAVE_ISNAN #include static int isinf (double d) { @@ -81,3 +85,5 @@ static int isnan (double d) { return 0; } } + +#include diff --git a/win32/libxml2/libxml2.dsp b/win32/libxml2/libxml2.dsp index 14dbb220..02e4f488 100644 --- a/win32/libxml2/libxml2.dsp +++ b/win32/libxml2/libxml2.dsp @@ -26,6 +26,7 @@ CFG=libxml2 - Win32 Debug # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe +F90=df.exe RSC=rc.exe !IF "$(CFG)" == "libxml2 - Win32 Release" @@ -40,11 +41,10 @@ RSC=rc.exe # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" -F90=df.exe # ADD BASE F90 /include:"Release/" # ADD F90 /include:"Release/" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "STATIC" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -66,11 +66,10 @@ LIB32=link.exe -lib # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" -F90=df.exe # ADD BASE F90 /include:"Debug/" # ADD F90 /include:"Debug/" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "STATIC" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe @@ -169,6 +168,10 @@ SOURCE=..\..\xpath.c # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\libxml\xmlversion.h +# End Source File # End Group # End Target # End Project diff --git a/xmlmemory.h b/xmlmemory.h index 02378205..1e533d15 100644 --- a/xmlmemory.h +++ b/xmlmemory.h @@ -42,10 +42,10 @@ typedef char *(*xmlStrdupFunc)(const char *); /* * The 4 interfaces used for all memory handling within libxml */ -extern xmlFreeFunc xmlFree; -extern xmlMallocFunc xmlMalloc; -extern xmlReallocFunc xmlRealloc; -extern xmlStrdupFunc xmlMemStrdup; +LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; +LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc; +LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc; +LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup; /* * The way to overload the existing functions @@ -78,9 +78,9 @@ int xmlInitMemory (void); #define xmlRealloc(p, x) xmlReallocLoc((p), (x), __FILE__, __LINE__) #define xmlMemStrdup(x) xmlMemStrdupLoc((x), __FILE__, __LINE__) -extern void * xmlMallocLoc(int size, const char *file, int line); -extern void * xmlReallocLoc(void *ptr,int size, const char *file, int line); -extern char * xmlMemStrdupLoc(const char *str, const char *file, int line); +void * xmlMallocLoc(int size, const char *file, int line); +void * xmlReallocLoc(void *ptr,int size, const char *file, int line); +char * xmlMemStrdupLoc(const char *str, const char *file, int line); #endif /* DEBUG_MEMORY_LOCATION */ #ifdef __cplusplus