aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-07-25 16:35:25 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-07-25 16:35:25 +0300
commitdae93e6ab7ab75734bd1abd8abbd107579abbf5d (patch)
tree19dd2a9b532b34feb9a0d0a61b84e9a1fb253ace /doc
parent364f4246159b8d338c2fafc70b868ffc83816c2f (diff)
downloadgdbm-dae93e6ab7ab75734bd1abd8abbd107579abbf5d.tar.gz
gdbm-dae93e6ab7ab75734bd1abd8abbd107579abbf5d.tar.bz2
Improve the "next" shortcut.
* src/gdbmtool.c (open_handler): Close the previously opened database. (close_handler): Free the file name. (print_dir_handler): Print the number of buckets. (command_repeat_type): New enum. (command) <repeat>: Change type to enum command_repeat_type. (command_tab): Update accordingly. Mark "next" with REPEAT_NOARG. (run_last_command): Handle REPEAT_NOARG separately. * NEWS: Document the shortcut. * doc/gdbm.texi: Likewise. * src/debug.c (datbuf_format): Don't represent bytes after the end of datum as zeros. (gdbm_debug_datum): Print datum size.
Diffstat (limited to 'doc')
-rw-r--r--doc/gdbm.texi11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/gdbm.texi b/doc/gdbm.texi
index 7f93046..4eb8793 100644
--- a/doc/gdbm.texi
+++ b/doc/gdbm.texi
@@ -1923,8 +1923,8 @@ existing @acronym{GDBM} database or to create a new one.
1923@flindex junk.gdbm 1923@flindex junk.gdbm
1924When invoked without arguments, it tries to open a database file called 1924When invoked without arguments, it tries to open a database file called
1925@file{junk.gdbm}, located in the current working directory. You can 1925@file{junk.gdbm}, located in the current working directory. You can
1926change this default by supplying the name of the database to use as 1926change this default by supplying the name of the database as
1927an argument to the program, e.g.: 1927argument to the program, e.g.:
1928 1928
1929@example 1929@example
1930$ gdbmtool file.db 1930$ gdbmtool file.db
@@ -2007,7 +2007,7 @@ command line options.
2007 2007
2008After successful startup, @command{gdbmtool} starts a loop, in which 2008After successful startup, @command{gdbmtool} starts a loop, in which
2009it reads commands from the standard input, executes them and prints 2009it reads commands from the standard input, executes them and prints
2010the results on the standard output. If the standard input is attached 2010results on the standard output. If the standard input is attached
2011to a console, @command{gdbmtool} runs in interactive mode, which is 2011to a console, @command{gdbmtool} runs in interactive mode, which is
2012indicated by its @dfn{prompt}: 2012indicated by its @dfn{prompt}:
2013 2013
@@ -2384,6 +2384,11 @@ List the contents of the database.
2384Sequential access: fetch and display the next record. If the @var{key} is 2384Sequential access: fetch and display the next record. If the @var{key} is
2385given, the record following the one with this key will be fetched. 2385given, the record following the one with this key will be fetched.
2386 2386
2387Issuing several @code{next} commands in row is rather common. A
2388shortcut is provided to facilitate such use: if the last entered
2389command was @command{next}, hitting the @kbd{Enter} key repeats it
2390without arguments.
2391
2387See also @code{first}, above. 2392See also @code{first}, above.
2388 2393
2389@xref{Sequential}, for more information on sequential access. 2394@xref{Sequential}, for more information on sequential access.

Return to:

Send suggestions and report system problems to the System administrator.