Commit 748e45d7 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

Couples of HTML and Windows fixes:

- HTMLparser.c: fixed handling of broken charrefs
- xmlmemory.h libxml2.dsp include/win32config.h: reporting Windows
  patches
Daniel
parent 0d2340cd
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
......
......@@ -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; }
......
......@@ -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
......
......@@ -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 @@ static int isnan (double d) {
return 0;
}
}
#include <direct.h>
......@@ -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
......@@ -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
......
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