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_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-14 Sergey Poznyakoff <gray@gnu.org.ua>
* doc/gdbm.texinfo (Error codes): Document new flat format and
related functions.
* po/POTFILES.in: Update
2011-11-13 Sergey Poznyakoff <gray@gnu.org.ua>
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.
|