File : s-textio-pikeos.adb
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- S Y S T E M . T E X T _ I O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 2012-2015, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- --
19 -- --
20 -- --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- Minimal version of Text_IO body for use on PikeOS
33
34 package body System.Text_IO is
35
36 ---------
37 -- Get --
38 ---------
39
40 function Get return Character is
41 begin
42 -- XtratuM no longer supports reading from the console
43
44 raise Program_Error;
45 return ASCII.NUL;
46 end Get;
47
48 ----------------
49 -- Initialize --
50 ----------------
51
52 procedure Initialize is
53 begin
54 Initialized := True;
55 end Initialize;
56
57 -----------------
58 -- Is_Rx_Ready --
59 -----------------
60
61 function Is_Rx_Ready return Boolean is
62 begin
63 return False;
64 end Is_Rx_Ready;
65
66 -----------------
67 -- Is_Tx_Ready --
68 -----------------
69
70 function Is_Tx_Ready return Boolean is
71 begin
72 return True;
73 end Is_Tx_Ready;
74
75 ---------
76 -- Put --
77 ---------
78
79 procedure Put (C : Character) is
80 Str : String (1 .. 2) := C & ASCII.NUL;
81 procedure C_Puts (Str : System.Address);
82 pragma Import (C, C_Puts, "vm_cputs");
83 begin
84 C_Puts (Str'Address);
85 end Put;
86
87 ----------------------------
88 -- Use_Cr_Lf_For_New_Line --
89 ----------------------------
90
91 function Use_Cr_Lf_For_New_Line return Boolean is
92 begin
93 return False;
94 end Use_Cr_Lf_For_New_Line;
95
96 end System.Text_IO;