const char *MANGLEP(tag);
-static void
+void
MANGLEP(describe) (SET *table)
{
unsigned i, j, collide;
while (ptr) {
if (collide) printf ("<%3d>", collide);
else printf ("table");
- printf ("[%d][%3d]: %u %p\n", i, j, ptr->entry.hash, ptr->entry.dptr);
+ printf ("[%d][%3d]: %u %p\n", i, j, ptr->entry.hash, (void *)ptr->entry.dptr);
ptr = ptr->chain;
collide++;
}
SET *table = xmalloc (sizeof (SET));
if (nslots > SEGMENT_SIZE * DIRECTORY_SIZE)
- nslots = SEGMENT_SIZE * DIRECTORY_SIZE;
+ nslots = DIRECTORY_SIZE;
else {
assert (nslots >= 0);
/* Adjust nslots up to next power of 2, minimum SEGMENT_SIZE */
for (i = SEGMENT_SIZE; i < nslots; i <<= 1);
+ nslots = i >> SEGMENT_SIZE_SHIFT;
}
- nslots = i >> SEGMENT_SIZE_SHIFT;
table->nseg = table->p = table->nkey = 0;
table->maxp = nslots << SEGMENT_SIZE_SHIFT;