mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 14:38:25 +02:00
* bugfix of stream errors - would always give error!
This commit is contained in:
parent
f4a9b67fc4
commit
3359e346e4
@ -508,9 +508,10 @@ Var C : Char;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
repeat
|
repeat
|
||||||
S^.Read(C,1);
|
if S^.GetPos = S^.GetSize then
|
||||||
If S^.Status=stReadError then
|
C:=#0
|
||||||
C:=#0;
|
else
|
||||||
|
S^.Read(C,1);
|
||||||
Until C<>#13;
|
Until C<>#13;
|
||||||
ReadChar:=C;
|
ReadChar:=C;
|
||||||
end;
|
end;
|
||||||
@ -523,12 +524,12 @@ Var C : Char;
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Repeat
|
Repeat
|
||||||
S^.Read(C,1);
|
if S^.GetPos = S^.GetSize then
|
||||||
Until (Not (C in WhiteSpace)) or ((C=#10) or (S^.Status=stReadError));
|
C:=#0
|
||||||
If S^.Status=stReadError then
|
else
|
||||||
EoSln:=#0
|
S^.Read(C,1);
|
||||||
else
|
Until (Not (C in WhiteSpace)) or ((C=#10));
|
||||||
EoSln:=C;
|
EoSln:=C;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function ReadString (S: PStream): String;
|
Function ReadString (S: PStream): String;
|
||||||
@ -1222,7 +1223,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 2000-07-13 10:16:22 michael
|
Revision 1.2 2002-02-27 16:35:31 carl
|
||||||
|
* bugfix of stream errors - would always give error!
|
||||||
|
|
||||||
|
Revision 1.1 2000/07/13 10:16:22 michael
|
||||||
+ Initial import
|
+ Initial import
|
||||||
|
|
||||||
Revision 1.8 2000/06/01 10:59:22 peter
|
Revision 1.8 2000/06/01 10:59:22 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user