Datasheet
API in C
234
}
// now look @ the second car in the 16^0 place
if (cToConvert[1] == 'f' || cToConvert[1] == 'F')
{
iAccumulated += 15;
}
else if (cToConvert[1] == 'e' || cToConvert[1] == 'E')
{
iAccumulated += 14;
}
else if (cToConvert[1] == 'd' || cToConvert[1] == 'D')
{
iAccumulated += 13;
}
else if (cToConvert[1] == 'c' || cToConvert[1] == 'C')
{
iAccumulated += 12;
}
else if (cToConvert[1] == 'b' || cToConvert[1] == 'B')
{
iAccumulated += 11;
}
else if (cToConvert[1] == 'a' || cToConvert[1] == 'A')
{
iAccumulated += 10;
}
else
{
iAccumulated += atoi(cString1);
}
DEBUG ? printf("%d\n", iAccumulated) : 0;
return (char)iAccumulated;
}
/********************************************************************
* Test whether or not this system is little endian at RUNTIME
* Courtesy: http://download.osgeo.org/grass/grass6_progman/endian_8c_source.html
********************************************************************/
int isLittleEndian(void)
{
union










