ANSI prototypes
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 23 Feb 1991 09:23:40 +0000 (01:23 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 23 Feb 1991 09:23:40 +0000 (01:23 -0800)
SCCS-vsn: lib/libc/db/btree/bt_overflow.c 5.2
SCCS-vsn: lib/libc/db/btree/bt_open.c 5.5
SCCS-vsn: lib/libc/db/btree/btree.h 5.2
SCCS-vsn: lib/libc/db/btree/bt_delete.c 5.2
SCCS-vsn: lib/libc/db/btree/bt_put.c 5.3
SCCS-vsn: lib/libc/db/btree/lrucache.c 5.3
SCCS-vsn: lib/libc/db/btree/lruhash.c 5.2
SCCS-vsn: lib/libc/db/btree/lrutils.c 5.2
SCCS-vsn: lib/libc/db/btree/bt_seq.c 5.3
SCCS-vsn: lib/libc/db/btree/bt_split.c 5.2
SCCS-vsn: lib/libc/db/btree/bt_get.c 5.2
SCCS-vsn: lib/libc/db/btree/updutils.c 5.2
SCCS-vsn: lib/libc/db/btree/bt_utils.c 5.2
SCCS-vsn: lib/libc/db/hash/hash_bigkey.c 5.2
SCCS-vsn: lib/libc/db/hash/hash_buf.c 5.5
SCCS-vsn: lib/libc/db/hash/hash.c 5.10
SCCS-vsn: lib/libc/db/hash/hsearch.c 5.3
SCCS-vsn: lib/libc/db/hash/ndbm.c 5.4
SCCS-vsn: lib/libc/db/hash/hash_page.c 5.9

19 files changed:
usr/src/lib/libc/db/btree/bt_delete.c
usr/src/lib/libc/db/btree/bt_get.c
usr/src/lib/libc/db/btree/bt_open.c
usr/src/lib/libc/db/btree/bt_overflow.c
usr/src/lib/libc/db/btree/bt_put.c
usr/src/lib/libc/db/btree/bt_seq.c
usr/src/lib/libc/db/btree/bt_split.c
usr/src/lib/libc/db/btree/bt_utils.c
usr/src/lib/libc/db/btree/btree.h
usr/src/lib/libc/db/btree/lrucache.c
usr/src/lib/libc/db/btree/lruhash.c
usr/src/lib/libc/db/btree/lrutils.c
usr/src/lib/libc/db/btree/updutils.c
usr/src/lib/libc/db/hash/hash.c
usr/src/lib/libc/db/hash/hash_bigkey.c
usr/src/lib/libc/db/hash/hash_buf.c
usr/src/lib/libc/db/hash/hash_page.c
usr/src/lib/libc/db/hash/hsearch.c
usr/src/lib/libc/db/hash/ndbm.c

index 919441c..3161031 100644 (file)
@@ -9,12 +9,13 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_delete.c        5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_delete.c        5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
-#include <sys/errno.h>
 #include <db.h>
 #include <db.h>
+#include <errno.h>
+#include <string.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index c424053..3c68482 100644 (file)
@@ -9,14 +9,15 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_get.c   5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_get.c   5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
-#include <sys/types.h>
-#include <sys/errno.h>
-#include <sys/file.h>
 #include <db.h>
 #include <db.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index 185a19e..d1a34b6 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_open.c  5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_open.c  5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -35,12 +35,14 @@ static char sccsid[] = "@(#)bt_open.c       5.4 (Berkeley) %G%";
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
-#include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
-#include <sys/signal.h>
-#include <sys/errno.h>
-#include <sys/types.h>
+#include <signal.h>
+#include <errno.h>
+#include <fcntl.h>
 #include <db.h>
 #include <db.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include "btree.h"
 
 BTREEINFO _DefaultBTInfo = {
 #include "btree.h"
 
 BTREEINFO _DefaultBTInfo = {
@@ -73,10 +75,10 @@ BTREEINFO _DefaultBTInfo = {
 
 DB *
 btree_open(f, flags, mode, b)
 
 DB *
 btree_open(f, flags, mode, b)
-       char *f;
+       const char *f;
        int flags;
        int mode;
        int flags;
        int mode;
-       BTREEINFO *b;
+       const BTREEINFO *b;
 {
        DB *db;
        BTREE t;
 {
        DB *db;
        BTREE t;
@@ -91,7 +93,7 @@ btree_open(f, flags, mode, b)
 
        db->internal = (char *) t;
        db->close = bt_close;
 
        db->internal = (char *) t;
        db->close = bt_close;
-       db->delete = bt_delete;
+       db->del = bt_delete;
        db->get = bt_get;
        db->put = bt_put;
        db->seq = bt_seq;
        db->get = bt_get;
        db->put = bt_put;
        db->seq = bt_seq;
index a36464c..3976cd2 100644 (file)
@@ -9,11 +9,13 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_overflow.c      5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_overflow.c      5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
+#include <stdlib.h>
+#include <string.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index f31774d..c15b811 100644 (file)
@@ -9,11 +9,13 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_put.c   5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_put.c   5.3 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
+#include <stdlib.h>
+#include <string.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index 274bed6..add902f 100644 (file)
@@ -9,12 +9,13 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_seq.c   5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_seq.c   5.3 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <db.h>
 #include <db.h>
+#include <stdlib.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index c0b73b4..4f2fe33 100644 (file)
@@ -9,11 +9,13 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_split.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_split.c 5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
+#include <stdlib.h>
+#include <string.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index ec1cc84..7aca182 100644 (file)
@@ -9,11 +9,13 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_utils.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_utils.c 5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
+#include <stdlib.h>
+#include <string.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index 3c677c9..078e319 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 /*
  */
 
 /*
- *  @(#)btree.h        5.1 (Berkeley) %G%
+ *  @(#)btree.h        5.2 (Berkeley) %G%
  */
 
 typedef char   *BTREE;         /* should really be (void *) */ 
  */
 
 typedef char   *BTREE;         /* should really be (void *) */ 
@@ -29,9 +29,6 @@ typedef char  *BTREE;         /* should really be (void *) */
 #define NULL   0
 #endif /* ndef NULL */
 
 #define NULL   0
 #endif /* ndef NULL */
 
-/* libc */
-extern char *malloc();
-
 /* these are defined in lrucache.c */
 extern char    *lruinit();
 extern char    *lruget();
 /* these are defined in lrucache.c */
 extern char    *lruinit();
 extern char    *lruget();
index e86fa6a..f7c1069 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-char sccsid[] = "@(#)lrucache.c        5.2 (Berkeley) %G%";
+char sccsid[] = "@(#)lrucache.c        5.3 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -19,7 +19,9 @@ char sccsid[] = "@(#)lrucache.c       5.2 (Berkeley) %G%";
  *     btrees.
  */
 #include <sys/param.h>
  *     btrees.
  */
 #include <sys/param.h>
-#include <sys/file.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include "lrucache.h"
 
 /*
 #include "lrucache.h"
 
 /*
index e90f2be..a1647a4 100644 (file)
@@ -9,9 +9,10 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lruhash.c  5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)lruhash.c  5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
+#include <stdlib.h>
 #include "lrucache.h"
 
 #define HASH(l, pgno)  (pgno % l->lru_csize)
 #include "lrucache.h"
 
 #define HASH(l, pgno)  (pgno % l->lru_csize)
index 30adf8d..adf8481 100644 (file)
@@ -9,10 +9,11 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lrutils.c  5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)lrutils.c  5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
-#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
 #include "lrucache.h"
 
 /*
 #include "lrucache.h"
 
 /*
index 929399e..250c52a 100644 (file)
@@ -9,11 +9,13 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)updutils.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)updutils.c 5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <db.h>
+#include <stdlib.h>
+#include <string.h>
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
index a15a120..358d81f 100644 (file)
@@ -9,19 +9,20 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash.c     5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash.c     5.10 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
-#include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
+#include <fcntl.h>
 #include <errno.h>
 #include <assert.h>
 #include <db.h>
 #include <errno.h>
 #include <assert.h>
 #include <db.h>
-#include <unistd.h>
 #include <stdio.h>
 #include <stdio.h>
-#include "hash.h"
+#include <stdlib.h>
+#include <unistd.h>
 #include <string.h>
 #include <string.h>
+#include "hash.h"
 
 /* Fast arithmetic, relying on powers of 2, */
 
 
 /* Fast arithmetic, relying on powers of 2, */
 
@@ -34,9 +35,6 @@ static char sccsid[] = "@(#)hash.c    5.9 (Berkeley) %G%";
 #define        ERROR   -1
 #define        ABNORMAL 1
 
 #define        ERROR   -1
 #define        ABNORMAL 1
 
-/* external routines */
-extern char *calloc();
-
 /* page.c */
 extern int __get_page();
 extern int __split_page();
 /* page.c */
 extern int __get_page();
 extern int __split_page();
index ae11581..0c5a77d 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_bigkey.c      5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash_bigkey.c      5.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /******************************************************************************
 #endif /* LIBC_SCCS and not lint */
 
 /******************************************************************************
@@ -32,12 +32,13 @@ ROUTINES:
        collect_data
 ******************************************************************************/
 /* Includes */
        collect_data
 ******************************************************************************/
 /* Includes */
-#include <sys/param.h>
-#include <sys/file.h>
+#include <sys/types.h>
 #include <assert.h>
 #include <errno.h>
 #include <db.h>
 #include <stdio.h>
 #include <assert.h>
 #include <errno.h>
 #include <db.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include "hash.h"
 #include "page.h"
 
 #include "hash.h"
 #include "page.h"
 
index e00cc1e..e96085c 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_buf.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash_buf.c 5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /******************************************************************************
 #endif /* LIBC_SCCS and not lint */
 
 /******************************************************************************
@@ -29,12 +29,12 @@ ROUTINES:
        newbuf
 
 ******************************************************************************/
        newbuf
 
 ******************************************************************************/
-#include <sys/param.h>
-#include <sys/file.h>
+#include <sys/types.h>
 #include <assert.h>
 #include <errno.h>
 #include <assert.h>
 #include <errno.h>
-#include "hash.h"
 #include <stdio.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include "hash.h"
 
 /* Externals */
 extern HTAB    *hashp;
 
 /* Externals */
 extern HTAB    *hashp;
index e4cfb64..6b13c05 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_page.c        5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash_page.c        5.9 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /******************************************************************************
 #endif /* LIBC_SCCS and not lint */
 
 /******************************************************************************
@@ -28,12 +28,14 @@ ROUTINES:
 ******************************************************************************/
 
 #include <sys/param.h>
 ******************************************************************************/
 
 #include <sys/param.h>
-#include <sys/file.h>
+#include <fcntl.h>
 #include <signal.h>
 #include <assert.h>
 #include <errno.h>
 #include <db.h>
 #include <stdio.h>
 #include <signal.h>
 #include <assert.h>
 #include <errno.h>
 #include <db.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include "hash.h"
 #include "page.h"
 #include <unistd.h>
 #include "hash.h"
 #include "page.h"
index f3dfeda..8fcb0b0 100644 (file)
@@ -9,12 +9,12 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hsearch.c  5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)hsearch.c  5.3 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
-#include <sys/file.h>
 #include <sys/types.h>
 #include <sys/types.h>
-#include <stdio.h>
+#include <fcntl.h>
+#include <string.h>
 #include <db.h>
 #include "search.h"
 
 #include <db.h>
 #include "search.h"
 
index 3714bd3..8a970b0 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ndbm.c     5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)ndbm.c     5.4 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -19,7 +19,8 @@ static char sccsid[] = "@(#)ndbm.c    5.3 (Berkeley) %G%";
 
 #include <sys/param.h>
 #include <ndbm.h>
 
 #include <sys/param.h>
 #include <ndbm.h>
-#include <stddef.h>
+#include <db.h>
+#include <stdio.h>
 #include "hash.h"
 
 /*
 #include "hash.h"
 
 /*