Teen Programmers Unite  
 

 

Return to forum top

colored text in a terminal

Posted by infryq [send private reply] at July 11, 2001, 01:31:33 PM

Is there a tcsh- or bash- friendly equivalent to DOS's colprintf()? I'm using C, and I'd like to print to a terminal in color, but I don't know the first place to look -- or if it's even possible.

Posted by Psion [send private reply] at July 11, 2001, 07:13:24 PM

curses/ncurses libraries handle that sort of thing, I think.

Posted by infryq [send private reply] at July 14, 2001, 02:35:01 PM

Thanks -- That's kinda what I'm looking for, I'll have to do some digging

Posted by shroomrefic29 [send private reply] at July 27, 2001, 05:26:07 PM

Are you using Windows? You can use their API functions for writing in colors as well as manipulating the mouse.

Posted by gian [send private reply] at July 27, 2001, 05:43:38 PM

shroomrefic29: Usually, tcsh and bash imply unix...

Posted by infryq [send private reply] at July 27, 2001, 08:24:54 PM

Usually, and in this case as it happens, yes they imply unix...but i use a bash console on the rare occasion i use our PC, so not always :)

Posted by sphinX [send private reply] at July 27, 2001, 11:06:18 PM

yeah, they don't neccesarily imply unix...i run windows ports of both bash and tcsh

Posted by shroomrefic29 [send private reply] at August 01, 2001, 02:37:36 AM

Err.. sorry, I thought he meant it the other way around (Little amounts of sleep might cause me to be confused at times:) using color in a DOS console. However, I do run a Bash port on my Windows System.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.