Loading...
--- Libc/Libc-262.2.12/db/hash/hash_func.c
+++ Libc/Libc-320/db/hash/hash_func.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
@@ -22,7 +22,7 @@
*
* @APPLE_LICENSE_HEADER_END@
*/
-/*
+/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -58,6 +58,10 @@
* SUCH DAMAGE.
*/
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)hash_func.c 8.2 (Berkeley) 2/21/94";
+#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
#include <sys/types.h>
@@ -66,13 +70,13 @@
#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;
+u_int32_t (*__default_hash)(const void *, size_t) = hash4;
/*
* HASH FUNCTIONS
@@ -89,10 +93,10 @@
static u_int32_t
hash1(keyarg, len)
const void *keyarg;
- register size_t len;
-{
- register const u_char *key;
- register u_int32_t h;
+ size_t len;
+{
+ const u_char *key;
+ u_int32_t h;
/* Convert string to integer */
for (key = keyarg, h = 0; len--;)
@@ -111,9 +115,9 @@
const void *keyarg;
size_t len;
{
- register const u_char *e, *key;
- register u_int32_t h;
- register u_char c;
+ const u_char *e, *key;
+ u_int32_t h;
+ u_char c;
key = keyarg;
e = key + len;
@@ -138,11 +142,11 @@
static u_int32_t
hash3(keyarg, len)
const void *keyarg;
- register size_t len;
-{
- register const u_char *key;
- register size_t loop;
- register u_int32_t h;
+ size_t len;
+{
+ const u_char *key;
+ size_t loop;
+ u_int32_t h;
#define HASHC h = *key++ + 65599 * h
@@ -186,11 +190,11 @@
static u_int32_t
hash4(keyarg, len)
const void *keyarg;
- register size_t len;
-{
- register const u_char *key;
- register size_t loop;
- register u_int32_t h;
+ size_t len;
+{
+ const u_char *key;
+ size_t loop;
+ u_int32_t h;
#define HASH4a h = (h << 5) - h + *key++;
#define HASH4b h = (h << 5) + h + *key++;