BSD 4_4 release
[unix-history] / usr / src / old / libndbm / ndbm.c
index 317805a..1734fe4 100644 (file)
@@ -1,31 +1,36 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+/*-
+ * Copyright (c) 1983 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This module is believed to contain source code proprietary to AT&T.
+ * Use and redistribution is subject to the Berkeley Software License
+ * Agreement and your Software Agreement with AT&T (Western Electric).
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ndbm.c     5.4 (Berkeley) %G%";
-#endif LIBC_SCCS and not lint
+static char sccsid[] = "@(#)ndbm.c     5.7 (Berkeley) 4/22/91";
+#endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/file.h>
 #include <stdio.h>
 #include <errno.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/file.h>
 #include <stdio.h>
 #include <errno.h>
-#include <ndbm.h>
+#include "ndbm.h"
 
 #define BYTESIZ 8
 #undef setbit
 
 
 #define BYTESIZ 8
 #undef setbit
 
-static  datum makdatum();
-static  long hashinc();
-static  long dcalchash();
-extern  int errno;
+static datum makdatum();
+static long hashinc();
+static long dcalchash();
+static int additem(), delitem(), finddatum(), getbit();
+static void dbm_access(), setbit();
+extern int errno;
 
 DBM *
 dbm_open(file, flags, mode)
 
 DBM *
 dbm_open(file, flags, mode)
-       char *file;
+       const char *file;
        int flags, mode;
 {
        struct stat statb;
        int flags, mode;
 {
        struct stat statb;
@@ -261,7 +266,7 @@ err:
        return (item);
 }
 
        return (item);
 }
 
-static
+static void
 dbm_access(db, hash)
        register DBM *db;
        long hash;
 dbm_access(db, hash)
        register DBM *db;
        long hash;
@@ -308,7 +313,7 @@ getbit(db)
        return (db->dbm_dirbuf[i] & (1<<n));
 }
 
        return (db->dbm_dirbuf[i] & (1<<n));
 }
 
-static
+static void
 setbit(db)
        register DBM *db;
 {
 setbit(db)
        register DBM *db;
 {