00001 /* Eliot */ 00002 /* Copyright (C) 1999 Antoine Fraboulet */ 00003 /* */ 00004 /* This file is part of Eliot. */ 00005 /* */ 00006 /* Eliot is free software; you can redistribute it and/or modify */ 00007 /* it under the terms of the GNU General Public License as published by */ 00008 /* the Free Software Foundation; either version 2 of the License, or */ 00009 /* (at your option) any later version. */ 00010 /* */ 00011 /* Eliot is distributed in the hope that it will be useful, */ 00012 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 00013 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 00014 /* GNU General Public License for more details. */ 00015 /* */ 00016 /* You should have received a copy of the GNU General Public License */ 00017 /* along with this program; if not, write to the Free Software */ 00018 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00019 00020 /** 00021 * \file hashtable.h 00022 * \brief Simple hashtable type 00023 * \author Antoine Fraboulet 00024 * \date 1999 00025 */ 00026 00027 #ifndef _HASHTABLE_H 00028 #define _HASHTABLE_H 00029 #if defined(__cplusplus) 00030 extern "C" 00031 { 00032 #endif 00033 00034 typedef struct _Hash_table* Hash_table; 00035 00036 Hash_table hash_init(unsigned int); 00037 int hash_destroy(Hash_table); 00038 int hash_size(Hash_table); 00039 void* hash_find(Hash_table,void* key,unsigned keysize); 00040 int hash_add (Hash_table,void* key,unsigned keysize, 00041 void* value,unsigned valuesize); 00042 00043 #if defined(__cplusplus) 00044 } 00045 #endif 00046 #endif /* _HASHTABLE_H_ */