CWB
Functions
hash.c File Reference

Functions

int is_prime (int n)
 Returns True iff n is a prime. More...
 
int find_prime (int n)
 Returns smallest prime >= n. More...
 
unsigned int hash_string (char *string)
 Computes 32bit hash value for string. More...
 
unsigned int hash_macro (char *macro_name, unsigned int args)
 

Function Documentation

int find_prime ( int  n)

Returns smallest prime >= n.

References is_prime().

unsigned int hash_macro ( char *  macro_name,
unsigned int  args 
)
unsigned int hash_string ( char *  string)

Computes 32bit hash value for string.

int is_prime ( int  n)

Returns True iff n is a prime.

Referenced by find_prime().