From fad73e0340b64f1a7da862d8f511ce9094e14375 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 22 Jan 2006 14:47:50 +0000 Subject: [PATCH] writeable wip --- cdb/writeable.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cdb/writeable.c b/cdb/writeable.c index 9f692d5..0074a61 100644 --- a/cdb/writeable.c +++ b/cdb/writeable.c @@ -96,7 +96,8 @@ static int ht_forall(HashTable *ht, int (*fn)(const char *key, const HashValue *val, struct ht_forall_ctx *ctx), struct ht_forall_ctx *ctx) { - /* Returns first nonzero value returned by any call to fn, or 0. */ + /* Returns first positive value returned by any call to fn, or 0. + * If fn returns -1, key is deleted. */ Tcl_HashSearch sp; Tcl_HashEntry *he; const char *key; @@ -153,7 +154,7 @@ static int rw_close(Tcl_Interp *ip, Rw *rw) { if (rw->logfile) { r= fclose(rw->logfile); - if (r && ip) { rc= cht_posixerr(ip, errno, "data loss! failed to" + if (r && ip) { rc= cht_posixerr(ip, errno, "probable data loss! failed to" " fclose logfile during untidy close"); } } @@ -466,7 +467,7 @@ static int compact_core(Tcl_Interp *ip, Rw *rw, unsigned long logsize) { cdbmaking= 0; r= fclose(rw->logfile); - if (r) { rc= cht_posixerr(ip, errno, "data loss! failed to fclose" + if (r) { rc= cht_posixerr(ip, errno, "probable data loss! failed to fclose" " logfile during compact"); goto x_rc; } rw->logfile= 0; -- 2.30.2