www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/10/00:58:16

Date: Tue, 10 Dec 2002 07:56:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: conflict.
In-Reply-To: <3DF51556.A1A9943C@yahoo.com>
Message-ID: <Pine.SUN.3.91.1021210075106.16020B-100000@is>
MIME-Version: 1.0
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

On Mon, 9 Dec 2002, CBFalconer wrote:

> > I don't think there is a work-around, sorry.  Any DOS program that
> > accesses the video memory directly will cause this unpleasant
> > side-effect.  I consider this a misfeature of the NT family of
> > Windows.
> 
> How does ls write to video?  All it's output should be to stdout. 

ls uses direct video writes to support the --color command-line option.
The reason it uses direct video access is that I didn't want to rely on 
ANSI.SYS to be present.

The code in ls indeed writes to stdout, but the ported program uses the 
DJGPP's Filesystem Extension feature to intercept those writes just 
before they are sent to the DOS WriteFile function, and use conio 
functions instead.  (This is only done when colored output was requested 
by the user.)

- Raw text -


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