Browse Source

+ ISO mode: accept put/get without parameter, works on Input/Output respectively, resolves #37949

git-svn-id: trunk@47147 -
florian 4 years ago
parent
commit
4afa4a73c6
3 changed files with 27 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 20 0
      rtl/inc/iso7185.pp
  3. 6 0
      tests/webtbs/tw37949.pp

+ 1 - 0
.gitattributes

@@ -18495,6 +18495,7 @@ tests/webtbs/tw37823.pp svneol=native#text/pascal
 tests/webtbs/tw37844.pp svneol=native#text/pascal
 tests/webtbs/tw37878.pp svneol=native#text/plain
 tests/webtbs/tw37926.pp svneol=native#text/pascal
+tests/webtbs/tw37949.pp svneol=native#text/pascal
 tests/webtbs/tw3796.pp svneol=native#text/plain
 tests/webtbs/tw3805.pp svneol=native#text/plain
 tests/webtbs/tw3814.pp svneol=native#text/plain

+ 20 - 0
rtl/inc/iso7185.pp

@@ -44,6 +44,8 @@ unit iso7185;
 
     Procedure Get(Var t: Text);
     Procedure Put(Var t: Text);
+    procedure Get;
+    Procedure Put;
 
     Procedure Get(Var f: TypedFile);
     Procedure Put(Var f: TypedFile);
@@ -204,6 +206,24 @@ unit iso7185;
       end;
 
 
+    procedure Get;[IOCheck];
+      var
+        c : char;
+      Begin
+        Read(input,c);
+      End;
+
+
+    Procedure Put;[IOCheck];
+      type
+        FileFunc = Procedure(var t : TextRec);
+      begin
+        inc(TextRec(Output).BufPos);
+        If TextRec(Output).BufPos>=TextRec(Output).BufSize Then
+          FileFunc(TextRec(Output).InOutFunc)(TextRec(Output));
+      end;
+
+
     procedure Get(var f:TypedFile);[IOCheck];
       Begin
         if not(system.eof(f)) then

+ 6 - 0
tests/webtbs/tw37949.pp

@@ -0,0 +1,6 @@
+{$MODE ISO}
+program p(input, output);
+begin
+  get;
+  put
+end.