Mail Archives: djgpp/1996/10/27/18:04:52
> raw (as opposed to cooked) mode. But that's exactly what `setmode' is
> supposed to do for binary I/O from the keyboard or to the screen!
It didn't check termios hook. Here is correct patch.
-----------------
*** src/libc/dos/io/setmode.c-orig Sun Sep 8 21:08:38 1996
--- src/libc/dos/io/setmode.c Mon Oct 28 02:34:48 1996
***************
*** 7,12 ****
--- 7,13 ----
#include <io.h>
#include <libc/dosio.h>
+ #include <libc/ttyprvt.h>
void (*__setmode_stdio_hook)(int fd, int mode); /* BSS to zero */
***************
*** 32,38 ****
else
newmode &= ~0x20;
! if ((oldmode & 0x80) && (oldmode & 0x03) && handle == 0) /* for termios
*/
__djgpp_set_ctrl_c (! (mode & O_BINARY));
else if (oldmode & 0x80) /* Only for character dev */
{
--- 33,40 ----
else
newmode &= ~0x20;
! if (__libc_read_termios_hook != NULL
! && (oldmode & 0x80) && (oldmode & 0x03) && handle == 0) /* for
termios */
__djgpp_set_ctrl_c (! (mode & O_BINARY));
else if (oldmode & 0x80) /* Only for character dev */
{
-----------------
> I don't understand why termios needed this change. In any case, any
It provides characters pass through termios when raw mode.
Daisuke Aoyama
jack AT st DOT rim DOT or DOT jp
- Raw text -