Commit 6b6d6809 authored by Daniel Veillard's avatar Daniel Veillard

fixing compilations when disabling parts of the library at configure time.

* runsuite.c runtest.c tree.c: fixing compilations when
  disabling parts of the library at configure time.
Daniel
parent 304e78c6
Sun Jul 3 22:59:28 CEST 2005 Daniel Veillard <daniel@veillard.com>
* runsuite.c runtest.c tree.c: fixing compilations when
disabling parts of the library at configure time.
Sun Jul 3 18:17:58 CEST 2005 Daniel Veillard <daniel@veillard.com>
* parserInternals.c: fix bug raised by zamez on IRC
......
......@@ -743,7 +743,7 @@ done:
static int
xstcTestInstance(int verbose, xmlNodePtr cur, xmlSchemaPtr schemas,
const xmlChar *spath, const xmlChar *base) {
const xmlChar *spath, const char *base) {
xmlChar *href = NULL;
xmlChar *path = NULL;
xmlChar *validity = NULL;
......@@ -952,7 +952,7 @@ xstcMetadata(int verbose, const char *metadata, const char *base) {
xmlNodePtr cur;
xmlChar *contributor;
xmlChar *name;
int ret;
int ret = 0;
doc = xmlReadFile(metadata, NULL, XML_PARSE_NOENT);
if (doc == NULL) {
......
......@@ -20,6 +20,8 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/uri.h>
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef LIBXML_READER_ENABLED
#include <libxml/xmlreader.h>
#endif
......@@ -1388,6 +1390,7 @@ xmlSAXHandler debugSAX2HandlerStruct = {
xmlSAXHandlerPtr debugSAX2Handler = &debugSAX2HandlerStruct;
#ifdef LIBXML_HTML_ENABLED
/**
* htmlstartElementDebug:
* @ctxt: An XML parser context
......@@ -1501,6 +1504,9 @@ xmlSAXHandler debugHTMLSAXHandlerStruct = {
};
xmlSAXHandlerPtr debugHTMLSAXHandler = &debugHTMLSAXHandlerStruct;
#endif /* LIBXML_HTML_ENABLED */
#ifdef LIBXML_SAX1_ENABLED
/**
* saxParseTest:
* @filename: the file to parse
......@@ -1579,6 +1585,7 @@ saxParseTest(const char *filename, const char *result,
return(ret);
}
#endif
/************************************************************************
* *
......@@ -1609,7 +1616,11 @@ oldParseTest(const char *filename, const char *result,
/*
* base of the test, parse with the old API
*/
#ifdef LIBXML_SAX1_ENABLED
doc = xmlParseFile(filename);
#else
doc = xmlReadFile(filename, NULL, 0);
#endif
if (doc == NULL)
return(1);
temp = resultFilename(filename, "", ".res");
......@@ -1626,7 +1637,11 @@ oldParseTest(const char *filename, const char *result,
/*
* Parse the saved result to make sure the round trip is okay
*/
#ifdef LIBXML_SAX1_ENABLED
doc = xmlParseFile(temp);
#else
doc = xmlReadFile(temp, NULL, 0);
#endif
if (doc == NULL)
return(1);
xmlSaveFile(temp, doc);
......@@ -3817,12 +3832,14 @@ testDesc testDescriptions[] = {
walkerParseTest, "./test/*", "result/", ".rdr", NULL,
0 },
#endif
#ifdef LIBXML_SAX1_ENABLED
{ "SAX1 callbacks regression tests" ,
saxParseTest, "./test/*", "result/", ".sax", NULL,
XML_PARSE_SAX1 },
{ "SAX2 callbacks regression tests" ,
saxParseTest, "./test/*", "result/", ".sax2", NULL,
0 },
#endif
#ifdef LIBXML_PUSH_ENABLED
{ "XML push regression tests" ,
pushParseTest, "./test/*", "result/", "", NULL,
......@@ -3837,10 +3854,12 @@ testDesc testDescriptions[] = {
pushParseTest, "./test/HTML/*", "result/HTML/", "", ".err",
XML_PARSE_HTML },
#endif
#ifdef LIBXML_SAX1_ENABLED
{ "HTML SAX regression tests" ,
saxParseTest, "./test/HTML/*", "result/HTML/", ".sax", NULL,
XML_PARSE_HTML },
#endif
#endif
#ifdef LIBXML_VALID_ENABLED
{ "Valid documents regression tests" ,
errParseTest, "./test/VCM/*", NULL, NULL, NULL,
......@@ -4061,3 +4080,11 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
return(ret);
}
#else /* ! LIBXML_OUTPUT_ENABLED */
int
main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
fprintf(stderr, "runtest requires output to be enabled in libxml2\n");
return(1);
}
#endif
......@@ -333,7 +333,7 @@ xmlSplitQName3(const xmlChar *name, int *len) {
#define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l)
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED)
/**
* xmlValidateNCName:
* @value: the value to check
......
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