[comp.windows.x] Bug in ups 2.30 + patch

mtr@ukc.ac.uk (M.T.Russell) (05/10/91)

I've just found a bug in ups version 2.30: it displays incorrect
values for double variables.  This is due to a botch on my part in
doing the work on 2.30 (the bug is not present in 2.28).

[ If you don't know what ups is see my original article in
  comp.windows.x or pull ups-2.30.README from export.lcs.mit.edu
  (18.30.0.238). ]

The patch is very short so I have included it here.  You should
only apply it if you are using floating point and have version
2.30.  If you do apply it then keep the original files around
as the 2.30 to 2.31 patch will be relative to the original 2.30
distribution.

To apply the patch, change directory to the root of the ups-2.30
tree and feed this article into `patch -p0'.

Mark

Index: ups/va_expr.c
10c10
< char ups_va_expr_c_sccsid[] = "@(#)va_expr.c	1.6 5/3/91 (UKC)";
---
> char ups_va_expr_c_sccsid[] = "@(#)va_expr.c	1.7 5/10/91 (UKC)";
750c750
< 		strcpy(buf, get_real(vl, TY_FLOAT));
---
> 		strcpy(buf, get_real(vl, TRUE));
753c753
< 		strcpy(buf, get_real(vl, TY_DOUBLE));
---
> 		strcpy(buf, get_real(vl, FALSE));
Index: ups/va_val.c
10c10
< char ups_va_val_c_sccsid[] = "@(#)va_val.c	1.19 5/6/91 (UKC)";
---
> char ups_va_val_c_sccsid[] = "@(#)va_val.c	1.20 5/10/91 (UKC)";
390c390
< 			(void) strcpy(buf, get_real(vl, TY_FLOAT));
---
> 			(void) strcpy(buf, get_real(vl, TRUE));
394c394
< 			(void) strcpy(buf, get_real(vl, TY_DOUBLE));
---
> 			(void) strcpy(buf, get_real(vl, FALSE));
398c398
< 			(void) sprintf(buf, "(%s,", get_real(vl, TY_FLOAT));
---
> 			(void) sprintf(buf, "(%s,", get_real(vl, TRUE));
401c401
< 						    get_real(vl, TY_FLOAT));
---
> 						    get_real(vl, TRUE));
407c407
< 			(void) sprintf(buf, "(%s,", get_real(vl, TY_DOUBLE));
---
> 			(void) sprintf(buf, "(%s,", get_real(vl, FALSE));
410c410
< 						    get_real(vl, TY_DOUBLE));
---
> 						    get_real(vl, FALSE));
459c459
< 			strcpy(buf, get_real(vl, TY_FLOAT));
---
> 			strcpy(buf, get_real(vl, TRUE));
463c463
< 			strcpy(buf, get_real(vl, TY_DOUBLE));
---
> 			strcpy(buf, get_real(vl, FALSE));