mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 02:48:07 +02:00
- Text i/o routines are not expected to return a value.
git-svn-id: trunk@26834 -
This commit is contained in:
parent
ff2b6a90d9
commit
1f22c2de22
@ -426,7 +426,7 @@ var
|
||||
ErrorBuf : array[0..ErrorBufferLength] of char;
|
||||
ErrorLen : SizeInt;
|
||||
|
||||
Function ErrorWrite(Var F: TextRec): Integer;
|
||||
procedure ErrorWrite(Var F: TextRec);
|
||||
{
|
||||
An error message should always end with #13#10#13#10
|
||||
}
|
||||
@ -451,11 +451,10 @@ Begin
|
||||
end;
|
||||
Dec(F.BufPos,i);
|
||||
end;
|
||||
ErrorWrite:=0;
|
||||
End;
|
||||
|
||||
|
||||
Function ErrorClose(Var F: TextRec): Integer;
|
||||
procedure ErrorClose(Var F: TextRec);
|
||||
begin
|
||||
if ErrorLen>0 then
|
||||
begin
|
||||
@ -463,17 +462,15 @@ begin
|
||||
ErrorLen:=0;
|
||||
end;
|
||||
ErrorLen:=0;
|
||||
ErrorClose:=0;
|
||||
end;
|
||||
|
||||
|
||||
Function ErrorOpen(Var F: TextRec): Integer;
|
||||
procedure ErrorOpen(Var F: TextRec);
|
||||
Begin
|
||||
TextRec(F).InOutFunc:=@ErrorWrite;
|
||||
TextRec(F).FlushFunc:=@ErrorWrite;
|
||||
TextRec(F).CloseFunc:=@ErrorClose;
|
||||
ErrorLen:=0;
|
||||
ErrorOpen:=0;
|
||||
End;
|
||||
|
||||
|
||||
|
@ -1640,7 +1640,7 @@ var
|
||||
ErrorBufW : array[0..ErrorBufferLength] of widechar;
|
||||
ErrorLen : longint;
|
||||
|
||||
Function ErrorWrite(Var F: TextRec): Integer;
|
||||
procedure ErrorWrite(Var F: TextRec);
|
||||
{
|
||||
An error message should always end with #13#10#13#10
|
||||
}
|
||||
@ -1666,11 +1666,10 @@ Begin
|
||||
end;
|
||||
Dec(F.BufPos,i);
|
||||
end;
|
||||
ErrorWrite:=0;
|
||||
End;
|
||||
|
||||
|
||||
Function ErrorClose(Var F: TextRec): Integer;
|
||||
procedure ErrorClose(Var F: TextRec);
|
||||
begin
|
||||
if ErrorLen>0 then
|
||||
begin
|
||||
@ -1679,17 +1678,15 @@ begin
|
||||
ErrorLen:=0;
|
||||
end;
|
||||
ErrorLen:=0;
|
||||
ErrorClose:=0;
|
||||
end;
|
||||
|
||||
|
||||
Function ErrorOpen(Var F: TextRec): Integer;
|
||||
procedure ErrorOpen(Var F: TextRec);
|
||||
Begin
|
||||
TextRec(F).InOutFunc:=@ErrorWrite;
|
||||
TextRec(F).FlushFunc:=@ErrorWrite;
|
||||
TextRec(F).CloseFunc:=@ErrorClose;
|
||||
ErrorLen:=0;
|
||||
ErrorOpen:=0;
|
||||
End;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user