CWB
Functions

hash.h File Reference

Functions


Function Documentation

int find_prime ( int  n)

Returns smallest prime >= n.

Returns smallest prime >= n.

Parameters:
nlower bound for the generated prime.
Returns:
The first prime number greater than n, or 0 if no prime number was found within the sizeof a signed int.

References is_prime().

Referenced by cl_new_lexhash(), main(), make_attribute_hash(), and MakeMacroHash().

unsigned int hash_macro ( char *  name,
unsigned int  args 
)
unsigned int hash_string ( char *  s)

Computes 32bit hash value for string.

Referenced by att_hash_lookup(), cl_lexhash_check_grow(), and cl_lexhash_find_i().

int is_prime ( int  n)

Returns True iff n is a prime.

Returns True iff n is a prime.

Parameters:
nnumber to check
Returns:
Boolean

Referenced by find_prime().