include/stdlib.h File Reference

#include "malloc.h"

Include dependency graph for stdlib.h:

Go to the source code of this file.

Defines

#define _ABLE_CLIB_STDLIB_H   1
#define NULL   ((void *)0)
 The null pointer.
#define RAND_MAX   32767
 The maximum value returned by rand.
#define MB_CUR_MAX   1
 Integer expression whose value is the maximum number of bytes in a character specified by the current locale.
#define EXIT_FAILURE   1
 Failing exit status.
#define EXIT_SUCCESS   0
 Successful exit status.

Functions

long strtol (const char *cp, char **endp, int base)
 Convert a string to a long signed integer.
unsigned long strtoul (const char *cp, char **endp, int base)
 Convert a string to a long unsigned integer.
double strtod (const char *nptr, char **endptr)
 Convert a string to a double precision floating point number.
char * __dtoa (double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
void __freedtoa (char *s)
float strtof (const char *nptr, char **endptr)
 Convert a string to a single precision floating point number.
long double strtold (const char *nptr, char **endptr)
 Convert a string to a long double precision floating point number.
char * getenv (const char *name)
 Read an environment variable.
int system (const char *string)
 Execute a shell command.
int rand (void)
 Generate a pseudo random number between 0 and RAND_MAX.
void srand (unsigned int seed)
 Set the seed for the rand pseudo random number generator.
int rand_r (unsigned int *seed)
 Generate a pseudo random number between 0 and RAND_MAX.
long int random (void)
void srandom (unsigned int seed)
char * initstate (unsigned int seed, char *state, size_t n)
 Initialise random gernerator.
char * setstate (char *state)
void exit (int status)
 Exit a running process.
void _Exit (int status)
 Exit a running process without atexit processing.
void abort (void)
 Cause an abnormal process termination.
int atexit (void(*function)(void))
 Registers a function to be called at process exit.
int atoi (const char *)
 Convert a string to an integer.
long atol (const char *)
 Convert a string to a long integer.
long long atoll (const char *nptr)
 Convert a string to a long long integer.
long long atoq (const char *nptr)
 Convert a string to a long long integer.
double atof (const char *nptr)
 Convert a string to a flaoting point number.
void qsort (void *base, size_t nmemb, size_t size, int(*cmp)(const void *a, const void *b))
 Sort an array.
void * bsearch (const void *key, const void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *))
 Binary search a sorted array.
int abs (int j)
 Calculate the absolute value of an integer.
long labs (long j)
 Calculate the absolute value of a long integer.
long long llabs (long long j)
 Calculate the absolute value of a long long integer.


Define Documentation

#define _ABLE_CLIB_STDLIB_H   1

#define EXIT_FAILURE   1

Failing exit status.

#define EXIT_SUCCESS   0

Successful exit status.

#define MB_CUR_MAX   1

Integer expression whose value is the maximum number of bytes in a character specified by the current locale.

#define NULL   ((void *)0)

The null pointer.

#define RAND_MAX   32767

The maximum value returned by rand.


Function Documentation

char* __dtoa ( double  d,
int  mode,
int  ndigits,
int *  decpt,
int *  sign,
char **  rve 
)

void __freedtoa ( char *  s  ) 

void _Exit ( int  status  ) 

Exit a running process without atexit processing.

void abort ( void   ) 

Cause an abnormal process termination.

int abs ( int  j  ) 

Calculate the absolute value of an integer.

int atexit ( void(*)(void)  function  ) 

Registers a function to be called at process exit.

double atof ( const char *  nptr  ) 

Convert a string to a flaoting point number.

int atoi ( const char *   ) 

Convert a string to an integer.

Equivalent to strtol(nptr, (char **) NULL, 10);

long atol ( const char *   ) 

Convert a string to a long integer.

long long atoll ( const char *  nptr  ) 

Convert a string to a long long integer.

long long atoq ( const char *  nptr  ) 

Convert a string to a long long integer.

Deprecated:
Use atoll instead of this old name.

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

Binary search a sorted array.

void exit ( int  status  ) 

Exit a running process.

char* getenv ( const char *  name  ) 

Read an environment variable.

char* initstate ( unsigned int  seed,
char *  state,
size_t  n 
)

Initialise random gernerator.

Parameters:
seed The seed to initialise random number generator to.
state The state information.
n The size of the state information.

long labs ( long  j  ) 

Calculate the absolute value of a long integer.

long long llabs ( long long  j  ) 

Calculate the absolute value of a long long integer.

void qsort ( void *  base,
size_t  nmemb,
size_t  size,
int(*)(const void *a, const void *b)  cmp 
)

Sort an array.

int rand ( void   ) 

Generate a pseudo random number between 0 and RAND_MAX.

Generates a pseudo random number using the POSIX defined algorithm. The generated sequence will be the same provided the srand function has been used to seed the internal seed value. This function is not thread safe as an internal seed value is used.

A pseudo random number.

int rand_r ( unsigned int *  seed  ) 

Generate a pseudo random number between 0 and RAND_MAX.

Thread safe version of rand to which the current seed value is passed.

Parameters:
seed The seed value to use which is updated on return.

long int random ( void   ) 

char* setstate ( char *  state  ) 

void srand ( unsigned int  seed  ) 

Set the seed for the rand pseudo random number generator.

Parameters:
The value to use to seed the gernerator.

void srandom ( unsigned int  seed  ) 

double strtod ( const char *  nptr,
char **  endptr 
)

Convert a string to a double precision floating point number.

float strtof ( const char *  nptr,
char **  endptr 
)

Convert a string to a single precision floating point number.

long strtol ( const char *  cp,
char **  endp,
int  base 
)

Convert a string to a long signed integer.

long double strtold ( const char *  nptr,
char **  endptr 
)

Convert a string to a long double precision floating point number.

unsigned long strtoul ( const char *  cp,
char **  endp,
int  base 
)

Convert a string to a long unsigned integer.

int system ( const char *  string  ) 

Execute a shell command.


Generated on Tue Jan 20 14:28:58 2009 for ABLE LIBC by  doxygen 1.5.6