5747675 [rkeene@sledge /home/rkeene/devel/libopennet-0.8.1]$ cat -n crc.c
 1 #include "conf.h"
 2 #include "crc.h"
 3 
 4 uint32_t ELFCRC(const uint32_t start, const unsigned char *name, const uint32_t n) {
 5     uint32_t i,h,g;
 6 
 7     h=start;
 8     for (i=0;i<n;i++) {
 9         h = (h << 4) + (*name++);
10         if ((g = (h & 0xf0000000)))
11             h ^= (g >> 24);
12         h &= ~g;
13     }
14 
15     return(h);
16 }
5747676 [rkeene@sledge /home/rkeene/devel/libopennet-0.8.1]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2001-08-24 11:36:58