]>
git.ipfire.org Git - thirdparty/squid.git/blob - test-suite/hash.h
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #define DEFAULT_HASH_SIZE 7951
11 typedef unsigned int HASHHASH(const void *, unsigned int);
14 struct _hash_link
*next
;
17 typedef int HASHCMP(const void *, const void *);
19 typedef struct _hash_link hash_link
;
27 unsigned int current_slot
;
28 hash_link
*current_ptr
;
30 typedef struct _hash_table hash_table
;
32 extern int hash_links_allocated
;
33 /* AYJ: defined by globals.h */
34 //extern int store_hash_buckets; /* 0 */
35 //extern hash_table *store_table; /* NULL */
36 extern hash_table
*hash_create(HASHCMP
*, int, HASHHASH
*);
37 extern void hash_insert(hash_table
*, const char *, void *);
38 extern int hash_delete(hash_table
*, const char *);
39 int hash_delete_link(hash_table
*, hash_link
*);
40 int hash_unlink(hash_table
*, hash_link
*, int);
41 void hash_join(hash_table
*, hash_link
*);
42 int hash_remove_link(hash_table
*, hash_link
*);
43 hash_link
*hash_lookup(hash_table
*, const void *);
44 hash_link
*hash_first(hash_table
*);
45 hash_link
*hash_next(hash_table
*);
46 hash_link
*hash_get_bucket(hash_table
*, unsigned int);
47 void hashFreeMemory(hash_table
*);