diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-05-08 16:27:01 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-05-08 16:27:01 +0000 |
commit | 6658f41e38fec9e007a0fbd0883e030f6337e28d (patch) | |
tree | d7ecc0b72b23a01a2bfa10e8a7bb184d704269dc /doc | |
parent | c0cba983ab0c0bc1de630a200f902189ddddff09 (diff) | |
download | gdbm-6658f41e38fec9e007a0fbd0883e030f6337e28d.tar.gz gdbm-6658f41e38fec9e007a0fbd0883e030f6337e28d.tar.bz2 |
Rename testgdbm to gdbmtool. Improve documentation.
* configure.ac: Fix a typo.
* src/.cvsignore: Add gdbmtool
* src/Makefile.am: Rename testgdbm to gdbmtool. Source
file not renamed because of CVS deficiency.
* src/gdbm_dump.c: Enable NLS.
* src/gdbm_load.c: Likewise.
* src/testgdbm.c: New option -q (--quiet).
New command: prompt.
* doc/Makefile.am (man_MANS): Add new manpages.
* doc/gdbmtool.1: New file.
* doc/gdbm_load.1: New file.
* doc/gdbm_dump.1: New file.
* doc/gdbm.3: Update.
* doc/gdbm.texinfo: Update.
Diffstat (limited to 'doc')
-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 |
6 files changed, 510 insertions, 84 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index f4059d0..223c892 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am | |||
@@ -21,5 +21,5 @@ 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 | ||
@@ -1,4 +1,4 @@ | |||
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 |
@@ -14,9 +14,8 @@ | |||
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 |
@@ -201,5 +200,5 @@ Insert only, generate an error if key exists; | |||
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. |
@@ -246,5 +245,5 @@ To remove some data from the database: | |||
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 | ||
@@ -354,5 +353,5 @@ especially if used in conjunction with \fBGDBM_CENTFREE\fR. \fIvalue\fR | |||
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 | ||
@@ -400,10 +399,10 @@ 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 |
@@ -414,5 +413,5 @@ you must link in the \fIgdbm_compat\fR library as well. For example: | |||
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 |
@@ -420,8 +419,10 @@ gcc -o prog proc.c -lgdbm -lgdbm_compat | |||
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 |
diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo index 9f0af5b..17f47f9 100644 --- a/doc/gdbm.texinfo +++ b/doc/gdbm.texinfo | |||
@@ -119,5 +119,5 @@ Functions: | |||
119 | Programs | 119 | Programs |
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. |
@@ -1618,33 +1618,33 @@ never 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 | ||
1624 | The @command{testgdbm} utility allows you to view and modify an | 1624 | The @command{gdbmtool} utility allows you to view and modify an |
1625 | existing @acronym{GDBM} database or to create a new one. | 1625 | existing @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 |
1629 | When invoked without arguments, it tries to open a database file called | 1629 | When 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 |
1631 | change this default by supplying the name of the database to use as | 1631 | change this default by supplying the name of the database to use as |
1632 | the only argument to @command{testgdbm}, e.g.: | 1632 | the 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 |
1641 | The database will be opened in read-write mode, unless the | 1641 | The 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 |
1643 | it will be opened only for reading. | 1643 | it 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 |
1648 | If the database does not exist, @command{testgdbm} will create it. | 1648 | If the database does not exist, @command{gdbmtool} will create it. |
1649 | There is a special option @option{-n} (@option{--newdb}, which | 1649 | There is a special option @option{-n} (@option{--newdb}, which |
1650 | instructs the utility to create a new database. If it is used and if | 1650 | instructs the utility to create a new database. If it is used and if |
@@ -1657,8 +1657,8 @@ the database already exists, it will be deleted, so use it sparingly. | |||
1657 | 1657 | ||
1658 | @node invocation | 1658 | @node invocation |
1659 | @section testgdbm invocation | 1659 | @section gdbmtool invocation |
1660 | @cindex command line options, @command{testgdbm} | 1660 | @cindex command line options, @command{gdbmtool} |
1661 | 1661 | ||
1662 | The following table summarizes all @command{testgdbm} command line | 1662 | The following table summarizes all @command{gdbmtool} command line |
1663 | options: | 1663 | options: |
1664 | 1664 | ||
@@ -1682,4 +1682,7 @@ Disable file locking. | |||
1682 | @itemx --no-mmap | 1682 | @itemx --no-mmap |
1683 | Disable mmap. | 1683 | Disable mmap. |
1684 | @item -q | ||
1685 | @itemx --quiet | ||
1686 | Don't print the usual welcome banner at startup. | ||
1684 | @item -r | 1687 | @item -r |
1685 | @itemx --read-only | 1688 | @itemx --read-only |
@@ -1697,15 +1700,15 @@ command line options. | |||
1697 | 1700 | ||
1698 | @node shell | 1701 | @node shell |
1699 | @section testgdbm interactive mode | 1702 | @section gdbmtool interactive mode |
1700 | @cindex interactive mode, @command{testgdbm} | 1703 | @cindex interactive mode, @command{gdbmtool} |
1701 | 1704 | ||
1702 | After successful startup, @command{testgdbm} starts a loop, in which | 1705 | After successful startup, @command{gdbmtool} starts a loop, in which |
1703 | it reads commands from the user, executes them and prints the results | 1706 | it reads commands from the user, executes them and prints the results |
1704 | on the standard output. If the standard input is attached to a console, | 1707 | on the standard output. If the standard input is attached to a console, |
1705 | @command{testgdbm} runs in interactive mode, which is indicated by its | 1708 | @command{gdbmtool} runs in interactive mode, which is indicated by its |
1706 | @dfn{prompt}: | 1709 | @dfn{prompt}: |
1707 | 1710 | ||
1708 | @example | 1711 | @example |
1709 | testgdbm> _ | 1712 | gdbmtool> _ |
1710 | @end example | 1713 | @end example |
1711 | 1714 | ||
@@ -1713,5 +1716,5 @@ The utility finishes when it reads the @samp{quit} command (see below) or | |||
1713 | detects end-of-file on its standard input, whichever occurs first. | 1716 | detects end-of-file on its standard input, whichever occurs first. |
1714 | 1717 | ||
1715 | A @command{testgdbm} command consists of a @dfn{command verb}, | 1718 | A @command{gdbmtool} command consists of a @dfn{command verb}, |
1716 | optionally followed by one or two @dfn{arguments}, separated by any | 1719 | optionally followed by one or two @dfn{arguments}, separated by any |
1717 | amount of white space. A command verb can be entered either in full | 1720 | amount of white space. A command verb can be entered either in full |
@@ -1728,5 +1731,5 @@ space. This limitation will be removed in future releases. | |||
1728 | Each command takes at most two @dfn{formal parameters}, which can be | 1731 | Each command takes at most two @dfn{formal parameters}, which can be |
1729 | optional or mandatory. If the number of actual arguments is less than the | 1732 | optional or mandatory. If the number of actual arguments is less than the |
1730 | number of mandatory parameters, @command{testgdbm} will prompt you to | 1733 | number of mandatory parameters, @command{gdbmtool} will prompt you to |
1731 | supply missing arguments. For example, the @samp{store} command takes two | 1734 | supply missing arguments. For example, the @samp{store} command takes two |
1732 | mandatory parameters, so if you invoked it with no arguments, you | 1735 | mandatory parameters, so if you invoked it with no arguments, you |
@@ -1735,5 +1738,5 @@ example below: | |||
1735 | 1738 |