diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-07-25 16:35:25 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-07-25 16:35:25 +0300 |
commit | dae93e6ab7ab75734bd1abd8abbd107579abbf5d (patch) | |
tree | 19dd2a9b532b34feb9a0d0a61b84e9a1fb253ace /doc | |
parent | 364f4246159b8d338c2fafc70b868ffc83816c2f (diff) | |
download | gdbm-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.texi | 11 |
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 |
1924 | When invoked without arguments, it tries to open a database file called | 1924 | When 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 |
1926 | change this default by supplying the name of the database to use as | 1926 | change this default by supplying the name of the database as |
1927 | an argument to the program, e.g.: | 1927 | argument 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 | ||
2008 | After successful startup, @command{gdbmtool} starts a loop, in which | 2008 | After successful startup, @command{gdbmtool} starts a loop, in which |
2009 | it reads commands from the standard input, executes them and prints | 2009 | it reads commands from the standard input, executes them and prints |
2010 | the results on the standard output. If the standard input is attached | 2010 | results on the standard output. If the standard input is attached |
2011 | to a console, @command{gdbmtool} runs in interactive mode, which is | 2011 | to a console, @command{gdbmtool} runs in interactive mode, which is |
2012 | indicated by its @dfn{prompt}: | 2012 | indicated by its @dfn{prompt}: |
2013 | 2013 | ||
@@ -2384,6 +2384,11 @@ List the contents of the database. | |||
2384 | Sequential access: fetch and display the next record. If the @var{key} is | 2384 | Sequential access: fetch and display the next record. If the @var{key} is |
2385 | given, the record following the one with this key will be fetched. | 2385 | given, the record following the one with this key will be fetched. |
2386 | 2386 | ||
2387 | Issuing several @code{next} commands in row is rather common. A | ||
2388 | shortcut is provided to facilitate such use: if the last entered | ||
2389 | command was @command{next}, hitting the @kbd{Enter} key repeats it | ||
2390 | without arguments. | ||
2391 | |||
2387 | See also @code{first}, above. | 2392 | See also @code{first}, above. |
2388 | 2393 | ||
2389 | @xref{Sequential}, for more information on sequential access. | 2394 | @xref{Sequential}, for more information on sequential access. |