libdebian-installer
hash.h
1 /*
2  * hash.h
3  *
4  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
5  * 2003 Bastian Blank <waldi@debian.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef DEBIAN_INSTALLER__HASH_H
22 #define DEBIAN_INSTALLER__HASH_H
23 
24 #include <debian-installer/types.h>
25 
31 di_equal_func di_rstring_equal;
32 di_hash_func di_rstring_hash;
33 
34 #if 0
35 di_equal_func di_string_equal;
36 di_hash_func di_string_hash;
37 #endif
38 
41 typedef struct di_hash_table di_hash_table;
42 
60 
81 
91 void di_hash_table_destroy (di_hash_table *hash_table);
92 
106 void di_hash_table_insert (di_hash_table *hash_table, void *key, void *value);
107 
116 void *di_hash_table_lookup (di_hash_table *hash_table, const void *key);
117 
130 void di_hash_table_foreach (di_hash_table *hash_table, di_hfunc *func, void *user_data);
131 
140 
142 #endif