#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <strings.h>
#include "machine.h"
#include "bu.h"
Include dependency graph for hash.c:
Go to the source code of this file.
Functions | |
unsigned long | bu_hash (unsigned char *str, int len) |
bu_hash_tbl * | bu_create_hash_tbl (unsigned long tbl_size) |
Create an empty hash table The input is the number of desired hash bins. This number will be rounded up to the nearest power of two. | |
bu_hash_entry * | bu_find_hash_entry (struct bu_hash_tbl *hsh_tbl, unsigned char *key, int key_len, struct bu_hash_entry **prev, unsigned long *index) |
Find the hash table entry corresponding to the provided key. | |
void | bu_set_hash_value (struct bu_hash_entry *hsh_entry, unsigned char *value) |
Set the value for a hash table entry. | |
unsigned char * | bu_get_hash_value (struct bu_hash_entry *hsh_entry) |
unsigned char * | bu_get_hash_key (struct bu_hash_entry *hsh_entry) |
bu_hash_entry * | bu_hash_add_entry (struct bu_hash_tbl *hsh_tbl, unsigned char *key, int key_len, int *new_entry) |
void | bu_hash_tbl_pr (struct bu_hash_tbl *hsh_tbl, char *str) |
Print the specified hash table to stderr. (Note that the keys and values are printed as pointers). | |
void | bu_hash_tbl_free (struct bu_hash_tbl *hsh_tbl) |
Free all the memory associated with the specified hash table. Note that the keys are freed (they are copies), but the "values" are not freed. (The values are merely pointers). | |
bu_hash_entry * | bu_hash_tbl_first (struct bu_hash_tbl *hsh_tbl, struct bu_hash_record *rec) |
get the "first" entry in a hash table | |
bu_hash_entry * | bu_hash_tbl_next (struct bu_hash_record *rec) |
Definition in file hash.c.