From: jbj Date: Mon, 14 Jun 2004 02:42:44 +0000 (+0000) Subject: Add version and DTD to xml output spew. X-Git-Tag: tznext/4.11.0.1.tizen20130304~6448 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d51df0eeb17c458c3bcd424a21842f05a8ed8b3;p=tools%2Flibrpm-tizen.git Add version and DTD to xml output spew. CVS patchset: 7316 CVS date: 2004/06/14 02:42:44 --- diff --git a/tools/rpmtool.c b/tools/rpmtool.c index b13cad9..8089924 100644 --- a/tools/rpmtool.c +++ b/tools/rpmtool.c @@ -8,6 +8,18 @@ #include "misc.h" #include "debug.h" +static const char * rpmxpDTD = "\ +\n\ +\n\ +\n\ +\n\ +\n\ +\n\ +\n\ +]>\n\ +"; + typedef enum rpmtoolComponentBits_e { RPMTOOL_NONE = 0, RPMTOOL_LEAD = (1 << 0), @@ -220,8 +232,10 @@ fprintf(stderr, "*** Fopen(%s,w.ufdio)\n", (ofn != NULL ? ofn : "-")); s = "[%{*:xml}\n]"; t = headerSprintf(h, s, rpmTagTable, rpmHeaderFormats, &errstr); - if (t != NULL) + if (t != NULL) { + Fwrite(rpmxpDTD, strlen(rpmxpDTD), 1, fdo); Fwrite(t, strlen(t), 1, fdo); + } t = _free(t); } else headerWrite(fdo, h, HEADER_MAGIC_YES); diff --git a/tools/time.xml b/tools/time.xml index d03f384..4fde1b1 100644 --- a/tools/time.xml +++ b/tools/time.xml @@ -2,8 +2,7 @@ - +