Browse Source

+ Read operation not allowed on stderr

git-svn-id: trunk@1109 -
michael 20 years ago
parent
commit
e681f77694
1 changed files with 4 additions and 4 deletions
  1. 4 4
      fcl/inc/iostream.pp

+ 4 - 4
fcl/inc/iostream.pp

@@ -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