Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!necntc!ames!aurora!barry From: barry@aurora.UUCP (Kenn Barry) Newsgroups: comp.sys.amiga Subject: MicroEMACS 3.8i on the Amiga Message-ID: <752@aurora.UUCP> Date: Fri, 3-Jul-87 02:48:01 EDT Article-I.D.: aurora.752 Posted: Fri Jul 3 02:48:01 1987 Date-Received: Sat, 4-Jul-87 11:04:11 EDT Organization: NASA Ames Research Center, Mt. View, Ca. Lines: 93 Keywords: minor patches [] I just recently installed MicroEMACS 3.8i as my Amiga system editor, and though the code was already #ifdef'ed for the Amiga, I ran into a couple of needed alterations for it, so I thought I'd post them. The first is a problem that's come up with nearly every release of uemacs for those of us using Manx. The Manx default is to have the ctrl-C interrupt enabled, and since ctrl-C is a uemacs command, there's a conflict. Hitting ctrl-C will bomb uemacs, though not immediately; it happens on the next disk access, when the system calls Check_Abort(), and realizes ctrl-C was hit. Anyway, the fix is to add the following lines to the termio.c module: ------------------------------------------------------------------------- In the ttopen() routine, here's the original code: #if AMIGA terminal = Open("RAW:1/1/639/199/MicroEMACS 3.7/Amiga", NEW); #endif Change it to the following: #if AMIGA extern Enable_Abort; /* Turn off ctrl-C interrupt */ Enable_Abort = 0; /* for the Manx compiler */ terminal = Open("RAW:1/1/639/199/MicroEMACS 3.7/Amiga", NEW); #endif Now change the ttclose() routine from this: #if AMIGA amg_flush(); Close(terminal); #endif to this: #if AMIGA amg_flush(); Enable_Abort = 1; /* Fix for Manx */ Close(terminal); #endif ------------------------------------------------------------------------ The other fix is minor, but worth mentioning: if you turn on the color option, you'll get peculiar results. It was written for MSDOS machines, and the color codes are different. For instance, what's "white" to a PC is "orange" (using the standard workbench color selections) on an Amiga. Result: all your text will be in orange if you turn this option on. And the add-mode commands to change colors will have the wrong names attached to the colors - confusing! The fix goes in the edef.h header file. Make the following changes: ------------------------------------------------------------------------- Change this: char *cname[] = { /* names of colors */ "BLACK", "RED", "GREEN", "YELLOW", "BLUE", "MAGENTA", "CYAN", "WHITE"}; to this: #if AMIGA char *cname[] = { /* names of colors */ "BLUE", "WHITE", "BLACK", "ORANGE", "BLUE", "WHITE", "BLACK", "ORANGE"}; #else char *cname[] = { /* names of colors */ "BLACK", "RED", "GREEN", "YELLOW", "BLUE", "MAGENTA", "CYAN", "WHITE"}; #endif And then change this: int gfcolor = 7; /* global forgrnd color (white) */ to this: #if AMIGA int gfcolor = 1; /* global forgrnd color (white) */ #else int gfcolor = 7; /* global forgrnd color (white) */ #endif ------------------------------------------------------------------------- One final note: you'll need to compile with the long integer option (+L). Without it, you'll get an error-free compile and link, but the sucker won't run. If anybody has a fix for *that*, please let me know. I'm short of space on my system disk, and I'd love to be able to compile uemacs into a more compact executable. - From the Crow's Nest - Kenn Barry NASA-Ames Research Center Moffett Field, CA ----------------------------------------------------------------------------- ELECTRIC AVENUE: {hplabs,seismo,dual,ihnp4}!ames!aurora!barry