MCPcopy Create free account
hub / github.com/coreboot/coreboot / wnoutrefresh

Function wnoutrefresh

payloads/libpayload/curses/tinycurses.c:723–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721#define SWAP_RED_BLUE(c) \
722 (((c) & 0x4400) >> 2) | ((c) & 0xAA00) | (((c) & 0x1100) << 2)
723int 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) {

Callers 7

wrefreshFunction · 0.70
print_pageFunction · 0.50
dialog_textboxFunction · 0.50
dialog_checklistFunction · 0.50
dialog_clearFunction · 0.50
draw_shadowFunction · 0.50
dialog_menuFunction · 0.50

Calls 12

serial_end_boldFunction · 0.85
serial_end_altcharsetFunction · 0.85
serial_set_cursorFunction · 0.85
serial_start_boldFunction · 0.85
serial_start_reverseFunction · 0.85
serial_end_reverseFunction · 0.85
serial_start_altcharsetFunction · 0.85
serial_set_colorFunction · 0.85
video_console_putcFunction · 0.85
video_console_set_cursorFunction · 0.85
pair_contentFunction · 0.70
serial_putcharFunction · 0.50

Tested by

no test coverage detected