1 ------------------------------------------------------------------------------
3 -- GNAT SYSTEM UTILITIES --
11 -- Copyright (C) 1997 Free Software Foundation, Inc. --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
27 ------------------------------------------------------------------------------
29 -- Program to print out listing of System package with all constants
30 -- appearing explicitly.
33 with System; use System;
37 pragma Ident (Gnatvsn.Gnat_Version_String);
39 procedure P (Item : String) renames Ada.Text_IO.Put_Line;
42 P ("package System is");
44 P ("pragma Pure (System);");
48 P (" type Name is (SYSTEM_NAME_GNAT);");
50 P (" System_Name : constant Name := SYSTEM_NAME_GNAT;");
54 P (" -- System-Dependent Named Numbers");
58 P (" Min_Int : constant := -(2 **" &
59 Long_Long_Integer'Image (Long_Long_Integer'Size - 1) & ");");
61 P (" Max_Int : constant := 2 **" &
62 Long_Long_Integer'Image (Long_Long_Integer'Size - 1) & " - 1;");
66 P (" Max_Binary_Modulus : constant := 2 **" &
67 Long_Long_Integer'Image (Long_Long_Integer'Size) & ";");
69 P (" Max_Nonbinary_Modulus : constant :=" &
70 Integer'Image (Integer'Last) & ";");
74 P (" Max_Base_Digits : constant :=" &
75 Natural'Image (Long_Long_Float'Digits) & ";");
77 P (" Max_Digits : constant :=" &
78 Natural'Image (Long_Long_Float'Digits) & ";");
82 P (" Max_Mantissa : constant := 63;");
84 P (" Fine_Delta : constant := 2.0 ** (-Max_Mantissa);");
88 P (" Tick : constant :=" &
89 Duration'Image (Duration (Standard'Tick)) & ";");
93 P (" -- Storage-related Declarations");
97 P (" type Address is private;");
99 P (" Null_Address : constant Address;");
103 P (" Storage_Unit : constant :=" &
104 Natural'Image (Standard'Storage_Unit) & ";");
106 P (" Word_Size : constant :=" &
107 Natural'Image (Standard'Word_Size) & ";");
109 P (" Memory_Size : constant := 2 **" &
110 Natural'Image (Standard'Address_Size) & ";");
113 P (" -- Address comparison");
115 P (" function ""<"" (Left, Right : Address) return Boolean;");
116 P (" function ""<="" (Left, Right : Address) return Boolean;");
117 P (" function "">"" (Left, Right : Address) return Boolean;");
118 P (" function "">="" (Left, Right : Address) return Boolean;");
119 P (" function ""="" (Left, Right : Address) return Boolean;");
121 P (" pragma Import (Intrinsic, ""<""); ");
122 P (" pragma Import (Intrinsic, ""<="");");
123 P (" pragma Import (Intrinsic, "">""); ");
124 P (" pragma Import (Intrinsic, "">="");");
125 P (" pragma Import (Intrinsic, ""=""); ");
127 P (" -- Other System-Dependent Declarations");
129 P (" type Bit_Order is (High_Order_First, Low_Order_First);");
130 P (" Default_Bit_Order : constant Bit_Order;");
132 P (" -- Priority-related Declarations (RM D.1)");
134 P (" subtype Any_Priority is Integer range 0 .." &
135 Natural'Image (Standard'Max_Interrupt_Priority) & ";");
139 P (" subtype Priority is Any_Priority range 0 .." &
140 Natural'Image (Standard'Max_Priority) & ";");
144 P (" subtype Interrupt_Priority is Any_Priority range" &
145 Natural'Image (Standard'Max_Priority + 1) & " .." &
146 Natural'Image (Standard'Max_Interrupt_Priority) & ";");
150 P (" Default_Priority : constant Priority :=" &
151 Natural'Image ((Priority'First + Priority'Last) / 2) & ";");
159 P (" type Address is mod Memory_Size; ");
161 P (" Null_Address : constant Address := 0; ");
165 P (" Default_Bit_Order : constant Bit_Order := " &
166 Bit_Order'Image (Bit_Order'Val (Standard'Default_Bit_Order)) & ";");