40 if (crcContext==
NULL) {
47 #ifdef ORIGINAL_METHOD
48 for (i = 0; i < 256; ++
i) {
49 for (c = i << 24, j = 8; j > 0; --
j) {
50 c = c & 0x80000000 ? (c << 1) ^
CRC32_POLY : (c << 1);
55 for (i=0; i<256; i++) {
96 if (crcContext==
NULL) {
114 if (crcContext==
NULL) {
122 *crc32 = (~(*crc32));
134 if (crcContext==
NULL) {
147 for (p = inBuf; inLen > 0; ++
p, --inLen) {
148 #ifdef ORIGINAL_METHOD
149 crc = (crc << 8) ^ crcContext->
crc32_table[(crc >> 24) ^ *
p];
151 crc = ((crc >> 8) & 0x00FFFFFF) ^ crcContext->
crc32_table[ (crc ^ *
p) & 0xFF ];
161 if (crcContext==
NULL) {
int SDLTest_Crc32Init(SDLTest_Crc32Context *crcContext)
Initialize the CRC context.
CrcUint32 crc32_table[256]
int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context *crcContext, CrcUint32 *crc32)
int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context *crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
int SDLTest_Crc32Done(SDLTest_Crc32Context *crcContext)
clean up CRC context
int SDLTest_Crc32CalcStart(SDLTest_Crc32Context *crcContext, CrcUint32 *crc32)