Stupid MORE breaks on a rubout key when it should not

Dave Martindale dmmartindale at watcgl.UUCP
Fri Oct 28 03:32:53 AEST 1983


More has the character RUBOUT compiled into it as one of the cases in
a switch statement.  The code is prettier this way than if an IF
was used to check against your current interrupt character, but is
thus braindamaged.  Lesson to all programmers: avoid compiling things
like RUBOUT as the interrupt character into your program if it in fact
can be changed by the user.

Vi suffers from a related problem:  if one of your arrow keys transmits ^Z,
you can't use it and still be able to suspend your program, even if you
reassign your suspend character.  The reason is that ^Z is compiled in
(a case of a switch again) as the suspend character, and if you pick
another suspend character vi will arrange to map it to ^Z internally,
which means that you can't map the ^Z from the arrow key into one of hjkl
because that would remap the suspend character too.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list