remake
4.3+dbg-1.5
|
#include <stdio.h>
#include <ctype.h>
Go to the source code of this file.
Data Structures | |
struct | hash_table |
Macros | |
#define | __P(protos) () |
#define | HASH_VACANT(item) ((item) == 0 || (void *) (item) == hash_deleted_item) |
#define | STRING_HASH_1(KEY, RESULT) |
#define | return_STRING_HASH_1(KEY) |
#define | STRING_HASH_2(KEY, RESULT) |
#define | return_STRING_HASH_2(KEY) |
#define | STRING_COMPARE(X, Y, RESULT) |
#define | return_STRING_COMPARE(X, Y) |
#define | STRING_N_HASH_1(KEY, N, RESULT) |
#define | return_STRING_N_HASH_1(KEY, N) |
#define | STRING_N_HASH_2(KEY, N, RESULT) |
#define | return_STRING_N_HASH_2(KEY, N) |
#define | STRING_N_COMPARE(X, Y, N, RESULT) |
#define | return_STRING_N_COMPARE(X, Y, N) |
#define | ISTRING_HASH_1(KEY, RESULT) STRING_HASH_1 ((KEY), (RESULT)) |
#define | return_ISTRING_HASH_1(KEY) return_STRING_HASH_1 (KEY) |
#define | ISTRING_HASH_2(KEY, RESULT) STRING_HASH_2 ((KEY), (RESULT)) |
#define | return_ISTRING_HASH_2(KEY) return_STRING_HASH_2 (KEY) |
#define | ISTRING_COMPARE(X, Y, RESULT) STRING_COMPARE ((X), (Y), (RESULT)) |
#define | return_ISTRING_COMPARE(X, Y) return_STRING_COMPARE ((X), (Y)) |
#define | INTEGER_HASH_1(KEY, RESULT) |
#define | return_INTEGER_HASH_1(KEY) |
#define | INTEGER_HASH_2(KEY, RESULT) |
#define | return_INTEGER_HASH_2(KEY) |
#define | INTEGER_COMPARE(X, Y, RESULT) |
#define | return_INTEGER_COMPARE(X, Y) |
#define | ADDRESS_HASH_1(KEY, RESULT) INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3, (RESULT)) |
#define | ADDRESS_HASH_2(KEY, RESULT) INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3, (RESULT)) |
#define | ADDRESS_COMPARE(X, Y, RESULT) INTEGER_COMPARE ((X), (Y), (RESULT)) |
#define | return_ADDRESS_HASH_1(KEY) return_INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3) |
#define | return_ADDRESS_HASH_2(KEY) return_INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3) |
#define | return_ADDRESS_COMPARE(X, Y) return_INTEGER_COMPARE ((X), (Y)) |
Typedefs | |
typedef unsigned long hash_func_t | __P((void const *key)) |
Functions | |
void hash_init | __P ((struct hash_table *ht, unsigned long size, hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)) |
void hash_load | __P ((struct hash_table *ht, void *item_table, unsigned long cardinality, unsigned long size)) |
void **hash_find_slot | __P ((struct hash_table *ht, void const *key)) |
void *hash_insert | __P ((struct hash_table *ht, const void *item)) |
void *hash_insert_at | __P ((struct hash_table *ht, const void *item, void const *slot)) |
void *hash_delete_at | __P ((struct hash_table *ht, void const *slot)) |
void hash_delete_items | __P ((struct hash_table *ht)) |
void hash_free | __P ((struct hash_table *ht, int free_items)) |
void hash_map | __P ((struct hash_table *ht, hash_map_func_t map)) |
void hash_map_arg | __P ((struct hash_table *ht, hash_map_arg_func_t map, void *arg)) |
void hash_print_stats | __P ((struct hash_table *ht, FILE *out_FILE)) |
void **hash_dump | __P ((struct hash_table *ht, void **vector_0, qsort_cmp_t compare)) |
unsigned | jhash (unsigned char const *key, int n) |
unsigned | jhash_string (unsigned char const *key) |
Variables | |
void * | hash_deleted_item |
#define __P | ( | protos | ) | () |
#define ADDRESS_COMPARE | ( | X, | |
Y, | |||
RESULT | |||
) | INTEGER_COMPARE ((X), (Y), (RESULT)) |
#define ADDRESS_HASH_1 | ( | KEY, | |
RESULT | |||
) | INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3, (RESULT)) |
#define ADDRESS_HASH_2 | ( | KEY, | |
RESULT | |||
) | INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3, (RESULT)) |
#define HASH_VACANT | ( | item | ) | ((item) == 0 || (void *) (item) == hash_deleted_item) |
#define INTEGER_COMPARE | ( | X, | |
Y, | |||
RESULT | |||
) |
#define INTEGER_HASH_1 | ( | KEY, | |
RESULT | |||
) |
#define INTEGER_HASH_2 | ( | KEY, | |
RESULT | |||
) |
#define ISTRING_COMPARE | ( | X, | |
Y, | |||
RESULT | |||
) | STRING_COMPARE ((X), (Y), (RESULT)) |
#define ISTRING_HASH_1 | ( | KEY, | |
RESULT | |||
) | STRING_HASH_1 ((KEY), (RESULT)) |
#define ISTRING_HASH_2 | ( | KEY, | |
RESULT | |||
) | STRING_HASH_2 ((KEY), (RESULT)) |
#define return_ADDRESS_COMPARE | ( | X, | |
Y | |||
) | return_INTEGER_COMPARE ((X), (Y)) |
#define return_ADDRESS_HASH_1 | ( | KEY | ) | return_INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3) |
#define return_ADDRESS_HASH_2 | ( | KEY | ) | return_INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3) |
#define return_INTEGER_COMPARE | ( | X, | |
Y | |||
) |
#define return_INTEGER_HASH_1 | ( | KEY | ) |
#define return_INTEGER_HASH_2 | ( | KEY | ) |
#define return_ISTRING_COMPARE | ( | X, | |
Y | |||
) | return_STRING_COMPARE ((X), (Y)) |
#define return_ISTRING_HASH_1 | ( | KEY | ) | return_STRING_HASH_1 (KEY) |
#define return_ISTRING_HASH_2 | ( | KEY | ) | return_STRING_HASH_2 (KEY) |
#define return_STRING_COMPARE | ( | X, | |
Y | |||
) |
#define return_STRING_HASH_1 | ( | KEY | ) |
#define return_STRING_HASH_2 | ( | KEY | ) |
#define return_STRING_N_COMPARE | ( | X, | |
Y, | |||
N | |||
) |
#define return_STRING_N_HASH_1 | ( | KEY, | |
N | |||
) |
#define return_STRING_N_HASH_2 | ( | KEY, | |
N | |||
) |
#define STRING_COMPARE | ( | X, | |
Y, | |||
RESULT | |||
) |
#define STRING_HASH_1 | ( | KEY, | |
RESULT | |||
) |
#define STRING_HASH_2 | ( | KEY, | |
RESULT | |||
) |
#define STRING_N_COMPARE | ( | X, | |
Y, | |||
N, | |||
RESULT | |||
) |
#define STRING_N_HASH_1 | ( | KEY, | |
N, | |||
RESULT | |||
) |
#define STRING_N_HASH_2 | ( | KEY, | |
N, | |||
RESULT | |||
) |
void hash_free_items __P | ( | (void const *key) | ) |
void hash_init __P | ( | (struct hash_table *ht, unsigned long size, hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp) | ) |
void hash_load __P | ( | (struct hash_table *ht, void *item_table, unsigned long cardinality, unsigned long size) | ) |
void** hash_find_slot __P | ( | (struct hash_table *ht, void const *key) | ) |
void* hash_insert __P | ( | (struct hash_table *ht, const void *item) | ) |
void* hash_insert_at __P | ( | (struct hash_table *ht, const void *item, void const *slot) | ) |
void* hash_delete_at __P | ( | (struct hash_table *ht, void const *slot) | ) |
void hash_delete_items __P | ( | (struct hash_table *ht) | ) |
void hash_free __P | ( | (struct hash_table *ht, int free_items) | ) |
void hash_map __P | ( | (struct hash_table *ht, hash_map_func_t map) | ) |
void hash_map_arg __P | ( | (struct hash_table *ht, hash_map_arg_func_t map, void *arg) | ) |
void hash_print_stats __P | ( | (struct hash_table *ht, FILE *out_FILE) | ) |
void** hash_dump __P | ( | (struct hash_table *ht, void **vector_0, qsort_cmp_t compare) | ) |
unsigned jhash | ( | unsigned char const * | key, |
int | n | ||
) |
unsigned jhash_string | ( | unsigned char const * | key | ) |
void* hash_deleted_item |