From 736c2f0d4780d52d66b5b344d4dcd8776dad8783 Mon Sep 17 00:00:00 2001 From: toni Date: Sat, 12 Apr 2014 12:58:09 +0200 Subject: added colored output --- main.c | 6 ++++-- 1 file 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(); -- cgit v1.2.3