Commit 5e2dace1 authored by Daniel Veillard's avatar Daniel Veillard

Cleanup, cleanup .. removed libxml softlink for good cleanup to get 100%

Cleanup, cleanup ..
* configure.in Makefile.am: removed libxml softlink for good
* include/libxml/*.h *.c doc/Makefile.am: cleanup to get
  100% coverage by gtk-doc
Daniel
parent 8599e70d
Thu Jul 19 15:29:26 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* configure.in Makefile.am: removed libxml softlink for good
* include/libxml/*.h *.c doc/Makefile.am: cleanup to get
100% coverage by gtk-doc
Tue Jul 17 17:36:46 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr> Tue Jul 17 17:36:46 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xmlmemory.c include/libxml/xmlmemory.h: debugging on IA64, * xmlmemory.c include/libxml/xmlmemory.h: debugging on IA64,
......
...@@ -1785,6 +1785,9 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) { ...@@ -1785,6 +1785,9 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
* @URI: URI for the dtd, or NULL * @URI: URI for the dtd, or NULL
* @ExternalID: the external ID of the DTD, or NULL * @ExternalID: the external ID of the DTD, or NULL
* *
* Creates a new HTML document without a DTD node if @URI and @ExternalID
* are NULL
*
* Returns a new document, do not intialize the DTD if not provided * Returns a new document, do not intialize the DTD if not provided
*/ */
htmlDocPtr htmlDocPtr
...@@ -1827,6 +1830,8 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { ...@@ -1827,6 +1830,8 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) {
* @URI: URI for the dtd, or NULL * @URI: URI for the dtd, or NULL
* @ExternalID: the external ID of the DTD, or NULL * @ExternalID: the external ID of the DTD, or NULL
* *
* Creates a new HTML document
*
* Returns a new document * Returns a new document
*/ */
htmlDocPtr htmlDocPtr
......
...@@ -79,14 +79,6 @@ testURI_LDADD= $(LDADDS) ...@@ -79,14 +79,6 @@ testURI_LDADD= $(LDADDS)
check-local: tests check-local: tests
$(srcdir)/libxml:
-$(RM) -f $(srcdir)/libxml
ln -s $(srcdir)/. $(srcdir)/libxml
install-data: $(srcdir)/libxml
$(libxml2_la_SOURCES): $(srcdir)/libxml
testall : tests SVGtests SAXtests testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests
......
...@@ -473,7 +473,7 @@ xmlParseCatalog(const xmlChar *value, const char *file) { ...@@ -473,7 +473,7 @@ xmlParseCatalog(const xmlChar *value, const char *file) {
* * * *
************************************************************************/ ************************************************************************/
/* /**
* xmlLoadCatalog: * xmlLoadCatalog:
* @filename: a file path * @filename: a file path
* *
...@@ -548,7 +548,7 @@ xmlLoadCatalog(const char *filename) { ...@@ -548,7 +548,7 @@ xmlLoadCatalog(const char *filename) {
return(ret); return(ret);
} }
/* /**
* xmlLoadCatalogs: * xmlLoadCatalogs:
* @paths: a list of file path separated by ':' or spaces * @paths: a list of file path separated by ':' or spaces
* *
......
...@@ -441,24 +441,5 @@ AC_SUBST(HAVE_ISINF) ...@@ -441,24 +441,5 @@ AC_SUBST(HAVE_ISINF)
AC_SUBST(M_LIBS) AC_SUBST(M_LIBS)
AC_SUBST(RDL_LIBS) AC_SUBST(RDL_LIBS)
dnl
dnl cleanup any remaining symlinks if any for include/libxml, this
dnl is only needed for the people using CVS and transitionning
dnl
if test -d $srcdir/include/CVS
then
if test -L $srcdir/include/libxml
then
rm -rf $srcdir/include/libxml
echo The CVS repository changed a bit
echo 'please run "cvs update -d" and rerun the configuration script'
exit 1
fi
if test -e $srcdir/xmlversion.h
then
rm -f $srcdir/xmlversion.h
fi
fi
AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile include/libxml/xmlversion.h include/libxml/xmlwin32version.h xml2-config libxml-2.0.pc xml2Conf.sh) AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile include/libxml/xmlversion.h include/libxml/xmlwin32version.h xml2-config libxml-2.0.pc xml2Conf.sh)
This diff is collapsed.
...@@ -17,7 +17,7 @@ TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/html ...@@ -17,7 +17,7 @@ TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/html
# html_DATA = gnome-dev-info.html # html_DATA = gnome-dev-info.html
scan: scan:
gtkdoc-scan --module=libxml --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="acconfig.h config.h" gtkdoc-scan --module=libxml --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="acconfig.h config.h xmlwin32version.h win32config.h trio.h strio.h triop.h"
templates: scan templates: scan
gtkdoc-mktmpl --module=libxml gtkdoc-mktmpl --module=libxml
......
...@@ -362,7 +362,6 @@ xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) { ...@@ -362,7 +362,6 @@ xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) {
/** /**
* xmlUTF8Strsub: * xmlUTF8Strsub:
* @utf: a sequence of UTF-8 encoded bytes * @utf: a sequence of UTF-8 encoded bytes
*
* @start: relative pos of first char * @start: relative pos of first char
* @len: total number to copy * @len: total number to copy
* *
...@@ -1768,8 +1767,8 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) { ...@@ -1768,8 +1767,8 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) {
} }
/** /**
* xmlGetCharEncodingHandler: * xmlFindCharEncodingHandler:
* @enc: a string describing the char encoding. * @name: a string describing the char encoding.
* *
* Search in the registrered set the handler able to read/write that encoding. * Search in the registrered set the handler able to read/write that encoding.
* *
......
...@@ -304,7 +304,7 @@ xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name, ...@@ -304,7 +304,7 @@ xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name,
* *
* Find the userdata specified by the name. * Find the userdata specified by the name.
* *
* Returns the a pointer to the userdata * Returns the pointer to the userdata
*/ */
void * void *
xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) { xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) {
...@@ -319,7 +319,7 @@ xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) { ...@@ -319,7 +319,7 @@ xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) {
* *
* Find the userdata specified by the (name, name2) tuple. * Find the userdata specified by the (name, name2) tuple.
* *
* Returns the a pointer to the userdata * Returns the pointer to the userdata
*/ */
void * void *
xmlHashLookup2(xmlHashTablePtr table, const xmlChar *name, xmlHashLookup2(xmlHashTablePtr table, const xmlChar *name,
...@@ -470,7 +470,7 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, ...@@ -470,7 +470,7 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
} }
/** /**
* xmlHashLookup: * xmlHashLookup3:
* @table: the hash table * @table: the hash table
* @name: the name of the userdata * @name: the name of the userdata
* @name2: a second name of the userdata * @name2: a second name of the userdata
...@@ -615,6 +615,8 @@ xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f) { ...@@ -615,6 +615,8 @@ xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f) {
* xmlHashSize: * xmlHashSize:
* @table: the hash table * @table: the hash table
* *
* Query the number of element installed in the hash table.
*
* Returns the number of elements in the hash table or * Returns the number of elements in the hash table or
* -1 in case of error * -1 in case of error
*/ */
......
...@@ -54,7 +54,7 @@ void entityDecl (void *ctx, ...@@ -54,7 +54,7 @@ void entityDecl (void *ctx,
xmlChar *content); xmlChar *content);
void attributeDecl (void *ctx, void attributeDecl (void *ctx,
const xmlChar *elem, const xmlChar *elem,
const xmlChar *name, const xmlChar *fullname,
int type, int type,
int def, int def,
const xmlChar *defaultValue, const xmlChar *defaultValue,
......
...@@ -36,7 +36,7 @@ extern "C" { ...@@ -36,7 +36,7 @@ extern "C" {
#define XML_CATALOGS_NAMESPACE \ #define XML_CATALOGS_NAMESPACE \
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
int xmlLoadCatalog (const char *URL); int xmlLoadCatalog (const char *filename);
void xmlLoadCatalogs (const char *paths); void xmlLoadCatalogs (const char *paths);
void xmlCatalogCleanup (void); void xmlCatalogCleanup (void);
void xmlCatalogDump (FILE *out); void xmlCatalogDump (FILE *out);
......
...@@ -43,11 +43,9 @@ void xmlDebugDumpDocumentHead(FILE *output, ...@@ -43,11 +43,9 @@ void xmlDebugDumpDocumentHead(FILE *output,
void xmlDebugDumpDocument (FILE *output, void xmlDebugDumpDocument (FILE *output,
xmlDocPtr doc); xmlDocPtr doc);
void xmlDebugDumpDTD (FILE *output, void xmlDebugDumpDTD (FILE *output,
xmlDtdPtr doc); xmlDtdPtr dtd);
void xmlDebugDumpEntities (FILE *output, void xmlDebugDumpEntities (FILE *output,
xmlDocPtr doc); xmlDocPtr doc);
void xmlLsOneNode (FILE *output,
xmlNodePtr node);
/**************************************************************** /****************************************************************
* * * *
......
...@@ -104,19 +104,10 @@ void * xmlHashLookup3 (xmlHashTablePtr table, ...@@ -104,19 +104,10 @@ void * xmlHashLookup3 (xmlHashTablePtr table,
*/ */
xmlHashTablePtr xmlHashCopy (xmlHashTablePtr table, xmlHashTablePtr xmlHashCopy (xmlHashTablePtr table,
xmlHashCopier f); xmlHashCopier f);
int xmlHashSize (xmlHashTablePtr); int xmlHashSize (xmlHashTablePtr table);
void xmlHashScan (xmlHashTablePtr table, void xmlHashScan (xmlHashTablePtr table,
xmlHashScanner f, xmlHashScanner f,
void *data); void *data);
void xmlHashScan1 (xmlHashTablePtr table,
const xmlChar *name,
xmlHashScanner f,
void *data);
void xmlHashScan2 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
xmlHashScanner f,
void *data);
void xmlHashScan3 (xmlHashTablePtr table, void xmlHashScan3 (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
......
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
extern "C" { extern "C" {
#endif #endif
/* /**
* Constants. * XML_DEFAULT_VERSION:
*
* The default version of XML used: 1.0
*/ */
#define XML_DEFAULT_VERSION "1.0" #define XML_DEFAULT_VERSION "1.0"
...@@ -36,6 +38,7 @@ extern "C" { ...@@ -36,6 +38,7 @@ extern "C" {
*/ */
typedef void (* xmlParserInputDeallocate)(xmlChar *); typedef void (* xmlParserInputDeallocate)(xmlChar *);
typedef struct _xmlParserInput xmlParserInput; typedef struct _xmlParserInput xmlParserInput;
typedef xmlParserInput *xmlParserInputPtr; typedef xmlParserInput *xmlParserInputPtr;
struct _xmlParserInput { struct _xmlParserInput {
...@@ -344,6 +347,11 @@ LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler; ...@@ -344,6 +347,11 @@ LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
*/ */
#ifdef VMS #ifdef VMS
/**
* xmlSubstituteEntitiesDefaultValue:
*
* global variable controlling the entity substitution default behaviour
*/
LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultVal; LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultVal;
#define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal #define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal
#else #else
......
...@@ -326,12 +326,29 @@ void xmlParseMisc (xmlParserCtxtPtr ctxt); ...@@ -326,12 +326,29 @@ void xmlParseMisc (xmlParserCtxtPtr ctxt);
void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, void xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID); const xmlChar *SystemID);
/* /**
* Entities substitution * XML_SUBSTITUTE_NONE:
*
* If no entities need to be substitued
*/ */
#define XML_SUBSTITUTE_NONE 0 #define XML_SUBSTITUTE_NONE 0
/**
* XML_SUBSTITUTE_REF:
*
* Whether general entities need to be substitued
*/
#define XML_SUBSTITUTE_REF 1 #define XML_SUBSTITUTE_REF 1
/**
* XML_SUBSTITUTE_PEREF:
*
* Whether parameter entities need to be substitued
*/
#define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_PEREF 2
/**
* XML_SUBSTITUTE_BOTH:
*
* Both general and parameter entities need to be substitued
*/
#define XML_SUBSTITUTE_BOTH 3 #define XML_SUBSTITUTE_BOTH 3
xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt, xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt,
......
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
extern "C" { extern "C" {
#endif #endif
/**
* XML_XML_NAMESPACE:
*
* This is the namespace for the special xml: prefix predefined in the
* XML Namespace specification
*/
#define XML_XML_NAMESPACE \ #define XML_XML_NAMESPACE \
(const xmlChar *) "http://www.w3.org/XML/1998/namespace" (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
...@@ -249,6 +255,11 @@ struct _xmlElement { ...@@ -249,6 +255,11 @@ struct _xmlElement {
}; };
/**
* XML_LOCAL_NAMESPACE:
*
* A namespace declaration node
*/
#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
typedef xmlElementType xmlNsType; typedef xmlElementType xmlNsType;
...@@ -259,7 +270,6 @@ typedef xmlElementType xmlNsType; ...@@ -259,7 +270,6 @@ typedef xmlElementType xmlNsType;
* Note that prefix == NULL is valid, it defines the default namespace * Note that prefix == NULL is valid, it defines the default namespace
* within the subtree (until overriden). * within the subtree (until overriden).
* *
* XML_GLOBAL_NAMESPACE is now deprecated for good
* xmlNsType is unified with xmlElementType * xmlNsType is unified with xmlElementType
*/ */
...@@ -405,8 +415,21 @@ struct _xmlNode { ...@@ -405,8 +415,21 @@ struct _xmlNode {
xmlNs *nsDef; /* namespace definitions on this node */ xmlNs *nsDef; /* namespace definitions on this node */
}; };
#define XML_GET_CONTENT(n) ((n)->type == XML_ELEMENT_PTR ? NULL : (n)->content) /**
#define XML_GET_LINE(n) ((n)->type == XML_ELEMENT_PTR ? (int) (n)->content : 0) * XML_GET_CONTENT:
*
* macro to extract the content pointer of a node
*/
#define XML_GET_CONTENT(n) \
((n)->type == XML_ELEMENT_PTR ? NULL : (n)->content)
/**
* XML_GET_LINE:
*
* macro to extract the line number of an element node
*/
#define XML_GET_LINE(n) \
((n)->type == XML_ELEMENT_PTR ? (int) (n)->content : 0)
/** /**
* xmlDoc: * xmlDoc:
...@@ -499,7 +522,6 @@ int xmlBufferGrow (xmlBufferPtr buf, ...@@ -499,7 +522,6 @@ int xmlBufferGrow (xmlBufferPtr buf,
unsigned int len); unsigned int len);
void xmlBufferEmpty (xmlBufferPtr buf); void xmlBufferEmpty (xmlBufferPtr buf);
const xmlChar* xmlBufferContent (const xmlBufferPtr buf); const xmlChar* xmlBufferContent (const xmlBufferPtr buf);
int xmlBufferUse (const xmlBufferPtr buf);
void xmlBufferSetAllocationScheme(xmlBufferPtr buf, void xmlBufferSetAllocationScheme(xmlBufferPtr buf,
xmlBufferAllocationScheme scheme); xmlBufferAllocationScheme scheme);
int xmlBufferLength (const xmlBufferPtr buf); int xmlBufferLength (const xmlBufferPtr buf);
...@@ -709,7 +731,6 @@ void xmlNodeSetBase (xmlNodePtr cur, ...@@ -709,7 +731,6 @@ void xmlNodeSetBase (xmlNodePtr cur,
* Removing content. * Removing content.
*/ */
int xmlRemoveProp (xmlAttrPtr attr); int xmlRemoveProp (xmlAttrPtr attr);
int xmlRemoveNode (xmlNodePtr node); /* TODO */
int xmlUnsetProp (xmlNodePtr node, int xmlUnsetProp (xmlNodePtr node,
const xmlChar *name); const xmlChar *name);
int xmlUnsetNsProp (xmlNodePtr node, int xmlUnsetNsProp (xmlNodePtr node,
......
...@@ -45,7 +45,7 @@ struct _xmlURI { ...@@ -45,7 +45,7 @@ struct _xmlURI {
xmlURIPtr xmlCreateURI (void); xmlURIPtr xmlCreateURI (void);
xmlChar * xmlBuildURI (const xmlChar *URI, xmlChar * xmlBuildURI (const xmlChar *URI,
const xmlChar *base); const xmlChar *base);
xmlURIPtr xmlParseURI (const char *URI); xmlURIPtr xmlParseURI (const char *str);
int xmlParseURIReference (xmlURIPtr uri, int xmlParseURIReference (xmlURIPtr uri,
const char *str); const char *str);
xmlChar * xmlSaveUri (xmlURIPtr uri); xmlChar * xmlSaveUri (xmlURIPtr uri);
......
...@@ -160,7 +160,6 @@ xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, ...@@ -160,7 +160,6 @@ xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const xmlChar *value, const xmlChar *value,
xmlAttrPtr attr); xmlAttrPtr attr);
xmlIDTablePtr xmlCopyIDTable (xmlIDTablePtr table);
void xmlFreeIDTable (xmlIDTablePtr table); void xmlFreeIDTable (xmlIDTablePtr table);
xmlAttrPtr xmlGetID (xmlDocPtr doc, xmlAttrPtr xmlGetID (xmlDocPtr doc,
const xmlChar *ID); const xmlChar *ID);
...@@ -174,7 +173,6 @@ xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt, ...@@ -174,7 +173,6 @@ xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const xmlChar *value, const xmlChar *value,
xmlAttrPtr attr); xmlAttrPtr attr);
xmlRefTablePtr xmlCopyRefTable (xmlRefTablePtr table);
void xmlFreeRefTable (xmlRefTablePtr table); void xmlFreeRefTable (xmlRefTablePtr table);
int xmlIsRef (xmlDocPtr doc, int xmlIsRef (xmlDocPtr doc,
xmlNodePtr elem, xmlNodePtr elem,
......
...@@ -60,9 +60,7 @@ typedef enum { ...@@ -60,9 +60,7 @@ typedef enum {
* This is the prototype for the link detection routine * This is the prototype for the link detection routine
* It calls the default link detection callbacks upon link detection. * It calls the default link detection callbacks upon link detection.
*/ */
typedef void typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
(*xlinkNodeDetectFunc) (void *ctx,
xmlNodePtr node);
/** /**
* The link detection module interract with the upper layers using * The link detection module interract with the upper layers using
......
...@@ -35,11 +35,16 @@ ...@@ -35,11 +35,16 @@
/** /**
* DEBUG_MEMORY_LOCATION: * DEBUG_MEMORY_LOCATION:
* *
* should be activated
* DEBUG_MEMORY_LOCATION should be activated only when debugging * DEBUG_MEMORY_LOCATION should be activated only when debugging
* libxml i.e. if libxml has been configured with --with-debug-mem too * libxml i.e. if libxml has been configured with --with-debug-mem too
*/ */
#ifdef DEBUG_MEMORY_LOCATION #ifdef DEBUG_MEMORY_LOCATION
/**
* MEM_LIST:
*
* keep track of all allocated blocks for error reporting
*/
#define MEM_LIST /* keep a list of all the allocated memory blocks */ #define MEM_LIST /* keep a list of all the allocated memory blocks */
#endif #endif
...@@ -90,9 +95,34 @@ void xmlMemoryDump (void); ...@@ -90,9 +95,34 @@ void xmlMemoryDump (void);
int xmlInitMemory (void); int xmlInitMemory (void);
#ifdef DEBUG_MEMORY_LOCATION #ifdef DEBUG_MEMORY_LOCATION
#define xmlMalloc(x) xmlMallocLoc((x), __FILE__, __LINE__) /**
#define xmlRealloc(p, x) xmlReallocLoc((p), (x), __FILE__, __LINE__) * xmlMalloc:
#define xmlMemStrdup(x) xmlMemStrdupLoc((x), __FILE__, __LINE__) * @size: number of bytes to allocate
*
* Wrapper for the malloc() function used in the XML library
*
* Returns the pointer to the allocated area or NULL in case of error
*/
#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
/**
* xmlRealloc:
* @ptr: pointer to the existing allocated area
* @size: number of bytes to allocate
*
* Wrapper for the realloc() function used in the XML library
*
* Returns the pointer to the allocated area or NULL in case of error
*/
#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
/**
* xmlMemStrdup:
* @str: pointer to the existing string
*
* Wrapper for the strdup() function, xmlStrdup() is usually preferred
*
* Returns the pointer to the allocated area or NULL in case of error
*/
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
void * xmlMallocLoc(size_t size, const char *file, int line); void * xmlMallocLoc(size_t size, const char *file, int line);
void * xmlReallocLoc(void *ptr,size_t size, const char *file, int line); void * xmlReallocLoc(void *ptr,size_t size, const char *file, int line);
......
...@@ -20,9 +20,34 @@ extern "C" { ...@@ -20,9 +20,34 @@ extern "C" {
#ifndef LIBXML2_COMPILING_MSCCDEF #ifndef LIBXML2_COMPILING_MSCCDEF
extern void xmlCheckVersion(int version); extern void xmlCheckVersion(int version);
#endif /* LIBXML2_COMPILING_MSCCDEF */ #endif /* LIBXML2_COMPILING_MSCCDEF */
/**
* LIBXML_DOTTED_VERSION:
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "@VERSION@" #define LIBXML_DOTTED_VERSION "@VERSION@"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 1002003
*/
#define LIBXML_VERSION @LIBXML_VERSION_NUMBER@ #define LIBXML_VERSION @LIBXML_VERSION_NUMBER@
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "1002003"
*/
#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@" #define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
/**
* LIBXML_TEST_VERSION:
*
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@); #define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
/** /**
...@@ -32,8 +57,6 @@ extern void xmlCheckVersion(int version); ...@@ -32,8 +57,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_TRIO@ #if @WITH_TRIO@
#define WITH_TRIO #define WITH_TRIO
#else
#define WITHOUT_TRIO
#endif #endif
/** /**
...@@ -43,8 +66,6 @@ extern void xmlCheckVersion(int version); ...@@ -43,8 +66,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_FTP@ #if @WITH_FTP@
#define LIBXML_FTP_ENABLED #define LIBXML_FTP_ENABLED
#else
#define LIBXML_FTP_DISABLED
#endif #endif
/** /**
...@@ -54,8 +75,6 @@ extern void xmlCheckVersion(int version); ...@@ -54,8 +75,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_HTTP@ #if @WITH_HTTP@
#define LIBXML_HTTP_ENABLED #define LIBXML_HTTP_ENABLED
#else
#define LIBXML_HTTP_DISABLED
#endif #endif
/** /**
...@@ -65,8 +84,6 @@ extern void xmlCheckVersion(int version); ...@@ -65,8 +84,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_HTML@ #if @WITH_HTML@
#define LIBXML_HTML_ENABLED #define LIBXML_HTML_ENABLED
#else
#define LIBXML_HTML_DISABLED
#endif #endif
/** /**
...@@ -76,8 +93,6 @@ extern void xmlCheckVersion(int version); ...@@ -76,8 +93,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_CATALOG@ #if @WITH_CATALOG@
#define LIBXML_CATALOG_ENABLED #define LIBXML_CATALOG_ENABLED
#else
#define LIBXML_CATALOG_DISABLED
#endif #endif
/** /**
...@@ -87,8 +102,6 @@ extern void xmlCheckVersion(int version); ...@@ -87,8 +102,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_DOCB@ #if @WITH_DOCB@
#define LIBXML_DOCB_ENABLED #define LIBXML_DOCB_ENABLED
#else
#define LIBXML_DOCB_DISABLED
#endif #endif
/** /**
...@@ -98,8 +111,6 @@ extern void xmlCheckVersion(int version); ...@@ -98,8 +111,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_XPATH@ #if @WITH_XPATH@
#define LIBXML_XPATH_ENABLED #define LIBXML_XPATH_ENABLED
#else
#define LIBXML_XPATH_DISABLED
#endif #endif
/** /**
...@@ -109,8 +120,6 @@ extern void xmlCheckVersion(int version); ...@@ -109,8 +120,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_XPTR@ #if @WITH_XPTR@
#define LIBXML_XPTR_ENABLED #define LIBXML_XPTR_ENABLED
#else
#define LIBXML_XPTR_DISABLED
#endif #endif
/** /**
...@@ -120,8 +129,6 @@ extern void xmlCheckVersion(int version); ...@@ -120,8 +129,6 @@ extern void xmlCheckVersion(int version);
*/ */
#if @WITH_XINCLUDE@ #if @WITH_XINCLUDE@
#define LIBXML_XINCLUDE_ENABLED #define LIBXML_XINCLUDE_ENABLED
#else
#define LIBXML_XINCLUDE_DISABLED
#endif #endif
/** /**
...@@ -132,8 +139,6 @@ extern void xmlCheckVersion(int version); ...@@ -132,8 +139,6 @@ extern void xmlCheckVersion(int version);
#if !defined(WIN32) || defined(__CYGWIN__)