/* * hashtable.h * * Hash table handling for strings * * © 1994-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Dynamic Linking System (SDLS) * * SDLS is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * SDLS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with SDLS. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __hashtable_h #define __hashtable_h typedef struct hash__table *hashtable; hashtable hash_create(void); int hash_find(hashtable h,char *string); int hash_add(hashtable h,char *string); int hash_addWithOrd(hashtable h,char *string,unsigned int ord); void hash_delete(hashtable h); int hash_subset(hashtable super, hashtable sub, void (*proc)(char *p)); void hash_dump(hashtable h); void hash_enumerate(hashtable h, void (*func)(char *string,void *handle), void *handle); void hash_enumOrdered(hashtable h, void (*func)(char *string, unsigned int ord, void *handle), void *handle); int hash_count(hashtable h); #endif