summaryrefslogtreecommitdiffstats
path: root/lib/libc/db/man
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
committerru <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
commit8746d263e1451855025dc83dde5176cc9f1fbe3f (patch)
treeee7f7ba4650cadf44410ca9a44676c72c96739b7 /lib/libc/db/man
parent160081aef68b0dc49b79d3b7702b75671d9c06ff (diff)
downloadFreeBSD-src-8746d263e1451855025dc83dde5176cc9f1fbe3f.zip
FreeBSD-src-8746d263e1451855025dc83dde5176cc9f1fbe3f.tar.gz
mdoc(7) police: "The .Fn function".
Diffstat (limited to 'lib/libc/db/man')
-rw-r--r--lib/libc/db/man/dbm.332
-rw-r--r--lib/libc/db/man/dbopen.312
-rw-r--r--lib/libc/db/man/mpool.312
3 files changed, 50 insertions, 6 deletions
diff --git a/lib/libc/db/man/dbm.3 b/lib/libc/db/man/dbm.3
index 961ea85..a78d35a 100644
--- a/lib/libc/db/man/dbm.3
+++ b/lib/libc/db/man/dbm.3
@@ -73,7 +73,9 @@ typedef struct {
} datum;
.Ed
.Pp
+The
.Fn dbm_open base flags mode
+function
opens or creates a database.
.Fa base
is the basename of the file containing
@@ -105,19 +107,27 @@ The pointer returned by
identifies the database and is the
.Fa db
argument to the other functions.
+The
.Fn dbm_open
+function
returns
.Dv NULL
and sets
.Va errno
if there were any errors.
.Pp
+The
.Fn dbm_close db
+function
closes the database.
+The
.Fn dbm_close
+function
normally returns zero.
.Pp
+The
.Fn dbm_store db key data flags
+function
inserts or replaces an entry in the database.
.Fa flags
is either
@@ -132,7 +142,9 @@ and the database already contains an entry for
.Fa key ,
that entry is not replaced.
Otherwise the entry is replaced or inserted.
+The
.Fn dbm_store
+function
normally returns zero but returns 1 if the entry could not be
inserted (because
.Fa flags
@@ -144,7 +156,9 @@ already exists) or returns -1 and sets
.Va errno
if there were any errors.
.Pp
+The
.Fn dbm_fetch db key
+function
returns
.Dv NULL
or the
@@ -152,38 +166,56 @@ or the
corresponding to
.Fa key .
.Pp
+The
.Fn dbm_delete db key
+function
deletes the entry for
.Fa key .
+The
.Fn dbm_delete
+function
normally returns zero but returns 1 if there was no entry with
.Fa key
in the database or returns -1 and sets
.Va errno
if there were any errors.
.Pp
+The
.Fn dbm_firstkey db
+function
returns the first key in the database.
+The
.Fn dbm_nextkey db
+function
returns subsequent keys.
+The
.Fn db_firstkey
+function
must be called before
.Fn dbm_nextkey .
The order in which keys are returned is unspecified and may appear
random.
+The
.Fn dbm_nextkey
+function
returns
.Dv NULL
after all keys have been returned.
.Pp
+The
.Fn dbm_error db
+function
returns the
.Va errno
value of the most recent error.
+The
.Fn dbm_clearerr db
+function
resets this value to 0 and returns 0.
.Pp
+The
.Fn dbm_dirfno db
+function
returns the file descriptor to the database.
.Sh SEE ALSO
.Xr open 2 ,
diff --git a/lib/libc/db/man/dbopen.3 b/lib/libc/db/man/dbopen.3
index 8fce3b2..44ff657 100644
--- a/lib/libc/db/man/dbopen.3
+++ b/lib/libc/db/man/dbopen.3
@@ -46,7 +46,9 @@
.Ft DB *
.Fn dbopen "const char *file" "int flags" "int mode" "DBTYPE type" "const void *openinfo"
.Sh DESCRIPTION
-.Fn Dbopen
+The
+.Fn dbopen
+function
is the library interface to database files.
The supported file formats are btree, hashed and UNIX file oriented.
The btree format is a representation of a sorted, balanced tree structure.
@@ -60,7 +62,9 @@ in their respective manual pages
and
.Xr recno 3 .
.Pp
-.Fn Dbopen
+The
+.Fn dbopen
+function
opens
.Fa file
for reading and/or writing.
@@ -131,7 +135,9 @@ is
each access method will use defaults appropriate for the system
and the access method.
.Pp
-.Fn Dbopen
+The
+.Fn dbopen
+function
returns a pointer to a
.Ft DB
structure on success and
diff --git a/lib/libc/db/man/mpool.3 b/lib/libc/db/man/mpool.3
index 38787167..26333b8 100644
--- a/lib/libc/db/man/mpool.3
+++ b/lib/libc/db/man/mpool.3
@@ -167,7 +167,9 @@ any of the following values:
The page has been modified and needs to be written to the backing file.
.El
.Pp
-.Fn Mpool_put
+The
+.Fn mpool_put
+function
returns 0 on success and -1 if an error occurs.
.Pp
The function
@@ -176,7 +178,9 @@ writes all modified pages associated with the
.Ft MPOOL
pointer to the
backing file.
-.Fn Mpool_sync
+The
+.Fn mpool_sync
+function
returns 0 on success and -1 if an error occurs.
.Pp
The
@@ -186,7 +190,9 @@ cookie.
Modified pages are
.Em not
written to the backing file.
-.Fn Mpool_close
+The
+.Fn mpool_close
+function
returns 0 on success and -1 if an error occurs.
.Sh ERRORS
The
OpenPOWER on IntegriCloud