From 96c7a9325a7cd6e81dac29b397f7e0cb6d92140b Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 17 Sep 2013 11:17:29 +0000 Subject: [PATCH] * CrtOpen, CrtClose, CrtRead, CrtWrite and CrtReturn changed to procedures, instead of functions git-svn-id: trunk@25506 - --- rtl/go32v2/crt.pp | 15 +++++---------- rtl/unix/crt.pp | 15 +++++---------- rtl/watcom/crt.pp | 15 +++++---------- rtl/win/crt.pp | 15 +++++---------- 4 files changed, 20 insertions(+), 40 deletions(-) diff --git a/rtl/go32v2/crt.pp b/rtl/go32v2/crt.pp index 2251adb3d0..3398d0c45d 100644 --- a/rtl/go32v2/crt.pp +++ b/rtl/go32v2/crt.pp @@ -591,7 +591,7 @@ begin end; -Function CrtWrite(var f : textrec):integer; +Procedure CrtWrite(var f : textrec); var i : longint; begin @@ -600,11 +600,10 @@ begin WriteChar(f.buffer[i]); SetScreenCursor(CurrX,CurrY); f.bufpos:=0; - CrtWrite:=0; end; -Function CrtRead(Var F: TextRec): Integer; +Procedure CrtRead(Var F: TextRec); procedure BackSpace; begin @@ -690,24 +689,21 @@ Begin until false; f.bufpos:=0; SetScreenCursor(CurrX,CurrY); - CrtRead:=0; End; -Function CrtReturn(Var F: TextRec): Integer; +Procedure CrtReturn(Var F: TextRec); Begin - CrtReturn:=0; end; -Function CrtClose(Var F: TextRec): Integer; +Procedure CrtClose(Var F: TextRec); Begin F.Mode:=fmClosed; - CrtClose:=0; End; -Function CrtOpen(Var F: TextRec): Integer; +Procedure CrtOpen(Var F: TextRec); Begin If F.Mode=fmOutput Then begin @@ -721,7 +717,6 @@ Begin TextRec(F).FlushFunc:=@CrtReturn; end; TextRec(F).CloseFunc:=@CrtClose; - CrtOpen:=0; End; diff --git a/rtl/unix/crt.pp b/rtl/unix/crt.pp index 0310157a40..6e3db27913 100644 --- a/rtl/unix/crt.pp +++ b/rtl/unix/crt.pp @@ -1252,7 +1252,7 @@ begin end; -Function CrtWrite(Var F: TextRec): Integer; +Procedure CrtWrite(Var F: TextRec); { Top level write function for CRT } @@ -1276,11 +1276,10 @@ Begin end; ttySetFlush(oldFLush); - CrtWrite:=0; End; -Function CrtRead(Var F: TextRec): Integer; +Procedure CrtRead(Var F: TextRec); { Read from CRT associated file. } @@ -1340,27 +1339,24 @@ Begin if not(OutputRedir or InputRedir) then CrtWrite(F) else F.BufPos := 0; - CrtRead:=0; End; -Function CrtReturn(Var F:TextRec):Integer; +Procedure CrtReturn(Var F:TextRec); Begin - CrtReturn:=0; end; -Function CrtClose(Var F: TextRec): Integer; +Procedure CrtClose(Var F: TextRec); { Close CRT associated file. } Begin F.Mode:=fmClosed; - CrtClose:=0; End; -Function CrtOpen(Var F: TextRec): Integer; +Procedure CrtOpen(Var F: TextRec); { Open CRT associated file. } @@ -1377,7 +1373,6 @@ Begin TextRec(F).FlushFunc:=@CrtReturn; end; TextRec(F).CloseFunc:=@CrtClose; - CrtOpen:=0; End; diff --git a/rtl/watcom/crt.pp b/rtl/watcom/crt.pp index 5ec122d199..2cb0da934f 100644 --- a/rtl/watcom/crt.pp +++ b/rtl/watcom/crt.pp @@ -580,7 +580,7 @@ begin end; -Function CrtWrite(var f : textrec):integer; +Procedure CrtWrite(var f : textrec); var i : longint; begin @@ -589,11 +589,10 @@ begin WriteChar(f.buffer[i]); SetScreenCursor(CurrX,CurrY); f.bufpos:=0; - CrtWrite:=0; end; -Function CrtRead(Var F: TextRec): Integer; +Procedure CrtRead(Var F: TextRec); procedure BackSpace; begin @@ -676,24 +675,21 @@ Begin until false; f.bufpos:=0; SetScreenCursor(CurrX,CurrY); - CrtRead:=0; End; -Function CrtReturn(Var F: TextRec): Integer; +Procedure CrtReturn(Var F: TextRec); Begin - CrtReturn:=0; end; -Function CrtClose(Var F: TextRec): Integer; +Procedure CrtClose(Var F: TextRec); Begin F.Mode:=fmClosed; - CrtClose:=0; End; -Function CrtOpen(Var F: TextRec): Integer; +Procedure CrtOpen(Var F: TextRec); Begin If F.Mode=fmOutput Then begin @@ -707,7 +703,6 @@ Begin TextRec(F).FlushFunc:=@CrtReturn; end; TextRec(F).CloseFunc:=@CrtClose; - CrtOpen:=0; End; diff --git a/rtl/win/crt.pp b/rtl/win/crt.pp index 824b31e44f..c0452a3a56 100644 --- a/rtl/win/crt.pp +++ b/rtl/win/crt.pp @@ -689,7 +689,7 @@ begin end; -Function CrtWrite(var f : textrec) : integer; +Procedure CrtWrite(var f : textrec); var i : longint; s : string; @@ -726,10 +726,9 @@ begin SetConsoleOutputCP(OldConsoleOutputCP); f.bufpos:=0; - CrtWrite:=0; end; -Function CrtRead(Var F: TextRec): Integer; +Procedure CrtRead(Var F: TextRec); procedure BackSpace; begin @@ -830,24 +829,21 @@ Begin f.bufpos:=0; SetScreenCursor(CurrX, CurrY); - CrtRead:=0; End; -Function CrtReturn(Var F:TextRec):Integer; +Procedure CrtReturn(Var F:TextRec); Begin - CrtReturn:=0; end; -Function CrtClose(Var F: TextRec): Integer; +Procedure CrtClose(Var F: TextRec); Begin F.Mode:=fmClosed; - CrtClose:=0; End; -Function CrtOpen(Var F: TextRec): Integer; +Procedure CrtOpen(Var F: TextRec); Begin If F.Mode=fmOutput Then begin TextRec(F).InOutFunc:=@CrtWrite; @@ -858,7 +854,6 @@ Begin TextRec(F).FlushFunc:=@CrtReturn; end; TextRec(F).CloseFunc:=@CrtClose; - CrtOpen:=0; End;