Standard Lib
[C Runtime Library.]

C Standard Library. More...

Collaboration diagram for Standard Lib:

Functions

void * calloc (size_t num, size_t size)
 Allocate space for an array.
void * dbg_calloc (size_t num, size_t size, CONST char *file, int line)
 Allocate space for an array.
int abs (int j)
 Compute absolute value of an integer.
int atoi (CONST char *str)
 Convert string to integer.
long atol (CONST char *str)
 Convert string to long integer.
long labs (long j)
 Get absolute value of a long integer.
long strtol (CONST char *nptr, char **endptr, int base)
 Convert a string to long integer.
unsigned long strtoul (CONST char *nptr, char **endptr, int base)
 Convert a string to an unsigned long integer.

Detailed Description

C Standard Library.

Function Documentation

void* calloc ( size_t  num,
size_t  size 
)

Allocate space for an array.

Parameters:
num Number of elements.
size Size of a single element.
Returns:
A pointer to the allocated space or a null pointer if not enough memory space is available.

Definition at line 100 of file calloc.c.

References ENOMEM, errno, malloc, and memset().

void* dbg_calloc ( size_t  num,
size_t  size,
CONST char *  file,
int  line 
)

Allocate space for an array.

Parameters:
num Number of elements.
size Size of a single element.
Returns:
A pointer to the allocated space or a null pointer if not enough memory space is available.

Definition at line 64 of file calloc_dbg.c.

References dbg_malloc(), ENOMEM, errno, and memset().

int abs ( int  j  ) 

Compute absolute value of an integer.

Parameters:
j The integer value.
Returns:
The absolute value.
Examples:
caltime/caltime.c.

Definition at line 90 of file abs.c.

int atoi ( CONST char *  str  ) 

Convert string to integer.

Parameters:
str Pointer to the string.
Returns:
Converted value.

Definition at line 92 of file atoi.c.

References strtol().

Referenced by ConfigStation(), emulation_options_parse(), MmCardMount(), and ScanStreamHeader().

long atol ( CONST char *  str  ) 

Convert string to long integer.

Parameters:
str Pointer to the string.
Returns:
Converted value.

Definition at line 92 of file atol.c.

References strtol().

Referenced by NutChatSend(), NutHttpProcessRequest(), and ScanStreamHeader().

long labs ( long  j  ) 

Get absolute value of a long integer.

Parameters:
j Long integer.
Returns:
Absolute value.

Definition at line 88 of file labs.c.

long strtol ( CONST char *  nptr,
char **  endptr,
int  base 
)

Convert a string to long integer.

Parameters:
nptr Points to a character string to convert.
endptr Is a result parameter that, if not NULL, returns a string beginning with the first character not converted.
base Number base of the string.
Returns:
Converted value.

Definition at line 99 of file strtol.c.

References CONST, ERANGE, errno, and LONG_MAX.

Referenced by _getf(), atoi(), atol(), and NutHttpURLDecode().

unsigned long strtoul ( CONST char *  nptr,
char **  endptr,
int  base 
)

Convert a string to an unsigned long integer.

Parameters:
nptr Points to a character string to convert.
endptr Is a result parameter that, if not NULL, returns a string beginning with the first character not converted.
base Number base of the string.
Returns:
Converted value.

Definition at line 99 of file strtoul.c.

References CONST, ERANGE, and errno.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/