diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-03 10:35:46 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-03 10:35:46 +0000 |
commit | f13620502d9c7f4d2b5ad72ff80833721c7df5e8 (patch) | |
tree | 8180e7897597e515b5a1d9f5aa9d3ee9e2837758 /doc/gdbm.texinfo | |
parent | 20b3ff23de857b8bb3e45492cedb94e63d3ee207 (diff) | |
download | gdbm-f13620502d9c7f4d2b5ad72ff80833721c7df5e8.tar.gz gdbm-f13620502d9c7f4d2b5ad72ff80833721c7df5e8.tar.bz2 |
Revise.
Diffstat (limited to 'doc/gdbm.texinfo')
-rw-r--r-- | doc/gdbm.texinfo | 924 |
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 |
19 | This file documents the GNU dbm utility. | 30 | This file documents the GNU dbm utility. |
20 | 31 | ||
21 | Copyright (C) 1989-1999, 2007, 2008, 2009 Free Software Foundation, Inc. | 32 | Copyright @copyright{} 1989-1999, 2007, 2008, 2009-2011 Free Software Foundation, Inc. |
22 | 33 | ||
23 | @quotation | ||
24 | Permission is granted to copy, distribute and/or modify this document | 34 | Permission is granted to copy, distribute and/or modify this document |
25 | under the terms of the GNU Free Documentation License, Version 1.3 or | 35 | under the terms of the GNU Free Documentation License, Version 1.3 or |
26 | any later version published by the Free Software Foundation; with no | 36 | any 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 |
33 | copy and modify this GNU manual. Buying copies from the FSF | 43 | copy and modify this GNU manual. Buying copies from the FSF |
34 | supports it in developing GNU and promoting software freedom.'' | 44 | supports 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 |
56 | Copyright @copyright{} 1993-1999, 2007-2008 Free Software Foundation, Inc. | 63 | Copyright @copyright{} 1993-1999, 2007-2011 Free Software Foundation, Inc. |
57 | @sp 2 | 64 | @sp 2 |
58 | 65 | ||
59 | This is Edition 1.6 of the @cite{GNU @code{dbm} Manual}, for @code{gdbm} | 66 | This is Edition @value{EDITION} of the @cite{GNU @code{dbm} Manual}, |
60 | Version @value{VERSION}. @* | 67 | for @code{gdbm} Version @value{VERSION}. @* |
61 | Last updated @value{UPDATED} | 68 | Last updated @value{UPDATED} |
62 | 69 | ||
63 | Published by the Free Software Foundation @* | 70 | Published 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 | |||
85 | GNU @code{dbm} is a library of functions implementing a hashed database | 101 | GNU @code{dbm} is a library of functions implementing a hashed database |
86 | on a disk file. This manual documents GNU @code{dbm} Version @value{VERSION} | 102 | on 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 |
88 | document was originally written by Pierre Gaumond from texts written by | 104 | document was originally written by Pierre Gaumond from texts written by |
89 | Phil. | 105 | Phil. |
90 | @end ifinfo | 106 | @end ifnottex |
91 | |||
92 | 107 | ||
93 | @menu | 108 | @menu |
94 | Introduction: | 109 | Introduction: |
@@ -118,15 +133,16 @@ Programs | |||
118 | 133 | ||
119 | Other topics: | 134 | Other 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. |
131 | This library is @dfn{free}; this means that everyone is free to use | 147 | This library is @dfn{free}; this means that everyone is free to use |
132 | it and free to redistribute it on a free basis. GNU @code{dbm} (@code{gdbm}) | 148 | it 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, | |||
156 | so that any problems introduced by others will not reflect on our | 172 | so that any problems introduced by others will not reflect on our |
157 | reputation.@refill | 173 | reputation.@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 |
160 | Public License, Version 3. (@emph{NOT} under the GNU General Library | 176 | Public License, Version 3. (@emph{NOT} under the GNU General Library |
161 | Public License.) A copy the GNU General Public License is included with | 177 | Public License.) A copy the GNU General Public License is included with |
162 | the distribution of @code{gdbm}. | 178 | the 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 | ||
167 | GNU @code{dbm} (@code{gdbm})is a library of database functions that use | 183 | GNU @code{dbm} (@code{gdbm}) is a library of database functions that use |
168 | extendible hashing and works similar to the standard UNIX @code{dbm} | 184 | extensible hashing and works similar to the standard UNIX @code{dbm} |
169 | functions. These routines are provided to a programmer needing to | 185 | functions. These routines are provided to a programmer needing to |
170 | create and manipulate a hashed database. (@code{gdbm} is @emph{NOT} a | 186 | create and manipulate a hashed database. (@code{gdbm} is @emph{NOT} a |
171 | complete database package for an end user.) | 187 | complete 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 |
191 | same time. When an application opens a @code{gdbm} database, it is | 207 | same time. When an application opens a @code{gdbm} database, it is |
192 | designated as a @code{reader} or a @code{writer}. A @code{gdbm} | 208 | designated as a @code{reader} or a @code{writer}. A @code{gdbm} |
193 | database opened by at most one writer at a time. However, many readers | 209 | database can be opened by at most one writer at a time. However, many readers |
194 | may open the database open simultaneously. Readers and writers can not | 210 | may open the database simultaneously. Readers and writers can not |
195 | open the @code{gdbm} database at the same time. | 211 | open 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 | ||
200 | The following is a quick list of the functions contained in the @code{gdbm} | 216 | The following is a quick list of the functions contained in the @code{gdbm} |
201 | library. The include file @code{gdbm.h}, that can be included by the user, | 217 | library. The include file @code{gdbm.h}, that can be included by the user, |
202 | contains a definition of these functions. | 218 | contains 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} | |||
223 | directory. (The actual location of @code{gdbm.h} depends on your local | 239 | directory. (The actual location of @code{gdbm.h} depends on your local |
224 | installation of @code{gdbm}.) | 240 | installation 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 | ||
229 | Initialize @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 *)) | ||
247 | Initializes @code{gdbm} system. If the file has a size of zero bytes, a file | ||
230 | initialization procedure is performed, setting up the initial structure in the | 248 | initialization procedure is performed, setting up the initial structure in the |
231 | file. | 249 | file. |
232 | 250 | ||
233 | The procedure for opening a @code{gdbm} file is: | 251 | The arguments are: |
234 | |||
235 | @example | ||
236 | GDBM_FILE dbf; | ||
237 | |||
238 | dbf = gdbm_open(name, block_size, flags, mode, fatal_func); | ||
239 | @end example | ||
240 | |||
241 | The parameters are: | ||
242 | 252 | ||
243 | @table @asis | 253 | @table @va |