]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/recno.3
rename.2: SEE ALSO: add rename(1)
[thirdparty/man-pages.git] / man3 / recno.3
index 901d1349483898e4a588fd15a8a4ce71247e4cd9..f20b433ce001d31ff8f8c96ad2af39995effac2a 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (c) 1990, 1993
 .\"    The Regents of the University of California.  All rights reserved.
 .\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
+.\" %%%LICENSE_END
 .\"
 .\"    @(#)recno.3     8.5 (Berkeley) 8/18/94
 .\"
-.TH RECNO 3 1994-08-18 "" "Linux Programmer's Manual"
+.TH RECNO 3 2017-09-15 "" "Linux Programmer's Manual"
 .UC 7
 .SH NAME
 recno \- record number database access method
@@ -43,13 +45,20 @@ recno \- record number database access method
 .ft R
 .fi
 .SH DESCRIPTION
+.IR "Note well" :
+This page documents interfaces provided in glibc up until version 2.1.
+Since version 2.2, glibc no longer provides these interfaces.
+Probably, you are looking for the APIs provided by the
+.I libdb
+library instead.
+.PP
 The routine
-.I dbopen
+.BR dbopen (3)
 is the library interface to database files.
 One of the supported file formats is record number files.
 The general description of the database access methods is in
 .BR dbopen (3),
-this manual page describes only the recno specific information.
+this manual page describes only the recno-specific information.
 .PP
 The record number data structure is either variable or fixed-length
 records stored in a flat-file format, accessed by the logical record
@@ -60,31 +69,34 @@ record number five to be renumbered to record number four, as well
 as the cursor, if positioned after record number one, to shift down
 one record.
 .PP
-The recno access method specific data structure provided to
-.I dbopen
-is defined in the <db.h> include file as follows:
+The recno access-method-specific data structure provided to
+.BR dbopen (3)
+is defined in the
+.I <db.h>
+include file as follows:
 .PP
-.nf
+.in +4n
+.EX
 typedef struct {
-    u_long  flags;
-    u_int   cachesize;
-    u_int   psize;
-    int     lorder;
-    size_t  reclen;
-    u_char  bval;
-    char   *bfname;
+    unsigned long flags;
+    unsigned int  cachesize;
+    unsigned int  psize;
+    int           lorder;
+    size_t        reclen;
+    unsigned char bval;
+    char         *bfname;
 } RECNOINFO;
-.fi
+.EE
+.in
 .PP
 The elements of this structure are defined as follows:
 .TP
-flags
-The flag value is specified by
-.IR or 'ing
+.I flags
+The flag value is specified by ORing
 any of the following values:
 .RS
 .TP
-R_FIXEDLEN
+.B R_FIXEDLEN
 The records are fixed-length, not byte delimited.
 The structure element
 .I reclen
@@ -95,78 +107,88 @@ Any records, inserted into the database, that are less than
 .I reclen
 bytes long are automatically padded.
 .TP
-R_NOKEY
+.B R_NOKEY
 In the interface specified by
-.IR dbopen ,
+.BR dbopen (3),
 the sequential record retrieval fills in both the caller's key and
 data structures.
-If the R_NOKEY flag is specified, the
+If the
+.B R_NOKEY
+flag is specified, the
 .I cursor
 routines are not required to fill in the key structure.
 This permits applications to retrieve records at the end of files without
 reading all of the intervening records.
 .TP
-R_SNAPSHOT
+.B R_SNAPSHOT
 This flag requires that a snapshot of the file be taken when
-.I dbopen
+.BR dbopen (3)
 is called, instead of permitting any unmodified records to be read from
 the original file.
 .RE
 .TP
-cachesize
+.I cachesize
 A suggested maximum size, in bytes, of the memory cache.
 This value is
 .B only
 advisory, and the access method will allocate more memory rather than fail.
 If
 .I cachesize
-is  0 (no size is specified) a default cache is used.
+is  0 (no size is specified), a default cache is used.
 .TP
-psize
+.I psize
 The recno access method stores the in-memory copies of its records
 in a btree.
 This value is the size (in bytes) of the pages used for nodes in that tree.
 If
 .I psize
-is 0 (no page size is specified) a page size is chosen based on the
-underlying file system I/O block size.
+is 0 (no page size is specified), a page size is chosen based on the
+underlying filesystem I/O block size.
 See
 .BR btree (3)
 for more information.
 .TP
-lorder
+.I lorder
 The byte order for integers in the stored database metadata.
 The number should represent the order as an integer; for example,
 big endian order would be the number 4,321.
 If
 .I lorder
-is 0 (no order is specified) the current host order is used.
+is 0 (no order is specified), the current host order is used.
 .TP
-reclen
+.I reclen
 The length of a fixed-length record.
 .TP
-bval
+.I bval
 The delimiting byte to be used to mark the end of a record for
 variable-length records, and the pad character for fixed-length
 records.
-If no value is specified, newlines (``\en'') are used to mark the end
+If no value is specified, newlines ("\en") are used to mark the end
 of variable-length records and fixed-length records are padded with
 spaces.
 .TP
-bfname
+.I bfname
 The recno access method stores the in-memory copies of its records
 in a btree.
-If bfname is non-NULL, it specifies the name of the btree file,
-as if specified as the filename for a dbopen of a btree file.
+If
+.I bfname
+is non-NULL, it specifies the name of the btree file,
+as if specified as the filename for a
+.BR dbopen (3)
+of a btree file.
 .PP
-The data part of the key/data pair used by the recno access method
+The data part of the key/data pair used by the
+.I recno
+access method
 is the same as other access methods.
 The key is different.
 The
 .I data
 field of the key should be a pointer to a memory location of type
 .IR recno_t ,
-as defined in the <db.h> include file.
+as defined in the
+.I <db.h>
+include file.
 This type is normally the largest unsigned integral type available to
 the implementation.
 The
@@ -179,7 +201,7 @@ recno access method files, any changes made to the default values
 specified each time the file is opened.
 .PP
 In the interface specified by
-.IR dbopen ,
+.BR dbopen (3),
 using the
 .I put
 interface to create a new record will cause the creation of multiple,
@@ -194,17 +216,17 @@ for any of the errors specified for the library routine
 .BR dbopen (3)
 or the following:
 .TP
-[EINVAL]
+.B EINVAL
 An attempt was made to add a record to a fixed-length database that
 was too large to fit.
 .SH BUGS
 Only big and little endian byte order is supported.
-.SH "SEE ALSO"
-.BR btree (3)
+.SH SEE ALSO
+.BR btree (3),
 .BR dbopen (3),
 .BR hash (3),
 .BR mpool (3)
-.sp
+.PP
 .IR "Document Processing in a Relational Database System" ,
 Michael Stonebraker, Heidi Stettner, Joseph Kalash, Antonin Guttman,
 Nadene Lynn, Memorandum No. UCB/ERL M82/32, May 1982.