From bb761dd62f7718bb3040cd146ca5a2de40544cdf Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 12 Jan 1998 15:04:31 +0000 Subject: [PATCH] Removed exit - call. --- CHANGELOG | 3 +++ TODO | 7 +------ util/res.c | 14 ++++++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f5f1b2c..a1cb393 100644 --- 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 --- 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. - diff --git a/util/res.c b/util/res.c index c1f3d3c..5710648 100644 --- a/util/res.c +++ b/util/res.c @@ -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; -- 1.7.10.4