version 1.19, 2007/08/21 20:29:25 |
version 1.20, 2008/11/20 12:14:16 |
|
|
keypos = keylist; |
keypos = keylist; |
nelem = 0; |
nelem = 0; |
crec = (RECHEADER *) buffer; |
crec = (RECHEADER *) buffer; |
while((c = get(binno, infiles, nfiles, crec, bufend, |
while ((c = get(binno, infiles, nfiles, crec, bufend, |
ftbl)) == 0) { |
ftbl)) == 0) { |
*keypos++ = crec->data + depth; |
*keypos++ = crec->data + depth; |
if (++nelem == MAXNUM) { |
if (++nelem == MAXNUM) { |
c = BUFFEND; |
c = BUFFEND; |
break; |
break; |
} |
} |
crec =(RECHEADER *) ((char *) crec + |
crec = (RECHEADER *)((char *)crec + |
SALIGN(crec->length) + sizeof(TRECHEADER)); |
SALIGN(crec->length) + sizeof(TRECHEADER)); |
} |
} |
/* |
/* |
* buffer was too small for data, allocate |
* buffer was too small for data, allocate |
|
|
bpmax = bin + 256; |
bpmax = bin + 256; |
tp = top, hp = histo; |
tp = top, hp = histo; |
for (bp = bin; bp < bpmax; bp++) { |
for (bp = bin; bp < bpmax; bp++) { |
*tp++ = *(bp+1) = *bp + (c = *hp); |
*tp++ = *(bp + 1) = *bp + (c = *hp); |
*hp++ = 0; |
*hp++ = 0; |
if (c <= 1) |
if (c <= 1) |
continue; |
continue; |
} |
} |
for (aj = a; aj < an; *aj = r, aj = bin[c+1]) |
for (aj = a; aj < an; *aj = r, aj = bin[c + 1]) |
for(r = *aj; aj < (ak = --top[c = tr[r[depth]]]) ;) |
for (r = *aj; aj < (ak = --top[c = tr[r[depth]]]); ) |
swap(*ak, r, t); |
swap(*ak, r, t); |
|
|
for (ak = a, c = 0; c < 256; c++) { |
for (ak = a, c = 0; c < 256; c++) { |
an = bin[c+1]; |
an = bin[c + 1]; |
n = an - ak; |
n = an - ak; |
tsizes[c] += n * sizeof(TRECHEADER); |
tsizes[c] += n * sizeof(TRECHEADER); |
/* tell getnext how many elements in this bin, this segment. */ |
/* tell getnext how many elements in this bin, this segment. */ |