2008-04-07 Valentin Hilbig * dbm.c (fsync, db_close, main): added noflush (unsynced) option. (c_filter0): added (my_putchar, dobget, c_bget, c_bget0, do_filter): speedup for -a 2008-01-28 Valentin Hilbig * dbm.c (main): typo (terminater) 2007-08-06 * dbm.c (c_get): as we always close, db_close() is called (my_getchar): added in favor to getchar(), to call db_close_if() more seldom (read_key_term_c, read_key_term_s): now uses my_getchar (c_sadd, c_sdir): added (with helpers, already some weeks old) 2007-04-07 * dbm.c (check_stdout): added. All routines which output data now are supposed to call check_eof() in the loop to abort when the output pipe goes away. 2007-03-26 * dbm.c (db_cmp): bugfix: data_alloc could be set, such that free() creates a signal 2007-02-12 * test.sh: improved tests 2007-01-27 * dbm.c (read_key_term_c, read_key_term_s): BUGFIX. When the first read data was empty then kbuf staied NULL, therefor GDBM told an error, even when dsize=0. Seems to be a GDBM feature. 2007-01-23 * dbm.c (get_ul): added for breviness 2007-01-18 * dbm.c (run): main() splitted into 2 routines, as the old main got too long. (main): "bdel ' ' data" can now do deletes if data matches. (db_cmp): improved error output (db_delete): added, used by c_delete and c_bdel now. This changes the error messages a little bit. (c_export, c_import): added (with a bunch of supporting rountines) (db_put): added (ex): error output improved: always prefixed by DB name (batch_store): altered to use db_put() and new error reporting (db_store): improved error output, now uses db_put 2007-01-15 U-KOSH\Administrator Kludgy kludges kludged. I hate this all, it shall be done better with a completely new DB interface, but I lack the time. SIGH. * dbm.c (db_open): random waiting added to hinder timeout cascades of concurrently running jobs under CygWin. It works. (db_close_if): added to allow advanced timeouts. The call to this function is now spreaded widely in the source at vairous places. Hopefully I did not forget one. (c_bget): bget now operates on partially last lines, too (those which do not have a line terminator). This is not true for the bget0 case! No harm is done. Usually this was a bug anyway in scripts which forgot to do things like "dbm list | dbm bget" instead of "{ dbm list; echo; } | dbm bget", which is unintuitive. But if a broken script hands out broken last lines, usually this will not find anything, so bget bails out. (ex): db_close now is calles before error exit prints something. This is to improve behavior in case you stop a script with CTRL-S, such that it cannot output anything. In error state the database thus now is freed before the process is waiting for IO, such that other processes can access the DB again. 2006-08-12 * dbm.c (db_open, main): option -q added for quiet timeouts 2006-08-10 * dbm.c (batch_alter, c_balter, c_balter0): added (c_nbatch0, c_nbatch, main): changed for balter[0]. (db_replace, db_cmp): added as convenience routine * dbm.c (c_alter): bug fixed, 3rd argument was read double (so stdin was read double if third argument was not present). 2006-07-22 * dbm.c (data_free, db_get): added (c_dump, c_alter, c_delete, c_get, hunt, c_filter): replaced gdbm_fetch() by db_get() to resolve memory leak. (db_next): changed to resolve another memory leak. (db_data): marked that data is allocated to resolve possibly memory leak (cannot happen, but be sure). (read_data_term_s): just a fix for a possible memory leak (there shall be none in this case). (dobget, c_bget, c_bget0): added (main): usage updated 2006-06-11 * dbm.c (main): added return values of dbm (ex): other return values added (db_open): timeout now gives the old return while errors return general error 2006-06-06 * dbm.c (c_delete): added delete of key only if data matches (db_open, main): timeout added (c_alter): added (batcher_new, c_nbatch, c_nbatch0): added (main): usage corrected, batch does not ignore (db_open): corrected the timeout function. Shall recover as quick as possible from the stale situation. 2006-06-04 * Makefile.tino (ADD_LDFLAGS): common problem resolved: I always add libraries to LDFLAGS instead of LDLIBS which sometimes gives link problems on some platforms. * dbm.c (c_filter): fixed the filter code. It now shall really work in all circumstances as expected. From 0.4.1 to 0.4.2 I only fixed the kmp=1xx case. Now it works for kmp=0xx as expected, too (this is if data key does not exist don't filter and if key exists it must match as given). If data is not present (4th arg not present in contrast to empty) only the 'k' in 'kmpt' counts and mp is ignored (as there you don't want to match against data). 2006-03-28 * dbm.c (dumpline): dump did not work correctly on args with zero length. 2004-12-13 * dbm.c (hunt): some changes migth correct errors (never checked). (c_filter): added 2004-09-05 VERSION 0.2.0 * dbm.c (hunt): find and search added 2004-08-18 U-KOSH\Administrator * Makefile.tino: Libraries must be given in LDLIBS (correct) not in LDFLAGS (I am just too lazy) under Cygwin, sigh 2004-07-23 VERSION 0.1.1 * Makefile.tino: changes for internal settings update * dbm.c: GPL preamble added * dbm.c (c_create, db_open): added stat calls, GDBM_WRITER creates the database instead of GDBM_WRCREAT. (c_list): number detection changed, 0 now is 'all' (c_dump, dump, dumpline): added for diagnostic dump 2004-07-22 * dbm.c (batch_store, batcher, c_batch, c_batch0): added (main): find from help removed 2004-07-21 VERSION 0.0.1