osprey/kg++fe/gnu/hash.c File Reference

#include "config.h"
#include "system.h"
#include "hash.h"
#include "obstack.h"
#include "toplev.h"

Include dependency graph for hash.c:

Go to the source code of this file.

Defines

#define obstack_chunk_alloc   xmalloc
#define obstack_chunk_free   free
#define DEFAULT_SIZE   1009

Functions/Subroutines

void hash_table_init_n (struct hash_entry **struct hash_table *, struct hash_entry **newfunc, hash, bool *comp, unsigned int size)
void hash_table_init (struct hash_entry **struct hash_table *, struct hash_entry **newfunc, hash, bool *comp)
void hash_table_free (struct hash_table *table)
struct hash_entryhash_lookup (struct hash_table *table, hash_table_key key, int create, hash_table_key *copy)
struct hash_entryhash_newfunc (struct hash_entry *entry, struct hash_table *table, p)
PTR hash_allocate (struct hash_table *table, unsigned int size)
void hash_traverse (struct hash_table *table, bool *func, PTR info)
unsigned long string_hash (hash_table_key k)
bool string_compare (hash_table_key k1, hash_table_key k2)
hash_table_key string_copy (struct obstack *memory, hash_table_key k)


Define Documentation

#define DEFAULT_SIZE   1009

Definition at line 33 of file hash.c.

#define obstack_chunk_alloc   xmalloc

Definition at line 29 of file hash.c.

#define obstack_chunk_free   free

Definition at line 30 of file hash.c.


Function Documentation

PTR hash_allocate ( struct hash_table table,
unsigned int  size 
)

Definition at line 141 of file hash.c.

References obstack_alloc.

Referenced by hash_newfunc(), and init_test_hash_newfunc().

struct hash_entry* hash_lookup ( struct hash_table table,
hash_table_key  key,
int  create,
hash_table_key copy 
) [read]

struct hash_entry* hash_newfunc ( struct hash_entry entry,
struct hash_table table,
p   
) [read]

Definition at line 127 of file hash.c.

References hash_allocate().

void hash_table_free ( struct hash_table table  ) 

Definition at line 77 of file hash.c.

References NULL, obstack_free, and PTR.

void hash_table_init ( struct hash_entry **  struct hash_table *,
struct hash_entry **  newfunc,
hash  ,
bool comp 
)

Definition at line 63 of file hash.c.

References comp, DEFAULT_SIZE, and hash_table_init_n().

Referenced by add_method_1().

void hash_table_init_n ( struct hash_entry **  struct hash_table *,
struct hash_entry **  newfunc,
hash  ,
bool comp,
unsigned int  size 
)

Definition at line 38 of file hash.c.

References comp, memset, obstack_alloc, obstack_begin, and PTR.

Referenced by hash_table_init().

void hash_traverse ( struct hash_table table,
bool func,
PTR  info 
)

Definition at line 151 of file hash.c.

References func, i, hash_entry::next, and p.

Referenced by java_lang_expand_expr().

bool string_compare ( hash_table_key  k1,
hash_table_key  k2 
)

Definition at line 197 of file hash.c.

References strcmp().

hash_table_key string_copy ( struct obstack memory,
hash_table_key  k 
)

Definition at line 207 of file hash.c.

References obstack_alloc, strcpy, and strlen().

unsigned long string_hash ( hash_table_key  k  ) 

Definition at line 168 of file hash.c.

References c, len, and s.


Generated on Wed Apr 8 14:49:35 2009 for Open64 by  doxygen 1.5.6