Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

General Purpose Utility Functions


Functions

char * ultoa (unsigned long val, char *endp, int base, int mode,...)
int malloc_check (void)
void malloc_dump (void)

Function Documentation

int malloc_check void   
 

Check malloc list This operation is intended to help debug memory allocation problems with malloc and free. It verifies the consistency of internal data structures used by malloc and ensures that nothing is corrupted.

Returns:
0 if there is no memory allocation problem

void malloc_dump void   
 

Dump memory allocation list Dump the memory allocation lists to the standard output. The free list as well as allocated malloc blocks are printed.

char* ultoa unsigned long    val,
char *    endp,
int    base,
int    mode,
...   
 

Convert an unsigned long to a string. Convert an unsigned long to ASCII for printf purposes, returning a pointer to the first character of the string representation. Octal numbers can be forced to have a leading zero; hex numbers can be printed in upper or lower case. The mode controls various mode for the conversion:

ULTOA_OCT_ZERO
When set, a leading 0 is added for non-zero values for the octal conversions.

ULTOA_UPPER
When set, upper characters are used (hexadecimal conversions)

ULTOA_GROUP
The decimal conversion is made using groups of digits. The function takes two additional parameters:

char thousep An additional character specifies the group separator. const char* grp Specifies the groups in terms of digits.

A

Parameters:
val  Value to translate into a string
endp  Pointer to end of buffer
base  Base number for conversion (8, 10 or 16)
mode  Control modes
thousep  Optional character for thousand separator
grp  Group string control
Returns:
the beginning of the string representation