NetHack 2.2a/pctty.c