Couples of HTML and Windows fixes:
- HTMLparser.c: fixed handling of broken charrefs
- xmlmemory.h libxml2.dsp include/win32config.h: reporting Windows
patches
Daniel
diff --git a/ChangeLog b/ChangeLog
index 91167b6..afbf195 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Nov 17 17:28:06 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * 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 <Daniel.Veillard@w3.org>
* doc/xml.html doc/html/* : rebuilt the docs after adding
diff --git a/HTMLparser.c b/HTMLparser.c
index 0e2d4cc..7e3f239 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -2593,8 +2593,7 @@
ctxt->sax->error(ctxt->userData,
"htmlParseCharRef: invalid hexadecimal value\n");
ctxt->wellFormed = 0;
- val = 0;
- break;
+ return(0);
}
NEXT;
}
@@ -2610,8 +2609,7 @@
ctxt->sax->error(ctxt->userData,
"htmlParseCharRef: invalid decimal value\n");
ctxt->wellFormed = 0;
- val = 0;
- break;
+ return(0);
}
NEXT;
}
@@ -3171,6 +3169,9 @@
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 0237820..1e533d1 100644
--- a/include/libxml/xmlmemory.h
+++ b/include/libxml/xmlmemory.h
@@ -42,10 +42,10 @@
/*
* 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 @@
#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 f09c840..5f544a6 100644
--- a/include/win32config.h
+++ b/include/win32config.h
@@ -6,6 +6,9 @@
#include <io.h>
+#define LIBXML_DLL_IMPORT
+#define SOCKLEN_T int
+
#ifdef INCLUDE_WINSOCK
#include <winsock2.h>
@@ -48,7 +51,8 @@
#define EREMOTE WSAEREMOTE
#endif /* INCLUDE_WINSOCK */
-#define HAVE_ISINF #define HAVE_ISNAN
+#define HAVE_ISINF
+#define HAVE_ISNAN
#include <math.h>
static int isinf (double d) {
@@ -81,3 +85,5 @@
return 0;
}
}
+
+#include <direct.h>
diff --git a/win32/libxml2/libxml2.dsp b/win32/libxml2/libxml2.dsp
index 14dbb22..02e4f48 100644
--- a/win32/libxml2/libxml2.dsp
+++ b/win32/libxml2/libxml2.dsp
@@ -26,6 +26,7 @@
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
+F90=df.exe
RSC=rc.exe
!IF "$(CFG)" == "libxml2 - Win32 Release"
@@ -40,11 +41,10 @@
# 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 @@
# 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 @@
# 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 0237820..1e533d1 100644
--- a/xmlmemory.h
+++ b/xmlmemory.h
@@ -42,10 +42,10 @@
/*
* 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 @@
#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