Date: Wed, 26 Feb 1997 14:47:15 +0200 (IST) From: Eli Zaretskii To: "John M. Aldrich" cc: djgpp AT delorie DOT com Subject: Re: ANSI! In-Reply-To: <3313B100.3927@cs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 25 Feb 1997, John M. Aldrich wrote: > - Write your own parser for the ANSI codes and use the 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.)