aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-11-13 15:28:04 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-11-13 15:28:04 +0000
commitfd714cdcec660f915917edd239324e7544daa234 (patch)
tree9bcf5029b60bf482a2d13b7b2a2194b4a6f7c6f5 /doc
parent5d14e2acfec6f5ded1c88c7912224157a79be351 (diff)
downloadgdbm-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.texinfo43
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.
951 951
952@cindex default database, @command{testgdbm} 952@cindex default database, @command{testgdbm}
953@cindex @option{-g}, @command{testgdbm} option 953@cindex @option{-g}, @command{testgdbm} option
954@cindex @option{-f}, @command{testgdbm} option
955@cindex @option{--file}, @command{testgdbm} option
954@flindex junk.gdbm 956@flindex junk.gdbm
955When invoked without options, it tries to open a database file called 957When invoked without options, it tries to open a database file called
956@file{junk.gdbm}, located in the current working directory. You can 958@file{junk.gdbm}, located in the current working directory. You can
957change this default using the @option{-g} command line option. This 959change this default using the @option{--file} (@option{-f}) command
960line option@footnote{For compatibility with earlier versions, the
961@option{-g} option acts as an alias to @option{-f}}. This
958option takes a single argument, specifying the file name to open, e.g.: 962option takes a single argument, specifying the file name to open, e.g.:
959 963
960@example 964@example
961$ testgdbm -g file.db 965$ testgdbm -f file.db
962@end example 966@end example
963 967
964@cindex read-only mode, @command{testgdbm} 968@cindex read-only mode, @command{testgdbm}
965@cindex @option{-r}, @command{testgdbm} option 969@cindex @option{-r}, @command{testgdbm} option
966The database will be opened in read-write mode, unless the @option{-r} 970@cindex @option{--read-only}, @command{testgdbm} option
967option is specified, in which case it will be opened only for reading. 971The database will be opened in read-write mode, unless the
972@option{-r} (@option{--read-only}) option is specified, in which case
973it will be opened only for reading.
968 974
969@cindex creating a database, @command{testgdbm} 975@cindex creating a database, @command{testgdbm}
970@cindex @option{-n}, @command{testgdbm} option 976@cindex @option{-n}, @command{testgdbm} option
977@cindex @option{--newdb}, @command{testgdbm} option
971If the database does not exist, @command{testgdbm} will create it. 978If the database does not exist, @command{testgdbm} will create it.
972There is a special option @option{-n}, which instructs the utility to 979There is a special option @option{-n} (@option{--newdb}, which
973create a new database. If it is used and if the database already 980instructs the utility to create a new database. If it is used and if
974exists, it will be deleted, so use it sparingly. 981the database already exists, it will be deleted, so use it sparingly.
975 982
976@menu 983@menu
977* invocation:: 984* invocation::
@@ -987,21 +994,39 @@ options:
987 994
988@table @option 995@table @option
989@item -b @var{size} 996@item -b @var{size}
997@itemx --block-size=@var{size}
990Set block size. 998Set block size.
991@item -c @var{size} 999@item -c @var{size}
1000@itemx --cache-size=@var{size}
992Set cache size. 1001Set cache size.
993@item -g @var{file} 1002@item -f @var{file}
1003@itemx -g @var{file}
1004@itemx --file=@var{file}
994Operate on @var{file} instead of the default @file{junk.gdbm}. 1005Operate on @var{file} instead of the default @file{junk.gdbm}.
995@item -h 1006@item -h
1007@itemx --help
996Print a concise help summary. 1008Print a concise help summary.
997@item -n 1009@item -n
1010@itemx --newdb
998Create the database. 1011Create the database.
1012@item -l
1013@itemx --no-lock
1014Disable file locking.
1015@item -m
1016@itemx --no-mmap
1017Disable mmap.
999@item -r 1018@item -r
1019@itemx --read-only
1000Open the database in read-only mode. 1020Open the database in read-only mode.
1001@item -s 1021@item -s
1022@itemx --synchronize
1002Synchronize to the disk after each write. 1023Synchronize to the disk after each write.
1003@item -v 1024@item -V
1025@itemx --version
1004Print program version and licensing information and exit. 1026Print program version and licensing information and exit.
1027@item --usage
1028Print a terse invocation syntax summary along with a list of available
1029command line options.
1005@end table 1030@end table
1006 1031
1007@node shell 1032@node shell

Return to:

Send suggestions and report system problems to the System administrator.