linux gcc 4.4.1
I have the following fprintf statement and I would like to have the OK as green and the FAILED as red. Is this possible?
if(devh == -
You should probably use some library such as ncurses to handle terminal.
Alternatively, under Linux you could use some console escape sequences such as:
printf ("\033[32;1m OK \033[0m\n");
(in this case 32 stands for green), but it is neither portable nor elegant.