spelling correction
[unix-history] / usr / src / old / libndbm / ndbm.3
index 794024d..fe5c074 100644 (file)
@@ -2,9 +2,9 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)ndbm.3      6.2 (Berkeley) %G%
+.\"    @(#)ndbm.3      6.6 (Berkeley) %G%
 .\"
 .\"
-.TH NDBM 3X  ""
+.TH NDBM 3  ""
 .UC 6
 .SH NAME
 dbm_open, dbm_close, dbm_fetch, dbm_store, dbm_delete, dbm_firstkey, dbm_nextkey, dbm_error, dbm_clearerr \- data base subroutines
 .UC 6
 .SH NAME
 dbm_open, dbm_close, dbm_fetch, dbm_store, dbm_delete, dbm_firstkey, dbm_nextkey, dbm_error, dbm_clearerr \- data base subroutines
@@ -26,7 +26,7 @@ DBM *dbm_open(file, flags, mode)
     int flags, mode;
 .PP
 .ft B
     int flags, mode;
 .PP
 .ft B
-dbm_close(db)
+void dbm_close(db)
     DBM *db;
 .PP
 .ft B
     DBM *db;
 .PP
 .ft B
@@ -35,13 +35,13 @@ datum dbm_fetch(db, key)
     datum key;
 .PP
 .ft B
     datum key;
 .PP
 .ft B
-dbm_store(db, key, content, flags)
+int dbm_store(db, key, content, flags)
     DBM *db;
     datum key, content;
     int flags;
 .PP
 .ft B
     DBM *db;
     datum key, content;
     int flags;
 .PP
 .ft B
-dbm_delete(db, key)
+int dbm_delete(db, key)
     DBM *db;
     datum key;
 .PP
     DBM *db;
     datum key;
 .PP
@@ -54,16 +54,19 @@ datum dbm_nextkey(db)
     DBM *db;
 .PP
 .ft B
     DBM *db;
 .PP
 .ft B
-datum dbm_error(db)
+int dbm_error(db)
     DBM *db;
 .PP
 .ft B
     DBM *db;
 .PP
 .ft B
-datum dbm_clearerr(db)
+int dbm_clearerr(db)
     DBM *db;
 .SH DESCRIPTION
 These functions maintain key/content pairs in a data base.
 The functions will handle very large (a billion blocks)
 databases and will access a keyed item in one or two file system accesses.
     DBM *db;
 .SH DESCRIPTION
 These functions maintain key/content pairs in a data base.
 The functions will handle very large (a billion blocks)
 databases and will access a keyed item in one or two file system accesses.
+This package replaces the earlier
+.IR dbm (3x)
+library, which managed only a single database.
 .PP
 .IR Key s
 and
 .PP
 .IR Key s
 and
@@ -122,9 +125,9 @@ This code will traverse the data base:
 (key = dbm_firstkey(db); key.dptr != NULL; key = dbm_nextkey(db))
 .PP
 .I Dbm_error
 (key = dbm_firstkey(db); key.dptr != NULL; key = dbm_nextkey(db))
 .PP
 .I Dbm_error
-returns non-zero when an error has occured reading or writing the database.
+returns non-zero when an error has occurred reading or writing the database.
 .I Dbm_clearerr
 .I Dbm_clearerr
-Resets the error condition on the named database.
+resets the error condition on the named database.
 .SH DIAGNOSTICS
 All functions that return an
 .I int
 .SH DIAGNOSTICS
 All functions that return an
 .I int
@@ -133,6 +136,14 @@ Routines that return a
 .I datum
 indicate errors with a null (0)
 .I dptr.
 .I datum
 indicate errors with a null (0)
 .I dptr.
+If
+.IR dbm_store
+called with a
+.I flags
+value of
+.B DBM_INSERT
+finds an existing entry with the same key
+it returns 1.
 .SH BUGS
 The `.pag' file will contain holes so that its apparent size is about
 four times its actual content.  Older UNIX systems may create real
 .SH BUGS
 The `.pag' file will contain holes so that its apparent size is about
 four times its actual content.  Older UNIX systems may create real
@@ -158,3 +169,5 @@ The order of keys presented by
 and
 .I dbm_nextkey
 depends on a hashing function, not on anything interesting.
 and
 .I dbm_nextkey
 depends on a hashing function, not on anything interesting.
+.SH SEE ALSO
+dbm(3X)