The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Paul Riley <paul@rileyriot.com>
To: Clem Cole <clemc@ccc.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>,
	Noel Chiappa <jnc@mercury.lcs.mit.edu>
Subject: Re: [TUHS] V6 Console IO
Date: Sat, 25 Jul 2020 10:48:07 +0800	[thread overview]
Message-ID: <CAD05_j3KTordUZsc-pn70Q7gJJru49pyf5+8yJyRRJGbAVjD-g@mail.gmail.com> (raw)
In-Reply-To: <CAC20D2OPHVcZqngz-L8e83VzVBXC7hdG-mVANQPLjfrFeWoNBQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2387 bytes --]

Yep already fallen into that trap. Glad I'm running on a sim! Yes I'd
considered writing a small program to reset the STTY settings, and you've
helped me to understand how I can run it!

In answer to the CR question, is it that in raw mode, the CR does not get
mapped to LF, and therefore the shell doesn't see the LF character and
recognize the end of the line? Incidentally, why the ^J before ft? Just to
clean up the shell input status?

I'll write my own ft, thanks. I'll try raw mode, because I want some better
line editing capability.

Alternatively if I toy around with /dev/tty does that interfere with the
operation of the standard console outside of my app?

Paul

*Paul Riley*




On Fri, 24 Jul 2020 at 22:36, Clem Cole <clemc@ccc.com> wrote:

>
>
> On Thu, Jul 23, 2020 at 10:29 PM Noel Chiappa <jnc@mercury.lcs.mit.edu>
> wrote:
>
>>  ...
>> This is not a C issue; it's the Unix I/O system (and specifically,
>> terminal I/O).
>
>
>> ...
>
> One can suppress all this; there's a mode call 'raw'
>>
> Just be sure to turn raw mode off so canonization is performed again after
> your program stops running. Remember this a 'system wide' settings for that
> try and all programs start to use that setting.   So if some reason, your
> program stops and a new program (like the shell) takes back over input from
> the try, if you do not have a way to get it back you are screwed.
>
> Back in the day, I have a shell script in my path stored in ~/.bin called: ft
> (fix tty) which called the stty command with the way I wanted the
> terminal to be set up.   Thus is I was running a program that core dumped
> and left the try in raw mode, if I could find a way to run the ft script
> (usually by typing ^Jft^J ) life was good again.  Paul, as an
> exercise why would ft<CR> not be good enough? (hint read and study the
> section 4 man page for stty)
>
> FWIW: is how the original UCB ex/vi  and Cornell's Fred editors for v6
> works by the way.  I suspect that iyou look at any of the video editors of
> the day it will show you the details.
>
> One of the differences between V7 and earlier UNIX tty handlers was that
> they tty canonization was split into multiple parts.   Also the other hint
> with Sixthedition's version of raw and cooked modes, you get all or nothing so
> you if you turn on raw, your program, will have do things like backspace
> processing, *etc*..
>
>

[-- Attachment #2: Type: text/html, Size: 5477 bytes --]

  reply	other threads:[~2020-07-25  2:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  2:28 Noel Chiappa
2020-07-24  4:54 ` Paul Riley
2020-07-24 16:37   ` Random832
2020-07-24 17:15     ` Clem Cole
2020-07-25  2:45       ` Random832
2020-07-24 14:34 ` Clem Cole
2020-07-25  2:48   ` Paul Riley [this message]
2020-07-25  4:02     ` John Cowan
2020-07-25 15:09       ` Clem Cole
2020-07-25 15:31         ` Richard Salz
2020-07-26  1:08           ` Random832
2020-07-27  9:11             ` Paul Riley
  -- strict thread matches above, loose matches on Subject: below --
2020-07-25 17:45 Noel Chiappa
2020-07-24 14:33 Noel Chiappa
2020-07-24 14:36 ` Clem Cole
2020-07-25  1:53   ` Dave Horsfall
2020-07-24  0:18 Paul Riley
2020-07-24  2:57 ` Larry McVoy
2020-07-24  4:41   ` Paul Riley
2020-07-24  4:54     ` Paul Riley
2020-07-24 14:01       ` Larry McVoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD05_j3KTordUZsc-pn70Q7gJJru49pyf5+8yJyRRJGbAVjD-g@mail.gmail.com \
    --to=paul@rileyriot.com \
    --cc=clemc@ccc.com \
    --cc=jnc@mercury.lcs.mit.edu \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).