[comp.windows.x] Andrew Toolkit on SUN 4/4.0.1

fuller@isctsse.UUCP (Bill Fuller) (04/26/89)

Hi,

	Has anyone successfully compiled the andrew toolkit on a SUN 4
under 4.0.1 OS.  I have been trying to get the pieces compiled, and have been
flooded by compile errors.  One that really seems strange is that the
regexp.h file under SUN OS, is included in the eli lib make.  The file
primitives.c asks for a declaration of type regexp, which is not defined
in regexp.h.   Does anyone have any answers?

				Thankyou for your input,

					Bill Fuller

janssen@titan.sw.mcc.com (Bill Janssen) (04/26/89)

< from the comp.soft-sys.andrew newsgroup: >

>From: oren@stroke.csc.ti.com (LaMott Oren)
>Subject: ATK on Sun 4
>Message-ID: <8904212205.AA05231@stroke.csc.ti.com>
>Date: 21 Apr 89 22:05:01 GMT

Steven Tepper ("greep.mvenvos@Xerox.COM") figured out how to get ATK working on
the Sun4.  Here are excerpts from a message he sent me:

---------------- Forwarded Message -----------------
From: greep.mvenvos@Xerox.COM
To: oren@stroke.csc.ti.com
Date: 29 Mar 89 20:06:41 PST (Wednesday)
In-Reply-To: oren%stroke.csc.ti:COM:Xerox's message of 29 Mar 89 13:32

Actually I've been so swamped with other things I haven't even looked at
that stuff any more since then.  Sorry about that.  If you want to try to
put together a "clean" distribution (which may be nothing more than taking
out my debugging printf's) I'll be glad to get out of the loop.

I started with the stuff on ~ftp at cmu.  When I ran into problems I
assumed they were caused by doload and started looking for things that
might be wrong with it.  (I never could get Sun to give me a description of
the relocation formats used in SPARC a.out files, but empirically it seems
that only four of them are ever generated by the Sun C compiler unless you
use -pic or -PIC.)  So I put in a bunch of debugging statements and changed
things that looked like they might have been wrong.  For all I know I may
have done more harm than good, as it turned out that most of the problems
were caused by a real bug in the Andrew sources, which appeared in several
difference source files - a function that takes a union as one of its
arguments but is called instead with a object whose type is one of the
elements of the union rather than an instance of the union itself.  This
works on the 68000 C compiler (and would probably work on most others)
since there the whole object is just pushed on the stack in either case
(union or primitive data type), whereas Sun's SPARC compiler puts a copy of
the union in temporary storage (which in fact happens to be the stack, but
arguments are passed via registers, not the stack) and passes just the
address of that copy as an argument.  All references in the called function
are done by indirection off that address.  This happens even when the union
is only one word long, as was the case here.  So passing an element of the
union where a union was expcted causes indirection to be done when it
shouldn't be.

-------------- End forwarded message ---------------

Steven's analysis is correct.  I took the stuff on ~ftp at cmu, got the
compiler errors out, and applied the diffs Steven sent me and ATK works fine.
AMS still doesn't work however. I too have become "swamped with other things",
but I pass these patches on in hopes they will help others. Here are the
patches Steven sent me:

*** ../../../../X.V11R3/contrib/toolkits/andrew/config/Sun.macros	Wed Jan
4 11:26:17 1989
--- config/Sun.macros	Wed Feb 15 12:05:31 1989
***************
*** 8,20 ****
  /* if you have imake and makedepend installed somwhere, you can leave */
  /* this blank and take care of imake and makedepend (and fc) below */
  /*        XSRCDIR = /x11 */
!         XSRCDIR = /python2/X.V11R3
  /* set DESTDIR to where you want Andrew installed */
  /* it is necessary that it be installed incrementally, while it is built
*/
! /*        DESTDIR = /usr/andrew */
!         DESTDIR = /usr/local/andrew
          BASEDIR = $(DESTDIR)
!         CDEBUGFLAGS = -O
  
          INCLUDES =  -I${BASEDIR}/include/atk -I${BASEDIR}/include
-I${XBASEDIR}/usr/include
  /* Check and Set the RESOLVELIB path below */
--- 8,20 ----
  /* if you have imake and makedepend installed somwhere, you can leave */
  /* this blank and take care of imake and makedepend (and fc) below */
  /*        XSRCDIR = /x11 */
!         XSRCDIR = /usr/king2/X.V11R3
  /* set DESTDIR to where you want Andrew installed */
  /* it is necessary that it be installed incrementally, while it is built
*/
!         DESTDIR = /usr/andrew
          BASEDIR = $(DESTDIR)
! /*      CDEBUGFLAGS = -O */
!         CDEBUGFLAGS =
  
          INCLUDES =  -I${BASEDIR}/include/atk -I${BASEDIR}/include
-I${XBASEDIR}/usr/include
  /* Check and Set the RESOLVELIB path below */
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/apps/Imakefile	Sat Sep
17 23:42:53 1988
--- atk/apps/Imakefile	Fri Feb 17 23:51:49 1989
***************
*** 25,30 ****
--- 25,32 ----
  
  NormalObjectRule()
  
+ CC = cc -Bstatic
+ 
  ProgramTarget(runapp, runapp.o staticloads.o, ${ATKLIBS} ${OTHERLIBS},
${SYSLIBS})
  ProgramTarget(minrunapp, minrunapp.o minstaticloads.o, ${ATKLIBS}
${OTHERLIBS}, ${SYSLIBS})
  
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/ctext/ctext.c	Tue Oct
11 08:31:09 1988
--- atk/ctext/ctext.c	Wed Mar  8 20:29:33 1989
***************
*** 148,157 ****
  boolean incB, incE;
  {
      struct environment *env;
      if (self->comment_style == NULL)
          return;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, self->comment_style, TRUE);
      environment_SetLength(env, len);
      environment_SetStyle(env, incB, incE);
  }
--- 148,159 ----
  boolean incB, incE;
  {
      struct environment *env;
+     union environmentcontents data;
      if (self->comment_style == NULL)
          return;
+     data.style = self->comment_style;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, data, TRUE);
      environment_SetLength(env, len);
      environment_SetStyle(env, incB, incE);
  }
***************
*** 161,170 ****
  long start, len;
  {
      struct environment *env;
      if (self->fnname_style == NULL)
          return;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, self->fnname_style, TRUE);
      environment_SetLength(env, len);
  }
  
--- 163,174 ----
  long start, len;
  {
      struct environment *env;
+     union environmentcontents data;
      if (self->fnname_style == NULL)
          return;
+     data.style = self->fnname_style;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, data, TRUE);
      environment_SetLength(env, len);
  }
  
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/ltext/ltext.c	Thu Sep
15 09:59:42 1988
--- atk/ltext/ltext.c	Wed Mar  8 20:32:25 1989
***************
*** 223,229 ****
  
                      case inname:
                          if (c <= ' ' || c == '(' || c == ')' || c == ';')
{
!                             newenv =
environment_Insert(self->header.text.rootEnvironment, fnpos,
environment_Style, self->fnname_style, 1);
                              environment_SetLength(newenv, posn - fnpos);
                              defwhatever = nodef;
                          }
--- 223,231 ----
  
                      case inname:
                          if (c <= ' ' || c == '(' || c == ')' || c == ';')
{
! 			    union environmentcontents data;
! 			    data.style = self->fnname_style;
!                             newenv =
environment_Insert(self->header.text.rootEnvironment, fnpos,
environment_Style, data, 1);
                              environment_SetLength(newenv, posn - fnpos);
                              defwhatever = nodef;
                          }
***************
*** 260,266 ****
              case comment:
                  substate = nothing;
                  if (c == '\n') {
!                     newenv =
environment_Insert(self->header.text.rootEnvironment, commentpos,
environment_Style, self->comment_style, 1);
                      environment_SetLength(newenv, posn - commentpos);
                      state = normal;
                  }
--- 262,270 ----
              case comment:
                  substate = nothing;
                  if (c == '\n') {
! 		    union environmentcontents data;
! 		    data.style = self->comment_style;
!                     newenv =
environment_Insert(self->header.text.rootEnvironment, commentpos,
environment_Style, data, 1);
                      environment_SetLength(newenv, posn - commentpos);
                      state = normal;
                  }
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/rofftext/roffstyles.c
Thu Sep 15 07:20:59 1988
--- atk/rofftext/roffstyles.c	Wed Mar  8 19:46:39 1989
***************
*** 74,82 ****
      CloseStyle(self);
      newid = BeginStyle(self,st);
      for(l=self->tempstack->level;l>=0;l--) {
          self->stack++;
          self->stack->pos = self->pos;
!         self->stack->env = environment_Insert((self->stack-1)->env,
self->pos - (self->stack-1)->pos, environment_Style,
self->tempstack->style, TRUE);
          self->stack->level = (self->stack-1)->level+1;
          self->stack->ID = self->tempstack->ID;
          self->tempstack--;
--- 74,85 ----
      CloseStyle(self);
      newid = BeginStyle(self,st);
      for(l=self->tempstack->level;l>=0;l--) {
+         union environmentcontents data;
+ 
          self->stack++;
          self->stack->pos = self->pos;
! 	data.style = self->tempstack->style;
!         self->stack->env = environment_Insert((self->stack-1)->env,
self->pos - (self->stack-1)->pos, environment_Style, data, TRUE);
          self->stack->level = (self->stack-1)->level+1;
          self->stack->ID = self->tempstack->ID;
          self->tempstack--;
***************
*** 116,121 ****
--- 119,125 ----
  char *st;
  {
      struct style *style;
+     union environmentcontents data;
  
      if (st == NULL)
          return 0;
***************
*** 128,134 ****
      }
      self->stack++;
      self->stack->pos = self->pos;
!     self->stack->env = environment_Insert((self->stack-1)->env, self->pos
- (self->stack-1)->pos, environment_Style, style, TRUE);
      self->stack->level = (self->stack-1)->level+1;
      self->stack->ID = self->styleID++;
  
--- 132,139 ----
      }
      self->stack++;
      self->stack->pos = self->pos;
!     data.style = style;
!     self->stack->env = environment_Insert((self->stack-1)->env, self->pos
- (self->stack-1)->pos, environment_Style, data, TRUE);
      self->stack->level = (self->stack-1)->level+1;
      self->stack->ID = self->styleID++;
  
***************
*** 162,170 ****
      }
      CloseStyle(self);
      for(l=self->tempstack->level;l>=0;l--) {
          self->stack++;
          self->stack->pos = self->pos;
!         self->stack->env = environment_Insert((self->stack-1)->env,
self->pos - (self->stack-1)->pos, environment_Style,
self->tempstack->style, TRUE);
          self->stack->level = (self->stack-1)->level+1;
          self->stack->ID = self->tempstack->ID;
          self->tempstack--;
--- 167,178 ----
      }
      CloseStyle(self);
      for(l=self->tempstack->level;l>=0;l--) {
+         union environmentcontents data;
+ 
          self->stack++;
          self->stack->pos = self->pos;
! 	data.style = self->tempstack->style;
!         self->stack->env = environment_Insert((self->stack-1)->env,
self->pos - (self->stack-1)->pos, environment_Style, data, TRUE);
          self->stack->level = (self->stack-1)->level+1;
          self->stack->ID = self->tempstack->ID;
          self->tempstack--;
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/termulator/termulator.c
Mon Sep 19 12:04:39 1988
--- atk/termulator/termulator.c	Wed Mar  8 20:40:15 1989
***************
*** 35,40 ****
--- 35,41 ----
  #include <sys/signal.h>
  #include <sys/errno.h>
  #include <sys/wait.h>
+ #include <fcntl.h>
  
  #include <class.h>
  
***************
*** 158,163 ****
--- 159,165 ----
  struct termulator *self;
  {
      if(self->screen<0){
+         union environmentcontents data;
  	long bpos=self->lastSubmit,
  	    pos=termulator_GetFence(self);
  	int ht=self->height,wid,
***************
*** 171,180 ****
  
  	self->screen=pos;
  
  	self->screenEnv=
  	  environment_Insert(self->header.text.rootEnvironment,
  			     pos,
! 			     environment_Style,self->screenStyle,
  			     TRUE);
  	environment_SetLength(self->screenEnv,termulator_GetFence(self)-pos);
  	environment_SetStyle(self->screenEnv,TRUE,TRUE);
--- 173,183 ----
  
  	self->screen=pos;
  
+ 	data.style = self->screenStyle;
  	self->screenEnv=
  	  environment_Insert(self->header.text.rootEnvironment,
  			     pos,
! 			     environment_Style,data,
  			     TRUE);
  	environment_SetLength(self->screenEnv,termulator_GetFence(self)-pos);
  	environment_SetStyle(self->screenEnv,TRUE,TRUE);
***************
*** 392,407 ****
       * wouldn't be too hard.
       */
      if(self->standout){
  	env=environment_GetInnerMost(self->header.text.rootEnvironment,pos);
  	if(env==self->screenEnv){
  	    env=
  	      environment_Insert(env,
  				 pos-self->screen,
! 				 environment_Style,self->soStyle,
  				 TRUE);
  	    environment_SetLength(env,0);
  	}else if(env==self->header.text.rootEnvironment){
!
env=environment_Insert(env,pos,environment_Style,self->soStyle,TRUE);
  	    environment_SetLength(env,0);
  	}
  	environment_SetStyle(env,TRUE,TRUE);
--- 395,412 ----
       * wouldn't be too hard.
       */
      if(self->standout){
+         union environmentcontents data;
+ 	data.style = self->soStyle;
  	env=environment_GetInnerMost(self->header.text.rootEnvironment,pos);
  	if(env==self->screenEnv){
  	    env=
  	      environment_Insert(env,
  				 pos-self->screen,
! 				 environment_Style,data,
  				 TRUE);
  	    environment_SetLength(env,0);
  	}else if(env==self->header.text.rootEnvironment){
! 	    env=environment_Insert(env,pos,environment_Style,data,TRUE);
  	    environment_SetLength(env,0);
  	}
  	environment_SetStyle(env,TRUE,TRUE);
***************
*** 1348,1360 ****
  	}
  
  	if(*fenceP==termulator_GetLength(self)){
  	    self->cmdEnv=
  	      environment_Insert(self->header.text.rootEnvironment,
  				 *fenceP,
  				 environment_Style,
! 				 (self->mode&ECHO
! 				  ?self->cmdStyle
! 				  :self->noechoStyle),
  				 TRUE);
  	    environment_SetLength(self->cmdEnv,0);
  	    environment_SetStyle(self->cmdEnv,FALSE,TRUE);
--- 1353,1365 ----
  	}
  
  	if(*fenceP==termulator_GetLength(self)){
+ 	    union environmentcontents data;
+ 	    data.style = (self->mode&ECHO) ? self->cmdStyle : self->noechoStyle;
  	    self->cmdEnv=
  	      environment_Insert(self->header.text.rootEnvironment,
  				 *fenceP,
  				 environment_Style,
! 				 data,
  				 TRUE);
  	    environment_SetLength(self->cmdEnv,0);
  	    environment_SetStyle(self->cmdEnv,FALSE,TRUE);
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/text/be1be2.c	Thu Sep
15 13:17:28 1988
--- atk/text/be1be2.c	Wed Mar  8 20:14:22 1989
***************
*** 606,611 ****
--- 606,612 ----
  
          if ((0xc0 & p) == 0xc0 && p != 0xff) {    /* Begin env */
              struct environment *newenv;
+ 	    union environmentcontents data;
              style = NULL;
  
              if (BE1map[p - 0xc0] != NULL)
***************
*** 614,620 ****
                  retVal = FALSE;
                  continue;
              }
!             newenv = environment_Insert(envSP->env, pos - 1 - envSP->pos,
environment_Style, style, TRUE);
              envSP++;
              envSP->env = newenv;
              envSP->pos = pos - 1;
--- 615,622 ----
                  retVal = FALSE;
                  continue;
              }
! 	    data.style = style;
!             newenv = environment_Insert(envSP->env, pos - 1 - envSP->pos,
environment_Style, data, TRUE);
              envSP++;
              envSP->env = newenv;
              envSP->pos = pos - 1;
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/text/readscr.c	Thu Sep
15 09:01:08 1988
--- atk/text/readscr.c	Wed Mar  8 19:54:41 1989
***************
*** 475,480 ****
--- 475,481 ----
  struct style *tempstyle;
  {
      int rpos;
+     union environmentcontents data;
  
      if (Top++ >= STACKSIZE) {
  	goshdarn("Environment stack overflow.");
***************
*** 488,494 ****
      Stack[Top]->CheckMode = Mode;
  
      rpos = End - PPos;
!     Par = environment_Insert(Par, rpos, environment_Style, tempstyle, 1);
      environment_SetStyle(Par, FALSE, FALSE);
      PPos = End;
      return(0);
--- 489,496 ----
      Stack[Top]->CheckMode = Mode;
  
      rpos = End - PPos;
!     data.style = tempstyle;
!     Par = environment_Insert(Par, rpos, environment_Style, data, 1);
      environment_SetStyle(Par, FALSE, FALSE);
      PPos = End;
      return(0);
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/text/text.c	Sat Sep 17
22:50:33 1988
--- atk/text/text.c	Wed Mar  8 16:34:40 1989
***************
*** 334,339 ****
--- 334,340 ----
  {
      struct environment *newenv;
      struct style *style;
+     union environmentcontents data;
  
      static char *EOFerror =
        "EOF encountered while reading in a view marker or template name -
ignoring\n";
***************
*** 431,437 ****
          viewref_AddObserver(newviewref, self);
          newviewref->desw = desw;
          newviewref->desh = desh;
!         newenv = environment_Insert(envptr->environment, pos -
envptr->pos, environment_View, newviewref, TRUE);
          text_AddInCharacter(self, pos, TEXT_VIEWREFCHAR);
          environment_SetLength(newenv, 1);
          environment_SetStyle(newenv, FALSE, FALSE);
--- 432,439 ----
          viewref_AddObserver(newviewref, self);
          newviewref->desw = desw;
          newviewref->desh = desh;
! 	data.viewref = newviewref;
!         newenv = environment_Insert(envptr->environment, pos -
envptr->pos, environment_View, data, TRUE);
          text_AddInCharacter(self, pos, TEXT_VIEWREFCHAR);
          environment_SetLength(newenv, 1);
          environment_SetStyle(newenv, FALSE, FALSE);
***************
*** 477,483 ****
          stylesheet_Add(self->styleSheet, style); 
      }
  
!     newenv = environment_Insert(envptr->environment, pos - envptr->pos,
environment_Style, style, TRUE);
      envptr++;
      envptr->environment = newenv;
      envptr->pos = pos;
--- 479,486 ----
          stylesheet_Add(self->styleSheet, style); 
      }
  
!     data.style = style;
!     newenv = environment_Insert(envptr->environment, pos - envptr->pos,
environment_Style, data, TRUE);
      envptr++;
      envptr->environment = newenv;
      envptr->pos = pos;
***************
*** 511,518 ****
  struct style *style;
  {
      register struct environment *newenv;
  
!     if ((newenv = environment_Wrap(self->rootEnvironment, pos, len,
environment_Style, style)) != NULL) {
          text_RegionModified(self, pos, len);
          text_SetModified(self);
      }
--- 514,523 ----
  struct style *style;
  {
      register struct environment *newenv;
+     union environmentcontents data;
  
!     data.style = style;
!     if ((newenv = environment_Wrap(self->rootEnvironment, pos, len,
environment_Style, data)) != NULL) {
          text_RegionModified(self, pos, len);
          text_SetModified(self);
      }
***************
*** 541,551 ****
      struct viewref *newviewref;
      char c = TEXT_VIEWREFCHAR;
      register struct environment *newenv;
  
      newviewref = viewref_Create(viewtype, dataobject);
      viewref_AddObserver(newviewref,self);
      text_InsertCharacters(self, pos, &c, 1);
!     newenv = environment_Wrap(self->rootEnvironment, pos, 1,
environment_View, newviewref);
      environment_SetStyle(newenv, FALSE, FALSE);
      text_RegionModified(self, pos, 1);
      text_SetModified(self);
--- 546,558 ----
      struct viewref *newviewref;
      char c = TEXT_VIEWREFCHAR;
      register struct environment *newenv;
+     union environmentcontents data;
  
      newviewref = viewref_Create(viewtype, dataobject);
      viewref_AddObserver(newviewref,self);
      text_InsertCharacters(self, pos, &c, 1);
!     data.viewref = newviewref;
!     newenv = environment_Wrap(self->rootEnvironment, pos, 1,
environment_View, data);
      environment_SetStyle(newenv, FALSE, FALSE);
      text_RegionModified(self, pos, 1);
      text_SetModified(self);
***************
*** 1030,1035 ****
--- 1037,1044 ----
  struct environment *curenv;
  long pos,len;
  {
+     union environmentcontents data;
+ 
      if (curenv->type == environment_Style){
          /* New Style */
          struct style *style;
***************
*** 1040,1046 ****
              style_SetName(style, keyword);
              stylesheet_Add(self->styleSheet, style); 
          }
!         environment_Wrap(self->rootEnvironment, pos, len, curenv->type,
style);
      }
      else {
          struct viewref *newviewref;
--- 1049,1056 ----
              style_SetName(style, keyword);
              stylesheet_Add(self->styleSheet, style); 
          }
! 	data.style = style;
!         environment_Wrap(self->rootEnvironment, pos, len, curenv->type,
data);
      }
      else {
          struct viewref *newviewref;
***************
*** 1047,1053 ****
          struct environment *newenv;
          newviewref = viewref_Create(curenv->data.viewref->viewType,
curenv->data.viewref->dataObject);
          viewref_AddObserver(newviewref,self);
!         newenv = environment_Wrap(self->rootEnvironment, pos, 1,
curenv->type, newviewref);
          environment_SetStyle(newenv,FALSE,FALSE);
      }
  }
--- 1057,1064 ----
          struct environment *newenv;
          newviewref = viewref_Create(curenv->data.viewref->viewType,
curenv->data.viewref->dataObject);
          viewref_AddObserver(newviewref,self);
! 	data.viewref = newviewref;
!         newenv = environment_Wrap(self->rootEnvironment, pos, 1,
curenv->type, data);
          environment_SetStyle(newenv,FALSE,FALSE);
      }
  }
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/typescript/ctext.c	Wed
Sep 21 18:34:57 1988
--- atk/typescript/ctext.c	Wed Mar  8 20:02:31 1989
***************
*** 148,157 ****
  boolean incB, incE;
  {
      struct environment *env;
      if (self->comment_style == NULL)
          return;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, self->comment_style, TRUE);
      environment_SetLength(env, len);
      environment_SetStyle(env, incB, incE);
  }
--- 148,159 ----
  boolean incB, incE;
  {
      struct environment *env;
+     union environmentcontents data;
      if (self->comment_style == NULL)
          return;
+     data.style = self->comment_style;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, data, TRUE);
      environment_SetLength(env, len);
      environment_SetStyle(env, incB, incE);
  }
***************
*** 161,170 ****
  long start, len;
  {
      struct environment *env;
      if (self->fnname_style == NULL)
          return;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, self->fnname_style, TRUE);
      environment_SetLength(env, len);
  }
  
--- 163,174 ----
  long start, len;
  {
      struct environment *env;
+     union environmentcontents data;
      if (self->fnname_style == NULL)
          return;
+     data.style = self->fname_style;
      env = environment_Insert(self->header.text.rootEnvironment, start,
!       environment_Style, data, TRUE);
      environment_SetLength(env, len);
  }
  
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/typescript/typescript.c
Thu Sep 15 09:04:59 1988
--- atk/typescript/typescript.c	Wed Mar  8 20:05:03 1989
***************
*** 319,324 ****
--- 319,325 ----
      long len, spos;
      struct text *mydoc;
      struct environment *te;
+     union environmentcontents data;
  
      mydoc =  TEXT(td);
      spos = mark_GetPos(td->cmdStart);
***************
*** 326,332 ****
      if (spos < len) {
  	te = MyEnvinfo(mydoc, spos);
  	if (te->data.style != staticBoldStyle){
! 	    te = environment_Insert(mydoc->rootEnvironment,
spos,environment_Style, staticBoldStyle, TRUE);
  	}
          environment_SetStyle(te, FALSE , FALSE);
  	environment_SetLength(te, len - spos);
--- 327,334 ----
      if (spos < len) {
  	te = MyEnvinfo(mydoc, spos);
  	if (te->data.style != staticBoldStyle){
! 	    data.style = staticBoldStyle;
! 	    te = environment_Insert(mydoc->rootEnvironment,
spos,environment_Style, data, TRUE);
  	}
          environment_SetStyle(te, FALSE , FALSE);
  	environment_SetLength(te, len - spos);
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/value/mentertext.c	Sat
Sep 17 23:06:57 1988
--- atk/value/mentertext.c	Wed Mar  8 20:07:16 1989
***************
*** 140,146 ****
  	checkstyles(self);
  	for(i = 0 ,last = 0; i < len; i++){
  	    if(str[i] == '\n'){
! 		te = environment_Insert(Root(self), last,environment_Style,
self->Style, TRUE);
  		environment_SetStyle(te, TRUE, FALSE);
  		environment_SetLength(te, i - last);
  		last = i + 1;
--- 140,148 ----
  	checkstyles(self);
  	for(i = 0 ,last = 0; i < len; i++){
  	    if(str[i] == '\n'){
! 	        union environmentcontents data;
! 		data.style = self->Style;
! 		te = environment_Insert(Root(self), last,environment_Style, data,
TRUE);
  		environment_SetStyle(te, TRUE, FALSE);
  		environment_SetLength(te, i - last);
  		last = i + 1;
*** ../../../../X.V11R3/contrib/toolkits/andrew/overhead/class/cmd/dolist.c
Thu Sep 15 11:08:32 1988
--- overhead/class/cmd/dolist.c	Fri Feb 17 21:31:20 1989
***************
*** 80,85 ****
--- 80,95 ----
  register struct doload_environment *e;
  register struct relocation_info *rp;
  {
+ #ifdef sparc
+     /* Is this right??? -greep */
+     switch (rp->r_type) {
+     case RELOC_32:
+     case RELOC_DISP32:
+ 	return rp->r_address + 4;
+     default:
+ 	return rp->r_address + 2;
+     }
+ #else
      switch (rp->r_length) {
      case 2:
  	return rp->r_address + 4;
***************
*** 90,95 ****
--- 100,106 ----
      default:
  	return rp->r_address + 2;
      }
+ #endif sparc
  }
  
  ListSegment(e, n, base, size, rpp)
***
../../../../X.V11R3/contrib/toolkits/andrew/overhead/class/globals/globals.spp
Sat Sep 10 15:24:25 1988
--- overhead/class/globals/globals.spp	Wed Feb 15 14:21:28 1989
***************
*** 24,30 ****
  	.globl	_globals
  	.globl	_globalcount
  
! _globals:					#beginning of entry point table
  
  /* from libclass */
  
--- 24,30 ----
  	.globl	_globals
  	.globl	_globalcount
  
! _globals:					!beginning of entry point table
  
  /* from libclass */
  
*** ../../../../X.V11R3/contrib/toolkits/andrew/overhead/class/lib/doload.h
Thu Sep 15 09:46:43 1988
--- overhead/class/lib/doload.h	Wed Feb 15 16:39:15 1989
***************
*** 33,38 ****
--- 33,48 ----
  	Fix			/* .. converting .o to .do file */
  } doload_mode;
  
+ #if defined(sun) && defined(sparc)
+ /* This is a hack becuase Sun decided to change the names of the
+  * relocation structures to be machine dependent. If class were written
with
+  * each machine's code in a seperate file, this would be easier to deal
+  * with...
+  */
+ #define relocation_info reloc_info_sparc
+ #define r_symbolnum r_index
+ #endif
+ 
  struct doload_environment {
      doload_mode mode;		/* operating mode */
      int fd;			/* input file descriptor */
*** ../../../../X.V11R3/contrib/toolkits/andrew/overhead/malloc/malloc.h
Wed Sep 14 21:20:21 1988
--- overhead/malloc/malloc.h	Wed Feb 15 22:49:45 1989
***************
*** 31,37 ****
      malloc.h - definitions for memory allocation
  */
  
! #ifndef (_MALLOC_)
  #define _MALLOC_
  
  /* for Sun and system V */
--- 31,37 ----
      malloc.h - definitions for memory allocation
  */
  
! #ifndef _MALLOC_
  #define _MALLOC_
  
  /* for Sun and system V */
*** ../../../../X.V11R3/contrib/toolkits/andrew/overhead/malloc/mallocitc.h
Wed Sep 14 21:21:21 1988
--- overhead/malloc/mallocitc.h	Wed Feb 15 22:52:41 1989
***************
*** 39,45 ****
   *	WORD needs to be at least 4 so there are two zero bits
   *	at the bottom of a Size field
   */
! #ifndef (_MALLOCITC_)
  #define _MALLOCITC_
  
  #define INT int
--- 39,45 ----
   *	WORD needs to be at least 4 so there are two zero bits
   *	at the bottom of a Size field
   */
! #ifndef _MALLOCITC_
  #define _MALLOCITC_
  
  #define INT int
***
../../../../X.V11R3/contrib/toolkits/andrew/atk/console/lib/errormonfreq.c
Thu Sep 15 09:34:04 1988
--- atk/console/lib/errormonfreq.c	Wed Mar 22 02:23:41 1989
***************
*** 48,53 ****
--- 48,54 ----
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <netdb.h>
+ #include <sys/stream.h> /* needed in SunOS 4.0 */
  #include <sys/tty.h>
  #include <sitevars.h>
  #include <errno.h>
*** ../../../../X.V11R3/contrib/toolkits/andrew/atk/console/lib/errormon.c
Thu Sep 15 09:33:23 1988
--- atk/console/lib/errormon.c	Wed Mar 22 02:22:20 1989
***************
*** 48,53 ****
--- 48,54 ----
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <netdb.h>
+ #include <sys/stream.h> /* needed in SunOS 4.0 */
  #include <sys/tty.h>
  #include <fcntl.h>
--