Main Page | Class List | Directories | File List | Class Members | File Members

cpp_conv.h File Reference

CKPM C pre-processor convert routines definitions. More...

#include <sys/types.h>

Functions

char * int_to_str (char *buf, size_t len, int base, int n)
 convert an integer value to its string representation
int dec_string_to_int (char *s)
 a decimal number given as a string to its corresponding integer value
int oct_string_to_int (char *s)
 a octal number given as a string to its corresponding integer value
int hex_string_to_int (char *s)
 a hexa decimal number given as a string to its corresponding integer value


Detailed Description

CKPM C pre-processor convert routines definitions.


Function Documentation

int dec_string_to_int char *  s  ) 
 

a decimal number given as a string to its corresponding integer value

Parameters:
s the decimal number string
Returns:
the calculated integer value

int hex_string_to_int char *  s  ) 
 

a hexa decimal number given as a string to its corresponding integer value

Parameters:
s the hexa decimal number string
Returns:
the calculated integer value

char* int_to_str char *  buf,
size_t  len,
int  base,
int  n
 

convert an integer value to its string representation

Parameters:
buf a character buffer to work with
len the length of the character buffer
base the conversion base, e.g. 2,8,10,16
n the integer value to be converted
Returns:
the character buffer if successful, otherwise null

int oct_string_to_int char *  s  ) 
 

a octal number given as a string to its corresponding integer value

Parameters:
s the octal number string
Returns:
the calculated integer value


Generated on Thu Jul 13 03:56:36 2006 for CKPMcc by  doxygen 1.4.4