Lines Matching +full:cancel +full:- +full:in +full:- +full:progress
1 //===-- runtime/io-stmt.cpp -----------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "io-stmt.h"
11 #include "emit-encoded.h"
118 while (n-- > 0) {
174 if (!this->completedOperation()) {
203 if (!this->completedOperation()) {
232 return child->parent().mutableModes();
247 unit_.EndIoStatement(); // annihilates *this in unit_.u_
251 toClose->Close(CloseStatus::Delete, *this);
252 toClose->DestroyClosed();
259 // and are not tracked in the unit map.
261 unitPtr->~ExternalFileUnit();
298 // F'2023 12.5.6.13 - NEWUNIT= requires either FILE= or STATUS='SCRATCH'
376 // If the last statement was a non-advancing IO input statement, the unit
391 BeginReadingRecord(); // in case there were no I/O items
439 while (n-- > 0) {
491 if (this->completedOperation()) {
495 this->BeginReadingRecord(); // in case there were no I/O items
555 [](auto &x) -> ConnectionState & { return x.get().GetConnectionState(); },
561 [](auto &x) -> MutableModes & { return x.get().mutableModes(); }, u_);
571 [](auto &x) -> IoErrorHandler & {
617 if (!remaining) { // Stream, list-directed, or NAMELIST
620 // list-directed or NAMELIST: check for separators
661 *remaining -= byteCount;
667 --*remaining;
687 // non-advancing WRITE on a stream file prior to
732 formattedIn->GotChar(n);
775 repeatPosition_->Cancel();
783 // N.B. list-directed transfers cannot be nonadvancing (C1221)
798 if (remaining_ > 0 && !realPart_) { // "r*c" repetition in progress
809 remaining_ -= edit.repeat;
817 // Skip separators, handle a "r*c" repeat count; see 13.10.2 in Fortran 2018
829 // in list-directed/NAMELIST complex input.
854 static auto constexpr clamp{(std::numeric_limits<int>::max() - '9') / 10};
859 r = 10 * r + (*ch - '0');
875 remaining_ = r - edit.repeat;
906 this->Crash("ExternalUnformattedIoStatementState::Receive() called for "
909 return this->unit().Receive(data, bytes, elementBytes, *this);
947 child_.EndIoStatement(); // annihilates *this in child_.u_
999 if (!this->completedOperation()) {
1014 return this->child().parent().AdvanceRecord(n);
1016 this->ReportUnsupportedChildIo();
1024 return this->child().parent().Receive(data, bytes, elementBytes);
1026 this->ReportUnsupportedChildIo();
1085 break; // handled in io-api.cpp BeginWait
1181 : unit().isUTF8 ? "UTF-8"
1339 result = -1;
1341 result = -2;
1349 result = -1;
1441 result = -1;
1549 result = -1;
1572 unit_->EndIoStatement();