Article View: comp.sys.mac
Article #20838display bug in MacKermit 0.8(xx)
From: Earle R. Horton
Date: Tue, 27 Oct 1987 13:17
Date: Tue, 27 Oct 1987 13:17
54 lines
3335 bytes
3335 bytes
There is a bug in the display code for MacKermit 0.8(xx) versions, and it's an
obscure one, at that. I have fixed it for 0.8(43A) (where do they get these
version numbers?), perhaps not correctly. This bug affects the ability of
certain VMS editors (EVE, EDT) to display selected text correctly for cut and
paste operations. Here is the description of the bug and my bumbling attempt
at a fix. Perhaps someone would care to forward this to the person in charge
of MacKermit if he doesn't read this newsgroup. Then it might get fixed in
the current version (I'll be d*mned if I will have anything to do with a
compiler that uses 8-bit shorts on a 68000, myself).
The syntax for the ANSI sequence to call for a text mode change is
escape-left bracket-ASCII encoded decimal integer-'m'. According to the VMS
system manager here, an alternate, also correct syntax is
escape-left bracket-semicolon-ASCII encoded decimal integer-'m'. Certain
other ANSI escape sequences use an escape syntax with two ASCII integers
separated by a semicolon. The code for handling escape sequences in ckmcon.c
stores two integers, then passes them to the function corresponding to the
letter opcode. Apparently, if the letter opcode is anything but 'm' and the
left bracket is followed immediately by a semicolon, then it is correct to
interpret this to mean zero-semicolon-other number. If the letter opcode is
'm', however, then this response is incorrect, as evidenced by MackKermit's
inability to highlight text correctly when using EVE. Some examples:
"^[[;7m" is apparently the same thing as "^[[7m", however "^[[;21r" is
not the same thing as "^[[21r".
Whether this is a bug in MacKermit, or a perversion in the ANSI standard, I
can't say with any authority, but the following repair causes MacKermit to
work correctly with EVE and EDT, and possibly with other programs. Find the
function text_mode(), and make the following change:
Old code:
<text_mode() /**** */
<{
< switch(num1)
< {
New code:
>text_mode() /**** */
>{
> switch(num1 + num2)
> {
Aside: I appreciate the effort that went into porting MacKermit to Megamax,
and I think it was definitely a worthwhile thing to do. The source code for
xkmker 0.8(35) no longer will compile under summac, however. Please, if you
are considering porting a program to another compiler/operating system/planet,
try not to destroy the original in the process. (Not that I actually follow
this advice, myself!)
Cheers.
--
*********************************************************************
*Earle R. Horton, H.B. 8000, Dartmouth College, Hanover, NH 03755 *
*********************************************************************
Technical Details
Message-ID:
<7486@dartvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ucbcad!ucbvax!decvax!dartvax!earlehShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ucbcad!ucbvax!decvax!dartvax!earleh From: earleh@dartvax.UUCP (Earle R. Horton) Newsgroups: comp.sys.mac Subject: display bug in MacKermit 0.8(xx) Message-ID: <7486@dartvax.UUCP> Date: Tue, 27-Oct-87 08:17:20 EST Article-I.D.: dartvax.7486 Posted: Tue Oct 27 08:17:20 1987 Date-Received: Sat, 31-Oct-87 00:53:16 EST Organization: disorganized Lines: 54 Keywords: bug, display, obscure, possible fix