Removed exit - call.
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 12 Jan 1998 15:04:31 +0000 (15:04 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 12 Jan 1998 15:04:31 +0000 (15:04 +0000)
CHANGELOG
TODO
util/res.c

index f5f1b2c..a1cb393 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,8 @@
 Simple ranked searches now return correct number of hits.
 
+The test option (-s) only makes a read-lock on the index as well
+as using read-only operations anywhere.
+
 Moved towards generic character mapping. Configuration file default.idx
 specifies character map files for register types w, p, u, etc.
 
diff --git a/TODO b/TODO
index 80751be..c934ec4 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-Zebra TODO $Id: TODO,v 1.3 1997-12-18 10:54:24 adam Exp $
+Zebra TODO $Id: TODO,v 1.4 1998-01-12 15:04:31 adam Exp $
 
 Make regx-filter thread safe.
 
@@ -18,8 +18,3 @@ Generic character set mapping (w, p, etc.)
 
 ISAMC optimization: indirect block with pointers to all blocks
  in chain. The initial block should include the count as well.
-
-Test mode fix: when using test mode (-s) Zebra should only do
- read-locking and not write-locking thus preventing Zebra thinking
- the index is inconsistent.
index c1f3d3c..5710648 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: res.c,v $
- * Revision 1.21  1997-11-18 10:04:03  adam
+ * Revision 1.22  1998-01-12 15:04:32  adam
+ * Removed exit - call.
+ *
+ * Revision 1.21  1997/11/18 10:04:03  adam
  * Function res_trav returns number of 'hits'.
  *
  * Revision 1.20  1997/10/31 12:39:15  adam
@@ -115,8 +118,8 @@ static void reread (Res r)
     fr = fopen (r->name, "r");
     if (!fr)
     {
-        logf (LOG_FATAL|LOG_ERRNO, "Cannot open %s", r->name);
-        exit (1);
+        logf (LOG_WARN|LOG_ERRNO, "Cannot open %s", r->name);
+       return ;
     }
     while (1)
     {
@@ -214,7 +217,10 @@ Res res_open (const char *name)
 #else
     if (access (name, R_OK))
 #endif
-        logf (LOG_LOG|LOG_ERRNO, "Cannot access `%s'", name);
+    {
+        logf (LOG_LOG|LOG_ERRNO, "Cannot access resource file `%s'", name);
+       return NULL;
+    }
     r = xmalloc (sizeof(*r));
     r->init = 0;
     r->first = r->last = NULL;