diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-03-23 19:35:00 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-03-23 19:35:00 +0000 |
commit | 1a88b22742a7df6205d19a7ecf78aba3eda53a16 (patch) | |
tree | a45ce9ebf2f99c9486e0f0e47d77fa69a6265ccc /lib | |
parent | 68d8bc8b8c8f1e4de98ae6f483ac210dfdf13420 (diff) |
ansify. ok deraadt@ moritz@
Diffstat (limited to 'lib')
28 files changed, 232 insertions, 548 deletions
diff --git a/lib/libc/db/btree/bt_close.c b/lib/libc/db/btree/bt_close.c index bfc43aa5ce9..14d1180144c 100644 --- a/lib/libc/db/btree/bt_close.c +++ b/lib/libc/db/btree/bt_close.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_close.c,v 1.7 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_close.c,v 1.8 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_close.c 8.7 (Berkeley) 8/17/94"; #else -static const char rcsid[] = "$OpenBSD: bt_close.c,v 1.7 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_close.c,v 1.8 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -63,8 +63,7 @@ static int bt_meta(BTREE *); * RET_ERROR, RET_SUCCESS */ int -__bt_close(dbp) - DB *dbp; +__bt_close(DB *dbp) { BTREE *t; int fd; diff --git a/lib/libc/db/btree/bt_conv.c b/lib/libc/db/btree/bt_conv.c index c818dd9c4f0..5a7251fe400 100644 --- a/lib/libc/db/btree/bt_conv.c +++ b/lib/libc/db/btree/bt_conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_conv.c,v 1.7 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_conv.c,v 1.8 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_conv.c 8.5 (Berkeley) 8/17/94"; #else -static const char rcsid[] = "$OpenBSD: bt_conv.c,v 1.7 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_conv.c,v 1.8 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -60,10 +60,7 @@ static void mswap(PAGE *); * h: page to convert */ void -__bt_pgin(t, pg, pp) - void *t; - pgno_t pg; - void *pp; +__bt_pgin(void *t, pgno_t pg, void *pp) { PAGE *h; indx_t i, top; @@ -128,10 +125,7 @@ __bt_pgin(t, pg, pp) } void -__bt_pgout(t, pg, pp) - void *t; - pgno_t pg; - void *pp; +__bt_pgout(void *t, pgno_t pg, void *pp) { PAGE *h; indx_t i, top; @@ -202,8 +196,7 @@ __bt_pgout(t, pg, pp) * p: page to convert */ static void -mswap(pg) - PAGE *pg; +mswap(PAGE *pg) { char *p; diff --git a/lib/libc/db/btree/bt_debug.c b/lib/libc/db/btree/bt_debug.c index 4ec8d0b59f7..388b68cd133 100644 --- a/lib/libc/db/btree/bt_debug.c +++ b/lib/libc/db/btree/bt_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_debug.c,v 1.7 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_debug.c,v 1.8 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_debug.c 8.5 (Berkeley) 8/17/94"; #else -static const char rcsid[] = "$OpenBSD: bt_debug.c,v 1.7 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_debug.c,v 1.8 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -57,8 +57,7 @@ static const char rcsid[] = "$OpenBSD: bt_debug.c,v 1.7 2003/06/02 20:18:33 mill * dbp: pointer to the DB */ void -__bt_dump(dbp) - DB *dbp; +__bt_dump(DB *dbp) { BTREE *t; PAGE *h; @@ -100,8 +99,7 @@ __bt_dump(dbp) * h: pointer to the PAGE */ void -__bt_dmpage(h) - PAGE *h; +__bt_dmpage(PAGE *h) { BTMETA *m; char *sep; @@ -134,9 +132,7 @@ __bt_dmpage(h) * n: page number to dump. */ void -__bt_dnpage(dbp, pgno) - DB *dbp; - pgno_t pgno; +__bt_dnpage(DB *dbp, pgno_t pgno) { BTREE *t; PAGE *h; @@ -153,8 +149,7 @@ __bt_dnpage(dbp, pgno) * h: pointer to the PAGE */ void -__bt_dpage(h) - PAGE *h; +__bt_dpage(PAGE *h) { BINTERNAL *bi; BLEAF *bl; @@ -249,8 +244,7 @@ __bt_dpage(h) * dbp: pointer to the DB */ void -__bt_stat(dbp) - DB *dbp; +__bt_stat(DB *dbp) { extern u_long bt_cache_hit, bt_cache_miss, bt_pfxsaved, bt_rootsplit; extern u_long bt_sortsplit, bt_split; diff --git a/lib/libc/db/btree/bt_delete.c b/lib/libc/db/btree/bt_delete.c index a9d66dec560..9f5ca782c8a 100644 --- a/lib/libc/db/btree/bt_delete.c +++ b/lib/libc/db/btree/bt_delete.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_delete.c,v 1.9 2005/01/03 22:30:28 millert Exp $ */ +/* $OpenBSD: bt_delete.c,v 1.10 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_delete.c 8.13 (Berkeley) 7/28/94"; #else -static const char rcsid[] = "$OpenBSD: bt_delete.c,v 1.9 2005/01/03 22:30:28 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_delete.c,v 1.10 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -62,10 +62,7 @@ static int __bt_stkacq(BTREE *, PAGE **, CURSOR *); * Return RET_SPECIAL if the key is not found. */ int -__bt_delete(dbp, key, flags) - const DB *dbp; - const DBT *key; - u_int flags; +__bt_delete(const DB *dbp, const DBT *key, u_int flags) { BTREE *t; CURSOR *c; @@ -143,10 +140,7 @@ __bt_delete(dbp, key, flags) * 0 on success, 1 on failure */ static int -__bt_stkacq(t, hp, c) - BTREE *t; - PAGE **hp; - CURSOR *c; +__bt_stkacq(BTREE *t, PAGE **hp, CURSOR *c) { BINTERNAL *bi; EPG *e; @@ -290,9 +284,7 @@ ret: mpool_put(t->bt_mp, h, 0); * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found. */ static int -__bt_bdelete(t, key) - BTREE *t; - const DBT *key; +__bt_bdelete(BTREE *t, const DBT *key) { EPG *e; PAGE *h; @@ -377,9 +369,7 @@ loop: if ((e = __bt_search(t, key, &exact)) == NULL) * mpool_put's the page */ static int -__bt_pdelete(t, h) - BTREE *t; - PAGE *h; +__bt_pdelete(BTREE *t, PAGE *h) { BINTERNAL *bi; PAGE *pg; @@ -473,11 +463,7 @@ __bt_pdelete(t, h) * RET_SUCCESS, RET_ERROR. */ int -__bt_dleaf(t, key, h, idx) - BTREE *t; - const DBT *key; - PAGE *h; - u_int idx; +__bt_dleaf(BTREE *t, const DBT *key, PAGE *h, u_int idx) { BLEAF *bl; indx_t cnt, *ip, offset; @@ -538,11 +524,7 @@ __bt_dleaf(t, key, h, idx) * RET_SUCCESS, RET_ERROR. */ static int -__bt_curdel(t, key, h, idx) - BTREE *t; - const DBT *key; - PAGE *h; - u_int idx; +__bt_curdel(BTREE *t, const DBT *key, PAGE *h, u_int idx) { CURSOR *c; EPG e; @@ -637,9 +619,7 @@ dup2: c->pg.pgno = e.page->pgno; * h: page to be deleted */ static int -__bt_relink(t, h) - BTREE *t; - PAGE *h; +__bt_relink(BTREE *t, PAGE *h) { PAGE *pg; diff --git a/lib/libc/db/btree/bt_get.c b/lib/libc/db/btree/bt_get.c index 34fb7185abd..9563d6be6dc 100644 --- a/lib/libc/db/btree/bt_get.c +++ b/lib/libc/db/btree/bt_get.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_get.c,v 1.6 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_get.c,v 1.7 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_get.c 8.6 (Berkeley) 7/20/94"; #else -static const char rcsid[] = "$OpenBSD: bt_get.c,v 1.6 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_get.c,v 1.7 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -62,11 +62,7 @@ static const char rcsid[] = "$OpenBSD: bt_get.c,v 1.6 2003/06/02 20:18:33 miller * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found. */ int -__bt_get(dbp, key, data, flags) - const DB *dbp; - const DBT *key; - DBT *data; - u_int flags; +__bt_get(const DB *dbp, const DBT *key, DBT *data, u_int flags) { BTREE *t; EPG *e; diff --git a/lib/libc/db/btree/bt_open.c b/lib/libc/db/btree/bt_open.c index ddb0ccec415..618369697de 100644 --- a/lib/libc/db/btree/bt_open.c +++ b/lib/libc/db/btree/bt_open.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_open.c,v 1.11 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_open.c,v 1.12 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_open.c 8.11 (Berkeley) 11/2/95"; #else -static const char rcsid[] = "$OpenBSD: bt_open.c,v 1.11 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_open.c,v 1.12 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -89,10 +89,8 @@ static int tmp(void); * */ DB * -__bt_open(fname, flags, mode, openinfo, dflags) - const char *fname; - int flags, mode, dflags; - const BTREEINFO *openinfo; +__bt_open(const char *fname, int flags, int mode, const BTREEINFO *openinfo, + int dflags) { struct stat sb; BTMETA m; @@ -352,8 +350,7 @@ err: if (t) { * RET_ERROR, RET_SUCCESS */ static int -nroot(t) - BTREE *t; +nroot(BTREE *t) { PAGE *meta, *root; pgno_t npg; @@ -393,7 +390,7 @@ nroot(t) } static int -tmp() +tmp(void) { sigset_t set, oset; int fd; @@ -414,7 +411,7 @@ tmp() } static int -byteorder() +byteorder(void) { u_int32_t x; u_char *p; @@ -432,8 +429,7 @@ byteorder() } int -__bt_fd(dbp) - const DB *dbp; +__bt_fd(const DB *dbp) { BTREE *t; diff --git a/lib/libc/db/btree/bt_overflow.c b/lib/libc/db/btree/bt_overflow.c index 265717f0127..ff7fd38abdf 100644 --- a/lib/libc/db/btree/bt_overflow.c +++ b/lib/libc/db/btree/bt_overflow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_overflow.c,v 1.7 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_overflow.c,v 1.8 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_overflow.c 8.5 (Berkeley) 7/16/94"; #else -static const char rcsid[] = "$OpenBSD: bt_overflow.c,v 1.7 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_overflow.c,v 1.8 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -79,12 +79,7 @@ static const char rcsid[] = "$OpenBSD: bt_overflow.c,v 1.7 2003/06/02 20:18:33 m * RET_ERROR, RET_SUCCESS */ int -__ovfl_get(t, p, ssz, buf, bufsz) - BTREE *t; - void *p; - size_t *ssz; - void **buf; - size_t *bufsz; +__ovfl_get(BTREE *t, void *p, size_t *ssz, void **buf, size_t *bufsz) { PAGE *h; pgno_t pg; @@ -140,10 +135,7 @@ __ovfl_get(t, p, ssz, buf, bufsz) * RET_ERROR, RET_SUCCESS */ int -__ovfl_put(t, dbt, pg) - BTREE *t; - const DBT *dbt; - pgno_t *pg; +__ovfl_put(BTREE *t, const DBT *dbt, pgno_t *pg) { PAGE *h, *last; void *p; @@ -194,9 +186,7 @@ __ovfl_put(t, dbt, pg) * RET_ERROR, RET_SUCCESS */ int -__ovfl_delete(t, p) - BTREE *t; - void *p; +__ovfl_delete(BTREE *t, void *p) { PAGE *h; pgno_t pg; diff --git a/lib/libc/db/btree/bt_page.c b/lib/libc/db/btree/bt_page.c index d6b6264fd97..a820f1d1eff 100644 --- a/lib/libc/db/btree/bt_page.c +++ b/lib/libc/db/btree/bt_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_page.c,v 1.7 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_page.c,v 1.8 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)bt_page.c 8.3 (Berkeley) 7/14/94"; #else -static const char rcsid[] = "$OpenBSD: bt_page.c,v 1.7 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_page.c,v 1.8 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -59,9 +59,7 @@ static const char rcsid[] = "$OpenBSD: bt_page.c,v 1.7 2003/06/02 20:18:33 mille * mpool_put's the page. */ int -__bt_free(t, h) - BTREE *t; - PAGE *h; +__bt_free(BTREE *t, PAGE *h) { /* Insert the page at the head of the free list. */ h->prevpg = P_INVALID; @@ -85,9 +83,7 @@ __bt_free(t, h) * Pointer to a page, NULL on error. */ PAGE * -__bt_new(t, npg) - BTREE *t; - pgno_t *npg; +__bt_new(BTREE *t, pgno_t *npg) { PAGE *h; diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c index b969232e901..a106a7231e6 100644 --- a/lib/libc/db/btree/bt_put.c +++ b/lib/libc/db/btree/bt_put.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_put.c,v 1.11 2005/01/03 22:30:28 millert Exp $ */ +/* $OpenBSD: bt_put.c,v 1.12 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_put.c 8.8 (Berkeley) 7/26/94"; #else -static const char rcsid[] = "$OpenBSD: bt_put.c,v 1.11 2005/01/03 22:30:28 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_put.c,v 1.12 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -66,11 +66,7 @@ static EPG *bt_fast(BTREE *, const DBT *, const DBT *, int *); * tree and R_NOOVERWRITE specified. */ int -__bt_put(dbp, key, data, flags) - const DB *dbp; - DBT *key; - const DBT *data; - u_int flags; +__bt_put(const DB *dbp, DBT *key, const DBT *data, u_int flags) { BTREE *t; DBT tkey, tdata; @@ -268,10 +264,7 @@ u_long bt_cache_hit, bt_cache_miss; * EPG for new record or NULL if not found. */ static EPG * -bt_fast(t, key, data, exactp) - BTREE *t; - const DBT *key, *data; - int *exactp; +bt_fast(BTREE *t, const DBT *key, const DBT *data, int *exactp) { PAGE *h; u_int32_t nbytes; diff --git a/lib/libc/db/btree/bt_search.c b/lib/libc/db/btree/bt_search.c index d198f774e0e..21c2b35bd9a 100644 --- a/lib/libc/db/btree/bt_search.c +++ b/lib/libc/db/btree/bt_search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_search.c,v 1.8 2005/01/03 22:30:28 millert Exp $ */ +/* $OpenBSD: bt_search.c,v 1.9 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_search.c 8.8 (Berkeley) 7/31/94"; #else -static const char rcsid[] = "$OpenBSD: bt_search.c,v 1.8 2005/01/03 22:30:28 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_search.c,v 1.9 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -65,10 +65,7 @@ static int __bt_sprev(BTREE *, PAGE *, const DBT *, int *); * the bt_cur field of the tree. A pointer to the field is returned. */ EPG * -__bt_search(t, key, exactp) - BTREE *t; - const DBT *key; - int *exactp; +__bt_search(BTREE *t, const DBT *key, int *exactp) { PAGE *h; indx_t base, idx, lim; @@ -150,11 +147,7 @@ next: BT_PUSH(t, h->pgno, idx); * If an exact match found. */ static int -__bt_snext(t, h, key, exactp) - BTREE *t; - PAGE *h; - const DBT *key; - int *exactp; +__bt_snext(BTREE *t, PAGE *h, const DBT *key, int *exactp) { EPG e; @@ -189,11 +182,7 @@ __bt_snext(t, h, key, exactp) * If an exact match found. */ static int -__bt_sprev(t, h, key, exactp) - BTREE *t; - PAGE *h; - const DBT *key; - int *exactp; +__bt_sprev(BTREE *t, PAGE *h, const DBT *key, int *exactp) { EPG e; diff --git a/lib/libc/db/btree/bt_seq.c b/lib/libc/db/btree/bt_seq.c index 11aa34be35c..64b3819aa48 100644 --- a/lib/libc/db/btree/bt_seq.c +++ b/lib/libc/db/btree/bt_seq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_seq.c,v 1.9 2005/01/03 22:30:28 millert Exp $ */ +/* $OpenBSD: bt_seq.c,v 1.10 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_seq.c 8.7 (Berkeley) 7/20/94"; #else -static const char rcsid[] = "$OpenBSD: bt_seq.c,v 1.9 2005/01/03 22:30:28 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_seq.c,v 1.10 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -76,10 +76,7 @@ static int __bt_seqset(BTREE *, EPG *, DBT *, int); * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key. */ int -__bt_seq(dbp, key, data, flags) - const DB *dbp; - DBT *key, *data; - u_int flags; +__bt_seq(const DB *dbp, DBT *key, DBT *data, u_int flags) { BTREE *t; EPG e; @@ -151,11 +148,7 @@ __bt_seq(dbp, key, data, flags) * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key. */ static int -__bt_seqset(t, ep, key, flags) - BTREE *t; - EPG *ep; - DBT *key; - int flags; +__bt_seqset(BTREE *t, EPG *ep, DBT *key, int flags) { PAGE *h; pgno_t pg; @@ -239,10 +232,7 @@ __bt_seqset(t, ep, key, flags) * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key. */ static int -__bt_seqadv(t, ep, flags) - BTREE *t; - EPG *ep; - int flags; +__bt_seqadv(BTREE *t, EPG *ep, int flags) { CURSOR *c; PAGE *h; @@ -341,11 +331,7 @@ usecurrent: F_CLR(c, CURS_AFTER | CURS_BEFORE); * or RET_SPECIAL if no such key exists. */ static int -__bt_first(t, key, erval, exactp) - BTREE *t; - const DBT *key; - EPG *erval; - int *exactp; +__bt_first(BTREE *t, const DBT *key, EPG *erval, int *exactp) { PAGE *h; EPG *ep, save; @@ -442,10 +428,7 @@ __bt_first(t, key, erval, exactp) * idx: page index */ void -__bt_setcur(t, pgno, idx) - BTREE *t; - pgno_t pgno; - u_int idx; +__bt_setcur(BTREE *t, pgno_t pgno, u_int idx) { /* Lose any already deleted key. */ if (t->bt_cursor.key.data != NULL) { diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index b96cdc0fd3a..d96f12bea6e 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_split.c,v 1.11 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: bt_split.c,v 1.12 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_split.c 8.10 (Berkeley) 1/9/95"; #else -static const char rcsid[] = "$OpenBSD: bt_split.c,v 1.11 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_split.c,v 1.12 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -78,13 +78,8 @@ u_long bt_rootsplit, bt_split, bt_sortsplit, bt_pfxsaved; * RET_ERROR, RET_SUCCESS */ int -__bt_split(t, sp, key, data, flags, ilen, argskip) - BTREE *t; - PAGE *sp; - const DBT *key, *data; - int flags; - size_t ilen; - u_int32_t argskip; +__bt_split(BTREE *t, PAGE *sp, const DBT *key, const DBT *data, int flags, + size_t ilen, u_int32_t argskip) { BINTERNAL *bi; BLEAF *bl, *tbl; @@ -340,11 +335,7 @@ err2: mpool_put(t->bt_mp, l, 0); * Pointer to page in which to insert or NULL on error. */ static PAGE * -bt_page(t, h, lp, rp, skip, ilen) - BTREE *t; - PAGE *h, **lp, **rp; - indx_t *skip; - size_t ilen; +bt_page(BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, indx_t *skip, size_t ilen) { PAGE *l, *r, *tp; pgno_t npg; @@ -443,11 +434,7 @@ bt_page(t, h, lp, rp, skip, ilen) * Pointer to page in which to insert or NULL on error. */ static PAGE * -bt_root(t, h, lp, rp, skip, ilen) - BTREE *t; - PAGE *h, **lp, **rp; - indx_t *skip; - size_t ilen; +bt_root(BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, indx_t *skip, size_t ilen) { PAGE *l, *r, *tp; pgno_t lnpg, rnpg; @@ -490,9 +477,7 @@ bt_root(t, h, lp, rp, skip, ilen) * RET_ERROR, RET_SUCCESS */ static int -bt_rroot(t, h, l, r) - BTREE *t; - PAGE *h, *l, *r; +bt_rroot(BTREE *t, PAGE *h, PAGE *l, PAGE *r) { char *dest; @@ -530,9 +515,7 @@ bt_rroot(t, h, l, r) * RET_ERROR, RET_SUCCESS */ static int -bt_broot(t, h, l, r) - BTREE *t; - PAGE *h, *l, *r; +bt_broot(BTREE *t, PAGE *h, PAGE *l, PAGE *r) { BINTERNAL *bi; BLEAF *bl; @@ -607,11 +590,7 @@ bt_broot(t, h, l, r) * Pointer to page in which to insert. */ static PAGE * -bt_psplit(t, h, l, r, pskip, ilen) - BTREE *t; - PAGE *h, *l, *r; - indx_t *pskip; - size_t ilen; +bt_psplit(BTREE *t, PAGE *h, PAGE *l, PAGE *r, indx_t *pskip, size_t ilen) { BINTERNAL *bi; BLEAF *bl; @@ -785,9 +764,7 @@ bt_psplit(t, h, l, r, pskip, ilen) * RET_SUCCESS, RET_ERROR. */ static int -bt_preserve(t, pg) - BTREE *t; - pgno_t pg; +bt_preserve(BTREE *t, pgno_t pg) { PAGE *h; @@ -813,8 +790,7 @@ bt_preserve(t, pg) * all the way back to bt_split/bt_rroot and it's not very clean. */ static recno_t -rec_total(h) - PAGE *h; +rec_total(PAGE *h) { recno_t recs; indx_t nxt, top; diff --git a/lib/libc/db/btree/bt_utils.c b/lib/libc/db/btree/bt_utils.c index a64d5cddf39..8f816bbecca 100644 --- a/lib/libc/db/btree/bt_utils.c +++ b/lib/libc/db/btree/bt_utils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_utils.c,v 1.7 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: bt_utils.c,v 1.8 2005/03/23 19:34:58 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)bt_utils.c 8.8 (Berkeley) 7/20/94"; #else -static const char rcsid[] = "$OpenBSD: bt_utils.c,v 1.7 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: bt_utils.c,v 1.8 2005/03/23 19:34:58 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -66,11 +66,7 @@ static const char rcsid[] = "$OpenBSD: bt_utils.c,v 1.7 2005/01/03 22:46:43 mill * RET_SUCCESS, RET_ERROR. */ int -__bt_ret(t, e, key, rkey, data, rdata, copy) - BTREE *t; - EPG *e; - DBT *key, *rkey, *data, *rdata; - int copy; +__bt_ret(BTREE *t, EPG *e, DBT *key, DBT *rkey, DBT *data, DBT *rdata, int copy) { BLEAF *bl; void *p; @@ -152,10 +148,7 @@ dataonly: * > 0 if k1 is > record */ int -__bt_cmp(t, k1, e) - BTREE *t; - const DBT *k1; - EPG *e; +__bt_cmp(BTREE *t, const DBT *k1, EPG *e) { BINTERNAL *bi; BLEAF *bl; @@ -215,8 +208,7 @@ __bt_cmp(t, k1, e) * > 0 if a is > b */ int -__bt_defcmp(a, b) - const DBT *a, *b; +__bt_defcmp(const DBT *a, const DBT *b) { size_t len; u_char *p1, *p2; diff --git a/lib/libc/db/db/db.c b/lib/libc/db/db/db.c index 779b86ddf47..066bda92bae 100644 --- a/lib/libc/db/db/db.c +++ b/lib/libc/db/db/db.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db.c,v 1.8 2003/06/25 21:15:04 deraadt Exp $ */ +/* $OpenBSD: db.c,v 1.9 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94"; #else -static const char rcsid[] = "$OpenBSD: db.c,v 1.8 2003/06/25 21:15:04 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: db.c,v 1.9 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -49,11 +49,8 @@ static const char rcsid[] = "$OpenBSD: db.c,v 1.8 2003/06/25 21:15:04 deraadt Ex static int __dberr(void); DB * -dbopen(fname, flags, mode, type, openinfo) - const char *fname; - int flags, mode; - DBTYPE type; - const void *openinfo; +dbopen(const char *fname, int flags, int mode, DBTYPE type, + const void *openinfo) { #define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN) @@ -90,8 +87,7 @@ __dberr(void) * dbp: pointer to the DB structure. */ void -__dbpanic(dbp) - DB *dbp; +__dbpanic(DB *dbp) { /* The only thing that can succeed is a close. */ dbp->del = (int (*)(const struct __db *, const DBT*, u_int))__dberr; diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index ede3945a875..b2b5b6c40e3 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash.c,v 1.18 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash.c,v 1.19 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94"; #else -static const char rcsid[] = "$OpenBSD: hash.c,v 1.18 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash.c,v 1.19 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -95,13 +95,10 @@ int hash_accesses, hash_collisions, hash_expansions, hash_overflows; /* OPEN/CLOSE */ /* ARGSUSED */ -extern DB * -__hash_open(file, flags, mode, info, dflags) - const char *file; - int flags; - int mode; - const HASHINFO *info; /* Special directives for create */ - int dflags; +DB * +__hash_open(const char *file, int flags, int mode, + const HASHINFO *info, /* Special directives for create */ + int dflags) { HTAB *hashp; struct stat statbuf; @@ -244,8 +241,7 @@ error0: } static int -hash_close(dbp) - DB *dbp; +hash_close(DB *dbp) { HTAB *hashp; int retval; @@ -260,8 +256,7 @@ hash_close(dbp) } static int -hash_fd(dbp) - const DB *dbp; +hash_fd(const DB *dbp) { HTAB *hashp; @@ -278,10 +273,7 @@ hash_fd(dbp) /************************** LOCAL CREATION ROUTINES **********************/ static HTAB * -init_hash(hashp, file, info) - HTAB *hashp; - const char *file; - HASHINFO *info; +init_hash(HTAB *hashp, const char *file, HASHINFO *info) { struct stat statbuf; int nelem; @@ -345,9 +337,7 @@ init_hash(hashp, file, info) * Returns 0 on No Error */ static int -init_htab(hashp, nelem) - HTAB *hashp; - int nelem; +init_htab(HTAB *hashp, int nelem) { int nbuckets, nsegs, l2; @@ -390,8 +380,7 @@ init_htab(hashp, nelem) * structure, freeing all allocated space. */ static int -hdestroy(hashp) - HTAB *hashp; +hdestroy(HTAB *hashp) { int i, save_errno; @@ -454,9 +443,7 @@ hdestroy(hashp) * -1 ERROR */ static int -hash_sync(dbp, flags) - const DB *dbp; - u_int32_t flags; +hash_sync(const DB *dbp, u_int32_t flags) { HTAB *hashp; @@ -483,8 +470,7 @@ hash_sync(dbp, flags) * -1 indicates that errno should be set */ static int -flush_meta(hashp) - HTAB *hashp; +flush_meta(HTAB *hashp) { HASHHDR *whdrp; #if BYTE_ORDER == LITTLE_ENDIAN @@ -530,11 +516,7 @@ flush_meta(hashp) * -1 to indicate an internal ERROR (i.e. out of memory, etc) */ static int -hash_get(dbp, key, data, flag) - const DB *dbp; - const DBT *key; - DBT *data; - u_int32_t flag; +hash_get(const DB *dbp, const DBT *key, DBT *data, u_int32_t flag) { HTAB *hashp; @@ -547,11 +529,7 @@ hash_get(dbp, key, data, flag) } static int -hash_put(dbp, key, data, flag) - const DB *dbp; - DBT *key; - const DBT *data; - u_int32_t flag; +hash_put(const DB *dbp, DBT *key, const DBT *data, u_int32_t flag) { HTAB *hashp; @@ -569,10 +547,8 @@ hash_put(dbp, key, data, flag) } static int -hash_delete(dbp, key, flag) - const DB *dbp; - const DBT *key; - u_int32_t flag; /* Ignored */ +hash_delete(const DB *dbp, const DBT *key, + u_int32_t flag) /* Ignored */ { HTAB *hashp; @@ -592,10 +568,7 @@ hash_delete(dbp, key, flag) * Assume that hashp has been set in wrapper routine. */ static int -hash_access(hashp, action, key, val) - HTAB *hashp; - ACTION action; - DBT *key, *val; +hash_access(HTAB *hashp, ACTION action, DBT *key, DBT *val) { BUFHEAD *rbufp; BUFHEAD *bufp, *save_bufp; @@ -721,10 +694,7 @@ found: } static int -hash_seq(dbp, key, data, flag) - const DB *dbp; - DBT *key, *data; - u_int32_t flag; +hash_seq(const DB *dbp, DBT *key, DBT *data, u_int32_t flag) { u_int32_t bucket; BUFHEAD *bufp; @@ -810,9 +780,8 @@ hash_seq(dbp, key, data, flag) * 0 ==> OK * -1 ==> Error */ -extern int -__expand_table(hashp) - HTAB *hashp; +int +__expand_table(HTAB *hashp) { u_int32_t old_bucket, new_bucket; int dirsize, new_segnum, spare_ndx; @@ -866,9 +835,7 @@ __expand_table(hashp) * fails, then this routine can go away. */ static void * -hash_realloc(p_ptr, oldsize, newsize) - SEGMENT **p_ptr; - int oldsize, newsize; +hash_realloc(SEGMENT **p_ptr, int oldsize, int newsize) { void *p; @@ -881,11 +848,8 @@ hash_realloc(p_ptr, oldsize, newsize) return (p); } -extern u_int32_t -__call_hash(hashp, k, len) - HTAB *hashp; - char *k; - int len; +u_int32_t +__call_hash(HTAB *hashp, char *k, int len) { int n, bucket; @@ -902,9 +866,7 @@ __call_hash(hashp, k, len) * Returns 0 on success */ static int -alloc_segs(hashp, nsegs) - HTAB *hashp; - int nsegs; +alloc_segs(HTAB *hashp, int nsegs) { int i; SEGMENT store; @@ -936,8 +898,7 @@ alloc_segs(hashp, nsegs) * Hashp->hdr needs to be byteswapped. */ static void -swap_header_copy(srcp, destp) - HASHHDR *srcp, *destp; +swap_header_copy(HASHHDR *srcp, HASHHDR *destp) { int i; @@ -965,8 +926,7 @@ swap_header_copy(srcp, destp) } static void -swap_header(hashp) - HTAB *hashp; +swap_header(HTAB *hashp) { HASHHDR *hdrp; int i; diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c index fd51e40d7aa..2b67c093d19 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_bigkey.c,v 1.14 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash_bigkey.c,v 1.15 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94"; #else -static const char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.14 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.15 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -86,11 +86,8 @@ static int collect_data(HTAB *, BUFHEAD *, int, int); * 0 ==> OK *-1 ==> ERROR */ -extern int -__big_insert(hashp, bufp, key, val) - HTAB *hashp; - BUFHEAD *bufp; - const DBT *key, *val; +int +__big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) { u_int16_t *p; int key_size, n, val_size; @@ -198,10 +195,8 @@ __big_insert(hashp, bufp, key, val) * 0 => OK *-1 => ERROR */ -extern int -__big_delete(hashp, bufp) - HTAB *hashp; - BUFHEAD *bufp; +int +__big_delete(HTAB *hashp, BUFHEAD *bufp) { BUFHEAD *last_bfp, *rbufp; u_int16_t *bp, pageno; @@ -277,13 +272,8 @@ __big_delete(hashp, bufp) * -2 means key not found and this is big key/data * -3 error */ -extern int -__find_bigpair(hashp, bufp, ndx, key, size) - HTAB *hashp; - BUFHEAD *bufp; - int ndx; - char *key; - int size; +int +__find_bigpair(HTAB *hashp, BUFHEAD *bufp, int ndx, char *key, int size) { u_int16_t *bp; char *p; @@ -329,10 +319,8 @@ __find_bigpair(hashp, bufp, ndx, key, size) * of the pair; 0 if there isn't any (i.e. big pair is the last key in the * bucket) */ -extern u_int16_t -__find_last_page(hashp, bpp) - HTAB *hashp; - BUFHEAD **bpp; +u_int16_t +__find_last_page(HTAB *hashp, BUFHEAD **bpp) { BUFHEAD *bufp; u_int16_t *bp, pageno; @@ -370,13 +358,8 @@ __find_last_page(hashp, bpp) * Return the data for the key/data pair that begins on this page at this * 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; +int +__big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current) { BUFHEAD *save_p; u_int16_t *bp, len, off, save_addr; @@ -462,10 +445,7 @@ __big_return(hashp, bufp, ndx, val, set_current) * 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; @@ -517,12 +497,8 @@ 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; +int +__big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set) { key->size = collect_key(hashp, bufp, 0, val, set); if (key->size == (size_t)-1) @@ -536,12 +512,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; @@ -580,16 +551,14 @@ collect_key(hashp, bufp, len, val, set) * 0 => OK * -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; +int +__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 *bp, *tmpp; DBT key, val; diff --git a/lib/libc/db/hash/hash_buf.c b/lib/libc/db/hash/hash_buf.c index ab262ba5471..0e2050b25b3 100644 --- a/lib/libc/db/hash/hash_buf.c +++ b/lib/libc/db/hash/hash_buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_buf.c,v 1.14 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash_buf.c,v 1.15 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94"; #else -static const char rcsid[] = "$OpenBSD: hash_buf.c,v 1.14 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_buf.c,v 1.15 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -104,12 +104,10 @@ static BUFHEAD *newbuf(HTAB *, u_int32_t, BUFHEAD *); * be valid. Therefore, you must always verify that its address matches the * address you are seeking. */ -extern BUFHEAD * -__get_buf(hashp, addr, prev_bp, newpage) - HTAB *hashp; - u_int32_t addr; - BUFHEAD *prev_bp; - int newpage; /* If prev_bp set, indicates a new overflow page. */ +BUFHEAD * +__get_buf(HTAB *hashp, u_int32_t addr, + BUFHEAD *prev_bp, /* If prev_bp set, indicates a new overflow page. */ + int newpage) { BUFHEAD *bp; u_int32_t is_disk_mask; @@ -160,10 +158,7 @@ __get_buf(hashp, addr, prev_bp, newpage) * If newbuf finds an error (returning NULL), it also sets errno. */ static BUFHEAD * -newbuf(hashp, addr, prev_bp) - HTAB *hashp; - u_int32_t addr; - BUFHEAD *prev_bp; +newbuf(HTAB *hashp, u_int32_t addr, BUFHEAD *prev_bp) { BUFHEAD *bp; /* The buffer we're going to use */ BUFHEAD *xbp; /* Temp pointer */ @@ -293,10 +288,8 @@ newbuf(hashp, addr, prev_bp) return (bp); } -extern void -__buf_init(hashp, nbytes) - HTAB *hashp; - int nbytes; +void +__buf_init(HTAB *hashp, int nbytes) { BUFHEAD *bfp; int npages; @@ -318,10 +311,8 @@ __buf_init(hashp, nbytes) */ } -extern int -__buf_free(hashp, do_free, to_disk) - HTAB *hashp; - int do_free, to_disk; +int +__buf_free(HTAB *hashp, int do_free, int to_disk) { BUFHEAD *bp; @@ -351,10 +342,8 @@ __buf_free(hashp, do_free, to_disk) return (0); } -extern void -__reclaim_buf(hashp, bp) - HTAB *hashp; - BUFHEAD *bp; +void +__reclaim_buf(HTAB *hashp, BUFHEAD *bp) { bp->ovfl = 0; bp->addr = 0; diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c index f4fe9289678..870ce3d939b 100644 --- a/lib/libc/db/hash/hash_func.c +++ b/lib/libc/db/hash/hash_func.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_func.c,v 1.8 2003/06/02 20:18:33 millert Exp $ */ +/* $OpenBSD: hash_func.c,v 1.9 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_func.c 8.4 (Berkeley) 11/7/95"; #else -static const char rcsid[] = "$OpenBSD: hash_func.c,v 1.8 2003/06/02 20:18:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_func.c,v 1.9 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -68,9 +68,7 @@ u_int32_t (*__default_hash)(const void *, size_t) = hash4; #define PRIME2 1048583 u_int32_t -hash1(key, len) - const void *key; - size_t len; +hash1(const void *key, size_t len) { u_int32_t h; u_int8_t *k; @@ -90,9 +88,7 @@ hash1(key, len) #define dcharhash(h, c) ((h) = 0x63c63cd9*(h) + 0x9c39c33d + (c)) u_int32_t -hash2(key, len) - const void *key; - size_t len; +hash2(const void *key, size_t len) { u_int32_t h; u_int8_t *e, c, *k; @@ -118,9 +114,7 @@ hash2(key, len) * Ozan Yigit's original sdbm hash. */ u_int32_t -hash3(key, len) - const void *key; - size_t len; +hash3(const void *key, size_t len) { u_int32_t n, loop; u_int8_t *k; @@ -160,9 +154,7 @@ hash3(key, len) /* Chris Torek's hash function. */ u_int32_t -hash4(key, len) - const void *key; - size_t len; +hash4(const void *key, size_t len) { u_int32_t h, loop; u_int8_t *k; diff --git a/lib/libc/db/hash/hash_page.c b/lib/libc/db/hash/hash_page.c index 8f926e78d29..8526680c5f7 100644 --- a/lib/libc/db/hash/hash_page.c +++ b/lib/libc/db/hash/hash_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hash_page.c,v 1.15 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: hash_page.c,v 1.16 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94"; #else -static const char rcsid[] = "$OpenBSD: hash_page.c,v 1.15 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: hash_page.c,v 1.16 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -94,9 +94,7 @@ static int ugly_split(HTAB *, u_int32_t, BUFHEAD *, BUFHEAD *, int, int); * stuff on. */ static void -putpair(p, key, val) - char *p; - const DBT *key, *val; +putpair(char *p, const DBT *key, const DBT *val) { u_int16_t *bp, n, off; @@ -125,11 +123,8 @@ putpair(p, key, val) * 0 OK * -1 error */ -extern int -__delpair(hashp, bufp, ndx) - HTAB *hashp; - BUFHEAD *bufp; - int ndx; +int +__delpair(HTAB *hashp, BUFHEAD *bufp, int ndx) { u_int16_t *bp, newoff, pairlen; int n; @@ -177,10 +172,8 @@ __delpair(hashp, bufp, ndx) * 0 ==> OK * -1 ==> Error */ -extern int -__split_page(hashp, obucket, nbucket) - HTAB *hashp; - u_int32_t obucket, nbucket; +int +__split_page(HTAB *hashp, u_int32_t obucket, u_int32_t nbucket) { BUFHEAD *new_bufp, *old_bufp; u_int16_t *ino; @@ -274,12 +267,12 @@ __split_page(hashp, obucket, nbucket) * -1 ==> failure */ static int -ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved) - HTAB *hashp; - u_int32_t obucket; /* Same as __split_page. */ - BUFHEAD *old_bufp, *new_bufp; - int copyto; /* First byte on page which contains key/data values. */ - int moved; /* Number of pairs moved to new page. */ +ugly_split(HTAB *hashp, + u_int32_t obucket, /* Same as __split_page. */ + BUFHEAD *old_bufp, + BUFHEAD *new_bufp, + int copyto, /* First byte on page which contains key/data values. */ + int moved) /* Number of pairs moved to new page. */ { BUFHEAD *bufp; /* Buffer header for ino */ u_int16_t *ino; /* Page keys come off of */ @@ -394,11 +387,8 @@ ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved) * 0 ==> OK * 1 ==> failure */ -extern int -__addel(hashp, bufp, key, val) - HTAB *hashp; - BUFHEAD *bufp; - const DBT *key, *val; +int +__addel(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) { u_int16_t *bp, *sop; int do_expand; @@ -467,10 +457,8 @@ stats: * pointer on success * NULL on error */ -extern BUFHEAD * -__add_ovflpage(hashp, bufp) - HTAB *hashp; - BUFHEAD *bufp; +BUFHEAD * +__add_ovflpage(HTAB *hashp, BUFHEAD *bufp) { u_int16_t *sp, ndx, ovfl_num; #ifdef DEBUG1 @@ -519,12 +507,9 @@ __add_ovflpage(hashp, bufp) * 0 indicates SUCCESS * -1 indicates FAILURE */ -extern int -__get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap) - HTAB *hashp; - char *p; - u_int32_t bucket; - int is_bucket, is_disk, is_bitmap; +int +__get_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_disk, + int is_bitmap) { int fd, page, size, rsize; u_int16_t *bp; @@ -577,12 +562,8 @@ __get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap) * 0 ==> OK * -1 ==>failure */ -extern int -__put_page(hashp, p, bucket, is_bucket, is_bitmap) - HTAB *hashp; - char *p; - u_int32_t bucket; - int is_bucket, is_bitmap; +int +__put_page(HTAB *hashp, char *p, u_int32_t bucket, int is_bucket, int is_bitmap) { int fd, page, size, wsize; @@ -623,10 +604,8 @@ __put_page(hashp, p, bucket, is_bucket, is_bitmap) * Initialize a new bitmap page. Bitmap pages are left in memory * once they are read in. */ -extern int -__ibitmap(hashp, pnum, nbits, ndx) - HTAB *hashp; - int pnum, nbits, ndx; +int +__ibitmap(HTAB *hashp, int pnum, int nbits, int ndx) { u_int32_t *ip; int clearbytes, clearints; @@ -647,8 +626,7 @@ __ibitmap(hashp, pnum, nbits, ndx) } static u_int32_t -first_free(map) - u_int32_t map; +first_free(u_int32_t map) { u_int32_t i, mask; @@ -662,8 +640,7 @@ first_free(map) } static u_int16_t -overflow_page(hashp) - HTAB *hashp; +overflow_page(HTAB *hashp) { u_int32_t *freep; int max_free, offset, splitnum; @@ -815,10 +792,8 @@ found: /* * Mark this overflow page as free. */ -extern void -__free_ovflpage(hashp, obufp) - HTAB *hashp; - BUFHEAD *obufp; +void +__free_ovflpage(HTAB *hashp, BUFHEAD *obufp) { u_int16_t addr; u_int32_t *freep; @@ -862,8 +837,7 @@ __free_ovflpage(hashp, obufp) * -1 failure */ static int -open_temp(hashp) - HTAB *hashp; +open_temp(HTAB *hashp) { sigset_t set, oset; char *envtmp = NULL; @@ -890,9 +864,7 @@ open_temp(hashp) * an overflow pair, so we need to shift things. */ static void -squeeze_key(sp, key, val) - u_int16_t *sp; - const DBT *key, *val; +squeeze_key(u_int16_t *sp, const DBT *key, const DBT *val) { char *p; u_int16_t free_space, n, off, pageno; @@ -917,9 +889,7 @@ squeeze_key(sp, key, val) } static u_int32_t * -fetch_bitmap(hashp, ndx) - HTAB *hashp; - int ndx; +fetch_bitmap(HTAB *hashp, int ndx) { if (ndx >= hashp->nmaps) return (NULL); @@ -935,8 +905,7 @@ fetch_bitmap(hashp, ndx) #ifdef DEBUG4 int -print_chain(addr) - int addr; +print_chain(int addr) { BUFHEAD *bufp; short *bp, oaddr; diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index 378f75f6b05..ecba238bfed 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpool.c,v 1.12 2003/06/02 20:18:34 millert Exp $ */ +/* $OpenBSD: mpool.c,v 1.13 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)mpool.c 8.7 (Berkeley) 11/2/95"; #else -static const char rcsid[] = "$OpenBSD: mpool.c,v 1.12 2003/06/02 20:18:34 millert Exp $"; +static const char rcsid[] = "$OpenBSD: mpool.c,v 1.13 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -62,10 +62,7 @@ static int mpool_write(MPOOL *, BKT *); */ /* ARGSUSED */ MPOOL * -mpool_open(key, fd, pagesize, maxcache) - void *key; - int fd; - pgno_t pagesize, maxcache; +mpool_open(void *key, int fd, pgno_t pagesize, pgno_t maxcache) { struct stat sb; MPOOL *mp; @@ -102,11 +99,8 @@ mpool_open(key, fd, pagesize, maxcache) * Initialize input/output filters. */ void -mpool_filter(mp, pgin, pgout, pgcookie) - MPOOL *mp; - void (*pgin)(void *, pgno_t, void *); - void (*pgout)(void *, pgno_t, void *); - void *pgcookie; +mpool_filter(MPOOL *mp, void (*pgin) (void *, pgno_t, void *), + void (*pgout) (void *, pgno_t, void *), void *pgcookie) { mp->pgin = pgin; mp->pgout = pgout; @@ -118,10 +112,7 @@ mpool_filter(mp, pgin, pgout, pgcookie) * Get a new page of memory. */ void * -mpool_new(mp, pgnoaddr, flags) - MPOOL *mp; - pgno_t *pgnoaddr; - u_int flags; +mpool_new(MPOOL *mp, pgno_t *pgnoaddr, u_int flags) { struct _hqh *head; BKT *bp; @@ -155,9 +146,7 @@ mpool_new(mp, pgnoaddr, flags) } int -mpool_delete(mp, page) - MPOOL *mp; - void *page; +mpool_delete(MPOOL *mp, void *page) { struct _hqh *head; BKT *bp; @@ -187,10 +176,8 @@ mpool_delete(mp, page) */ /* ARGSUSED */ void * -mpool_get(mp, pgno, flags) - MPOOL *mp; - pgno_t pgno; - u_int flags; /* XXX not used? */ +mpool_get(MPOOL *mp, pgno_t pgno, + u_int flags) /* XXX not used? */ { struct _hqh *head; BKT *bp; @@ -279,10 +266,7 @@ mpool_get(mp, pgno, flags) */ /* ARGSUSED */ int -mpool_put(mp, page, flags) - MPOOL *mp; - void *page; - u_int flags; +mpool_put(MPOOL *mp, void *page, u_int flags) { BKT *bp; @@ -308,8 +292,7 @@ mpool_put(mp, page, flags) * Close the buffer pool. */ int -mpool_close(mp) - MPOOL *mp; +mpool_close(MPOOL *mp) { BKT *bp; @@ -329,8 +312,7 @@ mpool_close(mp) * Sync the pool to disk. */ int -mpool_sync(mp) - MPOOL *mp; +mpool_sync(MPOOL *mp) { BKT *bp; @@ -350,8 +332,7 @@ mpool_sync(mp) * Get a page from the cache (or create one). */ static BKT * -mpool_bkt(mp) - MPOOL *mp; +mpool_bkt(MPOOL *mp) { struct _hqh *head; BKT *bp; @@ -408,9 +389,7 @@ new: if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL) * Write a page to disk. */ static int -mpool_write(mp, bp) - MPOOL *mp; - BKT *bp; +mpool_write(MPOOL *mp, BKT *bp) { off_t off; @@ -444,9 +423,7 @@ mpool_write(mp, bp) * Lookup a page in the cache. */ static BKT * -mpool_look(mp, pgno) - MPOOL *mp; - pgno_t pgno; +mpool_look(MPOOL *mp, pgno_t pgno) { struct _hqh *head; BKT *bp; @@ -472,8 +449,7 @@ mpool_look(mp, pgno) * Print out cache statistics. */ void -mpool_stat(mp) - MPOOL *mp; +mpool_stat(MPOOL *mp) { BKT *bp; int cnt; diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c index b1bf957a725..d2dd6ba887a 100644 --- a/lib/libc/db/recno/rec_close.c +++ b/lib/libc/db/recno/rec_close.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rec_close.c,v 1.9 2003/06/02 20:18:34 millert Exp $ */ +/* $OpenBSD: rec_close.c,v 1.10 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)rec_close.c 8.6 (Berkeley) 8/18/94"; #else -static const char rcsid[] = "$OpenBSD: rec_close.c,v 1.9 2003/06/02 20:18:34 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_close.c,v 1.10 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -59,8 +59,7 @@ static const char rcsid[] = "$OpenBSD: rec_close.c,v 1.9 2003/06/02 20:18:34 mil * RET_ERROR, RET_SUCCESS */ int -__rec_close(dbp) - DB *dbp; +__rec_close(DB *dbp) { BTREE *t; int status; @@ -107,9 +106,7 @@ __rec_close(dbp) * RET_SUCCESS, RET_ERROR. */ int -__rec_sync(dbp, flags) - const DB *dbp; - u_int flags; +__rec_sync(const DB *dbp, u_int flags) { struct iovec iov[2]; BTREE *t; diff --git a/lib/libc/db/recno/rec_delete.c b/lib/libc/db/recno/rec_delete.c index fbc60e4d658..b720eea264a 100644 --- a/lib/libc/db/recno/rec_delete.c +++ b/lib/libc/db/recno/rec_delete.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rec_delete.c,v 1.8 2005/01/03 22:30:29 millert Exp $ */ +/* $OpenBSD: rec_delete.c,v 1.9 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)rec_delete.c 8.7 (Berkeley) 7/14/94"; #else -static const char rcsid[] = "$OpenBSD: rec_delete.c,v 1.8 2005/01/03 22:30:29 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_delete.c,v 1.9 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -63,10 +63,7 @@ static int rec_rdelete(BTREE *, recno_t); * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found. */ int -__rec_delete(dbp, key, flags) - const DB *dbp; - const DBT *key; - u_int flags; +__rec_delete(const DB *dbp, const DBT *key, u_int flags) { BTREE *t; recno_t nrec; @@ -119,9 +116,7 @@ einval: errno = EINVAL; * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found. */ static int -rec_rdelete(t, nrec) - BTREE *t; - recno_t nrec; +rec_rdelete(BTREE *t, recno_t nrec) { EPG *e; PAGE *h; @@ -153,10 +148,7 @@ rec_rdelete(t, nrec) * RET_SUCCESS, RET_ERROR. */ int -__rec_dleaf(t, h, idx) - BTREE *t; - PAGE *h; - u_int32_t idx; +__rec_dleaf(BTREE *t, PAGE *h, u_int32_t idx) { RLEAF *rl; indx_t *ip, cnt, offset; diff --git a/lib/libc/db/recno/rec_get.c b/lib/libc/db/recno/rec_get.c index 1b59c00b156..867c4903033 100644 --- a/lib/libc/db/recno/rec_get.c +++ b/lib/libc/db/recno/rec_get.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rec_get.c,v 1.8 2003/06/02 20:18:34 millert Exp $ */ +/* $OpenBSD: rec_get.c,v 1.9 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)rec_get.c 8.9 (Berkeley) 8/18/94"; #else -static const char rcsid[] = "$OpenBSD: rec_get.c,v 1.8 2003/06/02 20:18:34 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_get.c,v 1.9 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -62,11 +62,7 @@ static const char rcsid[] = "$OpenBSD: rec_get.c,v 1.8 2003/06/02 20:18:34 mille * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found. */ int -__rec_get(dbp, key, data, flags) - const DB *dbp; - const DBT *key; - DBT *data; - u_int flags; +__rec_get(const DB *dbp, const DBT *key, DBT *data, u_int flags) { BTREE *t; EPG *e; @@ -121,9 +117,7 @@ __rec_get(dbp, key, data, flags) * RET_ERROR, RET_SUCCESS */ int -__rec_fpipe(t, top) - BTREE *t; - recno_t top; +__rec_fpipe(BTREE *t, recno_t top) { DBT data; recno_t nrec; @@ -179,9 +173,7 @@ __rec_fpipe(t, top) * RET_ERROR, RET_SUCCESS */ int -__rec_vpipe(t, top) - BTREE *t; - recno_t top; +__rec_vpipe(BTREE *t, recno_t top) { DBT data; recno_t nrec; @@ -238,9 +230,7 @@ __rec_vpipe(t, top) * RET_ERROR, RET_SUCCESS */ int -__rec_fmap(t, top) - BTREE *t; - recno_t top; +__rec_fmap(BTREE *t, recno_t top) { DBT data; recno_t nrec; @@ -290,9 +280,7 @@ __rec_fmap(t, top) * RET_ERROR, RET_SUCCESS */ int -__rec_vmap(t, top) - BTREE *t; - recno_t top; +__rec_vmap(BTREE *t, recno_t top) { DBT data; u_char *sp, *ep; diff --git a/lib/libc/db/recno/rec_open.c b/lib/libc/db/recno/rec_open.c index 5f24c7a8879..eb9f271d06f 100644 --- a/lib/libc/db/recno/rec_open.c +++ b/lib/libc/db/recno/rec_open.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rec_open.c,v 1.9 2003/06/02 20:18:34 millert Exp $ */ +/* $OpenBSD: rec_open.c,v 1.10 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)rec_open.c 8.10 (Berkeley) 9/1/94"; #else -static const char rcsid[] = "$OpenBSD: rec_open.c,v 1.9 2003/06/02 20:18:34 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_open.c,v 1.10 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -55,10 +55,8 @@ static const char rcsid[] = "$OpenBSD: rec_open.c,v 1.9 2003/06/02 20:18:34 mill #include "recno.h" DB * -__rec_open(fname, flags, mode, openinfo, dflags) - const char *fname; - int flags, mode, dflags; - const RECNOINFO *openinfo; +__rec_open(const char *fname, int flags, int mode, const RECNOINFO *openinfo, + int dflags) { BTREE *t; BTREEINFO btopeninfo; @@ -221,8 +219,7 @@ err: sverrno = errno; } int -__rec_fd(dbp) - const DB *dbp; +__rec_fd(const DB *dbp) { BTREE *t; diff --git a/lib/libc/db/recno/rec_put.c b/lib/libc/db/recno/rec_put.c index 3be7e297f7c..6b17901006f 100644 --- a/lib/libc/db/recno/rec_put.c +++ b/lib/libc/db/recno/rec_put.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rec_put.c,v 1.8 2005/01/03 22:30:29 millert Exp $ */ +/* $OpenBSD: rec_put.c,v 1.9 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)rec_put.c 8.7 (Berkeley) 8/18/94"; #else -static const char rcsid[] = "$OpenBSD: rec_put.c,v 1.8 2005/01/03 22:30:29 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_put.c,v 1.9 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -61,11 +61,7 @@ static const char rcsid[] = "$OpenBSD: rec_put.c,v 1.8 2005/01/03 22:30:29 mille * already in the tree and R_NOOVERWRITE specified. */ int -__rec_put(dbp, key, data, flags) - const DB *dbp; - DBT *key; - const DBT *data; - u_int flags; +__rec_put(const DB *dbp, DBT *key, const DBT *data, u_int flags) { BTREE *t; DBT fdata, tdata; @@ -191,11 +187,7 @@ einval: errno = EINVAL; * RET_ERROR, RET_SUCCESS */ int -__rec_iput(t, nrec, data, flags) - BTREE *t; - recno_t nrec; - const DBT *data; - u_int flags; +__rec_iput(BTREE *t, recno_t nrec, const DBT *data, u_int flags) { DBT tdata; EPG *e; diff --git a/lib/libc/db/recno/rec_search.c b/lib/libc/db/recno/rec_search.c index b7b66a895a8..3a20ff1d6e6 100644 --- a/lib/libc/db/recno/rec_search.c +++ b/lib/libc/db/recno/rec_search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rec_search.c,v 1.9 2005/01/03 22:46:43 millert Exp $ */ +/* $OpenBSD: rec_search.c,v 1.10 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)rec_search.c 8.4 (Berkeley) 7/14/94"; #else -static const char rcsid[] = "$OpenBSD: rec_search.c,v 1.9 2005/01/03 22:46:43 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_search.c,v 1.10 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -63,10 +63,7 @@ static const char rcsid[] = "$OpenBSD: rec_search.c,v 1.9 2005/01/03 22:46:43 mi * the bt_cur field of the tree. A pointer to the field is returned. */ EPG * -__rec_search(t, recno, op) - BTREE *t; - recno_t recno; - enum SRCHOP op; +__rec_search(BTREE *t, recno_t recno, enum SRCHOP op) { indx_t idx; PAGE *h; diff --git a/lib/libc/db/recno/rec_seq.c b/lib/libc/db/recno/rec_seq.c index d185d6265de..ef88eccc39e 100644 --- a/lib/libc/db/recno/rec_seq.c +++ b/lib/libc/db/recno/rec_seq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rec_seq.c,v 1.6 2003/06/02 20:18:34 millert Exp $ */ +/* $OpenBSD: rec_seq.c,v 1.7 2005/03/23 19:34:59 otto Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)rec_utils.c 8.6 (Berkeley) 7/16/94"; #else -static const char rcsid[] = "$OpenBSD: rec_seq.c,v 1.6 2003/06/02 20:18:34 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_seq.c,v 1.7 2005/03/23 19:34:59 otto Exp $"; #endif #endif /* not lint */ @@ -60,10 +60,7 @@ static const char rcsid[] = "$OpenBSD: rec_seq.c,v 1.6 2003/06/02 20:18:34 mille * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key. */ int -__rec_seq(dbp, key, data, flags) - const DB *dbp; - DBT *key, *data; - u_int flags; +__rec_seq(const DB *dbp, DBT *key, DBT *data, u_int flags) { BTREE *t; EPG *e; diff --git a/lib/libc/db/recno/rec_utils.c b/lib/libc/db/recno/rec_utils.c index 14674421a02..0212ee1936b 100644 --- a/lib/libc/db/recno/rec_utils.c +++ b/lib/libc/db/recno/rec_utils.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: rec_utils.c,v 1.5 2003/06/02 20:18:34 millert Exp $"; +static const char rcsid[] = "$OpenBSD: rec_utils.c,v 1.6 2005/03/23 19:34:59 otto Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -55,11 +55,7 @@ static const char rcsid[] = "$OpenBSD: rec_utils.c,v 1.5 2003/06/02 20:18:34 mil * RET_SUCCESS, RET_ERROR. */ int -__rec_ret(t, e, nrec, key, data) - BTREE *t; - EPG *e; - recno_t nrec; - DBT *key, *data; +__rec_ret(BTREE *t, EPG *e, recno_t nrec, DBT *key, DBT *data) { RLEAF *rl; void *p; |