I fixed up the sources to work with Domain/OS sr10.3, but didn't do anything
about the configuration scripts (except to change bsd4.2 to bsd4.3 in
configure).  Patches are in the file DIFFS-apollo.  Apply with 'patch -p'.
You'll have to edit some files by hand to get this to build.  If you make
any improvements, please send them to me.

 - Jim.Rees@umich.edu, May 1993

Also, here is a report from the net on things you might have to fix:

From: joost@cadlab.de (Michael Joosten)
Newsgroups: comp.sys.apollo
Subject: Re: Patches for emacs 19.8 on Domain/OS available
Date: 3 Jun 93 17:45:12
Organization: CADLAB, Paderborn, FRG

In article <1u5kb3$ch7@terminator.rs.itd.umich.edu> Jim.Rees@umich.edu writes:

   I just finished getting emacs 19.8 to run on Domain/OS.  That's the new
   multi X window, scroll bars and deck'o'cards menus emacs from gnu.

   Patches are available for ftp from apollo.archive.umich.edu or
   archive.umich.edu, in the apollo subdirectory, file
   emacs-19.8-patches.tar.Z.

Experience report, with SR 10.3.5 and cc-6.7/cc-6.8:

If you compile with the 6.8 compiler, make sure that you compile oldXMenu/*
also with -W0,ncompress. The C_SWITCH_MACHINE flags are not put into the
oldXMenu Makefile! Furthermore, the optimizer produces wrong code in xdisp.c,
even with the 6.7 compiler; for every 'change' in the emacs window it repaints
the whole screen! Most Apollo function keys are also not recognized.

This is my impression after my last night's compilation attempt, when I got it
working properly it was 2 am, so I don't have any patches yet, sorry.

BTW: Why can't unexapollo.c dump executables with compressed data space (.rwdi
section with relocations)? Why is it called 'compressed', since coffdump -AS
shows all the strings in their proper format? Can anybody explain what all
these funny sections are good for (.rwdi, .aptv, .mir, ...)? At least I've
learned why my attempts to compile epoch-4.2 a few weeks failed untill I used
the old 6.7 compiler again....

Michael


From: joost@cadlab.de (Michael Joosten)
Newsgroups: comp.sys.apollo
Subject: Re: Patches for emacs 19.8 on Domain/OS available -- now with full keydefs!
Date: 05 Jun 1993 20:28:39 GMT
Organization: CADLAB, Paderborn, FRG

In article <JOOST.93Jun3174512@ori.cadlab.de> joost@cadlab.de (Michael Joosten) writes:

   This is my impression after my last night's compilation attempt, when I got it
   working properly it was 2 am, so I don't have any patches yet, sorry.


   shows all the strings in their proper format? Can anybody explain what all
   these funny sections are good for (.rwdi, .aptv, .mir, ...)? At least I've

I got two replies saying that the rwdi section is for for run-length encoded
initialized data, like an array of ints completely initialized with a specific
value. This is apparently possible in Domain Pascal (?), kind of extension of
the known (well, for Unixers) BSS section.

Yesterday I checked how to enable the Apollo function keys. The following
patch shows that the solution isn't exactly elegant, but this was the easiest
way. Under X, the left and right function keys generate keycodes with an
leading 0x1000 to indicate vendor specific keys. The emacs-19 strips this away
und tries to use only the last byte (in order to pach it into a char, I
suppose). Since then the Apollo keycodes are either not defined or even
overlap so important stuff like 'backspace' or 'return', I mapped them in an
area (0xff31 - 0xff4f) that is currently not used. Just looking at the X11R5
includes, DEC also has a keysym on 0x1000FF00 (Remove) that conflicts (does
it?) with Apollo's  LineDel key....

I havn't #ifdef'ed this code because this does not make sense with X related
stuff; consider using an Apollo as simple X terminal and running emacs on a
different host...


Michael

*** src/ymakefile-	Sat Jun  5 13:00:47 1993
--- src/ymakefile	Sat Jun  5 13:06:43 1993
***************
*** 597,604 ****
  C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
  C_SWITCH_SITE_1 = C_SWITCH_SITE
  C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
  really-oldXMenu:
! 	cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \
      "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
      "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
      "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
--- 597,605 ----
  C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
  C_SWITCH_SITE_1 = C_SWITCH_SITE
  C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
+ OLDXMENU_OPTIONS_1 = OLDXMENU_OPTIONS
  really-oldXMenu:
! 	cd ${oldXMenudir}; ${MAKE} ${MFLAGS} "$(OLDXMENU_OPTIONS_1)" \
      "C_SWITCH_SITE=$(C_SWITCH_SITE_1)" \
      "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
      "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)"
*** src/m/apollo.h-	Sat Jun  5 13:11:20 1993
--- src/m/apollo.h	Sat Jun  5 13:05:29 1993
***************
*** 109,111 ****
--- 109,113 ----
  #define LD_SWITCH_MACHINE -A cpu,m68k -A sys,any -A run,bsd4.3
  #endif
  
+ #define OLDXMENU_OPTIONS CFLAGS=C_SWITCH_MACHINE
+ 
*** src/keyboard.c~	Wed Jun  2 21:54:16 1993
--- src/keyboard.c	Fri Jun  4 21:15:40 1993
***************
*** 2038,2046 ****
      "escape",
      0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 0xff20...2f */
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 0xff30...3f */
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 0xff40...4f */
! 
      "home",			/* 0xff50 */	/* IsCursorKey */
      "left",
      "up",
--- 2038,2052 ----
      "escape",
      0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 0xff20...2f */
+ #if 0
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 0xff30...3f */
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 0xff40...4f */
! #else
!     0, "linedel", "chardel", "copy", "cut", "paste", "move",
!     "grow", "cmd", "shell", "leftbar", "rightbar",
!     "leftbox", "rightbox", "upbox", "downbox", "pop", "read",
!     "edit", "save", "exit", "repeat", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! #endif
      "home",			/* 0xff50 */	/* IsCursorKey */
      "left",
      "up",
*** src/xterm.c-	Fri Jun  4 20:52:54 1993
--- src/xterm.c	Fri Jun  4 21:08:23 1993
***************
*** 2880,2885 ****
--- 2880,2888 ----
  			  && (unsigned) (keysym) >= XK_Select
  			  && (unsigned)(keysym) < XK_KP_Space)
  #endif
+ 		      /* for the wierd Apollo keysyms */
+ 		      || (((unsigned)(orig_keysym) >= 0x1000ff00) 
+ 			   && ((unsigned)(orig_keysym) <= 0x1000ff14))
  		      || IsKeypadKey (keysym)       /* 0xff80 <= x < 0xffbe */
  		      || IsFunctionKey (keysym))    /* 0xffbe <= x < 0xffe1 */
  		    {
***************
*** 2887,2893 ****
  			temp_index = 0;
  		      temp_buffer[temp_index++] = keysym;
  		      bufp->kind = non_ascii_keystroke;
! 		      XSET (bufp->code, Lisp_Int, (unsigned) keysym - 0xff00);
  		      XSET (bufp->frame_or_window, Lisp_Frame, f);
  		      bufp->modifiers = x_x_to_emacs_modifiers (modifiers);
  		      bufp->timestamp = event.xkey.time;
--- 2890,2902 ----
  			temp_index = 0;
  		      temp_buffer[temp_index++] = keysym;
  		      bufp->kind = non_ascii_keystroke;
! 		      /* Apollo strikes again, the special keysyms are mapped
! 		       * in the empty region between 0xff31 and 0xff4f */
! 		      if (((unsigned)(orig_keysym) >= 0x1000ff00) 
! 			   && ((unsigned)(orig_keysym) <= 0x1000ff14))
! 			XSET (bufp->code, Lisp_Int,(unsigned) keysym -0xff00 + 0x31);
! 		      else
! 			XSET (bufp->code, Lisp_Int, (unsigned) keysym - 0xff00);
  		      XSET (bufp->frame_or_window, Lisp_Frame, f);
  		      bufp->modifiers = x_x_to_emacs_modifiers (modifiers);
  		      bufp->timestamp = event.xkey.time;



From: kgallagh@digi.lonestar.org (Kevin Gallagher)
Newsgroups: comp.sys.apollo
Subject: Re: How to make Emacs 19 recognize Apollo Function Keys?
Date: 29 Jun 93 23:12:41 GMT
Organization: DSC Communications Corp, Plano, TX

In article <1993Jun28.195627.9064@fcom.cc.utah.edu> tcrook@u.cc.utah.edu (Tom Crook) writes:
>I compiled Emacs 19.13 using the Apollo patches mentioned on this group.  I
>also applied another patch found here that is supposed to make the right
>and left Apollo keys available to Emacs.  Everything compiled ok and Emacs
>works fine, but I can't bind anything to either the right and left function
>key groups or to the F0 through F9 keys above the keyboard.  Emacs just
>beeps whenever I hit any of the gray(Apollo-specific) keys on the keyboard,
>even if I have defined a key binding for it.
>
>Could someone please post examples of what should work in the .emacs file?
>
>Thanks

I too applied the same Apollo patches posted for Emacs 19.13.

I copied Leonard N. Zubkoff's apollo.el file from Emacs 18.57, tossed out the
DM-specific stuff, and modified the rest to work under Emacs 19 and X.  I
renamed the file to x-apollo.el, byte-compiled it, and put it into the
site-lisp directory.  I then added the following to my .emacs file:

        (load "x-apollo")

If the window system is X, the file binds function keys to match the default
bindings found in Zubkoff's Apollo enhanced GNU Emacs 18.57.

I didn't know what to do with the Move/Grow key, so I didn't bother to bind it
to anything.  Since the ALT keys serve as Meta keys, by default, (I am using a
series 400 workstation) I saw no need to make the rightbox key serve as a meta
key. I therefore assigned the leftbox and rightbox keys to behave as they do
under the DM, which is to shift the window left and right 10 columns at a
time.  Other than that, I think I pretty much just copied Zubkoff's bindings.

Enjoy!

[ file x-apollo.el included separately ]
