From mboxrd@z Thu Jan 1 00:00:00 1970 From: w.f.j.mueller@retro11.de (Walter F.J. Mueller) Date: Sun, 8 Jan 2017 21:37:41 +0100 Subject: [TUHS] Unix stories, Stephen Bourne and IF-FI in C code Message-ID: <22ec379e-4985-2ab5-9fa5-f932fa4de653@retro11.de> There was thread 'Unix stories' were Stephen Bourne played role. Here another story about Stephen Bourne. He worked first on Algol 68, than joined the Unix team at Bell labs and wrote sh and adb. It's well known that the if-fi and case-esac notation from Algol came to shell syntax this way. Maybe less know is that Bourne tried as hard as he could to make the C code of sh and adb look like Algol, with the help of preprocessor macros. I stumbled across this when I looked into the 2.11BSD code base some time ago. Look at http://www.retro11.de/ouxr/211bsd/usr/src/bin/sh/main.c.html http://www.retro11.de/ouxr/211bsd/usr/src/bin/adb/main.c.html to enjoy C with an Algol-look. The definitions are in http://www.retro11.de/ouxr/211bsd/usr/src/bin/sh/mac.h.html http://www.retro11.de/ouxr/211bsd/usr/src/bin/adb/defs.h.html Cheers, Walter