[flang][runtime] Reset the left tab limit when flushing output
authorPeter Klausler <pklausler@nvidia.com>
Wed, 12 Apr 2023 19:32:37 +0000 (12:32 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Thu, 13 Apr 2023 16:43:40 +0000 (09:43 -0700)
commit52a0b02c25d2c9bff215ad541ed7bd5d8fdecacc
tree9183150cf6fe4b7ecaf2740cf4bec783b7a194f0
parentfc4494dffa5422b2be5442c235554e76bed79c8a
[flang][runtime] Reset the left tab limit when flushing output

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.  Also, detect
newline characters in stream output, and treat them as record
advancement.

Differential Revision: https://reviews.llvm.org/D148157
flang/runtime/emit-encoded.h
flang/runtime/tools.h
flang/runtime/unit.cpp