[flang-commits] [PATCH] D148157: [flang][runtime] Reset the left tab limit when flushing output

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Apr 12 12:43:02 PDT 2023


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

When flushing output to a non-positionable tty or socket file, reset the  
left tab limit.  Otherwise, non-advancing output to that file will contain
an increasing amount of leading spaces in each flush.


https://reviews.llvm.org/D148157

Files:
  flang/runtime/unit.cpp


Index: flang/runtime/unit.cpp
===================================================================
--- flang/runtime/unit.cpp
+++ flang/runtime/unit.cpp
@@ -621,6 +621,7 @@
       // needs to advance frameOffsetInFile_ to prevent attempts at
       // impossible seeks
       CommitWrites();
+      leftTabLimit.reset();
     }
   }
   Flush(handler);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148157.512942.patch
Type: text/x-patch
Size: 351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230412/f09a08cc/attachment.bin>


More information about the flang-commits mailing list