Achieve xml -> hdr -> xml idempotency.

CVS patchset: 7341
CVS date: 2004/06/15 21:01:34
This commit is contained in:
jbj 2004-06-15 21:01:34 +00:00
parent a1af0d0f46
commit 3b8c7177a7
4 changed files with 9 additions and 1 deletions

View 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);

View File

@ -1,4 +1,5 @@
#include "system.h"
#include <header.h>
#define _RPMXP_INTERNAL
#include "rpmxp.h"
#include "debug.h"

BIN
tools/time.hdr Normal file

Binary file not shown.

BIN
tools/time.xmlhdr Normal file

Binary file not shown.