diff options
author | toni <matzeton@googlemail.com> | 2014-04-12 12:58:09 +0200 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2014-04-12 12:58:09 +0200 |
commit | 736c2f0d4780d52d66b5b344d4dcd8776dad8783 (patch) | |
tree | 76d14f066e74604f03e9c926579539ca329bfbc4 | |
parent | be77b3632c3a651f83692f2e678785bf65a2165a (diff) |
added colored output
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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(); |