Path: utzoo!utgpu!watmath!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: A self-referential challenge Message-ID: <6219@bsu-cs.UUCP> Date: 18 Mar 89 22:14:44 GMT Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 20 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. -- Rahul Dhesi UUCP: !{iuvax,pur-ee}!bsu-cs!dhesi ARPA: dhesi@bsu-cs.bsu.edu