mirror of
https://github.com/wnayes/macutils.git
synced 2025-02-05 14:36:35 +00:00
CRC modernisation
This commit is contained in:
parent
02673a9850
commit
f980b8a9a9
8
crc/.gitignore
vendored
Normal file
8
crc/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
arc.c
|
||||
binhex.c
|
||||
ccitt.c
|
||||
ccitt32.c
|
||||
kermit.c
|
||||
libcrc.a
|
||||
makecrc
|
||||
zip.c
|
@ -109,10 +109,7 @@ int poly, init, swapped, bits;
|
||||
}
|
||||
(void)fprintf(fd, "};\n");
|
||||
(void)fprintf(fd, "\n");
|
||||
(void)fprintf(fd, "unsigned long %s_updcrc(icrc, icp, icnt)\n", name);
|
||||
(void)fprintf(fd, " unsigned long icrc;\n");
|
||||
(void)fprintf(fd, " unsigned char *icp;\n");
|
||||
(void)fprintf(fd, " int icnt;\n");
|
||||
(void)fprintf(fd, "unsigned long %s_updcrc(unsigned long icrc, unsigned char *icp, int icnt)\n", name);
|
||||
(void)fprintf(fd, "{\n");
|
||||
if(bits == 16) {
|
||||
(void)fprintf(fd, "#define M1 0xff\n");
|
||||
|
@ -4,9 +4,9 @@ extern unsigned long arc_crcinit;
|
||||
extern unsigned long binhex_crcinit;
|
||||
extern unsigned long zip_crcinit;
|
||||
|
||||
extern unsigned long arc_updcrc();
|
||||
extern unsigned long binhex_updcrc();
|
||||
extern unsigned long zip_updcrc();
|
||||
extern unsigned long arc_updcrc(unsigned long icrc, unsigned char *icp, int icnt);
|
||||
extern unsigned long binhex_updcrc(unsigned long icrc, unsigned char *icp, int icnt);
|
||||
extern unsigned long zip_updcrc(unsigned long icrc, unsigned char *icp, int icnt);
|
||||
|
||||
extern unsigned long crcinit;
|
||||
extern unsigned long (*updcrc)();
|
||||
|
Loading…
x
Reference in New Issue
Block a user