From 3b8c7177a73048d133aa783e4f7b8db184c85f28 Mon Sep 17 00:00:00 2001 From: jbj Date: Tue, 15 Jun 2004 21:01:34 +0000 Subject: [PATCH] Achieve xml -> hdr -> xml idempotency. CVS patchset: 7341 CVS date: 2004/06/15 21:01:34 --- tools/rpmxml.c | 9 ++++++++- tools/rpmxp.c | 1 + tools/time.hdr | Bin 0 -> 4196 bytes tools/time.xmlhdr | Bin 0 -> 4164 bytes 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tools/time.hdr create mode 100644 tools/time.xmlhdr diff --git a/tools/rpmxml.c b/tools/rpmxml.c index 9c16582..b691892 100644 --- a/tools/rpmxml.c +++ b/tools/rpmxml.c @@ -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); diff --git a/tools/rpmxp.c b/tools/rpmxp.c index 1755c23..00f0e61 100644 --- a/tools/rpmxp.c +++ b/tools/rpmxp.c @@ -1,4 +1,5 @@ #include "system.h" +#include #define _RPMXP_INTERNAL #include "rpmxp.h" #include "debug.h" diff --git a/tools/time.hdr b/tools/time.hdr new file mode 100644 index 0000000000000000000000000000000000000000..66a48650d2b257fa7a6f9681dfc006b7426d91af GIT binary patch literal 4196 zcmb_gU2Ggz6~6I0rQQ@1sYO7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T*NpI2}X!+8X`a;3}v$%v^gP1MB_;s zdl45=luQnqu$k(Hsldh~(UR{Y;-c(?dy=otKfSd5%>3G=3U3R0calRSmP$jchEQg! zFh{omAvl(w?|QN9AdaZ`3?Ju7J39p_jMK5$ z$2(B4grnBwd5UjRI0n>R=yoD3=1Y;tNm>b79MTiIS&}<=9Re(buuQ(hiuA%Aoy^Y; zd`4p77gzul4h7QjPnD~9ohR-($+HJ@(AG^T`6zOcPy~c&2>TrocrKk}D4y`1^kUkX zBn$NgzP!2xx7)j-g{ibGd1xS#>?c8i>}joKu;;~LpnN*6ZRQQqM_EPDfQ+QvLb@VN z<1@7XX)J=o&oTz2Nsi~zrcuu1kjG-$MhwfgLS+nXh(J!!LTfj2)Nvw3=*B9u&T-*5 zkf8=EI}goJhn0(#Am8y81%SH&LI;dv2@W?)b+cY-)M_R5g69z9-c_D>=@nKO{T7@1 z;^Qc1+1$`eYAB^Qs=^-3f?G!Lix8E?N?=ayIQ>uvWEYm6*PUymuUO%!GB31vp+nblmeMlR?WjBJ)sUgtkry(&coA!4DH{za zWZ|QbWpY|~z>yC=p*&gHMYb_EzqPow#+L$kIceh>?Wb&MW0_aV1q%u1#?}It`_k^F z!t$}zYe6b~UN2$2Nxp~ZM0u>q$G4u{dU`_L9m(~`dB#DTm0<3j2PTpZLk_8)cFOPH?;|^oeE1_Yhcb+E^3Atj{{H$ezWT3M xZ+zi9uYddcPqOTNyE_wFS0H&ip1}@nr|ft;&cc0chl1+=5N_YTMaS~=e*xapG#~%~ literal 0 HcmV?d00001 diff --git a/tools/time.xmlhdr b/tools/time.xmlhdr new file mode 100644 index 0000000000000000000000000000000000000000..62e219375b1177679e691e826b2e5bd4a2783587 GIT binary patch literal 4164 zcmb_fO>87b6|VJoLp&QckrD(%97-l)?X0I~dS*PH@s2nCiGO7_)_OM~N`hV8T|Lw5 zp6;f*$K%;tSaORHkpKzEB_P2GaSB3Q0vA9a@uLWF$pOuAS+O7@B?1u=zE@qdYsU#2 zq;0F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