www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/27/18:04:52

Message-Id: <199610271821.DAA26847@mail.st.rim.or.jp>
From: "Daisuke Aoyama" <jack AT st DOT rim DOT or DOT jp>
To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>, "Ove Keven" <ovek AT arcticnet DOT no>
Cc: <djgpp AT delorie DOT com>, "DJ Delorie" <dj AT delorie DOT com>
Subject: RE: GNU less doesn't work
Date: Mon, 28 Oct 1996 03:18:36 +0900
MIME-Version: 1.0

> 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 -


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