[comp.lang.eiffel] Two bug fixes

jp@eiffel.UUCP (Jean-Pierre Sarkis) (03/17/90)

The following will correct two problems previously reported in
this newsgroup: one with the Kernel Library Class ARGUMENTS
(wrong indexing) and one with function rabs in
the Kernel Library Class BASIC.

The correction is given in the form of a ``diff'' between the old
and new versions of

	Installation_directory/Eiffel/files/_utility.c

*****************************************************************

2a3
> #include "_gac.h" 
67c68
< int *c_option (index)
---
> DATUM c_option (index)
70,71c71,77
< 	if ((*arg_strings) && (arg_strings [index]))
< 		return ( (int *) MakeStr (arg_strings [index]));
---
> 	DATPTR strarg;
> 	if ((*arg_strings) && (arg_strings [index])) {
> 		strarg = (DATPTR)malloc (sizeof(DATPTR));
> 		(*strarg) = DATOBJ (MakeStr (arg_strings [index]));
> 		if (gac_option) ONCE(*strarg);
> 		return(*strarg);
> 	}
73c79
< 		return ((int) NULL);
---
> 		return ((DATUM) NULL);
95c101
< c_rabs (r)
---
> float c_rabs (r)

*****************************************************************

Be sure to make a backup copy of the file before applying the
correction. After applying it, re-generate the archive of the
run-time system by running ``make -f _makeD'' and
(only on a BSD version of Unix) run `ranlib _run_time.a'.


-- Jean-Pierre Sarkis
jp@eiffel.com

Replies to: eiffel@eiffel.com