Date: Sun, 8 Dec 1996 16:59:49 +0200 (IST) From: Eli Zaretskii To: "A.Appleyard" cc: djgpp AT delorie DOT com Subject: Re: colored text in text mode In-Reply-To: <275252745D@fs2.mt.umist.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.