--- a/Float.st Sat Dec 23 01:17:56 1995 +0100
+++ b/Float.st Sat Dec 23 01:35:10 1995 +0100
@@ -727,15 +727,12 @@
REGISTER char *cp;
OBJ s;
-#ifdef THISCONTEXT_IN_REGISTER
/*
* actually only needed on sparc: since thisContext is
* in a global register, which gets destroyed by printf,
* manually save it here - very stupid ...
*/
- extern OBJ __thisContext__;
- __thisContext__ = __thisContext;
-#endif
+ __BEGIN_PROTECT_REGISTERS__
#ifdef SYSV
sprintf(buffer, "%.6lg", _floatVal(self));
@@ -743,10 +740,7 @@
sprintf(buffer, "%.6G", _floatVal(self));
#endif
-#ifdef THISCONTEXT_IN_REGISTER
- __thisContext = __thisContext__;
- __thisContext__ = nil;
-#endif
+ __END_PROTECT_REGISTERS__
/*
* kludge to make integral float f prints as "f.0" (not as "f" as printf does)
* (i.e. look if string contains '.' or 'e' and append '.0' if not)
@@ -796,22 +790,16 @@
OBJ s;
if (__isString(formatString)) {
-#ifdef THISCONTEXT_IN_REGISTER
/*
* actually only needed on sparc: since thisContext is
* in a global register, which gets destroyed by printf,
* manually save it here - very stupid ...
*/
- extern OBJ __thisContext__;
- __thisContext__ = __thisContext;
-#endif
+ __BEGIN_PROTECT_REGISTERS__
sprintf(buffer, _stringVal(formatString), _floatVal(self));
-#ifdef THISCONTEXT_IN_REGISTER
- __thisContext = __thisContext;
- __thisContext__ = nil;
-#endif
+ __END_PROTECT_REGISTERS__
s = _MKSTRING(buffer COMMA_SND);
if (s != nil) {
@@ -1037,5 +1025,5 @@
!Float class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.32 1995-12-07 21:34:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.33 1995-12-23 00:34:09 cg Exp $'
! !