Browse Source

* CrtOpen, CrtClose, CrtRead, CrtWrite and CrtReturn changed to procedures, instead of functions

git-svn-id: trunk@25506 -
nickysn 12 years ago
parent
commit
96c7a9325a
4 changed files with 20 additions and 40 deletions
  1. 5 10
      rtl/go32v2/crt.pp
  2. 5 10
      rtl/unix/crt.pp
  3. 5 10
      rtl/watcom/crt.pp
  4. 5 10
      rtl/win/crt.pp

+ 5 - 10
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;
 
 

+ 5 - 10
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;
 
 

+ 5 - 10
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;
 
 

+ 5 - 10
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;