DyLP 1.10.4
Loading...
Searching...
No Matches
dylib_hash.h
Go to the documentation of this file.
1#ifndef _DYLIB_HASH_H
2#define _DYLIB_HASH_H
3/*
4 This file is part of the support library for the Dylp LP distribution.
5
6 Copyright (C) 2005 -- 2007 Lou Hafer
7
8 School of Computing Science
9 Simon Fraser University
10 Burnaby, B.C., V5A 1S6, Canada
11 lou@cs.sfu.ca
12
13 This code is licensed under the terms of the Eclipse Public License (EPL).
14*/
15
16/* Hash Table Structures */
17
18/*
19 In order that the hashing routines can be used for a number of different
20 tables, they do not have any knowledge of the thing being hashed. All that
21 is maintained is the association between a key and some generic object.
22
23 @(#)hash.h 1.3 06/22/04
24 svn/cvs: $Id: dylib_hash.h 407 2010-12-31 20:48:48Z lou $
25*/
26
27/*
28 The basic hash table entry structure
29
30 field description
31 ----- -----------
32 next next entry at this bucket
33 key hash key (character string)
34 ent structure associated with this entry
35*/
36
37typedef struct hel_tag { struct hel_tag *next ;
38 const char *key ;
39 void *ent ; } hel ;
40
41/* Hash table interface routines */
42
43extern void *dyhash_lookup(const char *key, hel *hashtab[], int size),
44 *dyhash_search(const char *key, hel *hashtab[],
45 int size, bool init),
46 *dyhash_enter(const char *key, hel *hashtab[],
47 int size, void *entry),
48 *dyhash_erase(const char *key, hel *hashtab[], int size) ;
49
50#endif /* _DYLIB_HASH_H */
void * dyhash_search(const char *key, hel *hashtab[], int size, bool init)
void * dyhash_enter(const char *key, hel *hashtab[], int size, void *entry)
void * dyhash_lookup(const char *key, hel *hashtab[], int size)
void * dyhash_erase(const char *key, hel *hashtab[], int size)
struct hel_tag hel
void * ent
Definition dylib_hash.h:39
const char * key
Definition dylib_hash.h:38
struct hel_tag * next
Definition dylib_hash.h:37