lighttpd 1.4.x
https://www.lighttpd.net/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
698 B
29 lines
698 B
17 years ago
|
#ifndef _SPLAY_TREE_H_
|
||
|
#define _SPLAY_TREE_H_
|
||
6 years ago
|
#include "first.h"
|
||
17 years ago
|
|
||
|
typedef struct tree_node {
|
||
|
struct tree_node * left, * right;
|
||
|
int key;
|
||
|
void *data;
|
||
|
} splay_tree;
|
||
|
|
||
|
|
||
|
splay_tree * splaytree_splay (splay_tree *t, int key);
|
||
|
splay_tree * splaytree_insert(splay_tree *t, int key, void *data);
|
||
|
splay_tree * splaytree_delete(splay_tree *t, int key);
|
||
17 years ago
|
|
||
17 years ago
|
|
||
2 years ago
|
#include "algo_md.h"
|
||
2 years ago
|
|
||
|
__attribute_pure__
|
||
|
static inline int32_t splaytree_djbhash(const char *str, const uint32_t len);
|
||
|
static inline int32_t splaytree_djbhash(const char *str, const uint32_t len)
|
||
|
{
|
||
|
/* strip highest bit of hash value for splaytree */
|
||
2 years ago
|
return (int32_t)(djbhash(str,len,DJBHASH_INIT) & ~(((uint32_t)1) << 31));
|
||
2 years ago
|
}
|
||
|
|
||
|
|
||
17 years ago
|
#endif
|