[comp.archives] [xpert] Bug in ups 2.30 + patch

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

Archive-name: languages/debugger/ups/1991-05-10
Archive: export.lcs.mit.edu:/contrib/ups-* [18.30.0.238]
Original-posting-by: mtr@ukc.ac.uk (M.T.Russell)
Original-subject: Bug in ups 2.30 + patch
Reposted-by: emv@msen.com (Edward Vielmetti, MSEN)


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));

-- comp.archives file verification
export.lcs.mit.edu
-rw-rw-rw-  1 ftp      30          81381 May  7 21:11 /contrib/ups-2.28-to-2.30.patch.Z
-rw-rw-rw-  1 ftp      30           7349 Apr 19 17:46 /contrib/ups-2.28.README
-rw-rw-rw-  1 ftp      30         956081 Apr 19 17:45 /contrib/ups-2.28.tar.Z
-rw-rw-rw-  1 ftp      30           7566 May  7 21:11 /contrib/ups-2.30.README
-rw-rw-rw-  1 ftp      30         957439 May  7 21:10 /contrib/ups-2.30.tar.Z
found ups ok
export.lcs.mit.edu:/contrib/ups-*