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/Xmodem/crctab.h

14 lines
302 B
C
Raw Normal View History

2016-04-02 23:26:17 +00:00
/* @(#)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))