Mail Archives: djgpp/1998/03/25/14:26:24
colcom wrote:
>
> Is it possible to print in colour in text mode in C? eg printf or
> something?
There are two ways:
- Install an ANSI.SYS driver or workalike, and print ANSI escape
sequences to format your text, or
- Use the functions in <conio.h> which have been provided for this
purpose. You can learn about conio functions by typing "info libc func
conio".
Please note that conio functions are not ANSI-standard, and you can run
into problems if you try to use them interchangeably with stdio
functions. Chapter 9.4 of the FAQ describes some of these problems.
hth
--
---------------------------------------------------------------------
| John M. Aldrich | "History does not record anywhere at |
| aka Fighteer I | any time a religion that has any |
| mailto:fighteer AT cs DOT com | rational basis." |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -