csh bug fix

utzoo!decvax!ucbvax!menlo70!sytek!zehntel!billn utzoo!decvax!ucbvax!menlo70!sytek!zehntel!billn
Sun Nov 22 18:17:54 AEST 1981


A heinous bug has been found in the csh.  The routine syntax() expects
3 parameters and is only called with 2, when called non-recursively,
eg in sh.c.  The third parameter is a word of flags.  The fix is to
replace calls of syntax(p1, p2) with syntax(p1, p2, 0).  The bug was
found when I was trying to follow the directions in the distribution
about making a non-i/d csh (loaded -n).  Works fine, now.

Other hints for non-i/d csh:
1.  To reduce size, reduce size of most of the error messages, eg, replace
    "Ambiguous" with "Ambig.";  also there are several obscure things which
    can be commented out such as execl's of several versions of newgrp in
    sh.misc.c and the -q option in sh.c.
2.  DONT define BBGETPW in getpwent.c (if you want "~" to work), but DO use the
    provided get*.c.
3.  Default internal buffer size should be 512, not 1024, as the distributed
    makefile makes it.  A larger buffer size causes complicated parsings
    (source x; x has set y=~foo...) to run out of memory.  On the other
    hand the distributed termcap entry for televidios has a termcap >
    512 bytes (the buffer size is the size of a csh "word") which causes
    the shell to say "word too long" when doing a source of a tset v5 -s.
    But, its easy to write a termcap for televidios which is alot shorter,
    or you can trick csh in other ways.  We have hp's, falco's, and concepts,
    for intelligent terms, and those termcaps work fine.

/Bill Northlich



More information about the Comp.bugs.2bsd mailing list