diff options
Diffstat (limited to 'lib/libc/db')
-rw-r--r-- | lib/libc/db/btree/bt_close.c | 2 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_conv.c | 4 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_delete.c | 12 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_open.c | 6 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_put.c | 4 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_search.c | 6 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_seq.c | 8 | ||||
-rw-r--r-- | lib/libc/db/btree/bt_split.c | 16 | ||||
-rw-r--r-- | lib/libc/db/btree/btree.h | 9 | ||||
-rw-r--r-- | lib/libc/db/btree/extern.h | 55 | ||||
-rw-r--r-- | lib/libc/db/hash/extern.h | 45 | ||||
-rw-r--r-- | lib/libc/db/hash/hash.c | 32 | ||||
-rw-r--r-- | lib/libc/db/hash/hash.h | 2 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_bigkey.c | 4 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_buf.c | 2 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_func.c | 8 | ||||
-rw-r--r-- | lib/libc/db/hash/hash_page.c | 14 | ||||
-rw-r--r-- | lib/libc/db/mpool/mpool.c | 10 | ||||
-rw-r--r-- | lib/libc/db/recno/extern.h | 35 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_delete.c | 4 | ||||
-rw-r--r-- | lib/libc/db/test/btree.tests/main.c | 50 | ||||
-rw-r--r-- | lib/libc/db/test/dbtest.c | 30 |
22 files changed, 189 insertions, 169 deletions
diff --git a/lib/libc/db/btree/bt_close.c b/lib/libc/db/btree/bt_close.c index 878c4c4485a3..e8bb11ce8144 100644 --- a/lib/libc/db/btree/bt_close.c +++ b/lib/libc/db/btree/bt_close.c @@ -53,7 +53,7 @@ static char sccsid[] = "@(#)bt_close.c 8.7 (Berkeley) 8/17/94"; #include <db.h> #include "btree.h" -static int bt_meta __P((BTREE *)); +static int bt_meta(BTREE *); /* * BT_CLOSE -- Close a btree. diff --git a/lib/libc/db/btree/bt_conv.c b/lib/libc/db/btree/bt_conv.c index 1cb208b14d94..18f377472403 100644 --- a/lib/libc/db/btree/bt_conv.c +++ b/lib/libc/db/btree/bt_conv.c @@ -37,6 +37,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bt_conv.c 8.5 (Berkeley) 8/17/94"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <sys/param.h> @@ -45,7 +47,7 @@ static char sccsid[] = "@(#)bt_conv.c 8.5 (Berkeley) 8/17/94"; #include <db.h> #include "btree.h" -static void mswap __P((PAGE *)); +static void mswap(PAGE *); /* * __BT_BPGIN, __BT_BPGOUT -- diff --git a/lib/libc/db/btree/bt_delete.c b/lib/libc/db/btree/bt_delete.c index ece1ab656e62..13e43df51574 100644 --- a/lib/libc/db/btree/bt_delete.c +++ b/lib/libc/db/btree/bt_delete.c @@ -37,6 +37,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bt_delete.c 8.13 (Berkeley) 7/28/94"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <sys/types.h> @@ -47,11 +49,11 @@ static char sccsid[] = "@(#)bt_delete.c 8.13 (Berkeley) 7/28/94"; #include <db.h> #include "btree.h" -static int __bt_bdelete __P((BTREE *, const DBT *)); -static int __bt_curdel __P((BTREE *, const DBT *, PAGE *, u_int)); -static int __bt_pdelete __P((BTREE *, PAGE *)); -static int __bt_relink __P((BTREE *, PAGE *)); -static int __bt_stkacq __P((BTREE *, PAGE **, CURSOR *)); +static int __bt_bdelete(BTREE *, const DBT *); +static int __bt_curdel(BTREE *, const DBT *, PAGE *, u_int); +static int __bt_pdelete(BTREE *, PAGE *); +static int __bt_relink(BTREE *, PAGE *); +static int __bt_stkacq(BTREE *, PAGE **, CURSOR *); /* * __bt_delete diff --git a/lib/libc/db/btree/bt_open.c b/lib/libc/db/btree/bt_open.c index e2e9a24e3d65..20cce2dd7b4b 100644 --- a/lib/libc/db/btree/bt_open.c +++ b/lib/libc/db/btree/bt_open.c @@ -70,9 +70,9 @@ static char sccsid[] = "@(#)bt_open.c 8.10 (Berkeley) 8/17/94"; #define MINPSIZE 128 #endif -static int byteorder __P((void)); -static int nroot __P((BTREE *)); -static int tmp __P((void)); +static int byteorder(void); +static int nroot(BTREE *); +static int tmp(void); /* * __BT_OPEN -- Open a btree. diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c index 952be09e551f..4e1e89b59a6b 100644 --- a/lib/libc/db/btree/bt_put.c +++ b/lib/libc/db/btree/bt_put.c @@ -37,6 +37,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bt_put.c 8.8 (Berkeley) 7/26/94"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <sys/types.h> @@ -48,7 +50,7 @@ static char sccsid[] = "@(#)bt_put.c 8.8 (Berkeley) 7/26/94"; #include <db.h> #include "btree.h" -static EPG *bt_fast __P((BTREE *, const DBT *, const DBT *, int *)); +static EPG *bt_fast(BTREE *, const DBT *, const DBT *, int *); /* * __BT_PUT -- Add a btree item to the tree. diff --git a/lib/libc/db/btree/bt_search.c b/lib/libc/db/btree/bt_search.c index 485afcbbf025..4fc39e94acce 100644 --- a/lib/libc/db/btree/bt_search.c +++ b/lib/libc/db/btree/bt_search.c @@ -37,6 +37,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bt_search.c 8.8 (Berkeley) 7/31/94"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <sys/types.h> @@ -45,8 +47,8 @@ static char sccsid[] = "@(#)bt_search.c 8.8 (Berkeley) 7/31/94"; #include <db.h> #include "btree.h" -static int __bt_snext __P((BTREE *, PAGE *, const DBT *, int *)); -static int __bt_sprev __P((BTREE *, PAGE *, const DBT *, int *)); +static int __bt_snext(BTREE *, PAGE *, const DBT *, int *); +static int __bt_sprev(BTREE *, PAGE *, const DBT *, int *); /* * __bt_search -- diff --git a/lib/libc/db/btree/bt_seq.c b/lib/libc/db/btree/bt_seq.c index 76e6275253e9..8b0dae2f91e8 100644 --- a/lib/libc/db/btree/bt_seq.c +++ b/lib/libc/db/btree/bt_seq.c @@ -37,6 +37,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bt_seq.c 8.7 (Berkeley) 7/20/94"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <sys/types.h> @@ -48,9 +50,9 @@ static char sccsid[] = "@(#)bt_seq.c 8.7 (Berkeley) 7/20/94"; #include <db.h> #include "btree.h" -static int __bt_first __P((BTREE *, const DBT *, EPG *, int *)); -static int __bt_seqadv __P((BTREE *, EPG *, int)); -static int __bt_seqset __P((BTREE *, EPG *, DBT *, int)); +static int __bt_first(BTREE *, const DBT *, EPG *, int *); +static int __bt_seqadv(BTREE *, EPG *, int); +static int __bt_seqset(BTREE *, EPG *, DBT *, int); /* * Sequential scan support. diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index c7779b897c95..1d47ac3d02b9 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -37,6 +37,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)bt_split.c 8.9 (Berkeley) 7/26/94"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <sys/types.h> @@ -48,16 +50,16 @@ static char sccsid[] = "@(#)bt_split.c 8.9 (Berkeley) 7/26/94"; #include <db.h> #include "btree.h" -static int bt_broot __P((BTREE *, PAGE *, PAGE *, PAGE *)); +static int bt_broot(BTREE *, PAGE *, PAGE *, PAGE *); static PAGE *bt_page - __P((BTREE *, PAGE *, PAGE **, PAGE **, indx_t *, size_t)); -static int bt_preserve __P((BTREE *, pgno_t)); +(BTREE *, PAGE *, PAGE **, PAGE **, indx_t *, size_t); +static int bt_preserve(BTREE *, pgno_t); static PAGE *bt_psplit - __P((BTREE *, PAGE *, PAGE *, PAGE *, indx_t *, size_t)); +(BTREE *, PAGE *, PAGE *, PAGE *, indx_t *, size_t); static PAGE *bt_root - __P((BTREE *, PAGE *, PAGE **, PAGE **, indx_t *, size_t)); -static int bt_rroot __P((BTREE *, PAGE *, PAGE *, PAGE *)); -static recno_t rec_total __P((PAGE *)); +(BTREE *, PAGE *, PAGE **, PAGE **, indx_t *, size_t); +static int bt_rroot(BTREE *, PAGE *, PAGE *, PAGE *); +static recno_t rec_total(PAGE *); #ifdef STATISTICS u_long bt_rootsplit, bt_split, bt_sortsplit, bt_pfxsaved; diff --git a/lib/libc/db/btree/btree.h b/lib/libc/db/btree/btree.h index 36d35c998bfd..251dd3f98e68 100644 --- a/lib/libc/db/btree/btree.h +++ b/lib/libc/db/btree/btree.h @@ -36,6 +36,9 @@ * @(#)btree.h 8.11 (Berkeley) 8/17/94 */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + /* Macros to set/clear/test flags. */ #define F_SET(p, f) (p)->flags |= (f) #define F_CLR(p, f) (p)->flags &= ~(f) @@ -335,11 +338,11 @@ typedef struct _btree { EPGNO bt_last; /* last insert */ /* B: key comparison function */ - int (*bt_cmp) __P((const DBT *, const DBT *)); + int (*bt_cmp)(const DBT *, const DBT *); /* B: prefix comparison function */ - size_t (*bt_pfx) __P((const DBT *, const DBT *)); + size_t (*bt_pfx)(const DBT *, const DBT *); /* R: recno input function */ - int (*bt_irec) __P((struct _btree *, recno_t)); + int (*bt_irec)(struct _btree *, recno_t); FILE *bt_rfp; /* R: record FILE pointer */ int bt_rfd; /* R: record file descriptor */ diff --git a/lib/libc/db/btree/extern.h b/lib/libc/db/btree/extern.h index ebd9c5492308..e9def6d4b6d3 100644 --- a/lib/libc/db/btree/extern.h +++ b/lib/libc/db/btree/extern.h @@ -31,40 +31,41 @@ * SUCH DAMAGE. * * @(#)extern.h 8.10 (Berkeley) 7/20/94 + * $FreeBSD$ */ -int __bt_close __P((DB *)); -int __bt_cmp __P((BTREE *, const DBT *, EPG *)); -int __bt_crsrdel __P((BTREE *, EPGNO *)); -int __bt_defcmp __P((const DBT *, const DBT *)); -size_t __bt_defpfx __P((const DBT *, const DBT *)); -int __bt_delete __P((const DB *, const DBT *, u_int)); -int __bt_dleaf __P((BTREE *, const DBT *, PAGE *, u_int)); -int __bt_fd __P((const DB *)); -int __bt_free __P((BTREE *, PAGE *)); -int __bt_get __P((const DB *, const DBT *, DBT *, u_int)); -PAGE *__bt_new __P((BTREE *, pgno_t *)); -void __bt_pgin __P((void *, pgno_t, void *)); -void __bt_pgout __P((void *, pgno_t, void *)); -int __bt_push __P((BTREE *, pgno_t, int)); -int __bt_put __P((const DB *dbp, DBT *, const DBT *, u_int)); -int __bt_ret __P((BTREE *, EPG *, DBT *, DBT *, DBT *, DBT *, int)); -EPG *__bt_search __P((BTREE *, const DBT *, int *)); -int __bt_seq __P((const DB *, DBT *, DBT *, u_int)); -void __bt_setcur __P((BTREE *, pgno_t, u_int)); +int __bt_close(DB *); +int __bt_cmp(BTREE *, const DBT *, EPG *); +int __bt_crsrdel(BTREE *, EPGNO *); +int __bt_defcmp(const DBT *, const DBT *); +size_t __bt_defpfx(const DBT *, const DBT *); +int __bt_delete(const DB *, const DBT *, u_int); +int __bt_dleaf(BTREE *, const DBT *, PAGE *, u_int); +int __bt_fd(const DB *); +int __bt_free(BTREE *, PAGE *); +int __bt_get(const DB *, const DBT *, DBT *, u_int); +PAGE *__bt_new(BTREE *, pgno_t *); +void __bt_pgin(void *, pgno_t, void *); +void __bt_pgout(void *, pgno_t, void *); +int __bt_push(BTREE *, pgno_t, int); +int __bt_put(const DB *dbp, DBT *, const DBT *, u_int); +int __bt_ret(BTREE *, EPG *, DBT *, DBT *, DBT *, DBT *, int); +EPG *__bt_search(BTREE *, const DBT *, int *); +int __bt_seq(const DB *, DBT *, DBT *, u_int); +void __bt_setcur(BTREE *, pgno_t, u_int); int __bt_split __P((BTREE *, PAGE *, const DBT *, const DBT *, int, size_t, u_int32_t)); -int __bt_sync __P((const DB *, u_int)); +int __bt_sync(const DB *, u_int); -int __ovfl_delete __P((BTREE *, void *)); -int __ovfl_get __P((BTREE *, void *, size_t *, void **, size_t *)); -int __ovfl_put __P((BTREE *, const DBT *, pgno_t *)); +int __ovfl_delete(BTREE *, void *); +int __ovfl_get(BTREE *, void *, size_t *, void **, size_t *); +int __ovfl_put(BTREE *, const DBT *, pgno_t *); #ifdef DEBUG -void __bt_dnpage __P((DB *, pgno_t)); -void __bt_dpage __P((PAGE *)); -void __bt_dump __P((DB *)); +void __bt_dnpage(DB *, pgno_t); +void __bt_dpage(PAGE *); +void __bt_dump(DB *); #endif #ifdef STATISTICS -void __bt_stat __P((DB *)); +void __bt_stat(DB *); #endif diff --git a/lib/libc/db/hash/extern.h b/lib/libc/db/hash/extern.h index 3167e6d0f754..82bff428a9c8 100644 --- a/lib/libc/db/hash/extern.h +++ b/lib/libc/db/hash/extern.h @@ -31,34 +31,35 @@ * SUCH DAMAGE. * * @(#)extern.h 8.4 (Berkeley) 6/16/94 + * $FreeBSD$ */ -BUFHEAD *__add_ovflpage __P((HTAB *, BUFHEAD *)); -int __addel __P((HTAB *, BUFHEAD *, const DBT *, const DBT *)); -int __big_delete __P((HTAB *, BUFHEAD *)); -int __big_insert __P((HTAB *, BUFHEAD *, const DBT *, const DBT *)); -int __big_keydata __P((HTAB *, BUFHEAD *, DBT *, DBT *, int)); -int __big_return __P((HTAB *, BUFHEAD *, int, DBT *, int)); +BUFHEAD *__add_ovflpage(HTAB *, BUFHEAD *); +int __addel(HTAB *, BUFHEAD *, const DBT *, const DBT *); +int __big_delete(HTAB *, BUFHEAD *); +int __big_insert(HTAB *, BUFHEAD *, const DBT *, const DBT *); +int __big_keydata(HTAB *, BUFHEAD *, DBT *, DBT *, int); +int __big_return(HTAB *, BUFHEAD *, int, DBT *, int); int __big_split __P((HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, int, u_int32_t, SPLIT_RETURN *)); -int __buf_free __P((HTAB *, int, int)); -void __buf_init __P((HTAB *, int)); -u_int32_t __call_hash __P((HTAB *, char *, int)); -int __delpair __P((HTAB *, BUFHEAD *, int)); -int __expand_table __P((HTAB *)); -int __find_bigpair __P((HTAB *, BUFHEAD *, int, char *, int)); -u_int16_t __find_last_page __P((HTAB *, BUFHEAD **)); -void __free_ovflpage __P((HTAB *, BUFHEAD *)); -BUFHEAD *__get_buf __P((HTAB *, u_int32_t, BUFHEAD *, int)); -int __get_page __P((HTAB *, char *, u_int32_t, int, int, int)); -int __ibitmap __P((HTAB *, int, int, int)); -u_int32_t __log2 __P((u_int32_t)); -int __put_page __P((HTAB *, char *, u_int32_t, int, int)); -void __reclaim_buf __P((HTAB *, BUFHEAD *)); -int __split_page __P((HTAB *, u_int32_t, u_int32_t)); +int __buf_free(HTAB *, int, int); +void __buf_init(HTAB *, int); +u_int32_t __call_hash(HTAB *, char *, int); +int __delpair(HTAB *, BUFHEAD *, int); +int __expand_table(HTAB *); +int __find_bigpair(HTAB *, BUFHEAD *, int, char *, int); +u_int16_t __find_last_page(HTAB *, BUFHEAD **); +void __free_ovflpage(HTAB *, BUFHEAD *); +BUFHEAD *__get_buf(HTAB *, u_int32_t, BUFHEAD *, int); +int __get_page(HTAB *, char *, u_int32_t, int, int, int); +int __ibitmap(HTAB *, int, int, int); +u_int32_t __log2(u_int32_t); +int __put_page(HTAB *, char *, u_int32_t, int, int); +void __reclaim_buf(HTAB *, BUFHEAD *); +int __split_page(HTAB *, u_int32_t, u_int32_t); /* Default hash routine. */ -extern u_int32_t (*__default_hash) __P((const void *, size_t)); +extern u_int32_t (*__default_hash)(const void *, size_t); #ifdef HASH_STATISTICS extern int hash_accesses, hash_collisions, hash_expansions, hash_overflows; diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index cb69744c0d04..d29d7d0f832b 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -60,23 +60,23 @@ __FBSDID("$FreeBSD$"); #include "page.h" #include "extern.h" -static int alloc_segs __P((HTAB *, int)); -static int flush_meta __P((HTAB *)); -static int hash_access __P((HTAB *, ACTION, DBT *, DBT *)); -static int hash_close __P((DB *)); -static int hash_delete __P((const DB *, const DBT *, u_int32_t)); -static int hash_fd __P((const DB *)); -static int hash_get __P((const DB *, const DBT *, DBT *, u_int32_t)); -static int hash_put __P((const DB *, DBT *, const DBT *, u_int32_t)); -static void *hash_realloc __P((SEGMENT **, int, int)); -static int hash_seq __P((const DB *, DBT *, DBT *, u_int32_t)); -static int hash_sync __P((const DB *, u_int32_t)); -static int hdestroy __P((HTAB *)); -static HTAB *init_hash __P((HTAB *, const char *, HASHINFO *)); -static int init_htab __P((HTAB *, int)); +static int alloc_segs(HTAB *, int); +static int flush_meta(HTAB *); +static int hash_access(HTAB *, ACTION, DBT *, DBT *); +static int hash_close(DB *); +static int hash_delete(const DB *, const DBT *, u_int32_t); +static int hash_fd(const DB *); +static int hash_get(const DB *, const DBT *, DBT *, u_int32_t); +static int hash_put(const DB *, DBT *, const DBT *, u_int32_t); +static void *hash_realloc(SEGMENT **, int, int); +static int hash_seq(const DB *, DBT *, DBT *, u_int32_t); +static int hash_sync(const DB *, u_int32_t); +static int hdestroy(HTAB *); +static HTAB *init_hash(HTAB *, const char *, HASHINFO *); +static int init_htab(HTAB *, int); #if BYTE_ORDER == LITTLE_ENDIAN -static void swap_header __P((HTAB *)); -static void swap_header_copy __P((HASHHDR *, HASHHDR *)); +static void swap_header(HTAB *); +static void swap_header_copy(HASHHDR *, HASHHDR *); #endif /* Fast arithmetic, relying on powers of 2, */ diff --git a/lib/libc/db/hash/hash.h b/lib/libc/db/hash/hash.h index 1462a6a25d42..2c0a542ed4e4 100644 --- a/lib/libc/db/hash/hash.h +++ b/lib/libc/db/hash/hash.h @@ -96,7 +96,7 @@ typedef struct htab { /* Memory resident data structure */ int exsegs; /* Number of extra allocated * segments */ u_int32_t /* Hash function */ - (*hash)__P((const void *, size_t)); + (*hash)(const void *, size_t); int flags; /* Flag values */ int fp; /* File pointer */ char *tmp_buf; /* Temporary Buffer for BIG data */ diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c index f49e77fd2547..34658027f2d6 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -74,8 +74,8 @@ __FBSDID("$FreeBSD$"); #include "page.h" #include "extern.h" -static int collect_key __P((HTAB *, BUFHEAD *, int, DBT *, int)); -static int collect_data __P((HTAB *, BUFHEAD *, int, int)); +static int collect_key(HTAB *, BUFHEAD *, int, DBT *, int); +static int collect_data(HTAB *, BUFHEAD *, int, int); /* * Big_insert diff --git a/lib/libc/db/hash/hash_buf.c b/lib/libc/db/hash/hash_buf.c index 401b682d36fa..1ec6b11e7e69 100644 --- a/lib/libc/db/hash/hash_buf.c +++ b/lib/libc/db/hash/hash_buf.c @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); #include "page.h" #include "extern.h" -static BUFHEAD *newbuf __P((HTAB *, u_int32_t, BUFHEAD *)); +static BUFHEAD *newbuf(HTAB *, u_int32_t, BUFHEAD *); /* Unlink B from its place in the lru */ #define BUF_REMOVE(B) { \ diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c index d7f84bb88ab5..aeb34b250c11 100644 --- a/lib/libc/db/hash/hash_func.c +++ b/lib/libc/db/hash/hash_func.c @@ -47,10 +47,10 @@ __FBSDID("$FreeBSD$"); #include "page.h" #include "extern.h" -static u_int32_t hash1 __P((const void *, size_t)); -static u_int32_t hash2 __P((const void *, size_t)); -static u_int32_t hash3 __P((const void *, size_t)); -static u_int32_t hash4 __P((const void *, size_t)); +static u_int32_t hash1(const void *, size_t); +static u_int32_t hash2(const void *, size_t); +static u_int32_t hash3(const void *, size_t); +static u_int32_t hash4(const void *, size_t); /* Global default hash function */ u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4; diff --git a/lib/libc/db/hash/hash_page.c b/lib/libc/db/hash/hash_page.c index 65358a2ad20c..f0739fb655e9 100644 --- a/lib/libc/db/hash/hash_page.c +++ b/lib/libc/db/hash/hash_page.c @@ -76,14 +76,14 @@ __FBSDID("$FreeBSD$"); #include "page.h" #include "extern.h" -static u_int32_t *fetch_bitmap __P((HTAB *, int)); -static u_int32_t first_free __P((u_int32_t)); -static int open_temp __P((HTAB *)); -static u_int16_t overflow_page __P((HTAB *)); -static void putpair __P((char *, const DBT *, const DBT *)); -static void squeeze_key __P((u_int16_t *, const DBT *, const DBT *)); +static u_int32_t *fetch_bitmap(HTAB *, int); +static u_int32_t first_free(u_int32_t); +static int open_temp(HTAB *); +static u_int16_t overflow_page(HTAB *); +static void putpair(char *, const DBT *, const DBT *); +static void squeeze_key(u_int16_t *, const DBT *, const DBT *); static int ugly_split - __P((HTAB *, u_int32_t, BUFHEAD *, BUFHEAD *, int, int)); +(HTAB *, u_int32_t, BUFHEAD *, BUFHEAD *, int, int); #define PAGE_INIT(P) { \ ((u_int16_t *)(P))[0] = 0; \ diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index 303d8c0adc8d..63a9947c1db1 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -54,9 +54,9 @@ static char sccsid[] = "@(#)mpool.c 8.5 (Berkeley) 7/26/94"; #define __MPOOLINTERFACE_PRIVATE #include <mpool.h> -static BKT *mpool_bkt __P((MPOOL *)); -static BKT *mpool_look __P((MPOOL *, pgno_t)); -static int mpool_write __P((MPOOL *, BKT *)); +static BKT *mpool_bkt(MPOOL *); +static BKT *mpool_look(MPOOL *, pgno_t); +static int mpool_write(MPOOL *, BKT *); /* * mpool_open -- @@ -105,8 +105,8 @@ mpool_open(key, fd, pagesize, maxcache) void mpool_filter(mp, pgin, pgout, pgcookie) MPOOL *mp; - void (*pgin) __P((void *, pgno_t, void *)); - void (*pgout) __P((void *, pgno_t, void *)); + void (*pgin)(void *, pgno_t, void *); + void (*pgout)(void *, pgno_t, void *); void *pgcookie; { mp->pgin = pgin; diff --git a/lib/libc/db/recno/extern.h b/lib/libc/db/recno/extern.h index feed43445332..ffa7243fde23 100644 --- a/lib/libc/db/recno/extern.h +++ b/lib/libc/db/recno/extern.h @@ -31,24 +31,25 @@ * SUCH DAMAGE. * * @(#)extern.h 8.3 (Berkeley) 6/4/94 + * $FreeBSD$ */ #include "../btree/extern.h" -int __rec_close __P((DB *)); -int __rec_delete __P((const DB *, const DBT *, u_int)); -int __rec_dleaf __P((BTREE *, PAGE *, u_int32_t)); -int __rec_fd __P((const DB *)); -int __rec_fmap __P((BTREE *, recno_t)); -int __rec_fout __P((BTREE *)); -int __rec_fpipe __P((BTREE *, recno_t)); -int __rec_get __P((const DB *, const DBT *, DBT *, u_int)); -int __rec_iput __P((BTREE *, recno_t, const DBT *, u_int)); -int __rec_put __P((const DB *dbp, DBT *, const DBT *, u_int)); -int __rec_ret __P((BTREE *, EPG *, recno_t, DBT *, DBT *)); -EPG *__rec_search __P((BTREE *, recno_t, enum SRCHOP)); -int __rec_seq __P((const DB *, DBT *, DBT *, u_int)); -int __rec_sync __P((const DB *, u_int)); -int __rec_vmap __P((BTREE *, recno_t)); -int __rec_vout __P((BTREE *)); -int __rec_vpipe __P((BTREE *, recno_t)); +int __rec_close(DB *); +int __rec_delete(const DB *, const DBT *, u_int); +int __rec_dleaf(BTREE *, PAGE *, u_int32_t); +int __rec_fd(const DB *); +int __rec_fmap(BTREE *, recno_t); +int __rec_fout(BTREE *); +int __rec_fpipe(BTREE *, recno_t); +int __rec_get(const DB *, const DBT *, DBT *, u_int); +int __rec_iput(BTREE *, recno_t, const DBT *, u_int); +int __rec_put(const DB *dbp, DBT *, const DBT *, u_int); +int __rec_ret(BTREE *, EPG *, recno_t, DBT *, DBT *); +EPG *__rec_search(BTREE *, recno_t, enum SRCHOP); +int __rec_seq(const DB *, DBT *, DBT *, u_int); +int __rec_sync(const DB *, u_int); +int __rec_vmap(BTREE *, recno_t); +int __rec_vout(BTREE *); +int __rec_vpipe(BTREE *, recno_t); diff --git a/lib/libc/db/recno/rec_delete.c b/lib/libc/db/recno/rec_delete.c index a16593d4e6a1..9996c2d3c36b 100644 --- a/lib/libc/db/recno/rec_delete.c +++ b/lib/libc/db/recno/rec_delete.c @@ -37,6 +37,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)rec_delete.c 8.7 (Berkeley) 7/14/94"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <sys/types.h> @@ -47,7 +49,7 @@ static char sccsid[] = "@(#)rec_delete.c 8.7 (Berkeley) 7/14/94"; #include <db.h> #include "recno.h" -static int rec_rdelete __P((BTREE *, recno_t)); +static int rec_rdelete(BTREE *, recno_t); /* * __REC_DELETE -- Delete the item(s) referenced by a key. diff --git a/lib/libc/db/test/btree.tests/main.c b/lib/libc/db/test/btree.tests/main.c index 5fd0b27e4cab..6308dcb885c1 100644 --- a/lib/libc/db/test/btree.tests/main.c +++ b/lib/libc/db/test/btree.tests/main.c @@ -54,37 +54,37 @@ typedef struct cmd_table { char *cmd; int nargs; int rconv; - void (*func) __P((DB *, char **)); + void (*func)(DB *, char **); char *usage, *descrip; } cmd_table; int stopstop; DB *globaldb; -void append __P((DB *, char **)); -void bstat __P((DB *, char **)); -void cursor __P((DB *, char **)); -void delcur __P((DB *, char **)); -void delete __P((DB *, char **)); -void dump __P((DB *, char **)); -void first __P((DB *, char **)); -void get __P((DB *, char **)); -void help __P((DB *, char **)); -void iafter __P((DB *, char **)); -void ibefore __P((DB *, char **)); -void icursor __P((DB *, char **)); -void insert __P((DB *, char **)); -void keydata __P((DBT *, DBT *)); -void last __P((DB *, char **)); -void list __P((DB *, char **)); -void load __P((DB *, char **)); -void mstat __P((DB *, char **)); -void next __P((DB *, char **)); -int parse __P((char *, char **, int)); -void previous __P((DB *, char **)); -void show __P((DB *, char **)); -void usage __P((void)); -void user __P((DB *)); +void append(DB *, char **); +void bstat(DB *, char **); +void cursor(DB *, char **); +void delcur(DB *, char **); +void delete(DB *, char **); +void dump(DB *, char **); +void first(DB *, char **); +void get(DB *, char **); +void help(DB *, char **); +void iafter(DB *, char **); +void ibefore(DB *, char **); +void icursor(DB *, char **); +void insert(DB *, char **); +void keydata(DBT *, DBT *); +void last(DB *, char **); +void list(DB *, char **); +void load(DB *, char **); +void mstat(DB *, char **); +void next(DB *, char **); +int parse(char *, char **, int); +void previous(DB *, char **); +void show(DB *, char **); +void usage(void); +void user(DB *); cmd_table commands[] = { "?", 0, 0, help, "help", NULL, diff --git a/lib/libc/db/test/dbtest.c b/lib/libc/db/test/dbtest.c index 8627572c7bc8..b403bc11e19b 100644 --- a/lib/libc/db/test/dbtest.c +++ b/lib/libc/db/test/dbtest.c @@ -61,22 +61,22 @@ static const char rcsid[] = enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA }; -void compare __P((DBT *, DBT *)); -DBTYPE dbtype __P((char *)); -void dump __P((DB *, int)); +void compare(DBT *, DBT *); +DBTYPE dbtype(char *); +void dump(DB *, int); void err __P((const char *, ...)) __printflike(1, 2); -void get __P((DB *, DBT *)); -void getdata __P((DB *, DBT *, DBT *)); -void put __P((DB *, DBT *, DBT *)); -void rem __P((DB *, DBT *)); -char *sflags __P((int)); -void synk __P((DB *)); -void *rfile __P((char *, size_t *)); -void seq __P((DB *, DBT *)); -u_int setflags __P((char *)); -void *setinfo __P((DBTYPE, char *)); -void usage __P((void)); -void *xmalloc __P((char *, size_t)); +void get(DB *, DBT *); +void getdata(DB *, DBT *, DBT *); +void put(DB *, DBT *, DBT *); +void rem(DB *, DBT *); +char *sflags(int); +void synk(DB *); +void *rfile(char *, size_t *); +void seq(DB *, DBT *); +u_int setflags(char *); +void *setinfo(DBTYPE, char *); +void usage(void); +void *xmalloc(char *, size_t); DBTYPE type; /* Database type. */ void *infop; /* Iflags. */ |