/* * crc * Checks CRC values for resource files * * v. 1.00 (24 August 1991) * * © 1991-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Steel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __crc_h #define __crc_h /* * long crc(char *filename) * * Use * Calculates the CRC value for the file specified. Uses the same method * as WindowEd etc. * * Parameters * char *filename == the filename of the file to check (leaf only - it's * passed through res_findname()). Note that CRC-checking the * '!RunImage' file is rather silly. * * Returns * A 4-byte CRC value */ long crc(char *filename); /* * void crc_check(char *filename,long check) * * Use * Checks a CRC value for a file and reports a fatal error if the check * fails. * * Parameters * char *filename == the leafname of the file * long check == the CRC number to check with */ void crc_check(char *filename,long check); /* * void crc_checkRunImage(void) * * Use * Corruption-checks the main !RunImage file. It must have been passed * through CodeScr first, to install the CRC into the code. */ void crc_checkRunImage(void); #endif