www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2004/12/04/07:54:36

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: Sat, 04 Dec 2004 14:50:14 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-ID: <01c4d9ff$Blat.v2.2.2$f210ed60@zahav.net.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2
In-reply-to: <200412031828.iB3ISxhi009071@envy.delorie.com> (message from DJ
Delorie on Fri, 3 Dec 2004 13:28:59 -0500)
Subject: Re: Bison 1.875
References: <1102073482 DOT 41b04e8ab968f AT webmail DOT wilkes DOT edu> <01c4d943$Blat.v2.2.2$bd34b200 AT zahav DOT net DOT il> <200412031828 DOT iB3ISxhi009071 AT envy DOT delorie DOT com>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Fri, 3 Dec 2004 13:28:59 -0500
> From: DJ Delorie <dj AT delorie DOT com>
> 
> > When I asked about such a feature on a GDB mailing list, the response
> > was that people who need this use the `script' command available on
> > Unix, and that therefore such a feature is not something GDB users
> > miss.  Unfortunately, the DOS port of `script' does not catch screen
> > I/O variant used by the DJGPP emulation of termios, so redirection is
> > currently the only option I know of for DJGPP users.
> 
> Any reason why we can't teach redir to do the right thing for this
> purpose?

You mean, make `redir' be a replacement for `script'?  That's a bit
tricky, since `script' needs to allow the normal screen I/O to
continue working as if redirection never happened.  By contrast,
`redir' works by redirecting the handle, and then lets the program run
as usual, i.e. it doesn't duplicate the I/O, just redirects it.

The DOS port of `script' that I use implements what the Unix command
does by catching Int 21h functions that write the console device, and
then copies the string passed to Int 21h to the file, and lets the
original interrupt handler continue its normal processing.

The problem with our termios emulation is that it uses Int 29h to
write screen output and Int 16h to read screen input, and the ported
`script' doesn't catch those.  (IIRC, it's not easy to catch these
interrupts with a DPMI program, but I forget the reasons.)

- Raw text -


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