summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/anonymous.c13
-rw-r--r--src/anonymous.h3
2 files changed, 9 insertions, 7 deletions
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);
}
diff --git a/src/anonymous.h b/src/anonymous.h
index 81feb45..3533dc0 100644
--- a/src/anonymous.h
+++ b/src/anonymous.h
@@ -1,4 +1,4 @@
-/* $Id: anonymous.h,v 1.2 2000-09-11 23:38:36 rjkaes Exp $
+/* $Id: anonymous.h,v 1.3 2000-10-23 21:43:52 rjkaes Exp $
*
* See 'anonymous.c' for a detailed description.
*
@@ -18,6 +18,7 @@
#ifndef _TINYPROXY_ANONYMOUS_H_
#define _TINYPROXY_ANONYMOUS_H_
+extern int new_anonymous(void);
extern int anon_search(char *s);
extern void anon_insert(char *s);