Path: utzoo!mnetor!uunet!rlgvax!dennis From: dennis@rlgvax.UUCP (Dennis.Bednar) Newsgroups: comp.sources.bugs Subject: Trouble Unpacking Small C (Dangling Else, etc.) checker Message-ID: <876@rlgvax.UUCP> Date: 24 Feb 88 04:44:57 GMT Organization: Computer Consoles Inc, Reston VA Lines: 21 I was unable to unpack the sources supplied with the "small C syntax checker program". I tracked down the problem. The "if" tests (search for "wc" with your favorite editor), that have, for example: if [ "`wc -c <'Makefile'`" != ' 1426' ] should be replaced by if [ "`wc -c <'Makefile'`" -ne ' 1426' ] The problem is that our "wc" program didn't return a number with 4 leading spaces. Ours returned " 1426 ", instead, causing the != test to fail, with the message "Unpack for Makefile failed!". Using -ne instead of != is an arithmetic test instead of a string compare test, and fixed the unpack problem. -- FullName: Dennis Bednar UUCP: {uunet|sundc}!rlgvax!dennis USMail: CCI; 11490 Commerce Park Dr.; Reston VA 22091 Telephone: +1 703 648 3300