Use TARGET_STRIP instead of STRIP. Needed on OS X.
[AROS.git] / test / OOPDemos / include / hash.h
blobed76381d26a45cf55c581211c1236995597f1b98
1 #ifndef HASH_H
2 #define HASH_H
3 /*
4 Copyright © 1997-98, The AROS Development Team. All rights reserved.
5 $Id$
7 Desc: Demo of new OOP system - General hashing definitions.
8 Lang: english
9 */
11 #ifndef TYPES_H
12 # include "types.h"
13 #endif
14 #ifndef OOP_H
15 # include "oop.h"
16 #endif
18 /* Macros */
19 #define HashMask(ht) ( ((IPTR *)ht)[-1] )
20 #define HashSize(ht) ( HashMask(ht) + 1 )
21 #define MAX_HASH_CHARS 3
23 /* structs */
24 struct Bucket
26 struct Bucket *Next;
27 IPTR ID;
30 /* Protos */
31 struct Bucket **NewHash(ULONG entries);
32 VOID FreeHash(struct Bucket **ht, VOID (*freebucket)());
33 struct Bucket *HashLookupULONG(struct Bucket **ht, IPTR id);
34 struct Bucket *HashLookupStr(struct Bucket **ht, IPTR id);
35 BOOL CopyHash(struct Bucket **dest_ht
36 ,struct Bucket **src_ht
37 ,struct Bucket * (*copybucket)()
38 ,APTR data);
39 VOID InsertBucket(struct Bucket **ht, struct Bucket *b);
41 ULONG CalcHashStr(struct Bucket **ht, IPTR id);
42 ULONG CalcHashULONG(struct Bucket **ht, IPTR id);
44 #ifdef HASHED_METHODS
45 ULONG CalcHashHM(struct Bucket **ht, IPTR id);
46 # define CalcHash CalcHashHM
47 #endif
48 #ifdef HASHED_IFS
49 # define CalcHash CalcHashULONG
50 #endif
51 #ifdef HASHED_STRINGS
52 # define CalcHash CalcHashStr
53 #endif
55 #endif /* HASH_H */