summaryrefslogtreecommitdiffstats
path: root/lib/libc/db/hash
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-03-21 22:49:10 +0000
committerobrien <obrien@FreeBSD.org>2002-03-21 22:49:10 +0000
commit3b73ce2319e249cf2795cf4b0d0c624134f01e77 (patch)
tree8e16a65843d0b07cf60b7fb748e2ac4890d6f1fd /lib/libc/db/hash
parent5da7065f3d4fe05102865926b09192cffa03a251 (diff)
downloadFreeBSD-src-3b73ce2319e249cf2795cf4b0d0c624134f01e77.zip
FreeBSD-src-3b73ce2319e249cf2795cf4b0d0c624134f01e77.tar.gz
Remove __P() usage.
Diffstat (limited to 'lib/libc/db/hash')
-rw-r--r--lib/libc/db/hash/extern.h45
-rw-r--r--lib/libc/db/hash/hash.c32
-rw-r--r--lib/libc/db/hash/hash.h2
-rw-r--r--lib/libc/db/hash/hash_bigkey.c4
-rw-r--r--lib/libc/db/hash/hash_buf.c2
-rw-r--r--lib/libc/db/hash/hash_func.c8
-rw-r--r--lib/libc/db/hash/hash_page.c14
7 files changed, 54 insertions, 53 deletions
diff --git a/lib/libc/db/hash/extern.h b/lib/libc/db/hash/extern.h
index 3167e6d..82bff42 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 cb69744..d29d7d0 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 1462a6a..2c0a542 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 f49e77f..3465802 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 401b682..1ec6b11 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 d7f84bb..aeb34b2 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 65358a2..f0739fb 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; \
OpenPOWER on IntegriCloud