2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
Add "set" and "define" to the main command table.
* src/gdbmtool.c: Include gram.h
(command) <tok>: New member.
(command_tab): List "define" and "set".
(find_command): Rewrite as command_lookup, with different
return type and signature.
(run_command): Take struct command * as its first argument.
* src/gdbmtool.h (command_lookup): New proto.
(run_command): Change signature.
(datadef_locate): Rename to datadef_lookup. All uses changed.
* src/gram.y: Update.
* src/lex.l: Change handling of IDENT rules.
2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
Implement shell variables in gdbmtool.
* src/var.c: New file.
* src/Makefile.am: Add var.c
* src/datconv.c (datum_format): Remove the "delim"
parameter, use "delim1" and "delim2" shell variables
instead.
* src/gdbmtool.c: Remove "prompt" command. Use "set ps[12]"
instead.
(print_prompt): Move to lex.l
* src/gdbmtool.h (variable_set)
(variable_get, variable_print_all): New protos.
* src/gram.y: Handle the "set" command.
* src/lex.l: Update.
2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
Handle structured key and content data in gdbmtool.
* src/datconv.c: New file.
* src/Makefile.am (gdbmtool_SOURCES): Add datconv.c.
* src/gdbmtool.h (slist, kvpair): New structures.
(gdbmarg): Keep various types of data depending on the
value of the type member.
(slist_new, slist_free)
(kvpair_string, kvpair_list): New protos.
(gdbmarg_new): Remove.
(gdbmarg_string, gdbmarg_datum)
(gdbmarg_kvpair, gdbmarg_free)
(gdbmarg_destroy): New protos.
(xd_expand, xd_store, datadef_locate): New protos.
(field, dsegm): New structs.
(dsegm_new, dsegm_new_field, dsegm_free_list): New protos.
* src/gdbmtool.c: Rewrite.
* src/gram.y: Change grammar to allow for defining key and
content structure and for supplying structured data as arguments
to fetch, store and similar functions.
* src/lex.l: Handle new token types.
* tests/dtload.c (main): Fix parser.
* tests/gtload.c: Likewise.
2013-05-11 Sergey Poznyakoff <gray@gnu.org.ua>
Rewrite gdbmtool parser.
* src/testgdbm.c: Remove.
* src/gdbmtool.c: New file.
* src/gdbmtool.h: New file.
* src/gram.y: New file.
* src/lex.l: New file.
* src/Makefile.am: Update.
2013-05-09 Sergey Poznyakoff <gray@gnu.org.ua>
Add new prompt escapes.
* src/testgdbm.c: New prompt escapes: %p, %P, %v, %_.
Change default prompt to %p>%_.
* doc/gdbmtool.1: Document new prompt escapes.
2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
Rename testgdbm to gdbmtool. Improve documentation.
* 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.
2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: (AC_INIT): Add webpage URL.
2013-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
Improve testgdbm; install some more bugfixes.
* src/gdbmdefs.h: Fix typo in a comment.
* src/gdbmdump.c (gdbm_dump_to_file): Improve error
checking.
* src/testgdbm.c: Improve interactive usage.
(command) <minlen>: Rename to len.
(command_tab): Initialize len.
(set_minimal_abbreviations): Remove.
(sort_commands): New function.
(find_command): Print possible alternatives in case of
ambiguous input.
(main): Reset param.argc after freeing previous arguments.
Continue silently if find_command returns NULL.
2013-05-07 Sergey Poznyakoff <gray@gnu.org.ua>
Bugfix.
* src/gdbmreorg.c: Call _gdbm_mapped_init when the database
structure is fully initialized (Puszcza bug #171).
2013-05-07 Sergey Poznyakoff <gray@gnu.org.ua>
Minor change
* configure.ac: Require autoconf 2.69 or newer (in response
to Puszcza bug #171).
2012-03-21 Sergey Poznyakoff <gray@gnu.org.ua>
* tests/create00.at: Use cmp -s || diff -u instead of plain
diff, because the latter produces extra output on some systems
(notably Solaris).
* tests/dbmcreate00.at: Likewise.
* THANKS: Add Bill Jones
2011-11-16 Sergey Poznyakoff <gray@gnu.org.ua>
Improve testgdbm
* 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-15 Sergey Poznyakoff <gray@gnu.org.ua>
Version 1.10.90
Update the docs. Improve dump/load utilities.
* 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-15 Sergey Poznyakoff <gray@gnu.org.ua>
Return a meaningful error code if failed to restore file's metadata.
* src/gdbm.h.in (GDBM_ERR_
|