Nut/OS  4.10.3
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.

Definition at line 100 of file calloc.c.

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

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.

Definition at line 64 of file calloc_dbg.c.

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

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.

Definition at line 90 of file abs.c.

int atoi ( CONST char *  str)

Convert string to integer.

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

Definition at line 92 of file atoi.c.

References strtol().

Referenced by MmCardMount(), and SpiMmcMount().

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.

Definition at line 92 of file atol.c.

References strtol().

Referenced by 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.

Definition at line 88 of file labs.c.

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.

Definition at line 99 of file strtol.c.

References CONST, ERANGE, errno, and LONG_MAX.

Referenced by _getf(), atoi(), atol(), 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.

Definition at line 99 of file strtoul.c.

References CONST, ERANGE, and errno.