chiark / gitweb /
writeable wip
authorian <ian>
Sun, 22 Jan 2006 14:47:50 +0000 (14:47 +0000)
committerian <ian>
Sun, 22 Jan 2006 14:47:50 +0000 (14:47 +0000)
cdb/writeable.c

index 9f692d5dfd4df396b193260af763d86b5571bf03..0074a6126181e2d76378c1ca21099346223ccbaa 100644 (file)
@@ -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;