mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
Okay this is scary but it is just adding a configure option to disable
* HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h include/libxml/catalog.h include/libxml/debugXML.h include/libxml/entities.h include/libxml/nanohttp.h include/libxml/relaxng.h include/libxml/tree.h include/libxml/valid.h include/libxml/xmlIO.h include/libxml/xmlschemas.h include/libxml/xmlversion.h.in include/libxml/xpathInternals.h python/libxml.c: Okay this is scary but it is just adding a configure option to disable output, this touches most of the files. Daniel
This commit is contained in:
117
tree.c
117
tree.c
@ -6789,6 +6789,7 @@ xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/************************************************************************
|
||||
* *
|
||||
* Dumping XML tree content to a simple buffer *
|
||||
@ -7567,6 +7568,7 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
/************************************************************************
|
||||
@ -7615,6 +7617,7 @@ xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/**
|
||||
* xhtmlIsEmpty:
|
||||
* @node: the node
|
||||
@ -8059,8 +8062,10 @@ xhtmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
xmlOutputBufferWriteString(buf, (const char *)cur->name);
|
||||
xmlOutputBufferWriteString(buf, ">");
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/************************************************************************
|
||||
* *
|
||||
* Saving functions front-ends *
|
||||
@ -8210,61 +8215,6 @@ xmlDocDumpMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
|
||||
txt_encoding, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlGetDocCompressMode:
|
||||
* @doc: the document
|
||||
*
|
||||
* get the compression ratio for a document, ZLIB based
|
||||
* Returns 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
int
|
||||
xmlGetDocCompressMode (xmlDocPtr doc) {
|
||||
if (doc == NULL) return(-1);
|
||||
return(doc->compression);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSetDocCompressMode:
|
||||
* @doc: the document
|
||||
* @mode: the compression ratio
|
||||
*
|
||||
* set the compression ratio for a document, ZLIB based
|
||||
* Correct values: 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
void
|
||||
xmlSetDocCompressMode (xmlDocPtr doc, int mode) {
|
||||
if (doc == NULL) return;
|
||||
if (mode < 0) doc->compression = 0;
|
||||
else if (mode > 9) doc->compression = 9;
|
||||
else doc->compression = mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlGetCompressMode:
|
||||
*
|
||||
* get the default compression mode used, ZLIB based.
|
||||
* Returns 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
int
|
||||
xmlGetCompressMode(void)
|
||||
{
|
||||
return (xmlCompressMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSetCompressMode:
|
||||
* @mode: the compression ratio
|
||||
*
|
||||
* set the default compression mode used, ZLIB based
|
||||
* Correct values: 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
void
|
||||
xmlSetCompressMode(int mode) {
|
||||
if (mode < 0) xmlCompressMode = 0;
|
||||
else if (mode > 9) xmlCompressMode = 9;
|
||||
else xmlCompressMode = mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlDocFormatDump:
|
||||
* @f: the FILE*
|
||||
@ -8463,3 +8413,60 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) {
|
||||
return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
|
||||
}
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/**
|
||||
* xmlGetDocCompressMode:
|
||||
* @doc: the document
|
||||
*
|
||||
* get the compression ratio for a document, ZLIB based
|
||||
* Returns 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
int
|
||||
xmlGetDocCompressMode (xmlDocPtr doc) {
|
||||
if (doc == NULL) return(-1);
|
||||
return(doc->compression);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSetDocCompressMode:
|
||||
* @doc: the document
|
||||
* @mode: the compression ratio
|
||||
*
|
||||
* set the compression ratio for a document, ZLIB based
|
||||
* Correct values: 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
void
|
||||
xmlSetDocCompressMode (xmlDocPtr doc, int mode) {
|
||||
if (doc == NULL) return;
|
||||
if (mode < 0) doc->compression = 0;
|
||||
else if (mode > 9) doc->compression = 9;
|
||||
else doc->compression = mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlGetCompressMode:
|
||||
*
|
||||
* get the default compression mode used, ZLIB based.
|
||||
* Returns 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
int
|
||||
xmlGetCompressMode(void)
|
||||
{
|
||||
return (xmlCompressMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSetCompressMode:
|
||||
* @mode: the compression ratio
|
||||
*
|
||||
* set the default compression mode used, ZLIB based
|
||||
* Correct values: 0 (uncompressed) to 9 (max compression)
|
||||
*/
|
||||
void
|
||||
xmlSetCompressMode(int mode) {
|
||||
if (mode < 0) xmlCompressMode = 0;
|
||||
else if (mode > 9) xmlCompressMode = 9;
|
||||
else xmlCompressMode = mode;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user