It is now in two smaller pieces; display-classic.cc (400 lines) includes only curses code, and ui-classic.cc (800 lines) includes only display agnostic code. In principle, a tiles port could be implemented changing only display-xxx.
This is required in order for mprdb to play nicely with dumb spectation systems, such as termcast and dgamelaunch. 200 is an empirical number chosen such as to not quite fill up termcast's 100KB output buffer; dgamelaunch has an unlimited output buffer, but takes linear space, so anything much larger than 200 would be unwise.
The opens the pathway to someday support message history. More importantly, ncurses interprets the use of addch() scrolling as a license to ignore idlok. Changing this fixes the "termcast screen shredding" issue.
Idea stolen from Crawl; message_line (and thus print_msg) now processes psuedo-HTML escapes like <lgreen> to modify following text. print_inv now has *no* excessive knowledge of the fact that it's being targetted to curses.
Most of the complexity of this patch is in changing the save code to allow clobbering and not auto-exit.
This means that if the game crashes, you don't lose your save. This also means that it's possible to cheat with signals and power cuts. I don't see this as a big problem, since you can already cheat with cp (and ptrace, which uses the same access checks as non-terminal signals).
fixed omitted flavour-setting for scrolls of protection fixed omitted recalc_defence() call for Player::on_remove
Whether they really work is a separate question which will be dealt with later.