--- src/lib/libc/db/hash/hash_bigkey.c 2005/09/19 09:20:37 1.7 +++ src/lib/libc/db/hash/hash_bigkey.c 2005/11/12 23:01:55 1.8 @@ -80,10 +80,7 @@ static int collect_data (HTAB *, BUFHEAD *-1 ==> ERROR */ extern int -__big_insert(hashp, bufp, key, val) - HTAB *hashp; - BUFHEAD *bufp; - const DBT *key, *val; +__big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) { u_int16_t *p; int key_size, n, val_size; @@ -179,9 +176,7 @@ __big_insert(hashp, bufp, key, val) *-1 => ERROR */ extern int -__big_delete(hashp, bufp) - HTAB *hashp; - BUFHEAD *bufp; +__big_delete(HTAB *hashp, BUFHEAD *bufp) { BUFHEAD *last_bfp, *rbufp; u_int16_t *bp, pageno; @@ -258,12 +253,7 @@ __big_delete(hashp, bufp) * -3 error */ extern int -__find_bigpair(hashp, bufp, ndx, key, size) - HTAB *hashp; - BUFHEAD *bufp; - int ndx; - const char *key; - int size; +__find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, const char *key, int size) { u_int16_t *bp; char *p; @@ -310,9 +300,7 @@ __find_bigpair(hashp, bufp, ndx, key, si * bucket) */ extern u_int16_t -__find_last_page(hashp, bpp) - HTAB *hashp; - BUFHEAD **bpp; +__find_last_page(HTAB *hashp, BUFHEAD **bpp) { BUFHEAD *bufp; u_int16_t *bp, pageno; @@ -351,12 +339,7 @@ __find_last_page(hashp, bpp) * index (index should always be 1). */ extern int -__big_return(hashp, bufp, ndx, val, set_current) - HTAB *hashp; - BUFHEAD *bufp; - int ndx; - DBT *val; - int set_current; +__big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current) { BUFHEAD *save_p; u_int16_t *bp, len, off, save_addr; @@ -442,10 +425,7 @@ __big_return(hashp, bufp, ndx, val, set_ * allocate a buffer and copy the data as you recurse up. */ static int -collect_data(hashp, bufp, len, set) - HTAB *hashp; - BUFHEAD *bufp; - int len, set; +collect_data(HTAB *hashp, BUFHEAD *bufp, int len, int set) { u_int16_t *bp; char *p; @@ -498,11 +478,7 @@ collect_data(hashp, bufp, len, set) * Fill in the key and data for this big pair. */ extern int -__big_keydata(hashp, bufp, key, val, set) - HTAB *hashp; - BUFHEAD *bufp; - DBT *key, *val; - int set; +__big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set) { key->size = collect_key(hashp, bufp, 0, val, set); if (key->size == -1) @@ -516,12 +492,7 @@ __big_keydata(hashp, bufp, key, val, set * collect the data, allocate a buffer and copy the key as you recurse up. */ static int -collect_key(hashp, bufp, len, val, set) - HTAB *hashp; - BUFHEAD *bufp; - int len; - DBT *val; - int set; +collect_key(HTAB *hashp, BUFHEAD *bufp, int len, DBT *val, int set) { BUFHEAD *xbp; char *p; @@ -561,15 +532,13 @@ collect_key(hashp, bufp, len, val, set) * -1 => error */ extern int -__big_split(hashp, op, np, big_keyp, addr, obucket, ret) - HTAB *hashp; - BUFHEAD *op; /* Pointer to where to put keys that go in old bucket */ - BUFHEAD *np; /* Pointer to new bucket page */ - /* Pointer to first page containing the big key/data */ - BUFHEAD *big_keyp; - int addr; /* Address of big_keyp */ - u_int32_t obucket;/* Old Bucket */ - SPLIT_RETURN *ret; +__big_split(HTAB *hashp, + BUFHEAD *op, /* Pointer to where to put keys that go in old bucket */ + BUFHEAD *np, /* Pointer to new bucket page */ + BUFHEAD *big_keyp, /* Pointer to first page containing the big key/data */ + int addr, /* Address of big_keyp */ + u_int32_t obucket, /* Old Bucket */ + SPLIT_RETURN *ret) { BUFHEAD *tmpp; u_int16_t *tp; @@ -603,7 +572,7 @@ __big_split(hashp, op, np, big_keyp, add tmpp->flags |= BUF_MOD; #ifdef DEBUG1 - (void)fprintf(stderr, + fprintf(stderr, "BIG_SPLIT: %d->ovfl was %d is now %d\n", tmpp->addr, (tmpp->ovfl ? tmpp->ovfl->addr : 0), (bp ? bp->addr : 0)); #endif