• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- runtime/edit-input.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef FORTRAN_RUNTIME_EDIT_INPUT_H_
10 #define FORTRAN_RUNTIME_EDIT_INPUT_H_
11 
12 #include "format.h"
13 #include "io-stmt.h"
14 #include "flang/Decimal/decimal.h"
15 
16 namespace Fortran::runtime::io {
17 
18 bool EditIntegerInput(IoStatementState &, const DataEdit &, void *, int kind);
19 
20 template <int KIND>
21 bool EditRealInput(IoStatementState &, const DataEdit &, void *);
22 
23 bool EditLogicalInput(IoStatementState &, const DataEdit &, bool &);
24 bool EditDefaultCharacterInput(
25     IoStatementState &, const DataEdit &, char *, std::size_t);
26 
27 extern template bool EditRealInput<2>(
28     IoStatementState &, const DataEdit &, void *);
29 extern template bool EditRealInput<3>(
30     IoStatementState &, const DataEdit &, void *);
31 extern template bool EditRealInput<4>(
32     IoStatementState &, const DataEdit &, void *);
33 extern template bool EditRealInput<8>(
34     IoStatementState &, const DataEdit &, void *);
35 extern template bool EditRealInput<10>(
36     IoStatementState &, const DataEdit &, void *);
37 // TODO: double/double
38 extern template bool EditRealInput<16>(
39     IoStatementState &, const DataEdit &, void *);
40 } // namespace Fortran::runtime::io
41 #endif // FORTRAN_RUNTIME_EDIT_INPUT_H_
42