Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/cdb Various fixes, mostly for typos.
details: https://anonhg.NetBSD.org/src/rev/fbae80f8dadd
branches: trunk
changeset: 754262:fbae80f8dadd
user: wiz <wiz%NetBSD.org@localhost>
date: Sun Apr 25 10:32:44 2010 +0000
description:
Various fixes, mostly for typos.
diffstat:
lib/libc/cdb/cdb.5 | 16 ++++++++--------
lib/libc/cdb/cdbr.3 | 10 +++++-----
lib/libc/cdb/cdbw.3 | 12 ++++++------
3 files changed, 19 insertions(+), 19 deletions(-)
diffs (137 lines):
diff -r eb30d63babf4 -r fbae80f8dadd lib/libc/cdb/cdb.5
--- a/lib/libc/cdb/cdb.5 Sun Apr 25 10:05:22 2010 +0000
+++ b/lib/libc/cdb/cdb.5 Sun Apr 25 10:32:44 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: cdb.5,v 1.1 2010/04/25 00:54:46 joerg Exp $
+.\" $NetBSD: cdb.5,v 1.2 2010/04/25 10:32:44 wiz Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -38,12 +38,12 @@
The
.Nm
database format provides a space-efficient (key,value) database.
-The format doesn't allow updates in any convient form.
-The file overhead is around 5 Byte per key and 5 Byte per entry.
-Keys are not stored and it is the responsibility of the using application
+The format doesn't allow updates in any convenient form.
+The file overhead is around 5 bytes per key and 5 bytes per entry.
+Keys are not stored and it is the responsibility of the caller
to validate matches.
The index structure is based on a minimal perfect hash table, so exactly
-one entry has to be checked for match.
+one entry has to be checked for a match.
.Ss General Format
The header record of a
.Nm
@@ -68,7 +68,7 @@
.Va entries
to base 256, rounded up.
.Pp
-The index records are followed by the the start offsets of the entries,
+The index records are followed by the start offsets of the entries,
followed by
.Va data_size .
The offsets are relative to the end of the offset record table and are
@@ -82,9 +82,9 @@
.Ss Limitations
The
.Nm
-file format is by design intended for a databases that can be
+file format is by design intended for a database that can be
mapped into memory.
-The hard limit for the number of entries and keys 3435973836.
+The hard limit for the number of entries and keys is 3435973836.
The total size of all values must be smaller than 4GiB.
.Sh SEE ALSO
.Xr cdbr 3 ,
diff -r eb30d63babf4 -r fbae80f8dadd lib/libc/cdb/cdbr.3
--- a/lib/libc/cdb/cdbr.3 Sun Apr 25 10:05:22 2010 +0000
+++ b/lib/libc/cdb/cdbr.3 Sun Apr 25 10:32:44 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: cdbr.3,v 1.1 2010/04/25 00:54:46 joerg Exp $
+.\" $NetBSD: cdbr.3,v 1.2 2010/04/25 10:32:44 wiz Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -60,7 +60,7 @@
.Sh DESCRIPTION
The
.Nm
-library provides a space efficient key,value database based
+library provides a space efficient (key,value) database based
on perfect hashing.
.Pp
A cdb database is opened for reading by calling
@@ -81,7 +81,7 @@
.Pp
The number of records in the database can be obtained by calling
.Fn cdbr_entries .
-Records can be obtained by record number by using
+Records can be obtained by record number using
.Fn cdbr_get
or by key using
.Fn cdbr_find .
@@ -97,13 +97,13 @@
is called.
It is the responsibility of the caller of
.Fn cdbr_find
-to ensure, that the key matches the returned data.
+to ensure that the key matches the returned data.
The function returns the only possible match, but the database doesn't store
the keys to minimize overhead.
.Sh SEE ALSO
.Xr nbperf 1 ,
+.Xr cdbw 3 ,
.Xr db 3 ,
-.Xr cdbw 3 ,
.Xr cdb 5
.Sh HISTORY
Support for the
diff -r eb30d63babf4 -r fbae80f8dadd lib/libc/cdb/cdbw.3
--- a/lib/libc/cdb/cdbw.3 Sun Apr 25 10:05:22 2010 +0000
+++ b/lib/libc/cdb/cdbw.3 Sun Apr 25 10:32:44 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: cdbw.3,v 1.1 2010/04/25 00:54:46 joerg Exp $
+.\" $NetBSD: cdbw.3,v 1.2 2010/04/25 10:32:44 wiz Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -76,8 +76,8 @@
.Sh DESCRIPTION
The
.Nm cdbw
-funcations are used to create a constant databases for use with
-.Xr cdbr 5 .
+functions are used to create a constant databases for use with
+.Xr cdbr 3 .
Details about the file format, including overhead and limitations,
can be found in
.Xr cdb 5 .
@@ -92,7 +92,7 @@
frees all resources associated with the handle.
.Pp
.Fn cdbw_put
-adds the given key,value pair after checking for a duplicate key.
+adds the given (key,value) pair after checking for a duplicate key.
.Fn cdbw_put_data
adds the given value to the writer without adding a key reference.
The returned index can be used in subsequent calls to
@@ -104,7 +104,7 @@
.Pp
.Fn cdbw_output
computes the database file and writes it to the given descriptor.
-The function returns an error, if the file cannot be written correctly.
+The function returns an error if the file cannot be written correctly.
The
.Fn descr
parameter provides a human readable description of the database content.
@@ -112,7 +112,7 @@
.Fn seedgen
parameter can be used to override the default PRNG.
The function should return a different value for each invokation.
-The bitwise layout of the output depends on the choosen seed.
+The bitwise layout of the output depends on the chosen seed.
.Sh SEE ALSO
.Xr cdbr 3 ,
.Xr cdb 5
Home |
Main Index |
Thread Index |
Old Index