-
+ A07E5C21C783DA495725BD3FFDBF6903B9B309CA4B13D31675B11C22359EE2C9D1DB6A9690109075030A02779EB3EBD9D4C9E4F69354651C0C097F11BD5C38BDffa/ffacalc/os.ads(0 . 0)(1 . 61)
904 ------------------------------------------------------------------------------
905 ------------------------------------------------------------------------------
906 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
907 -- --
908 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
909 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
910 -- --
911 -- You do not have, nor can you ever acquire the right to use, copy or --
912 -- distribute this software ; Should you use this software for any purpose, --
913 -- or copy and distribute it to anyone or in any manner, you are breaking --
914 -- the laws of whatever soi-disant jurisdiction, and you promise to --
915 -- continue doing so for the indefinite future. In any case, please --
916 -- always : read and understand any software ; verify any PGP signatures --
917 -- that you use - for any purpose. --
918 -- --
919 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
920 ------------------------------------------------------------------------------
921 ------------------------------------------------------------------------------
922
923 with Interfaces; use Interfaces;
924 with Interfaces.C; use Interfaces.C;
925
926
927 package OS is
928
929 -- Receive a character from the TTY, and True if success (False if EOF)
930 function Read_Char(C : out Character) return Boolean;
931
932 -- Send a character to the TTY.
933 procedure Write_Char(C : in Character);
934
935 -- Send a Newline to the TTY.
936 procedure Write_Newline;
937
938 -- Exit with an error condition report.
939 procedure Eggog(M : String);
940
941 procedure Quit(Return_Code : Integer);
942 pragma Import
943 (Convention => C,
944 Entity => Quit,
945 External_Name => "exit");
946
947 private
948
949 -- POSIX stdio:
950 EOF : constant int := -1;
951
952 function GetChar return int;
953 pragma Import(C, getchar);
954
955 function PutChar(item: int) return int;
956 pragma Import(C, putchar);
957
958 -- GNATistic
959 procedure To_Stderr(C : Character);
960 pragma Import(Ada, To_Stderr, "__gnat_to_stderr_char");
961
962 Sadness_Code : constant Integer := -1;
963
964 end OS;