www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/26/08:11:40

Date: Wed, 26 Feb 1997 14:47:15 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "John M. Aldrich" <fighteer AT cs DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: ANSI!
In-Reply-To: <3313B100.3927@cs.com>
Message-ID: <Pine.SUN.3.91.970226144239.10395C-100000@is>
MIME-Version: 1.0

On Tue, 25 Feb 1997, John M. Aldrich wrote:

> - Write your own parser for the ANSI codes and use the <conio> functions
> to implement them.  This would be a major piece of work, comparable to
> writing ANSI.SYS from scratch.  But it's the only way to guarantee the
> portability of such a program.

A poor man's ANSI driver can be found in the DJGPP port of GNU Fileutils
(v2gnu/fil313b.zip, file src/ls-msdos.c).  It only handles the color
commands of ANSI command set, and it assumes that the text doesn't include
TAB characters, but you can extend it if it isn't enough.  The driver
works by installing a filesystem extension for console output, so that it
is automatically called by the low-level I/O functions when the program
prints to the screen.  (I needed it to make ls colorize its output.)

- Raw text -


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