11#ifndef FORTRAN_RUNTIME_IO_INTERNAL_UNIT_H_
12#define FORTRAN_RUNTIME_IO_INTERNAL_UNIT_H_
14#include "connection.h"
15#include "flang/Runtime/descriptor.h"
19namespace Fortran::runtime::io {
28 std::conditional_t<DIR == Direction::Input, const char *, char *>;
32 RT_API_ATTRS
bool Emit(
const char *, std::size_t,
IoErrorHandler &);
33 RT_API_ATTRS std::size_t GetNextInputBytes(
const char *&,
IoErrorHandler &);
34 RT_API_ATTRS std::size_t ViewBytesInRecord(
const char *&,
bool forward)
const;
37 RT_API_ATTRS std::int64_t InquirePos();
41 return staticDescriptor_.descriptor();
43 RT_API_ATTRS
const Descriptor &descriptor()
const {
44 return staticDescriptor_.descriptor();
46 RT_API_ATTRS Scalar CurrentRecord()
const {
47 return descriptor().template ZeroBasedIndexedElement<char>(
48 currentRecordNumber - 1);
50 RT_API_ATTRS
void BlankFill(
char *, std::size_t);
51 RT_API_ATTRS
void BlankFillOutputRecord();
Definition: descriptor.h:138
Definition: descriptor.h:447
Definition: terminator.h:23
Definition: internal-unit.h:25
Definition: io-error.h:26
Definition: connection.h:47