Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!swrinde!ucsd!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.unix.questions Subject: Re: Type-ahead in unix Message-ID: <12168@dog.ee.lbl.gov> Date: 17 Apr 91 16:34:35 GMT References: <15845@smoke.brl.mil> <17309:Apr1614:19:5491@kramden.acf.nyu.edu> <12132@dog.ee.lbl.gov> <28216:Apr1700:51:4791@kramden.acf.nyu.edu> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 33 X-Local-Date: Wed, 17 Apr 91 09:34:35 PDT In article <28216:Apr1700:51:4791@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >In fact, under your BSD 4.3++ (ahem), output is not re-echoed, (output? you mean typeahead? output certainly should not be reprinted.) In most cases, typeahead should not be reprinted either (only if it was `typed ahead' while echo was off). Right now PENDIN is not always set when it should be (mainly because it is `too hard' to tell when it should be). >^M is not converted back to ^J, Hm. This is more troublesome: conversion is a one-way street. Once input characters have been translated (e.g., ^V applied, ^C translated to SIGINT, etc), there is no going back. I am not entirely sure it is right to do all this just because one non-ICANON-program exited before another is about to start. >and line editing does not work upon the typeahead. >I just tried it today, so don't tell me things work. I just tried that yesterday and it *did* work. (It even let me back up over newline, which is a bit odd.) That is: stty -icanon; sleep 5; echo going back; stty icanon; sleep 5 and type several lines; after `going back' you can edit the typeahead. But (as noted above) unconverted stuff is not converted; if you typed ^H while ICANON was clear, you have, in effect, typed ^V^H as far as the ICANON-mode code is concerned. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov