aboutsummaryrefslogtreecommitdiff
path: root/doc/gdbm.texinfo
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-03 10:35:46 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-03 10:35:46 +0000
commitf13620502d9c7f4d2b5ad72ff80833721c7df5e8 (patch)
tree8180e7897597e515b5a1d9f5aa9d3ee9e2837758 /doc/gdbm.texinfo
parent20b3ff23de857b8bb3e45492cedb94e63d3ee207 (diff)
downloadgdbm-f13620502d9c7f4d2b5ad72ff80833721c7df5e8.tar.gz
gdbm-f13620502d9c7f4d2b5ad72ff80833721c7df5e8.tar.bz2
Revise.
Diffstat (limited to 'doc/gdbm.texinfo')
-rw-r--r--doc/gdbm.texinfo924
1 files changed, 579 insertions, 345 deletions
diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo
index c233267..27730f4 100644
--- a/doc/gdbm.texinfo
+++ b/doc/gdbm.texinfo
@@ -1,26 +1,36 @@
1\input texinfo @c -*- Texinfo -*- 1\input texinfo @c -*- Texinfo -*-
2@comment $Id$ 2@comment $Id$
3@comment %**start of header (This is for running Texinfo on a region.) 3@comment %**start of header (This is for running Texinfo on a region.)
4@setfilename gdbm.info 4@setfilename gdbm.info
5@include version.texi 5@include version.texi
6@settitle gdbm 6@settitle gdbm manual
7
8@ifinfo
7@dircategory Programming & development tools 9@dircategory Programming & development tools
8@direntry 10@direntry
9* GDBM: (gdbm). The GNU database manager. 11* GDBM: (gdbm). The GNU database manager.
10@end direntry 12@end direntry
13@end ifinfo
14
11@c @setchapternewpage odd 15@c @setchapternewpage odd
12@comment %**end of header (This is for running Texinfo on a region.) 16@comment %**end of header (This is for running Texinfo on a region.)
13 17
18@c Use @kwindex for keywords
19@defcodeindex kw
20@syncodeindex kw cp
21@c Use @flindex for files
22@defcodeindex fl
23@syncodeindex fl cp
24
14@iftex 25@iftex
15@finalout 26@finalout
16@end iftex 27@end iftex
17 28
18@ifinfo 29@copying
19This file documents the GNU dbm utility. 30This file documents the GNU dbm utility.
20 31
21Copyright (C) 1989-1999, 2007, 2008, 2009 Free Software Foundation, Inc. 32Copyright @copyright{} 1989-1999, 2007, 2008, 2009-2011 Free Software Foundation, Inc.
22 33
23@quotation
24Permission is granted to copy, distribute and/or modify this document 34Permission is granted to copy, distribute and/or modify this document
25under the terms of the GNU Free Documentation License, Version 1.3 or 35under the terms of the GNU Free Documentation License, Version 1.3 or
26any later version published by the Free Software Foundation; with no 36any later version published by the Free Software Foundation; with no
@@ -32,32 +42,29 @@ License.''
32(a) The FSF's Back-Cover Text is: ``You have the freedom to 42(a) The FSF's Back-Cover Text is: ``You have the freedom to
33copy and modify this GNU manual. Buying copies from the FSF 43copy and modify this GNU manual. Buying copies from the FSF
34supports it in developing GNU and promoting software freedom.'' 44supports it in developing GNU and promoting software freedom.''
35@end quotation 45@end copying
36@end ifinfo
37 46
38@titlepage 47@titlepage
39@null
40@sp 6 48@sp 6
41@center @titlefont{GNU dbm} 49@center @titlefont{GNU dbm}
42@sp 2 50@sp 2
43@center A Database Manager 51@center A Database Manager
44@sp 2 52@sp 2
45@center by Philip A. Nelson, Jason Downs and Sergey Poznyakoff 53@center by Philip A. Nelson, Jason Downs and Sergey Poznyakoff
46@sp 4 54@sp 4
47@center Manual by Pierre Gaumond, Philip A. Nelson, Jason Downs 55@center Manual by Pierre Gaumond, Philip A. Nelson, Jason Downs
48@center and Sergey Poznyakoff 56@center and Sergey Poznyakoff
49@sp 1 57@sp 1
50@center Edition @value{EDITION} 58@center Edition @value{EDITION}
51@sp 1 59@sp 1
52@center for GNU @code{dbm}, Version @value{VERSION} 60@center for GNU @code{dbm}, Version @value{VERSION}
53@page 61@page
54@null
55@vskip 0pt plus 1filll 62@vskip 0pt plus 1filll
56Copyright @copyright{} 1993-1999, 2007-2008 Free Software Foundation, Inc. 63Copyright @copyright{} 1993-1999, 2007-2011 Free Software Foundation, Inc.
57@sp 2 64@sp 2
58 65
59This is Edition 1.6 of the @cite{GNU @code{dbm} Manual}, for @code{gdbm} 66This is Edition @value{EDITION} of the @cite{GNU @code{dbm} Manual},
60Version @value{VERSION}. @* 67for @code{gdbm} Version @value{VERSION}. @*
61Last updated @value{UPDATED} 68Last updated @value{UPDATED}
62 69
63Published by the Free Software Foundation @* 70Published by the Free Software Foundation @*
@@ -80,15 +87,23 @@ by the Free Software Foundation.
80@end titlepage 87@end titlepage
81@page 88@page
82 89
83@node Top, Copying, (dir), (dir) 90@ifnothtml
84@ifinfo 91@page
92@summarycontents
93@page
94@end ifnothtml
95@contents
96
97@ifnottex
98@node Top
99@top The GNU database manager.
100
85GNU @code{dbm} is a library of functions implementing a hashed database 101GNU @code{dbm} is a library of functions implementing a hashed database
86on a disk file. This manual documents GNU @code{dbm} Version @value{VERSION} 102on a disk file. This manual documents GNU @code{dbm} Version @value{VERSION}
87(@code{gdbm}). The software was written by Philip A. Nelson. This 103(@code{gdbm}). The software was originally written by Philip A. Nelson. This
88document was originally written by Pierre Gaumond from texts written by 104document was originally written by Pierre Gaumond from texts written by
89Phil. 105Phil.
90@end ifinfo 106@end ifnottex
91
92 107
93@menu 108@menu
94Introduction: 109Introduction:
@@ -118,15 +133,16 @@ Programs
118 133
119Other topics: 134Other topics:
120 135
136* Error codes:: Error codes returned by @code{gdbm} calls.
121* Variables:: Two useful variables. 137* Variables:: Two useful variables.
122* Compatibility:: Compatibility with UNIX dbm and ndbm. 138* Compatibility:: Compatibility with UNIX dbm and ndbm.
123* Bugs:: Problems and bugs. 139* Bugs:: Problems and bugs.
124* GNU Free Documentation License:: Document license.
125 140
126* Index:: Index 141* GNU Free Documentation License:: Document license.
142* Index:: Index
127@end menu 143@end menu
128 144
129@node Copying, Intro, Top, Top 145@node Copying
130@chapter Copying Conditions. 146@chapter Copying Conditions.
131This library is @dfn{free}; this means that everyone is free to use 147This library is @dfn{free}; this means that everyone is free to use
132it and free to redistribute it on a free basis. GNU @code{dbm} (@code{gdbm}) 148it and free to redistribute it on a free basis. GNU @code{dbm} (@code{gdbm})
@@ -156,16 +172,16 @@ their recipients to know that what they have is not what we distributed,
156so that any problems introduced by others will not reflect on our 172so that any problems introduced by others will not reflect on our
157reputation.@refill 173reputation.@refill
158 174
159@code{gdbm} is currently distributed under the terms of the GNU General 175@code{Gdbm} is currently distributed under the terms of the GNU General
160Public License, Version 3. (@emph{NOT} under the GNU General Library 176Public License, Version 3. (@emph{NOT} under the GNU General Library
161Public License.) A copy the GNU General Public License is included with 177Public License.) A copy the GNU General Public License is included with
162the distribution of @code{gdbm}. 178the distribution of @code{gdbm}.
163 179
164@node Intro, List, Copying, Top 180@node Intro
165@chapter Introduction to GNU @code{dbm}. 181@chapter Introduction to GNU @code{dbm}.
166 182
167GNU @code{dbm} (@code{gdbm})is a library of database functions that use 183GNU @code{dbm} (@code{gdbm}) is a library of database functions that use
168extendible hashing and works similar to the standard UNIX @code{dbm} 184extensible hashing and works similar to the standard UNIX @code{dbm}
169functions. These routines are provided to a programmer needing to 185functions. These routines are provided to a programmer needing to
170create and manipulate a hashed database. (@code{gdbm} is @emph{NOT} a 186create and manipulate a hashed database. (@code{gdbm} is @emph{NOT} a
171complete database package for an end user.) 187complete database package for an end user.)
@@ -190,15 +206,15 @@ to be able manipulate the keys and data contained in the database.
190@code{gdbm} allows an application to have multiple databases open at the 206@code{gdbm} allows an application to have multiple databases open at the
191same time. When an application opens a @code{gdbm} database, it is 207same time. When an application opens a @code{gdbm} database, it is
192designated as a @code{reader} or a @code{writer}. A @code{gdbm} 208designated as a @code{reader} or a @code{writer}. A @code{gdbm}
193database opened by at most one writer at a time. However, many readers 209database can be opened by at most one writer at a time. However, many readers
194may open the database open simultaneously. Readers and writers can not 210may open the database simultaneously. Readers and writers can not
195open the @code{gdbm} database at the same time. 211open the @code{gdbm} database at the same time.
196 212
197@node List, Open, Intro, Top 213@node List
198@chapter List of functions. 214@chapter List of functions.
199 215
200The following is a quick list of the functions contained in the @code{gdbm} 216The following is a quick list of the functions contained in the @code{gdbm}
201library. The include file @code{gdbm.h}, that can be included by the user, 217library. The include file @code{gdbm.h}, that can be included by the user,
202contains a definition of these functions. 218contains a definition of these functions.
203 219
204@example 220@example
@@ -223,424 +239,493 @@ The @code{gdbm.h} include file is often in the @file{/usr/local/include}
223directory. (The actual location of @code{gdbm.h} depends on your local 239directory. (The actual location of @code{gdbm.h} depends on your local
224installation of @code{gdbm}.) 240installation of @code{gdbm}.)
225 241
226@node Open, Close, List, Top 242@node Open
227@chapter Opening the database. 243@chapter Opening the database.
228 244
229Initialize @code{gdbm} system. If the file has a size of zero bytes, a file 245@deftypefn {gdbm interface} GDBM_FILE gdbm_open (const char *@var{name}, int @var{block_size}, @
246 int @var{flags}, int @var{mode}, void (*fatal_func)(const char *))
247Initializes @code{gdbm} system. If the file has a size of zero bytes, a file
230initialization procedure is performed, setting up the initial structure in the 248initialization procedure is performed, setting up the initial structure in the
231file. 249file.
232 250
233The procedure for opening a @code{gdbm} file is: 251The arguments are:
234
235@example
236GDBM_FILE dbf;
237
238dbf = gdbm_open(name, block_size, flags, mode, fatal_func);
239@end example
240
241The parameters are:
242 252
243@table @asis 253@table @va