Return error (0) rather than exit for bad dict header (magic)
[idzebra-moved-to-github.git] / dict / lookgrep.c
index 2fc27bf..03193ed 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: lookgrep.c,v 1.27 2004-11-19 10:26:55 heikki Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
-   Index Data Aps
+/* $Id: lookgrep.c,v 1.30 2005-11-01 10:16:08 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -28,12 +28,22 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <assert.h>
 
 #include <dfa.h>
-#include <dict.h>
+#include "dict-p.h"
 
 typedef unsigned MatchWord;
 #define WORD_BITS 32
 #define MAX_LENGTH 1024
 
+/* This code is based 
+ * Sun Wu and Udi Manber: Fast Text Searching Allowing Errors.
+ *      Communications of the ACM, pp. 83-91, Vol. 35, No. 10, Oct. 1992, USA.
+ *      PostScript version of the paper in its submitted form: agrep1.ps)
+ *      recommended reading to understand AGREP ! 
+ *
+ * http://www.tgries.de/agrep/#AGREP1PS
+ * http://www.tgries.de/agrep/doc/agrep1ps.zip
+ */
+
 typedef struct {
   int n;                 /* no of MatchWord needed */
   int range;             /* max no. of errors */