| 721 | #define SWAP_RED_BLUE(c) \ |
| 722 | (((c) & 0x4400) >> 2) | ((c) & 0xAA00) | (((c) & 0x1100) << 2) |
| 723 | int wnoutrefresh(WINDOW *win) |
| 724 | { |
| 725 | #if CONFIG(LP_SERIAL_CONSOLE) |
| 726 | // FIXME. |
| 727 | int serial_is_bold = 0; |
| 728 | int serial_is_reverse = 0; |
| 729 | int serial_is_altcharset = 0; |
| 730 | int serial_cur_pair = 0; |
| 731 | |
| 732 | int need_altcharset; |
| 733 | short fg, bg; |
| 734 | #endif |
| 735 | int x, y; |
| 736 | chtype ch; |
| 737 | |
| 738 | #if CONFIG(LP_SERIAL_CONSOLE) |
| 739 | serial_end_bold(); |
| 740 | serial_end_altcharset(); |
| 741 | #endif |
| 742 | |
| 743 | for (y = 0; y <= win->_maxy; y++) { |
| 744 | |
| 745 | if (win->_line[y].firstchar == _NOCHANGE) |
| 746 | continue; |
| 747 | |
| 748 | /* Position the serial cursor */ |
| 749 | |
| 750 | #if CONFIG(LP_SERIAL_CONSOLE) |
| 751 | if (curses_flags & F_ENABLE_SERIAL) |
| 752 | serial_set_cursor(win->_begy + y, win->_begx + |
| 753 | win->_line[y].firstchar); |
| 754 | #endif |
| 755 | |
| 756 | for (x = win->_line[y].firstchar; x <= win->_line[y].lastchar; x++) { |
| 757 | attr_t attr = win->_line[y].text[x].attr; |
| 758 | |
| 759 | #if CONFIG(LP_SERIAL_CONSOLE) |
| 760 | if (curses_flags & F_ENABLE_SERIAL) { |
| 761 | ch = win->_line[y].text[x].chars[0]; |
| 762 | |
| 763 | if (attr & A_BOLD) { |
| 764 | if (!serial_is_bold) { |
| 765 | serial_start_bold(); |
| 766 | serial_is_bold = 1; |
| 767 | } |
| 768 | } else { |
| 769 | if (serial_is_bold) { |
| 770 | serial_end_bold(); |
| 771 | serial_is_bold = 0; |
| 772 | /* work around serial.c |
| 773 | * shortcoming: |
| 774 | */ |
| 775 | serial_is_reverse = 0; |
| 776 | serial_cur_pair = 0; |
| 777 | } |
| 778 | } |
| 779 | |
| 780 | if (attr & A_REVERSE) { |
no test coverage detected