mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 01:26:11 +02:00
* close did not reset the bufpos and bufend fields
led to problems when using the same file several times
This commit is contained in:
parent
4572d22872
commit
2fefd65557
@ -112,10 +112,13 @@ Begin
|
|||||||
FileFunc(TextRec(t).InOutFunc)(TextRec(t));
|
FileFunc(TextRec(t).InOutFunc)(TextRec(t));
|
||||||
TextRec(t).mode:=fmClosed;
|
TextRec(t).mode:=fmClosed;
|
||||||
{ Only close functions not connected to stdout.}
|
{ Only close functions not connected to stdout.}
|
||||||
If ((TextRec(t).Handle<>StdInputHandle) or
|
If ((TextRec(t).Handle<>StdInputHandle) and
|
||||||
(TextRec(t).Handle<>StdOutputHandle) or
|
(TextRec(t).Handle<>StdOutputHandle) and
|
||||||
(TextRec(t).Handle<>StdErrorHandle)) Then
|
(TextRec(t).Handle<>StdErrorHandle)) Then
|
||||||
FileFunc(TextRec(t).CloseFunc)(TextRec(t));
|
FileFunc(TextRec(t).CloseFunc)(TextRec(t));
|
||||||
|
{ this was missing !!! PM }
|
||||||
|
TextRec(t).BufPos:=0;
|
||||||
|
TextRec(t).BufEnd:=0;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
@ -1197,7 +1200,11 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.21 1998-08-17 22:42:17 michael
|
Revision 1.22 1998-08-26 11:23:25 pierre
|
||||||
|
* close did not reset the bufpos and bufend fields
|
||||||
|
led to problems when using the same file several times
|
||||||
|
|
||||||
|
Revision 1.21 1998/08/17 22:42:17 michael
|
||||||
+ Flush on close only for output files cd ../inc
|
+ Flush on close only for output files cd ../inc
|
||||||
|
|
||||||
Revision 1.20 1998/08/11 00:05:28 peter
|
Revision 1.20 1998/08/11 00:05:28 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user