New function: dict_delete.
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 6 Dec 1995 14:41:13 +0000 (14:41 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 6 Dec 1995 14:41:13 +0000 (14:41 +0000)
dict/Makefile
dict/lookgrep.c
include/dict.h

index d38942d..b111c3f 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright (C) 1994, Index Data I/S 
 # All rights reserved.
 # Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.18 1995-11-20 11:58:03 adam Exp $
+# $Id: Makefile,v 1.19 1995-12-06 14:43:01 adam Exp $
 
 SHELL=/bin/sh
 RANLIB=ranlib
@@ -16,7 +16,7 @@ TPROG2=dictext
 DEFS=$(INCLUDE)
 LIB=../lib/dict.a 
 PO = scan.o dopen.o dclose.o drdwr.o open.o close.o insert.o lookup.o \
- lookupec.o lookgrep.o
+ lookupec.o lookgrep.o delete.o
 CPP=$(CC) -E
 
 all: $(LIB)
index 149eaf1..a3cc6b7 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: lookgrep.c,v $
- * Revision 1.10  1995-11-16 17:00:44  adam
+ * Revision 1.11  1995-12-06 14:43:02  adam
+ * New function: dict_delete.
+ *
+ * Revision 1.10  1995/11/16  17:00:44  adam
  * Changed stupid log.
  *
  * Revision 1.9  1995/10/27  13:58:09  adam
@@ -370,6 +373,7 @@ int dict_lookup_grep (Dict dict, Dict_char *pattern, int range, void *client,
     struct DFA *dfa = dfa_init();
     int i, d;
 
+    logf (LOG_DEBUG, "dict_lookup_grep '%s' range=%d", pattern, range);
     i = dfa_parse (dfa, &this_pattern);
     if (i || *this_pattern)
     {
index f5f9b7a..76fa05b 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: dict.h,v $
- * Revision 1.15  1995-10-27 13:59:17  adam
+ * Revision 1.16  1995-12-06 14:41:13  adam
+ * New function: dict_delete.
+ *
+ * Revision 1.15  1995/10/27  13:59:17  adam
  * Function dict_look_grep got extra parameter max_pos that upon return
  * hold length of longest prefix that matches pattern.
  *
@@ -118,6 +121,7 @@ Dict       dict_open (const char *name, int cache, int rw);
 int        dict_close (Dict dict);
 int        dict_insert (Dict dict, const Dict_char *p, int userlen,
                         void *userinfo);
+int        dict_delete (Dict dict, const Dict_char *p);
 char      *dict_lookup (Dict dict, const Dict_char *p);
 int        dict_lookup_ec (Dict dict, Dict_char *p, int range,
                            int (*f)(Dict_char *name));