From e6578c833b4b22f7b10d62f7f57c84c51cf8a53c Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 4 Feb 2006 15:17:11 +0000 Subject: [PATCH] Changed color formatting --- mbmon/mbmon.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/mbmon/mbmon.c b/mbmon/mbmon.c index bfef7296..9b1acb5a 100644 --- a/mbmon/mbmon.c +++ b/mbmon/mbmon.c @@ -477,7 +477,7 @@ void soft_info(void) */ void Showline(int y, int x, char *msgin) { - int i; + int i, done = FALSE; char *msg; if (strlen(msgin)) { @@ -488,20 +488,25 @@ void Showline(int y, int x, char *msgin) putchar('<'); mbse_colour(LIGHTBLUE, BLACK); for (i = 1; i < strlen(msg); i++) { - if (msg[i] == '>') { + if ((msg[i] == '>') && (! done)) { mbse_colour(LIGHTCYAN, BLACK); putchar(msg[i]); mbse_colour(CYAN, BLACK); + done = TRUE; } else { putchar(msg[i]); } } - } else if ((msg[0] == '*') && (msg[1] == '*')) { - mbse_colour(LIGHTRED, BLACK); - mbse_mvprintw(y, x, msg); } else if (msg[0] == '*') { - putchar('\007'); - mbse_colour(LIGHTMAGENTA, BLACK); + if (msg[1] == '*') { + if (msg[2] == '*') + mbse_colour(YELLOW, BLACK); + else + mbse_colour(LIGHTRED, BLACK); + } else { + mbse_colour(LIGHTMAGENTA, BLACK); + putchar('\007'); + } mbse_mvprintw(y, x, msg); } else { mbse_colour(GREEN, BLACK);