suppress nonfunctional highlights so render_status() might be able to optimize more; keep this in sync with s_atr2str() */
| 1408 | /* suppress nonfunctional highlights so render_status() might be able to |
| 1409 | optimize more; keep this in sync with s_atr2str() */ |
| 1410 | int |
| 1411 | term_attr_fixup(int msk) |
| 1412 | { |
| 1413 | /* underline is converted to bold if its start sequence isn't available */ |
| 1414 | if ((msk & HL_ULINE) && (!nh_US || !*nh_US)) { |
| 1415 | msk |= HL_BOLD; |
| 1416 | msk &= ~HL_ULINE; |
| 1417 | } |
| 1418 | /* blink used to be converted to bold unconditionally; now depends on MB */ |
| 1419 | if ((msk & HL_BLINK) && (!MB || !*MB)) { |
| 1420 | msk |= HL_BOLD; |
| 1421 | msk &= ~HL_BLINK; |
| 1422 | } |
| 1423 | /* dim is ignored if its start sequence isn't available */ |
| 1424 | if ((msk & HL_DIM) && (!MH || !*MH)) { |
| 1425 | msk &= ~HL_DIM; |
| 1426 | } |
| 1427 | return msk; |
| 1428 | } |
| 1429 | |
| 1430 | void |
| 1431 | term_start_attr(int attr) |