-
Notifications
You must be signed in to change notification settings - Fork 5
/
stdio.adb
28 lines (25 loc) · 841 Bytes
/
stdio.adb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- Copyright (C) 2019-2020 Dmitry Petukhov https://github.com/dgpv
--
-- This file is part of spark-bitcoin-transaction-example
--
-- It is subject to the license terms in the LICENSE file found in the top-level
-- directory of this distribution.
--
-- No part of spark-bitcoin-transaction-example, including this file, may be copied, modified,
-- propagated, or distributed except according to the terms contained in the
-- LICENSE file.
package body Stdio is
package body Char_Readers is
procedure Read_Char(Char: out Character; Has_Read: out Boolean) is
begin
begin
Ada.Text_IO.Get(Char);
Has_Read := True;
exception
when Ada.Text_IO.End_Error =>
Char := Character'Val(0);
Has_Read := False;
end;
end;
end Char_Readers;
end Stdio;