diff options
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/gdbm.3 | 29 | ||||
-rw-r--r-- | doc/gdbm.texinfo | 134 | ||||
-rw-r--r-- | doc/gdbm_dump.1 | 88 | ||||
-rw-r--r-- | doc/gdbm_load.1 | 96 | ||||
-rw-r--r-- | doc/gdbmtool.1 | 245 | ||||
-rw-r--r-- | src/.cvsignore | 1 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/gdbm_dump.c | 8 | ||||
-rw-r--r-- | src/gdbm_load.c | 6 | ||||
-rw-r--r-- | src/testgdbm.c | 107 |
13 files changed, 636 insertions, 106 deletions
@@ -1,8 +1,27 @@ | |||
1 | 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua> | 1 | 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 2 | ||
3 | Rename testgdbm to gdbmtool. Improve documentation. | ||
4 | |||
5 | * configure.ac: Fix a typo. | ||
6 | * src/.cvsignore: Add gdbmtool | ||
7 | * src/Makefile.am: Rename testgdbm to gdbmtool. Source | ||
8 | file not renamed because of CVS deficiency. | ||
9 | * src/gdbm_dump.c: Enable NLS. | ||
10 | * src/gdbm_load.c: Likewise. | ||
11 | * src/testgdbm.c: New option -q (--quiet). | ||
12 | New command: prompt. | ||
13 | * doc/Makefile.am (man_MANS): Add new manpages. | ||
14 | * doc/gdbmtool.1: New file. | ||
15 | * doc/gdbm_load.1: New file. | ||
16 | * doc/gdbm_dump.1: New file. | ||
17 | * doc/gdbm.3: Update. | ||
18 | * doc/gdbm.texinfo: Update. | ||
19 | |||
20 | 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua> | ||
21 | |||
3 | * configure.ac: (AC_INIT): Add webpage URL. | 22 | * configure.ac: (AC_INIT): Add webpage URL. |
4 | 23 | ||
5 | 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua> | 24 | 2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua> |
6 | 25 | ||
7 | Improve testgdbm; install some more bugfixes. | 26 | Improve testgdbm; install some more bugfixes. |
8 | 27 | ||
diff --git a/configure.ac b/configure.ac index e43bc53..ce00344 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -19,13 +19,13 @@ m4_define([_GDBM_VERSION_MINOR], 10) | |||
19 | m4_define([_GDBM_VERSION_PATCH], 90) | 19 | m4_define([_GDBM_VERSION_PATCH], 90) |
20 | 20 | ||
21 | AC_INIT([gdbm], | 21 | AC_INIT([gdbm], |
22 | _GDBM_VERSION_MAJOR._GDBM_VERSION_MINOR[]m4_ifdef([_GDBM_VERSION_PATCH],._GDBM_VERSION_PATCH), | 22 | _GDBM_VERSION_MAJOR._GDBM_VERSION_MINOR[]m4_ifdef([_GDBM_VERSION_PATCH],._GDBM_VERSION_PATCH), |
23 | [bug-gdbm@gnu.org],, | 23 | [bug-gdbm@gnu.org],, |
24 | [http://www.gnu.org/software/gdbm]) | 24 | [http://www.gnu.org/software/gdbm]) |
25 | AC_PREREQ(2.69)a | 25 | AC_PREREQ(2.69) |
26 | AC_CONFIG_SRCDIR([src/gdbmdefs.h]) | 26 | AC_CONFIG_SRCDIR([src/gdbmdefs.h]) |
27 | AC_CONFIG_AUX_DIR([build-aux]) | 27 | AC_CONFIG_AUX_DIR([build-aux]) |
28 | AC_CONFIG_HEADERS([autoconf.h]) | 28 | AC_CONFIG_HEADERS([autoconf.h]) |
29 | AC_CONFIG_MACRO_DIR([m4]) | 29 | AC_CONFIG_MACRO_DIR([m4]) |
30 | AM_INIT_AUTOMAKE([gnits 1.11 std-options silent-rules]) | 30 | AM_INIT_AUTOMAKE([gnits 1.11 std-options silent-rules]) |
31 | 31 | ||
diff --git a/doc/Makefile.am b/doc/Makefile.am index f4059d0..223c892 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am | |||
@@ -17,13 +17,13 @@ | |||
17 | # Documentation | 17 | # Documentation |
18 | 18 | ||
19 | info_TEXINFOS = gdbm.texinfo | 19 | info_TEXINFOS = gdbm.texinfo |
20 | gdbm_TEXINFOS=\ | 20 | gdbm_TEXINFOS=\ |
21 | fdl.texi | 21 | fdl.texi |
22 | 22 | ||
23 | man_MANS = gdbm.3 | 23 | man_MANS = gdbm.3 gdbm_dump.1 gdbm_load.1 gdbmtool.1 |
24 | EXTRA_DIST = $(man_MANS) | 24 | EXTRA_DIST = $(man_MANS) |
25 | 25 | ||
26 | GENDOCS=gendocs.sh | 26 | GENDOCS=gendocs.sh |
27 | 27 | ||
28 | TEXI2DVI=texi2dvi -E | 28 | TEXI2DVI=texi2dvi -E |
29 | 29 | ||
@@ -1,8 +1,8 @@ | |||
1 | .\" This file is part of GDBM. | 1 | .\" This file is part of GDBM. |
2 | .\" Copyright (C) 2011 Free Software Foundation, Inc. | 2 | .\" Copyright (C) 2011, 2013 Free Software Foundation, Inc. |
3 | .\" | 3 | .\" |
4 | .\" GDBM is free software; you can redistribute it and/or modify | 4 | .\" GDBM is free software; you can redistribute it and/or modify |
5 | .\" it under the terms of the GNU General Public License as published by | 5 | .\" it under the terms of the GNU General Public License as published by |
6 | .\" the Free Software Foundation; either version 3, or (at your option) | 6 | .\" the Free Software Foundation; either version 3, or (at your option) |
7 | .\" any later version. | 7 | .\" any later version. |
8 | .\" | 8 | .\" |
@@ -10,17 +10,16 @@ | |||
10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | .\" GNU General Public License for more details. | 12 | .\" GNU General Public License for more details. |
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with GDBM. If not, see <http://www.gnu.org/licenses/>. */ | 15 | .\" along with GDBM. If not, see <http://www.gnu.org/licenses/>. */ |
16 | .TH GDBM 3 "August 9, 2011" "GDBM" "GDBM User Reference" | 16 | .TH GDBM 3 "May 8, 2013" "GDBM" "GDBM User Reference" |
17 | .ds ve 1.9 | ||
18 | .SH NAME | 17 | .SH NAME |
19 | GDBM - The GNU database manager. Includes \fBdbm\fR and \fBndbm\fR | 18 | GDBM \- The GNU database manager. Includes \fBdbm\fR and \fBndbm\fR |
20 | compatability. (Version \*(ve.) | 19 | compatibility. |
21 | .SH SYNOPSIS | 20 | .SH SYNOPSIS |
22 | .nf | 21 | .nf |
23 | .B #include <gdbm.h> | 22 | .B #include <gdbm.h> |
24 | .sp | 23 | .sp |
25 | .BI "extern gdbm_error" " gdbm_errno"; | 24 | .BI "extern gdbm_error" " gdbm_errno"; |
26 | .br | 25 | .br |
@@ -197,13 +196,13 @@ key data. \fIContent\fR is the data to be associated with the \fIkey\fR. | |||
197 | .B GDBM_INSERT | 196 | .B GDBM_INSERT |
198 | Insert only, generate an error if key exists; | 197 | Insert only, generate an error if key exists; |
199 | .TP | 198 | .TP |
200 | .B GDBM_REPLACE | 199 | .B GDBM_REPLACE |
201 | Replace contents if key exists. | 200 | Replace contents if key exists. |
202 | .PP | 201 | .PP |
203 | If a reader calls \fBgdbm_store\fR, the return value will be -1. | 202 | If a reader calls \fBgdbm_store\fR, the return value will be \-1. |
204 | If called with \fBGDBM_INSERT\fR and \fIkey\fR is in the database, the return | 203 | If called with \fBGDBM_INSERT\fR and \fIkey\fR is in the database, the return |
205 | value will be 1. Otherwise, the return value is 0. | 204 | value will be 1. Otherwise, the return value is 0. |
206 | 205 | ||
207 | \fINOTICE: If you store data for a key that is already in the data base, | 206 | \fINOTICE: If you store data for a key that is already in the data base, |
208 | \fBgdbm\fI replaces the old data with the new data if called with \fBGDBM_REPLACE\fI. | 207 | \fBgdbm\fI replaces the old data with the new data if called with \fBGDBM_REPLACE\fI. |
209 | You do not get two data items for the same key and you do not get an | 208 | You do not get two data items for the same key and you do not get an |
@@ -242,13 +241,13 @@ To remove some data from the database: | |||
242 | 241 | ||
243 | .BI "int gdbm_delete (GDBM_FILE " dbf ", datum " key ); | 242 | .BI "int gdbm_delete (GDBM_FILE " dbf ", datum " key ); |
244 | 243 | ||
245 | \fIDbf\fR is the pointer returned by \fBgdbm_open\fR. \fIKey\fR is the | 244 | \fIDbf\fR is the pointer returned by \fBgdbm_open\fR. \fIKey\fR is the |
246 | key data. | 245 | key data. |
247 | 246 | ||
248 | The return value is -1 if the item is not present or the requester is a reader. | 247 | The return value is \-1 if the item is not present or the requester is a reader. |
249 | The return value is 0 if there was a successful delete. | 248 | The return value is 0 if there was a successful delete. |
250 | 249 | ||
251 | The next two routines allow for accessing all items in the database. This | 250 | The next two routines allow for accessing all items in the database. This |
252 | access is not key sequential, but it is guaranteed to visit every key in | 251 | access is not key sequential, but it is guaranteed to visit every key in |
253 | the database once. (The order has to do with the hash values.) | 252 | the database once. (The order has to do with the hash values.) |
254 | 253 | ||
@@ -350,13 +349,13 @@ to be merged. This can become a CPU expensive process with time, though, | |||
350 | especially if used in conjunction with \fBGDBM_CENTFREE\fR. \fIvalue\fR | 349 | especially if used in conjunction with \fBGDBM_CENTFREE\fR. \fIvalue\fR |
351 | (see below) should be set to either TRUE or FALSE. | 350 | (see below) should be set to either TRUE or FALSE. |
352 | \fINOTICE: This feature is still under study.\fR | 351 | \fINOTICE: This feature is still under study.\fR |
353 | .PP | 352 | .PP |
354 | \fIvalue\fR is the value to set \fIoption\fR to, specified as an integer | 353 | \fIvalue\fR is the value to set \fIoption\fR to, specified as an integer |
355 | pointer. \fIsize\fR is the size of the data pointed to by \fIvalue\fR. | 354 | pointer. \fIsize\fR is the size of the data pointed to by \fIvalue\fR. |
356 | The return value will be -1 upon failure, or 0 upon success. The global | 355 | The return value will be \-1 upon failure, or 0 upon success. The global |
357 | variable \fIgdbm_errno\fR will be set upon failure. | 356 | variable \fIgdbm_errno\fR will be set upon failure. |
358 | 357 | ||
359 | For instance, to set a database to use a cache of 10, after opening it | 358 | For instance, to set a database to use a cache of 10, after opening it |
360 | with \fBgdbm_open\fR, but prior to accessing it in any way, the following | 359 | with \fBgdbm_open\fR, but prior to accessing it in any way, the following |
361 | code could be used: | 360 | code could be used: |
362 | .sp | 361 | .sp |
@@ -396,36 +395,38 @@ required by the programmer, and only one file may be opened at a time. | |||
396 | All users in compatibility mode are assumed to be writers. If the | 395 | All users in compatibility mode are assumed to be writers. If the |
397 | \fBgdbm\fR file is a read only, it will fail as a writer, but will | 396 | \fBgdbm\fR file is a read only, it will fail as a writer, but will |
398 | also try to open it as a reader. All returned pointers in datum | 397 | also try to open it as a reader. All returned pointers in datum |
399 | structures point to data that \fBgdbm\fR WILL free. They should be | 398 | structures point to data that \fBgdbm\fR WILL free. They should be |
400 | treated as static pointers (as standard UNIX \fBdbm\fR does). | 399 | treated as static pointers (as standard UNIX \fBdbm\fR does). |
401 | .SH LINKING | 400 | .SH LINKING |
402 | This library is accessed by specifying \fI-lgdbm\fR as the last | 401 | This library is accessed by specifying \fI\-lgdbm\fR as the last |
403 | parameter to the compile line, e.g.: | 402 | parameter to the compile line, e.g.: |
404 | .sp | 403 | .sp |
405 | .nf | 404 | .nf |
406 | .in +5 | 405 | .in +5 |
407 | gcc -o prog prog.c -lgdbm | 406 | gcc \-o prog prog.c \-lgdbm |
408 | .in | 407 | .in |
409 | .fi | 408 | .fi |
410 | .PP | 409 | .PP |
411 | If you wish to use the \fBdbm\fR or \fBndbm\fR compatibility routines, | 410 | If you wish to use the \fBdbm\fR or \fBndbm\fR compatibility routines, |
412 | you must link in the \fIgdbm_compat\fR library as well. For example: | 411 | you must link in the \fIgdbm_compat\fR library as well. For example: |
413 | .sp | 412 | .sp |
414 | .nf | 413 | .nf |
415 | .in +5 | 414 | .in +5 |
416 | gcc -o prog proc.c -lgdbm -lgdbm_compat | 415 | gcc \-o prog proc.c \-lgdbm \-lgdbm_compat |
417 | .in | 416 | .in |
418 | .fi | 417 | .fi |
419 | .\" .SH BUGS | 418 | .\" .SH BUGS |
420 | 419 | ||
421 | .SH "BUG REPORTS" | 420 | .SH "BUG REPORTS" |
422 | Send bug reports to <bug-gdbm@gnu.org>. | 421 | Send bug reports to <bug\-gdbm@gnu.org>. |
423 | .SH "SEE ALSO" | 422 | .SH "SEE ALSO" |
424 | dbm, ndbm | 423 | .BR gdbm_dump (1), |
425 | .SH AUTHOR | 424 | .BR gdbm_load (1), |
425 | .BR gdbmtool (1). | ||
426 | .SH AUTHORS | ||
426 | by Philip A. Nelson, Jason Downs and Sergey Poznyakoff. | 427 | by Philip A. Nelson, Jason Downs and Sergey Poznyakoff. |
427 | .SH COPYRIGHT | 428 | .SH COPYRIGHT |