|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 3994 (0xf9a) Types: TextFile Names: »B«
└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2 └─ ⟦77aa8350c⟧ »DATA« └─⟦f794ecd1d⟧ └─⟦24d1ddd49⟧ └─⟦this⟧
-- The use of this system is subject to the software license terms and -- conditions agreed upon between Rational and the Customer. -- -- Copyright 1988 by Rational. -- -- RESTRICTED RIGHTS LEGEND -- -- Use, duplication, or disclosure by the Government is subject to -- restrictions as set forth in subdivision (b)(3)(ii) of the Rights in -- Technical Data and Computer Software clause at 52.227-7013. -- -- -- Rational -- 3320 Scott Boulevard -- Santa Clara, California 95054-3197 -- -- PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL; -- USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION -- IS STRICTLY PROHIBITED. THIS MATERIAL IS PROTECTED AS -- AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF -- 1976. CREATED 1988. ALL RIGHTS RESERVED. -- -- package body Enum_Rep_Attr is pragma Suppress (Index_Check); pragma Suppress (Range_Check); pragma Suppress (Access_Check); pragma Suppress (Storage_Check); function Lookup (Table : Attribute_Definitions.Enum_Rep_Table; Value : Integer) return Integer is pragma Routine_Number (Runtime_Ids.Internal); Binary_Lookup_Threshold : constant := 14; function Linear_Lookup return Integer is pragma Routine_Number (Runtime_Ids.Internal); begin for I in 0 .. Table.N_Items loop if Value = Table.Value (I) then return I; end if; end loop; return -1; end Linear_Lookup; -- Ordering of the Enum_Rep_Table is guaranteed by Ada semantics. function Binary_Lookup return Integer is pragma Routine_Number (Runtime_Ids.Internal); Low : Integer := 0; Mid : Integer; High : Integer := Table.N_Items; begin while Low <= High loop Mid := (Low + High) / 2; if Value = Table.Value (Mid) then return Mid; elsif Value > Table.Value (Mid) then Low := Mid + 1; else High := Mid - 1; end if; end loop; return -1; end Binary_Lookup; -- pragma Inline (Linear_Lookup, Binary_Lookup); begin if Table.N_Items < Binary_Lookup_Threshold then return Linear_Lookup; else return Binary_Lookup; end if; end Lookup; function Enum_Succ (Table : Attribute_Definitions.Enum_Rep_Table; Value : Integer) return Integer is pragma Routine_Number (Runtime_Ids.Enum_Succ); Pos : constant Integer := Lookup (Table, Value); begin if Pos < 0 or Pos = Table.N_Items then raise Constraint_Error; else return Table.Value (Pos + 1); end if; end Enum_Succ; function Enum_Pred (Table : Attribute_Definitions.Enum_Rep_Table; Value : Integer) return Integer is pragma Routine_Number (Runtime_Ids.Enum_Pred); Pos : constant Integer := Lookup (Table, Value); begin if Pos < 1 then raise Constraint_Error; else return Table.Value (Pos - 1); end if; end Enum_Pred; function Enum_Pos (Table : Attribute_Definitions.Enum_Rep_Table; Value : Integer) return Natural is pragma Routine_Number (Runtime_Ids.Enum_Pos); I : constant Integer := Lookup (Table, Value); begin if I >= 0 then return I; else raise Constraint_Error; end if; end Enum_Pos; end Enum_Rep_Attr; pragma Export_Elaboration_Procedure ("__ENUM_REP_ATTR_SPEC_ELAB"); pragma Runtime_Unit (Unit_Number => Runtime_Ids.Runtime_Compunit, Elab_Routine_Number => Runtime_Ids.Internal);