summaryrefslogtreecommitdiffabout
path: root/doc
AgeCommit message (Collapse)AuthorFiles
2019-04-08Update copyright yearsSergey Poznyakoff8
2018-11-27Fix typo in the manpage.Sergey Poznyakoff1
2018-07-01Change return value of gdbm_close and gdbm_syncSergey Poznyakoff2
* src/gdbm.h.in (gdbm_close, gdbm_sync): Return int (GDBM_FILE_CLOSE_ERROR, GDBM_FILE_SYNC_ERROR): New error codes. * src/gdbmclose.c (gdbm_close): Return 0 on success, -1 on failure. Set gdbm_errno and errno. * src/gdbmsync.c (gdbm_sync): Likewise. * src/gdbmerrno.c: Handle new error codes. * src/mmap.c (_gdbm_mapped_sync): Set gdbm_errno. * src/proto.h (gdbm_file_sync): Set gdbm_errno. * doc/gdbm.3: Document changes. * doc/gdbm.texi: Document changes. * NEWS: Document changes. * configure.ac: Set patchlevel. * tests/Makefile.am: Add new test. * tests/testsuite.at: Add new test. * tests/closerr.at: New test case. * tests/closerr.c: New test program. * tests/gtdel.c: Check gdbm_close return. * tests/gtdump.c: Likewise. * tests/gtfetch.c: Likewise. * tests/gtload.c: Likewise. * tests/gtopt.c: Likewise. * tests/gtrecover.c: Likewise.
2018-06-27Version 1.16v1.16Sergey Poznyakoff1
2018-06-27Fix typoSergey Poznyakoff1
2018-06-27New gdbmtool variables: coalesce and centfreeSergey Poznyakoff1
The two boolean variables control the use of free block coalescing and central free block modes in newly opened databases.
2018-05-24Various fixesSergey Poznyakoff1
* src/input-std.c: Bugfix * doc/gdbm.texi: Document changes. * README: Update. * configure.ac: New option --enable-gdbmtool-debug. * src/Makefile.am: Conditionally augment AM_YFLAGS and AM_LFLAGS with options that enable debugging. * src/gdbmtool.c: Conditionally enable --lex-trace and --gram-trace options. * src/gram.y: Likewise. * src/lex.l: Likewise. * tests/Makefile.am: Remove architecure-dependent tests. * tests/testsuite.at: Likewise.
2018-05-23gdbmtool: accept commands from command line as well as from fileSergey Poznyakoff1
Commands can be supplied to gdbmtool in three ways: 1. From a file, using the --file (-f) option: gdbmtool -f comfile 2. From the command line, if first argument is the database name: gdbmtool test.db count \; fetch mykey \; avail Note the use of semicolon to delimit commands. 3. From the interactive shell, if neither of the above is used. * src/Makefile.am: Add new sources. * src/gdbmtool.c: Use new stream functions for input. * src/gdbmtool.h (setsource): Remove proto. (instream_t): New data type. (instream_name, instream_read) (instream_close, instream_interactive) (instream_eq): New functions. (instream_stdin_create) (instream_argv_create) (instream_file_create) (interactive, input_context_push): New protos. * src/gram.y: Accept ; in place of newline. * src/input-argv.c: New file. * src/input-file.c: New file. * src/input-rl.c: Rewrite to provide instream_t API. * src/input-std.c: Likewise. * src/lex.l: Rewrite. * tests/.gitignore: Update. * tests/Makefile.am: Add new tests. Incorporate DejaGNU tests. * tests/config/default.exp: New file. * tests/gdbmtool/base.exp: New file. * tests/gdbmtool00.at: New file. * tests/gdbmtool01.at: New file. * tests/gdbmtool02.at: New file. * tests/testsuite.at: Include new tests.
2018-05-19Remove gdbm-1.8.3 compatibility layerSergey Poznyakoff1
* configure.ac: Remove gdbm-1.8.3 compatibility layer. Version 1.14.90 * Makefile.am (ACLOCAL_AMFLAGS): Remove deprecated variable. (MAYBE_EXPORT): Remove variable and conditional. * NEWS: Update. * NOTE-WARNING: Update. * README: Update. * doc/gdbm.texi: Update. * export/.gitignore: Remove. * export/Makefile.am: Remove. * export/export.c: Remove.
2018-01-01Happy GNU YearSergey Poznyakoff8
2017-10-28Fix manpage formatting.Sergey Poznyakoff1
2017-03-11Fix GENDOCS command linev1.13Sergey Poznyakoff1
2017-01-02Happy GNU YearSergey Poznyakoff8
2016-07-27Remove obsolete error code.Sergey Poznyakoff1
* doc/gdbm.texi: Remove description of GDBM_UNKNOWN_UPDATE. Document GDBM_DIR_OVERFLOW. * src/gdbm.h.in (GDBM_ERR_DIR_OVERFLOW): Rename to GDBM_DIR_OVERFLOW. (GDBM_UNKNOWN_ERROR): New error code. (GDBM_UNKNOWN_UPDATE): Define to GDBM_UNKNOWN_ERROR for backward compatibility. * src/gdbmerrno.c (gdbm_strerror, gdbm_db_strerror): Simplify a bit
2016-07-25Improve the "next" shortcut.Sergey Poznyakoff1
* 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.
2016-07-20Introduce debug hooks.Sergey Poznyakoff1
* configure.ac: New option --enable-debug Print feature summary at the end of the run. * src/debug.c: New file. * src/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Build debug.o Define GDBM_DEBUG_ENABLE. * src/gdbmdefs.h [GDBM_DEBUG_ENABLE] (_gdbm_debug_hook_install) (_gdbm_debug_hook_remove,_gdbm_debug_hook_check) (_gdbm_debug_hook_val): New protos. (GDBM_DEBUG_HOOK, GDBM_DEBUG_OVERRIDE) (GDBM_DEBUG_ALLOC): New defines. * src/gdbm.h.in (GDBM_RCVR_FORCE): New flag. * src/recover.c (gdbm_recover): Check database before attempting recovery, unless GDBM_RCVR_FORCE flag is set. * doc/gdbm.texi: Document GDBM_RCVR_FORCE * src/gdbmreorg.c (gdbm_reorganize): Use GDBM_RCVR_FORCE. * src/gdbmtool.c (main): Always allocate file_name. * src/bucket.c: Put GDBM_DEBUG_OVERRIDE and GDBM_DEBUG_ALLOC in critical places. * src/falloc.c: Likewise. * src/findkey.c: Likewise. * src/gdbmopen.c: Likewise. * src/gdbmstore.c: Likewise. * src/update.c: Likewise. * tests/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Define GDBM_DEBUG_ENABLE. * tests/gtload.c: New options -hook, -recover, -verbose, -backup, -max-failures, -max-failed-keys, and -max-failed-buckets. Attempt recovery after errors.
2016-07-19Improve docs. Minor changes.Sergey Poznyakoff1
* NEWS: Document new features. * doc/gdbm.texi: Likewise. * src/gdbm.h.in (gdbm_last_errno): Fix return value. (gdbm_check_syserr): New proto. * src/gdbmdefs.h (gdbm_file_info) <last_error>: Fix data type. * src/gdbmerrno.c (gdbm_last_errno): Fix return value. (gdbm_check_syserr): New function.
2016-07-15New gdbm_setopt option to get the actual block size valueSergey Poznyakoff1
* src/gdbm.h.in (GDBM_GETBLOCKSIZE): New option. * src/gdbmcount.c (gdbm_count): Fix memory leak on error. * src/gdbmsetopt.c (gdbm_setopt): Rewrite. Handle GDBM_GETBLOCKSIZE. * NEWS: Document GDBM_GETBLOCKSIZE * doc/gdbm.texi: Likewise. * tests/gtload.c: New options -bsexact and -verbose. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise. * tests/blocksize00.at: New testcase. * tests/blocksize01.at: Likewise. * tests/blocksize02.at: Likewise.
2016-07-15gdbm_open adjusts requested block size to accomodate integer number of ↵Sergey Poznyakoff1
directory offsets. * src/gdbm.h.in (GDBM_BSEXACT): New flag. * src/gdbmopen.c (compute_directory_size): New function. (gdbm_open): When creating new database, adjust the requested block size so that the block holds integer number of directory indices. Disable this behavior if GDBM_BSEXACT flag is set (this reverts to old behavior). Always unset GDBM_BSEXACT if using block size returned by stat(2). This makes sure gdbm_open succeeds on file systems reporting block sizes not divisible by 512. * src/gdbmconst.h (GDBM_MIN_BLOCK_SIZE): New constant. * src/gdbmimp.c (gdbm_import_from_file): Use GDBM_MIN_BLOCK_SIZE instead of the hardcoded value. * NEWS: Document GDBM_BSEXACT. * doc/gdbm.texi: Likewise.
2016-07-12Line-editing support in gdbmtoolSergey Poznyakoff2
* configure.ac: Check if GNU Readline is available. * src/Makefile.am: Add new files. * src/input-rl.c: New file. * src/input-std.c: New file. * src/gdbmtool.c (handler_param): Move declaration to the header file. (quit_handler): Call input_done. (command_tab): Add the "history" command. (command_generator): New function. (slist_new_s, slist_new_l) (slist_insert): New functions. (main): Call input_init and input_done. * src/gdbmtool.h: New protos. * src/gram.y: Use slist_insert to construct string lists. * src/lex.l (read_input): Remove. Use input_read instead. (print_prompt_at_bol): New function. (print_prompt): Remove. (make_prompt): New function. * NEWS: Document changes. * README: Document readline support. * doc/gdbm.texi: Document line editing in gdbmtool. * doc/gdbmtool.1: Likewise.
2016-07-08Improve _gdbm_findkey interface.Sergey Poznyakoff1
* doc/gdbm.texi: Document gdbm_exists in detail. * src/findkey.c (_gdbm_findkey): return parameters can be NULL. * src/gdbmexists.c (gdbm_exists): Remove unnecessary local variables. Reset gdbm_errno to 0 if the key was not found. * src/gdbmdelete.c (gdbm_delete): Remove unnecessary local variables. * src/gdbmfetch.c: Likewise. * src/gdbmseq.c: Likewise. * src/gdbmstore.c: Likewise.
2016-07-08Fix error handling in gdbm_fetch, gdbm_firstkey, and gdbm_nextkey.Sergey Poznyakoff2
* src/gdbmfetch.c: Hanlde out of memory error. * src/findkey.c: Set gdbm_errno to GDBM_ITEM_NOT_FOUND if nothing was found. * src/gdbmdelete.c: Don't set gdbm_errno after _gdbm_findkey returns -1. It's been done already. * src/gdbmexp.c (gdbm_export_to_file): Return -1 if gdbm_fetch fails. * src/gdbmseq.c (get_next_key): Set gdbm_errno to GDBM_ITEM_NOT_FOUND if there's no next key. Don't call _gdbm_fatal on out of memory condition. (gdbm_nextkey): Set gdbm_errno to GDBM_ITEM_NOT_FOUND if there's no next key. * src/gdbmtool.c (fetch_handler) (firstkey_handler,nextkey_handler): Check gdbm_errno. * src/gdbmstore.c: Handle error return from _gdbm_findkey. * tests/gtdump.c: Likewise. * tests/gtfetch.c: Likewise. * doc/gdbm.texi: Document changes. * doc/gdbm.3: Likewise. * configure.ac: Version 1.12.90 * NEWS: Update. * .gitignore: Update.
2016-07-07Switch to Git repositorySergey Poznyakoff3
2016-07-06Minor changesSergey Poznyakoff2
2016-05-18Actually include doc/html.initSergey Poznyakoff2
2015-12-05Minor changesSergey Poznyakoff1
2015-12-05Minor fixes in the docsSergey Poznyakoff2
2015-08-14Fix doc generation.Sergey Poznyakoff2
* doc/Config: Rename to doc/html.init. * doc/gdbm.texinfo: Fix sectioning.
2015-08-13Minor fix in docsSergey Poznyakoff2
* doc/gdbm.texinfo: Fix direntry records.
2015-03-01Switch to Texinfo 5.0Sergey Poznyakoff5
* doc/Config: Rewrite. * doc/Makefile.am: Use Makeinfo 5 instead of texi2htm * doc/gendocs_template: Ps is not built * imprimatur: Upgrade.
2014-02-06Use dist_man_MANS for manpages.Sergey Poznyakoff1
2013-12-25Minor changes.Sergey Poznyakoff2
* src/gdbm_load.c: New options: --mmap, --cache-size and --block-size. * doc/gdbm.texinfo: Document new gdbm_load options. * doc/gdbm_load.1: Likewise. * src/gdbmdelete.c: Stylistic changes. * src/gdbmstore.c: Likewise.
2013-05-21New function gdbm_count.Sergey Poznyakoff1
* configure.ac: Check for unsigned long long, define substitution variable GDBM_COUNT_T. * src/gdbmcount.c: New file. * src/Makefile.am (libgdbm_la_SOURCES): Add gdbmcount.c. * src/bucket.c (_gdbm_read_bucket_at): New function. * src/gdbm.h.in (gdbm_count_t): New typedef. (gdbm_count): New proto. * src/gdbmdefs.h (GDBM_DIR_COUNT): New define. * src/proto.h (_gdbm_read_bucket_at): New proto. * src/var.c: New variable "filemode". * src/gdbmtool.c: Use gdbm_count. Various bugfixes. * NEWS: Update. * doc/gdbm.texinfo: Update.
2013-05-17Fix a typoSergey Poznyakoff1
2013-05-17Update the docs.Sergey Poznyakoff2
* NEWS: Update. * doc/gdbm.texinfo: Update. * doc/gdbmtool.1: Document the "define" statement. * src/datconv.c: Rename string datatypes to reflect their meaning. (dsprint): Improve output presentation.
2013-05-16Provide support for a simplified "define" construct.Sergey Poznyakoff1
* doc/gdbm.texinfo: Document the "define" statement. * src/datconv.c: Support short and ushort data types. * src/gdbmtool.c: Don't call checkdb prior to handling the "hash" command. * src/gram.y: Support simplified definition construct: "define key|content type".
2013-05-16Improve handling of the variables.Sergey Poznyakoff2
* src/gdbmtool.c (opendb): Allow for unset variables. * src/gram.y: Improve error detection. * src/lex.l: Handle multiline strings. (pe_file_name): file_name can be NULL. * src/var.c (VARF_PROT): New flag. Protects the variable from being unset. (vartab): Use VARF_PROT if needed. (s2b): Fix return values. (variable_set, variable_unset): Return error if attempting to unset a variable marked with VARF_PROT. * doc/gdbm.info: Update. * doc/gdbmtool.1: Update.
2013-05-09Add new prompt escapes.Sergey Poznyakoff1
* src/testgdbm.c: New prompt escapes: %p, %P, %v, %_. Change default prompt to %p>%_. * doc/gdbmtool.1: Document new prompt escapes.
2013-05-09Update ignore listsSergey Poznyakoff1
2013-05-08Rename testgdbm to gdbmtool. Improve documentation.Sergey Poznyakoff6
* 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.
2011-11-16Improve testgdbmSergey Poznyakoff1
* src/mem.c (ealloc_die): Return EXIT_FATAL to the shell. * src/testgdbm.c: Use emalloc, erealloc and estrdup for memory allocation. (syntax_error): New function. (handler_param): New struct. (all handlers): Change signature. Take a pointer to struct handler_param as argument. (export_handler,import_handler): Handle new formats. (main): Take first argument to be the file name. (optab): Remove -f argument. Hide -g, but retain it for backward compatibility. * doc/gdbm.texinfo: Update.
2011-11-15Update the docs. Improve dump/load utilities.Sergey Poznyakoff1
* doc/gdbm.texinfo: Reorganize the material. Document gdbm_load and gdbm_dump utilities. * src/gdbm.h.in (GDBM_META_MASK_MODE) (GDBM_META_MASK_OWNER): New constant. (gdbm_load,gdbm_load_from_file): Take an additional argument: meta_flags, which masks out restoring certain meta-data. * src/gdbm_dump.c: Remove -b option. The -H option takes symbolic format names. Use the standard exit codes. * src/gdbm_load.c: New options: --mode, --user and --no-meta. Use the standard exit codes. * src/gdbmapp.h (EXIT_OK, EXIT_FATAL, EXIT_MILD) (EXIT_USAGE): New constants. * src/gdbmload.c (gdbm_load,gdbm_load_from_file): Take an additional argument, which masks out restoring certain meta-data.
2011-11-15Return a meaningful error code if failed to restore file's metadata.Sergey Poznyakoff1
* src/gdbm.h.in (GDBM_ERR_FILE_OWNER) (GDBM_ERR_FILE_MODE): New error codes. (_GDBM_MAX_ERRNO): Update. * src/gdbmerrno.c (gdbm_errlist): Add new error codes. * src/gdbmload.c (_set_gdbm_meta_info): Set gdbm_errno and return 1 in case of errors. (_gdbm_load_file): Propagate the return value from _set_gdbm_meta_info. * src/gdbm_load.c (main): Handle mild error conditions. * export/export.c (usage): Print the GDBM version the program is linked with. * doc/gdbm.texinfo: Document changes.
2011-11-14Document new flat format and related functions.Sergey Poznyakoff1
2011-11-14Minor changesSergey Poznyakoff1
2011-11-13Implement new dump format. Add new utilities: gdbm_dump and gdbm_load.Sergey Poznyakoff1
* 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.
2011-11-12Update the docs.Sergey Poznyakoff1
* NEWS: Update. * doc/gdbm.texinfo: Update.
2011-11-11Implement cloexec in gdbm_reorganize. Add test cases.Sergey Poznyakoff1
* compat/dbmopen.c: Apply O_CLOEXEC for newly created dir file, if requested. * src/gdbmdefs.h (gdbm_file_info) <cloexec>: New member. * src/gdbmopen.c (gdbm_open): Initialize cloexec member. * src/gdbmreorg.c (gdbm_reorganize): Propagate cloexec bit to the new database. * tests/.cvsignore: Update. * tests/cloexec00.at: New test case. * tests/cloexec01.at: Likewise. * tests/cloexec02.at: Likewise. * tests/cloexec03.at: Likewise. * fdop.c: New auxiliary program. * g_open_ce: New test program. * g_reorg_ce: New test program. * d_creat_ce: New test program. * tests/Makefile.am: Add new test cases and test programs. * tests/testsuite.at: Include new test cases. * doc/gdbm.texinfo: Minor change.
2011-11-11Support close-on-exec flag for gdbm_open call.Sergey Poznyakoff1
* src/gdbm.h.in (GDBM_CLOEXEC): New flag. * src/systems.h [O_CLOEXEC]: Provide a placeholder definition. * src/gdbmopen.c (gdbm_open): Honor the GDBM_CLOEXEC flag. * compat/dbmopen.c (ndbm_open_dir_file0): Mask out open mode before comparing with GDBM_READER. Support GDBM_CLOEXEC. (dbm_open): Translate O_CLOEXEC to GDBM_CLOEXEC. * doc/gdbm.texinfo: Document GDBM_CLOEXEC. * NEWS: Update.
2011-08-24Implement multi-character commands in testgdbm.Sergey Poznyakoff1
* bootstrap (get_po): Discard output from cmp. * src/testgdbm.c: Implement multi-character commands. * doc/gdbm.texinfo: Update.

Return to:

Send suggestions and report system problems to the System administrator.