delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/23/01:29:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020822215905.01fa8cd8@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Thu, 22 Aug 2002 22:26:54 -0700
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: Character at a time input (was Re: Where is less source?)
In-Reply-To: <Pine.GSO.4.44.0208221603080.13008-100000@xmission.xmission
.com>
References: <7457140252 DOT 20020822000801 AT familiehaase DOT de>
Mime-Version: 1.0

Scott,

I'm afraid to do that on Windows you'll have to reboot after reading each 
character.


OK. Not to be totally frivolous: Yes, "cbreak" and "raw" modes work under 
Cygwin. You can see it work from the command line:

% stty cbreak
% cat
tthhiiss  iiss  aa  tteesstt

%

Just to be clear, I typed "this is a test<RETURN>". For reasons I don't 
understand, CTRL-D (which I verified is my tty's eof character) did not 
generate a end-of-file condition--I had to use CTRL-C to terminate the 
"cat" command. What seems even stranger is that "raw" mode behaved the same 
way. I suppose those symptoms occur because I don't include the "tty" 
option in $CYGWIN.

Randall Schulz
Mountain View, CA USA


At 15:23 2002-08-22, J. Scott Edwards wrote:

>Thanks, I found it.  But unfortunately it didn't answer my question:
>
>Can ioctl be used to change the standard input into character at a time
>mode or do I have to use ncurses or is there a better way to just get a
>character at a time?
>
>Thanks
>  -Scott


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019