--- a/String.st Mon Jul 22 10:25:50 2013 +0200
+++ b/String.st Mon Jul 22 11:34:52 2013 +0200
@@ -3066,14 +3066,17 @@
!String methodsFor:'printing & storing'!
errorPrint
- "print the receiver on standard output.
+ "print the receiver on standard error, if the global Stderr is nil;
+ otherwise, fall back to the inherited errorPrint, which sends the string to
+ the Stderr stream.
This method does NOT (by purpose) use the stream classes and
- will therefore work even in case of emergency (but only, if Stdout is nil)."
+ will therefore work even in case of emergency during early startup
+ (but only, as long as Stderr is nil, which is set later after startup)."
%{ /* NOCONTEXT */
if (@global(Stderr) == nil) {
- if (__qIsStringLike(self)) {
+ if (__qIsStringLike(self)) {
console_fprintf(stderr, "%s" , __stringVal(self));
console_fflush(stderr);
RETURN (self);
@@ -3091,14 +3094,17 @@
!
errorPrintCR
- "print the receiver on standard output, followed by a cr.
+ "print the receiver on standard error, followed by a cr,
+ if the global Stderr is nil; otherwise, fall back to the inherited errorPrintCR,
+ which sends the string to the Stderr stream.
This method does NOT (by purpose) use the stream classes and
- will therefore work even in case of emergency (but only, if Stdout is nil)."
+ will therefore work even in case of emergency during early startup
+ (but only, as long as Stderr is nil, which is set later after startup)."
%{ /* NOCONTEXT */
if (@global(Stderr) == nil) {
- if (__qIsStringLike(self)) {
+ if (__qIsStringLike(self)) {
console_fprintf(stderr, "%s\n" , __stringVal(self));
console_fflush(stderr);
RETURN (self);
@@ -3109,14 +3115,17 @@
!
print
- "print the receiver on standard output.
+ "print the receiver on standard output, if the global Stdout is nil;
+ otherwise, fall back to the inherited errorPrint, which sends the string to
+ the Stdout stream.
This method does NOT (by purpose) use the stream classes and
- will therefore work even in case of emergency (but only, if Stdout is nil)."
+ will therefore work even in case of emergency during early startup
+ (but only, as long as Stdout is nil, which is set later after startup)."
%{ /* NOCONTEXT */
if (@global(Stdout) == nil) {
- if (__qIsStringLike(self)) {
+ if (__qIsStringLike(self)) {
console_fprintf(stdout, "%s" , __stringVal(self));
console_fflush(stdout);
RETURN (self);
@@ -3127,14 +3136,17 @@
!
printCR
- "print the receiver on standard output, followed by a cr.
+ "print the receiver on standard output, followed by a cr,
+ if the global Stdout is nil; otherwise, fall back to the inherited errorPrintCR,
+ which sends the string to the Stdout stream.
This method does NOT (by purpose) use the stream classes and
- will therefore work even in case of emergency (but only, if Stdout is nil)."
+ will therefore work even in case of emergency during early startup
+ (but only, as long as Stdout is nil, which is set later after startup)."
%{ /* NOCONTEXT */
if (@global(Stdout) == nil) {
- if (__qIsStringLike(self)) {
+ if (__qIsStringLike(self)) {
console_fprintf(stdout, "%s\n" , __stringVal(self));
console_fflush(stdout);
RETURN (self);
@@ -3149,7 +3161,7 @@
Return a printed representation of the receiver as specified by formatString,
which is defined by printf.
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.
+ WARNNG: this goes directly to the C-printf function and may therefore be inherently unsafe.
Please use the printf: method, which is safe as it is completely implemented in Smalltalk."
%{ /* STACK: 1000 */
@@ -3899,10 +3911,10 @@
!String class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.307 2013-07-15 10:33:30 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.308 2013-07-22 09:34:52 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.307 2013-07-15 10:33:30 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.308 2013-07-22 09:34:52 cg Exp $'
! !