Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!oberon!oxy!bagpiper From: bagpiper@oxy.edu (Michael Paul Hunter) Newsgroups: comp.lang.c Subject: Re: A self-referential challenge Message-ID: <25341@tiger.oxy.edu> Date: 26 Mar 89 19:32:52 GMT References: <6219@bsu-cs.UUCP> <990@philmds.UUCP> Organization: Occidental College, Los Angeles, CA 90041 Lines: 24 In article <990@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes: >In article <6219@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >|I recently posted "brik", a general-purpose CRC-32 program, to >|comp.binaries.ibm.pc (includes portable C source) and was amused to >|consider the following problem. The command >| >| brik -G * > crc.lst >| >|generates a list of filenames and CRCs in crc.lst, which may be later checked >|with >| >| brik -C crc.lst >| >|This always reports a CRC error for "crc.lst" itself, since the CRC >|recorded for it was based on its contents before it was closed. What I >|would like to do is find a way of having brik generate a CRC list that >|includes the corect CRC of the file containing that list. I don't >|expect to find a simple solution, but it will be fun seeing people >|try. Quick, obvious fix/hack.... Put it on a different drive and brik it separately to the first drive.... :) m