This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ANSI Colors in a C program under Linux...
- To: linux-gcc at vger dot rutgers dot edu, linux-admin at vger dot rutgers dot edu, gcc at gcc dot gnu dot org
- Subject: ANSI Colors in a C program under Linux...
- From: Hendrix <tgjp at thezone dot net>
- Date: Tue, 04 Jul 2000 02:38:28 -0230
- Newsgroups: alt.os.linux,comp.os.linux.misc,comp.lang.c
- Organization: n/a
Hi folks,
I recently noticed that the command line 'linuxconf' program has
text-based colors in its interface... How would it be possible for me
to utilize these colors in my own C, or C++, program? I remember doing
this with ANSI colors back when I used to run my own PCBoard from
DOS... I was also experienced in using the QuickBASIC color statement
to print ANSI colors on SCREEN 0 (text mode)... Whenever I ask
questions about color and graphics in "comp.lang.c" they send me
elsewhere and say that it is compiler specific...??? I do not agree
with this!!! I think that a C program can be written with ANSI escape
characters in order to colorize a screen, and I believe that this would
be included in the ANSI Standard of the C language... It isn't graphics
functions, it just uses the ANSI escape sequences to print...
I don't know, I may very well be wrong, but if I'm not, could someone
please help me figure this out... If it is possible to present ANSI
colors in a C program (and still complie to the ANSI C Standard) then
could someone show me a "Hello World" kind of program that has a blue
background with yellow writing (much like the 'linuxconf' console
program)... Thanks a bunch for reading my ramblings...*s*
Later,
--
Trevor Penney,
A+, Network+ Certified
----------------------
"That's alright, I still got my guitar"...
-James Marshall Hendrix (11/27/1942-09/18/1970)