[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG in MiNT: character not read from tty



> 
> streibel@usa.net%INTERNET wrote:
> > 
> > I think I found a bug in MiNT (still using 4.14.6):
> > read() doesn't return control-o when reading from stdin.
> > It does return that character when reading from a file.
> > 
> 
> CTRL-O is XOFF. When the tty is in cooked mode, you won't see it.

XOFF is CTRL-O?
I always thought XOFF/XON would normally be CTRL-S/CTRL-Q.

But in essence I think you're right refering to tty settings. My current
settings are (stty -a):

speed 0 baud; rows 25; columns 80;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = M-^?; start = ^Q;
stop = ^S; susp = ^Z; dsusp = ^Y; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
opost
isig icanon iexten echo echoe echok -echonl -noflsh -tostop -echoctl

I changed flush to ^R and after that CTRL-O was returned by read().

Maybe this is the correct behavior when the tty is in canonical (cooked)
mode. But originally I found the problem when porting an editor to MiNT. This
editor does change the tty into noncanonical (raw) mode - using struct
termios. I think in that mode all characters should be returned. Or so I miss
something here?

Hans