diff -c -r dist-src/Alert.C src/Alert.C
*** dist-src/Alert.C	Fri May 19 18:33:42 1989
--- src/Alert.C	Mon Jun  5 16:17:21 1989
***************
*** 58,72 ****
  
  MetaImpl(Alert, (I_O(text), I_O(image), I_O(buttons)));
  
  Alert::Alert(AlertType at, char *message, char *, ...)
  						: (0, eBWinOverlay+eBWinBlock)
  {
-     va_list ap;
      ObjList *ol;
  
      if (message == 0)
  	return;
  
      text= new StaticTextView((View*)0, Rectangle(gSysFont->Width('n')*40,cFit),
  							new CheapText(message));
      switch (at) {
--- 58,108 ----
  
  MetaImpl(Alert, (I_O(text), I_O(image), I_O(buttons)));
  
+ 
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 16:08:12 1989.
+    As originally written, the code used some default arguments,
+ followed by a '...'. This is prohibited in Stroustrup, p.121, so
+ I have extracted the initializing functionality, and put in two
+ versions of the constructor.    */
+ 
+ Alert::Alert(AlertType at, char *message)
+ 						: (0, eBWinOverlay+eBWinBlock)
+ {
+     ObjList *ol;
+ 
+     if (message == 0)
+ 	return;
+ 
+     DoInitialize(at, message);
+ 
+     ol= new ObjList;
+     buttons= new Cluster(2, eVObjVBase, 20, ol);
+ }
+ 
  Alert::Alert(AlertType at, char *message, char *, ...)
  						: (0, eBWinOverlay+eBWinBlock)
  {
      ObjList *ol;
  
+     va_list ap;
+ 
      if (message == 0)
  	return;
  
+     DoInitialize(at, message);
+ 
+     ol= new ObjList;
+     buttons= new Cluster(2, eVObjVBase, 20, ol);
+ 
+     va_start(ap, message);
+     char *s;
+     for (int i= 0; s= va_arg(ap, char*); i++)
+ 	ol->Add(new ActionButton(va_arg(ap, int), s, i == 0));   
+     va_end(ap);
+ }
+ 
+ Alert::DoInitialize(AlertType at, char *message)
+ {
      text= new StaticTextView((View*)0, Rectangle(gSysFont->Width('n')*40,cFit),
  							new CheapText(message));
      switch (at) {
***************
*** 93,107 ****
  	image= text;
      else
  	image= new Cluster(2, eVObjVTop, 25, image, text, 0);
- 
-     ol= new ObjList;
-     buttons= new Cluster(2, eVObjVBase, 20, ol);
- 
-     va_start(ap, message);
-     char *s;
-     for (int i= 0; s= va_arg(ap, char*); i++)
- 	ol->Add(new ActionButton(va_arg(ap, int), s, i == 0));   
-     va_end(ap);
  }
  
  Alert::~Alert()
--- 129,134 ----
diff -c -r dist-src/Alert.h src/Alert.h
*** dist-src/Alert.h	Sat May 13 00:41:11 1989
--- src/Alert.h	Fri Jun 16 20:36:51 1989
***************
*** 14,23 ****
  
  class Alert: public Dialog {
      VObject *text, *image, *buttons;
  public:
      MetaDef(Alert);
  
!     Alert(AlertType= eAlertNote, char *text= 0, char *bn= 0, ...);
      ~Alert();
  
      VObject *DoCreateDialog();
--- 14,37 ----
  
  class Alert: public Dialog {
      VObject *text, *image, *buttons;
+ 
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 16:10:24 1989.
+    This implements most of the constructor functionality. See below.    */
+     DoInitialize(AlertType at, char *text);
+ 
  public:
      MetaDef(Alert);
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:13:28 1989.
!    This was the original code:    
!        Alert(AlertType= eAlertNote, char *text= 0, char *bn= 0, ...);
!    See Stroustup, p. 121, 'defaults for trailing arguments only'.
!    I put in one version for when it is called with 0, 1 or 2 
!    arguments, the other for 3 or more arguments.   */
! 
!     Alert(AlertType at= eAlertNote, char *text= 0);
!     Alert(AlertType at, char *text, char *bn, ...);
! 
      ~Alert();
  
      VObject *DoCreateDialog();
Only in src: Alert.o
Only in src: Application.o
Only in src: AssocArray.o
Only in src: Bag.o
Only in src: BitSet.o
diff -c -r dist-src/Bitmap.C src/Bitmap.C
*** dist-src/Bitmap.C	Thu May 18 21:54:29 1989
--- src/Bitmap.C	Sun Jun 18 19:37:34 1989
***************
*** 15,38 ****
  {
  }
  
  Bitmap::Bitmap(Point sz, short *im)
  {
!     if (this == 0)
! 	gWindowSystem->MakeBitmap(&this, sz, im);
!     else {
  	Fatal("Bitmap::Bitmap", cNoStaticBitmaps);
  	this= 0;    // can't reach
      }
  }
  
  Bitmap::Bitmap(const char *name)
  {
!     if (this == 0)
! 	gWindowSystem->MakeBitmap(&this, name);
!     else {
  	Fatal("Bitmap::Bitmap", cNoStaticBitmaps);
  	this= 0;    // can't reach
      }
  }
  
  Bitmap::~Bitmap()
--- 15,54 ----
  {
  }
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 19:55:39 1989.
+    Added "tmp_this", etc., because g++ doesn't allow "&this". 
+    See WindowPort::WindowPort for more details.  */
+ 
  Bitmap::Bitmap(Point sz, short *im)
  {
!     Bitmap *tmp_this;
!     char tmp_copy[sizeof(*this)];
! 
!     if (this == 0) {
! 	gWindowSystem->MakeBitmap(&tmp_this, sz, im);
! 	bcopy(tmp_this, tmp_copy, sizeof(*this));
! 	this = tmp_this;
!     } else {
  	Fatal("Bitmap::Bitmap", cNoStaticBitmaps);
  	this= 0;    // can't reach
      }
+     bcopy(tmp_copy, this, sizeof(*this));
  }
  
  Bitmap::Bitmap(const char *name)
  {
!     Bitmap *tmp_this;
!     char tmp_copy[sizeof(*this)];
! 
!     if (this == 0) {
! 	gWindowSystem->MakeBitmap(&tmp_this, name);
! 	bcopy(tmp_this, tmp_copy, sizeof(*this));
! 	this = tmp_this;
!     } else {
  	Fatal("Bitmap::Bitmap", cNoStaticBitmaps);
  	this= 0;    // can't reach
      }
+     bcopy(tmp_copy, this, sizeof(*this));
  }
  
  Bitmap::~Bitmap()
Only in src: Bitmap.o
Only in src: BlankWin.o
diff -c -r dist-src/BorderItems.C src/BorderItems.C
*** dist-src/BorderItems.C	Mon May 22 22:12:05 1989
--- src/BorderItems.C	Sun Jun 25 16:41:14 1989
***************
*** 43,49 ****
      lineWidth= lw;
  }
  
! AbstractBorderItem::AbstractBorderItem(char *ti, VObject *in, int lw= 1, int id)
  				    : (id, in, titleBar= new TextItem(ti), 0)
  {
      interior= in;
--- 43,51 ----
      lineWidth= lw;
  }
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 16:36:10 1989.
!    Removed a default argument for lw; these are defined in the .h file.    */
! AbstractBorderItem::AbstractBorderItem(char *ti, VObject *in, int lw, int id)
  				    : (id, in, titleBar= new TextItem(ti), 0)
  {
      interior= in;
Only in src: BorderItems.o
Only in src: ByteArray.o
diff -c -r dist-src/CheapText.C src/CheapText.C
*** dist-src/CheapText.C	Wed May 17 19:53:20 1989
--- src/CheapText.C	Tue Jun  6 10:33:13 1989
***************
*** 6,12 ****
  
  //---- CheapText ------------------------------------------------------------
  
! const int cInitCap      = 16;
  
  MetaImpl(CheapText, (I_I(next), I_I(size), I_CV(cont,next), I_FT(font)));
  
--- 6,14 ----
  
  //---- CheapText ------------------------------------------------------------
  
! /* Change by Bryan Boreham, Kewill, Tue Jun  6 10:32:13 1989.
!    constants can turn up multiple times in the link if not static.    */
! static const int cInitCap      = 16;
  
  MetaImpl(CheapText, (I_I(next), I_I(size), I_CV(cont,next), I_FT(font)));
  
***************
*** 271,277 ****
  
      if (newSize < Size())  // texts never shrink
  	return;
!     Realloc(&cont, newSize);
      next= min(newSize, next);
      size= newSize;
  }
--- 273,281 ----
  
      if (newSize < Size())  // texts never shrink
  	return;
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 16:40:52 1989.
!    g++ wants the (void **) cast here.    */
!     Realloc((void **)&cont, newSize);
      next= min(newSize, next);
      size= newSize;
  }
Only in src: CheapText.o
diff -c -r dist-src/Class.C src/Class.C
*** dist-src/Class.C	Fri May 12 10:00:29 1989
--- src/Class.C	Sun Jun 25 16:53:59 1989
***************
*** 122,127 ****
--- 122,130 ----
  {
      int n= 0;
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:19:04 1989.
+    This is cfront-specific.    */
+ #ifndef __GNUG__
      if (proto) {    // virtual member count
  	int *vt= (int*)proto->_vptr;
  
***************
*** 128,133 ****
--- 131,137 ----
  	for (n= 0; *vt; vt++, n++)
  	    ;
      }
+ #endif
  
      s << form("%4d\t%-20s\t%-20s\t%d", size, className,
  					    super ? super->className : "nil", n);
diff -c -r dist-src/Class.h src/Class.h
*** dist-src/Class.h	Thu May 18 21:03:55 1989
--- src/Class.h	Fri Jun 16 20:36:54 1989
***************
*** 135,141 ****
  //---- metaclass macros ----------------------------------------------------
  
  #define _MetaImpl0(name,abstract) \
! static Class _NAME2_(name,ClassMetaImpl0)("name", sizeof(name), \
  new name((Class*)0), __FILE__,_NAME2_(name,DeclFileName)(), __LINE__, \
  _NAME2_(name,DeclFileLine)(), __COMPILEDIR__, _NAME2_(name,DeclCompDir)(), abstract); \
  name::name(class Class *cl):(cl)\
--- 135,141 ----
  //---- metaclass macros ----------------------------------------------------
  
  #define _MetaImpl0(name,abstract) \
! static Class _NAME2_(name,ClassMetaImpl0)(__STRING(name), sizeof(name), \
  new name((Class*)0), __FILE__,_NAME2_(name,DeclFileName)(), __LINE__, \
  _NAME2_(name,DeclFileLine)(), __COMPILEDIR__, _NAME2_(name,DeclCompDir)(), abstract); \
  name::name(class Class *cl):(cl)\
***************
*** 185,193 ****
  
  #define _offset(in) ((short)((ulo)&in - (ulo)this))
  
! #define I_SIMPLE(in,type) D_A("in", _offset(in), type)
! #define I_VVECTOR(in,len,type) D_B("in", _offset(in), _offset(len), type+T_VEC)
! #define I_CVECTOR(in,len,type) D_D("in", _offset(in), len, type+T_ARR)
  
  
  #define I_C(in)         I_SIMPLE(in, T_CHAR)
--- 185,193 ----
  
  #define _offset(in) ((short)((ulo)&in - (ulo)this))
  
! #define I_SIMPLE(in,type) D_A(__STRING(in), _offset(in), type)
! #define I_VVECTOR(in,len,type) D_B(__STRING(in), _offset(in), _offset(len), type+T_VEC)
! #define I_CVECTOR(in,len,type) D_D(__STRING(in), _offset(in), len, type+T_ARR)
  
  
  #define I_C(in)         I_SIMPLE(in, T_CHAR)
Only in src: Class.o
Only in src: ClipBoard.o
Only in src: Clipper.o
diff -c -r dist-src/Cluster.C src/Cluster.C
*** dist-src/Cluster.C	Thu May 18 15:54:09 1989
--- src/Cluster.C	Mon Jun  5 17:35:39 1989
***************
*** 64,75 ****
      
      if (rows < y) {
  	rows= y;
! 	Expand(&ht, rows * sizeof(short));
! 	Expand(&bs, rows * sizeof(short));
      }
      if (cols < x) {
  	cols= x;
! 	Expand(&wd, cols * sizeof(short));
      }
      CacheMinSize();
      modified= FALSE;
--- 64,77 ----
      
      if (rows < y) {
  	rows= y;
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 17:35:15 1989.
!    g++ wants the three (void **) casts here.    */
! 	Expand((void **)&ht, rows * sizeof(short));
! 	Expand((void **)&bs, rows * sizeof(short));
      }
      if (cols < x) {
  	cols= x;
! 	Expand((void **)&wd, cols * sizeof(short));
      }
      CacheMinSize();
      modified= FALSE;
Only in src: Cluster.o
diff -c -r dist-src/CmdNo.h src/CmdNo.h
*** dist-src/CmdNo.h	Sat May 20 01:01:07 1989
--- src/CmdNo.h	Fri Jun 16 20:36:55 1989
***************
*** 3,8 ****
--- 3,11 ----
  
  //---- standard command codes --------------------------------------------------
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
+    Constants turn up multiply defined if not static.    */
+ static
  const int cUNDO         =   1,
  	  cSAVE         =   2,
  	  cLOAD         =   3,
***************
*** 57,62 ****
--- 60,68 ----
  //---- standard dialog item id's -----------------------------------------------
  // for Control and DownControl
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
+    Constants turn up multiply defined if not static.    */
+ static
  const int cIdNone           = -1,
  	  cIdOk             = 1,
  	  cIdYes            = 2,
***************
*** 79,84 ****
--- 85,93 ----
  //---- standard part codes -----------------------------------------------------
  // for Control and DownControl
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
+    Constants turn up multiply defined if not static.    */
+ static
  const int cPartActiveText       = 1,
  	  cPartChangedText      = 2,
  	  cPartLayoutChanged    = 3,
Only in src: CodeTextView.o
diff -c -r dist-src/Collection.C src/Collection.C
*** dist-src/Collection.C	Fri May 19 18:33:45 1989
--- src/Collection.C	Mon Jun  5 14:33:14 1989
***************
*** 9,17 ****
  
  Collection *pCurrentCollection;
  
! MetaImpl(Collection, (I_I(size), I_I(nDeleted), I_I(iterCount)));
  
! AbstractClass(Collection);
  
  Collection::Collection()
  {
--- 9,20 ----
  
  Collection *pCurrentCollection;
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:27:29 1989.
!    Changed Meta... to AbstractMeta... and removed AbstractClass;
!    Looks like this was an old-style feature.    */
! AbstractMetaImpl(Collection, (I_I(size), I_I(nDeleted), I_I(iterCount)));
  
! //   AbstractClass(Collection); 
  
  Collection::Collection()
  {
***************
*** 466,472 ****
      while (op = (*next)()) {
  	if (!filterFun)
  	    break;
! 	if (filterFun((ObjPtr)this,op,filterArg))
  	    break;
      }
      return op;               
--- 469,477 ----
      while (op = (*next)()) {
  	if (!filterFun)
  	    break;
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:31:55 1989.
!    g++ seems to need the de-reference of filterFun.    */
! 	if ((*filterFun)((ObjPtr)this,op,filterArg))
  	    break;
      }
      return op;               
diff -c -r dist-src/Collection.h src/Collection.h
*** dist-src/Collection.h	Thu May 18 15:42:51 1989
--- src/Collection.h	Fri Jun 16 20:36:56 1989
***************
*** 10,15 ****
--- 10,18 ----
  
  typedef class Collection *CollPtr;
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
+    Constants turn up multiply defined if not static.    */
+ static
  const cCollectionInitCap = 16;
  
  class Collection: public Object {
***************
*** 19,27 ****
  public:
      int size;
  
- protected:
      Collection();
      ~Collection();
      virtual int GrowBy(int desiredSize);
      virtual void RemoveDeleted();
      void AnnounceRemove()
--- 22,35 ----
  public:
      int size;
  
      Collection();
      ~Collection();
+ 
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 17:56:24 1989.
+    Moved the constructor and destructor out of the "protected" bit;
+    CollectionView calls the destuctor.    */
+ 
+ protected:
      virtual int GrowBy(int desiredSize);
      virtual void RemoveDeleted();
      void AnnounceRemove()
Only in src: Collection.o
diff -c -r dist-src/CollectionView.C src/CollectionView.C
*** dist-src/CollectionView.C	Thu May 18 20:37:04 1989
--- src/CollectionView.C	Sun Jun 25 14:36:36 1989
***************
*** 138,145 ****
      else if (TestFlag(eCVExpandCols))
  	cols= (sz+rows-1) / rows;
  
!     Expand(&yPos, (rows+1) * sizeof(short));
!     Expand(&xPos, (cols+1) * sizeof(short));
  
      xpos= ypos= 0;
      g= 2*gap;
--- 138,147 ----
      else if (TestFlag(eCVExpandCols))
  	cols= (sz+rows-1) / rows;
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 17:45:29 1989.
!    g++ wants the two (void **) casts here.    */
!     Expand((void **)&yPos, (rows+1) * sizeof(short));
!     Expand((void **)&xPos, (cols+1) * sizeof(short));
  
      xpos= ypos= 0;
      g= 2*gap;
Only in src: CollectionView.o
diff -c -r dist-src/Command.h src/Command.h
*** dist-src/Command.h	Fri Apr  7 13:40:23 1989
--- src/Command.h	Fri Jun 16 20:36:58 1989
***************
*** 4,18 ****
  #include "Object.h"
  #include "Point.h"
  
! typedef enum {
      eTrackPress,
      eTrackMove,
      eTrackRelease,
      eTrackIdle,
      eTrackExit
! } TrackPhase;
  
! typedef enum {
      eCmdCanUndo      = BIT(eObjLast+1),
      eCmdCausesChange = BIT(eObjLast+2),
      eCmdDone         = BIT(eObjLast+3),
--- 4,22 ----
  #include "Object.h"
  #include "Point.h"
  
! /* Change by Bryan Boreham, Kewill, Wed Jun  7 19:54:41 1989.
!    Used to be an anonymous enumeration; Caused no end of trouble until 
!    James Clark suggested the change. Eternal praise is due.    */
! 
! enum TrackPhase {
      eTrackPress,
      eTrackMove,
      eTrackRelease,
      eTrackIdle,
      eTrackExit
! };
  
! enum CommandFlags {
      eCmdCanUndo      = BIT(eObjLast+1),
      eCmdCausesChange = BIT(eObjLast+2),
      eCmdDone         = BIT(eObjLast+3),
***************
*** 23,29 ****
      eCmdNoReplFeedback= BIT(eObjLast+8),
      eCmdDefault      = eCmdCanUndo | eCmdCausesChange | eCmdDoDelete,
      eCmdLast         = eObjLast + 8
! } CommandFlags;
  
  class Command: public Object {
      int CmdNumber;
--- 27,33 ----
      eCmdNoReplFeedback= BIT(eObjLast+8),
      eCmdDefault      = eCmdCanUndo | eCmdCausesChange | eCmdDoDelete,
      eCmdLast         = eObjLast + 8
! };
  
  class Command: public Object {
      int CmdNumber;
Only in src: Command.o
Only in src: Dialog.o
diff -c -r dist-src/DialogItems.C src/DialogItems.C
*** dist-src/DialogItems.C	Sun May 21 18:49:05 1989
--- src/DialogItems.C	Sun Jun 25 16:46:02 1989
***************
*** 919,926 ****
  			  : (id,
  			     eVObjVBase,
  			     gPoint10,
! 			     w ? (VObject*) new RadioButton
! 			       : (VObject*) new ToggleButton,
  			     new TextItem(t),
  			     0)
  {
--- 919,928 ----
  			  : (id,
  			     eVObjVBase,
  			     gPoint10,
! /* Change by Bryan Boreham, Kewill, Sun Jun 11 16:45:15 1989.
!    Put some more brackets in here; g++ was getting confused.    */
! 			     w ? ((VObject*) new RadioButton)
! 			       : ((VObject*) new ToggleButton),
  			     new TextItem(t),
  			     0)
  {
Only in src: DialogItems.o
Only in src: Dictionary.o
Only in src: Document.o
diff -c -r dist-src/Error.C src/Error.C
*** dist-src/Error.C	Fri May 19 18:32:37 1989
--- src/Error.C	Wed Jun 14 15:29:48 1989
***************
*** 10,16 ****
  }
  
  static int abortlevel= cSysError;
! static int ignorelevel= cError;
  
  void DefaultErrorHandler(int level, bool abort, char *location, char *msg)
  {
--- 10,18 ----
  }
  
  static int abortlevel= cSysError;
! /* Change by Bryan Boreham, Kewill, Wed Jun 14 15:29:22 1989.
!    I want it to print out even "Warning" messages.    */
! static int ignorelevel= cWarning;
  
  void DefaultErrorHandler(int level, bool abort, char *location, char *msg)
  {
diff -c -r dist-src/Error.h src/Error.h
*** dist-src/Error.h	Thu May 18 21:03:46 1989
--- src/Error.h	Fri Jun 16 20:37:04 1989
***************
*** 3,9 ****
  
  #include "Types.h"
  
! const int cWarning  =   0,
  	  cError    =   1000,
  	  cSysError =   2000,
  	  cFatal    =   3000;
--- 3,11 ----
  
  #include "Types.h"
  
! /* Change by Bryan Boreham, Kewill, Thu Jun  1 17:25:00 1989.
!    Constants turn up multiple times in the link if not static. */
! static const int cWarning  =   0,
  	  cError    =   1000,
  	  cSysError =   2000,
  	  cFatal    =   3000;
Only in src: Error.o
Only in src: EvtHandler.o
Only in src: Expander.o
diff -c -r dist-src/FileDialog.C src/FileDialog.C
*** dist-src/FileDialog.C	Thu May 18 22:47:50 1989
--- src/FileDialog.C	Tue Jun  6 10:32:32 1989
***************
*** 13,19 ****
  #include "Scroller.h"
  #include "Menu.h"
  
! const int cIdName       =   cIdFirstUser + 0,
  	  cIdList       =   cIdFirstUser + 1,
  	  cIdUpdate     =   cIdFirstUser + 2,
  	  cIdPath       =   cIdFirstUser + 3;
--- 13,21 ----
  #include "Scroller.h"
  #include "Menu.h"
  
! /* Change by Bryan Boreham, Kewill, Tue Jun  6 10:32:13 1989.
!    constants can turn up multiple times in the link if not static.    */
! static const int cIdName       =   cIdFirstUser + 0,
  	  cIdList       =   cIdFirstUser + 1,
  	  cIdUpdate     =   cIdFirstUser + 2,
  	  cIdPath       =   cIdFirstUser + 3;
diff -c -r dist-src/FileDialog.h src/FileDialog.h
*** dist-src/FileDialog.h	Wed May  3 16:52:28 1989
--- src/FileDialog.h	Fri Jun 16 20:37:05 1989
***************
*** 22,27 ****
--- 22,30 ----
  
  //---- FileDialog --------------------------------------------------------------
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
+    Constants turn up multiply defined if not static.    */
+ static
  const int cMaxPathName= 400;
  
  enum FileDialogFlags {
Only in src: FileDialog.o
Only in src: FileType.o
Only in src: FindDialog.o
Only in src: FixedLineTextView.o
diff -c -r dist-src/FixedSizeStorage.C src/FixedSizeStorage.C
*** dist-src/FixedSizeStorage.C	Wed Mar 15 08:27:16 1989
--- src/FixedSizeStorage.C	Mon Jun  5 14:46:04 1989
***************
*** 4,11 ****
  #include "String.h"
  #include "ObjectTable.h"
  
  struct FreeNode {
!     class FreeNode *next;
  };
  
  struct Chunk {
--- 4,13 ----
  #include "String.h"
  #include "ObjectTable.h"
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:42:11 1989.
+    Changed "class FreeNode" to "struct FreeNode; this is how it is used.    */
  struct FreeNode {
!     struct FreeNode *next;
  };
  
  struct Chunk {
***************
*** 75,81 ****
  	ObjectTableRemove(objptr);
      }
      for (Chunk *p= chunks; p; p= p->next) {
! 	if (op >= p->storage && op <  p->storage + chunkSize) {
  	    bzero((byte*)op, objSize);
  	    FreeNode *fn= (FreeNode*)op;
  	    fn->next= freeList;
--- 77,85 ----
  	ObjectTableRemove(objptr);
      }
      for (Chunk *p= chunks; p; p= p->next) {
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:45:34 1989.
!    g++ wants a cast to compare void * and char *.    */
! 	if (op >= (void *)(p->storage) && op <  (void *)(p->storage + chunkSize)) {
  	    bzero((byte*)op, objSize);
  	    FreeNode *fn= (FreeNode*)op;
  	    fn->next= freeList;
diff -c -r dist-src/FixedSizeStorage.h src/FixedSizeStorage.h
*** dist-src/FixedSizeStorage.h	Wed Mar 15 08:27:59 1989
--- src/FixedSizeStorage.h	Fri Jun 16 20:37:06 1989
***************
*** 30,39 ****
  };
  
  #define FIXED_STORAGE(type,size) \
! static FixedSizeStorage _NAME2_(_FixedStorage,type)(sizeof(type), FALSE, "type", size)
  
  #define FIXED_OBJ_STORAGE(type,size) \
! static FixedSizeStorage _NAME2_(_FixedStorage,type)(sizeof(type), TRUE, "type", size)
  
  extern bool gAddToInstTable;
  
--- 30,39 ----
  };
  
  #define FIXED_STORAGE(type,size) \
! static FixedSizeStorage _NAME2_(_FixedStorage,type)(sizeof(type), FALSE, __STRING(type), size)
  
  #define FIXED_OBJ_STORAGE(type,size) \
! static FixedSizeStorage _NAME2_(_FixedStorage,type)(sizeof(type), TRUE, __STRING(type), size)
  
  extern bool gAddToInstTable;
  
Only in src: FixedSizeStorage.o
diff -c -r dist-src/Font.C src/Font.C
*** dist-src/Font.C	Mon May  8 11:56:44 1989
--- src/Font.C	Sun Jun 18 19:43:47 1989
***************
*** 22,35 ****
  {
  }
  
  Font::Font(GrFont font, int size, GrFace face)
  {
!     if (this == 0)
! 	gFontManager->MapFont(&this, font, size, face);
!     else {
  	Error("Font::Font", "no static instances");
  	this= 0;    // can't reach
      }
  }
     
  Font::~Font()
--- 22,45 ----
  {
  }
  
+ /* Change by Bryan Boreham, Kewill, Tue Jun  6 10:00:16 1989.
+    Added "tmp_this", etc., because g++ doesn't allow "&this". 
+    See WindowPort::WindowPort for more details.  */
+ 
  Font::Font(GrFont font, int size, GrFace face)
  {
!     Font *tmp_this;
!     char tmp_copy[sizeof(*this)];
! 
!     if (this == 0) {
! 	gFontManager->MapFont(&tmp_this, font, size, face);
! 	bcopy(tmp_this, tmp_copy, sizeof(*this));
! 	this = tmp_this;
!     } else {
  	Error("Font::Font", "no static instances");
  	this= 0;    // can't reach
      }
+     bcopy(tmp_copy, this, sizeof(*this));
  }
     
  Font::~Font()
Only in src: Font.o
Only in src: GapText.o
diff -c -r dist-src/GotoDialog.C src/GotoDialog.C
*** dist-src/GotoDialog.C	Tue May  9 16:13:24 1989
--- src/GotoDialog.C	Mon Jun  5 18:53:51 1989
***************
*** 72,78 ****
  	new BorderItem(
  	    new Cluster(cIdNone, eVObjHCenter, 10,
  		new BorderItem ("Go to line",
! 		    new EnumItem(cIdNone, eVObjVBase, line= new NumItem(cIdNone, 1)),
  		),
  		new Cluster(cIdNone, eVObjVBase, 20,
  		    new ActionButton(cIdYes, "Ok", TRUE),
--- 72,80 ----
  	new BorderItem(
  	    new Cluster(cIdNone, eVObjHCenter, 10,
  		new BorderItem ("Go to line",
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 18:53:39 1989.
!    Took out a comma at the end of this line; it was a syntax error.    */
! 		    new EnumItem(cIdNone, eVObjVBase, line= new NumItem(cIdNone, 1))
  		),
  		new Cluster(cIdNone, eVObjVBase, 20,
  		    new ActionButton(cIdYes, "Ok", TRUE),
Only in src: GotoDialog.o
Only in src: Icon.o
Only in src: IdDictionary.o
Only in src: Init.o
Only in src: InitCol.o
Only in src: Iterator.o
Common subdirectories: dist-src/MALLOC and src/MALLOC
Only in src: Mark.o
diff -c -r dist-src/Menu.C src/Menu.C
*** dist-src/Menu.C	Thu May 18 01:30:37 1989
--- src/Menu.C	Mon Jun 19 19:17:57 1989
***************
*** 107,113 ****
  
  //---- Menu --------------------------------------------------------------------
  
! MetaImpl(Menu, (I_O(title), I_O(clipper), I_I(selection), I_P(theItem), I_O(window)));
  
  Menu::Menu(char *t, bool s, int r, int c, bool st)
  					    : (0, 0, eCVDontStuckToBorder, r, c)
--- 107,120 ----
  
  //---- Menu --------------------------------------------------------------------
  
! MetaImpl(Menu, (I_O(title), I_O(clipper), I_I(this->selection), I_P(theItem), I_O(window)));
! 
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 18:58:34 1989.
!    Changed selection to this->selection to help g++ get over multiple
!    inheritance problems. There is some other problem with doing it
!    earlier in the file.    */
! 
! #define selection this->selection
  
  Menu::Menu(char *t, bool s, int r, int c, bool st)
  					    : (0, 0, eCVDontStuckToBorder, r, c)
Only in src: Menu.o
Only in src: Metric.o
Common subdirectories: dist-src/NEWS and src/NEWS
diff -c -r dist-src/ObjArray.C src/ObjArray.C
*** dist-src/ObjArray.C	Tue May 16 13:58:21 1989
--- src/ObjArray.C	Sun Jun 25 16:48:17 1989
***************
*** 104,110 ****
  		return;
  	    }
      }            
!     Realloc(&cont, newSize * sizeof(ObjPtr));
      size= newSize;
  }
  
--- 104,112 ----
  		return;
  	    }
      }            
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 15:28:26 1989.
!    Added the cast for g++.  */
!     Realloc((void **)&cont, newSize * sizeof(ObjPtr));
      size= newSize;
  }
  
***************
*** 259,274 ****
      return (*a)->Compare(*b);
  }
  
  void ObjArray::Sort(int upto)
  {
!     extern qsort(...);
  
      qsort(cont, min(size, upto-lb), sizeof(ObjPtr), CompareFun);
  }
  
  int ObjArray::BinarySearch(ObjPtr op, int upto)
  {
!     extern char *bsearch(...);
      ObjPtr *res;
  
      res= (ObjPtr*)bsearch((char*)&op, cont, min(size,upto-lb), sizeof(ObjPtr),
--- 261,285 ----
      return (*a)->Compare(*b);
  }
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun 18 14:12:49 1989.
+    Put in a couple of proper prototypes here and took out the lazy ones.    */
+ 
+ extern "C" int qsort(void*, int, unsigned, auto (*ptf)(void*,void*));
+ extern "C" void *bsearch(void*, void*, unsigned, unsigned, 
+ 			 auto (*ptf)(void*,void*));
+ 
  void ObjArray::Sort(int upto)
  {
! //    extern qsort(...);      
  
      qsort(cont, min(size, upto-lb), sizeof(ObjPtr), CompareFun);
  }
  
+ 
  int ObjArray::BinarySearch(ObjPtr op, int upto)
  {
! //    extern char *bsearch(...);    
! 
      ObjPtr *res;
  
      res= (ObjPtr*)bsearch((char*)&op, cont, min(size,upto-lb), sizeof(ObjPtr),
Only in src: ObjArray.o
Only in src: ObjFloat.o
Only in src: ObjInt.o
Only in src: ObjList.o
diff -c -r dist-src/Object.h src/Object.h
*** dist-src/Object.h	Thu May 18 20:59:59 1989
--- src/Object.h	Sun Jun 25 16:54:27 1989
***************
*** 1,3 ****
--- 1,4 ----
+ #pragma once
  #ifndef Object_First
  #define Object_First
  
***************
*** 11,16 ****
--- 12,22 ----
  typedef void (Object::*VoidObjMemberFunc)(...);
  typedef unsigned char (Object::*BoolObjMemberFunc)(...);
  
+ /* Change by Bryan Boreham, Kewill, Thu Jun  1 15:34:45 1989.
+    g++ seems to declare friend functions overloaded implicitly. */
+ overload ClassSavePtr;
+ overload ClassLoadPtr;
+ 
  extern ostream& ClassSavePtr(ostream&, Object*);
  extern istream& ClassLoadPtr(istream&, Object*&);
  
***************
*** 22,32 ****
  
  extern bool gInPrintOn;
  
! const int cFlagMask= 0x00ffffff;
  
  //---- private flags, clients can only test but not set them ------------
  
! const int cObjNonDeleted    =       0x01000000,
  	  cObjDelayChanges  =       0x02000000,
  	  cObjVisited       =       0x04000000,
  	  cObjOnHeap        =       0x08000000,
--- 28,40 ----
  
  extern bool gInPrintOn;
  
! /* Change by Bryan Boreham, Kewill, Thu Jun  1 17:24:36 1989.
!    Constants turn up multiple times in the link if not static. */
! static const int cFlagMask= 0x00ffffff;
  
  //---- private flags, clients can only test but not set them ------------
  
! static const int cObjNonDeleted    =       0x01000000,
  	  cObjDelayChanges  =       0x02000000,
  	  cObjVisited       =       0x04000000,
  	  cObjOnHeap        =       0x08000000,
***************
*** 58,66 ****
      char *ClassName();
      ObjPtr New();
      virtual void InitNew();
      int overridden(int *ip, ObjMemberFunc p) // internal interface
  	{ return ((int*)_vptr)[(int)p-1] != ip[(int)p-1]; }
! #   define Overridden(class,method)overridden((int*)::_NAME2_(class,__vtbl),&class::method)
  
      //----- flag manipulation --------------------------------------------------
      void SetFlag(int f, bool b);
--- 66,83 ----
      char *ClassName();
      ObjPtr New();
      virtual void InitNew();
+ 
+ // Change by BJB, Kewill, 1/6/89. This is cfront-specific. 
+ // I have made the change reccommended on the ET++ Installation Notes.
+ #ifdef __GNUG__
      int overridden(int *ip, ObjMemberFunc p) // internal interface
+ 	{ return TRUE; }
+ #define Overridden(class,method) overridden((int*)0, &class::method)
+ #else
+     int overridden(int *ip, ObjMemberFunc p) // internal interface
  	{ return ((int*)_vptr)[(int)p-1] != ip[(int)p-1]; }
! #define Overridden(class,method) overridden((int*)::_NAME2_(class,__vtbl),&class::method)
! #endif
  
      //----- flag manipulation --------------------------------------------------
      void SetFlag(int f, bool b);
***************
*** 159,165 ****
  #include "Class.h"
  
  #define IsKindOf(name) IsA()->isKindOf(_NAME2_(name,ClassType)())
! #define Guard(p,name) ((name*)p->guard(p->IsKindOf(name),"name"))
  
  extern class ObjectTable *gObjectTable;
  
--- 176,182 ----
  #include "Class.h"
  
  #define IsKindOf(name) IsA()->isKindOf(_NAME2_(name,ClassType)())
! #define Guard(p,name) ((name*)p->guard(p->IsKindOf(name),__STRING(name)))
  
  extern class ObjectTable *gObjectTable;
  
Only in src: Object.o
Only in src: ObjectTable.o
Only in src: OrdCollection.o
Common subdirectories: dist-src/PIC and src/PIC
Common subdirectories: dist-src/POSTSCRIPT and src/POSTSCRIPT
Common subdirectories: dist-src/PROGENV and src/PROGENV
Only in src: PathLookup.o
Only in src: PictPort.o
diff -c -r dist-src/Picture.C src/Picture.C
*** dist-src/Picture.C	Thu Apr 27 22:45:59 1989
--- src/Picture.C	Tue Jun  6 10:04:04 1989
***************
*** 50,56 ****
  void Picture::Expand(int sz)
  {
      size+= sz <= 0 ? cExpandIncr : sz;
!     Realloc(&pi, size*sizeof(PictItem));
  }
  
  void Picture::Close()
--- 50,58 ----
  void Picture::Expand(int sz)
  {
      size+= sz <= 0 ? cExpandIncr : sz;
! /* Change by Bryan Boreham, Kewill, Tue Jun  6 10:03:52 1989.
!    Added the (void **) cast to keep g++ happy.    */
!     Realloc((void **)&pi, size*sizeof(PictItem));
  }
  
  void Picture::Close()
diff -c -r dist-src/Picture.h src/Picture.h
*** dist-src/Picture.h	Thu Apr 27 22:46:16 1989
--- src/Picture.h	Fri Jun 16 20:37:18 1989
***************
*** 3,9 ****
  
  #include "Port.h"
  
! const cExpandIncr= 20;
  
  typedef class Picture *PicturePtr;
  
--- 3,11 ----
  
  #include "Port.h"
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const cExpandIncr= 20;
  
  typedef class Picture *PicturePtr;
  
Only in src: Picture.o
diff -c -r dist-src/Point.h src/Point.h
*** dist-src/Point.h	Mon May  8 16:23:41 1989
--- src/Point.h	Sun Jun 25 19:39:24 1989
***************
*** 3,11 ****
--- 3,17 ----
  
  #include "Types.h"
  
+ /* Change by Bryan Boreham, Kewill, Thurs Jun 1 14:21:23 1989.
+    These are simply syntax errors.    
  overload Scale();
  overload Min();
  overload Max();
+ */
+ overload Scale;
+ overload Min;
+ overload Max;
  
  class Point {
  public:
***************
*** 43,48 ****
--- 49,80 ----
  	friend Point operator/ (Point p1, Point p2)
  	    { return Point(p1.x / p2.x, p1.y / p2.y); }
  	    
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 14:19:12 1989.
+    G++ 1.35.1- doesn't see that it can convert a short to a Point and
+    then perform the operator. So I added these:    */
+ #ifdef __GNUG__
+ 	friend Point operator+ (Point p1, short x)
+ 	    { return Point(p1.x + x, p1.y + x); }
+ 
+ 	friend Point operator- (Point p1, short x)
+ 	    { return Point(p1.x - x, p1.y - x); }
+ 
+ 	friend Point operator- (short x, Point p1)
+ 	    { return Point(x - p1.x, x - p1.y); }
+ 
+ 	friend Point operator* (Point p1, short x)
+ 	    { return Point(p1.x * x, p1.y * x); }
+ 
+ 	friend Point operator* (short x, Point p1)
+ 	    { return Point(p1.x * x, p1.y * x); }
+ 
+ 	friend Point operator/ (Point p1, short x)
+ 	    { return Point(p1.x / x, p1.y / x); }
+ 
+ 	friend bool operator>= (Point p1, short x)
+ 	    { return p1.x >= x && p1.y >= x; }
+ #endif
+ 
  	friend Point Scale(Point p, Point num, Point denom)
  	    { return Point((p.x*num.x)/denom.x, (p.y*num.y)/denom.y); }
  	    
Only in src: Point.o
diff -c -r dist-src/Port.h src/Port.h
*** dist-src/Port.h	Fri May 12 13:38:01 1989
--- src/Port.h	Sun Jun 18 14:11:30 1989
***************
*** 9,15 ****
  #include "Font.h"
  #include "Bitmap.h"
  
! const int MaxTextBatchCnt= 400;
  
  enum PortType {
      ePortOutput = 1,
--- 9,17 ----
  #include "Font.h"
  #include "Bitmap.h"
  
! /* Change by Bryan Boreham, Kewill, Thu Jun  1 17:25:00 1989.
!    Constants turn up multiple times in the link if not static. */
! static const int MaxTextBatchCnt= 400;
  
  enum PortType {
      ePortOutput = 1,
Only in src: Port.o
diff -c -r dist-src/PrintDialog.C src/PrintDialog.C
*** dist-src/PrintDialog.C	Sat May 13 00:43:09 1989
--- src/PrintDialog.C	Tue Jun  6 10:33:02 1989
***************
*** 31,37 ****
  
  //---- PrintDialog -------------------------------------------------------------
  
! const int cIdSaveToFile =   cIdFirstUser + 2,
  	  cIdOptions    =   cIdFirstUser + 3,
  	  cIdFrom       =   cIdFirstUser + 4,
  	  cIdTo         =   cIdFirstUser + 5,
--- 31,39 ----
  
  //---- PrintDialog -------------------------------------------------------------
  
! /* Change by Bryan Boreham, Kewill, Tue Jun  6 10:32:13 1989.
!    constants can turn up multiple times in the link if not static.    */
! static const int cIdSaveToFile =   cIdFirstUser + 2,
  	  cIdOptions    =   cIdFirstUser + 3,
  	  cIdFrom       =   cIdFirstUser + 4,
  	  cIdTo         =   cIdFirstUser + 5,
Only in src: PrintDialog.o
Only in src: PrintPort.o
Only in src: Printer.o
Only in src: ProgEnv.o
Only in src: PullDownFrame.o
Only in src: Rectangle.o
diff -c -r dist-src/RegularExp.C src/RegularExp.C
*** dist-src/RegularExp.C	Tue May  9 15:58:24 1989
--- src/RegularExp.C	Sun Jun 25 16:51:33 1989
***************
*** 26,31 ****
--- 26,35 ----
  	    char *str2, int size2, int startpos, int range, RegExRegs *regs,
  	    int mstop, int *len); 
  
+ /* Change by Bryan Boreham, Kewill, Wed Jun 14 20:40:44 1989.
+    These are defined below, where they are used. I don't know why they
+    are in here twice.   */
+ #if 0
  //-----class Regular Expression --------------------------------------------
  
  RegularExp gRexFloat("\\(+\\|-\\)?[0-9]*\\(\\.[0-9]*\\)?"),
***************
*** 37,42 ****
--- 41,47 ----
  	   gRexUppercase("[A-Z]+"),
  	   gRexAlphanum("[0-9A-Za-z]+"),
  	   gRexIdentifier("[A-Za-z_][A-Za-z0-9_]*");
+ #endif
  
  MetaImpl(RegularExp, (I_CS(source), I_CS(result), I_B(caseSensitive),
      I_B(fastSearch)));
diff -c -r dist-src/RegularExp.h src/RegularExp.h
*** dist-src/RegularExp.h	Wed Mar 15 08:41:59 1989
--- src/RegularExp.h	Fri Jun 16 20:37:23 1989
***************
*** 2,8 ****
  #define RegExp_First
  
  #include "Object.h"
! const int cNumRegs = 10;
  
  // interface to the GNU emacs regular expression compiler,
  // refer to regex.doc for a description of its advanced features
--- 2,10 ----
  #define RegExp_First
  
  #include "Object.h"
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const int cNumRegs = 10;
  
  // interface to the GNU emacs regular expression compiler,
  // refer to regex.doc for a description of its advanced features
Only in src: RegularExp.o
Only in src: RestrTextView.o
diff -c -r dist-src/Root.h src/Root.h
*** dist-src/Root.h	Wed Mar 15 08:42:09 1989
--- src/Root.h	Fri Jun 16 20:37:25 1989
***************
*** 1,3 ****
--- 1,4 ----
+ #pragma once
  #ifndef Root_First
  #define Root_First
  
Only in src: Root.o
diff -c -r dist-src/RunArray.C src/RunArray.C
*** dist-src/RunArray.C	Mon May  8 17:34:02 1989
--- src/RunArray.C	Mon Jun 19 19:25:06 1989
***************
*** 22,32 ****
  
  //---- class RunArray --------------------------------------------------
  
! MetaImpl(RunArray, (I_OV(cont, count), I_IV(runlength, count), I_I(size), I_I(count), I_I(length),
      I_I(current), I_I(offset), I_O(nullrun), I_I(nullpos)));
  
  //---- public methods --------------------------------------------------         
  
  RunArray::RunArray(int elements)
  {
      cont= new ObjPtr[size = elements];
--- 22,39 ----
  
  //---- class RunArray --------------------------------------------------
  
! MetaImpl(RunArray, (I_OV(cont, count), I_IV(runlength, count), I_I((this->size)), I_I(count), I_I(length),
      I_I(current), I_I(offset), I_O(nullrun), I_I(nullpos)));
  
  //---- public methods --------------------------------------------------         
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 15:47:39 1989.
+    Changed "size" to this->size to help g++ get over multiple
+    inheritance problems. There is some other problem with doing it
+    earlier in the file.    */
+ 
+ #define size this->size
+ 
  RunArray::RunArray(int elements)
  {
      cont= new ObjPtr[size = elements];
***************
*** 420,425 ****
--- 427,436 ----
      }        
      count += shift;
  }
+ 
+ /* Change by Bryan Boreham, Kewill, Mon Jun 19 19:22:18 1989.
+    This matches the #define earlier; size is now used as a parameter.    */
+ #undef size
  
  void RunArray::InsertRuns(int from, int to, ObjPtr *value, 
  					    int *run, int inssize, bool free)
Only in src: RunArray.o
Common subdirectories: dist-src/SERVER and src/SERVER
Common subdirectories: dist-src/SUNOS and src/SUNOS
Common subdirectories: dist-src/SUNWINDOW and src/SUNWINDOW
Only in src: ScrollBar.o
diff -c -r dist-src/Scroller.h src/Scroller.h
*** dist-src/Scroller.h	Thu Apr 27 08:59:37 1989
--- src/Scroller.h	Fri Jun 16 20:37:27 1989
***************
*** 13,19 ****
      eScrollDefault    = eScrollRight | eScrollDown
  } ScrollDir;
  
! const int cScrollBarSize= 20;
  
  class Scroller: public CompositeVObject {
  protected:
--- 13,21 ----
      eScrollDefault    = eScrollRight | eScrollDown
  } ScrollDir;
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const int cScrollBarSize= 20;
  
  class Scroller: public CompositeVObject {
  protected:
Only in src: Scroller.o
diff -c -r dist-src/SeqCollection.C src/SeqCollection.C
*** dist-src/SeqCollection.C	Wed Apr 12 20:50:42 1989
--- src/SeqCollection.C	Mon Jun  5 14:28:18 1989
***************
*** 1,9 ****
  //$SeqCollection$
  #include "SeqCollection.h"
  
! MetaImpl0(SeqCollection);
  
! AbstractClass(SeqCollection);
  
  SeqCollection::SeqCollection()
  {
--- 1,12 ----
  //$SeqCollection$
  #include "SeqCollection.h"
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:27:29 1989.
!    Changed Meta... to AbstractMeta... and removed AbstractClass;
!    Looks like this was an old-style feature.    */
! AbstractMetaImpl0(SeqCollection);
  
! //  AbstractClass(SeqCollection);
  
  SeqCollection::SeqCollection()
  {
Only in src: SeqCollection.o
Only in src: Set.o
diff -c -r dist-src/ShellTextView.h src/ShellTextView.h
*** dist-src/ShellTextView.h	Wed May 17 17:58:15 1989
--- src/ShellTextView.h	Fri Jun 16 20:37:29 1989
***************
*** 9,15 ****
  
  //---- commands -------------------------------------------------------------
  
! const int cDOIT             = 800,
  	  cBECOMECONSOLE    = 801,
  	  cCLEAR            = 802,
  	  cRECONNECT        = 803,
--- 9,17 ----
  
  //---- commands -------------------------------------------------------------
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const int cDOIT             = 800,
  	  cBECOMECONSOLE    = 801,
  	  cCLEAR            = 802,
  	  cRECONNECT        = 803,
Only in src: ShellTextView.o
Only in src: Slider.o
Only in src: SortedObjList.o
diff -c -r dist-src/Splitter.C src/Splitter.C
*** dist-src/Splitter.C	Tue May  9 12:28:15 1989
--- src/Splitter.C	Mon Jun  5 19:25:27 1989
***************
*** 96,101 ****
--- 96,104 ----
      At(3)->Open(mode);  // right/bottom Scroller is always open
  }
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 19:25:13 1989.
+    The (Scroller *) casts are for g++.    */
+ 
  void Splitter::Control(int id, int part, void *val)
  {
      if (id >= 0 && id < 4) {
***************
*** 109,127 ****
  		py.x= px.y= 0;
  	    if (id == 1 || id == 2) {
  		if (v0->IsOpen())
! 		    v0->Scroller::Control(id, part, &px);
  		if (v3->IsOpen())
! 		    v3->Scroller::Control(id, part, &py);
  	    }
  	    if (id == 0 || id == 3) {
  		if (v1->IsOpen())
! 		    v1->Scroller::Control(id, part, &px);
  		if (v2->IsOpen())
! 		    v2->Scroller::Control(id, part, &py);
  	    }
  	}
  	VObject *v= At(id);
! 	v->Scroller::Control(id, part, val);
      } else
  	VObject::Control(id, part, val);
  }
--- 112,130 ----
  		py.x= px.y= 0;
  	    if (id == 1 || id == 2) {
  		if (v0->IsOpen())
! 		    ((Scroller *)v0)->Scroller::Control(id, part, &px);
  		if (v3->IsOpen())
! 		    ((Scroller *)v3)->Scroller::Control(id, part, &py);
  	    }
  	    if (id == 0 || id == 3) {
  		if (v1->IsOpen())
! 		    ((Scroller *)v1)->Scroller::Control(id, part, &px);
  		if (v2->IsOpen())
! 		    ((Scroller *)v2)->Scroller::Control(id, part, &py);
  	    }
  	}
  	VObject *v= At(id);
! 	((Scroller *)v)->Scroller::Control(id, part, val);
      } else
  	VObject::Control(id, part, val);
  }
Only in src: Splitter.o
diff -c -r dist-src/StaticTextView.h src/StaticTextView.h
*** dist-src/StaticTextView.h	Fri May 19 17:48:32 1989
--- src/StaticTextView.h	Sun Jun 25 14:41:51 1989
***************
*** 44,51 ****
      eReplacedText      // text replaced
  };
  
! const int cFit = -1;
! const int cMaxFormat = 3;      // maximum number of consecutive lines formatted 
  			       // without interrupt
  
  //---- line mark ------------------------------------------------------------
--- 44,53 ----
      eReplacedText      // text replaced
  };
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const int cFit = -1;
! static const int cMaxFormat = 3;      // maximum number of consecutive lines formatted 
  			       // without interrupt
  
  //---- line mark ------------------------------------------------------------
Only in src: StaticTextView.o
diff -c -r dist-src/Storage.C src/Storage.C
*** dist-src/Storage.C	Fri May 19 22:18:57 1989
--- src/Storage.C	Sun Jun 25 16:54:46 1989
***************
*** 50,61 ****
--- 50,76 ----
      totalF+= size;
  }
  
+ /* Change by Bryan Boreham, Kewill, Tue Jun 13 16:17:28 1989.
+    G++'s default "new" is called __builtin_new.   
+    This kept me awake for days.    */
+ 
+ #ifdef __GNUG__
+ void* __builtin_new(long size)
+ #else
  void* _new(long size)
+ #endif
  {
      return Malloc(size);
  }
  
+ /* Change by Bryan Boreham, Kewill, Tue Jun 13 16:17:28 1989.
+    G++'s default "delete" is called __builtin_delete.   */
+ 
+ #ifdef __GNUG__
+ void __builtin_delete(void *p)
+ #else
  void _delete(void *p)
+ #endif
  {
      Free(p);
  }
Only in src: Storage.o
diff -c -r dist-src/String.C src/String.C
*** dist-src/String.C	Wed May 17 20:00:08 1989
--- src/String.C	Fri Jun 23 21:25:11 1989
***************
*** 242,248 ****
  	return *s;
      if (l < 0)
  	l= strlen(r)+1;
!     Expand(s, l);
      return strncpy(*s, r, l);
  }
  
--- 242,250 ----
  	return *s;
      if (l < 0)
  	l= strlen(r)+1;
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 16:06:24 1989.
!    g++ wants the (void **) cast.    */
!     Expand((void **)s, l);
      return strncpy(*s, r, l);
  }
  
***************
*** 257,263 ****
  
      vsprintf(buf, fmt, ap);
  
!     Expand(s, strlen(buf));
      return strcpy(*s, buf);
  }
  
--- 259,267 ----
  
      vsprintf(buf, fmt, ap);
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 16:06:24 1989.
!    g++ wants the (void **) cast.    */
!     Expand((void **)s, strlen(buf));
      return strcpy(*s, buf);
  }
  
***************
*** 335,337 ****
--- 339,389 ----
      }
      return q;
  }
+ 
+ /* **** HACK ALERT **** Leave this here at your peril!
+ 
+    Change by Bryan Boreham, Kewill, Sun Jun 18 20:07:54 1989.
+    I'm using the Zortech streams code since the libg++ stuff     
+    doesnt't match the usage here. However, Sun's vsprintf(3) is
+    COMPLETELY BRAIN-DAMAGED, and returns a pointer to the string
+    generated instead of the number of characters written.
+ 
+    So, I have my own version of form() here.  This is *not* guaranteed
+    to work well with other code or other libraries. Or even to work at
+    all :-) 
+ */
+ 
+ #include "Error.h"
+ 
+ #define FORM_BUFFER_SIZE 1024
+ #define FORM_SPACE 256
+ 
+ static char form_buffer[FORM_BUFFER_SIZE]; 
+ static char *form_posn = form_buffer; 
+  
+ char *form(const char *format,...) 
+ {
+   char *s; 
+   int len; 
+   va_list ap;
+   
+   va_start(ap, format);
+ 
+   s = form_posn; 
+   if (s > form_buffer + FORM_BUFFER_SIZE - FORM_SPACE)
+     s = form_buffer;		// Not enough room; back to the beginning.
+ 
+ #ifdef sun
+   len = strlen( (char*) vsprintf(s, format, ap) );
+ #else
+   len = vsprintf(s, format, ap); 
+ #endif
+   if (len >= FORM_SPACE) 
+     Fatal("form","Over-ran buffer");
+   form_posn = len + s + 1;	// Start here the next time round.
+ 
+   va_end(ap);
+ 
+   return s; 
+ } 
+ 
diff -c -r dist-src/String.h src/String.h
*** dist-src/String.h	Fri May 19 12:12:02 1989
--- src/String.h	Fri Jun 16 20:37:34 1989
***************
*** 7,13 ****
--- 7,15 ----
  
  #include "Storage.h"
  
+ // Taken out by BJB, Kewill, 1/6/89. These are defined in g++'s std.h
  // standard string operations
+ #if 0
  extern char* strcat(char*, const char*);
  extern char* strncat(char*, const char*, int);
  extern int strcmp(const char*, const char*);
***************
*** 21,26 ****
--- 23,29 ----
  extern void bcopy(byte*, byte*, int);
  extern void bzero(byte*, int);
  extern int bcmp(byte*, byte*, int);
+ #endif
  
  // string utilites
  extern char* strsave(char *s, int l= -1); 
***************
*** 38,47 ****
--- 41,54 ----
  extern char* strn0cpy(char*, const char*, int);
      // strncpy which establises always a terminating 0 byte
  
+ // Taken out by BJB, Kewill, 1/6/89. These are defined in g++'s std.h
+ // They were also defined 15 lines above. 
  // bsd byte string operations
+ #if 0
  extern void bcopy(byte*, byte*, int);
  extern void bzero(byte*, int);
  extern int bcmp(byte*, byte*, int);
+ #endif
  
  // utilites to store strings in ET++ format
  extern istream &ReadString(istream &i, byte **s, int *lp= 0);
Only in src: String.o
Only in src: StyledText.o
diff -c -r dist-src/System.C src/System.C
*** dist-src/System.C	Tue May 23 15:57:23 1989
--- src/System.C	Mon Jun  5 16:11:16 1989
***************
*** 19,25 ****
  static bool inRemove= FALSE;
  
  extern void exit(int);
! extern int abort();
  
  //---- class SysEvtHandler ---------------------------------------
  
--- 19,28 ----
  static bool inRemove= FALSE;
  
  extern void exit(int);
! 
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 16:10:33 1989.
!    It's plain dumb to declare abort() returning an int.    */
! extern void abort();
  
  //---- class SysEvtHandler ---------------------------------------
  
diff -c -r dist-src/System.h src/System.h
*** dist-src/System.h	Fri May 12 23:47:30 1989
--- src/System.h	Sun Jun 25 16:57:31 1989
***************
*** 1,7 ****
  #ifndef System_First
  #define System_First
  
! #include "Port.h"
  #include "Object.h"
  
  //---- Directory ---------------------------------------------------------------
--- 1,10 ----
  #ifndef System_First
  #define System_First
  
! /* Change by Bryan Boreham, Kewill, Tue Jun 13 14:44:00 1989.
!    Took this out; It is only needed in a few places, and this 
!    file is included *everywhere*.    */
! //#include "Port.h"
  #include "Object.h"
  
  //---- Directory ---------------------------------------------------------------
Only in src: System.o
diff -c -r dist-src/Text.C src/Text.C
*** dist-src/Text.C	Wed May 17 19:52:56 1989
--- src/Text.C	Mon Jun  5 19:37:04 1989
***************
*** 496,502 ****
      return ce;
  }
  
! struct FontPtr TextIter::FontAt(int)
  { 
      return ct->GetFont(); 
  } 
--- 496,504 ----
      return ce;
  }
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 19:36:53 1989.
!    I removed "struct" here because FontPtr is typedef'd.    */
! FontPtr TextIter::FontAt(int)
  { 
      return ct->GetFont(); 
  } 
diff -c -r dist-src/Text.h src/Text.h
*** dist-src/Text.h	Wed May 17 21:27:18 1989
--- src/Text.h	Fri Jun 16 20:37:36 1989
***************
*** 41,47 ****
  
  //---- abstract class Text ----------------------------------------------
  
! const int cEOT = -1,
  	  cTabw = 40;
  
  inline bool CheckRange (int max, int from, int to)
--- 41,49 ----
  
  //---- abstract class Text ----------------------------------------------
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const int cEOT = -1,
  	  cTabw = 40;
  
  inline bool CheckRange (int max, int from, int to)
***************
*** 170,176 ****
      virtual int Line(LineDesc* l = 0); // return end of next line, abstract
      virtual int Token(int *width, LineDesc* l = 0); // return next token and width, abstract
      virtual int GetPos();
!     virtual struct FontPtr FontAt(int);
      virtual int GetLastPos();                 // get last position
      virtual void SetPos(int newPos);
      virtual int Unget();                     // unget last token
--- 172,182 ----
      virtual int Line(LineDesc* l = 0); // return end of next line, abstract
      virtual int Token(int *width, LineDesc* l = 0); // return next token and width, abstract
      virtual int GetPos();
! 
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 14:52:57 1989.
!    FontPtr is already typdef'd in Font.h    
! **  virtual struct FontPtr FontAt(int);   */
!     virtual FontPtr FontAt(int);
      virtual int GetLastPos();                 // get last position
      virtual void SetPos(int newPos);
      virtual int Unget();                     // unget last token
***************
*** 195,201 ****
  	{ return ti->Token(width,l); }
      int GetPos()
  	{ return ti->GetPos(); }
!     struct FontPtr FontAt(int i)
  	{ return ti->FontAt(i); }
      int GetLastPos()  
  	{ return ti->GetLastPos(); }               
--- 201,211 ----
  	{ return ti->Token(width,l); }
      int GetPos()
  	{ return ti->GetPos(); }
! 
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 14:55:32 1989.
!    FontPtr is already typdef'd in Font.h    
! **  struct FontPtr FontAt(int i)  */
!     FontPtr FontAt(int i)
  	{ return ti->FontAt(i); }
      int GetLastPos()  
  	{ return ti->GetLastPos(); }               
Only in src: Text.o
Only in src: TextCmd.o
diff -c -r dist-src/TextView.C src/TextView.C
*** dist-src/TextView.C	Tue May 23 21:58:22 1989
--- src/TextView.C	Mon Jun  5 19:51:11 1989
***************
*** 160,168 ****
--- 160,175 ----
  
  Command *TextView::DoLeftButtonDownCommand(Point p, Token t, int clicks)
  {
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 19:45:12 1989.
+    I changed this because g++ complained; the old version was:    
      SelPoint oldStart= start;
      SelPoint oldEnd= end;
+ */
+     SelPoint oldStart, oldEnd;
  
+     oldStart= start;
+     oldEnd= end;
+ 
      ResumeFormat();
      if (!Enabled())
  	return gNoChanges;
***************
*** 578,585 ****
      else 
  	end= NoWrapFormat(at, atCh, nl, upto);
      d= max(0, end - at);
!     swap(&saved, &lines);
!     swap(&savedMarks, &marks);
      if (d > 0) {
  	for (int i= nLines-1; i > at; i--) { // make room for new lines
  	    m= MarkAtLine(i);
--- 585,594 ----
      else 
  	end= NoWrapFormat(at, atCh, nl, upto);
      d= max(0, end - at);
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 19:49:32 1989.
!    Added the (Object **) casts.    */
!     swap((Object **)&saved, (Object **)&lines);
!     swap((Object **)&savedMarks, (Object **)&marks);
      if (d > 0) {
  	for (int i= nLines-1; i > at; i--) { // make room for new lines
  	    m= MarkAtLine(i);
diff -c -r dist-src/TextView.h src/TextView.h
*** dist-src/TextView.h	Tue May 23 21:56:59 1989
--- src/TextView.h	Fri Jun 16 20:37:36 1989
***************
*** 3,9 ****
  
  #include "StaticTextView.h"
  
! const int cMaxBatchedIns = 80; // maximum number of batched inserts
  
  //---- constants passed to DoUpdate to the dependents of a TextView, constants
  //     "inherited" from StaticTextView: 
--- 3,11 ----
  
  #include "StaticTextView.h"
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const int cMaxBatchedIns = 80; // maximum number of batched inserts
  
  //---- constants passed to DoUpdate to the dependents of a TextView, constants
  //     "inherited" from StaticTextView: 
Only in src: TextView.o
Only in src: Token.o
Only in src: TreeView.o
diff -c -r dist-src/Types.h src/Types.h
*** dist-src/Types.h	Thu May 11 12:29:35 1989
--- src/Types.h	Sun Jun 25 17:22:49 1989
***************
*** 1,20 ****
  #ifndef Types_First
  #define Types_First
  
  #include <stream.h>
  #include <stdarg.h>
  
  #define _NAME1_(name) name
  #define _NAME2_(name1,name2) _NAME1_(name1)name2
  #define _NAME3_(name1,name2,name3) _NAME2_(name1,name2)name3
  
  #define SP << " "
  #define NL << "\n"
  
- typedef unsigned char byte;
- typedef unsigned char bool;
- #define FALSE 0
- #define TRUE 1
  
  // standard CC drivers do not define __COMPILEDIR__
  
--- 1,37 ----
+ #pragma once
  #ifndef Types_First
  #define Types_First
  
+ /* Change by Bryan Boreham, Kewill, Fri Jun 23 20:39:32 1989.
+    Moved these above #includes that also define them.    */
+ typedef unsigned char byte;
+ typedef unsigned char bool;
+ #define FALSE 0
+ #define TRUE 1
+ 
+ /* Change by Bryan Boreham, Kewill, Sun Jun  4 14:19:14 1989.
+    Included gcc's <std.h>    */
+ #include <std.h>
  #include <stream.h>
  #include <stdarg.h>
  
+ // Change by BJB, Kewill, 1/6/89. Added ANSI string-concatenation versions.
+ // 5/6/89 And a stringising macro, which converts __STRING(foo) to "foo"
+ #ifdef __STDC__
  #define _NAME1_(name) name
+ #define _NAME2_(name1,name2) name1 ## name2
+ #define _NAME3_(name1,name2,name3) name1 ## name2 ## name3
+ #define __STRING(name) #name
+ #else
+ #define _NAME1_(name) name
  #define _NAME2_(name1,name2) _NAME1_(name1)name2
  #define _NAME3_(name1,name2,name3) _NAME2_(name1,name2)name3
+ #define __STRING(name) "name"
+ #endif
  
  #define SP << " "
  #define NL << "\n"
  
  
  // standard CC drivers do not define __COMPILEDIR__
  
***************
*** 39,46 ****
      return (n & BIT(i)) != 0;
  }
  
! const int cMaxInt      =   2147483647;
! const int cMaxShort    =   32767;
  
  enum HighlightState { Off= FALSE, On= TRUE };
  enum Direction { eHor= FALSE, eVert= TRUE };
--- 56,65 ----
      return (n & BIT(i)) != 0;
  }
  
! /* Change by Bryan Boreham, Kewill, Thu Jun  1 17:25:00 1989.
!    Constants turn up multiple times in the link if not static. */
! static const int cMaxInt      =   2147483647;
! static const int cMaxShort    =   32767;
  
  enum HighlightState { Off= FALSE, On= TRUE };
  enum Direction { eHor= FALSE, eVert= TRUE };
***************
*** 84,92 ****
--- 103,116 ----
  
  #define ONEXIT(name) _ONEXIT(_NAME2_(_OnExit_,name))
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 17:22:03 1989.
+    G++ complains about lazy prototyping, so I took these out. Only
+    VoidPtrFunc is used, in SUNOS/dynlink.h.    */
+ #ifndef __GNUG__
  typedef void (*VoidFunc)(...);
  typedef int (*IntFunc)(...);
  typedef void* (*VoidPtrFunc)(...);
+ #endif
  
  inline int abs(int a)
  {
***************
*** 98,103 ****
--- 122,132 ----
      return x ? ((x < 0) ? -1 : 1) : 0;
  }
  
+ /* Change by Bryan Boreham, Kewill, Thu Jun 15 12:10:18 1989.
+    Other include files, such as InterViews', may also define min and max.
+    This is a guard.    */
+ 
+ #if !defined(min) && !defined(MIN_DEFINED)
  inline int min(int a, int b)
  {
      return a <= b ? a : b;
***************
*** 107,112 ****
--- 136,143 ----
  {
      return a >= b ? a : b;
  }
+ #define MIN_DEFINED
+ #endif
  
  overload swap;
      
Only in src: Types.o
Only in src: VObject.o
diff -c -r dist-src/VObjectText.C src/VObjectText.C
*** dist-src/VObjectText.C	Mon May  8 17:41:10 1989
--- src/VObjectText.C	Mon Jun  5 17:43:42 1989
***************
*** 3,8 ****
--- 3,12 ----
  #include "TextView.h"
  #include "Mark.h" 
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 16:53:14 1989.
+    g++ gets VERY upset about member marks; I have changed it to this->marks
+    throughout.    */
+ 
  //------ VObjectMark -----------------------------------------------------------
  
  MetaImpl(VObjectMark, I_O(gop));
***************
*** 46,52 ****
  
  //----- class VObjectText ------------------------------------------------------
  
! MetaImpl(VObjectText, (I_O(marks), I_O(tv)));
  
  VObjectText::VObjectText()
  {
--- 50,56 ----
  
  //----- class VObjectText ------------------------------------------------------
  
! MetaImpl(VObjectText, (I_O(this->marks), I_O(tv)));
  
  VObjectText::VObjectText()
  {
***************
*** 72,86 ****
  
  void VObjectText::Init()
  {
!     marks = new MarkList(TRUE);
      SetEscapeChar(cVObjectChar);
  }
  
  VObjectText::~VObjectText()
  {
!     if (marks)
! 	marks->FreeAll();
!     SafeDelete(marks);
  }
  
  void VObjectText::InitNew()
--- 76,90 ----
  
  void VObjectText::Init()
  {
!     this->marks = new MarkList(TRUE);
      SetEscapeChar(cVObjectChar);
  }
  
  VObjectText::~VObjectText()
  {
!     if (this->marks)
! 	this->marks->FreeAll();
!     SafeDelete(this->marks);
  }
  
  void VObjectText::InitNew()
***************
*** 96,103 ****
  
  void VObjectText::ReplaceWithStr(byte *str,int len)
  {
!     if (marks)
! 	marks->FreeAll();
      StyledText::ReplaceWithStr(str, len);    
  }
  
--- 100,107 ----
  
  void VObjectText::ReplaceWithStr(byte *str,int len)
  {
!     if (this->marks)
! 	this->marks->FreeAll();
      StyledText::ReplaceWithStr(str, len);    
  }
  
***************
*** 104,110 ****
  void VObjectText::Cut(int from,int to)
  {
      DoDelayChanges dc(this);
!     marks->Cut(from,to-from);
      StyledText::Cut(from,to);
  }
  
--- 108,114 ----
  void VObjectText::Cut(int from,int to)
  {
      DoDelayChanges dc(this);
!     this->marks->Cut(from,to-from);
      StyledText::Cut(from,to);
  }
  
***************
*** 112,119 ****
  {
      DoDelayChanges dc(this);
      if (from != to)
! 	marks->Cut(from,to-from);
!     marks->Paste(from,t->Size());
      if (t->IsKindOf(VObjectText)) { // paste the gobjects and their marks
  	VObjectText *gt = (VObjectText *)t;
  	VObjectMark *mp,*nmp;
--- 116,123 ----
  {
      DoDelayChanges dc(this);
      if (from != to)
! 	this->marks->Cut(from,to-from);
!     this->marks->Paste(from,t->Size());
      if (t->IsKindOf(VObjectText)) { // paste the gobjects and their marks
  	VObjectText *gt = (VObjectText *)t;
  	VObjectMark *mp,*nmp;
***************
*** 128,134 ****
  		gop->SetContainer(tv);
  	    }
  	    nmp->pos +=from;
! 	    marks->Add(nmp);
  	}    
      }    
      StyledText::Paste(t,from,to);
--- 132,138 ----
  		gop->SetContainer(tv);
  	    }
  	    nmp->pos +=from;
! 	    this->marks->Add(nmp);
  	}    
      }    
      StyledText::Paste(t,from,to);
***************
*** 144,150 ****
  	return;
  
      VObjectText *gt = (VObjectText *)save; 
!     Iter next(marks);
      VObjectMark *mp, *nmp;
      gt->marks->FreeAll();
      while (mp = (VObjectMark*)next()) {
--- 148,154 ----
  	return;
  
      VObjectText *gt = (VObjectText *)save; 
!     Iter next(this->marks);
      VObjectMark *mp, *nmp;
      gt->marks->FreeAll();
      while (mp = (VObjectMark*)next()) {
***************
*** 170,177 ****
  {
      DoDelayChanges dc(this);
      if (from != to)
! 	marks->Cut(from,to-from);
!     marks->Paste(from,1);
      StyledText::Insert(c,from,to);
  }
  
--- 174,181 ----
  {
      DoDelayChanges dc(this);
      if (from != to)
! 	this->marks->Cut(from,to-from);
!     this->marks->Paste(from,1);
      StyledText::Insert(c,from,to);
  }
  
***************
*** 190,196 ****
      tv->GetSelection(&from,&to);
      gm = new VObjectMark(from, 1, gop);
      gm->Lock();
!     marks->Add(gm);
      cmd = tv->DoKeyCommand(cVObjectChar, gPoint0, t);
      gm->Unlock();
      return cmd;
--- 194,200 ----
      tv->GetSelection(&from,&to);
      gm = new VObjectMark(from, 1, gop);
      gm->Lock();
!     this->marks->Add(gm);
      cmd = tv->DoKeyCommand(cVObjectChar, gPoint0, t);
      gm->Unlock();
      return cmd;
***************
*** 198,204 ****
  
  void VObjectText::SetView(View *vp)
  {
!     Iter next(marks);
      VObjectMark *m;
      
      if (!vp->IsKindOf(TextView))
--- 202,208 ----
  
  void VObjectText::SetView(View *vp)
  {
!     Iter next(this->marks);
      VObjectMark *m;
      
      if (!vp->IsKindOf(TextView))
***************
*** 214,220 ****
  {
      VObject *gop = 0;
      
!     Iter next(marks);
      Mark *mp;
      while (mp = (Mark*)next()) {
  	if (mp->pos == charNo && mp->len == 1 && mp->IsKindOf(VObjectMark)) {
--- 218,224 ----
  {
      VObject *gop = 0;
      
!     Iter next(this->marks);
      Mark *mp;
      while (mp = (Mark*)next()) {
  	if (mp->pos == charNo && mp->len == 1 && mp->IsKindOf(VObjectMark)) {
***************
*** 229,235 ****
  {
      VObjectMark *mp= 0;
      
!     Iter next(marks);
      while (mp = (VObjectMark*)next()) 
  	if (mp->pos == charNo && mp->len == 1 && mp->IsKindOf(VObjectMark)) 
  	    return mp;
--- 233,239 ----
  {
      VObjectMark *mp= 0;
      
!     Iter next(this->marks);
      while (mp = (VObjectMark*)next()) 
  	if (mp->pos == charNo && mp->len == 1 && mp->IsKindOf(VObjectMark)) 
  	    return mp;
***************
*** 240,246 ****
  {
      VObject *gop = 0;
      
!     Iter next(marks);
      Mark *mp;
      while (mp = (Mark*)next()) 
  	if (mp->IsKindOf(VObjectMark)) {
--- 244,250 ----
  {
      VObject *gop = 0;
      
!     Iter next(this->marks);
      Mark *mp;
      while (mp = (Mark*)next()) 
  	if (mp->IsKindOf(VObjectMark)) {
***************
*** 258,264 ****
      int pos= -1;
      VObject *gop = 0;
      
!     Iter next(marks);
      Mark *mp;
      while (mp = (Mark*)next()) {
  	if (mp->IsKindOf(VObjectMark)) {
--- 262,268 ----
      int pos= -1;
      VObject *gop = 0;
      
!     Iter next(this->marks);
      Mark *mp;
      while (mp = (Mark*)next()) {
  	if (mp->IsKindOf(VObjectMark)) {
***************
*** 325,347 ****
  
  Iterator *VObjectText::VObjectIterator()
  {
!     return marks->GetIterator();
  }
      
  int VObjectText::VObjectCount()
  {
!     return marks->Size();
  }
      
  ostream &VObjectText::PrintOn(ostream &s) 
  {
      StyledText::PrintOn(s);
!     return s << marks SP;
  }
  
  istream &VObjectText::ReadFrom(istream &s) 
  {
      StyledText::ReadFrom(s);
!     s >> marks;
      return s;
  }
--- 329,351 ----
  
  Iterator *VObjectText::VObjectIterator()
  {
!     return this->marks->GetIterator();
  }
      
  int VObjectText::VObjectCount()
  {
!     return this->marks->Size();
  }
      
  ostream &VObjectText::PrintOn(ostream &s) 
  {
      StyledText::PrintOn(s);
!     return s << this->marks SP;
  }
  
  istream &VObjectText::ReadFrom(istream &s) 
  {
      StyledText::ReadFrom(s);
!     s >> this->marks;
      return s;
  }
diff -c -r dist-src/VObjectText.h src/VObjectText.h
*** dist-src/VObjectText.h	Thu Apr 27 10:31:12 1989
--- src/VObjectText.h	Fri Jun 16 20:37:38 1989
***************
*** 4,10 ****
  #include "StyledText.h"
  #include "Mark.h"
  
! const cVObjectChar  = '#'; // chararcter to mark a VObject
  
  enum VobMarkFlags {
      eVobInvalid     = eMarkLast + 1,
--- 4,12 ----
  #include "StyledText.h"
  #include "Mark.h"
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const cVObjectChar  = '#'; // chararcter to mark a VObject
  
  enum VobMarkFlags {
      eVobInvalid     = eMarkLast + 1,
Only in src: VObjectText.o
Only in src: VObjectTextView.o
Only in src: View.o
Only in src: Window.o
diff -c -r dist-src/WindowPort.C src/WindowPort.C
*** dist-src/WindowPort.C	Mon May 22 23:53:31 1989
--- src/WindowPort.C	Sun Jun 25 15:09:01 1989
***************
*** 43,56 ****
  {
  }
  
  WindowPort::WindowPort(InpHandlerFun ih, void *p1, void *p2, bool ov, bool bl) : (ePortWindow)
  {
!     if (this == 0)
! 	gWindowSystem->MakeWindow(&this, ih, p1, p2, ov, bl);
!     else {
  	Fatal("WindowPort::WindowPort", "no static instances");
  	this= 0;    // can't reach
      }
  }
  
  void WindowPort::Init(InpHandlerFun ih, void *p1, void *p2, bool ov, bool bl)
--- 43,82 ----
  {
  }
  
+ /* 
+    Change by Bryan Boreham, Kewill, Sun Jun 18 18:09:56 1989.
+ 
+    The idea here is that when a program constructs a WindowPort, it
+    will actually get an XWindowPort, or one for NeWS, etc.  This used to
+    call MakeWindow(&this, ...), but g++ doesn't let you take the address
+    of this.
+ 
+    There is another complication (of course), which kept me puzzled
+    for three days. Whenever you assign to "this", constructors for all
+    the super-classes and for any class instance variables will be called.
+    Effectively, this overwrites whatever the MakeWindow routine has done.
+    One symptom is that the vptr for WindowPort will be stuffed in, making
+    the XWindowPort, or whatever, be a WindowPort.
+ 
+    So I put in the tmp_this and tmp_copy stuff to allow address-taking
+    and save the desired values, but it looks like it needs a better
+    solution.  
+ */
+ 
  WindowPort::WindowPort(InpHandlerFun ih, void *p1, void *p2, bool ov, bool bl) : (ePortWindow)
  {
!     WindowPort *tmp_this;
!     char tmp_copy[sizeof(*this)];
! 
!     if (this == 0) {
! 	gWindowSystem->MakeWindow(&tmp_this, ih, p1, p2, ov, bl);
! 	bcopy(tmp_this, tmp_copy, sizeof(*this));
! 	this = tmp_this;
!     } else {
  	Fatal("WindowPort::WindowPort", "no static instances");
  	this= 0;    // can't reach
      }
+     bcopy(tmp_copy, this, sizeof(*this));
  }
  
  void WindowPort::Init(InpHandlerFun ih, void *p1, void *p2, bool ov, bool bl)
***************
*** 221,227 ****
  	    break;
  	}
      }
!     ihf (privdata, privdata2, t);
  }
  
  void WindowPort::PushEvent(Token t)
--- 247,255 ----
  	    break;
  	}
      }
! /* Change by Bryan Boreham, Kewill, Tue Jun  6 10:13:26 1989.
!    Added the de-reference of ihf to keep g++ happy.    */
!     (*ihf) (privdata, privdata2, t);
  }
  
  void WindowPort::PushEvent(Token t)
Only in src: WindowPort.o
diff -c -r dist-src/WindowSystem.h src/WindowSystem.h
*** dist-src/WindowSystem.h	Fri May 12 23:47:07 1989
--- src/WindowSystem.h	Fri Jun 16 20:37:39 1989
***************
*** 2,7 ****
--- 2,10 ----
  #define WindowSystem_First
  
  #include "System.h"
+ /* Change by Bryan Boreham, Kewill, Wed Jun 14 15:39:19 1989.
+    Added this here; it used to be in System.h    */
+ #include "Port.h"
  
  //---- WindowSystem ------------------------------------------------------------
  
Only in src: WindowSystem.o
Common subdirectories: dist-src/XSERVER and src/XSERVER
Only in src: colorder
Only in dist-src: ctdtorder.bak
Common subdirectories: dist-src/images and src/images
Only in src: libcol.a
diff -c -r dist-src/makefile src/makefile
*** dist-src/makefile	Tue May 23 23:16:11 1989
--- src/makefile	Sun Jun 25 20:30:31 1989
***************
*** 1,16 ****
  CFLAGS  =   -O
! CCFLAGS =   +e2
  LDFLAGS =   
  WLIB    =   -lsuntool -lsunwindow -lpixrect
  MAKEDEP =   ../bin/domakedep
  MUNCH   =   /local/lib/munch
! LIBCC   =   /local/lib/libC.a
  SHELL   =   /bin/sh
  
  .SUFFIXES: .C
  
  .C.o:
! 	CC -c $(CCFLAGS) $<
  
  #-------------------------------------------------------------------------------
  # memory management
--- 1,20 ----
+ #  Change by Bryan Boreham, Kewill, Sun Jun 25 15:15:38 1989.
+ #  The -fno-defer-pop option cures a bug in g++.    
+ #  The flags here suit me; you may wish to add -g.
+ 
  CFLAGS  =   -O
! CCFLAGS =   -fno-defer-pop
  LDFLAGS =   
  WLIB    =   -lsuntool -lsunwindow -lpixrect
  MAKEDEP =   ../bin/domakedep
  MUNCH   =   /local/lib/munch
! LIBCC   =   /usr/local/lib/lib.a
  SHELL   =   /bin/sh
  
  .SUFFIXES: .C
  
  .C.o:
! 	g++ -c $(CCFLAGS) $<
  
  #-------------------------------------------------------------------------------
  # memory management
***************
*** 48,55 ****
  
  #---- window system
  
! WS_OFILES       =   $(SUNSERVER) $(NEWSSERVER) $(XSERVER) $(SUNWINDOW)
! WS_IFDEFS       =   -DWS_SUNSERVER -DWS_NEWS -DWS_X -DWS_SUNWINDOW
  WS_DIRS         =   SUNWINDOW XSERVER SERVER NEWS 
  
  #---- printer
--- 52,62 ----
  
  #---- window system
  
! #  Change by Bryan Boreham, Kewill, Sun Jun 25 15:15:38 1989.
! #  Took out SUNSERVER and NEWS
! 
! WS_OFILES       =   $(XSERVER) $(SUNWINDOW)
! WS_IFDEFS       =   -DWS_X -DWS_SUNWINDOW
  WS_DIRS         =   SUNWINDOW XSERVER SERVER NEWS 
  
  #---- printer
***************
*** 186,193 ****
--- 193,250 ----
  	    $(PR_OFILES) \
  	    $(WS_OFILES)
  
+ 
  #-------------------------------------------------------------------------------
+ #  Added by Bryan Boreham, Kewill, Sun Jun 18 14:55:41 1989.
+ #-------------------------------------------------------------------------------
+ # GNU ld++ core-dumps when I try to use the et.o approach, so I just
+ # link everything in separately.
+ # revorder is a file to get the static constructors in the right order.    
+ # /usr/lib/debug/malloc.o is a Sun-supplied version of malloc that
+ # does some heap checking.
  
+ micky: micky.o revorder $(OFILES1) $(OFILES2) $(OFILES3) Init.o
+ 	g++ -o micky micky.o /usr/lib/debug/malloc.o `cat revorder` -lX11 -lm
+ #	g++ -o micky micky.o `cat revorder` -lX11 -lm
+ 
+ micky.o: ../applications/micky/micky.c
+ 	g++ -c $(CCFLAGS) ../applications/micky/micky.c -I.
+ 
+ # The original version did the subdirectory makes in a loop. I prefer this:
+ 
+ SUBMAKE = make CFLAGS="$(CFLAGS)" CCFLAGS="$(CCFLAGS)"
+ 
+ MALLOC/storage.o:
+ 	cd MALLOC; $(SUBMAKE)
+ 
+ NEWS/newsserver.o:
+ 	cd NEWS; $(SUBMAKE)
+ 
+ PIC/pic.o:
+ 	cd PIC; $(SUBMAKE)
+ 
+ POSTSCRIPT/postscript.o:
+ 	cd POSTSCRIPT; $(SUBMAKE)
+ 
+ PROGENV/etprogenv.o:
+ 	cd PROGENV; make CFLAGS="$(CFLAGS)" CCFLAGS="$(CCFLAGS) -I.."
+ 
+ SERVER/sunserver.o:
+ 	cd SERVER; $(SUBMAKE)
+ 
+ SUNOS/sunos.o:
+ 	cd SUNOS; $(SUBMAKE)
+ 
+ # Some files have #ifdef __GNUC__
+ SUNWINDOW/sun.o:
+ 	cd SUNWINDOW; $(SUBMAKE) CC="gcc -traditional"
+ 
+ XSERVER/xserver.o:
+ 	cd XSERVER; make CFLAGS="$(CFLAGS)" CCFLAGS="$(CCFLAGS)" XHOME=/usr
+ 
+ 
+ #-------------------------------------------------------------------------------
+ 
  all:        et col clipboard server app
  
  #-------------------------------------------------------------------------------
***************
*** 245,250 ****
--- 302,322 ----
  
  col.ctdt:   col.o ctdtorder
  	(nm col.o | fgrep "T __ST"; cat ctdtorder) | awk -f ck1 > $@
+ 
+ 
+ #-------------------------------------------------------------------------------
+ #  Added by Bryan Boreham, Kewill, Sun Jun 18 16:02:21 1989.
+ #-------------------------------------------------------------------------------
+ # libcol.a is a library that contains all the collection stuff without
+ # any of the windows or programming environment stuff.
+ #
+ # We don't appear to lose much by not including InitCol.o, apart from
+ # 250K of executable size, that is. If you do want it, you need the
+ # whole of sunos.o in colorder.
+ 
+ libcol.a: colorder $(COLO) 
+ 	ar r libcol.a `cat colorder`
+ 	ranlib libcol.a
  
  #-------------------------------------------------------------------------------
  # sunwindow server
diff -c -r dist-src/membuf.C src/membuf.C
*** dist-src/membuf.C	Mon May 22 14:27:12 1989
--- src/membuf.C	Mon Jun  5 15:25:25 1989
***************
*** 14,20 ****
  {
      int newsize= Size()+cSizeInc;
      int oldpos= pptr-base;
!     Realloc(&base, newsize);
      gptr= base;
      eptr= base+newsize;
      pptr= base+oldpos;
--- 14,22 ----
  {
      int newsize= Size()+cSizeInc;
      int oldpos= pptr-base;
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 15:25:16 1989.
!    Inserted the cast for g++'s benefit.    */
!     Realloc((void **)&base, newsize);
      gptr= base;
      eptr= base+newsize;
      pptr= base+oldpos;
diff -c -r dist-src/membuf.h src/membuf.h
*** dist-src/membuf.h	Wed Mar 15 07:35:12 1989
--- src/membuf.h	Fri Jun 16 20:37:40 1989
***************
*** 3,9 ****
  
  #include <stream.h>
  
! const int cSizeInc= 1024;
  
  class membuf: public streambuf {
  public:
--- 3,11 ----
  
  #include <stream.h>
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:30:58 1989.
!    Constants turn up multiply defined if not static.    */
! static const int cSizeInc= 1024;
  
  class membuf: public streambuf {
  public:
Only in src: membuf.o
Only in src: micky
Only in src: micky.o
Only in src: regex.o
Only in src: revorder
Only in src/MALLOC: storage.o
diff -c -r dist-src/NEWS/NeWSWindowPort.C src/NEWS/NeWSWindowPort.C
*** dist-src/NEWS/NeWSWindowPort.C	Wed May 24 01:02:52 1989
--- src/NEWS/NeWSWindowPort.C	Fri Jun 23 20:45:04 1989
***************
*** 16,24 ****
  NeWSWindowPort *wports[100];
  extern int lastwinid;
  
  extern int ioctl(int,int,void*);
  
- 
  //---- Cursors -----------------------------------------------------------------
  
  void NeWSWindowPort::DevSetCursor(GrCursor c)
--- 16,28 ----
  NeWSWindowPort *wports[100];
  extern int lastwinid;
  
+ /* Change by Bryan Boreham, Kewill, Fri Jun 23 20:43:36 1989.
+    From Tom Vijlbrief.    */
+ 
+ #ifndef __GNUG__
  extern int ioctl(int,int,void*);
+ #endif
  
  //---- Cursors -----------------------------------------------------------------
  
  void NeWSWindowPort::DevSetCursor(GrCursor c)
***************
*** 192,198 ****
  	n= psio_availinputbytes(PostScriptInput);
  	if (n >= 3)
  	    goto aha;
! 	ioctl(psio_fileno(PostScriptInput), FIONREAD, &arg);
  	if (n+arg >= 3)
  	    goto aha;
  	tp->Flags= 0;
--- 196,204 ----
  	n= psio_availinputbytes(PostScriptInput);
  	if (n >= 3)
  	    goto aha;
! /* Change by Bryan Boreham, Kewill, Fri Jun 23 20:44:29 1989.
!    From Tom Vijlbrief.    */
! 	ioctl(psio_fileno(PostScriptInput), FIONREAD, (char*) &arg);
  	if (n+arg >= 3)
  	    goto aha;
  	tp->Flags= 0;
diff -c -r dist-src/NEWS/NeWSWindowSystem.C src/NEWS/NeWSWindowSystem.C
*** dist-src/NEWS/NeWSWindowSystem.C	Fri May 19 18:19:45 1989
--- src/NEWS/NeWSWindowSystem.C	Fri Jun 23 20:46:08 1989
***************
*** 13,19 ****
--- 13,23 ----
  #undef ps_flush_PostScript
  #define ps_flush_PostScript() psio_flush(PostScript)
  
+ /* Change by Bryan Boreham, Kewill, Fri Jun 23 20:45:10 1989.
+    From Tom Vijlbrief.    */
+ #ifndef __GNUG__
  extern int ioctl(int,int,void*);
+ #endif
  
  //---- NeWSEvtHandler -------------------------------------------------------------
  
***************
*** 61,67 ****
  	n= psio_availinputbytes(PostScriptInput);
  	if (n < 3)
  	    break;
! 	ioctl(psio_fileno(PostScriptInput), FIONREAD, &arg);
  	if (n+arg < 3)
  	    break;
      }
--- 65,73 ----
  	n= psio_availinputbytes(PostScriptInput);
  	if (n < 3)
  	    break;
! /* Change by Bryan Boreham, Kewill, Fri Jun 23 20:45:35 1989.
!    From Tom Vijlbrief.    */
! 	ioctl(psio_fileno(PostScriptInput), FIONREAD, (char*) &arg);
  	if (n+arg < 3)
  	    break;
      }
Only in src/PIC: Pic.o
Only in src/PIC: pic.o
Only in src/POSTSCRIPT: PostScript.o
Only in src/POSTSCRIPT: postscript.o
Only in src/PROGENV: Browser.o
Only in src/PROGENV: ClassItem.o
Only in src/PROGENV: CollTableView.o
Only in src/PROGENV: EtProgEnv.o
diff -c -r dist-src/PROGENV/Inspector.C src/PROGENV/Inspector.C
*** dist-src/PROGENV/Inspector.C	Tue May 23 19:39:29 1989
--- src/PROGENV/Inspector.C	Mon Jun  5 15:30:22 1989
***************
*** 58,68 ****
  
  //---- InspectorView ---------------------------------------------------------------
  
! MetaImpl(InspectorView, (I_O(menu), I_O(inspector)));
  
  InspectorView::InspectorView(Inspector *insp) : (0, new ObjArray(cMaxItems), 0)
  {
!     menu= new Menu("inspector");
      inspector= insp;
      for (int i= 0; i < cMaxItems; i++)
  	GetCollection()->Add(new InspectorItem());
--- 58,72 ----
  
  //---- InspectorView ---------------------------------------------------------------
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 11:16:49 1989.
!    g++ has BIG problems with "menu"; changed all occurances 
!    to "this->menu".    */
  
+ MetaImpl(InspectorView, (I_O((this->menu)), I_O(inspector)));
+ 
  InspectorView::InspectorView(Inspector *insp) : (0, new ObjArray(cMaxItems), 0)
  {
!     this->menu= new Menu("inspector");
      inspector= insp;
      for (int i= 0; i < cMaxItems; i++)
  	GetCollection()->Add(new InspectorItem());
***************
*** 72,78 ****
  InspectorView::~InspectorView()
  {
      SafeDelete(accessor);
!     SafeDelete(menu);
  }
  
  void InspectorView::SetInspected(Ref &newinsp)
--- 76,82 ----
  InspectorView::~InspectorView()
  {
      SafeDelete(accessor);
!     SafeDelete((this->menu));
  }
  
  void InspectorView::SetInspected(Ref &newinsp)
***************
*** 154,160 ****
  	if (this == dbgView1)
  	    dbgView1->Pop();
      } else if (type == cCLASS || type > 0) {    // try to go go down
! 	ref= di->Deref(inspected);
  
  	if (ref.addr == 0 || ref == inspected)
  	    return;
--- 158,166 ----
  	if (this == dbgView1)
  	    dbgView1->Pop();
      } else if (type == cCLASS || type > 0) {    // try to go go down
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 11:44:08 1989.
!    g++ wants the explicit conversion.    */
! 	ref= di->Deref(ObjPtr(inspected));
  
  	if (ref.addr == 0 || ref == inspected)
  	    return;
***************
*** 225,231 ****
  	for (i= 0; i<itemno; i++) {
  	    di= At(i);
  	    if (di)
! 		di->InitItem(inspected);
  	}
      }
  
--- 231,239 ----
  	for (i= 0; i<itemno; i++) {
  	    di= At(i);
  	    if (di)
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 11:44:08 1989.
!    g++ wants the explicit conversion.    */
! 		di->InitItem(ObjPtr(inspected));
  	}
      }
  
***************
*** 254,260 ****
  void InspectorView::DoSetupMenu(Menu *menu)
  {
      menu->EnableItems(cABORT, cEXIT, c_EXIT, cAPPL, 0);
!     if (inspected)
  	menu->EnableItems(cUPDATE, cEDITDECL, cEDITIMPL, 0);
      if (inspected.IsObject()) {
  	char *viewname= gProgEnv->HasAbstractView(ObjPtr(inspected));
--- 262,270 ----
  void InspectorView::DoSetupMenu(Menu *menu)
  {
      menu->EnableItems(cABORT, cEXIT, c_EXIT, cAPPL, 0);
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 11:44:08 1989.
!    This seems to warrant some type conversion.    */
!     if (ObjPtr(inspected))
  	menu->EnableItems(cUPDATE, cEDITDECL, cEDITIMPL, 0);
      if (inspected.IsObject()) {
  	char *viewname= gProgEnv->HasAbstractView(ObjPtr(inspected));
Only in src/PROGENV: Inspector.o
Only in src/PROGENV: InspectorItem.o
diff -c -r dist-src/PROGENV/Reference.h src/PROGENV/Reference.h
*** dist-src/PROGENV/Reference.h	Fri May 12 12:31:46 1989
--- src/PROGENV/Reference.h	Mon Jun  5 12:01:59 1989
***************
*** 3,9 ****
  
  //---- reference --------------------------------------------------------------
  
! const int cUP       = -1,
  	  cNONE     = -2,
  	  cSUPER    = -3,
  	  cCLASS    = -4;
--- 3,11 ----
  
  //---- reference --------------------------------------------------------------
  
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 12:01:42 1989.
!    constants turn up multiple times in the link if not static.    */
! static const int cUP       = -1,
  	  cNONE     = -2,
  	  cSUPER    = -3,
  	  cCLASS    = -4;
Only in src/PROGENV: VObjTreeView.o
Only in src/PROGENV: etprogenv.o
diff -c -r dist-src/SERVER/ServerConnection.h src/SERVER/ServerConnection.h
*** dist-src/SERVER/ServerConnection.h	Thu Apr 27 22:06:15 1989
--- src/SERVER/ServerConnection.h	Sun Jun  4 15:15:16 1989
***************
*** 15,21 ****
      void Close();
      bool HasInterest();
      bool SafeRead(Response *b, int timeout, bool overread);
!     void Send(int tag, int ref, char *fmt= 0, ...);
      void Flush()
  	{ if (ofp) fflush(ofp); }
  };
--- 15,31 ----
      void Close();
      bool HasInterest();
      bool SafeRead(Response *b, int timeout, bool overread);
! 
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:13:28 1989.
!    This was the original code:    
!          void Send(int tag, int ref, char *fmt= 0, ...);
!    g++ complains about the default argument plus '...', so
!    I put in one version for when Send is called with two arguments,
!    and one for when it is called with three or more.   */
! 
!     void Send(int tag, int ref) {Send(tag, ref, (char *) 0);}
!     void Send(int tag, int ref, char *fmt, ...);
! 
      void Flush()
  	{ if (ofp) fflush(ofp); }
  };
diff -c -r dist-src/SERVER/ServerPort.h src/SERVER/ServerPort.h
*** dist-src/SERVER/ServerPort.h	Thu Apr 27 22:05:47 1989
--- src/SERVER/ServerPort.h	Sun Jun  4 15:29:20 1989
***************
*** 4,10 ****
  #include "../WindowPort.h"
  #include "Server.h"
  
! const int MQS= 100;
  
  class ServerPort: public WindowPort {
      int ref; 
--- 4,12 ----
  #include "../WindowPort.h"
  #include "Server.h"
  
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:29:13 1989.
!    Constants turn up multiply defined if not static.    */
! static const int MQS= 100;
  
  class ServerPort: public WindowPort {
      int ref; 
diff -c -r dist-src/SUNOS/SunFileType.h src/SUNOS/SunFileType.h
*** dist-src/SUNOS/SunFileType.h	Wed Mar 15 11:27:38 1989
--- src/SUNOS/SunFileType.h	Mon Jun  5 12:22:10 1989
***************
*** 3,8 ****
--- 3,13 ----
  
  #include "../FileType.h"
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 12:20:20 1989.
+    struct stat should be defined.    */
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ 
  //---- SunFileType -----------------------------------------------------------
  
  class SunFileType : public FileType {
Only in src/SUNOS: SunFileType.o
diff -c -r dist-src/SUNOS/SunOsPttyConnection.C src/SUNOS/SunOsPttyConnection.C
*** dist-src/SUNOS/SunOsPttyConnection.C	Fri May 19 18:11:33 1989
--- src/SUNOS/SunOsPttyConnection.C	Mon Jun  5 14:12:47 1989
***************
*** 61,67 ****
  {
      struct sgttyb tty;
      int n = read(fileno(slave),buf,size); 
!     ioctl(fileno(slave),TIOCGETP,&tty);
      mode=tty.sg_flags;
      return n;
  }
--- 61,69 ----
  {
      struct sgttyb tty;
      int n = read(fileno(slave),buf,size); 
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:12:36 1989.
!    cast &tty to a char * to agree with the man page definition.    */
!     ioctl(fileno(slave),TIOCGETP,(char *)&tty);
      mode=tty.sg_flags;
      return n;
  }
Only in src/SUNOS: SunOsPttyConnection.o
diff -c -r dist-src/SUNOS/SunSystem.C src/SUNOS/SunSystem.C
*** dist-src/SUNOS/SunSystem.C	Fri May 19 17:51:53 1989
--- src/SUNOS/SunSystem.C	Sun Jun 25 17:03:42 1989
***************
*** 21,28 ****
  #include <signal.h>
  
  
  extern int select(int, fd_set*, fd_set*, fd_set*, struct timeval*);
! extern char *getenv(char*);
  extern char **environ;
  extern void usleep(unsigned int);
  
--- 21,41 ----
  #include <signal.h>
  
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 13:52:24 1989.
+    Added these from SUNWINDOW/sungr.h; 
+    they are provided with the SunOS 4 system.  */
+ #define FD_SET(fd,mask)         ((mask)->fds_bits[0] |= (1 << (fd)))
+ #define FD_ISSET(fd,mask)       (((mask)->fds_bits[0] & (1 << (fd))) != 0)
+ #define FD_CLR(fd,mask)         ((mask)->fds_bits[0] &= ~(1 << (fd)))
+ #define FD_ZERO(mask)           ((mask)->fds_bits[0] = 0)
+ #define FD_SETSIZE              32
+ 
  extern int select(int, fd_set*, fd_set*, fd_set*, struct timeval*);
! 
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 12:27:00 1989.
!    Added "const" for solidarity with g++ <std.h>    */
! extern char *getenv(const char*);
! 
  extern char **environ;
  extern void usleep(unsigned int);
  
***************
*** 31,42 ****
  
  static bool signals[32];
  
! static int sigHandler(int sig, int, struct sigcontext*)
  {
      signals[sig]= TRUE;
      if (gSystem)
  	((SunSystem*)gSystem)->DispatchSignals(TRUE);
!     return 0;
  }
  
  //---- ZombieHandler -----------------------------------------------------------
--- 44,58 ----
  
  static bool signals[32];
  
! 
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 13:02:50 1989.
!    Signal handlers are not supposed to return anything.    */
! static void sigHandler(int sig, int, struct sigcontext*)
  {
      signals[sig]= TRUE;
      if (gSystem)
  	((SunSystem*)gSystem)->DispatchSignals(TRUE);
! //    return 0;
  }
  
  //---- ZombieHandler -----------------------------------------------------------
Only in src/SUNOS: SunSystem.o
diff -c -r dist-src/SUNOS/dynlink.h src/SUNOS/dynlink.h
*** dist-src/SUNOS/dynlink.h	Wed Apr 19 16:03:15 1989
--- src/SUNOS/dynlink.h	Sun Jun 25 17:23:53 1989
***************
*** 1,6 ****
--- 1,12 ----
  #ifndef dynlink_First
  #define dynlink_First
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 17:23:00 1989.
+    Moved this from Types.h to stop g++ complaining.    */
+ #ifdef __GNUG__
+ typedef void* (*VoidPtrFunc)(...);
+ #endif
+ 
  extern int  DynLoad(char *name);
  extern void DynLinkInit(char *name);
  extern void *DynLookup(char *name);
Only in src/SUNOS: dynlink.o
Only in src/SUNOS: sunos.o
Only in src/SUNOS: sunptty.o
Only in src/SUNOS: sunsockets.o
diff -c -r dist-src/SUNOS/sunstacktrace.c src/SUNOS/sunstacktrace.c
*** dist-src/SUNOS/sunstacktrace.c	Tue May  9 12:25:19 1989
--- src/SUNOS/sunstacktrace.c	Thu Jun  8 19:31:35 1989
***************
*** 92,98 ****
      short d;
      char *n;
      struct frame first;
!      
      struct pframe {
  	struct frame *fp;
  	ulong flow, low, lad;
--- 92,98 ----
      short d;
      char *n;
      struct frame first;
! 
      struct pframe {
  	struct frame *fp;
  	ulong flow, low, lad;
***************
*** 100,105 ****
--- 100,110 ----
  	struct nlist *sym, *fsym, *lsym;
      } fr[MAXSTACK];
      
+ /* Change by Bryan Boreham, Kewill, Thu Jun  8 18:41:37 1989.
+    G++ is different so I give in; I may fix this up one day.    */
+     fprintf(stdout, "\nSorry, stack traces not implemented for GNU complier.\n");
+     _exit(1);
+ 
      if (indebug)
  	_exit(1);
      indebug= 1;
Only in src/SUNOS: sunstacktrace.o
diff -c -r dist-src/SUNOS/sunsystem.c src/SUNOS/sunsystem.c
*** dist-src/SUNOS/sunsystem.c	Fri May 19 17:55:58 1989
--- src/SUNOS/sunsystem.c	Sun Jun 25 17:04:20 1989
***************
*** 1,5 ****
  #include <sys/types.h>
! #include <dirent.h>
  #include <sys/stat.h>
  #include <setjmp.h>
  #include <signal.h>
--- 1,8 ----
  #include <sys/types.h>
! 
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 13:56:20 1989.
!    SunOS 3.5 doesn't have a <dirent.h>; I substituted this:    */
! #include <sys/dir.h>
  #include <sys/stat.h>
  #include <setjmp.h>
  #include <signal.h>
***************
*** 11,16 ****
--- 14,28 ----
  #include <ctype.h>
  #include <sys/time.h>
  
+ /* Change by Bryan Boreham, Kewill, Mon Jun  5 13:52:24 1989.
+    Added these from SUNWINDOW/sungr.h; 
+    they are provided with the SunOS 4 system.  */
+ #define FD_SET(fd,mask)         ((mask)->fds_bits[0] |= (1 << (fd)))
+ #define FD_ISSET(fd,mask)       (((mask)->fds_bits[0] & (1 << (fd))) != 0)
+ #define FD_CLR(fd,mask)         ((mask)->fds_bits[0] &= ~(1 << (fd)))
+ #define FD_ZERO(mask)           ((mask)->fds_bits[0] = 0)
+ #define FD_SETSIZE              32
+ 
  extern char *sys_errlist[];
  
  char *workingdirectory()
***************
*** 25,31 ****
  char *getdirentry(dirp)
  DIR *dirp;
  {
!     struct dirent *dp;
       
      if (dirp && (dp= readdir(dirp)))
  	return dp->d_name;
--- 37,45 ----
  char *getdirentry(dirp)
  DIR *dirp;
  {
! /* Change by Bryan Boreham, Kewill, Mon Jun  5 14:09:26 1989.
!    Again, no "dirent"; substituted "direct" from <sys/dir.h>    */
!     struct direct *dp;
       
      if (dirp && (dp= readdir(dirp)))
  	return dp->d_name;
diff -c -r dist-src/SUNOS/sunsystem.h src/SUNOS/sunsystem.h
*** dist-src/SUNOS/sunsystem.h	Fri May 19 18:08:18 1989
--- src/SUNOS/sunsystem.h	Sun Jun  4 15:27:17 1989
***************
*** 10,16 ****
  extern void *opendir(char *name);
  extern void closedir(void*);
  extern char *getdirentry(void*);
! extern void free(char*);
  extern char *workingdirectory();
  extern char *expandpathname(char*, int);
  extern int  waitchild();
--- 10,19 ----
  extern void *opendir(char *name);
  extern void closedir(void*);
  extern char *getdirentry(void*);
! 
! /* Change by Bryan Boreham, Kewill, Sun Jun  4 15:27:04 1989.
!    <std.h> defines free(void*) not (char*).    */
! extern void free(void*);
  extern char *workingdirectory();
  extern char *expandpathname(char*, int);
  extern int  waitchild();
Only in src/SUNOS: sunsystem.o
Only in src/SUNWINDOW: SunBitmap.o
Only in src/SUNWINDOW: SunClipboard.o
diff -c -r dist-src/SUNWINDOW/SunFont.h src/SUNWINDOW/SunFont.h
*** dist-src/SUNWINDOW/SunFont.h	Fri Apr 28 14:00:57 1989
--- src/SUNWINDOW/SunFont.h	Sun Jun 25 13:26:11 1989
***************
*** 3,8 ****
--- 3,24 ----
  
  #include "../Font.h"
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:18:40 1989.
+    The C versions of the member functions are called explicitly, as
+    suggested in the Installation Notes.
+    These changes are from Tom Viljbrief.
+ */
+ 
+ #ifdef __GNUG__
+ class SunFont;
+ 
+ extern bool _SunFont_LoadFont(SunFont*);
+ extern void _SunFont_ScaleFont(SunFont*, Font*);
+ extern void _SunFont_MakeChar(SunFont*, Font*, GrFace face, byte b, Font*f);
+ extern void _SunFont_GetLine(SunFont*, byte*bp, byte b, int i1, int i2);
+ extern bool _SunFont_PMetric(SunFont*, byte, int *w, int *hx, int *hy, int *sx, int *sy, int *starty, int *endy);
+ #endif
+ 
  class SunFont: public Font {
      void *notdef;               // private data
      void *pixfont;              // private data
***************
*** 12,18 ****
      
      SunFont(char*, GrFont, int, GrFace);
      ~SunFont();
!     
      void GetLine(byte*, byte, int, int);
      bool PMetric(byte, int *w, int *hx, int *hy, int *sx, int *sy, int *starty,
  								    int *endy);
--- 28,35 ----
      
      SunFont(char*, GrFont, int, GrFace);
      ~SunFont();
! 
! #ifndef __GNUG__
      void GetLine(byte*, byte, int, int);
      bool PMetric(byte, int *w, int *hx, int *hy, int *sx, int *sy, int *starty,
  								    int *endy);
***************
*** 21,26 ****
--- 38,59 ----
      Font *MakeFont(Font**, GrFace);
      void ScaleFont(Font*);
      void MakeChar(Font*, GrFace, byte, Font*);
+ #else
+     void GetLine(byte*bp, byte b, int i1, int i2) 
+       {_SunFont_GetLine(this, bp, b, i1, i2); }
+     bool PMetric(byte b, int *w, int *hx, int *hy, int *sx, int *sy, int *starty,
+ 								    int *endy)
+       { return _SunFont_PMetric(this, b, w, hx, hy, sx, sy, starty, endy); }
+     bool Loaded();
+     bool LoadFont() 
+       { return _SunFont_LoadFont(this); }
+     Font *MakeFont(Font**, GrFace);
+     void ScaleFont(Font*f) 
+       { _SunFont_ScaleFont(this, f); }
+     void MakeChar(Font*fnt, GrFace face, byte b, Font*f) 
+       { _SunFont_MakeChar(this, fnt, face, b, f); }
+ #endif
+ 
  };
  
  class SunFontManager: public FontManager {
Only in src/SUNWINDOW: SunFont.o
diff -c -r dist-src/SUNWINDOW/SunWindowPort.h src/SUNWINDOW/SunWindowPort.h
*** dist-src/SUNWINDOW/SunWindowPort.h	Thu Apr 27 22:06:32 1989
--- src/SUNWINDOW/SunWindowPort.h	Sun Jun 25 13:47:51 1989
***************
*** 4,9 ****
--- 4,50 ----
  #include "../WindowPort.h"
  #include "SunWindowSystem.h"
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:18:40 1989.
+    The C versions of the member functions are called explicitly, as
+    suggested in the Installation Notes.
+    These changes are from Tom Viljbrief.
+ */
+ 
+ #ifdef __GNUG__
+ class SunWindowPort;
+ 
+ extern void _SunWindowPort_SunWindowPortInit(SunWindowPort*, int p1); 
+ extern void _SunWindowPort_FreeResources(SunWindowPort*); 
+ 
+ extern void _SunWindowPort_DevClip(SunWindowPort*, Rectangle p1, Point p2) ;
+ extern void _SunWindowPort_DevResetClip(SunWindowPort*) ;
+ extern void _SunWindowPort_DevStrokeLine2(SunWindowPort*, GrPattern p1, GrMode p2, int p3, Rectangle* p4, GrLineCap p5, Point p6, Point p7) ;
+ extern void _SunWindowPort_DevStrokeRect2(SunWindowPort*, GrPattern p1, GrMode p2, int p3, Rectangle*p4) ;
+ extern void _SunWindowPort_DevFillRect(SunWindowPort*, GrPattern p1, GrMode p2, Rectangle*p3) ;
+ extern void _SunWindowPort_DevStrokeRRect2(SunWindowPort*, GrPattern p1, GrMode p2, int p3, Rectangle*p4, Point p5) ;
+ extern void _SunWindowPort_DevFillRRect2(SunWindowPort*, GrPattern p1, GrMode p2, Rectangle*p3, Point p4) ;
+ extern void _SunWindowPort_DevStrokeWedge2(SunWindowPort*, GrPattern p1, GrMode p2, int p3, GrLineCap p4, Rectangle* p5, int p6, int p7) ;
+ extern void _SunWindowPort_DevFillWedge2(SunWindowPort*, GrPattern p1, GrMode p2, Rectangle*p3, int p4, int p5) ;
+ extern void _SunWindowPort_DevStrokePolygon2(SunWindowPort*, Rectangle*p1, GrPattern p2, GrMode p3, Point* p4, int p5, GrPolyType p6, int p7, GrLineCap p8) ;
+ extern void _SunWindowPort_DevFillPolygon2(SunWindowPort*, Rectangle* p1, GrPattern p2, GrMode p3, Point* p4, int p5, GrPolyType p6) ;
+ extern void _SunWindowPort_DevShowBitmap(SunWindowPort*, GrPattern p1, GrMode p2, Rectangle*p3, struct Bitmap*p4) ;
+ extern bool _SunWindowPort_DevShowChar(SunWindowPort*, FontPtr p1, Point p2, byte p3, bool p4, Point p5) ;
+ extern void _SunWindowPort_DevShowTextBatch(SunWindowPort*, GrPattern p1, GrMode p2, Rectangle* p3, Point p4) ;
+ extern void _SunWindowPort_DevGiveHint(SunWindowPort*, int p1, int p2, void*p3) ;
+ extern void _SunWindowPort_DevSetCursor(SunWindowPort*, GrCursor p1) ;
+ extern void _SunWindowPort_DevGrab(SunWindowPort*, bool p1) ;
+ extern void _SunWindowPort_DevFullscreen(SunWindowPort*, bool p1) ;
+ extern void _SunWindowPort_DevScrollRect(SunWindowPort*, Rectangle p1, Point p2) ;
+ extern void _SunWindowPort_DevTop(SunWindowPort*, bool p1) ;
+ extern void _SunWindowPort_DevHide(SunWindowPort*) ;
+ extern void _SunWindowPort_DevShow(SunWindowPort*, WindowPort *father, Rectangle p2) ;
+ extern void _SunWindowPort_DevSetRect(SunWindowPort*, Rectangle* p1) ;
+ extern void _SunWindowPort_DevGetEvent(SunWindowPort*, Token *t, int timeout, bool b) ;
+ extern void _SunWindowPort_DevSetMousePos(SunWindowPort*, Point p1) ;
+ extern void _SunWindowPort_DevMoveMousePos(SunWindowPort*, Point p1) ;
+ extern void _SunWindowPort_DevBell(SunWindowPort*, long p1) ;
+ #endif
+ 
  class SunWindowPort: public WindowPort {
  public:
      SunWindowPort *next;
***************
*** 16,26 ****
      bool inbatch;
      Rectangle myrect;
      
      void SunWindowPortInit(int);
      void FreeResources();
!     
  public:
  
      SunWindowPort(InpHandlerFun, void*, void*, bool, bool);
  
      void DevDestroy2();
--- 57,75 ----
      bool inbatch;
      Rectangle myrect;
      
+ #ifndef __GNUG__
      void SunWindowPortInit(int);
      void FreeResources();
! #else    
!     void SunWindowPortInit(int p1) {
! 	_SunWindowPort_SunWindowPortInit(this, p1); }
!     void FreeResources() {
! 	_SunWindowPort_FreeResources(this); }
! #endif
! 
  public:
  
+ #ifndef __GNUG__
      SunWindowPort(InpHandlerFun, void*, void*, bool, bool);
  
      void DevDestroy2();
***************
*** 58,63 ****
--- 107,182 ----
      void DevMoveMousePos(Point);
  
      void DevBell(long);   
+ 
+ #else
+ 
+     SunWindowPort(InpHandlerFun, void*, void*, bool, bool);
+ 
+     void DevDestroy2();
+     void DevClip(Rectangle p1, Point p2) {
+ 	_SunWindowPort_DevClip(this, p1, p2); }
+     void DevResetClip() {
+       _SunWindowPort_DevResetClip(this); }
+     void DevStrokeLine2(GrPattern p1, GrMode p2, int p3, Rectangle* p4, GrLineCap p5, Point p6, Point p7) {
+       _SunWindowPort_DevStrokeLine2(this, p1, p2, p3, p4, p5, p6, p7); }
+ 
+     void DevStrokeRect2(GrPattern p1, GrMode p2, int p3, Rectangle*p4) {
+       _SunWindowPort_DevStrokeRect2(this,p1,p2,p3,p4); }
+     void DevFillRect(GrPattern p1, GrMode p2, Rectangle*p3) {
+       _SunWindowPort_DevFillRect(this, p1, p2, p3); }
+     void DevStrokeRRect2(GrPattern p1, GrMode p2, int p3, Rectangle*p4, Point p5) {
+       _SunWindowPort_DevStrokeRRect2(this, p1, p2, p3, p4, p5); }
+     void DevFillRRect2(GrPattern p1, GrMode p2, Rectangle*p3, Point p4) {
+ 	_SunWindowPort_DevFillRRect2(this, p1, p2, p3, p4); }
+     void DevStrokeWedge2(GrPattern p1, GrMode p2, int p3, GrLineCap p4, Rectangle* p5, int p6, int p7) {
+       _SunWindowPort_DevStrokeWedge2(this, p1, p2,p3,p4,p5,p6,p7); }
+     void DevFillWedge2(GrPattern p1, GrMode p2, Rectangle*p3, int p4, int p5) {
+       _SunWindowPort_DevFillWedge2(this, p1,p2,p3,p4,p5); }
+     void DevStrokePolygon2(Rectangle*p1, GrPattern p2, GrMode p3, Point* p4, int p5, GrPolyType p6, int p7, GrLineCap p8) {
+       _SunWindowPort_DevStrokePolygon2(this,p1,p2,p3,p4,p5,p6,p7,p8); }
+     void DevFillPolygon2(Rectangle* p1, GrPattern p2, GrMode p3, Point* p4, int p5, GrPolyType p6) {
+       _SunWindowPort_DevFillPolygon2(this,p1,p2,p3,p4,p5,p6); }
+     void DevShowBitmap(GrPattern p1, GrMode p2, Rectangle*p3, struct Bitmap*p4) {
+       _SunWindowPort_DevShowBitmap(this, p1, p2, p3, p4); }
+     bool DevShowChar(FontPtr p1, Point p2, byte p3, bool p4, Point p5) {
+       return _SunWindowPort_DevShowChar(this,p1,p2,p3,p4,p5); }
+     void DevShowTextBatch(GrPattern p1, GrMode p2, Rectangle* p3, Point p4) {
+       _SunWindowPort_DevShowTextBatch(this,p1,p2,p3,p4); }
+     void DevGiveHint(int p1, int p2, void*p3) {
+ 	_SunWindowPort_DevGiveHint(this, p1, p2, p3); }
+     
+     void DevSetCursor(GrCursor p1) {
+ 	_SunWindowPort_DevSetCursor(this, p1); }
+ 
+     void DevGrab(bool p1) {
+ 	_SunWindowPort_DevGrab(this, p1); }
+     
+     void DevFullscreen(bool p1) {
+       _SunWindowPort_DevFullscreen(this, p1); }
+     void DevScrollRect(Rectangle p1, Point p2) {
+ 	_SunWindowPort_DevScrollRect(this, p1, p2); }
+ 
+     void DevTop(bool p1) {
+ 	_SunWindowPort_DevTop(this, p1); }
+     void DevHide() {
+ 	_SunWindowPort_DevHide(this); }
+     void DevShow(WindowPort *father, Rectangle p2) {
+ 	_SunWindowPort_DevShow(this, father, p2); }
+ 
+     void DevSetRect(Rectangle* p1) {
+ 	_SunWindowPort_DevSetRect(this, p1); }
+     
+     void DevGetEvent(Token *t, int timeout, bool b) {
+ 	_SunWindowPort_DevGetEvent(this, t, timeout, b); }
+     void DevSetMousePos(Point p1) {
+ 	_SunWindowPort_DevSetMousePos(this, p1); }
+     void DevMoveMousePos(Point p1) {
+ 	_SunWindowPort_DevMoveMousePos(this, p1); }
+ 
+     void DevBell(long p1) {
+ 	_SunWindowPort_DevBell(this, p1); }
+ 
+ #endif __GNUG__
  };
  
  #endif GrSunWindow_First
Only in src/SUNWINDOW: SunWindowPort.o
Only in src/SUNWINDOW: SunWindowSystem.o
Only in src/SUNWINDOW: sun.o
Only in src/SUNWINDOW: sunbitmap.o
diff -c -r dist-src/SUNWINDOW/sunfont.c src/SUNWINDOW/sunfont.c
*** dist-src/SUNWINDOW/sunfont.c	Mon May  8 17:15:44 1989
--- src/SUNWINDOW/sunfont.c	Sun Jun 25 20:27:50 1989
***************
*** 5,22 ****
  #include <pixrect/pixrect_hs.h>
  #include <pixrect/memvar.h>
  
  extern char *FontLib;
  
  void sunfont_free(fdp)
  FontPtr fdp;
  {
      if (fdp->fd_notdef) {
  	pr_destroy(fdp->fd_notdef);
  	fdp->fd_notdef= 0;
      }
      if (fdp->fd_pf) {
  	if (fdp->fd_name)
! 	    pf_close(fdp->fd_pf);
  	else
  	    _delete(fdp->fd_pf);
  	fdp->fd_pf= 0;
--- 5,41 ----
  #include <pixrect/pixrect_hs.h>
  #include <pixrect/memvar.h>
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:31:18 1989.
+    This is from Tom Viljbrief.    */
+ 
+ #ifdef __GNUC__
+ #define _Font_CheckChar	CheckChar_PSFont_uQI
+ #define _new		__builtin_new
+ #define _delete		__builtin_delete
+ #endif
+ 
  extern char *FontLib;
  
  void sunfont_free(fdp)
  FontPtr fdp;
  {
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:33:45 1989.
+    Tom Viljbrief evidently found some kind of bug with these.
+    He says: "pr_destroy has a double free, according to debug/malloc.o"  */
+ 
      if (fdp->fd_notdef) {
+ #ifndef __GNUC__
  	pr_destroy(fdp->fd_notdef);
+ #endif
  	fdp->fd_notdef= 0;
      }
      if (fdp->fd_pf) {
  	if (fdp->fd_name)
! #ifdef __GNUC__
! 	    ; /* pf_close has a double free, according to debug/malloc.o */
! #else
!   	    pf_close(fdp->fd_pf);
! #endif
  	else
  	    _delete(fdp->fd_pf);
  	fdp->fd_pf= 0;
Only in src/SUNWINDOW: sunfont.o
diff -c -r dist-src/SUNWINDOW/sungr.h src/SUNWINDOW/sungr.h
*** dist-src/SUNWINDOW/sungr.h	Thu May 18 21:17:00 1989
--- src/SUNWINDOW/sungr.h	Sun Jun 25 13:43:28 1989
***************
*** 18,23 ****
--- 18,27 ----
  
  #ifndef FD_SET
   
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:38:16 1989.
+    This is from Tom Viljbrief. I don't think it is right, though.   
+ typedef struct { int fds_bits[1]; } fd_set;   */
+ 
  #define FD_SET(fd,mask)         ((mask)->fds_bits[0] |= (1 << (fd)))
  #define FD_ISSET(fd,mask)       (((mask)->fds_bits[0] & (1 << (fd))) != 0)
  #define FD_CLR(fd,mask)         ((mask)->fds_bits[0] &= ~(1 << (fd)))
diff -c -r dist-src/SUNWINDOW/sunwindow.c src/SUNWINDOW/sunwindow.c
*** dist-src/SUNWINDOW/sunwindow.c	Thu May 18 21:17:14 1989
--- src/SUNWINDOW/sunwindow.c	Sun Jun 25 20:28:03 1989
***************
*** 9,14 ****
--- 9,21 ----
  
  #include "sungr.h"
  
+ /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:39:08 1989.
+    This is from Tom Viljbrief.    */
+ #ifdef __GNUC__
+ #define _WindowPort_Damage	Damage_PSWindowPort_EEventFlags_PSRectangle
+ #define _Font_CheckChar		CheckChar_PSFont_uQI
+ #endif
+ 
  #define PATTERNS "patterns.font"
  #define CURSORS "cursors.font"
  
***************
*** 846,852 ****
  	
      xormode= 1;
      psz= 1;
!     pat= Black;
  
      if (psz <= 1 && xormode && pat == (int) Black) {
  	x0= p[0].p_x + r->r_left;
--- 853,861 ----
  	
      xormode= 1;
      psz= 1;
! /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:54:39 1989.
!    Sun's cc barfs on the uncasted Black; They cast it in the next line anyway.    */
!     pat= (int) Black;
  
      if (psz <= 1 && xormode && pat == (int) Black) {
  	x0= p[0].p_x + r->r_left;
***************
*** 1359,1371 ****
      struct cursor curs;
  
      curs.cur_function= XOR;
!     if (c <= 0) {
  	curs.cur_shape= 0;
  	curs.cur_yhot= curs.cur_xhot= 0;
      } else {
! 	curs.cur_xhot= -cursors->pf_char[c-1].pc_home.x;
! 	curs.cur_yhot= -cursors->pf_char[c-1].pc_home.y;
! 	curs.cur_shape= cursors->pf_char[c-1].pc_pr;
      }
      curs.flags= 0;
      ioctl(port->fd, WINSETCURSOR, &curs);
--- 1368,1382 ----
      struct cursor curs;
  
      curs.cur_function= XOR;
! /* Change by Bryan Boreham, Kewill, Sun Jun 25 13:55:01 1989.
!    Sun's cc barfs on the uncasted enumeration. */
!     if ((int) c <= 0) {
  	curs.cur_shape= 0;
  	curs.cur_yhot= curs.cur_xhot= 0;
      } else {
! 	curs.cur_xhot= -cursors->pf_char[(int)c-1].pc_home.x;
! 	curs.cur_yhot= -cursors->pf_char[(int)c-1].pc_home.y;
! 	curs.cur_shape= cursors->pf_char[(int)c-1].pc_pr;
      }
      curs.flags= 0;
      ioctl(port->fd, WINSETCURSOR, &curs);
Only in src/SUNWINDOW: sunwindow.o
Common subdirectories: dist-src/XSERVER/X11 and src/XSERVER/X11
Only in src/XSERVER: XBitmap.o
Only in src/XSERVER: XClipBoard.o
diff -c -r dist-src/XSERVER/XFont.C src/XSERVER/XFont.C
*** dist-src/XSERVER/XFont.C	Mon May  8 17:07:29 1989
--- src/XSERVER/XFont.C	Wed Jun 21 19:47:53 1989
***************
*** 56,62 ****
  	    cerr << "Et++ can't handle two-byte fonts\n";
      }
      xfid= xFont->fid;
!     XFreeFontInfo(&fn, xFont, 1);
      return FALSE;
  }
  
--- 56,65 ----
  	    cerr << "Et++ can't handle two-byte fonts\n";
      }
      xfid= xFont->fid;
! /* Change by Bryan Boreham, Kewill, Wed Jun 14 15:36:59 1989.
!    This appears to be a bug. It calls XFreeFontInfo, which 
!    should be used in conjunction with XListFontsWithInfo.    */
! //    XFreeFontInfo(&fn, xFont, 1);
      return FALSE;
  }
  
Only in src/XSERVER: XFont.o
Only in src/XSERVER: XWindowPort.o
Only in src/XSERVER: XWindowSystem.o
Only in src/XSERVER: xserver.o
