Achieve xml -> hdr -> xml idempotency.
authorjbj <devnull@localhost>
Tue, 15 Jun 2004 21:01:34 +0000 (21:01 +0000)
committerjbj <devnull@localhost>
Tue, 15 Jun 2004 21:01:34 +0000 (21:01 +0000)
CVS patchset: 7341
CVS date: 2004/06/15 21:01:34

tools/rpmxml.c
tools/rpmxp.c
tools/time.hdr [new file with mode: 0644]
tools/time.xmlhdr [new file with mode: 0644]

index 9c16582..b691892 100644 (file)
@@ -179,13 +179,20 @@ printf("%d %d %s %d\n", xp->depth, xp->nodeType, xp->name, xp->isEmptyElement);
                (void) headerAddOrAppendEntry(xp->h, tte->val, tte->type, &i, 1);
            }   break;
            case RPM_INT32_TYPE:
-           {   int_32 i = strtol(xp->value, NULL, 0);
+           {   int_32 i = strtoll(xp->value, NULL, 0);
                (void) headerAddOrAppendEntry(xp->h, tte->val, tte->type, &i, 1);
            }   break;
            case RPM_STRING_TYPE:
            {   const char * s = xp->value;
                (void) headerAddEntry(xp->h, tte->val, tte->type, s, 1);
            }   break;
+           case RPM_BIN_TYPE:
+           {   const char * s = xp->value;
+               void * b;
+               size_t nb;
+               b64decode(s, &b, &nb);
+               (void) headerAddEntry(xp->h, tte->val, tte->type, b, nb);
+           }   break;
            case RPM_STRING_ARRAY_TYPE:
            {   const char * s = xp->value;
                (void) headerAddOrAppendEntry(xp->h, tte->val, tte->type, &s, 1);
index 1755c23..00f0e61 100644 (file)
@@ -1,4 +1,5 @@
 #include "system.h"
+#include <header.h>
 #define        _RPMXP_INTERNAL
 #include "rpmxp.h"
 #include "debug.h"
diff --git a/tools/time.hdr b/tools/time.hdr
new file mode 100644 (file)
index 0000000..66a4865
Binary files /dev/null and b/tools/time.hdr differ
diff --git a/tools/time.xmlhdr b/tools/time.xmlhdr
new file mode 100644 (file)
index 0000000..62e2193
Binary files /dev/null and b/tools/time.xmlhdr differ