1 --- dbm.3 2005-07-28 16:23:28.000000000 -0700
2 +++ dbm.3.edit 2006-07-12 11:16:35.000000000 -0700
5 .Nd database access functions
10 -.Fn dbm_open "const char *base" "int flags" "int mode"
16 -.Fn dbm_close "DBM *db"
21 -.Fn dbm_store "DBM *db" "datum key" "datum data" "int flags"
23 -.Fn dbm_fetch "DBM *db" "datum key"
33 -.Fn dbm_delete "DBM *db" "datum key"
38 -.Fn dbm_firstkey "DBM *db"
44 -.Fn dbm_nextkey "DBM *db"
46 -.Fn dbm_error "DBM *db"
48 -.Fn dbm_clearerr "DBM *db"
58 +.Fa "const char *file"
60 +.Fa "mode_t file_mode"
63 -.Fn dbm_dirfno "DBM *db"
71 Database access functions.
72 These functions are implemented using
77 -.Fn dbm_open base flags mode
78 +.Fn dbm_open file open_flags file_mode
80 -opens or creates a database.
81 +opens or creates a database file.
86 is the basename of the file containing
87 the database; the actual database has a
94 .Qq Li /home/me/mystuff
95 then the actual database is in the file
96 .Pa /home/me/mystuff.db .
106 .Pq Dv O_RDWR | O_CREAT
107 is a typical value for
111 is a typical value for
115 is treated as O_RDWR in
118 The pointer returned by
120 identifies the database and is the
121 @@ -130,18 +156,18 @@
122 normally returns zero.
125 -.Fn dbm_store db key data flags
126 +.Fn dbm_store db key content store_mode
128 inserts or replaces an entry in the database.
142 and the database already contains an entry for
145 normally returns zero but returns 1 if the entry could not be
161 @@ -223,10 +249,30 @@
164 returns the file descriptor to the database.
166 +.Fd #include <fcntl.h>
167 +.Fd #include <ndbm.h>
171 +is necessary for all functions.
176 +.Fa "const char *file"
177 +.Fa "int open_flags"
191 These functions (except