Datasheet

API in C using winsock
76
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
{
int testWord;
char testByte[sizeof(int)];
} endianTest;
endianTest.testWord = 1;
if (endianTest.testByte[0] == 1)
return 1; /* true: little endian */
return 0; /* false: big endian */
}
References
[1] http:/ / wiki. mikrotik. com/ wiki/ API_in_C