raw
ffa_ch4_ffacalc         1 ------------------------------------------------------------------------------
ffa_ch4_ffacalc 2 ------------------------------------------------------------------------------
ffa_ch4_ffacalc 3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
ffa_ch4_ffacalc 4 -- --
ffa_ch4_ffacalc 5 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
ffa_ch4_ffacalc 6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
ffa_ch4_ffacalc 7 -- --
ffa_ch4_ffacalc 8 -- You do not have, nor can you ever acquire the right to use, copy or --
ffa_ch4_ffacalc 9 -- distribute this software ; Should you use this software for any purpose, --
ffa_ch4_ffacalc 10 -- or copy and distribute it to anyone or in any manner, you are breaking --
ffa_ch4_ffacalc 11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
ffa_ch4_ffacalc 12 -- continue doing so for the indefinite future. In any case, please --
ffa_ch4_ffacalc 13 -- always : read and understand any software ; verify any PGP signatures --
ffa_ch4_ffacalc 14 -- that you use - for any purpose. --
ffa_ch4_ffacalc 15 -- --
ffa_ch4_ffacalc 16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
ffa_ch4_ffacalc 17 ------------------------------------------------------------------------------
ffa_ch4_ffacalc 18 ------------------------------------------------------------------------------
ffa_ch4_ffacalc 19
ffa_ch4_ffacalc 20 with Interfaces; use Interfaces;
ffa_ch4_ffacalc 21 with Interfaces.C; use Interfaces.C;
ffa_ch4_ffacalc 22
ffa_ch4_ffacalc 23
ffa_ch4_ffacalc 24 package OS is
ffa_ch4_ffacalc 25
ffa_ch4_ffacalc 26 -- Receive a character from the TTY, and True if success (False if EOF)
ffa_ch4_ffacalc 27 function Read_Char(C : out Character) return Boolean;
ffa_ch4_ffacalc 28
ffa_ch4_ffacalc 29 -- Send a character to the TTY.
ffa_ch4_ffacalc 30 procedure Write_Char(C : in Character);
ffa_ch4_ffacalc 31
ffa_ch4_ffacalc 32 -- Send a Newline to the TTY.
ffa_ch4_ffacalc 33 procedure Write_Newline;
ffa_ch4_ffacalc 34
ffa_ch4_ffacalc 35 -- Exit with an error condition report.
ffa_ch4_ffacalc 36 procedure Eggog(M : String);
ffa_ch4_ffacalc 37
ffa_ch4_ffacalc 38 procedure Quit(Return_Code : Integer);
ffa_ch4_ffacalc 39 pragma Import
ffa_ch4_ffacalc 40 (Convention => C,
ffa_ch4_ffacalc 41 Entity => Quit,
ffa_ch4_ffacalc 42 External_Name => "exit");
ffa_ch4_ffacalc 43
ffa_ch4_ffacalc 44 private
ffa_ch4_ffacalc 45
ffa_ch4_ffacalc 46 -- POSIX stdio:
ffa_ch4_ffacalc 47 EOF : constant int := -1;
ffa_ch4_ffacalc 48
ffa_ch4_ffacalc 49 function GetChar return int;
ffa_ch4_ffacalc 50 pragma Import(C, getchar);
ffa_ch4_ffacalc 51
ffa_ch4_ffacalc 52 function PutChar(item: int) return int;
ffa_ch4_ffacalc 53 pragma Import(C, putchar);
ffa_ch4_ffacalc 54
ffa_ch4_ffacalc 55 -- GNATistic
ffa_ch4_ffacalc 56 procedure To_Stderr(C : Character);
ffa_ch4_ffacalc 57 pragma Import(Ada, To_Stderr, "__gnat_to_stderr_char");
ffa_ch4_ffacalc 58
ffa_ch4_ffacalc 59 Sadness_Code : constant Integer := -1;
ffa_ch4_ffacalc 60
ffa_ch4_ffacalc 61 end OS;