From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29214 invoked from network); 19 Feb 2022 16:04:09 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 19 Feb 2022 16:04:09 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 65DAF9C719; Sun, 20 Feb 2022 02:04:06 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id E00149BA3E; Sun, 20 Feb 2022 02:03:19 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id F41A89BA3E; Sun, 20 Feb 2022 02:03:08 +1000 (AEST) Received: from minun.buric.co (minun.buric.co [51.15.8.196]) by minnie.tuhs.org (Postfix) with ESMTP id 73EC99BA32 for ; Sun, 20 Feb 2022 02:03:08 +1000 (AEST) Received: by minun.buric.co (Postfix, from userid 1000) id 76E4B35C0F68; Sat, 19 Feb 2022 11:03:05 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by minun.buric.co (Postfix) with ESMTP id 602C235C0D61 for ; Sat, 19 Feb 2022 11:03:05 -0500 (EST) Date: Sat, 19 Feb 2022 11:03:05 -0500 (EST) From: Steve Nickolas X-X-Sender: mary@sd-119843.dedibox.fr To: TUHS main list In-Reply-To: <69d88b37-5817-9a0d-4971-3d8641c2d153@gmail.com> Message-ID: References: <69d88b37-5817-9a0d-4971-3d8641c2d153@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: Re: [TUHS] v7 source code for sh X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" 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: > 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.