Mercurial > ~mikael > mcabber > hg
diff mcabber/src/screen.c @ 1417:783b47c9d963
Allow more than the 16 default colors (patch from mjs)
If the terminal supports more than 16 colors (e.g. xterm-256color),
the color numbers can be set in place of the color names.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 20 Jan 2008 22:46:16 +0100 |
parents | 366ef500c522 |
children | 757ebe4df0b9 |
line wrap: on
line diff
--- a/mcabber/src/screen.c Sat Jan 19 16:52:45 2008 +0100 +++ b/mcabber/src/screen.c Sun Jan 20 22:46:16 2008 +0100 @@ -246,6 +246,11 @@ if (result != -2) return result; + // Directly support 256-color values + result = atoi(name); + if (result > 0 && result < COLORS) + return result; + scr_LogPrint(LPRINT_LOGNORM, "ERROR: Wrong color: %s", name); return -1; }