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

Function e_atr2str

win/tty/termcap.c:1378–1406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1376}
1377
1378static char *
1379e_atr2str(int n)
1380{
1381 switch (n) {
1382 case ATR_ITALIC:
1383 /* send ZR unless we didn't have ZH and substituted US */
1384 if (ZR && *ZR && ZH && *ZH)
1385 return ZR;
1386 FALLTHROUGH;
1387 /*FALLTHRU*/
1388 case ATR_ULINE:
1389 if (nh_UE && *nh_UE)
1390 return nh_UE;
1391 FALLTHROUGH;
1392 /*FALLTHRU*/
1393 case ATR_BOLD:
1394 case ATR_BLINK:
1395 if (nh_HE && *nh_HE)
1396 return nh_HE;
1397 FALLTHROUGH;
1398 /*FALLTHRU*/
1399 case ATR_DIM:
1400 case ATR_INVERSE:
1401 if (ME && *ME)
1402 return ME;
1403 break;
1404 }
1405 return nulstr;
1406}
1407
1408/* suppress nonfunctional highlights so render_status() might be able to
1409 optimize more; keep this in sync with s_atr2str() */

Callers 1

term_end_attrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected