Age | Commit message (Collapse) | Author | Files |
|
|
|
|
|
|
|
* doc/Makefile.am: Use gendocs.pl to generate web version of the
manual.
* doc/gdbm.texi: Update.
* doc/gendocs.pl: New file.
* doc/otherdoc.texi.in: New file.
* doc/.gitignore: Ignore otherdoc.texi.
* doc/webdoc.init: New file.
* doc/gendocs.sh: Remove.
* doc/gendocs_template: Remove.
* doc/html.init: Remove.
|
|
|
|
* src/gdbm_dump.c: Add missing I18N.
* src/gdbm_load.c: Likewise.
* src/parseopt.c (parseopt_program_doc)
(parseopt_program_args): Remove duplicate declarations.
|
|
* NEWS: Document changes.
* doc/gdbm.texi: Document changes.
* src/datconv.c (datum_scan_tag): Implement tagged structure
initialization.
* src/gdbmtool.c (kvlist_free): Made extern.
(kvlist_find): New function.
* src/gdbmtool.h (kvlist_find, kvlist_free)
(dsegm_list_find): New protos.
(dsegm_free_list): Rename to dsegm_list_free. All uses changed.
* src/gram.y: Forbid duplicate tags in kvlist.
|
|
* doc/gdbm.texi: Fix the description of a sample content structure.
* src/datconv.c (datum_scan_notag): Proceed to the next kvpair only
for segments of the FDEF_FLD type.
|
|
* src/mmap.c (GDBM_MMAP_FLAGS): Define to MAP_POPULATE or
MAP_PREFAULT_READ, if available.
(_gdbm_internal_remap): Use GDBM_MMAP_FLAGS.
|
|
* src/gdbmconst.h: Don't redefine SIZE_T_MAX
* src/gdbmtool.c: Likewise.
Include <termios.h>, instead of <sys/termios.h>
* configure.ac: Don't check for termios.h
* tests/closerr.c: Minor fixes.
|
|
|
|
* src/recover.c (_gdbm_finish_transfer): Preserve locking type.
|
|
|
|
|
|
* src/gdbmopen.c (validate_header): Silently accept databases with next_block
pointing beyond end of file.
|
|
* src/gdbmopen.c (validate_header): Return GDBM_NEED_RECOVERY
if next_block is invalid.
(_gdbm_validate_header): New function.
(gdbm_fd_open): Set need_recovery depending on return from validate_header.
(gdbm_open): Bail out on invalid value of GDBM_OPENMASK bits.
* src/proto.h (_gdbm_validate_header): New proto.
* src/recover.c (check_db): Re-validate the header.
* src/gdbmtool.c (export_handler): Fix option processing.
|
|
* compat/dbmopen.c (ndbm_open_dir_file0): Ignore ENOENT.
* src/falloc.c (push_avail_block): Free temporary storage no matter
what return status.
* src/gdbm.h.in (GDBM_FILE_TRUNCATE_ERROR): New error code.
* src/gdbmdump.c (_gdbm_dump_ascii): Initialize rc.
* src/gdbmerrno.c: Handle new error.code
* src/gdbmload.c (gdbm_load_bdb_dump): Initialize rc
* src/gdbmopen.c (_gdbm_ftruncate): New function.
(gdbm_fd_open): Use _gdbm_ftruncate. Check its return.
* src/gdbmseq.c (gdbm_firstkey): Initialize dsize
* src/gdbmtool.c (command_generator): Check if cmd is NULL.
(shouldn't happen, but anyways).
* src/mmap.c (_gdbm_mapped_lseek): Check for vailidity of the 'whence'
parameter.
* src/systems.h (TRUNCATE): Remove macro.
* src/util.c (vgetyn): Remove unnecessary assignment.
|
|
|
|
Bug reported by Miroslav Lichvar and Marek Skalický
* src/bucket.c (gdbm_dir_entry_valid_p): Fix lower limit for
the allowed bucket address. Initial allocation of second block
for the directory can be eventually returned to the available
list when the directory is expanded during bucket splitting.
|
|
* src/gdbmdump.c (_gdbm_dump_ascii): Clear the GDBM_ITEM_NOT_FOUND error.
* src/gdbmexp.c (gdbm_export_to_file): Likewise.
* NEWS: Update.
|
|
* src/gdbmopen.c (gdbm_avail_table_valid_p): Fix improper use of
the GDBM_DEBUG macro.
|
|
* src/gdbmsync.c (gdbm_sync): Always return a meaningful value
|
|
|
|
* src/recover.c (backup_name): Fix memory overwrite.
* src/gdbmtool.c (recover_handler): New option "force".
|
|
* 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.
|
|
|
|
|
|
The two boolean variables control the use of free block coalescing and
central free block modes in newly opened databases.
|
|
* src/falloc.c (avail_lookup): Remove the start parameter.
(avail_move): Take pointer to the count of entries in av_table.
Update the pointed to value after performing the move.
All uses changed.
(_gdbm_put_av_elem): Rewrite the "can_merge" loop.
|
|
Use binary search for look-ups.
* src/falloc.c (avail_lookup, avail_move): New functions.
(get_elem): Use avail_lookup to search.
(_gdbm_put_av_elem): Use avail_lookup and avail_move to handle the
avail table. In coalesce mode, store the index of the greater than
or equal entry to avoid extra lookup in case no suitable entry is
found.
|
|
* src/bucket.c (_gdbm_split_bucket): Take into account coalesce_blocks
* src/falloc.c (_gdbm_put_av_elem): Change to void return. All uses changed.
* src/proto.h: Likewise.
|
|
|
|
* src/gdbmdefs.h (gdbm_avail_table_valid_p): Remove const qualifier from
the AV parameter.
* src/gdbmopen.c (gdbm_avail_table_valid_p): Don't insist on proper
ordering of the array. Restore it if neccessary.
|
|
* src/falloc.c (_gdbm_put_av_elem): Float the merged entry to its
proper position to preserve the sorting order.
* THANKS: Thanks Adam Sampson
|
|
|
|
* configure.ac: Version 1.5
* NEWS: Update.
* src/Makefile.am (VI_CURRENT): Increment to 6
* src/bucket.c (_gdbm_get_bucket): Fix the upper limit for
bucket_bits.
* src/falloc.c (push_avail_block): Fill the allocated block
with 0s.
|
|
* src/bucket.c (_gdbm_get_bucket): Check if bucket_bits value is valid.
* src/gdbmtool.c (_gdbm_print_avail_list): Reverse the sense of the
conditional (fix regression).
|
|
* src/findkey.c (_gdbm_read_entry): Reallocate cache_entry->ca_data.dptr only
if necessary.
* src/gdbmdefs.h (data_cache_elem): New member: dsize
* src/gdbmdelete.c: Don't free cache_entry->ca_data.dptr
* src/gdbmopen.c (_gdbm_init_cache): Initialize ca_data.dsize
|
|
|
|
* src/mmap.c (_gdbm_file_extend): Move to ...
* src/fullio.c: ... here
* src/proto.h (_gdbm_file_extend): New proto.
* src/gdbmopen.c (gdbm_fd_open): Make sure the file size equals
header->next_block.
* src/gdbmsetopt.c [!HAVE_MMAP]: Don't disable GDBM_GETFLAGS.
* src/update.c (_gdbm_end_update): Make sure disk file ends on
header->next_block.
|
|
Rename: __read to gdbm_file_read
__write to gdbm_file_write
__lseek to gdbm_file_seek
__fsync to gdbm_file_sync
|
|
The hooks were introduced as a temporary tool in de7834e9. They did
their job and are not necessary any more.
|
|
* src/gdbmtool.c (print_bucket_begin): Check return value from _gdbm_get_bucket.
(source_handler): Don't gtry to push NULL stream.
|
|
|
|
|
|
* src/gdbmtool.c: Reduce memory consuption in -random mode. Some
minor bugfixes as well.
|
|
* tests/num2word.c: New options: -revert and -random
|
|
Verify that avail_table is sorted by size and that each element's
size falls within allowed range.
* src/bucket.c (gdbm_get_bucket): Fix bucket validation. Validate
bucket_avail.
(_gdbm_split_bucket): Check return from _gdbm_free.
* src/falloc.c (adjust_bucket_avail,_gdbm_free): Return error code.
All uses updated.
(pop_avail_block): Fix eventual memory leak. Use gdbm_avail_block_validate.
* src/gdbmdefs.h (gdbm_avail_table_valid_p): Change signature.
* src/gdbmopen.c (gdbm_avail_table_valid_p): Traverse the array verifying
address and size of each element.
(gdbm_avail_block_validate)
(gdbm_bucket_avail_table_validate): New functions.
(validate_header): Remove call to gdbm_avail_block_valid_p. Avail_block
is validated later, after it's been loaded.
Bail out if header->next_block does not equal the file size.
(gdbm_fd_open): Validate avail_block.
* src/gdbmstore.c (_gdbm_store): Check return from _gdbm_free. Avoid
endless loop in case of inconsistent h_table.
* src/gdbmtool.c (_gdbm_print_avail_list): Use gdbm_avail_block_validate.
* src/proto.h: Update.
* tests/gtload.c: Improve error diagnostics.
|
|
|
|
|