Embedded Xinu Network Playground COSC3300Fall2012
Standard C Library

Provides a subset of the standard C library for Xinu. More...

Functions

int abs (int)
int atoi (char *)
long atol (char *)
void bzero (void *, int)
ulong rand (void)
void srand (unsigned long)

Detailed Description

Provides a subset of the standard C library for Xinu.


Function Documentation

int abs ( int  arg)

Calculates the absolute value of a number.

Parameters:
argnumber to get absolute value of
Returns:
absolute value of arg
int atoi ( char *  p)

Converts an ascii value to an integer.

Parameters:
*ppointer to ascii string
Returns:
integer
long atol ( char *  p)

Converts an ascii value to a long.

Parameters:
*ppointer to ascii string
Returns:
long
void bzero ( void *  p,
int  len 
)

Clears a block of characters to 0s.

Parameters:
*ppointer to start of block
lenlength of the block
ulong rand ( void  )

Generates a random long.

Returns:
random long
void srand ( unsigned long  x)

Sets the random seed.

Parameters:
xrandom seed