PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
hash.c File Reference
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "hash.h"
#include "math.h"

Go to the source code of this file.

Classes

struct  ht_bucket
struct  hashtable

Macros

#define INT_PER_DOUBLE   2

Typedefs

typedef struct ht_bucket ht_bucket

Functions

int d1eq (void *key1, void *key2)
hashtableht_create (int size, ht_keycp cp, ht_keyeq eq, ht_key2hash hash)
void ht_destroy (hashtable *table)
voidht_insert (hashtable *table, void *key, void *data)
voidht_find (hashtable *table, void *key)
voidht_delete (hashtable *table, void *key)
void ht_process (hashtable *table, void(*func)(void *))
static unsigned int strhash (void *key)
static voidstrcp (void *key)
static int streq (void *key1, void *key2)
static unsigned int d1hash (void *key)
static voidd1cp (void *key)
static unsigned int d2hash (void *key)
static voidd2cp (void *key)
static int d2eq (void *key1, void *key2)
hashtableht_create_d1 (int size)
hashtableht_create_d2 (int size)
hashtableht_create_str (int size)

Macro Definition Documentation

#define INT_PER_DOUBLE   2

Definition at line 22 of file hash.c.

Typedef Documentation

typedef struct ht_bucket ht_bucket

Function Documentation

static void* d1cp ( void key)
static

Definition at line 346 of file hash.c.

int d1eq ( void key1,
void key2 
)

Definition at line 355 of file hash.c.

static unsigned int d1hash ( void key)
static

Definition at line 335 of file hash.c.

static void* d2cp ( void key)
static

Definition at line 381 of file hash.c.

static int d2eq ( void key1,
void key2 
)
static

Definition at line 391 of file hash.c.

static unsigned int d2hash ( void key)
static

Definition at line 366 of file hash.c.

hashtable* ht_create ( int  size,
ht_keycp  cp,
ht_keyeq  eq,
ht_key2hash  hash 
)

Definition at line 54 of file hash.c.

hashtable* ht_create_d1 ( int  size)

Definition at line 396 of file hash.c.

hashtable* ht_create_d2 ( int  size)

Definition at line 401 of file hash.c.

hashtable* ht_create_str ( int  size)

Definition at line 406 of file hash.c.

void* ht_delete ( hashtable table,
void key 
)

Definition at line 233 of file hash.c.

void ht_destroy ( hashtable table)

Definition at line 102 of file hash.c.

void* ht_find ( hashtable table,
void key 
)

Definition at line 210 of file hash.c.

void* ht_insert ( hashtable table,
void key,
void data 
)

Definition at line 135 of file hash.c.

void ht_process ( hashtable table,
void(*)(void *)  func 
)

Definition at line 290 of file hash.c.

static void* strcp ( void key)
static

Definition at line 323 of file hash.c.

static int streq ( void key1,
void key2 
)
static

Definition at line 328 of file hash.c.

static unsigned int strhash ( void key)
static

Definition at line 308 of file hash.c.