www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/25/21:45:25

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ANSI!
Date: Tue, 25 Feb 1997 19:41:52 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 27
Message-ID: <3313B100.3927@cs.com>
References: <331274E0 DOT 2A76 AT pulsar DOT net>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp206.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

-=MoZ=- wrote:
> 
> I know this is possible, but as some of you may know, I don't know a
> damn thing about programming!   :)
> 
> Can I take an ANSI File, and bring it into a C program, and have the
> C program capabple of scrolling this file?

It's easy to make a program to scroll a text file.  But to get an ANSI
file to display properly, you need to do one of two things:

- Load ANSI.SYS on your system.  In this case, text sent to DOS via
printf() will pass through ANSI.SYS and will be displayed properly. 
This is true of any program that works in such a way.

- 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.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
| "Starting flamewars since 1993"  |   http://www.cs.com/fighteer   |
|  *** NOTICE ***  This .signature is generated randomly.           |
|                  If you don't like it, sue my computer.           |
---------------------------------------------------------------------

- Raw text -


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