delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/21/03:17:20

Date: Mon, 21 Aug 2000 10:19:11 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: zastai AT hotmail DOT com
Message-Id: <2950-Mon21Aug2000101911+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b
CC: djgpp AT delorie DOT com
In-reply-to: <NvXn5.142954$Fw6.3497923@afrodite.telenet-ops.be>
(zastai AT hotmail DOT com)
Subject: Re: FSEXT trouble (can they be bypassed)
References: <NvXn5.142954$Fw6 DOT 3497923 AT afrodite DOT telenet-ops DOT be>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Tim 'Zastai' Van Holder" <zastai AT hotmail DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sun, 20 Aug 2000 20:49:49 GMT
> 
> The problem seems to be that the program also uses termios calls, so
> __write will just call __libc_termios_write and never use the fsext
> function. Is this how it's supposed to be?

Yes, this is how it works right now: termios effectively disables
FSEXT hooks for a handle, if the handle refers to the console device
(other handles, such as those for disk files, are still passed to
FSEXT hooks).

The reason for this is that termios hooks the I/O ahead of the
low-level library functions which invoke DOS, and where the FSEXT
hooks are invoked.  Termios does that because it redirects I/O to BIOS
functions, and it needs to see the exact text sent by the program,
before such transformations as NL->CRLF, for exmple, since termios
offers functions to control that.

> And, if so, how do I get around it? IE how do I prevent the termios
> hooks from being used

Assuming that the program must use termios, the only way out of this
is to change the DJGPP termios emulation so that it, too, supports
FSEXT.

Take a look at the file tminit.c in the library sources, I think it's
not that hard to make it compatible with FSEXT.  One issue that needs
to be decided is this: do you want termios emulation active for a
handle hooked by an FSEXT, or do you want to bypass termios completely
(I think the former, since you might want some of the termios
functionality).  This will tell you where should tminit.c pass control
to the FSEXT.

- Raw text -


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