aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2014-04-12 12:58:09 +0200
committertoni <matzeton@googlemail.com>2014-04-12 12:58:09 +0200
commit736c2f0d4780d52d66b5b344d4dcd8776dad8783 (patch)
tree76d14f066e74604f03e9c926579539ca329bfbc4
parentbe77b3632c3a651f83692f2e678785bf65a2165a (diff)
added colored output
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 9f8d6a5..2e61d81 100644
--- a/main.c
+++ b/main.c
@@ -57,9 +57,9 @@ static size_t print_pw_status(WINDOW *wnd, char *text)
print_rel_to_wnd(wnd, (int)(-strlen(text)/2)-1, SRELPOSY, ">");
print_rel_to_wnd(wnd, (int)(strlen(text)/2)+2, SRELPOSY, "<");
attroff(A_BLINK);
- attron(A_BOLD);
+ attron(A_BOLD | COLOR_PAIR(1));
print_rel_to_wnd(wnd, 0, SRELPOSY, text);
- attroff(A_BOLD);
+ attroff(A_BOLD | COLOR_PAIR(1));
return (strlen(text));
}
@@ -94,6 +94,8 @@ int main(int argc, char **argv)
}
initscr();
+ start_color();
+ init_pair(1, COLOR_RED, COLOR_BLACK);
raw();
keypad(DEFWIN, TRUE);
noecho();