ConnectionState &ExternalIoStatementBase::GetConnectionState() { return unit_; }
-void ExternalIoStatementBase::CompleteOperation() {
- if (!completedOperation()) {
- if (mutableModes().nonAdvancing) {
- unit_.leftTabLimit = unit_.furthestPositionInRecord;
- } else {
- unit_.leftTabLimit.reset();
- }
- IoStatementBase::CompleteOperation();
- }
-}
-
int ExternalIoStatementBase::EndIoStatement() {
CompleteOperation();
auto result{IoStatementBase::EndIoStatement()};
FinishReadingRecord();
}
} else {
- if (!mutableModes().nonAdvancing) {
+ if (mutableModes().nonAdvancing) {
+ unit().leftTabLimit = unit().furthestPositionInRecord;
+ } else {
+ unit().leftTabLimit.reset();
unit().AdvanceRecord(*this);
}
unit().FlushIfTerminal(*this);
}
- return ExternalIoStatementBase::CompleteOperation();
+ return IoStatementBase::CompleteOperation();
}
template <Direction DIR> int ExternalIoStatementState<DIR>::EndIoStatement() {
ext.Rewind(*this);
break;
}
- return ExternalIoStatementBase::CompleteOperation();
+ return IoStatementBase::CompleteOperation();
}
int ExternalMiscIoStatementState::EndIoStatement() {
ExternalFileUnit &unit() { return unit_; }
MutableModes &mutableModes();
ConnectionState &GetConnectionState();
- void CompleteOperation();
int EndIoStatement();
ExternalFileUnit *GetExternalFileUnit() const { return &unit_; }
return false;
}
-void ExternalFileUnit::SetLeftTabLimit() {
- leftTabLimit = furthestPositionInRecord;
- positionInRecord = furthestPositionInRecord;
-}
-
bool ExternalFileUnit::BeginReadingRecord(IoErrorHandler &handler) {
RUNTIME_CHECK(handler, direction_ == Direction::Input);
if (!beganReadingRecord_) {
const char *, std::size_t, std::size_t elementBytes, IoErrorHandler &);
bool Receive(char *, std::size_t, std::size_t elementBytes, IoErrorHandler &);
std::size_t GetNextInputBytes(const char *&, IoErrorHandler &);
- void SetLeftTabLimit();
bool BeginReadingRecord(IoErrorHandler &);
void FinishReadingRecord(IoErrorHandler &);
bool AdvanceRecord(IoErrorHandler &);