aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog19
-rw-r--r--configure.ac2
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/gdbm.329
-rw-r--r--doc/gdbm.texinfo134
-rw-r--r--doc/gdbm_dump.188
-rw-r--r--doc/gdbm_load.196
-rw-r--r--doc/gdbmtool.1245
-rw-r--r--src/.cvsignore1
-rw-r--r--src/Makefile.am5
-rw-r--r--src/gdbm_dump.c8
-rw-r--r--src/gdbm_load.c6
-rw-r--r--src/testgdbm.c105
13 files changed, 635 insertions, 105 deletions
diff --git a/ChangeLog b/ChangeLog
index e7f1637..02cbe9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,24 @@
12013-05-08 Sergey Poznyakoff <gray@gnu.org.ua> 12013-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
202013-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
52013-05-08 Sergey Poznyakoff <gray@gnu.org.ua> 242013-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
diff --git a/configure.ac b/configure.ac
index e43bc53..ce00344 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ 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])
25AC_PREREQ(2.69)a 25AC_PREREQ(2.69)
26AC_CONFIG_SRCDIR([src/gdbmdefs.h]) 26AC_CONFIG_SRCDIR([src/gdbmdefs.h])
27AC_CONFIG_AUX_DIR([build-aux]) 27AC_CONFIG_AUX_DIR([build-aux])
28AC_CONFIG_HEADERS([autoconf.h]) 28AC_CONFIG_HEADERS([autoconf.h])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f4059d0..223c892 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -20,7 +20,7 @@ info_TEXINFOS = gdbm.texinfo
20gdbm_TEXINFOS=\ 20gdbm_TEXINFOS=\
21 fdl.texi 21 fdl.texi
22 22
23man_MANS = gdbm.3 23man_MANS = gdbm.3 gdbm_dump.1 gdbm_load.1 gdbmtool.1
24EXTRA_DIST = $(man_MANS) 24EXTRA_DIST = $(man_MANS)
25 25
26GENDOCS=gendocs.sh 26GENDOCS=gendocs.sh
diff --git a/doc/gdbm.3 b/doc/gdbm.3
index e3b90d4..c08ece3 100644
--- a/doc/gdbm.3
+++ b/doc/gdbm.3
@@ -1,5 +1,5 @@
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
@@ -13,11 +13,10 @@
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
19GDBM - The GNU database manager. Includes \fBdbm\fR and \fBndbm\fR 18GDBM \- The GNU database manager. Includes \fBdbm\fR and \fBndbm\fR
20compatability. (Version \*(ve.) 19compatibility.
21.SH SYNOPSIS 20.SH SYNOPSIS
22.nf 21.nf
23.B #include <gdbm.h> 22.B #include <gdbm.h>
@@ -200,7 +199,7 @@ Insert only, generate an error if key exists;
200.B GDBM_REPLACE 199.B GDBM_REPLACE
201Replace contents if key exists. 200Replace contents if key exists.
202.PP 201.PP
203If a reader calls \fBgdbm_store\fR, the return value will be -1. 202If a reader calls \fBgdbm_store\fR, the return value will be \-1.
204If called with \fBGDBM_INSERT\fR and \fIkey\fR is in the database, the return 203If called with \fBGDBM_INSERT\fR and \fIkey\fR is in the database, the return
205value will be 1. Otherwise, the return value is 0. 204value will be 1. Otherwise, the return value is 0.
206 205
@@ -245,7 +244,7 @@ To remove some data from the database:
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
246key data. 245key data.
247 246
248The return value is -1 if the item is not present or the requester is a reader. 247The return value is \-1 if the item is not present or the requester is a reader.
249The return value is 0 if there was a successful delete. 248The return value is 0 if there was a successful delete.
250 249
251The next two routines allow for accessing all items in the database. This 250The next two routines allow for accessing all items in the database. This
@@ -353,7 +352,7 @@ especially if used in conjunction with \fBGDBM_CENTFREE\fR. \fIvalue\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
355pointer. \fIsize\fR is the size of the data pointed to by \fIvalue\fR. 354pointer. \fIsize\fR is the size of the data pointed to by \fIvalue\fR.
356The return value will be -1 upon failure, or 0 upon success. The global 355The return value will be \-1 upon failure, or 0 upon success. The global
357variable \fIgdbm_errno\fR will be set upon failure. 356variable \fIgdbm_errno\fR will be set upon failure.
358 357
359For instance, to set a database to use a cache of 10, after opening it 358For instance, to set a database to use a cache of 10, after opening it
@@ -399,12 +398,12 @@ also try to open it as a reader. All returned pointers in datum
399structures point to data that \fBgdbm\fR WILL free. They should be 398structures point to data that \fBgdbm\fR WILL free. They should be
400treated as static pointers (as standard UNIX \fBdbm\fR does). 399treated as static pointers (as standard UNIX \fBdbm\fR does).
401.SH LINKING 400.SH LINKING
402This library is accessed by specifying \fI-lgdbm\fR as the last 401This library is accessed by specifying \fI\-lgdbm\fR as the last
403parameter to the compile line, e.g.: 402parameter to the compile line, e.g.:
404.sp 403.sp
405.nf 404.nf
406.in +5 405.in +5
407gcc -o prog prog.c -lgdbm 406gcc \-o prog prog.c \-lgdbm
408.in 407.in
409.fi 408.fi
410.PP 409.PP
@@ -413,16 +412,18 @@ 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
416gcc -o prog proc.c -lgdbm -lgdbm_compat 415gcc \-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"
422Send bug reports to <bug-gdbm@gnu.org>. 421Send bug reports to <bug\-gdbm@gnu.org>.
423.SH "SEE ALSO" 422.SH "SEE ALSO"
424dbm, ndbm 423.BR gdbm_dump (1),
425.SH AUTHOR 424.BR gdbm_load (1),
425.BR gdbmtool (1).
426.SH AUTHORS
426by Philip A. Nelson, Jason Downs and Sergey Poznyakoff. 427by Philip A. Nelson, Jason Downs and Sergey Poznyakoff.
427.SH COPYRIGHT 428.SH COPYRIGHT
428Copyright \(co 1990 - 2011 Free Software Foundation, Inc. 429Copyright \(co 1990 - 2011 Free Software Foundation, Inc.
diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo
index 9f0af5b..17f47f9 100644
--- a/doc/gdbm.texinfo
+++ b/doc/gdbm.texinfo
@@ -118,7 +118,7 @@ Functions:
118 118
119Programs 119Programs
120 120
121* testgdbm:: Test and modify a GDBM database. 121* gdbmtool:: Examine and modify a GDBM database.
122* gdbm_dump:: Dump the database into a flat file. 122* gdbm_dump:: Dump the database into a flat file.
123* gdbm_load:: Load the database from a flat file. 123* gdbm_load:: Load the database from a flat file.
124* gdbmexport:: Export a database into a portable format. 124* gdbmexport:: Export a database into a portable format.
@@ -1617,35 +1617,35 @@ memory managed by the compatibility library. The application should
1617never free it. 1617never free it.
1618@end deftypefn 1618@end deftypefn
1619 1619
1620@node testgdbm 1620@node gdbmtool
1621@chapter Test and modify a GDBM database. 1621@chapter Examine and modify a GDBM database.
1622@prindex testgdbm 1622@prindex gdbmtool
1623 1623
1624The @command{testgdbm} utility allows you to view and modify an 1624The @command{gdbmtool} utility allows you to view and modify an
1625existing @acronym{GDBM} database or to create a new one. 1625existing @acronym{GDBM} database or to create a new one.
1626 1626
1627@cindex default database, @command{testgdbm} 1627@cindex default database, @command{gdbmtool}
1628@flindex junk.gdbm 1628@flindex junk.gdbm
1629When invoked without arguments, it tries to open a database file called 1629When invoked without arguments, it tries to open a database file called
1630@file{junk.gdbm}, located in the current working directory. You can 1630@file{junk.gdbm}, located in the current working directory. You can
1631change this default by supplying the name of the database to use as 1631change this default by supplying the name of the database to use as
1632the only argument to @command{testgdbm}, e.g.: 1632the only argument to @command{gdbmtool}, e.g.:
1633 1633
1634@example 1634@example
1635$ testgdbm file.db 1635$ gdbmtool file.db
1636@end example 1636@end example
1637 1637
1638@cindex read-only mode, @command{testgdbm} 1638@cindex read-only mode, @command{gdbmtool}
1639@cindex @option{-r}, @command{testgdbm} option 1639@cindex @option{-r}, @command{gdbmtool} option
1640@cindex @option{--read-only}, @command{testgdbm} option 1640@cindex @option{--read-only}, @command{gdbmtool} option
1641The database will be opened in read-write mode, unless the 1641The database will be opened in read-write mode, unless the
1642@option{-r} (@option{--read-only}) option is specified, in which case 1642@option{-r} (@option{--read-only}) option is specified, in which case
1643it will be opened only for reading. 1643it will be opened only for reading.
1644 1644
1645@cindex creating a database, @command{testgdbm} 1645@cindex creating a database, @command{gdbmtool}
1646@cindex @option{-n}, @command{testgdbm} option 1646@cindex @option{-n}, @command{gdbmtool} option
1647@cindex @option{--newdb}, @command{testgdbm} option 1647@cindex @option{--newdb}, @command{gdbmtool} option
1648If the database does not exist, @command{testgdbm} will create it. 1648If the database does not exist, @command{gdbmtool} will create it.