From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5dd09791e804ef4e13502cbcd7add171.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199602161546.IAA28412@koala.azstarnet.com> Date: Fri, 16 Feb 1996 08:46:12 -0700 From: David Mosberger-Tang Subject: Re: midi player? & more > I first added lines like: > otty.c_lflag &= ~(ICANON|ECHO); > + otty.c_cc[VMIN] = 1; /* be sure it is 1 */ > + otty.c_cc[VTIME] = 0; /* be sure it is 0 */ > without success. This one fixes more in util-linux-2.5 as well. I suspect it shouldn't be necessary. It starts to look to me like TCGETA may not return the correct values. Looking at linux/include/asm-alpha/termios.h, we find that trans_to_termio() sets the _VMIN and _VTIME entries *only* if the ICANON flag is set in c_lflag whereas the x86 version always copies everything unconditionally. > Then I noticed that ioctl() was called with (sometimes) a pointer to a > `struct termio' as 3rd argument, while (on Linux/Alpha/BLADE_0.3) > the Vxx array indexes differed beetween termio.c_cc[] and termios.c_cc[] > ... and in system headers VMIN * & co are overriden to suit the > `struct termio' variants only when is included ... and it's > not the case in more.c. termio and termios are not compatible on Linux/Alpha (in fact, you get an error message when trying to include both header files). As long as one sticks with one or the other, everything will (should) work fine though. So the real bug may have been that the old more.c included termios.h when it should have included termio.h (this is correct in the version distributed by Red Hat). BTW: I suspect that the reason for xterm to start up with bad tty settings to be the same problem: including termios and using termio or some such. --david