www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/10/17:54:02

Date: Sun, 8 Dec 1996 16:59:49 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: colored text in text mode
In-Reply-To: <275252745D@fs2.mt.umist.ac.uk>
Message-ID: <Pine.SUN.3.91.961208165136.3423J-100000@is>
MIME-Version: 1.0

On Fri, 6 Dec 1996, A.Appleyard wrote:

> In v1, and in v2, when writing to screen in the ordinary text mode by fprint()
> etc, how can I tell the PC to start writing with such-and-such a foreground
> and background color?

The only way I know of (short of replacing DOS I/O with conio) is to use
the filesystem extensions mechanism available with DJGPP v2.  A simple
example of a filesystem extension which catches all output to the screen
(no matter which higher-level I/O functions were used) and converts it to
direct conio-style writes is included with the DJGPP libc reference from
v2.01 (type "info libc alpha __FSEXT_set_function RET" from the DOS
prompt).  A more complex example can be found in the DJGPP port of GNU ls
(v2gnu/fil313s.zip, filename ls-msdos.c) which is used to produce the
colorization of file names according to their type. 

- Raw text -


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