Trouble Unpacking Small C (Dangling Else, etc.) checker
Dennis.Bednar
dennis at rlgvax.UUCP
Wed Feb 24 14:44:57 AEST 1988
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
More information about the Comp.sources.bugs
mailing list