From b7f00ecbe71200814196edcb38c378dcd4acaacc Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 6 Dec 1995 14:41:13 +0000 Subject: [PATCH] New function: dict_delete. --- dict/Makefile | 4 ++-- dict/lookgrep.c | 6 +++++- include/dict.h | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dict/Makefile b/dict/Makefile index d38942d..b111c3f 100644 --- a/dict/Makefile +++ b/dict/Makefile @@ -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) diff --git a/dict/lookgrep.c b/dict/lookgrep.c index 149eaf1..a3cc6b7 100644 --- a/dict/lookgrep.c +++ b/dict/lookgrep.c @@ -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) { diff --git a/include/dict.h b/include/dict.h index f5f9b7a..76fa05b 100644 --- a/include/dict.h +++ b/include/dict.h @@ -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)); -- 1.7.10.4