Character at a time input (was Re: Where is less source?)

Randall R Schulz rrschulz@cris.com
Fri Aug 23 02:11:00 GMT 2002


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/



More information about the Cygwin mailing list