summaryrefslogtreecommitdiff
path: root/lib/libc/db/man
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-04-18 17:08:11 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-04-18 17:08:11 +0000
commitb835de039b7bd67bb933abfe4d90444ba26ca99e (patch)
treeafa214c1486bb083dbb31848772368afdba36e46 /lib/libc/db/man
parent44df8b77706890435e485c323ff5be8bec119bcb (diff)
o Opening a zero-length hash file should not be an error
o Correct odbm support o Add man links for ndbm and odbm
Diffstat (limited to 'lib/libc/db/man')
-rw-r--r--lib/libc/db/man/Makefile.inc8
-rw-r--r--lib/libc/db/man/dbm.332
-rw-r--r--lib/libc/db/man/ndbm.34
3 files changed, 31 insertions, 13 deletions
diff --git a/lib/libc/db/man/Makefile.inc b/lib/libc/db/man/Makefile.inc
index efd058ce94d..ef58ed8fcce 100644
--- a/lib/libc/db/man/Makefile.inc
+++ b/lib/libc/db/man/Makefile.inc
@@ -1,6 +1,12 @@
-# $OpenBSD: Makefile.inc,v 1.8 1999/02/15 05:11:24 millert Exp $
+# $OpenBSD: Makefile.inc,v 1.9 1999/04/18 17:08:10 millert Exp $
.PATH: ${LIBCSRCDIR}/db/man
MAN+= btree.3 dbm.3 dbopen.3 hash.3 mpool.3 ndbm.3 recno.3
MLINKS+= dbopen.3 db.3
+MLINKS+= dbm.3 dbminit.3 dbm.3 dbmclose.3 dbm.3 fetch.3 dbm.3 store.3
+MLINKS+= dbm.3 delete.3 dbm.3 firstkey.3 dbm.3 nextkey.3
+MLINKS+= ndbm.3 dbm_clearerr.3 ndbm.3 dbm_close.3 ndbm.3 dbm_delete.3
+MLINKS+= ndbm.3 dbm_dirfno.3 ndbm.3 dbm_error.3 ndbm.3 dbm_fetch.3
+MLINKS+= ndbm.3 dbm_firstkey.3 ndbm.3 dbm_nextkey.3 ndbm.3 dbm_open.3
+MLINKS+= ndbm.3 dbm_pagfno.3 ndbm.3 dbm_store.3
diff --git a/lib/libc/db/man/dbm.3 b/lib/libc/db/man/dbm.3
index 799170cb12e..be00a141ae8 100644
--- a/lib/libc/db/man/dbm.3
+++ b/lib/libc/db/man/dbm.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dbm.3,v 1.1 1999/02/15 05:11:24 millert Exp $
+.\" $OpenBSD: dbm.3,v 1.2 1999/04/18 17:08:10 millert Exp $
.\"
.\" Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
.\" All rights reserved.
@@ -72,12 +72,14 @@ typedef struct {
.Pp
The
.Fn dbminit
-function is used to open a database in the file named by
-.Fa file ,
-suffixed with
-.Dv DBM_SUFFIX
-.Pq Sq Pa .db .
-The file is created if it does not already exist.
+function is used to open a database. Before the call to
+.Fn dbminit ,
+the files
+.Fa file.pag
+and
+.Fa file.dir
+must exist. The user is responsible for creating the zero-length
+\&.pag and .dir files.
.Pp
Once the database is open,
.Fn fetch
@@ -137,9 +139,19 @@ Functions that return a
.Ft datum
indicate errors by setting the
.Va dptr
-field set to
+field to
.Dv NULL .
.Sh SEE ALSO
.Xr db 3 ,
-.Xr ndbm 3 ,
-.Xr hash 3
+.Xr hash 3 ,
+.Xr ndbm 3
+.Sh BUGS
+Because the
+.Nm dbm
+routines are implemented on top of the
+.Xr db 3 ,
+only a single file,
+.Ar file.pag ,
+is used to actually store the database. The references to
+.Ar file.dir
+are purely for backwards compatibility with historic implementations.
diff --git a/lib/libc/db/man/ndbm.3 b/lib/libc/db/man/ndbm.3
index e28fc7eb111..7219527a9a7 100644
--- a/lib/libc/db/man/ndbm.3
+++ b/lib/libc/db/man/ndbm.3
@@ -1,5 +1,5 @@
.\" David Leonard, 1998. Placed in the public domain.
-.\" $OpenBSD: ndbm.3,v 1.4 1999/02/15 05:11:25 millert Exp $
+.\" $OpenBSD: ndbm.3,v 1.5 1999/04/18 17:08:10 millert Exp $
.Dd May 13, 1998
.Os OpenBSD
.Dt NDBM 3
@@ -158,7 +158,7 @@ Routines that return a
.Ft datum
indicate errors by setting the
.Va dptr
-field set to
+field to
.Dv NULL .
.Pp
The