repo.or.cz
/
pmc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Drop -Werror
[pmc.git]
/
color.c
blob
35ddbeac904a149d67085e88131d092721f15e5e
1
#include <ncurses.h>
2
#include <color.h>
3
4
5
int
pmc_to_curses
[] = {
6
COLOR_BLACK
,
7
COLOR_RED
,
8
COLOR_GREEN
,
9
COLOR_YELLOW
,
10
COLOR_BLUE
,
11
COLOR_MAGENTA
,
12
COLOR_CYAN
,
13
COLOR_WHITE
14
};
15
16
17
void
18
pmc_init_color
(
void
)
19
{
20
pmc_color_t bg
,
fg
;
21
22
for
(
bg
=
C_BLACK
;
bg
<=
C_WHITE
;
bg
++) {
23
for
(
fg
=
C_BLACK
;
fg
<=
C_WHITE
;
fg
++) {
24
//printw("Init color %02x\n", BG(bg)|fg);
25
init_pair
((
short
)(
BG
(
bg
)|
fg
),
26
pmc_to_curses
[
fg
],
27
pmc_to_curses
[
bg
]);
28
}
29
}
30
}
31