From 5a5c2adcd8231b4fea656b54b907502aede93726 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Mon, 23 Oct 2000 21:43:52 +0000 Subject: Added the new_anonymous initialize routine --- src/anonymous.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/anonymous.c') diff --git a/src/anonymous.c b/src/anonymous.c index 76db940..d99d46e 100644 --- a/src/anonymous.c +++ b/src/anonymous.c @@ -1,4 +1,4 @@ -/* $Id: anonymous.c,v 1.2 2000-09-11 23:38:36 rjkaes Exp $ +/* $Id: anonymous.c,v 1.3 2000-10-23 21:43:52 rjkaes Exp $ * * Handles insertion and searches for headers which should be let through when * the anonymous feature is turned on. The headers are stored in a Ternary @@ -32,6 +32,12 @@ static TERNARY anonymous_tree; +int new_anonymous(void) +{ + anonymous_tree = ternary_new(); + return anonymous_tree; +} + int anon_search(char *s) { return ternary_search(anonymous_tree, s, NULL); @@ -39,10 +45,5 @@ int anon_search(char *s) void anon_insert(char *s) { - if (anonymous_tree == 0) { - if (TE_ISERROR(anonymous_tree = ternary_new())) - return; - } - ternary_insert(anonymous_tree, s, NULL); } -- cgit v1.2.3