mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-21 21:21:39 +02:00
+ Read operation not allowed on stderr
git-svn-id: trunk@1109 -
This commit is contained in:
parent
40dd9b9404
commit
e681f77694
@ -24,8 +24,8 @@ type
|
||||
|
||||
TIOStream = class(THandleStream)
|
||||
private
|
||||
FType,
|
||||
FPos : LongInt;
|
||||
FType : longint;
|
||||
FPos : Int64;
|
||||
zIOSType : TIOSType;
|
||||
public
|
||||
constructor Create(aIOSType : TiosType);
|
||||
@ -59,7 +59,7 @@ end;
|
||||
|
||||
function TIOStream.Read(var Buffer; Count : LongInt) : Longint;
|
||||
begin
|
||||
if (zIOSType = iosOutput) then
|
||||
if (zIOSType <> iosInput) then
|
||||
raise EIOStreamError.Create(SWriteOnlyStream)
|
||||
else begin
|
||||
result := inherited Read(Buffer,Count);
|
||||
@ -84,7 +84,7 @@ end;
|
||||
|
||||
function TIOStream.Seek(Offset: Longint; Origin: Word): Longint;
|
||||
const
|
||||
BufSize = 100;
|
||||
BufSize = 1024;
|
||||
var
|
||||
Buf : array[1..BufSize] of Byte;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user