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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4069 invoked from network); 25 Jul 2020 14:41:18 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 25 Jul 2020 14:41:18 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id B45A69CA05; Sun, 26 Jul 2020 00:41:15 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 559C29C8B1; Sun, 26 Jul 2020 00:40:18 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ccc.com header.i=@ccc.com header.b="YXq0k+FF"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 0B0749BA4F; Sun, 26 Jul 2020 00:40:16 +1000 (AEST) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by minnie.tuhs.org (Postfix) with ESMTPS id E96909C8B1 for ; Sun, 26 Jul 2020 00:40:14 +1000 (AEST) Received: by mail-qv1-f45.google.com with SMTP id di5so5442052qvb.11 for ; Sat, 25 Jul 2020 07:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WJ67998IGFTfWEpVPxrOITABRm1zf8l5gcEv3Vy/FA4=; b=YXq0k+FFGqIP83Ka4qvqduH8i7xgEP/l8PbiKN2qvwEdWHP9xJ6NSpY/Tyw9IbWR1t sZuhb2AAuLVQoBUc8uwe+stGXRI75cllDgRibKXLxrjAccNxQInc+doH4cCTnKmRSQdi mp4cV8pTjMcyLObhQxqAcy9kw8PWLMBFVeaNI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WJ67998IGFTfWEpVPxrOITABRm1zf8l5gcEv3Vy/FA4=; b=hpmuEvIGLhGLg+hlxblX6bhZBLyQxKdslpL9aDkts5JsIiKRUSYQ50L245+hmdR+yh VgIdRBR4URYWGQuNdq8ZMBJFg/z3ldP50M+TD/4eHZMxa/D0gjFDC7LwYDTUifKpqe3u xplU25DzmR/TCHQ99piNDhfCi+fwrJfvAnuw2GhrbvjIAYhtkRrsL+GS7/JxC8dG+Q63 iJKG1l8IysuKW+sdjiv/H/+Rjw7YNCX5o5S5e4Hk82OSh5E4N3Y3mWYREvRd4wiJbT1I qG90RmLanOIH04LCx0s/EQeTbG9t//14nfXgAX0/lWsFVT5XGStE1hVKG9/Vu45gXnfn XJ2w== X-Gm-Message-State: AOAM530SOIDSvgZ919RvUeKt5k8GPoOD5a2DUC94nD96vqqxB8tJwa2f POrSxLCDrgBUKh/lItOHzfB0CkTyLIfAnm3vPTsnYBTb X-Google-Smtp-Source: ABdhPJyQXLleiczHCwF72kibX0WHbke+ZCP6gZ/ZsPNUtf25GUSUhcBVd+OXE10pIe5qE5MbY8Mi3Jo5EL5xo6EAznM= X-Received: by 2002:a0c:e8c9:: with SMTP id m9mr6616982qvo.178.1595688013949; Sat, 25 Jul 2020 07:40:13 -0700 (PDT) MIME-Version: 1.0 References: <878sf7adz3.fsf@vuxu.org> In-Reply-To: From: Clem Cole Date: Sat, 25 Jul 2020 10:39:48 -0400 Message-ID: To: Will Senn Content-Type: multipart/alternative; boundary="0000000000003e84eb05ab451191" Subject: Re: [TUHS] Diff and Patch on v7 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: , Cc: TUHS main list , Leah Neukirchen Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --0000000000003e84eb05ab451191 Content-Type: text/plain; charset="UTF-8" Will that is the output that would have go into patch(1). As Leah says, the old days we used diff -e to create the patch and then ed file wrote: > On 7/25/20 9:03 AM, Leah Neukirchen wrote: > > Will Senn writes: > > > >> I got a diff for adding actual backspace and delete to v7, linked off > >> of gunkies... Anyhow, I can manually edit the referenced files and > >> rebuild, but I would rather do it canonically. I don't see patch > >> anywhere, so did v7 users use diffs to patch source and if so what's > >> the magic? > > patch(1) was written by Larry Wall in 1985, and released over Usenet. > > > > v7 users likely used diff -e, and piped to ed to apply it. > > > That makes sense. So, if that's how it went then I'm wondering if my > diff is meant to run against source on the host and the results placed > into v7, rather than run in v7. Does this look like a modern diff vs the > old stuff?: > > --- usr/src/cmd/getty.c 1979-05-05 08:19:21.000000000 +0100 > +++ usr.fix/src/cmd/getty.c 2018-01-09 11:07:37.157953044 +0100 > @@ -5,11 +5,11 @@ > > #include > #include > -#define ERASE '#' > -#define KILL '@' > +#define ERASE '\177' > +#define KILL '\025' > > struct sgttyb tmode; > -struct tchars tchars = { '\177', '\034', '\021', '\023', '\004', '\377' }; > +struct tchars tchars = { '\003', '\034', '\021', '\023', '\004', '\377' }; > > struct tab { > char tname; /* this table name */ > > > Will > > -- > GPG Fingerprint: 68F4 B3BD 1730 555A 4462 7D45 3EAA 5B6D A982 BAAF > > --0000000000003e84eb05ab451191 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Will that is the output that would have go into patch(1).=C2=A0 As Leah says, the old days we use= d diff -e to create the=C2=A0patch and= then ed file <diff_ou= tput
That said, when Larry wrote patch, V7 was still very mu= ch alive and kicking and Larry had come from that world/his code would be l= ikely to be fairly clean of vax-isms.=C2=A0 I bet if you can find a version= that will compile and run on V7.=C2=A0 =C2=A0V6 is likely to be more diffi= cult since the language changes for stdio.=C2=A0 But patch(1) is small and = simple so I bet even that would be pretty straight forward.


On Sat, Jul 25, 2020 at 10:29 AM Will Senn <will.senn@gmail.com> wrote:
On 7/25/20 9:03 AM, Leah Neukirchen wrote:=
> Will Senn <will.senn@gmail.com> writes:
>
>> I got a diff for adding actual backspace and delete to v7, linked = off
>> of gunkies... Anyhow, I can manually edit the referenced files and=
>> rebuild, but I would rather do it canonically. I don't see pat= ch
>> anywhere, so did v7 users use diffs to patch source and if so what= 's
>> the magic?
> patch(1) was written by Larry Wall in 1985, and released over Usenet.<= br> >
> v7 users likely used diff -e, and piped to ed to apply it.
>
That makes sense. So, if that's how it went then I'm wondering if m= y
diff is meant to run against source on the host and the results placed
into v7, rather than run in v7. Does this look like a modern diff vs the old stuff?:

--- usr/src/cmd/getty.c=C2=A0=C2=A0=C2=A0 1979-05-05 08:19:21.000000000 +01= 00
+++ usr.fix/src/cmd/getty.c=C2=A0=C2=A0=C2=A0 2018-01-09 11:07:37.157953044= +0100
@@ -5,11 +5,11 @@

=C2=A0=C2=A0#include <sgtty.h>
=C2=A0=C2=A0#include <signal.h>
-#define ERASE=C2=A0=C2=A0=C2=A0 '#'
-#define KILL=C2=A0=C2=A0=C2=A0 '@'
+#define ERASE=C2=A0=C2=A0=C2=A0 '\177'
+#define KILL=C2=A0=C2=A0=C2=A0 '\025'

=C2=A0=C2=A0struct sgttyb tmode;
-struct tchars tchars =3D { '\177', '\034', '\021',= '\023', '\004', '\377' };
+struct tchars tchars =3D { '\003', '\034', '\021',= '\023', '\004', '\377' };

=C2=A0=C2=A0struct=C2=A0=C2=A0=C2=A0 tab {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 char=C2=A0=C2=A0=C2=A0 tname;=C2=A0=C2=A0=C2= =A0 =C2=A0=C2=A0=C2=A0 /* this table name */


Will

--
GPG Fingerprint: 68F4 B3BD 1730 555A 4462=C2=A0 7D45 3EAA 5B6D A982 BAAF
--0000000000003e84eb05ab451191--