hpstdlib.h File Reference

Standard library. More...

#include <hpsys.h>

Go to the source code of this file.

Typedefs

typedef unsigned long long ULONGLONG
typedef long long LONGLONG
typedef unsigned(*) RNDFUNC (int)
typedef void(*) SRNDFUNC (unsigned)

Functions

void * malloc (size_t)
 Standard C library function.
void free (void *)
 Standard C library function.
void * calloc (size_t, size_t)
 Standard C library function.
void * realloc (void *oldp, size_t size)
 Standard C library function.
void exit (int)
 Standard C library function.
int atexit (void(*__func)(void))
 Standard C library function.
unsigned mwc (int bits)
 32 bit multiply with carry pseudo RNG
unsigned int rand (void)
 wrapper for concrete PRNG implementation
unsigned int rand_bits (int bits)
void srand (unsigned int seed)
 seeds the random sequence with seed. If seed == 0, use entropic seeding based on current time. In this case, the sequence should be nearly unreproduceable, given a sufficient long cycle length of the RNG, which is the case for mwc().
int memcmp (const void *s1, const void *s2, size_t n)
void qsort (void *base, size_t n_elements, size_t width, int(*compar)(const void *, const void *))
 Standard C library function.
void * bsearch (register const void *key, register const void *base, register size_t n_elements, register size_t size, int(*compar)(const void *, const void *))
 Standard C library function.

Variables

RNDFUNC rand_hook
SRNDFUNC srand_hook


Detailed Description

Standard library.

Definition in file hpstdlib.h.


Typedef Documentation

typedef long long LONGLONG

Definition at line 48 of file hpstdlib.h.

typedef unsigned(*) RNDFUNC(int)

Definition at line 58 of file hpstdlib.h.

typedef void(*) SRNDFUNC(unsigned)

Definition at line 59 of file hpstdlib.h.

typedef unsigned long long ULONGLONG

Definition at line 47 of file hpstdlib.h.


Function Documentation

int atexit ( void(*)(void)  __func  ) 

Standard C library function.

void * bsearch ( register const void *  key,
register const void *  base,
register size_t  n_elements,
register size_t  size,
int(*)(const void *, const void *)  compar 
)

Standard C library function.

void * calloc ( size_t  ,
size_t   
)

Standard C library function.

void exit ( int   ) 

Standard C library function.

void free ( void *   ) 

Standard C library function.

void * malloc ( size_t   ) 

Standard C library function.

int memcmp ( const void *  s1,
const void *  s2,
size_t  n 
)

unsigned mwc ( int  bits  ) 

32 bit multiply with carry pseudo RNG

Return values:
bits bit pseudo random number.
Very fast PRNG with extreme cycle length.
Warning:
Don't use for cryptography.

void qsort ( void *  base,
size_t  n_elements,
size_t  width,
int(*)(const void *, const void *)  compar 
)

Standard C library function.

unsigned rand ( void   ) 

wrapper for concrete PRNG implementation

Return values:
32 bit pseudo random number.
Warning:
Don't use for cryptography. Use srand() first!

unsigned int rand_bits ( int  bits  ) 

void * realloc ( void *  oldp,
size_t  size 
)

Standard C library function.

void srand ( unsigned int  seed  ) 

seeds the random sequence with seed. If seed == 0, use entropic seeding based on current time. In this case, the sequence should be nearly unreproduceable, given a sufficient long cycle length of the RNG, which is the case for mwc().

Parameters:
seed The seed value or 0 (zero) for a system time based value.
Warning:
Don't use for cryptography.


Variable Documentation

RNDFUNC rand_hook

SRNDFUNC srand_hook


Generated on Fri Feb 16 16:43:16 2007 for HP-GCCLibrary by  doxygen 1.5.0