Nut/OS  5.0.5
API Reference
Standard Lib

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:
numNumber of elements.
sizeSize of a single element.
Returns:
A pointer to the allocated space or a null pointer if not enough memory space is available.

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

Here is the call graph for this function:

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

Allocate space for an array.

Parameters:
numNumber of elements.
sizeSize of a single element.
Returns:
A pointer to the allocated space or a null pointer if not enough memory space is available.

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

Here is the call graph for this function:

int abs ( int  j)

Compute absolute value of an integer.

Parameters:
jThe integer value.
Returns:
The absolute value.
Examples:
caltime/caltime.c.
int atoi ( const char *  str)

Convert string to integer.

Parameters:
strPointer to the string.
Returns:
Converted value.
Examples:
tcps/tcps.c.

References NULL, and strtol().

Referenced by emulation_options_parse(), MmCardMount(), SpiMmcMount(), and StreamClientAccept().

Here is the call graph for this function:

long atol ( const char *  str)

Convert string to long integer.

Parameters:
strPointer to the string.
Returns:
Converted value.

References NULL, and strtol().

Referenced by HttpParseHeader(), and NutChatSend().

Here is the call graph for this function:

long labs ( long  j)

Get absolute value of a long integer.

Parameters:
jLong integer.
Returns:
Absolute value.
long strtol ( const char *  nptr,
char **  endptr,
int  base 
)

Convert a string to long integer.

Parameters:
nptrPoints to a character string to convert.
endptrIs a result parameter that, if not NULL, returns a string beginning with the first character not converted.
baseNumber base of the string.
Returns:
Converted value.

References ERANGE, errno, and LONG_MAX.

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

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

Convert a string to an unsigned long integer.

Parameters:
nptrPoints to a character string to convert.
endptrIs a result parameter that, if not NULL, returns a string beginning with the first character not converted.
baseNumber base of the string.
Returns:
Converted value.

References ERANGE, and errno.