Skip to content
Newer
Older
100644 82 lines (61 sloc) 2.56 KB
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /* Cherokee
4 *
5 * Authors:
6 * Alvaro Lopez Ortega <alvaro@alobbs.com>
7 *
920e20b @alobbs Happy new year!
alobbs authored
8 * Copyright (C) 2001-2011 Alvaro Lopez Ortega
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
2c39092 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@2660 5dc97367-9…
alobbs authored
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301, USA.
72f6444 @alobbs Clean up: Trims trailing spaces.
alobbs authored
23 */
b6c69ad @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@269 5dc97367-97…
alobbs authored
24
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
25 #if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
26 # error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
27 #endif
28
b6c69ad @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@269 5dc97367-97…
alobbs authored
29 #ifndef CHEROKEE_AVL_H
30 #define CHEROKEE_AVL_H
31
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
32 #include <cherokee/buffer.h>
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
33 #include <cherokee/avl_generic.h>
b6c69ad @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@269 5dc97367-97…
alobbs authored
34
35 CHEROKEE_BEGIN_DECLS
36
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
37
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
38 /* AVL Tree Node
39 */
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
40 typedef struct {
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
41 cherokee_avl_generic_node_t base;
42 cherokee_buffer_t key;
43 } cherokee_avl_node_t;
44
45 /* AVL Tree
46 */
47 typedef struct {
48 cherokee_avl_generic_t base;
49 cherokee_boolean_t case_insensitive;
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
50 } cherokee_avl_t;
51
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
52
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
53 #define AVL(a) ((cherokee_avl_t *)(a))
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
54 #define AVL_NODE(a) ((cherokee_avl_node_t *)(a))
55
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
56
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
57 ret_t cherokee_avl_init (cherokee_avl_t *avl);
58 ret_t cherokee_avl_new (cherokee_avl_t **avl);
59 ret_t cherokee_avl_set_case (cherokee_avl_t *avl, cherokee_boolean_t case_insensitive);
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
60
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
61 ret_t cherokee_avl_add (cherokee_avl_t *avl, cherokee_buffer_t *key, void *value);
62 ret_t cherokee_avl_del (cherokee_avl_t *avl, cherokee_buffer_t *key, void **value);
63 ret_t cherokee_avl_get (cherokee_avl_t *avl, cherokee_buffer_t *key, void **value);
5beb087 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@835 5dc97367-97…
alobbs authored
64
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
65 ret_t cherokee_avl_add_ptr (cherokee_avl_t *avl, const char *key, void *value);
66 ret_t cherokee_avl_del_ptr (cherokee_avl_t *avl, const char *key, void **value);
67 ret_t cherokee_avl_get_ptr (cherokee_avl_t *avl, const char *key, void **value);
c238f0c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@804 5dc97367-97…
alobbs authored
68
b824f66 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@838 5dc97367-97…
alobbs authored
69
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
70 typedef ret_t (* cherokee_avl_while_func_t) (cherokee_buffer_t *key, void *value, void *param);
b6c69ad @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@269 5dc97367-97…
alobbs authored
71
a68f41b @alobbs Merges the Front-Line Cache branch.
alobbs authored
72 ret_t cherokee_avl_while (cherokee_avl_generic_t *avl,
73 cherokee_avl_while_func_t func,
74 void *param,
75 cherokee_buffer_t **key,
76 void **value);
b6c69ad @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@269 5dc97367-97…
alobbs authored
77
78
79 CHEROKEE_END_DECLS
80
3a07956 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@886 5dc97367-97…
alobbs authored
81 #endif /* CHEROKEE_AVL_H */
Something went wrong with that request. Please try again.