4 Copyright © 1997-98, The AROS Development Team. All rights reserved.
7 Desc: Demo of new OOP system - General hashing definitions.
19 #define HashMask(ht) ( ((IPTR *)ht)[-1] )
20 #define HashSize(ht) ( HashMask(ht) + 1 )
21 #define MAX_HASH_CHARS 3
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
)()
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
);
45 ULONG
CalcHashHM(struct Bucket
**ht
, IPTR id
);
46 # define CalcHash CalcHashHM
49 # define CalcHash CalcHashULONG
52 # define CalcHash CalcHashStr