From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id ed205f6b for ; Sat, 28 Dec 2019 01:57:07 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 4397A9BC00; Sat, 28 Dec 2019 11:57:06 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 4B0459BBE8; Sat, 28 Dec 2019 11:56:29 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 3D18B9B71E; Sat, 28 Dec 2019 11:56:27 +1000 (AEST) X-Greylist: delayed 1315 seconds by postgrey-1.36 at minnie.tuhs.org; Sat, 28 Dec 2019 11:56:26 AEST Received: from gateway32.websitewelcome.com (gateway32.websitewelcome.com [192.185.145.100]) by minnie.tuhs.org (Postfix) with ESMTPS id 9DF9A9B63F for ; Sat, 28 Dec 2019 11:56:26 +1000 (AEST) Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 786F31D6B78 for ; Fri, 27 Dec 2019 19:34:30 -0600 (CST) Received: from gator3286.hostgator.com ([198.57.247.250]) by cmsmtp with SMTP id l0zui2cbIW4frl0zuiKhwf; Fri, 27 Dec 2019 19:34:30 -0600 X-Authority-Reason: nr=8 Received: from mail-ed1-f41.google.com ([209.85.208.41]:45874) by gator3286.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1il0zt-001C02-Pd for tuhs@minnie.tuhs.org; Fri, 27 Dec 2019 19:34:29 -0600 Received: by mail-ed1-f41.google.com with SMTP id v28so26896737edw.12 for ; Fri, 27 Dec 2019 17:34:29 -0800 (PST) X-Gm-Message-State: APjAAAW+Y3PwlEShyrD+VzDVuIQnAkZrb8yHIViysWWo8wsR2kbNLFnI gx4L7zNhHQDKmBserP1h44N/Paoah+HB0MlZP18= X-Google-Smtp-Source: APXvYqzAqA6h/fVxJTCuzDU4GDlfh8EkNxMx6kOWxb807PLj33o9agS/FBRWSeJtNSoFs/+zTXE3HWdavlKmZoNYbWI= X-Received: by 2002:aa7:df92:: with SMTP id b18mr58325907edy.13.1577496868097; Fri, 27 Dec 2019 17:34:28 -0800 (PST) MIME-Version: 1.0 From: Hugh Pyle Date: Fri, 27 Dec 2019 20:34:17 -0500 X-Gmail-Original-Message-ID: Message-ID: To: tuhs@minnie.tuhs.org Content-Type: multipart/alternative; boundary="0000000000007515de059ab99cc4" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3286.hostgator.com X-AntiAbuse: Original Domain - minnie.tuhs.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - cabezal.com X-BWhitelist: no X-Source-IP: 209.85.208.41 X-Source-L: No X-Exim-ID: 1il0zt-001C02-Pd X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: mail-ed1-f41.google.com [209.85.208.41]:45874 X-Source-Auth: hpyle X-Email-Count: 1 X-Source-Cap: aHB5bGU7aHB5bGU7Z2F0b3IzMjg2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Subject: [TUHS] Linux kernel support for uppercase terminals 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" --0000000000007515de059ab99cc4 Content-Type: text/plain; charset="UTF-8" The linux kernel never implemented support for a few features of obsolete terminals. I find myself wanting to use Raspberry Pi-style linux machines with old hardware, so this became quite frustrating. So, I've put together a patch to the n_tty line discipline that adds some things needed for using a Teletype model 33 or similar natively: - XCASE, escaping uppercase (and a few special characters) for input and display, - CRDLY, delay to allow time for the carriage-return function; - NLDLY, delay to allow time for the newline function. With XCASE and ICANON, the terminal outputs a backslash before uppercase characters; and accepts a backslash escape to set input to uppercase. The usual way to use this is `stty lcase`, which also down-cases all input by default. The special character escapes are: \^ to ~ \! to | \( to { \) to } \' to ` With CRDLY there are three options, CR0 through CR2; and with NLDLY there are options NL0 (no delay) and NL1 (one delay). This patch uses fill characters for delay, not timing, so these flags only take effect when OFILL is also set. Note: this doesn't change `agetty`, which I don't think implements uppercase login detection right now. I have a Teletype running with auto-login; and then `stty 110 icanon lcase ofill cr1 nl1`. Code changes and some brief build instructions are here: https://github.com/hughpyle/ASR33/tree/master/rpi/kernel Compare with the raspberrypi tree, here, https://github.com/raspberrypi/linux/compare/rpi-4.19.y...hughpyle:teletype Not yet submitted upstream - the changes are in quite a high-traffic code path, and also I just don't know how :) Feedback is very welcome! -Hugh --0000000000007515de059ab99cc4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The linux kernel never implemented support for a few = features of obsolete terminals.=C2=A0 I find myself wanting to use Raspberr= y Pi-style linux machines with old hardware, so this became quite frustrati= ng.
So, I've put together a patch to the n_tty line disci= pline that adds some things needed for using a Teletype model 33 or similar= natively:
- XCASE, escaping uppercase (and a few special characters) f= or input and display,
- CRDLY, delay to allow time for the carria= ge-return function;
- NLDLY, delay to allow time=C2=A0for the new= line function.

With XCASE and ICANON, the terminal= outputs a backslash before uppercase characters; and accepts a backslash e= scape to set input to uppercase.=C2=A0 The usual way to use this is `stty l= case`, which also down-cases all input by default.=C2=A0 The special charac= ter escapes are:
=C2=A0 \^ =C2=A0to =C2=A0~
=C2=A0 \! =C2=A0to= =C2=A0|
=C2=A0 \( =C2=A0to =C2=A0{
=C2=A0 \) =C2=A0to =C2=A0}
=C2= =A0 \' =C2=A0to =C2=A0`

With CRDLY there a= re three options, CR0 through CR2; and with NLDLY there are options NL0 (no= delay) and NL1 (one delay).=C2=A0 This patch uses fill characters for dela= y, not timing, so these flags only take effect when OFILL is also set.

Note: this doesn't change `agetty`, which I don= 9;t think implements uppercase login detection right now.=C2=A0 I have a Te= letype running with auto-login; and then `stty 110 icanon lcase ofill cr1 n= l1`.

Code changes and some brief build instruction= s are here:
Compare with the raspberrypi tree, here,<= /div>

= Not yet submitted upstream - the changes are in quite a high-traffic code p= ath, and also I just don't know how :)=C2=A0 Feedback is very welcome!<= /div>


-Hugh

--0000000000007515de059ab99cc4--