comparison mcabber/mcabber/screen.c @ 2029:ca40744c03be

Do not warn when the configuration file contains 256-color values Configuration file is read before ncurses is initialized so we cannot assume the terminal doesn't support 256 colors.
author Mikael Berthe <mikael@lilotux.net>
date Thu, 11 Oct 2012 22:46:41 +0200
parents 7b5bd6ad83b4
children f740c4128f76
comparison
equal deleted inserted replaced
2028:7b5bd6ad83b4 2029:ca40744c03be
240 if (!strcmp(name, "white")) 240 if (!strcmp(name, "white"))
241 return COLOR_WHITE; 241 return COLOR_WHITE;
242 242
243 // Directly support 256-color values 243 // Directly support 256-color values
244 result = atoi(name); 244 result = atoi(name);
245 if (result > 0 && result < COLORS) 245 if (result > 0 && (result < COLORS || !Curses))
246 return result; 246 return result;
247 247
248 scr_LogPrint(LPRINT_LOGNORM, "ERROR: Wrong color: %s", name); 248 scr_LogPrint(LPRINT_LOGNORM, "ERROR: Wrong color: %s", name);
249 return -1; 249 return -1;
250 } 250 }