NetHack 2.2a/write.c