Changeset 17 for abuse/trunk/src/crc.cpp
- Timestamp:
- Nov 10, 2005, 9:41:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/crc.cpp
r2 r17 1 1 #include "crc.hpp" 2 2 3 u nsigned short calc_crc(unsigned char *buf, longlen)3 uint16_t calc_crc(uint8_t *buf, int len) 4 4 { 5 u nsigned charc1=0,c2=0;5 uint8_t c1=0,c2=0; 6 6 while (len) 7 7 { … … 16 16 17 17 18 u longcrc_file(bFILE *fp)18 uint32_t crc_file(bFILE *fp) 19 19 { 20 u charcrc1=0,crc2=0,crc3=0,crc4=0;20 uint8_t crc1=0,crc2=0,crc3=0,crc4=0; 21 21 22 22 int size=0x1000; 23 u char *buffer=(uchar*)jmalloc(size,"crc_buffer"),*c;23 uint8_t *buffer=(uint8_t *)jmalloc(size,"crc_buffer"),*c; 24 24 long l=fp->file_size(); 25 25 long cur_pos=fp->tell();
Note: See TracChangeset
for help on using the changeset viewer.