RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   24-Nov-2007 00:52:36
  Branch: HEAD                             Handle: 2007112323523501

  Modified files:
    rpm                     CHANGES
    rpm/rpmdb               pkgio.c rpmwf.c
    rpm/rpmio               rpmxar.c rpmxar.h

  Log:
    - display 1st 8 bytes of content for XAR archive members.
    - remove newlines in pkgio messages.
    - fix: padding between signature <-> metadata headers wrong, grr.

  Summary:
    Revision    Changes     Path
    1.1879      +3  -0      rpm/CHANGES
    1.58        +32 -31     rpm/rpmdb/pkgio.c
    1.20        +20 -7      rpm/rpmdb/rpmwf.c
    2.11        +14 -12     rpm/rpmio/rpmxar.c
    2.9         +7  -7      rpm/rpmio/rpmxar.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1878 -r1.1879 CHANGES
  --- rpm/CHANGES       23 Nov 2007 19:34:08 -0000      1.1878
  +++ rpm/CHANGES       23 Nov 2007 23:52:35 -0000      1.1879
  @@ -1,4 +1,7 @@
   5.0a2 -> 5.0a3:
  +    - jbj: display 1st 8 bytes of content for XAR archive members.
  +    - jbj: remove newlines in pkgio messages.
  +    - jbj: fix: padding between signature <-> metadata headers wrong, grr.
       - jbj: rpmxar.c: rearrange the messy markup and defines.
       - jbj: remove messy HAVE_XAR_H from installed rpmxar.h include.
       - jbj: retrofit 3 needed typedef's when compiling w/o HAVE_XAR_H.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.57 -r1.58 pkgio.c
  --- rpm/rpmdb/pkgio.c 23 Nov 2007 16:35:43 -0000      1.57
  +++ rpm/rpmdb/pkgio.c 23 Nov 2007 23:52:35 -0000      1.58
  @@ -536,7 +536,7 @@
       l->signature_type = (unsigned short) ntohs(l->signature_type);
   
       if (memcmp(l->magic, lead_magic, sizeof(l->magic))) {
  -     (void) snprintf(buf, sizeof(buf), _("lead magic: BAD"));
  +     (void) snprintf(buf, sizeof(buf), _("lead magic: BAD, read 
%02x%02x%02x%02x"), l->magic[0], l->magic[1], l->magic[2], l->magic[3]);
        rc = RPMRC_NOTFOUND;
        goto exit;
       }
  @@ -696,7 +696,7 @@
       }
       if ((xx = (int) timedRead(fd, (void *)block, sizeof(block))) != (int) 
sizeof(block)) {
        (void) snprintf(buf, sizeof(buf),
  -             _("sigh size(%d): BAD, read returned %d\n"), 
(int)sizeof(block), xx);
  +             _("sigh size(%d): BAD, read returned %d"), (int)sizeof(block), 
xx);
        goto exit;
       }
   
  @@ -708,21 +708,21 @@
            hmagic = sigh_magic;
   
        if (memcmp(block, hmagic, nmagic)) {
  -         (void) snprintf(buf, sizeof(buf),
  -             _("sigh magic: BAD\n"));
  +         unsigned char * x = (unsigned char *)block;
  +         (void) snprintf(buf, sizeof(buf), _("sigh magic: BAD, read 
%02x%02x%02x%02x%02x%02x%02x%02x"), x[0], x[1], x[2], x[3], x[4], x[5], x[6], 
x[7]);
            goto exit;
        }
       }
       il = (uint32_t) ntohl(block[2]);
       if (il > 32) {
        (void) snprintf(buf, sizeof(buf),
  -             _("sigh tags: BAD, no. of tags(%u) out of range\n"), (unsigned) 
il);
  +             _("sigh tags: BAD, no. of tags(%u) out of range"), (unsigned) 
il);
        goto exit;
       }
       dl = (uint32_t) ntohl(block[3]);
       if (dl > 8192) {
        (void) snprintf(buf, sizeof(buf),
  -             _("sigh data: BAD, no. of bytes(%u) out of range\n"), 
(unsigned) dl);
  +             _("sigh data: BAD, no. of bytes(%u) out of range"), (unsigned) 
dl);
        goto exit;
       }
   
  @@ -732,7 +732,7 @@
       ei = xmalloc(sizeof(il) + sizeof(dl) + nb);
       if ((xx = (int) timedRead(fd, (void *)&ei[2], nb)) != (int) nb) {
        (void) snprintf(buf, sizeof(buf),
  -             _("sigh blob(%u): BAD, read returned %d\n"), (unsigned) nb, xx);
  +             _("sigh blob(%u): BAD, read returned %d"), (unsigned) nb, xx);
        goto exit;
       }
       ei[0] = block[2];
  @@ -744,7 +744,7 @@
       xx = headerVerifyInfo(1, dl, pe, &entry->info, 0);
       if (xx != -1) {
        (void) snprintf(buf, sizeof(buf),
  -             _("tag[%d]: BAD, tag %u type %u offset %d count %u\n"),
  +             _("tag[%d]: BAD, tag %u type %u offset %d count %u"),
                0, (unsigned) entry->info.tag, (unsigned) entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
        goto exit;
  @@ -761,7 +761,7 @@
   assert(entry->info.offset > 0);      /* XXX insurance */
        if (entry->info.offset >= (int32_t)dl) {
            (void) snprintf(buf, sizeof(buf),
  -             _("region offset: BAD, tag %u type %u offset %d count %u\n"),
  +             _("region offset: BAD, tag %u type %u offset %d count %u"),
                (unsigned) entry->info.tag, (unsigned) entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
            goto exit;
  @@ -786,7 +786,7 @@
           && entry->info.count == REGION_TAG_COUNT))
        {
            (void) snprintf(buf, sizeof(buf),
  -             _("region trailer: BAD, tag %u type %u offset %d count %u\n"),
  +             _("region trailer: BAD, tag %u type %u offset %d count %u"),
                (unsigned) entry->info.tag, (unsigned) entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
            goto exit;
  @@ -798,7 +798,7 @@
        ril = (uint32_t) entry->info.offset/sizeof(*pe);
        if ((entry->info.offset % sizeof(*pe)) || ril > il) {
            (void) snprintf(buf, sizeof(buf),
  -             _("region size: BAD, ril(%u) > il(%u)\n"), (unsigned) ril, 
(unsigned) il);
  +             _("region size: BAD, ril(%u) > il(%u)"), (unsigned) ril, 
(unsigned) il);
            goto exit;
        }
       }
  @@ -809,7 +809,7 @@
        xx = headerVerifyInfo(1, dl, pe+i, &entry->info, 0);
        if (xx != -1) {
            (void) snprintf(buf, sizeof(buf),
  -             _("sigh tag[%u]: BAD, tag %u type %u offset %d count %u\n"),
  +             _("sigh tag[%u]: BAD, tag %u type %u offset %d count %u"),
                (unsigned) i, (unsigned) entry->info.tag, (unsigned) 
entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
            goto exit;
  @@ -819,7 +819,7 @@
       /* OK, blob looks sane, load the header. */
       sigh = headerLoad(ei);
       if (sigh == NULL) {
  -     (void) snprintf(buf, sizeof(buf), _("sigh load: BAD\n"));
  +     (void) snprintf(buf, sizeof(buf), _("sigh load: BAD"));
        goto exit;
       }
       sigh->flags |= HEADERFLAG_ALLOCATED;
  @@ -834,7 +834,7 @@
        if (pad && (xx = (int) timedRead(fd, (void *)block, pad)) != (int) pad)
        {
            (void) snprintf(buf, sizeof(buf),
  -             _("sigh pad(%u): BAD, read %d bytes\n"), (unsigned) pad, xx);
  +             _("sigh pad(%u): BAD, read %d bytes"), (unsigned) pad, xx);
            goto exit;
        }
   
  @@ -847,7 +847,7 @@
            rc = printSize(fd, sigSize, pad, datasize);
            if (rc != RPMRC_OK)
                (void) snprintf(buf, sizeof(buf),
  -                     _("sigh sigSize(%u): BAD, fstat(2) failed\n"), 
(unsigned) sigSize);
  +                     _("sigh sigSize(%u): BAD, fstat(2) failed"), (unsigned) 
sigSize);
        }
        he->p.ptr = _free(he->p.ptr);
       }
  @@ -912,7 +912,7 @@
       /* Is the blob the right size? */
       if (uc > 0 && pvlen != uc) {
        (void) snprintf(buf, sizeof(buf),
  -             _("blob size(%d): BAD, 8 + 16 * il(%u) + dl(%u)\n"),
  +             _("blob size(%d): BAD, 8 + 16 * il(%u) + dl(%u)"),
                (int)uc, (unsigned)il, (unsigned)dl);
        goto exit;
       }
  @@ -921,7 +921,7 @@
       xx = headerVerifyInfo(1, dl, pe, &entry->info, 0);
       if (xx != -1) {
        (void) snprintf(buf, sizeof(buf),
  -             _("tag[%d]: BAD, tag %u type %u offset %d count %u\n"),
  +             _("tag[%d]: BAD, tag %u type %u offset %d count %u"),
                0, (unsigned) entry->info.tag, (unsigned) entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
        goto exit;
  @@ -941,7 +941,7 @@
       /* Is the offset within the data area? */
       if (entry->info.offset >= (unsigned) dl) {
        (void) snprintf(buf, sizeof(buf),
  -             _("region offset: BAD, tag %u type %u offset %d count %u\n"),
  +             _("region offset: BAD, tag %u type %u offset %d count %u"),
                (unsigned) entry->info.tag, (unsigned) entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
        goto exit;
  @@ -960,7 +960,7 @@
          && entry->info.count == REGION_TAG_COUNT))
       {
        (void) snprintf(buf, sizeof(buf),
  -             _("region trailer: BAD, tag %u type %u offset %d count %u\n"),
  +             _("region trailer: BAD, tag %u type %u offset %d count %u"),
                (unsigned) entry->info.tag, (unsigned) entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
        goto exit;
  @@ -972,7 +972,7 @@
       ril = (uint32_t) entry->info.offset/sizeof(*pe);
       if ((entry->info.offset % sizeof(*pe)) || ril > il) {
        (void) snprintf(buf, sizeof(buf),
  -             _("region size: BAD, ril(%u) > il(%u)\n"), (unsigned) ril, 
(unsigned)il);
  +             _("region size: BAD, ril(%u) > il(%u)"), (unsigned) ril, 
(unsigned)il);
        goto exit;
       }
   
  @@ -981,7 +981,7 @@
        xx = headerVerifyInfo(1, dl, pe+i, &entry->info, 0);
        if (xx != -1) {
            (void) snprintf(buf, sizeof(buf),
  -             _("tag[%u]: BAD, tag %u type %u offset %d count %u\n"),
  +             _("tag[%u]: BAD, tag %u type %u offset %d count %u"),
                (unsigned) i, (unsigned) entry->info.tag, (unsigned) 
entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
            goto exit;
  @@ -999,7 +999,7 @@
            }
            if (entry->info.type != RPM_STRING_TYPE || *b != '\0' || blen != 40)
            {
  -             (void) snprintf(buf, sizeof(buf), _("hdr SHA1: BAD, not 
hex\n"));
  +             (void) snprintf(buf, sizeof(buf), _("hdr SHA1: BAD, not hex"));
                goto exit;
            }
            if (info->tag == 0) {
  @@ -1011,7 +1011,7 @@
            if (vsflags & RPMVSF_NORSAHEADER)
                /[EMAIL PROTECTED]@*/ break;
            if (entry->info.type != RPM_BIN_TYPE) {
  -             (void) snprintf(buf, sizeof(buf), _("hdr RSA: BAD, not 
binary\n"));
  +             (void) snprintf(buf, sizeof(buf), _("hdr RSA: BAD, not 
binary"));
                goto exit;
            }
            *info = entry->info;        /* structure assignment */
  @@ -1021,7 +1021,7 @@
            if (vsflags & RPMVSF_NODSAHEADER)
                /[EMAIL PROTECTED]@*/ break;
            if (entry->info.type != RPM_BIN_TYPE) {
  -             (void) snprintf(buf, sizeof(buf), _("hdr DSA: BAD, not 
binary\n"));
  +             (void) snprintf(buf, sizeof(buf), _("hdr DSA: BAD, not 
binary"));
                goto exit;
            }
            *info = entry->info;        /* structure assignment */
  @@ -1046,12 +1046,12 @@
        xx = (ril > 0 ? headerVerifyInfo(ril-1, dl, pe+1, &entry->info, 0) : 
-1);
        if (xx != -1) {
            (void) snprintf(buf, sizeof(buf),
  -             _("tag[%d]: BAD, tag %u type %u offset %d count %u\n"),
  +             _("tag[%d]: BAD, tag %u type %u offset %d count %u"),
                xx+1, (unsigned) entry->info.tag, (unsigned) entry->info.type,
                (int)entry->info.offset, (unsigned) entry->info.count);
            rc = RPMRC_FAIL;
        } else {
  -         (void) snprintf(buf, sizeof(buf), "Header sanity check: OK\n");
  +         (void) snprintf(buf, sizeof(buf), "Header sanity check: OK");
            rc = RPMRC_OK;
        }
        buf[sizeof(buf)-1] = '\0';
  @@ -1263,7 +1263,7 @@
       }
       if ((xx = (int) timedRead(fd, (char *)block, sizeof(block))) != 
(int)sizeof(block)) {
        (void) snprintf(buf, sizeof(buf),
  -             _("hdr size(%u): BAD, read returned %d\n"), 
(unsigned)sizeof(block), xx);
  +             _("hdr size(%u): BAD, read returned %d"), 
(unsigned)sizeof(block), xx);
        goto exit;
       }
   
  @@ -1271,14 +1271,15 @@
       nb = 0;
       (void) headerGetMagic(NULL, &b, &nb);
       if (memcmp(block, b, nb)) {
  -     (void) snprintf(buf, sizeof(buf), _("hdr magic: BAD\n"));
  +     unsigned char * x = (unsigned char *) block;
  +     (void) snprintf(buf, sizeof(buf), _("hdr magic: BAD, read 
%02x%02x%02x%02x%02x%02x%02x%02x"), x[0], x[1], x[2], x[3], x[4], x[5], x[6], 
x[7]);
        goto exit;
       }
   
       il = ntohl(block[2]);
       if (hdrchkTags(il)) {
        (void) snprintf(buf, sizeof(buf),
  -             _("hdr tags: BAD, no. of tags(%u) out of range\n"), (unsigned) 
il);
  +             _("hdr tags: BAD, no. of tags(%u) out of range"), (unsigned) 
il);
   
        goto exit;
       }
  @@ -1296,7 +1297,7 @@
       ei = (uint32_t *) xmalloc(uc);
       if ((xx = (int) timedRead(fd, (char *)&ei[2], nb)) != (int) nb) {
        (void) snprintf(buf, sizeof(buf),
  -             _("hdr blob(%u): BAD, read returned %d\n"), (unsigned)nb, xx);
  +             _("hdr blob(%u): BAD, read returned %d"), (unsigned)nb, xx);
        goto exit;
       }
       ei[0] = block[2];
  @@ -1380,7 +1381,7 @@
       else
       if (!strcmp(fn, "Signature")) {
        len = szHeader(ptr);
  -     len += (8 - (len % 8));   /* padding */
  +     len += ((8 - (len % 8)) % 8);   /* padding */
       } else
       if (!strcmp(fn, "Header"))
        len = szHeader(ptr);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmwf.c
  ============================================================================
  $ cvs diff -u -r1.19 -r1.20 rpmwf.c
  --- rpm/rpmdb/rpmwf.c 23 Nov 2007 18:29:01 -0000      1.19
  +++ rpm/rpmdb/rpmwf.c 23 Nov 2007 23:52:35 -0000      1.20
  @@ -136,7 +136,7 @@
   
        wf->s = wf->l + wf->nl;
        wf->ns = hSize((void *)wf->s);
  -     wf->ns += (8 - (wf->ns % 8));   /* padding */
  +     wf->ns += ((8 - (wf->ns % 8)) % 8);     /* padding */
   
        wf->h = wf->s + wf->ns;
        wf->nh = hSize((void *)wf->h);
  @@ -256,6 +256,22 @@
       return rpmwfLink(wf, "rpmwfNew");
   }
   
  +static void rpmwfDumpItem(const char * item, unsigned char * b, size_t bsize)
  +     /[EMAIL PROTECTED]/
  +{
  +    fprintf(stderr, "\t%s:\t%p[%u]\t%02x%02x%02x%02x%02x%02x%02x%02x\n", 
item, b, (unsigned)bsize, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]);
  +}
  +
  +static void rpmwfDump(rpmwf wf, const char * msg, const char * fn)
  +     /[EMAIL PROTECTED]/
  +{
  +    fprintf(stderr, "==> %s(%s) wf %p\n", msg, fn, wf);
  +    rpmwfDumpItem("     Lead", wf->l, wf->nl);
  +    rpmwfDumpItem("Signature", wf->s, wf->ns);
  +    rpmwfDumpItem("   Header", wf->h, wf->nh);
  +    rpmwfDumpItem("  Payload", wf->p, wf->np);
  +}
  +
   rpmwf rdRPM(const char * rpmfn)
   {
       rpmwf wf;
  @@ -269,8 +285,7 @@
        return NULL;
       }
   
  -if (_rpmwf_debug)
  -fprintf(stderr, "==> rdRPM(%s) wf %p\n\tLead %p[%u]\n\tSignature 
%p[%u]\n\tHeader %p[%u]\n\tPayload %p[%u]\n", rpmfn, wf, wf->l, 
(unsigned)wf->nl, wf->s, (unsigned) wf->ns, wf->h, (unsigned) wf->nh, wf->p, 
(unsigned) wf->np);
  +if (_rpmwf_debug) rpmwfDump(wf, "rdRPM", rpmfn);
   
       return wf;
   }
  @@ -293,8 +308,7 @@
        rc = rpmwfPullXAR(wf, NULL);
       wf->xar = rpmxarFree(wf->xar);
   
  -if (_rpmwf_debug)
  -fprintf(stderr, "==> rdXAR(%s) wf %p\n\tLead %p[%u]\n\tSignature 
%p[%u]\n\tHeader %p[%u]\n\tPayload %p[%u]\n", xarfn, wf, wf->l, 
(unsigned)wf->nl, wf->s, (unsigned) wf->ns, wf->h, (unsigned) wf->nh, wf->p, 
(unsigned) wf->np);
  +if (_rpmwf_debug) rpmwfDump(wf, "rdXAR", xarfn);
   
       return wf;
   }
  @@ -303,8 +317,7 @@
   {
       rpmRC rc;
   
  -if (_rpmwf_debug)
  -fprintf(stderr, "==> wrXAR(%s) wf %p\n\tLead %p[%u]\n\tSignature 
%p[%u]\n\tHeader %p[%u]\n\tPayload %p[%u]\n", xarfn, wf, wf->l, 
(unsigned)wf->nl, wf->s, (unsigned) wf->ns, wf->h, (unsigned) wf->nh, wf->p, 
(unsigned) wf->np);
  +if (_rpmwf_debug) rpmwfDump(wf, "wrXAR", xarfn);
   
       wf->xar = rpmxarNew(xarfn, "w");
       if (wf->xar == NULL)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmxar.c
  ============================================================================
  $ cvs diff -u -r2.10 -r2.11 rpmxar.c
  --- rpm/rpmio/rpmxar.c        23 Nov 2007 19:34:08 -0000      2.10
  +++ rpm/rpmio/rpmxar.c        23 Nov 2007 23:52:36 -0000      2.11
  @@ -147,13 +147,13 @@
       return (xar->f == NULL ? 1 : 0);
   }
   
  -int rpmxarPush(rpmxar xar, const char * fn, char * b, size_t bsize)
  +int rpmxarPush(rpmxar xar, const char * fn, unsigned char * b, size_t bsize)
   {
   if (_xar_debug)
  -fprintf(stderr, "--> rpmxarPush(%p, %s) %p[%u]\n", xar, fn, b, 
(unsigned)bsize);
  +fprintf(stderr, "--> rpmxarPush(%p, %s) %p[%u] 
%02x%02x%02x%02x%02x%02x%02x%02x\n", xar, fn, b, (unsigned)bsize, b[0], b[1], 
b[2], b[3], b[4], b[5], b[6], b[7]);
   
       if (xar->x && b != NULL) {
  -     xar->f = xar_add_frombuffer(xar->x, NULL, fn, b, bsize);
  +     xar->f = xar_add_frombuffer(xar->x, NULL, fn, (char *)b, bsize);
        if (xar->f == NULL)
            return 2;
       }
  @@ -176,23 +176,25 @@
       xar->bsize = xar->bx = 0;
   
   /[EMAIL PROTECTED] @*/
  -    rc = (int) xar_extract_tobuffersz(xar->x, xar->f, &xar->b, &xar->bsize);
  +    rc = (int) xar_extract_tobuffersz(xar->x, xar->f, (char **)&xar->b, 
&xar->bsize);
   /[EMAIL PROTECTED] @*/
  -
  -if (_xar_debug)
  -fprintf(stderr, "--> rpmxarPull(%p, %s) %p[%u] rc %d\n", xar, xar->member, 
xar->b, (unsigned)xar->bsize, rc);
  -
       if (rc)
        return 1;
   
  +if (_xar_debug) {
  +unsigned char * b = xar->b;
  +size_t bsize = xar->bsize;
  +fprintf(stderr, "--> rpmxarPull(%p, %s) %p[%u] 
%02x%02x%02x%02x%02x%02x%02x%02x\n", xar, fn, b, (unsigned)bsize, b[0], b[1], 
b[2], b[3], b[4], b[5], b[6], b[7]);
  +}
  +
       return 0;
   }
   
  -int rpmxarSwapBuf(rpmxar xar, char * b, size_t bsize,
  -             char ** obp, size_t * obsizep)
  +int rpmxarSwapBuf(rpmxar xar, unsigned char * b, size_t bsize,
  +             unsigned char ** obp, size_t * obsizep)
   {
   if (_xar_debug)
  -fprintf(stderr, "*** rpmxarSwapBuf(%p, %p[%u], %p, %p) %p[%u]\n", xar, b, 
(unsigned) bsize, obp, obsizep, xar->b, (unsigned) xar->bsize);
  +fprintf(stderr, "--> rpmxarSwapBuf(%p, %p[%u], %p, %p) %p[%u]\n", xar, b, 
(unsigned) bsize, obp, obsizep, xar->b, (unsigned) xar->bsize);
   
       if (xar) {
        if (obsizep != NULL)
  @@ -240,7 +242,7 @@
        rc = 0;
   
   if (_xar_debug)
  -fprintf(stderr, "*** xarRead(%p,%p,0x%x) %s %p[%u:%u] rc 0x%x\n", cookie, 
buf, (unsigned)count, (xar->member ? xar->member : "(nil)"), xar->b, 
(unsigned)xar->bx, (unsigned)xar->bsize, (unsigned)rc);
  +fprintf(stderr, "--> xarRead(%p,%p,0x%x) %s %p[%u:%u] rc 0x%x\n", cookie, 
buf, (unsigned)count, (xar->member ? xar->member : "(nil)"), xar->b, 
(unsigned)xar->bx, (unsigned)xar->bsize, (unsigned)rc);
   
       return rc;
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmxar.h
  ============================================================================
  $ cvs diff -u -r2.8 -r2.9 rpmxar.h
  --- rpm/rpmio/rpmxar.h        23 Nov 2007 19:34:08 -0000      2.8
  +++ rpm/rpmio/rpmxar.h        23 Nov 2007 23:52:36 -0000      2.9
  @@ -14,15 +14,15 @@
   #ifdef       _RPMXAR_INTERNAL
   struct rpmxar_s {
   /[EMAIL PROTECTED]@*/
  -    void * x;                        /*!< xar_t */
  +    const void * x;          /*!< xar_t */
   /[EMAIL PROTECTED]@*/
  -    void * f;                        /*!< xar_file_t */
  +    const void * f;          /*!< xar_file_t */
   /[EMAIL PROTECTED]@*/
  -    void * i;                        /*!< xar_iter_t */
  +    const void * i;          /*!< xar_iter_t */
   /[EMAIL PROTECTED]@*/
       const char * member;     /*!< Current archive member. */
   /[EMAIL PROTECTED]@*/
  -    char * b;                        /*!< Data buffer. */
  +    unsigned char * b;               /*!< Data buffer. */
       size_t bsize;            /*!< No. bytes of data. */
       size_t bx;                       /*!< Data byte index. */
       int first;
  @@ -87,7 +87,7 @@
        /[EMAIL PROTECTED] fileSystem @*/
        /[EMAIL PROTECTED] xar, fileSystem @*/;
   
  -int rpmxarPush(rpmxar xar, const char * fn, char * b, size_t bsize)
  +int rpmxarPush(rpmxar xar, const char * fn, unsigned char * b, size_t bsize)
        /[EMAIL PROTECTED] fileSystem @*/
        /[EMAIL PROTECTED] xar, fileSystem @*/;
   
  @@ -95,8 +95,8 @@
        /[EMAIL PROTECTED] fileSystem @*/
        /[EMAIL PROTECTED] xar, fileSystem @*/;
   
  -int rpmxarSwapBuf(rpmxar xar, /[EMAIL PROTECTED]@*/ char * b, size_t bsize,
  -             /[EMAIL PROTECTED]@*/ char ** obp, /[EMAIL PROTECTED]@*/ size_t 
* obsizep)
  +int rpmxarSwapBuf(rpmxar xar, /[EMAIL PROTECTED]@*/ unsigned char * b, 
size_t bsize,
  +             /[EMAIL PROTECTED]@*/ unsigned char ** obp, /[EMAIL 
PROTECTED]@*/ size_t * obsizep)
        /[EMAIL PROTECTED] fileSystem @*/
        /[EMAIL PROTECTED] xar, *obp, *obsizep, fileSystem @*/;
   
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to