*** /tmp/RCSAa24399	Mon Apr  8 10:42:24 1991
--- Axis.c	Tue Mar 26 18:27:26 1991
***************
*** 1,4 ****
! /* $Header: /local/src/AtPlotter/RCS/Axis.c,v 1.1 1991/03/21 13:43:33 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
--- 1,4 ----
! /* $Header: /net/stout/local/src/AtPlotter/RCS/Axis.c,v 1.3 91/03/26 18:26:54 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
***************
*** 24,29 ****
--- 24,30 ----
  #include <math.h>
  #include <X11/Intrinsic.h>
  #include <X11/StringDefs.h>
+ #include <X11/Xlibint.h>	/* for max, min macros */
  
  #ifdef _AtDevelopment_
  #include "Scale.h"
***************
*** 462,469 ****
  
    if (Changed(drawGrid)) redraw = True;
  
!   if (Changed(ticLabels) || (strcmp(new->axis.ticLabels, 
! 				    new->axis.ticlabelcpy)))  {
      for (i = 0; i < new->axis.nuserticlabels; i++)
        XtFree(new->axis.userticlabels[i]);
      XtFree(new->axis.userticlabels);
--- 463,470 ----
  
    if (Changed(drawGrid)) redraw = True;
  
!   if (Changed(ticLabels) || (new->axis.ticLabels && new->axis.ticlabelcpy && 
! 	(strcmp(new->axis.ticLabels, new->axis.ticlabelcpy))))  {
      for (i = 0; i < new->axis.nuserticlabels; i++)
        XtFree(new->axis.userticlabels[i]);
      XtFree(new->axis.userticlabels);
***************
*** 695,701 ****
      double max = axis->max;
      min = ceil(min/axis->ticInterval) * axis->ticInterval;
      max = floor(max/axis->ticInterval) * axis->ticInterval;
!     w->axis.ntics = 1+(int)((max - min)/w->axis.ticInterval);
    }
    else
      axis->ntics = 1+(int)((log10(axis->max) - log10(axis->min))
--- 696,702 ----
      double max = axis->max;
      min = ceil(min/axis->ticInterval) * axis->ticInterval;
      max = floor(max/axis->ticInterval) * axis->ticInterval;
!     w->axis.ntics = 1+(int)(fabs(max - min)/w->axis.ticInterval);
    }
    else
      axis->ntics = 1+(int)((log10(axis->max) - log10(axis->min))
***************
*** 844,850 ****
      if (w->axis.scale->transform == AtTransformLINEAR)
        for(j=0; j < w->axis.subtics; j++) {
  	if ((subticval = w->axis.ticvalues[i] + 
! 	     w->axis.ticInterval / (w->axis.subtics+1)*(j+1)) <= w->axis.max)  {
  	  w->axis.subticcoords[i*(w->axis.subtics)+j] = 
  	    AtScaleUserToPixel(w->axis.scale, subticval);
  	  w->axis.totalsubtics++;
--- 845,852 ----
      if (w->axis.scale->transform == AtTransformLINEAR)
        for(j=0; j < w->axis.subtics; j++) {
  	if ((subticval = w->axis.ticvalues[i] + 
! 	     w->axis.ticInterval / (w->axis.subtics+1)*(j+1)) <= 
! 	     max(w->axis.max, w->axis.min))  {
  	  w->axis.subticcoords[i*(w->axis.subtics)+j] = 
  	    AtScaleUserToPixel(w->axis.scale, subticval);
  	  w->axis.totalsubtics++;
***************
*** 883,889 ****
   */
  void AtAxisComputeTicSpacing(AtAxisObject w, int length)
  {
-   double min;
    int i, width;
    AtAxisPart *axis = &w->axis;
    char *strcpy();
--- 885,890 ----
***************
*** 900,909 ****
    /* Calculate the tic values and place them in the ticvalues
       array of the axis structure */
    if (axis->transform == AtTransformLINEAR) {
!     min = axis->min;
!     min = ceil(min/axis->ticInterval) * axis->ticInterval;
      for(i=0;i<axis->ntics;i++)
!       axis->ticvalues[i] = ffix(min + i*axis->ticInterval);
    }
      
    else {
--- 901,911 ----
    /* Calculate the tic values and place them in the ticvalues
       array of the axis structure */
    if (axis->transform == AtTransformLINEAR) {
!     double fmin;
!     fmin = min(axis->min, axis->max);
!     fmin = ceil(fmin/axis->ticInterval) * axis->ticInterval;
      for(i=0;i<axis->ntics;i++)
!       axis->ticvalues[i] = ffix(fmin + i*axis->ticInterval);
    }
      
    else {
*** /tmp/RCSAa24399	Mon Apr  8 10:42:26 1991
--- ContourPlot.c	Thu Mar 21 11:05:48 1991
***************
*** 1,4 ****
! /* $Header: /local/src/AtPlotter/RCS/ContourPlot.c,v 1.1 1991/03/21 17:41:27 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
--- 1,4 ----
! /* $Header: /local/src/AtPlotter/RCS/ContourPlot.c,v 1.2 1991/03/21 18:05:06 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
***************
*** 248,254 ****
      new->contourplot.valid = False;
      xchanged = True;
      if (new->contourplot.xPoints != NULL)
!       XtRealloc(new->contourplot.xpts, 
  		new->contourplot.xNumPoints * sizeof(double));
      else  {
        XtFree(new->contourplot.xpts);
--- 248,254 ----
      new->contourplot.valid = False;
      xchanged = True;
      if (new->contourplot.xPoints != NULL)
!       new->contourplot.xpts = (double *) XtRealloc(new->contourplot.xpts, 
  		new->contourplot.xNumPoints * sizeof(double));
      else  {
        XtFree(new->contourplot.xpts);
***************
*** 259,265 ****
      new->contourplot.valid = False;
      ychanged = True;
      if (new->contourplot.yPoints != NULL)
!       XtRealloc(new->contourplot.ypts, 
  		new->contourplot.yNumPoints * sizeof(double));
      else  {
        XtFree(new->contourplot.ypts);
--- 259,265 ----
      new->contourplot.valid = False;
      ychanged = True;
      if (new->contourplot.yPoints != NULL)
!       new->contourplot.ypts  = (double *) XtRealloc(new->contourplot.ypts, 
  		new->contourplot.yNumPoints * sizeof(double));
      else  {
        XtFree(new->contourplot.ypts);
***************
*** 281,287 ****
    }
  
    if (Changed(xNumPoints) || Changed(yNumPoints))  {
!     XtRealloc(new->contourplot.zpts, new->contourplot.xNumPoints *
  	      new->contourplot.yNumPoints * sizeof(double));
      bcopy((char *) new->contourplot.zPoints, new->contourplot.zpts,
  	  new->contourplot.xNumPoints * sizeof(double) * 
--- 281,288 ----
    }
  
    if (Changed(xNumPoints) || Changed(yNumPoints))  {
!     new->contourplot.zpts = (double *) XtRealloc(new->contourplot.zpts,
! 	 new->contourplot.xNumPoints *
  	      new->contourplot.yNumPoints * sizeof(double));
      bcopy((char *) new->contourplot.zPoints, new->contourplot.zpts,
  	  new->contourplot.xNumPoints * sizeof(double) * 
*** /tmp/RCSAa24399	Mon Apr  8 10:42:28 1991
--- FBarchart.c	Thu Mar 21 11:05:50 1991
***************
*** 1,4 ****
! /* $Header: /local/src/AtPlotter/RCS/FBarchart.c,v 1.1 1991/03/21 17:41:27 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
--- 1,4 ----
! /* $Header: /local/src/AtPlotter/RCS/FBarchart.c,v 1.2 1991/03/21 18:05:06 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
***************
*** 173,179 ****
    if (bcw->fbarchart.firsttime)
      bcw->fbarchart.y = (double *)XtMalloc(sizeof(double) * nump);
    else 
!     XtRealloc (bcw->fbarchart.y, sizeof(double) * nump);
  
    f = fopen(bcw->fbarchart.dataFile, "r");
    if (f == NULL) {
--- 173,180 ----
    if (bcw->fbarchart.firsttime)
      bcw->fbarchart.y = (double *)XtMalloc(sizeof(double) * nump);
    else 
!     bcw->fbarchart.y =  (double *)
! 	XtRealloc (bcw->fbarchart.y, sizeof(double) * nump);
  
    f = fopen(bcw->fbarchart.dataFile, "r");
    if (f == NULL) {
No differences encountered
*** /tmp/RCSAa24399	Mon Apr  8 10:42:33 1991
--- Scale.c	Tue Mar 26 18:28:23 1991
***************
*** 1,4 ****
! /* $Header: /local/src/AtPlotter/RCS/Scale.c,v 1.1 1991/03/21 21:40:09 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
--- 1,4 ----
! /* $Header: /net/stout/local/src/AtPlotter/RCS/Scale.c,v 1.2 91/03/26 18:27:45 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
***************
*** 46,58 ****
  {
    s->errorcode = SCALEERROR_NONE;
  
    if (s->high < s->low) {
      s->errorcode = SCALEERROR_BOUNDLESS;
      s->transform = AtTransformINVALID;
      return;
    }
  
!   if (s->high - s->low < _AtScaleAlmostZero) {
      s->errorcode = SCALEERROR_BOUNDCLOSE;
      s->transform = AtTransformINVALID;
      return;
--- 46,60 ----
  {
    s->errorcode = SCALEERROR_NONE;
  
+ #ifdef NOTDEF
    if (s->high < s->low) {
      s->errorcode = SCALEERROR_BOUNDLESS;
      s->transform = AtTransformINVALID;
      return;
    }
+ #endif
  
!   if ( fabs(s->high - s->low) < _AtScaleAlmostZero) {
      s->errorcode = SCALEERROR_BOUNDCLOSE;
      s->transform = AtTransformINVALID;
      return;
*** /tmp/RCSAa24399	Mon Apr  8 10:42:36 1991
--- XYErrorPlot.c	Thu Mar 21 11:05:52 1991
***************
*** 1,4 ****
! /* $Header: /local/src/AtPlotter/RCS/XYErrorPlot.c,v 1.1 1991/03/21 17:41:27 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
--- 1,4 ----
! /* $Header: /local/src/AtPlotter/RCS/XYErrorPlot.c,v 1.2 1991/03/21 18:05:06 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
***************
*** 264,280 ****
    /* Need to check XYPlot's numPoints resource, because if it changed,
       we have to resize the error arrays and reread them. */
    if (current->xyplot.numPoints != new->xyplot.numPoints)  {
!     XtRealloc(new->xyerrorplot.errabove, new->xyplot.numPoints * 
  	      sizeof(double));
!     XtRealloc(new->xyerrorplot.errbelow, new->xyplot.numPoints * 
  	      sizeof(double));
!     XtRealloc(new->xyerrorplot.abovepts, new->xyplot.numPoints * 
  	      sizeof(double));
!     XtRealloc(new->xyerrorplot.belowpts, new->xyplot.numPoints * 
  	      sizeof(double));
!     XtRealloc(new->xyerrorplot.abovepix, new->xyplot.numPoints * 
  	      sizeof(XPoint));
!     XtRealloc(new->xyerrorplot.belowpix, new->xyplot.numPoints * 
  	      sizeof(XPoint));
      abovechanged = belowchanged = True;
    }
--- 264,286 ----
    /* Need to check XYPlot's numPoints resource, because if it changed,
       we have to resize the error arrays and reread them. */
    if (current->xyplot.numPoints != new->xyplot.numPoints)  {
!     new->xyerrorplot.errabove = (double *)
! 	XtRealloc(new->xyerrorplot.errabove, new->xyplot.numPoints * 
  	      sizeof(double));
!     new->xyerrorplot.errbelow =  (double *)
! 	XtRealloc(new->xyerrorplot.errbelow, new->xyplot.numPoints * 
  	      sizeof(double));
!     new->xyerrorplot.abovepts = (double *)
! 	XtRealloc(new->xyerrorplot.abovepts, new->xyplot.numPoints * 
  	      sizeof(double));
!     new->xyerrorplot.belowpts = (double *)
! 	XtRealloc(new->xyerrorplot.belowpts, new->xyplot.numPoints * 
  	      sizeof(double));
!     new->xyerrorplot.abovepix =  (XPoint *)
! 	XtRealloc(new->xyerrorplot.abovepix, new->xyplot.numPoints * 
  	      sizeof(XPoint));
!     new->xyerrorplot.belowpix = (XPoint *)
! 	XtRealloc(new->xyerrorplot.belowpix, new->xyplot.numPoints * 
  	      sizeof(XPoint));
      abovechanged = belowchanged = True;
    }
*** /tmp/RCSAa24399	Mon Apr  8 10:42:39 1991
--- XYPlot.c	Thu Mar 21 11:05:55 1991
***************
*** 1,4 ****
! /* $Header: /local/src/AtPlotter/RCS/XYPlot.c,v 1.1 1991/03/21 17:41:27 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
--- 1,4 ----
! /* $Header: /local/src/AtPlotter/RCS/XYPlot.c,v 1.2 1991/03/21 18:05:06 vanandel Exp $ */
  
  /*******************************************************************
    Copyright (C) 1990 by the Massachusetts Institute of Technology
***************
*** 290,299 ****
      new->plot.redisplay = True;
  
    if (Changed(numPoints)) {
!     XtRealloc(NEW.xpts, sizeof(double)*new->xyplot.numPoints);
!     XtRealloc(NEW.ypts, sizeof(double)*new->xyplot.numPoints);
!     XtRealloc(NEW.pixpts, sizeof(XPoint)*new->xyplot.numPoints);
!     XtRealloc(NEW.oldpixpts, sizeof(XPoint)*new->xyplot.numPoints);
  
      bcopy(NEW.xPoints, NEW.xpts, sizeof(double) * NEW.numPoints);
      bcopy(NEW.yPoints, NEW.ypts, sizeof(double) * NEW.numPoints);
--- 290,299 ----
      new->plot.redisplay = True;
  
    if (Changed(numPoints)) {
!     NEW.xpts = (double *)XtRealloc(NEW.xpts,
sizeof(double)*new->xyplot.numPoints);
!     NEW.ypts = (double *)XtRealloc(NEW.ypts,
sizeof(double)*new->xyplot.numPoints);
!     NEW.pixpts = (XPoint *)XtRealloc(NEW.pixpts,
sizeof(XPoint)*new->xyplot.numPoints);
!     NEW.oldpixpts = (XPoint *)XtRealloc(NEW.oldpixpts,
sizeof(XPoint)*new->xyplot.numPoints);
  
      bcopy(NEW.xPoints, NEW.xpts, sizeof(double) * NEW.numPoints);
      bcopy(NEW.yPoints, NEW.ypts, sizeof(double) * NEW.numPoints);

	Joe VanAndel  		Internet:vanandel@ncar.ucar.edu
	NCAR / RSF  			
	P.O Box 3000		Fax:	 303-497-2044
	Boulder, CO 80307-3000	Voice:	 303-497-2071 
