File win32/pdcscrn.c changed (mode: 100644) (index da84cdeb..4d9ce510) |
... |
... |
void PDC_init_pair(short pair, short fg, short bg) |
555 |
555 |
|
|
556 |
556 |
for (i = 0; i < PDC_OFFSET; i++) |
for (i = 0; i < PDC_OFFSET; i++) |
557 |
557 |
{ |
{ |
|
558 |
|
const int reverse = (i & (A_REVERSE >> PDC_ATTR_SHIFT)); |
|
559 |
|
|
558 |
560 |
att = fg | (bg << 4); |
att = fg | (bg << 4); |
559 |
561 |
|
|
560 |
|
if (i & (A_REVERSE >> PDC_ATTR_SHIFT)) |
|
|
562 |
|
if (reverse) |
561 |
563 |
att = bg | (fg << 4); |
att = bg | (fg << 4); |
562 |
564 |
if (i & (A_UNDERLINE >> PDC_ATTR_SHIFT)) |
if (i & (A_UNDERLINE >> PDC_ATTR_SHIFT)) |
563 |
565 |
/* No underscores in Windows terminals. */ |
/* No underscores in Windows terminals. */ |
|
... |
... |
void PDC_init_pair(short pair, short fg, short bg) |
568 |
570 |
att = temp_bg << 4 | temp_bg; |
att = temp_bg << 4 | temp_bg; |
569 |
571 |
} |
} |
570 |
572 |
if (i & (A_BOLD >> PDC_ATTR_SHIFT)) |
if (i & (A_BOLD >> PDC_ATTR_SHIFT)) |
571 |
|
att |= 8; |
|
|
573 |
|
att |= reverse ? 128 : 8; |
572 |
574 |
if (i & (A_BLINK >> PDC_ATTR_SHIFT)) |
if (i & (A_BLINK >> PDC_ATTR_SHIFT)) |
573 |
|
att |= 128; |
|
|
575 |
|
att |= reverse ? 8 : 128; |
574 |
576 |
|
|
575 |
577 |
pdc_atrtab[pair * PDC_OFFSET + i] = att; |
pdc_atrtab[pair * PDC_OFFSET + i] = att; |
576 |
578 |
} |
} |