mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
Couples of HTML and Windows fixes:
- HTMLparser.c: fixed handling of broken charrefs - xmlmemory.h libxml2.dsp include/win32config.h: reporting Windows patches Daniel
This commit is contained in:
@ -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>
|
Mon Nov 13 19:17:20 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
* doc/xml.html doc/html/* : rebuilt the docs after adding
|
* doc/xml.html doc/html/* : rebuilt the docs after adding
|
||||||
|
@ -2593,8 +2593,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
|
|||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"htmlParseCharRef: invalid hexadecimal value\n");
|
"htmlParseCharRef: invalid hexadecimal value\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
val = 0;
|
return(0);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
NEXT;
|
NEXT;
|
||||||
}
|
}
|
||||||
@ -2610,8 +2609,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
|
|||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"htmlParseCharRef: invalid decimal value\n");
|
"htmlParseCharRef: invalid decimal value\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
val = 0;
|
return(0);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
NEXT;
|
NEXT;
|
||||||
}
|
}
|
||||||
@ -3171,6 +3169,9 @@ htmlParseReference(htmlParserCtxtPtr ctxt) {
|
|||||||
int bits, i = 0;
|
int bits, i = 0;
|
||||||
|
|
||||||
c = htmlParseCharRef(ctxt);
|
c = htmlParseCharRef(ctxt);
|
||||||
|
if (c == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (c < 0x80) { out[i++]= c; bits= -6; }
|
if (c < 0x80) { out[i++]= c; bits= -6; }
|
||||||
else if (c < 0x800) { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; }
|
else if (c < 0x800) { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; }
|
||||||
else if (c < 0x10000) { out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; }
|
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
|
* The 4 interfaces used for all memory handling within libxml
|
||||||
*/
|
*/
|
||||||
extern xmlFreeFunc xmlFree;
|
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
|
||||||
extern xmlMallocFunc xmlMalloc;
|
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
|
||||||
extern xmlReallocFunc xmlRealloc;
|
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
|
||||||
extern xmlStrdupFunc xmlMemStrdup;
|
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The way to overload the existing functions
|
* The way to overload the existing functions
|
||||||
@ -78,9 +78,9 @@ int xmlInitMemory (void);
|
|||||||
#define xmlRealloc(p, x) xmlReallocLoc((p), (x), __FILE__, __LINE__)
|
#define xmlRealloc(p, x) xmlReallocLoc((p), (x), __FILE__, __LINE__)
|
||||||
#define xmlMemStrdup(x) xmlMemStrdupLoc((x), __FILE__, __LINE__)
|
#define xmlMemStrdup(x) xmlMemStrdupLoc((x), __FILE__, __LINE__)
|
||||||
|
|
||||||
extern void * xmlMallocLoc(int size, const char *file, int line);
|
void * xmlMallocLoc(int size, const char *file, int line);
|
||||||
extern void * xmlReallocLoc(void *ptr,int size, const char *file, int line);
|
void * xmlReallocLoc(void *ptr,int size, const char *file, int line);
|
||||||
extern char * xmlMemStrdupLoc(const char *str, const char *file, int line);
|
char * xmlMemStrdupLoc(const char *str, const char *file, int line);
|
||||||
#endif /* DEBUG_MEMORY_LOCATION */
|
#endif /* DEBUG_MEMORY_LOCATION */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|
||||||
|
#define LIBXML_DLL_IMPORT
|
||||||
|
#define SOCKLEN_T int
|
||||||
|
|
||||||
#ifdef INCLUDE_WINSOCK
|
#ifdef INCLUDE_WINSOCK
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
|
||||||
@ -48,7 +51,8 @@
|
|||||||
#define EREMOTE WSAEREMOTE
|
#define EREMOTE WSAEREMOTE
|
||||||
#endif /* INCLUDE_WINSOCK */
|
#endif /* INCLUDE_WINSOCK */
|
||||||
|
|
||||||
#define HAVE_ISINF #define HAVE_ISNAN
|
#define HAVE_ISINF
|
||||||
|
#define HAVE_ISNAN
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
static int isinf (double d) {
|
static int isinf (double d) {
|
||||||
@ -81,3 +85,5 @@ static int isnan (double d) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <direct.h>
|
||||||
|
@ -26,6 +26,7 @@ CFG=libxml2 - Win32 Debug
|
|||||||
# PROP Scc_ProjName ""
|
# PROP Scc_ProjName ""
|
||||||
# PROP Scc_LocalPath ""
|
# PROP Scc_LocalPath ""
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
|
F90=df.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "libxml2 - Win32 Release"
|
!IF "$(CFG)" == "libxml2 - Win32 Release"
|
||||||
@ -40,11 +41,10 @@ RSC=rc.exe
|
|||||||
# PROP Output_Dir "Release"
|
# PROP Output_Dir "Release"
|
||||||
# PROP Intermediate_Dir "Release"
|
# PROP Intermediate_Dir "Release"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
F90=df.exe
|
|
||||||
# ADD BASE F90 /include:"Release/"
|
# ADD BASE F90 /include:"Release/"
|
||||||
# ADD 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 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 BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@ -66,11 +66,10 @@ LIB32=link.exe -lib
|
|||||||
# PROP Output_Dir "Debug"
|
# PROP Output_Dir "Debug"
|
||||||
# PROP Intermediate_Dir "Debug"
|
# PROP Intermediate_Dir "Debug"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
F90=df.exe
|
|
||||||
# ADD BASE F90 /include:"Debug/"
|
# ADD BASE F90 /include:"Debug/"
|
||||||
# ADD 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 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 BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@ -169,6 +168,10 @@ SOURCE=..\..\xpath.c
|
|||||||
# Begin Group "Header Files"
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\include\libxml\xmlversion.h
|
||||||
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
14
xmlmemory.h
14
xmlmemory.h
@ -42,10 +42,10 @@ typedef char *(*xmlStrdupFunc)(const char *);
|
|||||||
/*
|
/*
|
||||||
* The 4 interfaces used for all memory handling within libxml
|
* The 4 interfaces used for all memory handling within libxml
|
||||||
*/
|
*/
|
||||||
extern xmlFreeFunc xmlFree;
|
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
|
||||||
extern xmlMallocFunc xmlMalloc;
|
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
|
||||||
extern xmlReallocFunc xmlRealloc;
|
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
|
||||||
extern xmlStrdupFunc xmlMemStrdup;
|
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The way to overload the existing functions
|
* The way to overload the existing functions
|
||||||
@ -78,9 +78,9 @@ int xmlInitMemory (void);
|
|||||||
#define xmlRealloc(p, x) xmlReallocLoc((p), (x), __FILE__, __LINE__)
|
#define xmlRealloc(p, x) xmlReallocLoc((p), (x), __FILE__, __LINE__)
|
||||||
#define xmlMemStrdup(x) xmlMemStrdupLoc((x), __FILE__, __LINE__)
|
#define xmlMemStrdup(x) xmlMemStrdupLoc((x), __FILE__, __LINE__)
|
||||||
|
|
||||||
extern void * xmlMallocLoc(int size, const char *file, int line);
|
void * xmlMallocLoc(int size, const char *file, int line);
|
||||||
extern void * xmlReallocLoc(void *ptr,int size, const char *file, int line);
|
void * xmlReallocLoc(void *ptr,int size, const char *file, int line);
|
||||||
extern char * xmlMemStrdupLoc(const char *str, const char *file, int line);
|
char * xmlMemStrdupLoc(const char *str, const char *file, int line);
|
||||||
#endif /* DEBUG_MEMORY_LOCATION */
|
#endif /* DEBUG_MEMORY_LOCATION */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Reference in New Issue
Block a user