diff --git a/src/colors.c b/src/colors.c
index 1b3300de8a40a0dc5a55b19609305963133a1fa8..75aef550bd4a9a5deb1d9cb4f11581efdde7138a 100644 (file)
--- a/src/colors.c
+++ b/src/colors.c
#include <string.h>
#include <glib.h>
-#define COLOR_BRIGHT_MASK (1<<7)
+#define COLOR_BRIGHT_MASK (1<<8)
#define COLOR_BRIGHT_BLACK (COLOR_BLACK | COLOR_BRIGHT_MASK)
#define COLOR_BRIGHT_RED (COLOR_RED | COLOR_BRIGHT_MASK)
short
colors_str2color(const char *str)
{
+ short color;
+
if (!strcasecmp(str, "black"))
return COLOR_BLACK;
else if (!strcasecmp(str, "red"))
else if (!strcasecmp(str, "none"))
return -1;
+ if (!strcmp(str, "0"))
+ return 0;
+ color = atoi(str);
+ if (color > 0)
+ return color;
+
fprintf(stderr,_("Warning: Unknown color - %s\n"), str);
return -2;
}