*** main.c.orig	Sat Jul  1 07:53:32 1995
--- main.c	Sun Jun 30 17:23:22 1996
***************
*** 142,147 ****
--- 142,148 ----
  /* got tired of having this message reported as a problem...
  	    fprintf(stderr, "Warning: Unable to read environment variable GR_HOME, help unavailable\n");
  */
+ 	    strcpy(xmgrdir, "/usr/local/xmgr");
  	}
      }
  
*** xmgr.c.orig	Sun Jun  4 23:00:30 1995
--- xmgr.c	Sat Aug 10 02:07:16 1996
***************
*** 791,797 ****
  
      button = XtVaCreateManagedWidget("Exit", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F3", charset),
! 				     XmNaccelerator, "<Key>F3:",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) MenuCB, (XtPointer) MENU_EXIT);
  
--- 791,797 ----
  
      button = XtVaCreateManagedWidget("Exit", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F3", charset),
! 				     XmNaccelerator, "<Key>F3",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) MenuCB, (XtPointer) MENU_EXIT);
  
***************
*** 812,818 ****
  
      button = XtVaCreateManagedWidget("Status...", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F5", charset),
! 				     XmNaccelerator, "<Key>F5:",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) define_status_popup, (XtPointer) NULL);
      button = XtVaCreateManagedWidget("Results...", xmPushButtonWidgetClass, menu_pane,
--- 812,818 ----
  
      button = XtVaCreateManagedWidget("Status...", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F5", charset),
! 				     XmNaccelerator, "<Key>F5",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) define_status_popup, (XtPointer) NULL);
      button = XtVaCreateManagedWidget("Results...", xmPushButtonWidgetClass, menu_pane,
***************
*** 821,827 ****
  
      button = XtVaCreateManagedWidget("Commands...", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F4", charset),
! 				     XmNaccelerator, "<Key>F4:",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) open_command, (XtPointer) NULL);
  
--- 821,827 ----
  
      button = XtVaCreateManagedWidget("Commands...", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F4", charset),
! 				     XmNaccelerator, "<Key>F4",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) open_command, (XtPointer) NULL);
  
***************
*** 834,842 ****
      button = XtVaCreateManagedWidget("Set operations...", xmPushButtonWidgetClass, menu_pane,
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) define_setops_popup, (XtPointer) NULL);
! 
      button = XtVaCreateManagedWidget("Edit/create set...", xmPushButtonWidgetClass, menu_pane,
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) create_editp_frame, (XtPointer) NULL);
  
      button = XtVaCreateManagedWidget("Region operations...", xmPushButtonWidgetClass, menu_pane,
--- 834,846 ----
      button = XtVaCreateManagedWidget("Set operations...", xmPushButtonWidgetClass, menu_pane,
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) define_setops_popup, (XtPointer) NULL);
! #ifdef HAS_XBAE
!     button = XtVaCreateManagedWidget("Edit set...", xmPushButtonWidgetClass, menu_pane,
! 				     NULL);
! #else
      button = XtVaCreateManagedWidget("Edit/create set...", xmPushButtonWidgetClass, menu_pane,
  				     NULL);
+ #endif
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) create_editp_frame, (XtPointer) NULL);
  
      button = XtVaCreateManagedWidget("Region operations...", xmPushButtonWidgetClass, menu_pane,
***************
*** 1033,1039 ****
      menu_pane = XmCreatePulldownMenu(menu_bar, "Help menu pane", args, ac);
      button = XtVaCreateManagedWidget("Help...", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F1", charset),
! 				     XmNaccelerator, "<Key>F1:",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) MenuCB, (XtPointer) MENU_HELP);
      button = XtVaCreateManagedWidget("About...", xmPushButtonWidgetClass, menu_pane,
--- 1037,1043 ----
      menu_pane = XmCreatePulldownMenu(menu_bar, "Help menu pane", args, ac);
      button = XtVaCreateManagedWidget("Help...", xmPushButtonWidgetClass, menu_pane,
  		   XmNacceleratorText, XmStringCreateLtoR("F1", charset),
! 				     XmNaccelerator, "<Key>F1",
  				     NULL);
      XtAddCallback(button, XmNactivateCallback, (XtCallbackProc) MenuCB, (XtPointer) MENU_HELP);
      button = XtVaCreateManagedWidget("About...", xmPushButtonWidgetClass, menu_pane,
*** statuswin.c.orig	Thu Apr 13 19:25:54 1995
--- statuswin.c	Sat Aug 10 00:26:17 1996
***************
*** 1155,1161 ****
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
  	sprintf(buf, "Max number of strings = %d\n", maxstr);
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
! 	sprintf(buf, "The home of ACE/gr is ftp.ccalmr.ogi.edu [129.95.72.34]\n");
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
  	sprintf(buf, "acegr@admin.ogi.edu for comments or bug reports");
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
--- 1155,1161 ----
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
  	sprintf(buf, "Max number of strings = %d\n", maxstr);
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
! 	sprintf(buf, "The home of ACE/gr is ftp.teleport.com [192.108.254.15]\n");
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
  	sprintf(buf, "acegr@admin.ogi.edu for comments or bug reports");
  	XtVaCreateManagedWidget(buf, xmLabelWidgetClass, about_panel, NULL);
*** editpwin.c.orig	Fri Jun  2 06:24:08 1995
--- editpwin.c	Thu Aug 15 04:23:44 1996
***************
*** 38,45 ****
  {10, 10, 10, 10, 10, 10};
  static int precision[6] =
  {3, 3, 3, 3, 3, 3};
  static int format[6] =
! {DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL};
  
  String labels1[2] =
  {"X", "Y"};
--- 38,50 ----
  {10, 10, 10, 10, 10, 10};
  static int precision[6] =
  {3, 3, 3, 3, 3, 3};
+ 
+ /* 0 - Decimal; 1 - General; 2 - Exponential */
  static int format[6] =
! {0, 0, 0, 0, 0, 0};
! 
! char *scformat[3] =
! {"%.*lf", "%.*lg", "%.*le"};
  
  String labels1[2] =
  {"X", "Y"};
***************
*** 194,200 ****
  		cells[i] = (String *) XtMalloc(sizeof(String) * ep->ncols);
  		for (j = 0; j < ep->ncols; j++) {
  		    datap = getcol(ep->gno, ep->setno, j);
! 		    sprintf(buf, "%12.*lf", ep->cprec[j], datap[i]);
  		    cells[i][j] = XtNewString(buf);
  		}
  	    }
--- 199,205 ----
  		cells[i] = (String *) XtMalloc(sizeof(String) * ep->ncols);
  		for (j = 0; j < ep->ncols; j++) {
  		    datap = getcol(ep->gno, ep->setno, j);
! 		    sprintf(buf, scformat[(ep->cformat[j])], ep->cprec[j], datap[i]);
  		    cells[i][j] = XtNewString(buf);
  		}
  	    }
***************
*** 217,227 ****
      XtVaGetValues(matrix,
  		  XmNcolumnWidths, &widths,
  		  NULL);
! /*
      SetChoice(editp_format_item, ep->cformat[col]); 
! */
      SetChoice(editp_precision_item, ep->cprec[col]);
!     SetChoice(editp_width_item, ep->cwidth[col]);
  }
  
  static void do_accept_props(Widget w, XtPointer client_data, XtPointer call_data)
--- 222,232 ----
      XtVaGetValues(matrix,
  		  XmNcolumnWidths, &widths,
  		  NULL);
! 
      SetChoice(editp_format_item, ep->cformat[col]); 
! 
      SetChoice(editp_precision_item, ep->cprec[col]);
!     SetChoice(editp_width_item, ep->cwidth[col] - 1);
  }
  
  static void do_accept_props(Widget w, XtPointer client_data, XtPointer call_data)
***************
*** 234,244 ****
      EditPoints *ep = (EditPoints *) client_data;
      Widget matrix = ep->mw;
      col = GetChoice(editp_col_item);
! /*
      ep->cformat[col] = GetChoice(editp_format_item);
! */
      ep->cprec[col] = GetChoice(editp_precision_item);
!     ep->cwidth[col] = GetChoice(editp_width_item);
      for (i=0;i<6;i++) {
  	widths[i] = ep->cwidth[i];
      }
--- 239,249 ----
      EditPoints *ep = (EditPoints *) client_data;
      Widget matrix = ep->mw;
      col = GetChoice(editp_col_item);
! 
      ep->cformat[col] = GetChoice(editp_format_item);
! 
      ep->cprec[col] = GetChoice(editp_precision_item);
!     ep->cwidth[col] = GetChoice(editp_width_item) + 1;
      for (i=0;i<6;i++) {
  	widths[i] = ep->cwidth[i];
      }
***************
*** 335,340 ****
--- 340,350 ----
  */
  }
  
+ void writeCB(Widget w, XtPointer client_data, XtPointer calld)
+ {
+     XbaeMatrixWriteCellCallbackStruct *cs = (XbaeMatrixWriteCellCallbackStruct *) calld;
+ }
+ 
  void leaveCB(Widget w, XtPointer client_data, XtPointer calld)
  {
      double *datap;
***************
*** 347,353 ****
      printf("Called leave %d %d, %s\n", cs->row, cs->column, cs->value);
  */
      datap = getcol(ep->gno, ep->setno, cs->column);
!     sprintf(buf, "%8.1lf", datap[cs->row]);
      if (strcmp(buf, cs->value) != 0) {
  	String s = (String) XtMalloc(sizeof(char) * (strlen(buf) + 1));
  	strcpy(s, buf);
--- 357,363 ----
      printf("Called leave %d %d, %s\n", cs->row, cs->column, cs->value);
  */
      datap = getcol(ep->gno, ep->setno, cs->column);
!     sprintf(buf, scformat[(ep->cformat[cs->column])], ep->cprec[cs->column], datap[cs->row]);
      if (strcmp(buf, cs->value) != 0) {
  	String s = (String) XtMalloc(sizeof(char) * (strlen(buf) + 1));
  	strcpy(s, buf);
***************
*** 359,364 ****
--- 369,375 ----
      }
  }
  
+ 
  void drawcellCB(Widget w, XtPointer client_data, XtPointer calld)
  {
      double *datap;
***************
*** 370,376 ****
      i = cs->row;
      j = cs->column;
      datap = getcol(ep->gno, ep->setno, j);
!     sprintf(buf, "%12.*lf", ep->cprec[j], datap[i]);
  /*
      printf("Called draw cell %d %d = %s\n", i, j, buf);
      cell = (String) XtMalloc(sizeof(char) * (strlen(buf) + 1));
--- 381,387 ----
      i = cs->row;
      j = cs->column;
      datap = getcol(ep->gno, ep->setno, j);
!     sprintf(buf, scformat[(ep->cformat[j])], ep->cprec[j], datap[i]);
  /*
      printf("Called draw cell %d %d = %s\n", i, j, buf);
      cell = (String) XtMalloc(sizeof(char) * (strlen(buf) + 1));
***************
*** 378,384 ****
      strcpy(cell, buf);
  */
      cs->type = XbaeString;
!     cs->string = buf;
  }
  
  void selectCB(Widget w, XtPointer client_data, XtPointer call_data)
--- 389,396 ----
      strcpy(cell, buf);
  */
      cs->type = XbaeString;
! /*    cs->string = buf; */
!     cs->string = XtNewString(buf);
  }
  
  void selectCB(Widget w, XtPointer client_data, XtPointer call_data)
***************
*** 500,511 ****
  				     XmNrowLabels, rowlabels,
  				     XmNcolumnLabels, ep->collabels,
  				     XmNcells, cells,
  				     NULL);
!     XtAddCallback(ep->mw, XmNdrawCellCallback, drawcellCB, ep);
!     XtAddCallback(ep->mw, XmNmodifyVerifyCallback, verifyCB, ep);
      XtAddCallback(ep->mw, XmNleaveCellCallback, leaveCB, ep);
!     XtAddCallback(ep->mw, XmNenterCellCallback, enterCB, ep);
!     XtAddCallback(ep->mw, XmNselectCellCallback, selectCB, ep);
  /*
      XtVaSetValues(w,
                    XmNuserData, selection,
--- 512,534 ----
  				     XmNrowLabels, rowlabels,
  				     XmNcolumnLabels, ep->collabels,
  				     XmNcells, cells,
+ 				     XmNgridType, XmGRID_SHADOW_IN,
+ 				     XmNcellShadowType, XmSHADOW_ETCHED_OUT,
+ 				     XmNcellShadowThickness, 4,
  				     NULL);
! 				     
! /*    XtAddCallback(ep->mw, XmNenterCellCallback, enterCB, ep); */
!     XtAddCallback(ep->mw, XmNselectCellCallback, selectCB, ep);	
! 
!     XtAddCallback(ep->mw, XmNdrawCellCallback, drawcellCB, ep);	
      XtAddCallback(ep->mw, XmNleaveCellCallback, leaveCB, ep);
!     XtAddCallback(ep->mw, XmNwriteCellCallback, writeCB, ep);  
!         
! /*    
!     XtAddCallback(ep->mw, XmNmodifyVerifyCallback, verifyCB, ep);  
! */
!     
!     
  /*
      XtVaSetValues(w,
                    XmNuserData, selection,
*** xvlib.c.orig	Fri Jun  2 06:24:14 1995
--- xvlib.c	Wed Aug 28 19:12:17 1996
***************
*** 400,408 ****
  {
      int i;
      XColor xc[NUM_COLORS];
-     XColor xct;
-     unsigned long plane_masks[1];
- 
      ncolors = DisplayCells(disp, DefaultScreen(disp));
      if (ncolors > 256) {
  	ncolors = 256;
--- 400,405 ----
***************
*** 415,449 ****
  	}
  	if (!use_defaultcmap) {
  	    XQueryColors(disp, cmap, xc, ncolors);
! 	    mycmap = XCreateColormap(disp, xwin,
! 			DefaultVisual(disp, DefaultScreen(disp)), AllocAll);
  	} else {
  	    mycmap = cmap;
  	}
- 	if (XAllocColorCells(disp, cmap, False, plane_masks, 0, colors, maxcolors)) {
- 	    mycmap = cmap;
- 	} else {
- 	    fprintf(stderr, "Can't allocate %d color cells\n", maxcolors);
- 	    cmap = XCreateColormap(disp, xwin, (Visual *) PseudoColor, AllocAll);
- 	    mycmap = cmap;
- 	}
  	for (i = 2; i < maxcolors; i++) {
  	    xc[i].red = red[i] << 8;
  	    xc[i].green = green[i] << 8;
  	    xc[i].blue = blue[i] << 8;
- /*
  	    if (use_defaultcmap) {
  		if (!XAllocColor(disp, cmap, &xc[i])) {
  		    fprintf(stderr, " Can't allocate color\n");
  		}
  	    }
! 	XStoreColors(disp, mycmap, xc, maxcolors);
! */
! 	    xc[i].pixel = colors[i];
! 	    xct = xc[i];
! 	    xct.flags = DoRed | DoGreen | DoBlue;
! 	    xct.pad = 0;
! 	    XStoreColor(disp, mycmap, &xct);
  	}
  	if (!use_defaultcmap) {
  	    XStoreColors(disp, mycmap, xc, ncolors);
--- 412,431 ----
  	}
  	if (!use_defaultcmap) {
  	    XQueryColors(disp, cmap, xc, ncolors);
! 	    mycmap = XCreateColormap(disp, xwin, DefaultVisual(disp, DefaultScreen(disp)), AllocAll);
  	} else {
  	    mycmap = cmap;
  	}
  	for (i = 2; i < maxcolors; i++) {
  	    xc[i].red = red[i] << 8;
  	    xc[i].green = green[i] << 8;
  	    xc[i].blue = blue[i] << 8;
  	    if (use_defaultcmap) {
  		if (!XAllocColor(disp, cmap, &xc[i])) {
  		    fprintf(stderr, " Can't allocate color\n");
  		}
  	    }
! 	    colors[i] = xc[i].pixel;
  	}
  	if (!use_defaultcmap) {
  	    XStoreColors(disp, mycmap, xc, ncolors);
