NonPositionableExternalStream.st
author Claus Gittinger <cg@exept.de>
Thu, 25 Apr 1996 19:02:53 +0200
changeset 1295 83f594f05c52
parent 1133 961f2b095c22
child 1344 32a51164b237
permissions -rw-r--r--
documentation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     1
"
5
67342904af11 *** empty log message ***
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
     3
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     4
a27a279701f8 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a27a279701f8 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a27a279701f8 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a27a279701f8 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a27a279701f8 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a27a279701f8 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    11
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
159
514c749165c3 *** empty log message ***
claus
parents: 93
diff changeset
    13
UnboundedExternalStream subclass:#NonPositionableExternalStream
1295
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    14
	instanceVariableNames:''
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    15
	classVariableNames:'StdInStream StdOutStream StdErrorStream'
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    16
	poolDictionaries:''
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    17
	category:'Streams-External'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    18
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    19
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    20
!NonPositionableExternalStream primitiveDefinitions!
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    21
%{
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    22
#include <stdio.h>
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    23
#define _STDIO_H_INCLUDED_
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    24
%}
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    25
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    26
! !
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    27
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    28
!NonPositionableExternalStream class methodsFor:'documentation'!
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    29
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    30
copyright
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    31
"
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    32
 COPYRIGHT (c) 1989 by Claus Gittinger
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
    33
	      All Rights Reserved
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    34
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    35
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    36
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    37
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    38
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    39
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    40
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    41
"
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    42
!
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    43
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    44
documentation
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    45
"
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    46
    This class provides common protocol for all non-positionable,
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    47
    external streams. Concrete subclasses are terminal streams, pipe streams,
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    48
    PrinterStreams, Sockets etc.
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    49
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    50
    There are three special instances of this class, representing stdin,
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    51
    stdout and stderr of the smalltalk/X process (see Unix manuals, if you
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
    52
    dont know what those are used for). These special streams are bound to
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
    53
    to globals Stdin, Stdout and Stderr at early initialization time
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
    54
    (see Smalltalk>>initializeStandardStreams).
159
514c749165c3 *** empty log message ***
claus
parents: 93
diff changeset
    55
514c749165c3 *** empty log message ***
claus
parents: 93
diff changeset
    56
    The name of this class is a historical leftover - it should be called
514c749165c3 *** empty log message ***
claus
parents: 93
diff changeset
    57
    'TTYStream' or similar.
1295
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    58
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    59
    [author:]
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
    60
        Claus Gittinger
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    61
"
216
a8abff749575 *** empty log message ***
claus
parents: 213
diff changeset
    62
! !
a8abff749575 *** empty log message ***
claus
parents: 213
diff changeset
    63
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    64
!NonPositionableExternalStream class methodsFor:'instance creation'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    65
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    66
forStderr
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    67
    "return a NonPositionableExternalStream object for writing to
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    68
     Unixes standard error output file descriptor"
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    69
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    70
    StdErrorStream isNil ifTrue:[
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    71
	StdErrorStream := self basicNew initializeForStderr
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    72
    ].
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    73
    ^ StdErrorStream
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    74
!
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    75
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    76
forStdin
44
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
    77
    "return a NonPositionableExternalStream object for reading from
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
    78
     Unixes standard input file descriptor"
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
    79
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    80
    StdInStream isNil ifTrue:[
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
    81
	StdInStream := self basicNew initializeForStdin
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    82
    ].
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    83
    ^ StdInStream
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    84
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    85
a27a279701f8 Initial revision
claus
parents:
diff changeset
    86
forStdout
44
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
    87
    "return a NonPositionableExternalStream object for writing to
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
    88
     Unixes standard output file descriptor"
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
    89
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    90
    StdOutStream isNil ifTrue:[
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
    91
	StdOutStream := self basicNew initializeForStdout
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    92
    ].
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
    93
    ^ StdOutStream
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    94
! !
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    95
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    96
!NonPositionableExternalStream methodsFor:'error handling'!
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    97
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    98
positionError
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    99
    "notify that this stream has no concept of a position"
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   100
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   101
    ^ PositionErrorSignal raiseRequestWith:self in:thisContext sender
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   102
! !
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   103
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   104
!NonPositionableExternalStream methodsFor:'positioning'!
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   105
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   106
position
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   107
    "catch position - there is none here"
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   108
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   109
    ^ self positionError
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   110
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   111
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   112
position:aPosition
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   113
    "catch position - there is none here"
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   114
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   115
    ^ self positionError
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   116
!
44
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
   117
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   118
skip:numberToSkip
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   119
    "skip count objects, return the receiver"
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   120
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   121
    "dont know how to unread ..."
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   122
    numberToSkip < 0 ifTrue:[
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   123
	^ self error:'stream is not positionable'
88
81dacba7a63a *** empty log message ***
claus
parents: 44
diff changeset
   124
    ].
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   125
    numberToSkip timesRepeat:self next
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   126
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   127
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   128
!NonPositionableExternalStream methodsFor:'printing & storing'!
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   129
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   130
printOn:aStream
213
3b56a17534fd *** empty log message ***
claus
parents: 177
diff changeset
   131
    "append a printed representation of the receiver on aStream"
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   132
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   133
    self == Stdin ifTrue:[
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   134
	aStream nextPutAll:'Stdin'.
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   135
	^ self
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   136
    ].
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   137
    self == Stdout ifTrue:[
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   138
	aStream nextPutAll:'Stdout'.
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   139
	^ self
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   140
    ].
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   141
    self == Stderr ifTrue:[
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   142
	aStream nextPutAll:'Stderr'.
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   143
	^ self
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   144
    ].
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   145
    super printOn:aStream
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   146
!
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   147
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   148
storeOn:aStream
213
3b56a17534fd *** empty log message ***
claus
parents: 177
diff changeset
   149
    "append a printed representation of the receiver on aStream, from
3b56a17534fd *** empty log message ***
claus
parents: 177
diff changeset
   150
     which the receiver can be reconstructed."
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   151
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   152
    ((self == Stdin)
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   153
    or:[self == Stdout
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   154
    or:[self == Stderr]]) ifTrue:[
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   155
	^ self printOn:aStream
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   156
    ].
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   157
    super storeOn:aStream
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   158
! !
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   159
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   160
!NonPositionableExternalStream methodsFor:'private'!
360
claus
parents: 269
diff changeset
   161
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   162
initializeForStderr
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   163
    "setup for writing to stderr"
269
93162487a94b *** empty log message ***
claus
parents: 216
diff changeset
   164
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   165
    mode := #readwrite.
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   166
    buffered := false.
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   167
%{
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   168
    OBJ fp;
269
93162487a94b *** empty log message ***
claus
parents: 216
diff changeset
   169
1133
961f2b095c22 underline cleanup
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   170
    __INST(filePointer) = fp = __MKOBJ(stderr); __STORE(self, fp);
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   171
%}
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   172
!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   173
a27a279701f8 Initial revision
claus
parents:
diff changeset
   174
initializeForStdin
44
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
   175
    "setup for reading stdin"
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
   176
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   177
    mode := #readonly.
10
claus
parents: 5
diff changeset
   178
    buffered := true.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   179
%{
477
8710aba7876b oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   180
    OBJ fp;
8710aba7876b oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   181
1133
961f2b095c22 underline cleanup
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   182
    __INST(filePointer) = fp = __MKOBJ(stdin); __STORE(self, fp);
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   183
%}
a27a279701f8 Initial revision
claus
parents:
diff changeset
   184
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   185
a27a279701f8 Initial revision
claus
parents:
diff changeset
   186
initializeForStdout
44
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
   187
    "setup for writing to stdout"
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
   188
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   189
    mode := #readwrite.
10
claus
parents: 5
diff changeset
   190
    buffered := false.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   191
%{
477
8710aba7876b oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   192
    OBJ fp;
8710aba7876b oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   193
1133
961f2b095c22 underline cleanup
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   194
    __INST(filePointer) = fp = __MKOBJ(stdout); __STORE(self, fp);
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   195
%}
a27a279701f8 Initial revision
claus
parents:
diff changeset
   196
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   197
a27a279701f8 Initial revision
claus
parents:
diff changeset
   198
reOpen
44
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
   199
    "reopen the stream after an image restart.
b262907c93ea *** empty log message ***
claus
parents: 10
diff changeset
   200
     If I am one of the standard streams, reopen is easy"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   201
477
8710aba7876b oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   202
    (self == StdInStream) ifTrue:[
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   203
	^ self initializeForStdin
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   204
    ].
477
8710aba7876b oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   205
    (self == StdOutStream) ifTrue:[
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   206
	^ self initializeForStdout
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   207
    ].
477
8710aba7876b oops - making id's real objects requires a store macro
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   208
    (self == StdErrorStream) ifTrue:[
177
c9f8a4bc4b10 better printString & storeString
claus
parents: 159
diff changeset
   209
	^ self initializeForStderr
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   210
    ].
a27a279701f8 Initial revision
claus
parents:
diff changeset
   211
    ^ super reOpen
a27a279701f8 Initial revision
claus
parents:
diff changeset
   212
! !
613
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   213
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   214
!NonPositionableExternalStream methodsFor:'queries'!
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   215
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   216
isPositionable
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   217
    "return true, if the stream supports positioning (this one is not)"
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   218
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   219
    ^ false
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   220
! !
0af19c3594fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   221
1295
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   222
!NonPositionableExternalStream class methodsFor:'documentation'!
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   223
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   224
version
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   225
    ^ '$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.27 1996-04-25 17:02:24 cg Exp $'
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1133
diff changeset
   226
! !