2013-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
Implement rc files and "source" command; improve lexical analyzer.
* src/gdbmtool.c (interactive): Move to lex.l;
(mkfilename, tildexpand): New functions.
(command_tab) <source>: New command.
(main): Source rc file, if present.
* src/gdbmtool.h (setsource): Change return type
and signature.
* src/lex.l: Implement context stack.
Change DEF to be an exclusive state.
* src/gdbmapp.h (estrdup): Argument is const.
* src/mem.c: Likewise.
2013-05-14 Sergey Poznyakoff <gray@gnu.org.ua>
Add support for Berkeley dump format version 3 (read-only).
* src/gdbmapp.h: Include gettext.h and locale.h.
* src/gdbmload.c: Support for Berkeley dump format,
version 3.
2013-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
Remove the "read" command. Use "import" instead.
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: Requi
|