K&R zsh anyone?

Greg A. Woods woods at eci386.uucp
Sat Dec 22 04:13:13 AEST 1990


In article <1578 at abekrd.UUCP> garyb at abekrd.UUCP (Gary Bartlett) writes:
> Does anyone have patches for zsh to enable it to compile with a K&R-C compiler,
> or know of a better Ansi-C -> K&R-C translator than ansi2knr (which can't
> hack it)?

I didn't think it could be done with a filter, which is why I spent a
few hours doing it by hand.  Of course while I was "fixing" the code,
I was also trying to port it to SysVr3.0.

The code conversion is done, and it compiles fine.  There are some
other lurking nasties beyond the parameter declarations, particularly
with type/variable identifier clashes.

As for running on a system without the bsd-4.2 signals (SysVr3 has
something closer to bsd-4.1 or bsd-4.3), and without the bsd
setpgrp(), the entire execpline() stuff needs re-design.  It should be
possible to provide background job monitoring for SysV without job
control, since ksh does so quite nicely, and come csh ports also
manage to work well enough.  It may even be possible to patch in some
shl support, though I won't be doing that, since I use a DMD both at
work and at home (and I have ksh at home anyway :-).

There are also some weird bugs that may, or may not, have something to
do with my changes:  aliases, command substitution (`cmd`), some csh
history stuff, and some readline stuff; all don't work properly.

There are also some annoying bugs in the shell itself, such as no
Bourne shell compatible trap command, incompatibility with the ksh set
command (i.e. set -o), it's impossible to turn off job control in an
interactive shell, and so on.

All in all, I think the guts of this shell are reasonably good.  The
manual is excellent.  On a quick comparison, I'd rate it well above
bash, though I've never looked at the guts of bash, only the bug
reports!  :-)

Anyway, I'm not about to release my version (patches are impossibly
large) without first discussing plans with the author, and certainly
not before I either get a chance to try it on a bsd box, or fix it
properly for SysV.
-- 
							Greg A. Woods
woods@{eci386,gate,robohack,ontmoh,tmsoft}.UUCP		ECI and UniForum Canada
+1-416-443-1734 [h]  +1-416-595-5425 [w]  VE3TCP	Toronto, Ontario CANADA
Political speech and writing are largely the defense of the indefensible-ORWELL



More information about the Alt.sources.d mailing list