From 74f17442261a5e2182e7edef7c2bd4486b6cd5e6 Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Tue, 17 Jan 2012 13:50:06 +0100 Subject: [PATCH] Temporary skipp encoding convertion --- xml_dump.c | 14 ++++++-------- xml_dump_filelists.c | 3 ++- xml_dump_other.c | 3 ++- xml_dump_primary.c | 3 ++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/xml_dump.c b/xml_dump.c index fc256e5..721e60e 100644 --- a/xml_dump.c +++ b/xml_dump.c @@ -14,21 +14,18 @@ xmlChar * ConvertInput(const char *in, xmlCharEncodingHandlerPtr handler) { + return (xmlChar*) in; +/* xmlChar *out; int ret; int size; int out_size; int temp; - if (in == 0) { - return NULL; - } - - if (!handler) { + if (!in || !handler) { return (xmlChar*) in; } - size = (int) strlen(in) + 1; out_size = size * 2 - 1; out = (unsigned char *) xmlMalloc((size_t) out_size); @@ -52,13 +49,14 @@ ConvertInput(const char *in, xmlCharEncodingHandlerPtr handler) out = 0; } else { out = (unsigned char *) xmlRealloc(out, out_size + 1); - out[out_size] = 0; /*null terminating out */ + out[out_size] = 0; // null terminating out } } else { printf("ConvertInput: no mem\n"); } return out; +*/ } @@ -81,7 +79,7 @@ dump_files(xmlTextWriterPtr writer, Package *package, int primary, for(element = package->files; element; element=element->next) { PackageFile *entry = (PackageFile*) element->data; - // File withou name or path is suspicious => Skip it + // File without name or path is suspicious => Skip it if (!(entry->path)) { continue; } diff --git a/xml_dump_filelists.c b/xml_dump_filelists.c index f4f48af..14760f2 100644 --- a/xml_dump_filelists.c +++ b/xml_dump_filelists.c @@ -37,7 +37,8 @@ dump_filelists_items(xmlTextWriterPtr writer, Package *package, xmlCharEncodingH printf("CALLED dump_filelists_items\n"); #endif - rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL); + //rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL); + rc = xmlTextWriterStartDocument(writer, NULL, NULL, NULL); if (rc < 0) { printf ("Error at xmlTextWriterStartDocument\n"); return; diff --git a/xml_dump_other.c b/xml_dump_other.c index b93fb67..e74e378 100644 --- a/xml_dump_other.c +++ b/xml_dump_other.c @@ -102,7 +102,8 @@ dump_other_items(xmlTextWriterPtr writer, Package *package, xmlCharEncodingHandl printf("CALLED dump_other_items\n"); #endif - rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL); + //rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL); + rc = xmlTextWriterStartDocument(writer, NULL, NULL, NULL); if (rc < 0) { printf ("Error at xmlTextWriterStartDocument\n"); return; diff --git a/xml_dump_primary.c b/xml_dump_primary.c index bc43bac..21919ca 100644 --- a/xml_dump_primary.c +++ b/xml_dump_primary.c @@ -186,7 +186,8 @@ dump_base_items(xmlTextWriterPtr writer, Package *package, xmlCharEncodingHandle printf("CALLED dump_base_items\n"); #endif - rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL); + //rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL); + rc = xmlTextWriterStartDocument(writer, NULL, NULL, NULL); if (rc < 0) { printf ("Error at xmlTextWriterStartDocument\n"); return; -- 2.7.4