NonPositionableExternalStream.st
changeset 21702 5c05820b761f
parent 21701 81f076cefc80
child 21750 b048d7e7b343
equal deleted inserted replaced
21701:81f076cefc80 21702:5c05820b761f
    13 
    13 
    14 "{ NameSpace: Smalltalk }"
    14 "{ NameSpace: Smalltalk }"
    15 
    15 
    16 ExternalStream subclass:#NonPositionableExternalStream
    16 ExternalStream subclass:#NonPositionableExternalStream
    17 	instanceVariableNames:''
    17 	instanceVariableNames:''
    18 	classVariableNames:'StdInStream StdOutStream StdErrorStream'
    18 	classVariableNames:'StdErrorStream StdInStream StdOutStream'
    19 	poolDictionaries:''
    19 	poolDictionaries:''
    20 	category:'Streams-External'
    20 	category:'Streams-External'
    21 !
    21 !
    22 
    22 
    23 !NonPositionableExternalStream primitiveDefinitions!
    23 !NonPositionableExternalStream primitiveDefinitions!
   578     binary := false.
   578     binary := false.
   579     buffered := false.
   579     buffered := false.
   580     position := 0.      "only writing - can keep track of position"
   580     position := 0.      "only writing - can keep track of position"
   581     handle := self handleForStderr.
   581     handle := self handleForStderr.
   582     handleType := #filePointer.
   582     handleType := #filePointer.
       
   583     hitEOF := false.
       
   584     self initializeEOLMode.
   583     OperatingSystem isMSWINDOWSlike ifTrue:[
   585     OperatingSystem isMSWINDOWSlike ifTrue:[
   584         eolMode := #crlf
   586         eolMode := #crlf
   585     ]
   587     ]
   586 
   588 
   587     "Modified: / 25-04-2017 / 02:04:43 / cg"
   589     "Modified: / 25-04-2017 / 02:13:56 / cg"
   588 !
   590 !
   589 
   591 
   590 initializeForStdin
   592 initializeForStdin
   591     "{ Pragma: +optSpace }"
   593     "{ Pragma: +optSpace }"
   592 
   594 
   597     "/ buffered := true.
   599     "/ buffered := true.
   598     buffered := false.
   600     buffered := false.
   599     position := 0.      "only reading - can keep track of position"
   601     position := 0.      "only reading - can keep track of position"
   600     handleType := #filePointer.
   602     handleType := #filePointer.
   601     handle := self handleForStdin.
   603     handle := self handleForStdin.
   602 
   604     hitEOF := false.
   603     "Modified: / 25-04-2017 / 02:04:49 / cg"
   605     self initializeEOLMode.
       
   606 
       
   607     "Modified: / 25-04-2017 / 02:14:22 / cg"
   604 !
   608 !
   605 
   609 
   606 initializeForStdout
   610 initializeForStdout
   607     "{ Pragma: +optSpace }"
   611     "{ Pragma: +optSpace }"
   608 
   612 
   612     binary := false.
   616     binary := false.
   613     buffered := false.
   617     buffered := false.
   614     position := 0.      "only writing - can keep track of position"
   618     position := 0.      "only writing - can keep track of position"
   615     handle := self handleForStdout.
   619     handle := self handleForStdout.
   616     handleType := #filePointer.
   620     handleType := #filePointer.
       
   621     self initializeEOLMode.
       
   622     hitEOF := false.
   617     OperatingSystem isMSWINDOWSlike ifTrue:[
   623     OperatingSystem isMSWINDOWSlike ifTrue:[
   618         eolMode := #crlf
   624         eolMode := #crlf
   619     ]
   625     ]
   620 
   626 
   621     "Modified: / 25-04-2017 / 02:04:53 / cg"
   627     "Modified: / 25-04-2017 / 02:14:27 / cg"
   622 !
   628 !
   623 
   629 
   624 reOpen
   630 reOpen
   625     "{ Pragma: +optSpace }"
   631     "{ Pragma: +optSpace }"
   626 
   632