--- a/Float.st Fri Aug 30 11:31:14 2019 +0200
+++ b/Float.st Sat Aug 31 10:15:57 2019 +0200
@@ -2288,6 +2288,8 @@
!
printfPrintString:formatString
+ <unsave>
+
"non-standard: return a printed representation of the receiver
as specified by formatString, which is defined by printf.
@@ -2298,35 +2300,38 @@
since that's the (static) size of the buffer.
This method is NONSTANDARD and may be removed without notice.
- WARNNG: this goes directly to the C-printf function and may therefore me inherently unsafe.
+
+ WARNING: this goes directly to the C-printf function and may therefore me inherently unsafe.
Please use the printf: method, which is safe as it is completely implemented in Smalltalk."
-%{ /* STACK: 400 */
+%{ /* STACK: 8000 */
+#ifndef __SCHTEAM__
char buffer[256];
OBJ s;
int len;
if (__isStringLike(formatString)) {
- /*
- * actually only needed on sparc: since thisContext is
- * in a global register, which gets destroyed by printf,
- * manually save it here - very stupid ...
- */
- __BEGIN_PROTECT_REGISTERS__
-
- len = snprintf(buffer, sizeof(buffer), __stringVal(formatString), __floatVal(self));
-
- __END_PROTECT_REGISTERS__
-
- if (len < 0) goto fail;
- if (len >= sizeof(buffer)) goto fail;
-
- s = __MKSTRING_L(buffer, len);
- if (s != nil) {
- RETURN (s);
- }
+ /*
+ * actually only needed on sparc: since thisContext is
+ * in a global register, which gets destroyed by printf,
+ * manually save it here - very stupid ...
+ */
+ __BEGIN_PROTECT_REGISTERS__
+
+ len = snprintf(buffer, sizeof(buffer), __stringVal(formatString), __floatVal(self));
+
+ __END_PROTECT_REGISTERS__
+
+ if (len < 0) goto fail;
+ if (len >= sizeof(buffer)) goto fail;
+
+ s = __MKSTRING_L(buffer, len);
+ if (s != nil) {
+ RETURN (s);
+ }
}
fail: ;
+#endif /* not __SCHTEAM__ */
%}.
^ super printfPrintString:formatString