aboutsummaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-07-25 12:37:52 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-07-25 12:54:39 +0300
commit364f4246159b8d338c2fafc70b868ffc83816c2f (patch)
treed6609a1a066d657df4d7615f55834a29f45c6c6f /src/hash.c
parentde7834e96602695db1cb6efd6238398b84d2ca60 (diff)
downloadgdbm-364f4246159b8d338c2fafc70b868ffc83816c2f.tar.gz
gdbm-364f4246159b8d338c2fafc70b868ffc83816c2f.tar.bz2
Add debug info.
* configure.ac: Fix description wording. * src/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Don't define GDBM_DEBUG_ENABLE. * tests/Makefile.am: Likewise. * src/debug.c (gdbm_debug_printer) (gdbm_debug_flags): New globals. (gdbm_debug_token, gdbm_debug_parse_state) (gdbm_debug_datum): New functions. * src/gdbm.h.in [@GDBM_DEBUG_ENABLE@]: Define GDBM_DEBUG_ENABLE. (gdbm_debug_printer_t): New typedef. (gdbm_debug_printer, gdbm_debug_flags): New externs. (GDBM_DEBUG_ERR,GDBM_DEBUG_OPEN) (GDBM_DEBUG_READ,GDBM_DEBUG_STORE) (GDBM_DEBUG_LOOKUP,GDBM_DEBUG_ALL): New defines. (gdbm_debug_token,gdbm_debug_parse_state) (gdbm_debug_datum): New protos. * src/gdbmdefs.h (GDBM_DEBUG,GDBM_DEBUG_DATUM): New macros. * src/findkey.c: Add debugging info. * src/gdbmfetch.c: Likewise. * src/gdbmopen.c: Likewise. * src/gdbmseq.c: Likewise. * src/gdbmstore.c: Likewise. * src/gdbmtool.c (open_handler): Allow the use of ~/ (command) <repeat,variadic>: New members. (run_command): Handle variadic functions. (run_last_command): New command. In interactive mode, repeats the last command if it was marked with repeat=1 (currently, only "next"). New command: "debug". (all functions): Use terror instead of fprintf(stderr,...); * src/gdbmtool.h (handler_param) <vararg>: New member. (run_last_command): New proto. * src/gram.y: Call run_last_command) on empty input. * tests/gtload.c: New option: -debug=
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index 1c6cb8e..7b86849 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -56,5 +56,5 @@ _gdbm_hash_key (GDBM_FILE dbf, datum key, int *hash, int *bucket, int *offset)
int hashval = _gdbm_hash (key);
*hash = hashval;
*bucket = _gdbm_bucket_dir (dbf, hashval);
- *offset = hashval % dbf->header->bucket_elems;
+ *offset = hashval % dbf->header->bucket_elems;
}

Return to:

Send suggestions and report system problems to the System administrator.