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

Function nhattr2curses

win/curses/cursstat.c:1410–1429  ·  view source on GitHub ↗

convert tty attributes to curses attributes; despite similar names, the mask fields have different values */

Source from the content-addressed store, hash-verified

1408/* convert tty attributes to curses attributes;
1409 despite similar names, the mask fields have different values */
1410static int
1411nhattr2curses(int attrmask)
1412{
1413 int result = 0;
1414
1415 if (attrmask & HL_BOLD)
1416 result |= A_BOLD;
1417 if (attrmask & HL_DIM)
1418 result |= A_DIM;
1419 if (attrmask & HL_ITALIC)
1420 result |= A_ITALIC;
1421 if (attrmask & HL_ULINE)
1422 result |= A_UNDERLINE;
1423 if (attrmask & HL_BLINK)
1424 result |= A_BLINK;
1425 if (attrmask & HL_INVERSE)
1426 result |= A_REVERSE;
1427
1428 return result;
1429}
1430#endif /* STATUS_HILITES */
1431
1432/*cursstat.c*/

Callers 3

draw_horizontalFunction · 0.85
draw_verticalFunction · 0.85
curs_stat_condsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected