Rewrite tui_puts
This rewrites tui_puts. It now writes as many bytes as possible in a
call to waddnstr, letting curses handle multi-byte sequences properly.
Note that tui_puts_internal remains. It is needed to handle computing
the start line of the readline prompt, which is difficult to do
properly in the case where redisplaying can also cause the command
window to scroll. This might be possible to implement by reverting to
single "character" output, by using mbsrtowcs for its side effects to
find character boundaries in the input. I have not attempted this.
gdb/ChangeLog
2020-09-27 Tom Tromey <tom@tromey.com>
PR tui/25342:
* tui/tui-io.c (tui_puts): Rewrite. Move earlier.