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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2038 invoked from network); 5 Jan 2022 19:02:52 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 5 Jan 2022 19:02:52 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 6CBE99C6FF; Thu, 6 Jan 2022 05:02:50 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 7172F9C6E5; Thu, 6 Jan 2022 05:02:28 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bsdimp-com.20210112.gappssmtp.com header.i=@bsdimp-com.20210112.gappssmtp.com header.b="IVOxs2oc"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id F16789C6E5; Thu, 6 Jan 2022 05:02:23 +1000 (AEST) Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) by minnie.tuhs.org (Postfix) with ESMTPS id D726694A6B for ; Thu, 6 Jan 2022 05:02:22 +1000 (AEST) Received: by mail-ua1-f45.google.com with SMTP id o20so203955uat.2 for ; Wed, 05 Jan 2022 11:02:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=32pIJd+PSmtcpvKoX6OqsW3j6j2eJrMznOzBsRmYne4=; b=IVOxs2ocH0hmNpHyHiUBw50w/Pse27CuKVearifyHzb00VHIYsHhREeJYUWUx7/3Fj n8rnVHkXXJeWlpi8zhRL8eHhtuBKU4zbFsw8sWNEJdXHEPp5A8lHZ3S9GJzZF6p6TnrF TBGQIbGbPUZhM6DX3aZbpLYru/KpMulXBy9rxU4kQXpDFaR8Xk1TwlZDJxmkCfofmxgg YL6bQGkMnB3Aeb007OCkW2JC+Fl7ZGJqCsRGd436Fu0srbqaOBO7L8+Pe76Ebz3999jG 2PraUvpy2n0XC1Mjf6+a/IBlIKIv9MjGGCwja53yv5KkdeC8lgvfg/CDVnvwwBP3LFAt Wi9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=32pIJd+PSmtcpvKoX6OqsW3j6j2eJrMznOzBsRmYne4=; b=MpDW6UKtpvar3P2kvSNSYdN3ylJgBJJPXRK/jIBD2iiT1oNNa7XMbfn/D5FGoVpi/y QBhG7ebt8/JlK1g+i9H2Y3IoV/tUH7fdst83B3KH7xc/dOkJC4/lAWmce8+dVs7E+qvN rxK+uA/2hhRhYN9V0dRWUl1v2lzmiR0c4yFmHJT2pekMPSH1AgBh8Xt7SFlmisk/At/1 W3p+CoRtf9zacIX/ep5SUA2dm65vrDU0PUh/ACTIm/0+QPVRSp3hZH3OlzZJYrBLT+OX WpMZNO3mak3ZESVyLZA5OJTimORS9g6TcTrvU0KlnfkE+wy4aBJcnWB4NuIM0V8eQcut Y2Gw== X-Gm-Message-State: AOAM531/vszGAmEpZT050L7li3ILXdw8I+pdI+4lyXB+3pRgJylHE7xL Mw+VNWpt/l+Itu6xk+4t/GBMmqdHL5kMKexCsJyp7Q== X-Google-Smtp-Source: ABdhPJwntdtIP9GRwnsIiq/G1qopdHDEjVETyOM0MTbR19piQaKpVC4F6gxwS42JKR0mWbkEJh65OYzokPsL6YmXrFY= X-Received: by 2002:a05:6102:da:: with SMTP id u26mr17660842vsp.42.1641409340965; Wed, 05 Jan 2022 11:02:20 -0800 (PST) MIME-Version: 1.0 References: <102db625-b2a0-935b-7424-a183ae64fb65@gmail.com> <202201051734.205HYqeq042817@ultimate.com> In-Reply-To: From: Warner Losh Date: Wed, 5 Jan 2022 12:02:09 -0700 Message-ID: To: Will Senn Content-Type: multipart/alternative; boundary="000000000000b31a8005d4da64a4" Subject: Re: [TUHS] vi 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 Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000b31a8005d4da64a4 Content-Type: text/plain; charset="UTF-8" On Wed, Jan 5, 2022 at 11:23 AM Will Senn wrote: > On 1/5/22 11:34 AM, Phil Budne wrote: > > Will Senn wrote: > > so then I tryed vt50 and vt52 modes... > > xterm should have VT52 emulation, at least the man page on my system says: > > o VT52 emulation is complete. > > But looking at CTRL+{LEFT,MIDDLE,RIGHT}_CLICK menus didn't show a toggle. > > The VT100 sequence to enter VT52 mode seems to be [?2l > you should be able to send it with echo. > > Then HJ should clear the screen. > > NOTE! The ANSI command prefix [ will put a real VT52 into "hold > screen" mode where you need to press some (scroll?) button to allow > new lines to be added at the bottom of the screen. Ask me how I know! > > phil > > Well, is there no end to fascination... That 'worked' in that I was able > to do this in n xterm on my mac: > > printf "\033[?2l" > > > which changed the size of the xterm window to 80 chars wide... then: > > printf "\033H\033J" > > > which cleared the screen as you said it would. > > But, then, I telnet'd into the the v7 instance and set TERM=vt52, etc. > > Now vi gives this: > > Y7 HJY- ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~ > ~Y, > > > However, I should note that v7 doesn't seem to process escape sequences, > either with a pristine instance or my fully configured instance... > > echo '\033' > \033 > > This is why I suggested using printf direct in C :) $ ed test > ?test > a > J (just echoes the J) > . > w > 3 > q > $ od -c test > 0000000 033 J \n \0 > 0000003 > > There's escape problems :(. I'll see if I can spin up a V7 box and see if I have any suggestions. Warner --000000000000b31a8005d4da64a4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jan 5, 2022 at 11:23 AM Will = Senn <will.senn@gmail.com>= wrote:
=20 =20 =20
On 1/5/22 11:34 AM, Phil Budne wrote:
Will Senn wrote:
so then I tryed vt50 and vt52 modes...
xterm should have VT52 emulation, at least the man page on my sy=
stem says:
       o   VT52 emulation is complete.
But looking at CTRL+{LEFT,MIDDLE,RIGHT}_CLICK menus didn't s=
how a toggle.

The VT100 sequence to enter VT52 mode seems to be <ESC>[?2l
you should be able to send it with echo.

Then <ESC>H<ESC>J should clear the screen.

NOTE! The ANSI command prefix <ESC>[ will put a real VT52 into "=
hold
screen" mode where you need to press some (scroll?) button to allow
new lines to be added at the bottom of the screen.  Ask me how I know!

phil
Well, is there no end to fascination... That 'worked' in that I was able to do this in= n xterm on my mac:
printf "\033[?2l"=

which changed the size of the xterm window to 80 chars wide... then:
printf "\033H\033J"

which cleared the screen as you said it would.

But, then, I telnet'd into the the v7 instance and set TERM=3Dvt5= 2, etc.

Now vi gives this:
Y7 HJY- ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~Y,


However, I should note that v7 doesn't seem to process escape sequences, either with a pristine instance or my fully configured instance...
echo '\033'
\033

This is why I sugge= sted using printf direct in C :)

$ ed = test
?test
a
<ESC>J (just echoes the J)
.
w
3
q
$ od -c test
0000000 033=C2=A0=C2=A0 J=C2=A0 \n=C2=A0 \0
0000003
There's esca= pe problems :(.=C2=A0 I'll see if I can spin up a V7 box and see if I h= ave any suggestions.

Warner=C2=A0
<= /div> --000000000000b31a8005d4da64a4--