Browse Source

+ a few helpers for iso pascal compatibility added

git-svn-id: trunk@24246 -
florian 12 years ago
parent
commit
1d6cec856c
1 changed files with 42 additions and 0 deletions
  1. 42 0
      rtl/inc/iso7185.pp

+ 42 - 0
rtl/inc/iso7185.pp

@@ -34,6 +34,14 @@ unit iso7185;
     Function Eoln(Var t: Text): Boolean;
     Function Eoln:Boolean;
 
+    Procedure Page;
+    Procedure Page(Var t: Text);
+
+    Procedure Get(Var t: Text);
+    Procedure Put(Var t: Text);
+
+    Function Eof(var f:TypedFile): Boolean;
+
   implementation
 
   {$i textrec.inc}
@@ -102,6 +110,40 @@ unit iso7185;
         Eoln:=Eoln(Input);
       End;
 
+
+    Procedure Page;
+      begin
+        Page(Output);
+      end;
+
+
+    Procedure Page(var t : Text);
+      Begin
+        write(#12);
+      End;
+
+
+    procedure Get(var t : Text);
+      var
+        c : char;
+      Begin
+        Read(t,c);
+      End;
+
+
+    Procedure Put(var t : Text);
+      begin
+        inc(TextRec(t).BufPos);
+      end;
+
+
+    Function Eof(var f:TypedFile): Boolean;
+      Type
+        UnTypedFile = File;
+      Begin
+        Eof:=System.Eof(UnTypedFile(f));
+      End;
+
 begin
   { we shouldn't do this because it might confuse user programs, but for now it
     is good enough to get pretty unique tmp file names }