Initial revision
[ssr] / StraySrc / Libraries / Steel / h / crc
1 /*
2 * crc
3 * Checks CRC values for resource files
4 *
5 * v. 1.00 (24 August 1991)
6 *
7 * © 1991-1998 Straylight
8 */
9
10 /*----- Licensing note ----------------------------------------------------*
11 *
12 * This file is part of Straylight's Steel library.
13 *
14 * Steel is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
17 * any later version.
18 *
19 * Steel is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with Steel. If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 */
28
29 #ifndef __crc_h
30 #define __crc_h
31
32 /*
33 * long crc(char *filename)
34 *
35 * Use
36 * Calculates the CRC value for the file specified. Uses the same method
37 * as WindowEd etc.
38 *
39 * Parameters
40 * char *filename == the filename of the file to check (leaf only - it's
41 * passed through res_findname()). Note that CRC-checking the
42 * '!RunImage' file is rather silly.
43 *
44 * Returns
45 * A 4-byte CRC value
46 */
47
48 long crc(char *filename);
49
50 /*
51 * void crc_check(char *filename,long check)
52 *
53 * Use
54 * Checks a CRC value for a file and reports a fatal error if the check
55 * fails.
56 *
57 * Parameters
58 * char *filename == the leafname of the file
59 * long check == the CRC number to check with
60 */
61
62 void crc_check(char *filename,long check);
63
64 /*
65 * void crc_checkRunImage(void)
66 *
67 * Use
68 * Corruption-checks the main !RunImage file. It must have been passed
69 * through CodeScr first, to install the CRC into the code.
70 */
71
72 void crc_checkRunImage(void);
73
74 #endif