(libxml2) Remove LIBXML_OUTPUT_ENABLED

This commit is contained in:
twinaphex 2012-11-17 23:40:15 +01:00
parent 9871a42a3d
commit 08d34130ef
19 changed files with 1 additions and 7469 deletions

View File

@ -27,8 +27,7 @@ LOCAL_MODULE := retroarch-activity
RARCH_PATH := ../../..
LIBXML_PATH := ../libxml2
LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/c14n.c \
$(LIBXML_PATH)/chvalid.c \
LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/chvalid.c \
$(LIBXML_PATH)/dict.c \
$(LIBXML_PATH)/encoding.c \
$(LIBXML_PATH)/entities.c \

File diff suppressed because it is too large Load Diff

View File

@ -276,18 +276,6 @@ extern __typeof (xmlAddSibling) xmlAddSibling__internal_alias __attribute((visib
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlAllocOutputBuffer
extern __typeof (xmlAllocOutputBuffer) xmlAllocOutputBuffer __attribute((alias("xmlAllocOutputBuffer__internal_alias")));
#else
#ifndef xmlAllocOutputBuffer
extern __typeof (xmlAllocOutputBuffer) xmlAllocOutputBuffer__internal_alias __attribute((visibility("hidden")));
#define xmlAllocOutputBuffer xmlAllocOutputBuffer__internal_alias
#endif
#endif
#endif
#ifdef bottom_xmlIO
#undef xmlAllocParserInputBuffer
extern __typeof (xmlAllocParserInputBuffer) xmlAllocParserInputBuffer __attribute((alias("xmlAllocParserInputBuffer__internal_alias")));
@ -298,18 +286,6 @@ extern __typeof (xmlAllocParserInputBuffer) xmlAllocParserInputBuffer__internal_
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlAttrSerializeTxtContent
extern __typeof (xmlAttrSerializeTxtContent) xmlAttrSerializeTxtContent __attribute((alias("xmlAttrSerializeTxtContent__internal_alias")));
#else
#ifndef xmlAttrSerializeTxtContent
extern __typeof (xmlAttrSerializeTxtContent) xmlAttrSerializeTxtContent__internal_alias __attribute((visibility("hidden")));
#define xmlAttrSerializeTxtContent xmlAttrSerializeTxtContent__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
#ifdef bottom_xmlregexp
#undef xmlAutomataCompile
@ -744,54 +720,6 @@ extern __typeof (xmlByteConsumed) xmlByteConsumed__internal_alias __attribute((v
#endif
#endif
#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_c14n
#undef xmlC14NDocDumpMemory
extern __typeof (xmlC14NDocDumpMemory) xmlC14NDocDumpMemory __attribute((alias("xmlC14NDocDumpMemory__internal_alias")));
#else
#ifndef xmlC14NDocDumpMemory
extern __typeof (xmlC14NDocDumpMemory) xmlC14NDocDumpMemory__internal_alias __attribute((visibility("hidden")));
#define xmlC14NDocDumpMemory xmlC14NDocDumpMemory__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_c14n
#undef xmlC14NDocSave
extern __typeof (xmlC14NDocSave) xmlC14NDocSave __attribute((alias("xmlC14NDocSave__internal_alias")));
#else
#ifndef xmlC14NDocSave
extern __typeof (xmlC14NDocSave) xmlC14NDocSave__internal_alias __attribute((visibility("hidden")));
#define xmlC14NDocSave xmlC14NDocSave__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_c14n
#undef xmlC14NDocSaveTo
extern __typeof (xmlC14NDocSaveTo) xmlC14NDocSaveTo __attribute((alias("xmlC14NDocSaveTo__internal_alias")));
#else
#ifndef xmlC14NDocSaveTo
extern __typeof (xmlC14NDocSaveTo) xmlC14NDocSaveTo__internal_alias __attribute((visibility("hidden")));
#define xmlC14NDocSaveTo xmlC14NDocSaveTo__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_c14n
#undef xmlC14NExecute
extern __typeof (xmlC14NExecute) xmlC14NExecute __attribute((alias("xmlC14NExecute__internal_alias")));
#else
#ifndef xmlC14NExecute
extern __typeof (xmlC14NExecute) xmlC14NExecute__internal_alias __attribute((visibility("hidden")));
#define xmlC14NExecute xmlC14NExecute__internal_alias
#endif
#endif
#endif
#ifdef bottom_uri
#undef xmlCanonicPath
extern __typeof (xmlCanonicPath) xmlCanonicPath __attribute((alias("xmlCanonicPath__internal_alias")));
@ -985,18 +913,6 @@ extern __typeof (xmlCleanupMemory) xmlCleanupMemory__internal_alias __attribute(
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlCleanupOutputCallbacks
extern __typeof (xmlCleanupOutputCallbacks) xmlCleanupOutputCallbacks __attribute((alias("xmlCleanupOutputCallbacks__internal_alias")));
#else
#ifndef xmlCleanupOutputCallbacks
extern __typeof (xmlCleanupOutputCallbacks) xmlCleanupOutputCallbacks__internal_alias __attribute((visibility("hidden")));
#define xmlCleanupOutputCallbacks xmlCleanupOutputCallbacks__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser
#undef xmlCleanupParser
extern __typeof (xmlCleanupParser) xmlCleanupParser __attribute((alias("xmlCleanupParser__internal_alias")));
@ -1675,78 +1591,6 @@ extern __typeof (xmlDocCopyNodeList) xmlDocCopyNodeList__internal_alias __attrib
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlDocDump
extern __typeof (xmlDocDump) xmlDocDump __attribute((alias("xmlDocDump__internal_alias")));
#else
#ifndef xmlDocDump
extern __typeof (xmlDocDump) xmlDocDump__internal_alias __attribute((visibility("hidden")));
#define xmlDocDump xmlDocDump__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlDocDumpFormatMemory
extern __typeof (xmlDocDumpFormatMemory) xmlDocDumpFormatMemory __attribute((alias("xmlDocDumpFormatMemory__internal_alias")));
#else
#ifndef xmlDocDumpFormatMemory
extern __typeof (xmlDocDumpFormatMemory) xmlDocDumpFormatMemory__internal_alias __attribute((visibility("hidden")));
#define xmlDocDumpFormatMemory xmlDocDumpFormatMemory__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlDocDumpFormatMemoryEnc
extern __typeof (xmlDocDumpFormatMemoryEnc) xmlDocDumpFormatMemoryEnc __attribute((alias("xmlDocDumpFormatMemoryEnc__internal_alias")));
#else
#ifndef xmlDocDumpFormatMemoryEnc
extern __typeof (xmlDocDumpFormatMemoryEnc) xmlDocDumpFormatMemoryEnc__internal_alias __attribute((visibility("hidden")));
#define xmlDocDumpFormatMemoryEnc xmlDocDumpFormatMemoryEnc__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlDocDumpMemory
extern __typeof (xmlDocDumpMemory) xmlDocDumpMemory __attribute((alias("xmlDocDumpMemory__internal_alias")));
#else
#ifndef xmlDocDumpMemory
extern __typeof (xmlDocDumpMemory) xmlDocDumpMemory__internal_alias __attribute((visibility("hidden")));
#define xmlDocDumpMemory xmlDocDumpMemory__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlDocDumpMemoryEnc
extern __typeof (xmlDocDumpMemoryEnc) xmlDocDumpMemoryEnc __attribute((alias("xmlDocDumpMemoryEnc__internal_alias")));
#else
#ifndef xmlDocDumpMemoryEnc
extern __typeof (xmlDocDumpMemoryEnc) xmlDocDumpMemoryEnc__internal_alias __attribute((visibility("hidden")));
#define xmlDocDumpMemoryEnc xmlDocDumpMemoryEnc__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlDocFormatDump
extern __typeof (xmlDocFormatDump) xmlDocFormatDump __attribute((alias("xmlDocFormatDump__internal_alias")));
#else
#ifndef xmlDocFormatDump
extern __typeof (xmlDocFormatDump) xmlDocFormatDump__internal_alias __attribute((visibility("hidden")));
#define xmlDocFormatDump xmlDocFormatDump__internal_alias
#endif
#endif
#endif
#ifdef bottom_tree
#undef xmlDocGetRootElement
extern __typeof (xmlDocGetRootElement) xmlDocGetRootElement __attribute((alias("xmlDocGetRootElement__internal_alias")));
@ -1769,114 +1613,6 @@ extern __typeof (xmlDocSetRootElement) xmlDocSetRootElement__internal_alias __at
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_valid
#undef xmlDumpAttributeDecl
extern __typeof (xmlDumpAttributeDecl) xmlDumpAttributeDecl __attribute((alias("xmlDumpAttributeDecl__internal_alias")));
#else
#ifndef xmlDumpAttributeDecl
extern __typeof (xmlDumpAttributeDecl) xmlDumpAttributeDecl__internal_alias __attribute((visibility("hidden")));
#define xmlDumpAttributeDecl xmlDumpAttributeDecl__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_valid
#undef xmlDumpAttributeTable
extern __typeof (xmlDumpAttributeTable) xmlDumpAttributeTable __attribute((alias("xmlDumpAttributeTable__internal_alias")));
#else
#ifndef xmlDumpAttributeTable
extern __typeof (xmlDumpAttributeTable) xmlDumpAttributeTable__internal_alias __attribute((visibility("hidden")));
#define xmlDumpAttributeTable xmlDumpAttributeTable__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_valid
#undef xmlDumpElementDecl
extern __typeof (xmlDumpElementDecl) xmlDumpElementDecl __attribute((alias("xmlDumpElementDecl__internal_alias")));
#else
#ifndef xmlDumpElementDecl
extern __typeof (xmlDumpElementDecl) xmlDumpElementDecl__internal_alias __attribute((visibility("hidden")));
#define xmlDumpElementDecl xmlDumpElementDecl__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_valid
#undef xmlDumpElementTable
extern __typeof (xmlDumpElementTable) xmlDumpElementTable __attribute((alias("xmlDumpElementTable__internal_alias")));
#else
#ifndef xmlDumpElementTable
extern __typeof (xmlDumpElementTable) xmlDumpElementTable__internal_alias __attribute((visibility("hidden")));
#define xmlDumpElementTable xmlDumpElementTable__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_entities
#undef xmlDumpEntitiesTable
extern __typeof (xmlDumpEntitiesTable) xmlDumpEntitiesTable __attribute((alias("xmlDumpEntitiesTable__internal_alias")));
#else
#ifndef xmlDumpEntitiesTable
extern __typeof (xmlDumpEntitiesTable) xmlDumpEntitiesTable__internal_alias __attribute((visibility("hidden")));
#define xmlDumpEntitiesTable xmlDumpEntitiesTable__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_entities
#undef xmlDumpEntityDecl
extern __typeof (xmlDumpEntityDecl) xmlDumpEntityDecl __attribute((alias("xmlDumpEntityDecl__internal_alias")));
#else
#ifndef xmlDumpEntityDecl
extern __typeof (xmlDumpEntityDecl) xmlDumpEntityDecl__internal_alias __attribute((visibility("hidden")));
#define xmlDumpEntityDecl xmlDumpEntityDecl__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_valid
#undef xmlDumpNotationDecl
extern __typeof (xmlDumpNotationDecl) xmlDumpNotationDecl __attribute((alias("xmlDumpNotationDecl__internal_alias")));
#else
#ifndef xmlDumpNotationDecl
extern __typeof (xmlDumpNotationDecl) xmlDumpNotationDecl__internal_alias __attribute((visibility("hidden")));
#define xmlDumpNotationDecl xmlDumpNotationDecl__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_valid
#undef xmlDumpNotationTable
extern __typeof (xmlDumpNotationTable) xmlDumpNotationTable __attribute((alias("xmlDumpNotationTable__internal_alias")));
#else
#ifndef xmlDumpNotationTable
extern __typeof (xmlDumpNotationTable) xmlDumpNotationTable__internal_alias __attribute((visibility("hidden")));
#define xmlDumpNotationTable xmlDumpNotationTable__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlElemDump
extern __typeof (xmlElemDump) xmlElemDump __attribute((alias("xmlElemDump__internal_alias")));
#else
#ifndef xmlElemDump
extern __typeof (xmlElemDump) xmlElemDump__internal_alias __attribute((visibility("hidden")));
#define xmlElemDump xmlElemDump__internal_alias
#endif
#endif
#endif
#ifdef bottom_entities
#undef xmlEncodeEntitiesReentrant
extern __typeof (xmlEncodeEntitiesReentrant) xmlEncodeEntitiesReentrant __attribute((alias("xmlEncodeEntitiesReentrant__internal_alias")));
@ -4330,30 +4066,6 @@ extern __typeof (xmlNodeBufGetContent) xmlNodeBufGetContent__internal_alias __at
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlNodeDump
extern __typeof (xmlNodeDump) xmlNodeDump __attribute((alias("xmlNodeDump__internal_alias")));
#else
#ifndef xmlNodeDump
extern __typeof (xmlNodeDump) xmlNodeDump__internal_alias __attribute((visibility("hidden")));
#define xmlNodeDump xmlNodeDump__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlNodeDumpOutput
extern __typeof (xmlNodeDumpOutput) xmlNodeDumpOutput __attribute((alias("xmlNodeDumpOutput__internal_alias")));
#else
#ifndef xmlNodeDumpOutput
extern __typeof (xmlNodeDumpOutput) xmlNodeDumpOutput__internal_alias __attribute((visibility("hidden")));
#define xmlNodeDumpOutput xmlNodeDumpOutput__internal_alias
#endif
#endif
#endif
#ifdef bottom_tree
#undef xmlNodeGetBase
extern __typeof (xmlNodeGetBase) xmlNodeGetBase __attribute((alias("xmlNodeGetBase__internal_alias")));
@ -4516,66 +4228,6 @@ extern __typeof (xmlNormalizeWindowsPath) xmlNormalizeWindowsPath__internal_alia
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferClose
extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose __attribute((alias("xmlOutputBufferClose__internal_alias")));
#else
#ifndef xmlOutputBufferClose
extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferClose xmlOutputBufferClose__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferCreateBuffer
extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer __attribute((alias("xmlOutputBufferCreateBuffer__internal_alias")));
#else
#ifndef xmlOutputBufferCreateBuffer
extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferCreateBuffer xmlOutputBufferCreateBuffer__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferCreateFd
extern __typeof (xmlOutputBufferCreateFd) xmlOutputBufferCreateFd __attribute((alias("xmlOutputBufferCreateFd__internal_alias")));
#else
#ifndef xmlOutputBufferCreateFd
extern __typeof (xmlOutputBufferCreateFd) xmlOutputBufferCreateFd__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferCreateFd xmlOutputBufferCreateFd__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferCreateFile
extern __typeof (xmlOutputBufferCreateFile) xmlOutputBufferCreateFile __attribute((alias("xmlOutputBufferCreateFile__internal_alias")));
#else
#ifndef xmlOutputBufferCreateFile
extern __typeof (xmlOutputBufferCreateFile) xmlOutputBufferCreateFile__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferCreateFile xmlOutputBufferCreateFile__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferCreateFilename
extern __typeof (xmlOutputBufferCreateFilename) xmlOutputBufferCreateFilename __attribute((alias("xmlOutputBufferCreateFilename__internal_alias")));
#else
#ifndef xmlOutputBufferCreateFilename
extern __typeof (xmlOutputBufferCreateFilename) xmlOutputBufferCreateFilename__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferCreateFilename xmlOutputBufferCreateFilename__internal_alias
#endif
#endif
#endif
#ifdef bottom_xmlIO
#undef xmlOutputBufferCreateFilenameDefault
extern __typeof (xmlOutputBufferCreateFilenameDefault) xmlOutputBufferCreateFilenameDefault __attribute((alias("xmlOutputBufferCreateFilenameDefault__internal_alias")));
@ -4586,66 +4238,6 @@ extern __typeof (xmlOutputBufferCreateFilenameDefault) xmlOutputBufferCreateFile
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferCreateIO
extern __typeof (xmlOutputBufferCreateIO) xmlOutputBufferCreateIO __attribute((alias("xmlOutputBufferCreateIO__internal_alias")));
#else
#ifndef xmlOutputBufferCreateIO
extern __typeof (xmlOutputBufferCreateIO) xmlOutputBufferCreateIO__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferCreateIO xmlOutputBufferCreateIO__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferFlush
extern __typeof (xmlOutputBufferFlush) xmlOutputBufferFlush __attribute((alias("xmlOutputBufferFlush__internal_alias")));
#else
#ifndef xmlOutputBufferFlush
extern __typeof (xmlOutputBufferFlush) xmlOutputBufferFlush__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferFlush xmlOutputBufferFlush__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferWrite
extern __typeof (xmlOutputBufferWrite) xmlOutputBufferWrite __attribute((alias("xmlOutputBufferWrite__internal_alias")));
#else
#ifndef xmlOutputBufferWrite
extern __typeof (xmlOutputBufferWrite) xmlOutputBufferWrite__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferWrite xmlOutputBufferWrite__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferWriteEscape
extern __typeof (xmlOutputBufferWriteEscape) xmlOutputBufferWriteEscape __attribute((alias("xmlOutputBufferWriteEscape__internal_alias")));
#else
#ifndef xmlOutputBufferWriteEscape
extern __typeof (xmlOutputBufferWriteEscape) xmlOutputBufferWriteEscape__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferWriteEscape xmlOutputBufferWriteEscape__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlOutputBufferWriteString
extern __typeof (xmlOutputBufferWriteString) xmlOutputBufferWriteString __attribute((alias("xmlOutputBufferWriteString__internal_alias")));
#else
#ifndef xmlOutputBufferWriteString
extern __typeof (xmlOutputBufferWriteString) xmlOutputBufferWriteString__internal_alias __attribute((visibility("hidden")));
#define xmlOutputBufferWriteString xmlOutputBufferWriteString__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser
#undef xmlParseAttValue
extern __typeof (xmlParseAttValue) xmlParseAttValue __attribute((alias("xmlParseAttValue__internal_alias")));
@ -5861,18 +5453,6 @@ extern __typeof (xmlRegisterDefaultInputCallbacks) xmlRegisterDefaultInputCallba
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlRegisterDefaultOutputCallbacks
extern __typeof (xmlRegisterDefaultOutputCallbacks) xmlRegisterDefaultOutputCallbacks __attribute((alias("xmlRegisterDefaultOutputCallbacks__internal_alias")));
#else
#ifndef xmlRegisterDefaultOutputCallbacks
extern __typeof (xmlRegisterDefaultOutputCallbacks) xmlRegisterDefaultOutputCallbacks__internal_alias __attribute((visibility("hidden")));
#define xmlRegisterDefaultOutputCallbacks xmlRegisterDefaultOutputCallbacks__internal_alias
#endif
#endif
#endif
#ifdef bottom_xmlIO
#undef xmlRegisterInputCallbacks
extern __typeof (xmlRegisterInputCallbacks) xmlRegisterInputCallbacks __attribute((alias("xmlRegisterInputCallbacks__internal_alias")));
@ -5893,18 +5473,6 @@ extern __typeof (xmlRegisterNodeDefault) xmlRegisterNodeDefault__internal_alias
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlIO
#undef xmlRegisterOutputCallbacks
extern __typeof (xmlRegisterOutputCallbacks) xmlRegisterOutputCallbacks __attribute((alias("xmlRegisterOutputCallbacks__internal_alias")));
#else
#ifndef xmlRegisterOutputCallbacks
extern __typeof (xmlRegisterOutputCallbacks) xmlRegisterOutputCallbacks__internal_alias __attribute((visibility("hidden")));
#define xmlRegisterOutputCallbacks xmlRegisterOutputCallbacks__internal_alias
#endif
#endif
#endif
#ifdef bottom_valid
#undef xmlRemoveID
extern __typeof (xmlRemoveID) xmlRemoveID __attribute((alias("xmlRemoveID__internal_alias")));
@ -6279,198 +5847,6 @@ extern __typeof (xmlSAXVersion) xmlSAXVersion__internal_alias __attribute((visib
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveClose
extern __typeof (xmlSaveClose) xmlSaveClose __attribute((alias("xmlSaveClose__internal_alias")));
#else
#ifndef xmlSaveClose
extern __typeof (xmlSaveClose) xmlSaveClose__internal_alias __attribute((visibility("hidden")));
#define xmlSaveClose xmlSaveClose__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveDoc
extern __typeof (xmlSaveDoc) xmlSaveDoc __attribute((alias("xmlSaveDoc__internal_alias")));
#else
#ifndef xmlSaveDoc
extern __typeof (xmlSaveDoc) xmlSaveDoc__internal_alias __attribute((visibility("hidden")));
#define xmlSaveDoc xmlSaveDoc__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveFile
extern __typeof (xmlSaveFile) xmlSaveFile __attribute((alias("xmlSaveFile__internal_alias")));
#else
#ifndef xmlSaveFile
extern __typeof (xmlSaveFile) xmlSaveFile__internal_alias __attribute((visibility("hidden")));
#define xmlSaveFile xmlSaveFile__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveFileEnc
extern __typeof (xmlSaveFileEnc) xmlSaveFileEnc __attribute((alias("xmlSaveFileEnc__internal_alias")));
#else
#ifndef xmlSaveFileEnc
extern __typeof (xmlSaveFileEnc) xmlSaveFileEnc__internal_alias __attribute((visibility("hidden")));
#define xmlSaveFileEnc xmlSaveFileEnc__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveFileTo
extern __typeof (xmlSaveFileTo) xmlSaveFileTo __attribute((alias("xmlSaveFileTo__internal_alias")));
#else
#ifndef xmlSaveFileTo
extern __typeof (xmlSaveFileTo) xmlSaveFileTo__internal_alias __attribute((visibility("hidden")));
#define xmlSaveFileTo xmlSaveFileTo__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveFlush
extern __typeof (xmlSaveFlush) xmlSaveFlush __attribute((alias("xmlSaveFlush__internal_alias")));
#else
#ifndef xmlSaveFlush
extern __typeof (xmlSaveFlush) xmlSaveFlush__internal_alias __attribute((visibility("hidden")));
#define xmlSaveFlush xmlSaveFlush__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveFormatFile
extern __typeof (xmlSaveFormatFile) xmlSaveFormatFile __attribute((alias("xmlSaveFormatFile__internal_alias")));
#else
#ifndef xmlSaveFormatFile
extern __typeof (xmlSaveFormatFile) xmlSaveFormatFile__internal_alias __attribute((visibility("hidden")));
#define xmlSaveFormatFile xmlSaveFormatFile__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveFormatFileEnc
extern __typeof (xmlSaveFormatFileEnc) xmlSaveFormatFileEnc __attribute((alias("xmlSaveFormatFileEnc__internal_alias")));
#else
#ifndef xmlSaveFormatFileEnc
extern __typeof (xmlSaveFormatFileEnc) xmlSaveFormatFileEnc__internal_alias __attribute((visibility("hidden")));
#define xmlSaveFormatFileEnc xmlSaveFormatFileEnc__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveFormatFileTo
extern __typeof (xmlSaveFormatFileTo) xmlSaveFormatFileTo __attribute((alias("xmlSaveFormatFileTo__internal_alias")));
#else
#ifndef xmlSaveFormatFileTo
extern __typeof (xmlSaveFormatFileTo) xmlSaveFormatFileTo__internal_alias __attribute((visibility("hidden")));
#define xmlSaveFormatFileTo xmlSaveFormatFileTo__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveSetAttrEscape
extern __typeof (xmlSaveSetAttrEscape) xmlSaveSetAttrEscape __attribute((alias("xmlSaveSetAttrEscape__internal_alias")));
#else
#ifndef xmlSaveSetAttrEscape
extern __typeof (xmlSaveSetAttrEscape) xmlSaveSetAttrEscape__internal_alias __attribute((visibility("hidden")));
#define xmlSaveSetAttrEscape xmlSaveSetAttrEscape__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveSetEscape
extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape __attribute((alias("xmlSaveSetEscape__internal_alias")));
#else
#ifndef xmlSaveSetEscape
extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape__internal_alias __attribute((visibility("hidden")));
#define xmlSaveSetEscape xmlSaveSetEscape__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveToBuffer
extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer __attribute((alias("xmlSaveToBuffer__internal_alias")));
#else
#ifndef xmlSaveToBuffer
extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer__internal_alias __attribute((visibility("hidden")));
#define xmlSaveToBuffer xmlSaveToBuffer__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveToFd
extern __typeof (xmlSaveToFd) xmlSaveToFd __attribute((alias("xmlSaveToFd__internal_alias")));
#else
#ifndef xmlSaveToFd
extern __typeof (xmlSaveToFd) xmlSaveToFd__internal_alias __attribute((visibility("hidden")));
#define xmlSaveToFd xmlSaveToFd__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveToFilename
extern __typeof (xmlSaveToFilename) xmlSaveToFilename __attribute((alias("xmlSaveToFilename__internal_alias")));
#else
#ifndef xmlSaveToFilename
extern __typeof (xmlSaveToFilename) xmlSaveToFilename__internal_alias __attribute((visibility("hidden")));
#define xmlSaveToFilename xmlSaveToFilename__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveToIO
extern __typeof (xmlSaveToIO) xmlSaveToIO __attribute((alias("xmlSaveToIO__internal_alias")));
#else
#ifndef xmlSaveToIO
extern __typeof (xmlSaveToIO) xmlSaveToIO__internal_alias __attribute((visibility("hidden")));
#define xmlSaveToIO xmlSaveToIO__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_xmlsave
#undef xmlSaveTree
extern __typeof (xmlSaveTree) xmlSaveTree __attribute((alias("xmlSaveTree__internal_alias")));
#else
#ifndef xmlSaveTree
extern __typeof (xmlSaveTree) xmlSaveTree__internal_alias __attribute((visibility("hidden")));
#define xmlSaveTree xmlSaveTree__internal_alias
#endif
#endif
#endif
#ifdef bottom_uri
#undef xmlSaveUri
extern __typeof (xmlSaveUri) xmlSaveUri __attribute((alias("xmlSaveUri__internal_alias")));
@ -6666,18 +6042,6 @@ extern __typeof (xmlSplitQName3) xmlSplitQName3__internal_alias __attribute((vis
#endif
#endif
#if defined(LIBXML_OUTPUT_ENABLED)
#ifdef bottom_valid
#undef xmlSprintfElementContent
extern __typeof (xmlSprintfElementContent) xmlSprintfElementContent __attribute((alias("xmlSprintfElementContent__internal_alias")));
#else
#ifndef xmlSprintfElementContent
extern __typeof (xmlSprintfElementContent) xmlSprintfElementContent__internal_alias __attribute((visibility("hidden")));
#define xmlSprintfElementContent xmlSprintfElementContent__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser
#undef xmlStopParser
extern __typeof (xmlStopParser) xmlStopParser __attribute((alias("xmlStopParser__internal_alias")));

View File

@ -145,92 +145,6 @@ asciiToUTF8(unsigned char* out, int *outlen,
return(*outlen);
}
#ifdef LIBXML_OUTPUT_ENABLED
/**
* UTF8Toascii:
* @out: a pointer to an array of bytes to store the result
* @outlen: the length of @out
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
*
* Take a block of UTF-8 chars in and try to convert it to an ASCII
* block of chars out.
*
* Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
* The value of @inlen after return is the number of octets consumed
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
static int
UTF8Toascii(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
const unsigned char* processed = in;
const unsigned char* outend;
const unsigned char* outstart = out;
const unsigned char* instart = in;
const unsigned char* inend;
unsigned int c, d;
int trailing;
if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
if (in == NULL) {
/*
* initialization nothing to do
*/
*outlen = 0;
*inlen = 0;
return(0);
}
inend = in + (*inlen);
outend = out + (*outlen);
while (in < inend) {
d = *in++;
if (d < 0x80) { c= d; trailing= 0; }
else if (d < 0xC0) {
/* trailing byte in leading position */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
} else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
else {
/* no chance for this in Ascii */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
}
if (inend - in < trailing) {
break;
}
for ( ; trailing; trailing--) {
if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80))
break;
c <<= 6;
c |= d & 0x3F;
}
/* assertion: c is a single UTF-4 value */
if (c < 0x80) {
if (out >= outend)
break;
*out++ = c;
} else {
/* no chance for this in Ascii */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
}
processed = in;
}
*outlen = out - outstart;
*inlen = processed - instart;
return(*outlen);
}
#endif /* LIBXML_OUTPUT_ENABLED */
/**
* isolat1ToUTF8:
* @out: a pointer to an array of bytes to store the result
@ -316,99 +230,6 @@ UTF8ToUTF8(unsigned char* out, int *outlen,
return(*outlen);
}
#ifdef LIBXML_OUTPUT_ENABLED
/**
* UTF8Toisolat1:
* @out: a pointer to an array of bytes to store the result
* @outlen: the length of @out
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
*
* Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
* block of chars out.
*
* Returns the number of bytes written if success, -2 if the transcoding fails,
or -1 otherwise
* The value of @inlen after return is the number of octets consumed
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
int
UTF8Toisolat1(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
const unsigned char* processed = in;
const unsigned char* outend;
const unsigned char* outstart = out;
const unsigned char* instart = in;
const unsigned char* inend;
unsigned int c, d;
int trailing;
if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
if (in == NULL) {
/*
* initialization nothing to do
*/
*outlen = 0;
*inlen = 0;
return(0);
}
inend = in + (*inlen);
outend = out + (*outlen);
while (in < inend) {
d = *in++;
if (d < 0x80) { c= d; trailing= 0; }
else if (d < 0xC0) {
/* trailing byte in leading position */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
} else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
else {
/* no chance for this in IsoLat1 */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
}
if (inend - in < trailing) {
break;
}
for ( ; trailing; trailing--) {
if (in >= inend)
break;
if (((d= *in++) & 0xC0) != 0x80) {
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
}
c <<= 6;
c |= d & 0x3F;
}
/* assertion: c is a single UTF-4 value */
if (c <= 0xFF) {
if (out >= outend)
break;
*out++ = c;
} else {
/* no chance for this in IsoLat1 */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
}
processed = in;
}
*outlen = out - outstart;
*inlen = processed - instart;
return(*outlen);
}
#endif /* LIBXML_OUTPUT_ENABLED */
/**
* UTF16LEToUTF8:
* @out: a pointer to an array of bytes to store the result
@ -497,156 +318,6 @@ UTF16LEToUTF8(unsigned char* out, int *outlen,
return(*outlen);
}
#ifdef LIBXML_OUTPUT_ENABLED
/**
* UTF8ToUTF16LE:
* @outb: a pointer to an array of bytes to store the result
* @outlen: the length of @outb
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
*
* Take a block of UTF-8 chars in and try to convert it to an UTF-16LE
* block of chars out.
*
* Returns the number of bytes written, or -1 if lack of space, or -2
* if the transcoding failed.
*/
static int
UTF8ToUTF16LE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
unsigned short* out = (unsigned short*) outb;
const unsigned char* processed = in;
const unsigned char *const instart = in;
unsigned short* outstart= out;
unsigned short* outend;
const unsigned char* inend;
unsigned int c, d;
int trailing;
unsigned char *tmp;
unsigned short tmp1, tmp2;
/* UTF16LE encoding has no BOM */
if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
if (in == NULL) {
*outlen = 0;
*inlen = 0;
return(0);
}
inend= in + *inlen;
outend = out + (*outlen / 2);
while (in < inend) {
d= *in++;
if (d < 0x80) { c= d; trailing= 0; }
else if (d < 0xC0) {
/* trailing byte in leading position */
*outlen = (out - outstart) * 2;
*inlen = processed - instart;
return(-2);
} else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
else {
/* no chance for this in UTF-16 */
*outlen = (out - outstart) * 2;
*inlen = processed - instart;
return(-2);
}
if (inend - in < trailing) {
break;
}
for ( ; trailing; trailing--) {
if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80))
break;
c <<= 6;
c |= d & 0x3F;
}
/* assertion: c is a single UTF-4 value */
if (c < 0x10000) {
if (out >= outend)
break;
if (xmlLittleEndian) {
*out++ = c;
} else {
tmp = (unsigned char *) out;
*tmp = c ;
*(tmp + 1) = c >> 8 ;
out++;
}
}
else if (c < 0x110000) {
if (out+1 >= outend)
break;
c -= 0x10000;
if (xmlLittleEndian) {
*out++ = 0xD800 | (c >> 10);
*out++ = 0xDC00 | (c & 0x03FF);
} else {
tmp1 = 0xD800 | (c >> 10);
tmp = (unsigned char *) out;
*tmp = (unsigned char) tmp1;
*(tmp + 1) = tmp1 >> 8;
out++;
tmp2 = 0xDC00 | (c & 0x03FF);
tmp = (unsigned char *) out;
*tmp = (unsigned char) tmp2;
*(tmp + 1) = tmp2 >> 8;
out++;
}
}
else
break;
processed = in;
}
*outlen = (out - outstart) * 2;
*inlen = processed - instart;
return(*outlen);
}
/**
* UTF8ToUTF16:
* @outb: a pointer to an array of bytes to store the result
* @outlen: the length of @outb
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
*
* Take a block of UTF-8 chars in and try to convert it to an UTF-16
* block of chars out.
*
* Returns the number of bytes written, or -1 if lack of space, or -2
* if the transcoding failed.
*/
static int
UTF8ToUTF16(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
if (in == NULL) {
/*
* initialization, add the Byte Order Mark for UTF-16LE
*/
if (*outlen >= 2) {
outb[0] = 0xFF;
outb[1] = 0xFE;
*outlen = 2;
*inlen = 0;
#ifdef DEBUG_ENCODING
xmlGenericError(xmlGenericErrorContext,
"Added FFFE Byte Order Mark\n");
#endif
return(2);
}
*outlen = 0;
*inlen = 0;
return(0);
}
return (UTF8ToUTF16LE(outb, outlen, in, inlen));
}
#endif /* LIBXML_OUTPUT_ENABLED */
/**
* UTF16BEToUTF8:
* @out: a pointer to an array of bytes to store the result
@ -739,114 +410,6 @@ UTF16BEToUTF8(unsigned char* out, int *outlen,
return(*outlen);
}
#ifdef LIBXML_OUTPUT_ENABLED
/**
* UTF8ToUTF16BE:
* @outb: a pointer to an array of bytes to store the result
* @outlen: the length of @outb
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
*
* Take a block of UTF-8 chars in and try to convert it to an UTF-16BE
* block of chars out.
*
* Returns the number of byte written, or -1 by lack of space, or -2
* if the transcoding failed.
*/
static int
UTF8ToUTF16BE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
unsigned short* out = (unsigned short*) outb;
const unsigned char* processed = in;
const unsigned char *const instart = in;
unsigned short* outstart= out;
unsigned short* outend;
const unsigned char* inend;
unsigned int c, d;
int trailing;
unsigned char *tmp;
unsigned short tmp1, tmp2;
/* UTF-16BE has no BOM */
if ((outb == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
if (in == NULL) {
*outlen = 0;
*inlen = 0;
return(0);
}
inend= in + *inlen;
outend = out + (*outlen / 2);
while (in < inend) {
d= *in++;
if (d < 0x80) { c= d; trailing= 0; }
else if (d < 0xC0) {
/* trailing byte in leading position */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
} else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
else {
/* no chance for this in UTF-16 */
*outlen = out - outstart;
*inlen = processed - instart;
return(-2);
}
if (inend - in < trailing) {
break;
}
for ( ; trailing; trailing--) {
if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) break;
c <<= 6;
c |= d & 0x3F;
}
/* assertion: c is a single UTF-4 value */
if (c < 0x10000) {
if (out >= outend) break;
if (xmlLittleEndian) {
tmp = (unsigned char *) out;
*tmp = c >> 8;
*(tmp + 1) = c;
out++;
} else {
*out++ = c;
}
}
else if (c < 0x110000) {
if (out+1 >= outend) break;
c -= 0x10000;
if (xmlLittleEndian) {
tmp1 = 0xD800 | (c >> 10);
tmp = (unsigned char *) out;
*tmp = tmp1 >> 8;
*(tmp + 1) = (unsigned char) tmp1;
out++;
tmp2 = 0xDC00 | (c & 0x03FF);
tmp = (unsigned char *) out;
*tmp = tmp2 >> 8;
*(tmp + 1) = (unsigned char) tmp2;
out++;
} else {
*out++ = 0xD800 | (c >> 10);
*out++ = 0xDC00 | (c & 0x03FF);
}
}
else
break;
processed = in;
}
*outlen = (out - outstart) * 2;
*inlen = processed - instart;
return(*outlen);
}
#endif /* LIBXML_OUTPUT_ENABLED */
/************************************************************************
* *
* Generic encoding handling routines *
@ -1347,16 +910,6 @@ xmlInitCharEncodingHandlers(void) {
return;
}
xmlNewCharEncodingHandler("UTF-8", UTF8ToUTF8, UTF8ToUTF8);
#ifdef LIBXML_OUTPUT_ENABLED
xmlUTF16LEHandler =
xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, UTF8ToUTF16LE);
xmlUTF16BEHandler =
xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, UTF8ToUTF16BE);
xmlNewCharEncodingHandler("UTF-16", UTF16LEToUTF8, UTF8ToUTF16);
xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, UTF8Toisolat1);
xmlNewCharEncodingHandler("ASCII", asciiToUTF8, UTF8Toascii);
xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, UTF8Toascii);
#else
xmlUTF16LEHandler =
xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, NULL);
xmlUTF16BEHandler =
@ -1365,7 +918,6 @@ xmlInitCharEncodingHandlers(void) {
xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, NULL);
xmlNewCharEncodingHandler("ASCII", asciiToUTF8, NULL);
xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, NULL);
#endif /* LIBXML_OUTPUT_ENABLED */
#if !defined(LIBXML_ICONV_ENABLED)
#ifdef LIBXML_ISO8859X_ENABLED
xmlRegisterCharEncodingHandlersISO8859x ();

View File

@ -865,158 +865,5 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
}
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
/**
* xmlDumpEntityContent:
* @buf: An XML buffer.
* @content: The entity content.
*
* This will dump the quoted string value, taking care of the special
* treatment required by %
*/
static void
xmlDumpEntityContent(xmlBufferPtr buf, const xmlChar *content) {
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
if (xmlStrchr(content, '%')) {
const xmlChar * base, *cur;
xmlBufferCCat(buf, "\"");
base = cur = content;
while (*cur != 0) {
if (*cur == '"') {
if (base != cur)
xmlBufferAdd(buf, base, cur - base);
xmlBufferAdd(buf, BAD_CAST "&quot;", 6);
cur++;
base = cur;
} else if (*cur == '%') {
if (base != cur)
xmlBufferAdd(buf, base, cur - base);
xmlBufferAdd(buf, BAD_CAST "&#x25;", 6);
cur++;
base = cur;
} else {
cur++;
}
}
if (base != cur)
xmlBufferAdd(buf, base, cur - base);
xmlBufferCCat(buf, "\"");
} else {
xmlBufferWriteQuotedString(buf, content);
}
}
/**
* xmlDumpEntityDecl:
* @buf: An XML buffer.
* @ent: An entity table
*
* This will dump the content of the entity table as an XML DTD definition
*/
void
xmlDumpEntityDecl(xmlBufferPtr buf, xmlEntityPtr ent) {
if ((buf == NULL) || (ent == NULL)) return;
switch (ent->etype) {
case XML_INTERNAL_GENERAL_ENTITY:
xmlBufferWriteChar(buf, "<!ENTITY ");
xmlBufferWriteCHAR(buf, ent->name);
xmlBufferWriteChar(buf, " ");
if (ent->orig != NULL)
xmlBufferWriteQuotedString(buf, ent->orig);
else
xmlDumpEntityContent(buf, ent->content);
xmlBufferWriteChar(buf, ">\n");
break;
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
xmlBufferWriteChar(buf, "<!ENTITY ");
xmlBufferWriteCHAR(buf, ent->name);
if (ent->ExternalID != NULL) {
xmlBufferWriteChar(buf, " PUBLIC ");
xmlBufferWriteQuotedString(buf, ent->ExternalID);
xmlBufferWriteChar(buf, " ");
xmlBufferWriteQuotedString(buf, ent->SystemID);
} else {
xmlBufferWriteChar(buf, " SYSTEM ");
xmlBufferWriteQuotedString(buf, ent->SystemID);
}
xmlBufferWriteChar(buf, ">\n");
break;
case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
xmlBufferWriteChar(buf, "<!ENTITY ");
xmlBufferWriteCHAR(buf, ent->name);
if (ent->ExternalID != NULL) {
xmlBufferWriteChar(buf, " PUBLIC ");
xmlBufferWriteQuotedString(buf, ent->ExternalID);
xmlBufferWriteChar(buf, " ");
xmlBufferWriteQuotedString(buf, ent->SystemID);
} else {
xmlBufferWriteChar(buf, " SYSTEM ");
xmlBufferWriteQuotedString(buf, ent->SystemID);
}
if (ent->content != NULL) { /* Should be true ! */
xmlBufferWriteChar(buf, " NDATA ");
if (ent->orig != NULL)
xmlBufferWriteCHAR(buf, ent->orig);
else
xmlBufferWriteCHAR(buf, ent->content);
}
xmlBufferWriteChar(buf, ">\n");
break;
case XML_INTERNAL_PARAMETER_ENTITY:
xmlBufferWriteChar(buf, "<!ENTITY % ");
xmlBufferWriteCHAR(buf, ent->name);
xmlBufferWriteChar(buf, " ");
if (ent->orig == NULL)
xmlDumpEntityContent(buf, ent->content);
else
xmlBufferWriteQuotedString(buf, ent->orig);
xmlBufferWriteChar(buf, ">\n");
break;
case XML_EXTERNAL_PARAMETER_ENTITY:
xmlBufferWriteChar(buf, "<!ENTITY % ");
xmlBufferWriteCHAR(buf, ent->name);
if (ent->ExternalID != NULL) {
xmlBufferWriteChar(buf, " PUBLIC ");
xmlBufferWriteQuotedString(buf, ent->ExternalID);
xmlBufferWriteChar(buf, " ");
xmlBufferWriteQuotedString(buf, ent->SystemID);
} else {
xmlBufferWriteChar(buf, " SYSTEM ");
xmlBufferWriteQuotedString(buf, ent->SystemID);
}
xmlBufferWriteChar(buf, ">\n");
break;
default:
xmlEntitiesErr(XML_DTD_UNKNOWN_ENTITY,
"xmlDumpEntitiesDecl: internal: unknown type entity type");
}
}
/**
* xmlDumpEntityDeclScan:
* @ent: An entity table
* @buf: An XML buffer.
*
* When using the hash table scan function, arguments need to be reversed
*/
static void
xmlDumpEntityDeclScan(xmlEntityPtr ent, xmlBufferPtr buf) {
xmlDumpEntityDecl(buf, ent);
}
/**
* xmlDumpEntitiesTable:
* @buf: An XML buffer.
* @table: An entity table
*
* This will dump the content of the entity table as an XML DTD definition
*/
void
xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) {
xmlHashScan(table, (xmlHashScanner)xmlDumpEntityDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */
#define bottom_entities
#include "elfgcchack.h"

View File

@ -550,11 +550,6 @@ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc fun
xmlMutexLock(xmlThrDefMutex);
old = xmlOutputBufferCreateFilenameValueThrDef;
#ifdef LIBXML_OUTPUT_ENABLED
if (old == NULL) {
old = __xmlOutputBufferCreateFilename;
}
#endif
xmlOutputBufferCreateFilenameValueThrDef = func;
xmlMutexUnlock(xmlThrDefMutex);

View File

@ -17,110 +17,6 @@
#ifndef __XML_C14N_H__
#define __XML_C14N_H__
#ifdef LIBXML_C14N_ENABLED
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
/*
* XML Canonicazation
* http://www.w3.org/TR/xml-c14n
*
* Exclusive XML Canonicazation
* http://www.w3.org/TR/xml-exc-c14n
*
* Canonical form of an XML document could be created if and only if
* a) default attributes (if any) are added to all nodes
* b) all character and parsed entity references are resolved
* In order to achive this in libxml2 the document MUST be loaded with
* following global setings:
*
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
* xmlSubstituteEntitiesDefault(1);
*
* or corresponding parser context setting:
* xmlParserCtxtPtr ctxt;
*
* ...
* ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
* ctxt->replaceEntities = 1;
* ...
*/
/*
* xmlC14NMode:
*
* Predefined values for C14N modes
*
*/
typedef enum {
XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */
XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
XML_C14N_1_1 = 2 /* C14N 1.1 spec */
} xmlC14NMode;
XMLPUBFUN int XMLCALL
xmlC14NDocSaveTo (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf);
XMLPUBFUN int XMLCALL
xmlC14NDocDumpMemory (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlChar **doc_txt_ptr);
XMLPUBFUN int XMLCALL
xmlC14NDocSave (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
const char* filename,
int compression);
/**
* This is the core C14N function
*/
/**
* xmlC14NIsVisibleCallback:
* @user_data: user data
* @node: the curent node
* @parent: the parent node
*
* Signature for a C14N callback on visible nodes
*
* Returns 1 if the node should be included
*/
typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
xmlNodePtr node,
xmlNodePtr parent);
XMLPUBFUN int XMLCALL
xmlC14NExecute (xmlDocPtr doc,
xmlC14NIsVisibleCallback is_visible_callback,
void* user_data,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBXML_OUTPUT_ENABLED */
#endif /* LIBXML_C14N_ENABLED */
#endif /* __XML_C14N_H__ */

View File

@ -207,13 +207,6 @@ XMLPUBFUN int XMLCALL
/*
* Export a few useful functions
*/
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN int XMLCALL
UTF8Toisolat1 (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL
isolat1ToUTF8 (unsigned char *out,
int *outlen,

View File

@ -120,14 +120,6 @@ XMLPUBFUN xmlEntitiesTablePtr XMLCALL
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table);
XMLPUBFUN void XMLCALL
xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef __cplusplus

View File

@ -1067,12 +1067,6 @@ XMLPUBFUN void XMLCALL
xmlBufferWriteQuotedString(xmlBufferPtr buf,
const xmlChar *string);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar *string);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_TREE_ENABLED
/*
@ -1083,84 +1077,6 @@ XMLPUBFUN int XMLCALL
xmlNodePtr tree);
#endif
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Saving.
*/
XMLPUBFUN void XMLCALL
xmlDocDumpFormatMemory (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN void XMLCALL
xmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void XMLCALL
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding);
XMLPUBFUN void XMLCALL
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding,
int format);
XMLPUBFUN int XMLCALL
xmlDocFormatDump (FILE *f,
xmlDocPtr cur,
int format);
XMLPUBFUN int XMLCALL
xmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN void XMLCALL
xmlElemDump (FILE *f,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN int XMLCALL
xmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN int XMLCALL
xmlSaveFormatFile (const char *filename,
xmlDocPtr cur,
int format);
XMLPUBFUN int XMLCALL
xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
XMLPUBFUN int XMLCALL
xmlSaveFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN int XMLCALL
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char *encoding);
XMLPUBFUN int XMLCALL
xmlSaveFormatFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN int XMLCALL
xmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* XHTML
*/

View File

@ -162,14 +162,6 @@ XMLPUBFUN xmlNotationTablePtr XMLCALL
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeNotationTable (xmlNotationTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpNotationDecl (xmlBufferPtr buf,
xmlNotationPtr nota);
XMLPUBFUN void XMLCALL
xmlDumpNotationTable (xmlBufferPtr buf,
xmlNotationTablePtr table);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Element Content */
/* the non Doc version are being deprecated */
@ -196,13 +188,6 @@ XMLPUBFUN void XMLCALL
int size,
xmlElementContentPtr content,
int englob);
#ifdef LIBXML_OUTPUT_ENABLED
/* DEPRECATED */
XMLPUBFUN void XMLCALL
xmlSprintfElementContent(char *buf,
xmlElementContentPtr content,
int englob);
#endif /* LIBXML_OUTPUT_ENABLED */
/* DEPRECATED */
/* Element */
@ -218,14 +203,6 @@ XMLPUBFUN xmlElementTablePtr XMLCALL
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeElementTable (xmlElementTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table);
XMLPUBFUN void XMLCALL
xmlDumpElementDecl (xmlBufferPtr buf,
xmlElementPtr elem);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Enumeration */
XMLPUBFUN xmlEnumerationPtr XMLCALL
@ -254,14 +231,6 @@ XMLPUBFUN xmlAttributeTablePtr XMLCALL
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeAttributeTable (xmlAttributeTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpAttributeTable (xmlBufferPtr buf,
xmlAttributeTablePtr table);
XMLPUBFUN void XMLCALL
xmlDumpAttributeDecl (xmlBufferPtr buf,
xmlAttributePtr attr);
#endif /* LIBXML_OUTPUT_ENABLED */
/* IDs */
XMLPUBFUN xmlIDPtr XMLCALL

View File

@ -62,53 +62,6 @@ typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int
*/
typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Those are the functions and datatypes for the library output
* I/O structures.
*/
/**
* xmlOutputMatchCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Output API to detect if the current handler
* can provide output fonctionnalities for this resource.
*
* Returns 1 if yes and 0 if another Output module should be used
*/
typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
/**
* xmlOutputOpenCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Output API to open the resource
*
* Returns an Output context or NULL in case or error
*/
typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
/**
* xmlOutputWriteCallback:
* @context: an Output context
* @buffer: the buffer of data to write
* @len: the length of the buffer in bytes
*
* Callback used in the I/O Output API to write to the resource
*
* Returns the number of bytes written or -1 in case of error
*/
typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
int len);
/**
* xmlOutputCloseCallback:
* @context: an Output context
*
* Callback used in the I/O Output API to close the resource
*
* Returns 0 or -1 in case of error
*/
typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef __cplusplus
}
@ -137,21 +90,6 @@ struct _xmlParserInputBuffer {
};
#ifdef LIBXML_OUTPUT_ENABLED
struct _xmlOutputBuffer {
void* context;
xmlOutputWriteCallback writecallback;
xmlOutputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
xmlBufferPtr conv; /* if encoder != NULL buffer for output */
int written; /* total number of byte written */
int error;
};
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for input
*/
@ -211,70 +149,6 @@ xmlParserInputBufferPtr
__xmlParserInputBufferCreateFilename(const char *URI,
xmlCharEncoding enc);
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Interfaces for output
*/
XMLPUBFUN void XMLCALL
xmlCleanupOutputCallbacks (void);
XMLPUBFUN void XMLCALL
xmlRegisterDefaultOutputCallbacks(void);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFilename (const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFile (FILE *file,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFd (int fd,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void *ioctx,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN int XMLCALL
xmlOutputBufferWrite (xmlOutputBufferPtr out,
int len,
const char *buf);
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
const char *str);
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar *str,
xmlCharEncodingOutputFunc escaping);
XMLPUBFUN int XMLCALL
xmlOutputBufferFlush (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
xmlOutputBufferClose (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
xmlOutputCloseCallback closeFunc);
xmlOutputBufferPtr
__xmlOutputBufferCreateFilename(const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr ret);

View File

@ -15,74 +15,6 @@
#include <libxml/encoding.h>
#include <libxml/xmlIO.h>
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlSaveOption:
*
* This is the set of XML save options that can be passed down
* to the xmlSaveToFd() and similar calls.
*/
typedef enum {
XML_SAVE_FORMAT = 1<<0, /* format save output */
XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
} xmlSaveOption;
typedef struct _xmlSaveCtxt xmlSaveCtxt;
typedef xmlSaveCtxt *xmlSaveCtxtPtr;
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
xmlSaveToFd (int fd,
const char *encoding,
int options);
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
xmlSaveToFilename (const char *filename,
const char *encoding,
int options);
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
xmlSaveToBuffer (xmlBufferPtr buffer,
const char *encoding,
int options);
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
xmlSaveToIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void *ioctx,
const char *encoding,
int options);
XMLPUBFUN long XMLCALL
xmlSaveDoc (xmlSaveCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN long XMLCALL
xmlSaveTree (xmlSaveCtxtPtr ctxt,
xmlNodePtr node);
XMLPUBFUN int XMLCALL
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlSaveClose (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape);
XMLPUBFUN int XMLCALL
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_OUTPUT_ENABLED */
#endif /* __XML_XMLSAVE_H__ */

View File

@ -94,15 +94,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#define LIBXML_TREE_ENABLED
#endif
/**
* LIBXML_OUTPUT_ENABLED:
*
* Whether the serialization/saving support is configured in
*/
#if 1
#define LIBXML_OUTPUT_ENABLED
#endif
/**
* LIBXML_PUSH_ENABLED:
*

View File

@ -769,11 +769,7 @@ xmlHasFeature(xmlFeature feature)
return(0);
#endif
case XML_WITH_OUTPUT:
#ifdef LIBXML_OUTPUT_ENABLED
return(1);
#else
return(0);
#endif
case XML_WITH_PUSH:
#ifdef LIBXML_PUSH_ENABLED
return(1);
@ -12819,9 +12815,6 @@ xmlInitParser(void) {
xmlInitCharEncodingHandlers();
xmlDefaultSAXHandlerInit();
xmlRegisterDefaultInputCallbacks();
#ifdef LIBXML_OUTPUT_ENABLED
xmlRegisterDefaultOutputCallbacks();
#endif /* LIBXML_OUTPUT_ENABLED */
xmlParserInitialized = 1;
}
@ -12855,9 +12848,6 @@ xmlCleanupParser(void) {
xmlCleanupCharEncodingHandlers();
xmlDictCleanup();
xmlCleanupInputCallbacks();
#ifdef LIBXML_OUTPUT_ENABLED
xmlCleanupOutputCallbacks();
#endif
xmlCleanupGlobals();
xmlResetLastError();
xmlCleanupThreads(); /* must be last if called not from the main thread */

View File

@ -1141,96 +1141,6 @@ xmlFreeElementContent(xmlElementContentPtr cur) {
xmlFreeDocElementContent(NULL, cur);
}
#ifdef LIBXML_OUTPUT_ENABLED
/**
* xmlDumpElementContent:
* @buf: An XML buffer
* @content: An element table
* @glob: 1 if one must print the englobing parenthesis, 0 otherwise
*
* This will dump the content of the element table as an XML DTD definition
*/
static void
xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob) {
if (content == NULL) return;
if (glob) xmlBufferWriteChar(buf, "(");
switch (content->type) {
case XML_ELEMENT_CONTENT_PCDATA:
xmlBufferWriteChar(buf, "#PCDATA");
break;
case XML_ELEMENT_CONTENT_ELEMENT:
if (content->prefix != NULL) {
xmlBufferWriteCHAR(buf, content->prefix);
xmlBufferWriteChar(buf, ":");
}
xmlBufferWriteCHAR(buf, content->name);
break;
case XML_ELEMENT_CONTENT_SEQ:
if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
(content->c1->type == XML_ELEMENT_CONTENT_SEQ))
xmlDumpElementContent(buf, content->c1, 1);
else
xmlDumpElementContent(buf, content->c1, 0);
xmlBufferWriteChar(buf, " , ");
if ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
(content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
xmlDumpElementContent(buf, content->c2, 1);
else
xmlDumpElementContent(buf, content->c2, 0);
break;
case XML_ELEMENT_CONTENT_OR:
if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
(content->c1->type == XML_ELEMENT_CONTENT_SEQ))
xmlDumpElementContent(buf, content->c1, 1);
else
xmlDumpElementContent(buf, content->c1, 0);
xmlBufferWriteChar(buf, " | ");
if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
(content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
xmlDumpElementContent(buf, content->c2, 1);
else
xmlDumpElementContent(buf, content->c2, 0);
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ELEMENT content corrupted invalid type\n",
NULL);
}
if (glob)
xmlBufferWriteChar(buf, ")");
switch (content->ocur) {
case XML_ELEMENT_CONTENT_ONCE:
break;
case XML_ELEMENT_CONTENT_OPT:
xmlBufferWriteChar(buf, "?");
break;
case XML_ELEMENT_CONTENT_MULT:
xmlBufferWriteChar(buf, "*");
break;
case XML_ELEMENT_CONTENT_PLUS:
xmlBufferWriteChar(buf, "+");
break;
}
}
/**
* xmlSprintfElementContent:
* @buf: an output buffer
* @content: An element table
* @englob: 1 if one must print the englobing parenthesis, 0 otherwise
*
* Deprecated, unsafe, use xmlSnprintfElementContent
*/
void
xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
xmlElementContentPtr content ATTRIBUTE_UNUSED,
int englob ATTRIBUTE_UNUSED) {
}
#endif /* LIBXML_OUTPUT_ENABLED */
/**
* xmlSnprintfElementContent:
* @buf: an output buffer
@ -1647,95 +1557,6 @@ xmlCopyElementTable(xmlElementTablePtr table) {
}
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
/**
* xmlDumpElementDecl:
* @buf: the XML buffer output
* @elem: An element table
*
* This will dump the content of the element declaration as an XML
* DTD definition
*/
void
xmlDumpElementDecl(xmlBufferPtr buf, xmlElementPtr elem) {
if ((buf == NULL) || (elem == NULL))
return;
switch (elem->etype) {
case XML_ELEMENT_TYPE_EMPTY:
xmlBufferWriteChar(buf, "<!ELEMENT ");
if (elem->prefix != NULL) {
xmlBufferWriteCHAR(buf, elem->prefix);
xmlBufferWriteChar(buf, ":");
}
xmlBufferWriteCHAR(buf, elem->name);
xmlBufferWriteChar(buf, " EMPTY>\n");
break;
case XML_ELEMENT_TYPE_ANY:
xmlBufferWriteChar(buf, "<!ELEMENT ");
if (elem->prefix != NULL) {
xmlBufferWriteCHAR(buf, elem->prefix);
xmlBufferWriteChar(buf, ":");
}
xmlBufferWriteCHAR(buf, elem->name);
xmlBufferWriteChar(buf, " ANY>\n");
break;
case XML_ELEMENT_TYPE_MIXED:
xmlBufferWriteChar(buf, "<!ELEMENT ");
if (elem->prefix != NULL) {
xmlBufferWriteCHAR(buf, elem->prefix);
xmlBufferWriteChar(buf, ":");
}
xmlBufferWriteCHAR(buf, elem->name);
xmlBufferWriteChar(buf, " ");
xmlDumpElementContent(buf, elem->content, 1);
xmlBufferWriteChar(buf, ">\n");
break;
case XML_ELEMENT_TYPE_ELEMENT:
xmlBufferWriteChar(buf, "<!ELEMENT ");
if (elem->prefix != NULL) {
xmlBufferWriteCHAR(buf, elem->prefix);
xmlBufferWriteChar(buf, ":");
}
xmlBufferWriteCHAR(buf, elem->name);
xmlBufferWriteChar(buf, " ");
xmlDumpElementContent(buf, elem->content, 1);
xmlBufferWriteChar(buf, ">\n");
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ELEMENT struct corrupted invalid type\n",
NULL);
}
}
/**
* xmlDumpElementDeclScan:
* @elem: An element table
* @buf: the XML buffer output
*
* This routine is used by the hash scan function. It just reverses
* the arguments.
*/
static void
xmlDumpElementDeclScan(xmlElementPtr elem, xmlBufferPtr buf) {
xmlDumpElementDecl(buf, elem);
}
/**
* xmlDumpElementTable:
* @buf: the XML buffer output
* @table: An element table
*
* This will dump the content of the element table as an XML DTD definition
*/
void
xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) {
if ((buf == NULL) || (table == NULL))
return;
xmlHashScan(table, (xmlHashScanner) xmlDumpElementDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */
/**
* xmlCreateEnumeration:
* @name: the enumeration name or NULL
@ -1801,29 +1622,6 @@ xmlCopyEnumeration(xmlEnumerationPtr cur) {
}
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
/**
* xmlDumpEnumeration:
* @buf: the XML buffer output
* @enum: An enumeration
*
* This will dump the content of the enumeration
*/
static void
xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) {
if ((buf == NULL) || (cur == NULL))
return;
xmlBufferWriteCHAR(buf, cur->name);
if (cur->next == NULL)
xmlBufferWriteChar(buf, ")");
else {
xmlBufferWriteChar(buf, " | ");
xmlDumpEnumeration(buf, cur->next);
}
}
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
/**
* xmlScanIDAttributeDecl:
@ -2191,116 +1989,6 @@ xmlCopyAttributeTable(xmlAttributeTablePtr table) {
}
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
/**
* xmlDumpAttributeDecl:
* @buf: the XML buffer output
* @attr: An attribute declaration
*
* This will dump the content of the attribute declaration as an XML
* DTD definition
*/
void
xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
if ((buf == NULL) || (attr == NULL))
return;
xmlBufferWriteChar(buf, "<!ATTLIST ");
xmlBufferWriteCHAR(buf, attr->elem);
xmlBufferWriteChar(buf, " ");
if (attr->prefix != NULL) {
xmlBufferWriteCHAR(buf, attr->prefix);
xmlBufferWriteChar(buf, ":");
}
xmlBufferWriteCHAR(buf, attr->name);
switch (attr->atype) {
case XML_ATTRIBUTE_CDATA:
xmlBufferWriteChar(buf, " CDATA");
break;
case XML_ATTRIBUTE_ID:
xmlBufferWriteChar(buf, " ID");
break;
case XML_ATTRIBUTE_IDREF:
xmlBufferWriteChar(buf, " IDREF");
break;
case XML_ATTRIBUTE_IDREFS:
xmlBufferWriteChar(buf, " IDREFS");
break;
case XML_ATTRIBUTE_ENTITY:
xmlBufferWriteChar(buf, " ENTITY");
break;
case XML_ATTRIBUTE_ENTITIES:
xmlBufferWriteChar(buf, " ENTITIES");
break;
case XML_ATTRIBUTE_NMTOKEN:
xmlBufferWriteChar(buf, " NMTOKEN");
break;
case XML_ATTRIBUTE_NMTOKENS:
xmlBufferWriteChar(buf, " NMTOKENS");
break;
case XML_ATTRIBUTE_ENUMERATION:
xmlBufferWriteChar(buf, " (");
xmlDumpEnumeration(buf, attr->tree);
break;
case XML_ATTRIBUTE_NOTATION:
xmlBufferWriteChar(buf, " NOTATION (");
xmlDumpEnumeration(buf, attr->tree);
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ATTRIBUTE struct corrupted invalid type\n",
NULL);
}
switch (attr->def) {
case XML_ATTRIBUTE_NONE:
break;
case XML_ATTRIBUTE_REQUIRED:
xmlBufferWriteChar(buf, " #REQUIRED");
break;
case XML_ATTRIBUTE_IMPLIED:
xmlBufferWriteChar(buf, " #IMPLIED");
break;
case XML_ATTRIBUTE_FIXED:
xmlBufferWriteChar(buf, " #FIXED");
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ATTRIBUTE struct corrupted invalid def\n",
NULL);
}
if (attr->defaultValue != NULL) {
xmlBufferWriteChar(buf, " ");
xmlBufferWriteQuotedString(buf, attr->defaultValue);
}
xmlBufferWriteChar(buf, ">\n");
}
/**
* xmlDumpAttributeDeclScan:
* @attr: An attribute declaration
* @buf: the XML buffer output
*
* This is used with the hash scan function - just reverses arguments
*/
static void
xmlDumpAttributeDeclScan(xmlAttributePtr attr, xmlBufferPtr buf) {
xmlDumpAttributeDecl(buf, attr);
}
/**
* xmlDumpAttributeTable:
* @buf: the XML buffer output
* @table: An attribute table
*
* This will dump the content of the attribute table as an XML DTD definition
*/
void
xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table) {
if ((buf == NULL) || (table == NULL))
return;
xmlHashScan(table, (xmlHashScanner) xmlDumpAttributeDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */
/************************************************************************
* *
* NOTATIONs *
@ -2462,61 +2150,6 @@ xmlCopyNotationTable(xmlNotationTablePtr table) {
}
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
/**
* xmlDumpNotationDecl:
* @buf: the XML buffer output
* @nota: A notation declaration
*
* This will dump the content the notation declaration as an XML DTD definition
*/
void
xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) {
if ((buf == NULL) || (nota == NULL))
return;
xmlBufferWriteChar(buf, "<!NOTATION ");
xmlBufferWriteCHAR(buf, nota->name);
if (nota->PublicID != NULL) {
xmlBufferWriteChar(buf, " PUBLIC ");
xmlBufferWriteQuotedString(buf, nota->PublicID);
if (nota->SystemID != NULL) {
xmlBufferWriteChar(buf, " ");
xmlBufferWriteQuotedString(buf, nota->SystemID);
}
} else {
xmlBufferWriteChar(buf, " SYSTEM ");
xmlBufferWriteQuotedString(buf, nota->SystemID);
}
xmlBufferWriteChar(buf, " >\n");
}
/**
* xmlDumpNotationDeclScan:
* @nota: A notation declaration
* @buf: the XML buffer output
*
* This is called with the hash scan function, and just reverses args
*/
static void
xmlDumpNotationDeclScan(xmlNotationPtr nota, xmlBufferPtr buf) {
xmlDumpNotationDecl(buf, nota);
}
/**
* xmlDumpNotationTable:
* @buf: the XML buffer output
* @table: A notation table
*
* This will dump the content of the notation table as an XML DTD definition
*/
void
xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
if ((buf == NULL) || (table == NULL))
return;
xmlHashScan(table, (xmlHashScanner) xmlDumpNotationDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */
/************************************************************************
* *
* IDs *

File diff suppressed because it is too large Load Diff

View File

@ -82,9 +82,6 @@
#ifdef LIBXML_C14N_ENABLED
#include <libxml/c14n.h>
#endif
#ifdef LIBXML_OUTPUT_ENABLED
#include <libxml/xmlsave.h>
#endif
#ifndef XML_XML_DEFAULT_CATALOG
#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
@ -114,12 +111,6 @@ static int noenc = 0;
static int noblanks = 0;
static int noout = 0;
static int nowrap = 0;
#ifdef LIBXML_OUTPUT_ENABLED
static int format = 0;
static const char *output = NULL;
static int compress = 0;
static int oldout = 0;
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
static int valid = 0;
static int postvalid = 0;
@ -1991,168 +1982,6 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
walkDoc(doc);
}
#endif /* LIBXML_READER_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
if (noout == 0) {
int ret;
/*
* print it.
*/
if ((timing) && (!repeat)) {
startTimer();
}
#ifdef LIBXML_C14N_ENABLED
if (canonical) {
xmlChar *result = NULL;
int size;
size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_0, NULL, 1, &result);
if (size >= 0) {
if (write(1, result, size) == -1) {
fprintf(stderr, "Can't write data\n");
}
xmlFree(result);
} else {
fprintf(stderr, "Failed to canonicalize\n");
progresult = XMLLINT_ERR_OUT;
}
} else if (canonical) {
xmlChar *result = NULL;
int size;
size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_1, NULL, 1, &result);
if (size >= 0) {
if (write(1, result, size) == -1) {
fprintf(stderr, "Can't write data\n");
}
xmlFree(result);
} else {
fprintf(stderr, "Failed to canonicalize\n");
progresult = XMLLINT_ERR_OUT;
}
} else
if (exc_canonical) {
xmlChar *result = NULL;
int size;
size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_EXCLUSIVE_1_0, NULL, 1, &result);
if (size >= 0) {
if (write(1, result, size) == -1) {
fprintf(stderr, "Can't write data\n");
}
xmlFree(result);
} else {
fprintf(stderr, "Failed to canonicalize\n");
progresult = XMLLINT_ERR_OUT;
}
} else
#endif
#ifdef HAVE_SYS_MMAN_H
if (memory) {
xmlChar *result;
int len;
if (encoding != NULL) {
if (format == 1) {
xmlDocDumpFormatMemoryEnc(doc, &result, &len, encoding, 1);
} else {
xmlDocDumpMemoryEnc(doc, &result, &len, encoding);
}
} else {
if (format == 1)
xmlDocDumpFormatMemory(doc, &result, &len, 1);
else
xmlDocDumpMemory(doc, &result, &len);
}
if (result == NULL) {
fprintf(stderr, "Failed to save\n");
progresult = XMLLINT_ERR_OUT;
} else {
if (write(1, result, len) == -1) {
fprintf(stderr, "Can't write data\n");
}
xmlFree(result);
}
} else
#endif /* HAVE_SYS_MMAN_H */
if (compress) {
xmlSaveFile(output ? output : "-", doc);
} else if (oldout) {
if (encoding != NULL) {
if (format == 1) {
ret = xmlSaveFormatFileEnc(output ? output : "-", doc,
encoding, 1);
}
else {
ret = xmlSaveFileEnc(output ? output : "-", doc,
encoding);
}
if (ret < 0) {
fprintf(stderr, "failed save to %s\n",
output ? output : "-");
progresult = XMLLINT_ERR_OUT;
}
} else if (format == 1) {
ret = xmlSaveFormatFile(output ? output : "-", doc, 1);
if (ret < 0) {
fprintf(stderr, "failed save to %s\n",
output ? output : "-");
progresult = XMLLINT_ERR_OUT;
}
} else {
FILE *out;
if (output == NULL)
out = stdout;
else {
out = fopen(output,"wb");
}
if (out != NULL) {
if (xmlDocDump(out, doc) < 0)
progresult = XMLLINT_ERR_OUT;
if (output != NULL)
fclose(out);
} else {
fprintf(stderr, "failed to open %s\n", output);
progresult = XMLLINT_ERR_OUT;
}
}
} else {
xmlSaveCtxtPtr ctxt;
int saveOpts = 0;
if (format == 1)
saveOpts |= XML_SAVE_FORMAT;
else if (format == 2)
saveOpts |= XML_SAVE_WSNONSIG;
#if defined(LIBXML_VALID_ENABLED)
if (xmlout)
saveOpts |= XML_SAVE_AS_XML;
#endif
if (output == NULL)
ctxt = xmlSaveToFd(1, encoding, saveOpts);
else
ctxt = xmlSaveToFilename(output, encoding, saveOpts);
if (ctxt != NULL) {
if (xmlSaveDoc(ctxt, doc) < 0) {
fprintf(stderr, "failed save to %s\n",
output ? output : "-");
progresult = XMLLINT_ERR_OUT;
}
xmlSaveClose(ctxt);
} else {
progresult = XMLLINT_ERR_OUT;
}
}
if ((timing) && (!repeat)) {
endTimer("Saving");
}
}
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
/*
@ -2296,11 +2125,7 @@ static void showVersion(const char *name) {
static void usage(const char *name) {
printf("Usage : %s [options] XMLfiles ...\n", name);
#ifdef LIBXML_OUTPUT_ENABLED
printf("\tParse the XML files and output the result of the parsing\n");
#else
printf("\tParse the XML files\n");
#endif /* LIBXML_OUTPUT_ENABLED */
printf("\t--version : display the version of the XML library used\n");
#ifdef LIBXML_READER_ENABLED
printf("\t--debug : dump the nodes content when using --stream\n");
@ -2330,11 +2155,6 @@ static void usage(const char *name) {
printf("\t--output file or -o file: save to a given file\n");
printf("\t--repeat : repeat 100 times, for timing or profiling\n");
printf("\t--insert : ad-hoc test for valid insertions\n");
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef HAVE_ZLIB_H
printf("\t--compress : turn on gzip compression of output\n");
#endif
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_PUSH_ENABLED
printf("\t--push : use the push mode of the parser\n");
#endif /* LIBXML_PUSH_ENABLED */
@ -2345,15 +2165,6 @@ static void usage(const char *name) {
printf("\t--nowarning : do not emit warnings from parser/validator\n");
printf("\t--noblanks : drop (ignorable?) blanks spaces\n");
printf("\t--nocdata : replace cdata section with text nodes\n");
#ifdef LIBXML_OUTPUT_ENABLED
printf("\t--format : reformat/reindent the input\n");
printf("\t--encode encoding : output in the given encoding\n");
printf("\t--dropdtd : remove the DOCTYPE of the input docs\n");
printf("\t--pretty STYLE : pretty-print in a particular style\n");
printf("\t 0 Do not pretty print\n");
printf("\t 1 Format the XML content, as --format\n");
printf("\t 2 Add whitespace inside tags, preserving content\n");
#endif /* LIBXML_OUTPUT_ENABLED */
printf("\t--c14n : save in W3C canonical format v1.0 (with comments)\n");
printf("\t--c14n11 : save in W3C canonical format v1.1 (with comments)\n");
printf("\t--exc-c14n : save in W3C exclusive canonical format (with comments)\n");
@ -2448,14 +2259,6 @@ main(int argc, char **argv) {
} else if ((!strcmp(argv[i], "-noout")) ||
(!strcmp(argv[i], "--noout")))
noout++;
#ifdef LIBXML_OUTPUT_ENABLED
else if ((!strcmp(argv[i], "-o")) ||
(!strcmp(argv[i], "-output")) ||
(!strcmp(argv[i], "--output"))) {
i++;
output = argv[i];
}
#endif /* LIBXML_OUTPUT_ENABLED */
else if ((!strcmp(argv[i], "-htmlout")) ||
(!strcmp(argv[i], "--htmlout")))
htmlout++;
@ -2528,15 +2331,6 @@ main(int argc, char **argv) {
else if ((!strcmp(argv[i], "-testIO")) ||
(!strcmp(argv[i], "--testIO")))
testIO++;
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef HAVE_ZLIB_H
else if ((!strcmp(argv[i], "-compress")) ||
(!strcmp(argv[i], "--compress"))) {
compress++;
xmlSetCompressMode(9);
}
#endif
#endif /* LIBXML_OUTPUT_ENABLED */
else if ((!strcmp(argv[i], "-nowarning")) ||
(!strcmp(argv[i], "--nowarning"))) {
xmlGetWarningsDefaultValue = 0;
@ -2593,17 +2387,11 @@ main(int argc, char **argv) {
else if ((!strcmp(argv[i], "-format")) ||
(!strcmp(argv[i], "--format"))) {
noblanks++;
#ifdef LIBXML_OUTPUT_ENABLED
format = 1;
#endif /* LIBXML_OUTPUT_ENABLED */
xmlKeepBlanksDefault(0);
}
else if ((!strcmp(argv[i], "-pretty")) ||
(!strcmp(argv[i], "--pretty"))) {
i++;
#ifdef LIBXML_OUTPUT_ENABLED
format = atoi(argv[i]);
#endif /* LIBXML_OUTPUT_ENABLED */
if (format == 1) {
noblanks++;
xmlKeepBlanksDefault(0);

File diff suppressed because it is too large Load Diff