00001
00002
00003
00004
00005 #ifndef __SPLAY_H
00006 #define __SPLAY_H
00007
00008 struct Curl_tree {
00009 struct Curl_tree *smaller;
00010 struct Curl_tree *larger;
00011 struct Curl_tree *same;
00012 int key;
00013 void *payload;
00014 };
00015
00016 struct Curl_tree *Curl_splay(int i, struct Curl_tree *t);
00017 struct Curl_tree *Curl_splayinsert(int key, struct Curl_tree *t,
00018 struct Curl_tree *newnode);
00019 #if 0
00020 struct Curl_tree *Curl_splayremove(int key, struct Curl_tree *t,
00021 struct Curl_tree **removed);
00022 #endif
00023
00024 struct Curl_tree *Curl_splaygetbest(int key, struct Curl_tree *t,
00025 struct Curl_tree **removed);
00026 int Curl_splayremovebyaddr(struct Curl_tree *t,
00027 struct Curl_tree *remove,
00028 struct Curl_tree **newroot);
00029
00030 #ifdef CURLDEBUG
00031 void Curl_splayprint(struct Curl_tree * t, int d, char output);
00032 #else
00033 #define Curl_splayprint(x,y,z)
00034 #endif
00035
00036 #endif