Subversion Repositories SvarDOS

Rev

Rev 1959 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1959 Rev 1975
Line 111... Line 111...
111
      0x2d02ef8dL
111
      0x2d02ef8dL
112
   };
112
   };
113
 
113
 
114
/* Return a 32-bit CRC of the contents of the buffer. */
114
/* Return a 32-bit CRC of the contents of the buffer. */
115
 
115
 
116
 
-
 
117
unsigned long crc32_init(void) {
-
 
118
  return(CRC32_INITVAL);
-
 
119
}
-
 
120
 
-
 
121
void crc32_feed(unsigned long *crc32val, const unsigned char *s, unsigned int len) {
116
void crc32_feed(unsigned long *crc32val, const unsigned char *s, unsigned int len) {
122
  unsigned int i;
117
  unsigned int i;
123
  for (i = 0; i < len; i++) *crc32val = crc32_tab[(*crc32val ^ s[i]) & 0xff] ^ (*crc32val >> 8);
118
  for (i = 0; i < len; i++) *crc32val = crc32_tab[(*crc32val ^ s[i]) & 0xff] ^ (*crc32val >> 8);
124
}
119
}
125
 
120