hash.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <stdio.h>
00021 #include <stdlib.h>
00022 #include <string.h>
00023
00024 #define HASHSIZE 101
00025
00026 struct hash {
00027 struct nlist **hashtab;
00028 int size;
00029 };
00030
00031 struct nlist {
00032 struct nlist *next;
00033 char *key;
00034 unsigned char *value;
00035 };
00036
00037 struct hash* hash_new(int size);
00038 unsigned int hashfunc(struct hash *h, char *s);
00039 struct nlist *hash_lookup(struct hash *h, char *s);
00040 struct nlist *hash_add(struct hash *h, char *key, char *val);
00041 void hash_empty();
00042 void hash_destroy(struct hash *h);
Generated on Fri Jul 16 03:29:21 2004 for LibMB by
1.3.7