| 1768 | } |
| 1769 | |
| 1770 | static void |
| 1771 | process_text_window(winid window, struct WinDesc *cw) |
| 1772 | { |
| 1773 | int i, n, attr; |
| 1774 | boolean linestart; |
| 1775 | char *cp; |
| 1776 | |
| 1777 | for (n = 0, i = 0; i < cw->maxrow; i++) { |
| 1778 | HUPSKIP(); |
| 1779 | if (!cw->offx && (n + cw->offy == ttyDisplay->rows - 1)) { |
| 1780 | tty_curs(window, 1, n); |
| 1781 | cl_end(); |
| 1782 | dmore(cw, quitchars); |
| 1783 | if (morc == '\033') { |
| 1784 | cw->flags |= WIN_CANCELLED; |
| 1785 | break; |
| 1786 | } |
| 1787 | if (cw->offy) { |
| 1788 | tty_curs(window, 1, 0); |
| 1789 | cl_eos(); |
| 1790 | } else |
| 1791 | term_clear_screen(); |
| 1792 | n = 0; |
| 1793 | } |
| 1794 | tty_curs(window, 1, n++); |
| 1795 | #ifdef H2344_BROKEN |
| 1796 | cl_end(); |
| 1797 | #else |
| 1798 | if (cw->offx) |
| 1799 | cl_end(); |
| 1800 | #endif |
| 1801 | if (cw->data[i]) { |
| 1802 | attr = cw->data[i][0] - 1; |
| 1803 | if (cw->offx) { |
| 1804 | (void) putchar(' '); |
| 1805 | ++ttyDisplay->curx; |
| 1806 | } |
| 1807 | term_start_attr(attr); |
| 1808 | for (cp = &cw->data[i][1], linestart = TRUE; |
| 1809 | #ifndef WIN32CON |
| 1810 | *cp && (int) ++ttyDisplay->curx < (int) ttyDisplay->cols; |
| 1811 | cp++ |
| 1812 | #else |
| 1813 | *cp && (int) ttyDisplay->curx < (int) ttyDisplay->cols; |
| 1814 | cp++, ttyDisplay->curx++ |
| 1815 | #endif |
| 1816 | ) { |
| 1817 | /* message recall for msg_window:full/combination/reverse |
| 1818 | might have output from '/' in it (see redotoplin()) */ |
| 1819 | if (linestart) { |
| 1820 | if (SYMHANDLING(H_UTF8)) { |
| 1821 | /* FIXME: what is actually in that line? is it the \GNNNNNNNN or UTF-8? */ |
| 1822 | g_putch(*cp); |
| 1823 | } else if ((*cp & 0x80) != 0) { |
| 1824 | g_putch(*cp); |
| 1825 | end_glyphout(); |
| 1826 | } else { |
| 1827 | (void) putchar(*cp); |
no test coverage detected