4 * Calculates 32-bit CRCs (Cyclic Redundancy Checks)
6 * © 1993-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Dynamic Linking System (SDLS)
13 * SDLS is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * SDLS is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with SDLS. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 * long crc32(long seed,void *data,size_t size,int diff)
39 * Calculates the CRC for a block of data. The system has been designed to
40 * allow a CRC calculation to be carried out in stages, the result of
41 * previous calculations being used for continuation.
44 * long seed == 0 to start a calculation, or the result from the previous
46 * void *data == pointer to the data to check
47 * size_t size == size (in bytes) of the data (just this block)
48 * int diff == the address difference between bytes to check (normally one,
52 * The CRC for all the data checked so far.
55 long crc32(long seed,void *data,size_t size,int diff);