* Print a new line of text. */
| 82 | * Print a new line of text. |
| 83 | */ |
| 84 | static void print_line(WINDOW *win, int row, int width) |
| 85 | { |
| 86 | char *line; |
| 87 | |
| 88 | line = get_line(); |
| 89 | line += MIN(strlen(line), hscroll); /* Scroll horizontally */ |
| 90 | wmove(win, row, 0); /* move cursor to correct line */ |
| 91 | waddch(win, ' '); |
| 92 | waddnstr(win, line, MIN(strlen(line), width - 2)); |
| 93 | |
| 94 | /* Clear 'residue' of previous line */ |
| 95 | wclrtoeol(win); |
| 96 | } |
| 97 | |
| 98 | /* |
| 99 | * Print a new page of text. |
no test coverage detected