MCPcopy Create free account
hub / github.com/NetHack/NetHack / curscolor

Function curscolor

win/curses/cursmesg.c:251–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249
250#ifdef USE_CURSES_PUTMIXED
251static int
252curscolor(int nhcolor, boolean *boldon)
253{
254 int curses_color;
255
256 *boldon = FALSE;
257 if (nhcolor == 0) { /* make black fg visible */
258#ifdef USE_DARKGRAY
259 if (iflags.wc2_darkgray) {
260 if (COLORS > 16) {
261 /* colorpair for black is already darkgray */
262 } else { /* Use bold for a bright black */
263 *boldon = TRUE;
264 }
265 } else
266#endif /* USE_DARKGRAY */
267 nhcolor = CLR_BLUE;
268 }
269 curses_color = nhcolor + 1;
270 if (COLORS < 16) {
271 if (curses_color > 8 && curses_color < 17)
272 curses_color -= 8;
273 else if (curses_color > (17 + 16))
274 curses_color -= 16;
275 }
276 return curses_color;
277}
278#endif
279
280void

Callers 1

curses_message_win_putsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected