Skip to content

Commit

Permalink
Adding a configure option to remove tree manipulation code which is not
Browse files Browse the repository at this point in the history
* configure.in entities.c tree.c valid.c xmllint.c
  include/libxml/tree.h include/libxml/xmlversion.h.in:
  Adding a configure option to remove tree manipulation
  code which is not strictly needed by the parser.
Daniel
  • Loading branch information
Daniel Veillard committed Sep 29, 2003
1 parent 89f7f27 commit 652327a
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 24 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
Mon Sep 29 19:58:26 CEST 2003 Daniel Veillard <daniel@veillard.com>

* configure.in entities.c tree.c valid.c xmllint.c
include/libxml/tree.h include/libxml/xmlversion.h.in:
Adding a configure option to remove tree manipulation
code which is not strictly needed by the parser.

Mon Sep 29 15:23:41 CEST 2003 Daniel Veillard <daniel@veillard.com>

* nanoftp.c nanohttp.c: last finishing touch to the BeOS
Expand Down
18 changes: 16 additions & 2 deletions configure.in
Expand Up @@ -528,7 +528,7 @@ if test "$with_history" = "yes" ; then
fi

AC_ARG_WITH(output,
[ --with-output add the serialization support (on)])
[ --with-output add the serialization support (on)])
if test "$with_minimum" = "yes" -a "$with_output" = ""
then
with_output=no
Expand All @@ -541,6 +541,20 @@ else
fi
AC_SUBST(WITH_OUTPUT)

AC_ARG_WITH(tree,
[ --with-tree add the DOM like tree manipulation APIs (on)])
if test "$with_minimum" = "yes" -a "$with_tree" = ""
then
with_tree=no
fi
if test "$with_tree" = "no" ; then
echo Disabling DOM like tree manipulation APIs
WITH_TREE=0
else
WITH_TREE=1
fi
AC_SUBST(WITH_TREE)

AC_ARG_WITH(ftp,
[ --with-ftp add the FTP support (on)])
if test "$with_minimum" = "yes" -a "$with_ftp" = ""
Expand Down Expand Up @@ -596,7 +610,7 @@ AC_SUBST(HTML_OBJ)
AC_SUBST(TEST_HTML)

AC_ARG_WITH(legacy,
[ --with-legacy add deprecated APIs for compatibility (on)])
[ --with-legacy add deprecated APIs for compatibility (on)])
if test "$with_minimum" = "yes" -a "$with_legacy" = ""
then
with_legacy=no
Expand Down
2 changes: 2 additions & 0 deletions entities.c
Expand Up @@ -704,6 +704,7 @@ xmlFreeEntitiesTable(xmlEntitiesTablePtr table) {
xmlHashFree(table, (xmlHashDeallocator) xmlFreeEntityWrapper);
}

#ifdef LIBXML_TREE_ENABLED
/**
* xmlCopyEntity:
* @ent: An entity
Expand Down Expand Up @@ -753,6 +754,7 @@ xmlEntitiesTablePtr
xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
return(xmlHashCopy(table, (xmlHashCopier) xmlCopyEntity));
}
#endif /* LIBXML_TREE_ENABLED */

#ifdef LIBXML_OUTPUT_ENABLED
/**
Expand Down
38 changes: 31 additions & 7 deletions include/libxml/tree.h
Expand Up @@ -677,11 +677,13 @@ XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlCopyPropList (xmlNodePtr target,
xmlAttrPtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlDtdPtr XMLCALL
xmlCopyDtd (xmlDtdPtr dtd);
XMLPUBFUN xmlDocPtr XMLCALL
xmlCopyDoc (xmlDocPtr doc,
int recursive);
#endif /* LIBXML_TREE_ENABLED */

/*
* Creating new nodes.
Expand Down Expand Up @@ -756,16 +758,20 @@ XMLPUBFUN xmlNodePtr XMLCALL
int recursive);
XMLPUBFUN xmlNodePtr XMLCALL
xmlCopyNodeList (const xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocFragment (xmlDocPtr doc);
#endif /* LIBXML_TREE_ENABLED */

/*
* Navigating.
*/
XMLPUBFUN long XMLCALL
xmlGetLineNo (xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlChar * XMLCALL
xmlGetNodePath (xmlNodePtr node);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocGetRootElement (xmlDocPtr doc);
XMLPUBFUN xmlNodePtr XMLCALL
Expand All @@ -775,6 +781,7 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlIsBlankNode (xmlNodePtr node);

#ifdef LIBXML_TREE_ENABLED
/*
* Changing the structure.
*/
Expand All @@ -784,20 +791,23 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetName (xmlNodePtr cur,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddChild (xmlNodePtr parent,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddChildList (xmlNodePtr parent,
xmlNodePtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNodePtr XMLCALL
xmlReplaceNode (xmlNodePtr old,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddSibling (xmlNodePtr cur,
xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddPrevSibling (xmlNodePtr cur,
xmlAddSibling (xmlNodePtr cur,
xmlNodePtr elem);
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddNextSibling (xmlNodePtr cur,
Expand All @@ -821,7 +831,6 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetListDoc (xmlNodePtr list,
xmlDocPtr doc);

/*
* Namespaces.
*/
Expand All @@ -833,9 +842,12 @@ XMLPUBFUN xmlNsPtr XMLCALL
xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *href);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNsPtr * XMLCALL
xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node);
#endif /* LIBXML_TREE_ENABLED */

XMLPUBFUN void XMLCALL
xmlSetNs (xmlNodePtr node,
xmlNsPtr ns);
Expand All @@ -847,15 +859,17 @@ XMLPUBFUN xmlNsPtr XMLCALL
/*
* Changing the content.
*/
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
xmlGetProp (xmlNodePtr node,
xmlGetNoNsProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlChar * XMLCALL
xmlGetNoNsProp (xmlNodePtr node,
xmlGetProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlHasProp (xmlNodePtr node,
Expand All @@ -864,11 +878,13 @@ XMLPUBFUN xmlAttrPtr XMLCALL
xmlHasNsProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *nameSpace);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
xmlGetNsProp (xmlNodePtr node,
const xmlChar *name,
Expand All @@ -884,17 +900,21 @@ XMLPUBFUN xmlChar * XMLCALL
xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlChar * XMLCALL
xmlNodeListGetRawString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlNodeSetContent (xmlNodePtr cur,
const xmlChar *content);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
xmlNodeSetContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlNodeAddContent (xmlNodePtr cur,
const xmlChar *content);
Expand All @@ -906,17 +926,20 @@ XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetContent (xmlNodePtr cur);
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetLang (xmlNodePtr cur);
XMLPUBFUN int XMLCALL
xmlNodeGetSpacePreserve (xmlNodePtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
xmlNodeSetLang (xmlNodePtr cur,
const xmlChar *lang);
XMLPUBFUN int XMLCALL
xmlNodeGetSpacePreserve (xmlNodePtr cur);
XMLPUBFUN void XMLCALL
xmlNodeSetSpacePreserve (xmlNodePtr cur,
int val);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetBase (xmlDocPtr doc,
xmlNodePtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
xmlNodeSetBase (xmlNodePtr cur,
const xmlChar *uri);
Expand All @@ -933,6 +956,7 @@ XMLPUBFUN int XMLCALL
xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */

/*
* Internal, don't use.
Expand Down
9 changes: 9 additions & 0 deletions include/libxml/xmlversion.h.in
Expand Up @@ -83,6 +83,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#endif
#endif

/**
* LIBXML_TREE_ENABLED:
*
* Whether the DOM like tree manipulation API support is configured in
*/
#if @WITH_TREE@
#define LIBXML_TREE_ENABLED
#endif

/**
* LIBXML_OUTPUT_ENABLED:
*
Expand Down

0 comments on commit 652327a

Please sign in to comment.