YaDICs  V04.14.a
Yet another Digital Image Correlation software: platform dedicated to 2/3D Fluid and Solid kinematics field measurements.
 All Classes Files Functions Variables Pages
textcolor.h
1 #ifndef TEXTCOLOR
2 #define TEXTCOLOR
3 
4 #include <stdio.h>
5 
6 #define RESET 0
7 #define BRIGHT 1
8 #define UNDERLINE 3
9 #define BLINK 4
10 #define REVERSE 7
11 #define HIDDEN 8
12 
13 #define BLACK 0
14 #define RED 1
15 #define GREEN 2
16 #define YELLOW 3
17 #define BLUE 4
18 #define MAGENTA 5
19 #define CYAN 6
20 #define WHITE 7
21 
22 void textcolor(int attr, int fg, int bg);
23 
24 void textcolor(int attr, int fg, int bg)
25 { char command[13];
26 
27  /* Command is the control command to the terminal */
28  sprintf(command, "%c[%d;%d;%dm", 0x1B, attr, fg + 30, bg + 40);
29  printf("%s", command);
30 }
31 
32 #endif