about summary refs log tree commit homepage
path: root/ext/http11/tst.h
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-01-28 19:03:53 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-01-28 19:03:53 +0000
commit004dec2c2f44a0db510dfd65e5ffd8c9fc4ff83e (patch)
treea8b7de6debeb447af5479bf156706d09fe748ab4 /ext/http11/tst.h
parentb6d34b2a4191a3118c7c70ea49349e89e581ed91 (diff)
downloadunicorn-004dec2c2f44a0db510dfd65e5ffd8c9fc4ff83e.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@4 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'ext/http11/tst.h')
-rw-r--r--ext/http11/tst.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/http11/tst.h b/ext/http11/tst.h
new file mode 100644
index 0000000..8e5ab2c
--- /dev/null
+++ b/ext/http11/tst.h
@@ -0,0 +1,40 @@
+
+
+struct node
+{
+   unsigned char value;
+   struct node *left;
+   struct node *middle;
+   struct node *right;
+};
+
+struct tst
+{
+   int node_line_width;
+   struct node_lines *node_lines;
+   struct node *free_list;
+   struct node *head[127];
+};
+
+struct node_lines
+{
+   struct node *node_line;
+   struct node_lines *next;
+};
+
+enum tst_constants
+{
+   TST_OK, TST_ERROR, TST_NULL_KEY, TST_DUPLICATE_KEY, TST_REPLACE
+};
+
+struct tst *tst_init(int node_line_width);
+
+int tst_insert(unsigned char *key, void *data, struct tst *tst, int option, void **exist_ptr);
+
+void *tst_search(unsigned char *key, struct tst *tst, int *prefix_len);
+
+void *tst_delete(unsigned char *key, struct tst *tst);
+
+void tst_cleanup(struct tst *tst);
+
+