more control key formatting
commit4b87255105a7fe5fab3bab74bf815568098e148e
authorPatR <rankin@nethack.org>
Mon, 13 Mar 2017 22:43:08 +0000 (13 15:43 -0700)
committerPatR <rankin@nethack.org>
Mon, 13 Mar 2017 22:43:08 +0000 (13 15:43 -0700)
tree8c257558e91e49633a0193afa20011c8c3b32577
parent08fe086124838cd6d9b4914ad7899e0c179da134
more control key formatting

The previous fix to use highc(UNCTRL(x)) worked for ^A through ^Z,
but not for NUL (yielded ^` instead of usual ^@) or ^[ through ^_
(yielded lowercase ^{ and so on).  The problem was UNCTRL(); it
shouldn't have been forcing on the lowercase bit to begin with.
Also, the code that used UNMETA() for formatting wouldn't work as
intended for M-control char since it stripped off the 8th bit but
didn't apply any fixup for control chars.

Just get rid of ISCTRL/ISMETA/UNCTRL/UNMETA and use the existing
visctrl() routine instead.  (Its 3.6.0 edition didn't handle
M-control char, but the to-be-3.6.1 branch has done so since a
week or two after the 3.6.0 release.)
src/cmd.c