[TUHS] v7 source code for sh
Steve Nickolas
usotsuki at buric.co
Sun Feb 20 02:03:05 AEST 2022
On Sat, 19 Feb 2022, Will Senn wrote:
> I have been poring through the v7 source code lately, and came across an
> oddity I would like to know more about. Specifically, in sh. The code for sh
> is c, but it makes *extensive* use of of macros, for example:
<snip>
> I can read the resultant code through the lens of my experience coding c, but
> I'm curious why the macros and how this came about? In v6, the sh source is
> straight up c. Is there a story behind it worth knowing?
Apparently Bourne was heavily into ALGOL, and used those macros to make C
into something more familiar.
At least, that's what I concluded by reading her Wikipedia page as well as
the code.
-uso.
More information about the TUHS
mailing list