Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!cbatt!ucbvax!decvax!dartvax!earleh
From: earleh@dartvax.UUCP
Newsgroups: comp.sys.mac,comp.emacs
Subject: microemacs 3.8 for Mac, SE, Mac II
Message-ID: <6219@dartvax.UUCP>
Date: Fri, 15-May-87 16:24:49 EDT
Article-I.D.: dartvax.6219
Posted: Fri May 15 16:24:49 1987
Date-Received: Sat, 16-May-87 21:20:02 EDT
Organization: Society for the Prevention of Cruelty to Graduate Students
Lines: 46
Keywords: keycodes, compatibility, help
Xref: utgpu comp.sys.mac:2923 comp.emacs:884

I am working on a new port of microemacs 3.8 to the Mac.  This is
a combination of routines from Dave Burnard's 3.7i port and my
previously posted 3.8 port.  I believe I have things worked out so
the program is worthy of posting, except for one small detail, which
some kind soul might send me a note on.  By adding Dave's routines and
mine together, plus some extra coding, I now have a Mac microemacs
which supports scroll bars, resized windows, mouse cursor positioning,
and enough Mac-like gravy to allow it to masquerade as a Macintosh
application (in addition to being a serious text editor).

I had occasion to test the program out at my dealer today on an SE and a
Mac II.  Everything worked out just fine.  Thanks to a USENET article I
read before, I correctly guessed at the method to detect the new control
key (why didn't they put a control key on the Mac in the first place?)
Now for the problem:  The new Macs have a real escape key (same comment
applies) and also, apparently, real cursor keys, unlike the broken ones
the Mac+ comes with.  This is my question:  What is the recommended
manner of detecting the escape key and the cursor keys on the new
machines?  I am not a registered Mac developer, but rather a hobbyist,
and do not have the same access to information that I assume others
might have.  WILL SOMEONE PLEASE MAIL ME THE KEYCODES FOR THESE KEYS SO
THAT I CAN POST THIS PROGRAM?  I am using GetNextEvent and a keymap so
that I can use the option key as a META key, so I need keycodes, not
ASCII values!  I do not have one of the new machines myself, and so
cannot experiment to determine the correct values.

By the way, there is a serious bug in display.c, at least in the version
that I have.  In the vtinit() routine, where space is malloced for
the virtual and physical screens, only enough space is malloced for
the CURRENT number of rows and columns!  On a machine like the Mac,
where the "terminal" size can change at any moment, this is a serious
oversight.  On the Mac, I can make the window twice as wide as the 
screen if I need to, and this results in the display routines writing
to space they do not own.  A fix is to change most of the occurences 
of "term.t_ncol" and "term.t_nrow" in vtinit() to "term.t_mcol" and
"term.t_mrow".

Thanks in advance.

Earle Horton
	earleh@dartvax

-- 
****************************************************************************
*  Dot seegnachur?  I don' got to show you no steenkeen dot seegnachur!!   *
****************************************************************************