repo.or.cz
/
C-Data-Structures.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updated project to use eclipse build tools and make system.
[C-Data-Structures.git]
/
lib_term_color.c
blob
812aa522b7f6431125b5f0e18a9f4a89f54b1639
1
#include <stdio.h>
2
3
#define RESET 0
4
#define BRIGHT 1
5
#define DIM 2
6
#define UNDERLINE 3
7
#define BLINK 4
8
#define REVERSE 7
9
#define HIDDENT 8
10
11
#define BLACK 0
12
#define RED 1
13
#define GREEN 2
14
#define YELLOW 3
15
#define BLUE 4
16
#define MAGENTA 5
17
#define CYAN 6
18
#define WHITE 7
19
20
void
clear_screen
()
21
{
22
system
(
"clear"
);
23
}
24
25
void
color
(
int
attr
,
int
fg
,
int
bg
)
26
{
27
printf
(
"%c[%d;%d;%dm"
,
0x1B
,
attr
,
fg
+
30
,
bg
+
40
);
28
}