diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-11-13 15:28:04 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-11-13 15:28:04 +0000 |
commit | fd714cdcec660f915917edd239324e7544daa234 (patch) | |
tree | 9bcf5029b60bf482a2d13b7b2a2194b4a6f7c6f5 /doc | |
parent | 5d14e2acfec6f5ded1c88c7912224157a79be351 (diff) | |
download | gdbm-fd714cdcec660f915917edd239324e7544daa234.tar.gz gdbm-fd714cdcec660f915917edd239324e7544daa234.tar.bz2 |
Implement new dump format. Add new utilities: gdbm_dump and gdbm_load.
* configure.ac (AC_CHECK_HEADERS): Don't check for files that must
always be present. Check for getopt.h.
(AC_CHECK_FUNCS): Add getopt_long
* src/systems.h: Include useless #if's.
* src/flatfile.c: Split into two files:
* src/gdbmexp.c: ... this and ...
* src/gdbmimp.c: .., this
* src/mem.c: New file.
* src/base64.c: New file.
* src/gdbm_dump.c: New file.
* src/gdbm_load.c: New file.
* src/gdbmapp.h: New file.
* src/gdbmdump.c: New file.
* src/gdbmload.c: New file.
* src/parseopt.c: New file.
* src/progname.c: New file.
* src/.cvsignore: Update.
* src/Makefile.am (libgdbm_la_SOURCES): Add new files.
(noinst_LIBRARIES): New variable. Build libgdbmapp.a.
(libgdbmapp_a_SOURCES): New variable.
(bin_PROGRAMS): Add gdbm_load and gdbm_dump
(testgdbm_LDADD, gdbm_load_LDADD)
(gdbm_dump_LDADD): Add ./libgdbmapp.a
* src/gdbm.h.in: Include <stdio.h>
(gdbm_export_to_file)
(gdbm_import_from_file): New prototypes.
(GDBM_DUMP_FMT_BINARY,GDBM_DUMP_FMT_ASCII): New constants.
(gdbm_dump,gdbm_load)
(gdbm_dump_to_file,gdbm_load_from_file): New prototypes.
(GDBM_NO_DBNAME): New error code.
(_GDBM_MAX_ERRNO): Update.
* src/gdbmdefs.h (_GDBM_MAX_DUMP_LINE_LEN): New constant.
* src/gdbmerrno.c (gdbm_errlist): Add entry for GDBM_NO_DBNAME.
* src/proto.h (_gdbm_base64_encode,_gdbm_base64_decode)
(_gdbm_load,_gdbm_dump): New prototypes.
* src/testgdbm.c: Use gdbmapp interface for option parsing.
* export/export.c: Include gdbmexp.c
* export/.cvsignore: Update.
* doc/gdbm.texinfo: Update.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/gdbm.texinfo | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo index efd8cb5..ff93a1a 100644 --- a/doc/gdbm.texinfo +++ b/doc/gdbm.texinfo @@ -951,27 +951,34 @@ existing @acronym{GDBM} database or to create a new one. @cindex default database, @command{testgdbm} @cindex @option{-g}, @command{testgdbm} option +@cindex @option{-f}, @command{testgdbm} option +@cindex @option{--file}, @command{testgdbm} option @flindex junk.gdbm When invoked without options, it tries to open a database file called @file{junk.gdbm}, located in the current working directory. You can -change this default using the @option{-g} command line option. This +change this default using the @option{--file} (@option{-f}) command +line option@footnote{For compatibility with earlier versions, the +@option{-g} option acts as an alias to @option{-f}}. This option takes a single argument, specifying the file name to open, e.g.: @example -$ testgdbm -g file.db +$ testgdbm -f file.db @end example @cindex read-only mode, @command{testgdbm} @cindex @option{-r}, @command{testgdbm} option -The database will be opened in read-write mode, unless the @option{-r} -option is specified, in which case it will be opened only for reading. +@cindex @option{--read-only}, @command{testgdbm} option +The database will be opened in read-write mode, unless the +@option{-r} (@option{--read-only}) option is specified, in which case +it will be opened only for reading. @cindex creating a database, @command{testgdbm} @cindex @option{-n}, @command{testgdbm} option +@cindex @option{--newdb}, @command{testgdbm} option If the database does not exist, @command{testgdbm} will create it. -There is a special option @option{-n}, which instructs the utility to -create a new database. If it is used and if the database already -exists, it will be deleted, so use it sparingly. +There is a special option @option{-n} (@option{--newdb}, which +instructs the utility to create a new database. If it is used and if +the database already exists, it will be deleted, so use it sparingly. @menu * invocation:: @@ -987,21 +994,39 @@ options: @table @option @item -b @var{size} +@itemx --block-size=@var{size} Set block size. @item -c @var{size} +@itemx --cache-size=@var{size} Set cache size. -@item -g @var{file} +@item -f @var{file} +@itemx -g @var{file} +@itemx --file=@var{file} Operate on @var{file} instead of the default @file{junk.gdbm}. @item -h +@itemx --help Print a concise help summary. @item -n +@itemx --newdb Create the database. +@item -l +@itemx --no-lock +Disable file locking. +@item -m +@itemx --no-mmap +Disable mmap. @item -r +@itemx --read-only Open the database in read-only mode. @item -s +@itemx --synchronize Synchronize to the disk after each write. -@item -v +@item -V +@itemx --version Print program version and licensing information and exit. +@item --usage +Print a terse invocation syntax summary along with a list of available +command line options. @end table @node shell |