text
stringlengths
0
234
Runtime_Initialize (1);
Finalize_Library_Objects := finalize_library'access;
System.Soft_Links'Elab_Spec;
System.Exception_Table'Elab_Body;
E25 := E25 + 1;
System.Exceptions'Elab_Spec;
E27 := E27 + 1;
System.Soft_Links.Initialize'Elab_Body;
E21 := E21 + 1;
E13 := E13 + 1;
Ada.Io_Exceptions'Elab_Spec;
E68 := E68 + 1;
System.Os_Lib'Elab_Body;
E78 := E78 + 1;
Ada.Tags'Elab_Spec;
Ada.Tags'Elab_Body;
E06 := E06 + 1;
Ada.Streams'Elab_Spec;
E67 := E67 + 1;
System.File_Control_Block'Elab_Spec;
E81 := E81 + 1;
System.Finalization_Root'Elab_Spec;
E76 := E76 + 1;
Ada.Finalization'Elab_Spec;
E74 := E74 + 1;
System.File_Io'Elab_Body;
E73 := E73 + 1;
Ada.Text_Io'Elab_Spec;
Ada.Text_Io'Elab_Body;
E65 := E65 + 1;
Rasp_Code'Elab_Spec;
E83 := E83 + 1;
end adainit;
procedure Ada_Main_Program;
pragma Import (Ada, Ada_Main_Program, "_ada_main");
function main
(argc : Integer;
argv : System.Address;
envp : System.Address)
return Integer
is
procedure Initialize (Addr : System.Address);
pragma Import (C, Initialize, "__gnat_initialize");
procedure Finalize;
pragma Import (C, Finalize, "__gnat_finalize");
SEH : aliased array (1 .. 2) of Integer;
Ensure_Reference : aliased System.Address := Ada_Main_Program_Name'Address;
pragma Volatile (Ensure_Reference);
begin
gnat_argc := argc;
gnat_argv := argv;
gnat_envp := envp;
Initialize (SEH'Address);
adainit;
Ada_Main_Program;
adafinal;
Finalize;
return (gnat_exit_status);
Function Definition: procedure computus_test is
Function Body: NL : constant String := CR & LF ;
Prompter : constant String := "Type command and figure, or H for Help:";
Help_text : constant String :=
"This line mode program challenges the Milesian Easter computation method"
& NL & "with standard Meeus methods." & NL &
"Copyright Louis-A. de Fouquieres, Miletus, 2015-2017." & NL &
"More at www.calendriermilesien.org." & NL &
"Syntax: <Command> <End year>." & NL &
"<Command> is one character as described hereunder." & NL &
"<End year> is an integer, the final year for the test." & NL &
"Tests begin with year 0 for both Julian and Gregorian algorithms, " & NL &
"although there is no historical sense" & NL &
"before around 525 (julian) or 1583 (gregorian)." & NL &
"Result of Eater computation is Easter day rank, i.e. " & NL &
"number of days after March 21st when Easter Sunday occurs." & NL &
"Available commands:" & NL &
"S: Silent mode (by default), list discrepancies only." & NL &
"V: Verbose mode, report year per year results." & NL &
"J <End year>: test Julian calendar computus from 0 to <End year>." & NL &
"G <End year: test Gregorian computus from 0 to <End year>." & NL &
"H: Help, display this text." & NL &
"X: Exit program.";
Command : Character := ' ';
Verbose : Boolean := False;
Level, D1, D2 : Natural := 0;
Help_request, Command_error : exception;
begin