This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
magicka/deps/Xmodem/crctab.h
2017-03-18 14:37:16 +10:00

14 lines
302 B
C

/* @(#)crctab.h 1.2 96/09/13 */
/*
* Crc calculation stuff. See crctab.c
*/
extern unsigned short crctab[256] ;
#define updcrc(cp, crc) ( crctab[((crc >> 8) & 255)] ^ (crc << 8) ^ cp)
extern unsigned long cr3tab[] ;
#define UPDC32(b, c) (cr3tab[((int)c ^ b) & 0xff] ^ ((c >> 8) & 0x00FFFFFF))