Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!munnari.oz.au!metro!cluster!tmx!brahman!melb.bull.oz.au!zen!sjg From: sjg@zen.void.oz.au (Simon J. Gerraty) Newsgroups: comp.emacs Subject: Re: Who uses MicroEMACS3.10 on UNIX? Message-ID: <1991Mar18.045008.28313@zen.void.oz.au> Date: 18 Mar 91 04:50:08 GMT References: <458@rc6.urc.tue.nl> <1991Mar01.163116.18362@convex.com> Organization: zen programming... Lines: 83 In <1991Mar01.163116.18362@convex.com> mascio@convex.com (John R.S. Mascio) writes: >In article <458@rc6.urc.tue.nl> rcpt@urc.tue.nl writes: >> >>In an attempt to install MicroEMACS 3.10 (the MS-DOS distribution in >>several .arc files) on UNIX I ran into several problems. So I am asking >>myself the question: `Is MicroEMACS3.10 used on UNIX at all?' And `Am I >>using the correct distribution?'. The most severe problem I encountered >>is the fact that it does not run nicely in a xterm window. In such a >>window the status line is not displayed correctly and the arrow keys >>do not work properly. >... The arrow keys are a bit of a problem. >Unless they give a simple control code or something of the form "^[[x", >where x is some single character, you will not be able to use them. >This is bound with the key of FNx (where x is the same x as before). I used MicroEMACS on a Sun for some time before getting GNU emacs. I persisted with MicroEMACS for some time as I too had to use PC's also GNU emacs versions prior to about 18.54 did not work with the bourne shell on the sun386i. That is no longer the case, and I haven't used MicroEMACS for a year or so. The version I used was my own heavily munged 3.9a To handle the function (and cursor) keys on the Sun - which generate \E[214z etc I added some code to input.c (see below). Later, I wrote a curses interface for MicroEMACS that was much more useful. If there is interest I'll post my curses.[ch] somewhere. I used this interface on various System V machines as well as the Sun. getcmd() { int c; /* fetched keystroke */ /* get initial character */ c = get1key(); /* process META prefix */ if (c == metac) { c = get1key(); if (islower(c)) /* Force to upper */ c ^= DIFCASE; if (c>=0x00 && c<=0x1F) /* control key */ c = CTRL | (c+'@'); #if 1 /* temporary ESC sequence fix......... */ if (c == '[') { #if 0 /* def sun386 until curses.c works */ while ((c = get1key()) != 'z' && i < 6) { tmp[i++] = c & 127; tmp[i] = '\0'; } c = atoi(tmp) & 127; #else c = get1key(); #endif return(SPEC | c); } #endif return(META | c); } /* process CTLX prefix */ if (c == ctlxc) { c = get1key(); if (c>='a' && c<='z') /* Force to upper */ c -= 0x20; if (c>=0x00 && c<=0x1F) /* control key */ c = CTRL | (c+'@'); return(CTLX | c); } /* otherwise, just return it */ return(c); } -- Simon J. Gerraty #include /* imagine something _very_ witty here */