www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/18/05:56:07

Date: Sun, 18 Apr 1999 13:53:37 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: DJ Delorie <dj AT delorie DOT com>
cc: djgpp-workers AT delorie DOT com, "Mark E." <snowball3 AT usa DOT net>
Subject: Termios and getchar
Message-ID: <Pine.SUN.3.91.990418135049.22615M-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

It turns out that the termios hook is not called if the program uses
buffered stdio functions like `getc' and `getchar'.  DJ, is this
intentional, or simply an oversight?

It seems like the call to the hook was left inside `read' and `write'
when we pushed the CR-LF -> NL conversion into the higher level,
leaving `_filbuf' and `_flsbuf' to call `_read' and `_write' directly,
even for text files.

Mark, does this mean that Bash never uses any buffered stdio functions, 
only `read' and `write' for its interactive I/O?  Otherwise, I don't 
understand how does the new port manage to invoke termios.

Anyway, this seems like a bug that should be corrected.  The simplest
way is to call the hook inside `_flsbuf' and `_filbuf'.

- Raw text -


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