repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
annexi-strayline/AURA
Ada
25,208
adb
------------------------------------------------------------------------------ -- -- -- Ada User Repository Annex (AURA) -- -- ANNEXI-STRAYLINE Reference Implementation -- -- -- -- Core -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Copyright (C) 2020-2022, ANNEXI-STRAYLINE Trans-Human Ltd. -- -- All rights reserved. -- -- -- -- Original Contributors: -- -- * Richard Wai (ANNEXI-STRAYLINE) -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- -- -- * Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -- -- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Ada.Assertions; with Ada.Strings.Unbounded; with Ada.Unchecked_Deallocation; with Ada.Containers.Hashed_Sets; with Ada.Containers.Synchronized_Queue_Interfaces; with Ada.Containers.Unbounded_Synchronized_Queues; with Registrar.Queries; with Registrar.Registry; with Registrar.Subsystems; with Registrar.Library_Units; with Registrar.Registration.Unchecked_Deregister_Unit; with Unit_Names, Unit_Names.Hash, Unit_Names.Sets; with Workers, Workers.Reporting; package body Registrar.Dependency_Processing is use type Unit_Names.Unit_Name; New_Line: Character renames Workers.Reporting.New_Line; -- -- Common infrastructure -- package UNQI is new Ada.Containers.Synchronized_Queue_Interfaces (Unit_Names.Unit_Name); package Name_Queues is new Ada.Containers.Unbounded_Synchronized_Queues (UNQI); type Name_Queue_Access is access Name_Queues.Queue; type Reverse_Dependency_Queue is record Map_Key : Unit_Names.Unit_Name; Name_Queue: Name_Queue_Access := null; end record; function Key_Hash (RDQ: Reverse_Dependency_Queue) return Ada.Containers.Hash_Type is (Unit_Names.Hash (RDQ.Map_Key)); function Equivalent_Queues (Left, Right: Reverse_Dependency_Queue) return Boolean is (Left.Map_Key = Right.Map_Key); package Map_Queue_Sets is new Ada.Containers.Hashed_Sets (Element_Type => Reverse_Dependency_Queue, Hash => Key_Hash, Equivalent_Elements => Equivalent_Queues); type Map_Queue_Set_Access is access Map_Queue_Sets.Set; -- -- Work Orders Declarations -- ----------------------------- -- Phase 1: Merge Subunits -- ----------------------------- -- This phase is a bit of a "fake" one. It wouldn't be terribly efficient to -- parallelize this operation since the operations between each manipulation -- of the map are generally insignficant. The contention and scheduling -- overhead would likely far outstrip the performance gains of parallelizing -- it. type Merge_Subunits_Order is new Workers.Work_Order with record All_Units : Library_Units.Library_Unit_Sets.Set; All_Subsys: Subsystems.Subsystem_Sets.Set; end record; overriding function Image (Order: Merge_Subunits_Order) return String; overriding procedure Execute (Order: in out Merge_Subunits_Order); ---------------------- -- Phase 2: Fan-out -- ---------------------- type Fan_Out_Order is new Workers.Work_Order with record Target: Unit_Names.Unit_Name; -- The unit that needs to be fanned-out Unit_Map_Queues : Map_Queue_Set_Access; Subsys_Map_Queues: Map_Queue_Set_Access; -- Target deposits it's own name into the queue for each -- of its dependencies (unit and subsystem) end record; overriding function Image (Order: Fan_Out_Order) return String; overriding procedure Execute (Order: in out Fan_Out_Order); overriding procedure Phase_Trigger (Order: in out Fan_Out_Order); ---------------------------- -- Phase 3: Build Reverse -- ---------------------------- type Map_Domain is (Library_Units_Domain, Subsystems_Domain); -- Used to select which map is having its reverse dependency set -- build for -- Library_Units or Subsystems type Build_Reverse_Order is new Workers.Work_Order with record Domain : Map_Domain; Queue_Cursor: Map_Queue_Sets.Cursor; -- The queue that should be used to build a reverse-dependency -- map for the unit/subsystem that "owns" the queue Unit_Map_Queues : Map_Queue_Set_Access; Subsys_Map_Queues: Map_Queue_Set_Access; -- Both queues need to be referenced from all orders (hence not -- discriminated), since the Phase_Trigger needs to deallocate -- all end record; overriding function Image (Order: Build_Reverse_Order) return String; overriding procedure Execute (Order: in out Build_Reverse_Order); overriding procedure Phase_Trigger (Order: in out Build_Reverse_Order); -- -- Work Order Implementations -- -------------------------- -- Merge_Subunits_Order -- -------------------------- -- Image -- ----------- function Image (Order: Merge_Subunits_Order) return String is ("[Merge_Subunits_Order] (Registrar.Dependency_Processing)"); -- Execute -- ------------- -- After doing our main job of merging subunit dependencies up to the -- parent, we also need to set-up the reverse depependency queues, -- and then dispatch Fan-Out orders (Phase 2) -- procedure Execute (Order: in out Merge_Subunits_Order) is use Subsystems; use Library_Units; use type Ada.Containers.Count_Type; Move_Set: Unit_Names.Sets.Set; Fan_Out: Fan_Out_Order; procedure Set_Extraction (Mod_Set: in out Unit_Names.Sets.Set) is begin Move_Set := Mod_Set; Mod_Set := Unit_Names.Sets.Empty_Set; end Set_Extraction; procedure Merge_Extraction (Merge_Set: in out Unit_Names.Sets.Set) is begin Merge_Set.Union (Move_set); end Merge_Extraction; begin Fan_Out.Tracker := Fan_Out_Progress'Access; Fan_Out.Unit_Map_Queues := new Map_Queue_Sets.Set; Fan_Out.Subsys_Map_Queues := new Map_Queue_Sets.Set; begin -- Note that since Merge_Subunits_Order's don't have trackers assigned -- due to the more hands-on relationship this operation has with -- multiple trackers, we need to ensure we don't propegate any -- exception to the worker without properly aborting things on the -- Merge_Subunits_Progress tracker where appropriate. -- -- If we don't do this, the main application will hang. -- -- To avoid an overly complicated implementation for what is most -- likely a very edge case, we take a full abort appoach where we just -- mark all remaining subunits as "failed" and kill the job. for Unit of Order.All_Units loop if Unit.State = Requested then -- For Requested units - if we have them here it means none of -- the subsystems that were supposed to contain them actually -- do, or the entire subsystem could not be aquired. -- -- We still want to compute the dependency maps so that we can -- give the user a picture of where the missing units were being -- withed from (similarily for subystems). -- -- For those units, we need to add an empty set to the forward -- dependency map so that we don't need to check for No_Element -- cursors everywhere else. This makes particular sense -- considering this work order is single issue (not parallel), -- so there will be no contention on the dependency maps -- anyways. declare Inserted: Boolean; begin Registry.Unit_Forward_Dependencies.Insert (Key => Unit.Name, New_Item => Unit_Names.Sets.Empty_Set, Inserted => Inserted); pragma Assert (Inserted); end; -- Subunits can't be requested! Every time a dependency request -- is processed by the registrar, it is entered as a library -- unit. I.e. a subsystem unit can only get into the registry by -- being entered, and therefore can't have a state of Requested. pragma Assert (Unit.Kind /= Subunit); end if; if Unit.Kind = Subunit then -- Merge Subunit forward dependencies up to the fist non-subunit -- parent. If this subunit is orphaned (no non-subunit parent), -- Trace_Subunit_Parent will raise a specific exception -- identifying the orphaned subunit. -- Take the forward dependency set from the subunit Registry.Unit_Forward_Dependencies.Modify (Key => Unit.Name, Process => Set_Extraction'Access); -- And migrate to its parent. This will keep happening until -- it reaches a unit that is not a subunit Registry.Unit_Forward_Dependencies.Modify (Key => Registrar.Queries.Trace_Subunit_Parent(Unit).Name, Process => Merge_Extraction'Access); else -- A normal unit, which actually needs to be processesed. We -- want each dependency of this unit to have this unit -- registered as a reverse dependency for that dependent unit -- (this is what the Fan_Out order accomplishes). Fan_Out.Unit_Map_Queues.Insert (Reverse_Dependency_Queue' (Map_Key => Unit.Name, Name_Queue => new Name_Queues.Queue)); end if; Merge_Subunits_Progress.Increment_Completed_Items; end loop; exception when others => Merge_Subunits_Progress.Fail_All_Remaining; raise; end; -- We set the Fan_Out progress tracker now, before we do the subsystems -- so that they are set before we cause the Merge_Subunits tracker to -- complete (we know there must be subsystems if there are units!). -- The number of Fan_Out orders is not dependent on the number of -- subsystems, since the subsystem dependencies are registered -- during the normal course of Fan_Out. Since all units have a subsystem, -- we can be sure all subsystem dependencies will be computed Fan_Out_Progress.Increase_Total_Items_By (Natural (Fan_Out.Unit_Map_Queues.Length)); for Subsys of Order.All_Subsys loop -- We don't really care what the state of the subsystem is, we just -- want to ensure that we have a queue for each subsystem we know -- about, so that the fan-out process can register subsystem -- dependencies declare Inserted: Boolean; begin Registry.Subsystem_Forward_Dependencies.Insert (Key => Subsys.Name, New_Item => Unit_Names.Sets.Empty_Set, Inserted => Inserted); pragma Assert (Inserted); end; Fan_Out.Subsys_Map_Queues.Insert (Reverse_Dependency_Queue'(Map_Key => Subsys.Name, Name_Queue => new Name_Queues.Queue)); Merge_Subunits_Progress.Increment_Completed_Items; end loop; -- Launch the fan-out phase. We only need to launch an order per -- unit (not subsystem), since each unit dependency will the related -- subsystem dependency to the relevent subsystem map queue. for Queue of Fan_Out.Unit_Map_Queues.all loop Fan_Out.Target := Queue.Map_Key; Workers.Enqueue_Order (Fan_Out); end loop; end Execute; ------------------- -- Fan_Out_Order -- ------------------- -- Image -- ----------- function Image (Order: Fan_Out_Order) return String is ( "[Fan_Out_Order] (Registrar.Dependency_Processing)" & New_Line & " Target Unit: " & Order.Target.To_UTF8_String); -- Execute -- ------------- procedure Execute (Order: in out Fan_Out_Order) is use type Map_Queue_Sets.Cursor; use type Library_Units.Library_Unit_Kind; Dependencies: constant Unit_Names.Sets.Set := Registry.Unit_Forward_Dependencies.Extract_Element (Order.Target); Subsys_Dependencies: Unit_Names.Sets.Set; -- We will also build the subsystem forward dependencies for the unit's -- subsystem as we go here (which will then be reversed in the -- Build Reverse phase Target_SS: constant Unit_Names.Unit_Name := Order.Target.Subsystem_Name; Unit_Map_Queues : Map_Queue_Sets.Set renames Order.Unit_Map_Queues.all; Subsys_Map_Queues: Map_Queue_Sets.Set renames Order.Subsys_Map_Queues.all; Unit_Lookup, Subsys_Lookup: Reverse_Dependency_Queue; Unit_Cursor, Subsys_Cursor: Map_Queue_Sets.Cursor; procedure Union_Subsys_Dependencies (Existing_Set: in out Unit_Names.Sets.Set) is begin Existing_Set.Union (Subsys_Dependencies); end Union_Subsys_Dependencies; begin -- Go through our (Order.Target's) dependencies and put our name on the -- reverse dependency queue for that unit. for Name of Dependencies loop -- Add the name of our target unit, and our subsystem -- to the queue of each of our dependencies Unit_Lookup.Map_Key := Name; Subsys_Lookup.Map_Key := Name.Subsystem_Name; Subsys_Dependencies.Include (Subsys_Lookup.Map_Key); Unit_Cursor := Order.Unit_Map_Queues.Find (Unit_Lookup); Subsys_Cursor := Order.Subsys_Map_Queues.Find (Subsys_Lookup); Unit_Map_Queues(Unit_Cursor).Name_Queue.Enqueue (Order.Target); Subsys_Map_Queues(Subsys_Cursor).Name_Queue.Enqueue (Target_SS); end loop; -- Add a link back to our parent, except for External_Units, but -- including requested units if Registrar.Queries.Lookup_Unit(Order.Target).Kind /= Library_Units.External_Unit then Unit_Lookup.Map_Key := Order.Target.Parent_Name; if not Unit_Lookup.Map_Key.Empty then Unit_Cursor := Unit_Map_Queues.Find (Unit_Lookup); Unit_Map_Queues(Unit_Cursor).Name_Queue.Enqueue (Order.Target); end if; end if; -- Register the subsystem forward dependencies. We know that the Key -- exists because we added an empty set for each registered Subsystem Registry.Subsystem_Forward_Dependencies.Modify (Key => Target_SS, Process => Union_Subsys_Dependencies'Access); end Execute; -- Phase_Trigger -- ------------------- procedure Phase_Trigger (Order: in out Fan_Out_Order) is New_Order: Build_Reverse_Order := (Tracker => Build_Reverse_Progress'Access, Domain => Library_Units_Domain, Unit_Map_Queues => Order.Unit_Map_Queues, Subsys_Map_Queues => Order.Subsys_Map_Queues, others => <>); use type Ada.Containers.Count_Type; begin Build_Reverse_Progress.Increase_Total_Items_By (Natural (Order.Unit_Map_Queues.Length + Order.Subsys_Map_Queues.Length)); for Unit_Cursor in Order.Unit_Map_Queues.Iterate loop New_Order.Queue_Cursor := Unit_Cursor; Workers.Enqueue_Order (New_Order); end loop; New_Order.Domain := Subsystems_Domain; for Subsys_Cursor in Order.Subsys_Map_Queues.Iterate loop New_Order.Queue_Cursor := Subsys_Cursor; Workers.Enqueue_Order (New_Order); end loop; end Phase_Trigger; ------------------------- -- Build_Reverse_Order -- ------------------------- -- Image -- ----------- function Image (Order: Build_Reverse_Order) return String is ( "[Build_Reverse_Order] (Registrar.Dependency_Processing)" & New_Line & (if Map_Queue_Sets."=" (Order.Queue_Cursor, Map_Queue_Sets.No_Element) then " ** Phase Trigger **" -- If something goes wrong in the phase trigger, either -- of the queues might be already deallocated, which would -- make the "else" portion very erronious to execute else " Domain: " & Map_Domain'Image (Order.Domain) & New_Line & (case Order.Domain is when Library_Units_Domain => "Unit Queue: " & Order.Unit_Map_Queues.all (Order.Queue_Cursor).Map_Key.To_UTF8_String, when Subsystems_Domain => "Subsystem Queue: " & Order.Subsys_Map_Queues.all (Order.Queue_Cursor).Map_Key.To_UTF8_String))); -- Note that if an exception is raised during the phase trigger, -- it is possible t hat this -- Execute -- ------------- procedure Execute (Order: in out Build_Reverse_Order) is use type Ada.Containers.Count_Type; Queue_Set: constant Map_Queue_Set_Access := (case Order.Domain is when Library_Units_Domain => Order.Unit_Map_Queues, when Subsystems_Domain => Order.Subsys_Map_Queues); Queue_Descriptor: Reverse_Dependency_Queue renames Queue_Set.all(Order.Queue_Cursor); Queue: Name_Queues.Queue renames Queue_Descriptor.Name_Queue.all; Rev_Deps: Unit_Names.Sets.Set; Name: Unit_Names.Unit_Name; procedure Include_Reverse_Dependencies (Set: in out Unit_Names.Sets.Set) is begin -- Thge target set already has a map for this unit, so we simply -- union-in the names we have. Set.Union (Rev_Deps); end Include_Reverse_Dependencies; begin while Queue.Current_Use > 0 loop -- Note that in this phase (phase "3", each queue is assigned to a -- single Work Order, and therefore we will not see concurrent access -- to our queue from this Order Queue.Dequeue (Name); Rev_Deps.Include (Name); -- The same name will likely appear twice. end loop; case Order.Domain is when Library_Units_Domain => Registry.Unit_Reverse_Dependencies.Insert_Or_Modify (Key => Queue_Descriptor.Map_Key, New_Item => Rev_Deps, Process_Existing => Include_Reverse_Dependencies'Access); when Subsystems_Domain => Registry.Subsystem_Reverse_Dependencies.Insert_Or_Modify (Key => Queue_Descriptor.Map_Key, New_Item => Rev_Deps, Process_Existing => Include_Reverse_Dependencies'Access); end case; -- Finalize the order's Queue_Cursor element. This is important because -- the Phase trigger might complete before all of the "completed orders" -- are actually finalized. This would cause a Tampering with Cursors -- check to fail. Order.Queue_Cursor := Map_Queue_Sets.No_Element; end Execute; -- Phase_Trigger -- ------------------- procedure Phase_Trigger (Order: in out Build_Reverse_Order) is procedure Free_Queue is new Ada.Unchecked_Deallocation (Object => Name_Queues.Queue, Name => Name_Queue_Access); procedure Free_Queue_Set is new Ada.Unchecked_Deallocation (Object => Map_Queue_Sets.Set, Name => Map_Queue_Set_Access); Queue_Disposal: Name_Queue_Access; -- Since hash map only have constant referencing, we'll copy out -- the access value for the queue in order to deallocate it begin pragma Assert (Map_Queue_Sets."=" (Order.Queue_Cursor, Map_Queue_Sets.No_Element)); -- The phase trigger just needs to clean-up the allocated objects. -- This is nice because the Consolodate_Dependencies process is now -- finished and everything else can proceed while this worker deals -- with this clean-up. -- -- This is why we didn't deallocate the queues during Execute. for QD of Order.Unit_Map_Queues.all loop Queue_Disposal := QD.Name_Queue; Free_Queue (Queue_Disposal); end loop; Free_Queue_Set (Order.Unit_Map_Queues); for QD of Order.Subsys_Map_Queues.all loop Queue_Disposal := QD.Name_Queue; Free_Queue (Queue_Disposal); end loop; Free_Queue_Set (Order.Subsys_Map_Queues); end Phase_Trigger; -- -- Dispatch -- ------------------------------ -- Consolidate_Dependencies -- ------------------------------ procedure Consolidate_Dependencies is use type Ada.Containers.Count_Type; Order: Merge_Subunits_Order; begin Order.Tracker := null; -- Only one order, and the tracker is manually -- adjusted Order.All_Units := Registrar.Queries.All_Library_Units; Order.All_Subsys := Registrar.Queries.All_Subsystems; Merge_Subunits_Progress.Increase_Total_Items_By (Natural (Order.All_Units.Length + Order.All_Subsys.Length)); Workers.Enqueue_Order (Order); end Consolidate_Dependencies; end Registrar.Dependency_Processing;
reznikmm/matreshka
Ada
4,704
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Chart.Error_Upper_Indicator_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Chart_Error_Upper_Indicator_Attribute_Node is begin return Self : Chart_Error_Upper_Indicator_Attribute_Node do Matreshka.ODF_Chart.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Chart_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Chart_Error_Upper_Indicator_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Error_Upper_Indicator_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Chart_URI, Matreshka.ODF_String_Constants.Error_Upper_Indicator_Attribute, Chart_Error_Upper_Indicator_Attribute_Node'Tag); end Matreshka.ODF_Chart.Error_Upper_Indicator_Attributes;
NCommander/dnscatcher
Ada
1,639
adb
-- Copyright 2019 Michael Casadevall <[email protected]> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to -- deal in the Software without restriction, including without limitation the -- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -- sell copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -- DEALINGS IN THE SOFTWARE. pragma Ada_2012; with Test_Packet_Parser; package body Packet_Processor_Test_Suite is use AUnit.Test_Suites; -- Statically allocate test suite; Result : aliased Test_Suite; -- And the test cases Test_Packet_Parser_Ptr : aliased Test_Packet_Parser.Packet_Parser_Test; function Suite return AUnit.Test_Suites.Access_Test_Suite is begin Add_Test (Result'Access, Test_Packet_Parser_Ptr'Access); return (Result'Access); end Suite; end Packet_Processor_Test_Suite;
charlie5/lace
Ada
140
ads
with any_Math.any_Geometry.any_d3.any_Modeller; package float_math.Geometry.d3.Modeller is new float_Math.Geometry.d3.any_Modeller;
AdaCore/gpr
Ada
34
ads
package JVM_File is end JVM_File;
reznikmm/matreshka
Ada
3,657
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014-2015, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package body Wiki.Block_Parsers is ---------------------- -- Can_Be_Continued -- ---------------------- not overriding function Can_Be_Continued (Self : not null access constant Abstract_Block_Parser) return Boolean is begin return True; end Can_Be_Continued; end Wiki.Block_Parsers;
kndtime/ada-spaceship
Ada
507
adb
package body Missile is procedure appear_mis(s : in out Missile; X : Integer; Y : Integer; Max_Y : Integer) is begin if s.State /= DEAD then return; end if; s.X := X + 10; s.Y := Y + 40; s.Max_Y := Max_Y; s.State := ALIVE; end appear_mis; procedure move_mis(s : in out Missile) is begin if s.State = DEAD then return; end if; s.Y := (s.Y + 5); if S.Max_Y <= s.Y then s.State := DEAD; end if; end move_mis; end Missile;
reznikmm/matreshka
Ada
4,679
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Presentation.Visibility_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Presentation_Visibility_Attribute_Node is begin return Self : Presentation_Visibility_Attribute_Node do Matreshka.ODF_Presentation.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Presentation_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Presentation_Visibility_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Visibility_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Presentation_URI, Matreshka.ODF_String_Constants.Visibility_Attribute, Presentation_Visibility_Attribute_Node'Tag); end Matreshka.ODF_Presentation.Visibility_Attributes;
reznikmm/matreshka
Ada
6,959
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with League.Objects.Impl; with League.Strings; with AWF.HTML_Writers; with AWF.Internals.AWF_Layouts; with AWF.Layouts; with AWF.Widgets; package AWF.Internals.AWF_Widgets is type AWF_Widget_Proxy is new League.Objects.Impl.Object_Impl and AWF.Widgets.AWF_Widget with private; type AWF_Widget_Proxy_Access is access all AWF_Widget_Proxy'Class; overriding function Id (Self : not null access constant AWF_Widget_Proxy) return Natural; overriding procedure Set_Layout (Self : not null access AWF_Widget_Proxy; Layout : access AWF.Layouts.AWF_Layout'Class); not overriding procedure Render_Head (Self : not null access AWF_Widget_Proxy; Context : in out AWF.HTML_Writers.HTML_Writer'Class) is null; not overriding procedure Render_Body (Self : not null access AWF_Widget_Proxy; Context : in out AWF.HTML_Writers.HTML_Writer'Class); -- Payload not overriding procedure Append_Payload (Self : not null access AWF_Widget_Proxy; Payload : League.Strings.Universal_String); not overriding function Get_Payload (Self : not null access AWF_Widget_Proxy) return League.Strings.Universal_String; -- Events not overriding procedure Key_Down_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Key_Press_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Key_Up_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Click_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Double_Click_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Drag_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Drag_End_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Drag_Enter_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Drag_Leave_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Drag_Over_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Drag_Start_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Drop_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Mouse_Down_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Mouse_Move_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Mouse_Out_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Mouse_Over_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Mouse_Up_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Mouse_Wheel_Event (Self : not null access AWF_Widget_Proxy) is null; not overriding procedure Scroll_Event (Self : not null access AWF_Widget_Proxy) is null; package Constructors is procedure Initialize (Self : not null access AWF_Widget_Proxy'Class; Parent : access AWF.Widgets.AWF_Widget'Class := null); end Constructors; private type AWF_Widget_Proxy is new League.Objects.Impl.Object_Impl and AWF.Widgets.AWF_Widget with record Id : Natural; Layout : AWF.Internals.AWF_Layouts.AWF_Layout_Proxy_Access; Payload : League.Strings.Universal_String; end record; end AWF.Internals.AWF_Widgets;
zhmu/ananas
Ada
9,109
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . E N C O D E _ S T R I N G -- -- -- -- B o d y -- -- -- -- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Interfaces; use Interfaces; with System.WCh_Con; use System.WCh_Con; with System.WCh_Cnv; use System.WCh_Cnv; package body GNAT.Encode_String is ----------------------- -- Local Subprograms -- ----------------------- procedure Bad; pragma No_Return (Bad); -- Raise error for bad character code procedure Past_End; pragma No_Return (Past_End); -- Raise error for off end of string --------- -- Bad -- --------- procedure Bad is begin raise Constraint_Error with "character cannot be encoded with given Encoding_Method"; end Bad; ------------------------ -- Encode_Wide_String -- ------------------------ function Encode_Wide_String (S : Wide_String) return String is Long : constant Natural := WC_Longest_Sequences (Encoding_Method); Result : String (1 .. S'Length * Long); Length : Natural; begin Encode_Wide_String (S, Result, Length); return Result (1 .. Length); end Encode_Wide_String; procedure Encode_Wide_String (S : Wide_String; Result : out String; Length : out Natural) is Ptr : Natural; begin Ptr := Result'First; for J in S'Range loop Encode_Wide_Character (S (J), Result, Ptr); end loop; Length := Ptr - Result'First; end Encode_Wide_String; ----------------------------- -- Encode_Wide_Wide_String -- ----------------------------- function Encode_Wide_Wide_String (S : Wide_Wide_String) return String is Long : constant Natural := WC_Longest_Sequences (Encoding_Method); Result : String (1 .. S'Length * Long); Length : Natural; begin Encode_Wide_Wide_String (S, Result, Length); return Result (1 .. Length); end Encode_Wide_Wide_String; procedure Encode_Wide_Wide_String (S : Wide_Wide_String; Result : out String; Length : out Natural) is Ptr : Natural; begin Ptr := Result'First; for J in S'Range loop Encode_Wide_Wide_Character (S (J), Result, Ptr); end loop; Length := Ptr - Result'First; end Encode_Wide_Wide_String; --------------------------- -- Encode_Wide_Character -- --------------------------- procedure Encode_Wide_Character (Char : Wide_Character; Result : in out String; Ptr : in out Natural) is begin Encode_Wide_Wide_Character (Wide_Wide_Character'Val (Wide_Character'Pos (Char)), Result, Ptr); exception when Constraint_Error => Bad; end Encode_Wide_Character; -------------------------------- -- Encode_Wide_Wide_Character -- -------------------------------- procedure Encode_Wide_Wide_Character (Char : Wide_Wide_Character; Result : in out String; Ptr : in out Natural) is U : Unsigned_32; procedure Out_Char (C : Character); pragma Inline (Out_Char); -- Procedure to store one character for instantiation below -------------- -- Out_Char -- -------------- procedure Out_Char (C : Character) is begin if Ptr > Result'Last then Past_End; else Result (Ptr) := C; Ptr := Ptr + 1; end if; end Out_Char; -- Start of processing for Encode_Wide_Wide_Character; begin -- Efficient code for UTF-8 case if Encoding_Method = WCEM_UTF8 then -- Note: for details of UTF8 encoding see RFC 3629 U := Unsigned_32 (Wide_Wide_Character'Pos (Char)); -- 16#00_0000#-16#00_007F#: 0xxxxxxx if U <= 16#00_007F# then Out_Char (Character'Val (U)); -- 16#00_0080#-16#00_07FF#: 110xxxxx 10xxxxxx elsif U <= 16#00_07FF# then Out_Char (Character'Val (2#11000000# or Shift_Right (U, 6))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- 16#00_0800#-16#00_FFFF#: 1110xxxx 10xxxxxx 10xxxxxx elsif U <= 16#00_FFFF# then Out_Char (Character'Val (2#11100000# or Shift_Right (U, 12))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- 16#01_0000#-16#10_FFFF#: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx elsif U <= 16#10_FFFF# then Out_Char (Character'Val (2#11110000# or Shift_Right (U, 18))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 12) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- 16#0020_0000#-16#03FF_FFFF#: 111110xx 10xxxxxx 10xxxxxx -- 10xxxxxx 10xxxxxx elsif U <= 16#03FF_FFFF# then Out_Char (Character'Val (2#11111000# or Shift_Right (U, 24))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 18) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 12) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- All other cases are invalid character codes, not this includes: -- 16#0400_0000#-16#7FFF_FFFF#: 1111110x 10xxxxxx 10xxxxxx -- 10xxxxxx 10xxxxxx 10xxxxxx -- since Wide_Wide_Character values cannot exceed 16#3F_FFFF# else Bad; end if; -- All encoding methods other than UTF-8 else Non_UTF8 : declare procedure UTF_32_To_String is new UTF_32_To_Char_Sequence (Out_Char); -- Instantiate conversion procedure with above Out_Char routine begin UTF_32_To_String (UTF_32_Code (Wide_Wide_Character'Pos (Char)), Encoding_Method); exception when Constraint_Error => Bad; end Non_UTF8; end if; end Encode_Wide_Wide_Character; -------------- -- Past_End -- -------------- procedure Past_End is begin raise Constraint_Error with "past end of string"; end Past_End; end GNAT.Encode_String;
mirror/ncurses
Ada
3,576
ads
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Keyboard_Handler -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright 2020 Thomas E. Dickey -- -- Copyright 1998-2002,2003 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; -- This package contains a centralized keyboard handler used throughout -- this example. The handler establishes a timeout mechanism that provides -- periodical updates of the common header lines used in this example. -- package Sample.Keyboard_Handler is function Get_Key (Win : Window := Standard_Window) return Real_Key_Code; -- The central routine for handling keystrokes. procedure Init_Keyboard_Handler; -- Initialize the keyboard end Sample.Keyboard_Handler;
AdaCore/libadalang
Ada
1,686
adb
with Ada.Text_IO; use Ada.Text_IO; with Langkit_Support.Diagnostics; use Langkit_Support.Diagnostics; with Libadalang.Analysis; use Libadalang.Analysis; with Libadalang.Common; use Libadalang.Common; with Libadalang.Iterators; use Libadalang.Iterators; procedure Main is Ctx : constant Analysis_Context := Create_Context; function Get_Unit (Filename : String) return Analysis_Unit is Unit : constant Analysis_Unit := Get_From_File (Ctx, Filename); begin if Has_Diagnostics (Unit) then for D of Diagnostics (Unit) loop Put_Line ("error: " & Filename & ": " & Langkit_Support.Diagnostics.To_Pretty_String (D)); end loop; raise Program_Error with "Parsing error"; end if; return Unit; end Get_Unit; Unit : constant Analysis_Unit := Get_Unit ("pkg.ads"); Decls : constant Ada_Node_Array := Find (Unit.Root, Kind_Is (Ada_Object_Decl)).Consume; D1 : constant Object_Decl := Decls (1).As_Object_Decl; D2 : constant Object_Decl := Decls (2).As_Object_Decl; N : constant Expr := D2.F_Default_Expr; Resolved : Object_Decl; begin Put_Line ("D1: " & D1.Image); Put_Line ("D2: " & D2.Image); if not D2.P_Resolve_Names then raise Program_Error with "Resolution failed"; end if; Resolved := N.As_Name.P_Referenced_Decl.As_Object_Decl; Put_Line ("Resolved: " & Resolved.Image); if D1.As_Ada_Node /= D1 then raise Program_Error with "Tag makes comparison fail"; end if; if D1.As_Ada_Node = Resolved then raise Program_Error with "Entity info ignored"; end if; Put_Line ("Done."); end Main;
reznikmm/matreshka
Ada
4,772
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Text_Character_Count_Elements; package Matreshka.ODF_Text.Character_Count_Elements is type Text_Character_Count_Element_Node is new Matreshka.ODF_Text.Abstract_Text_Element_Node and ODF.DOM.Text_Character_Count_Elements.ODF_Text_Character_Count with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Text_Character_Count_Element_Node; overriding function Get_Local_Name (Self : not null access constant Text_Character_Count_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Text_Character_Count_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Text_Character_Count_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Text_Character_Count_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Text.Character_Count_Elements;
Fabien-Chouteau/GESTE
Ada
172
ads
package Levels is type Level_Id is (Outside, Inside, Cave); procedure Update; procedure Enter (Id : Level_Id); procedure Leave (Id : Level_Id); end Levels;
AdaCore/gpr
Ada
3,933
adb
-- -- Copyright (C) 2022-2023, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-Exception -- with Ada.Characters.Conversions; with Ada.Strings.Wide_Wide_Unbounded; with GPR2.Message; with Gpr_Parser_Support.Diagnostics; with Gpr_Parser_Support.Text; with Gpr_Parser_Support.Slocs; package body GPR2.File_Readers is type Reader is new Gpr_Parser_Support.File_Readers.File_Reader_Interface with record File_Reader : File_Reader_Reference; end record; -- Adapter used to convert File_Reader_Reference to -- Gpr_Parser_Support.File_Readers package's File_Reader_Reference. overriding procedure Read (Self : Reader; Filename : String; Charset : String; Read_BOM : Boolean; Contents : out Gpr_Parser_Support.File_Readers.Decoded_File_Contents; Diagnostics : in out Gpr_Parser_Support.Diagnostics. Diagnostics_Vectors.Vector); overriding procedure Release (Self : in out Reader) is null; ------------- -- Convert -- ------------- function Convert (File_Reader : File_Reader_Reference) return Gpr_Parser_Support.File_Readers.File_Reader_Reference is use GPR2.File_Readers.File_Reader_References; begin if File_Reader = No_File_Reader_Reference then return Gpr_Parser_Support.File_Readers.No_File_Reader_Reference; else declare Gpr_Parser_Reader : constant Reader := (File_Reader => File_Reader); begin return Gpr_Parser_Support.File_Readers.Create_File_Reader_Reference (Gpr_Parser_Reader); end; end if; end Convert; ---------------------------------- -- Create_File_Reader_Reference -- ---------------------------------- function Create_File_Reader_Reference (File_Reader : File_Reader_Interface'Class) return File_Reader_Reference is begin return Result : File_Reader_Reference do Result.Set (File_Reader); end return; end Create_File_Reader_Reference; ---------------- -- Do_Release -- ---------------- procedure Do_Release (Self : in out File_Reader_Interface'Class) is begin Self.Release; end Do_Release; ---------- -- Read -- ---------- overriding procedure Read (Self : Reader; Filename : String; Charset : String; Read_BOM : Boolean; Contents : out Gpr_Parser_Support.File_Readers.Decoded_File_Contents; Diagnostics : in out Gpr_Parser_Support.Diagnostics. Diagnostics_Vectors.Vector) is C : Decoded_File_Contents; D : GPR2.Log.Object; begin Read (Self => Self.File_Reader.Get, Filename => Filename, Charset => Charset, Read_BOM => Read_BOM, Contents => C, Diagnostics => D); -- Fill Contents Contents.Buffer := Gpr_Parser_Support.Text.Text_Access (C.Buffer); Contents.First := C.First; Contents.Last := C.Last; -- Fill Diagnostics for E of D loop declare Diagnostic : Gpr_Parser_Support.Diagnostics.Diagnostic; begin Diagnostic.Sloc_Range.Start_Line := Gpr_Parser_Support.Slocs.Line_Number (E.Sloc.Line); Diagnostic.Sloc_Range.End_Line := Diagnostic.Sloc_Range.Start_Line; Diagnostic.Sloc_Range.Start_Column := Gpr_Parser_Support.Slocs.Column_Number (E.Sloc.Column); Diagnostic.Sloc_Range.End_Column := Diagnostic.Sloc_Range.Start_Column; Diagnostic.Message := Ada.Strings.Wide_Wide_Unbounded.To_Unbounded_Wide_Wide_String (Ada.Characters.Conversions.To_Wide_Wide_String (E.Message)); Diagnostics.Append (Diagnostic); end; end loop; end Read; end GPR2.File_Readers;
Fabien-Chouteau/GESTE
Ada
134,915
ads
package GESTE_Fonts.FreeSerif18pt7b is Font : constant Bitmap_Font_Ref; private FreeSerif18pt7bBitmaps : aliased constant Font_Bitmap := ( 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#70#, 16#00#, 16#00#, 16#07#, 16#38#, 16#00#, 16#00#, 16#03#, 16#9C#, 16#00#, 16#00#, 16#01#, 16#CE#, 16#00#, 16#00#, 16#00#, 16#E7#, 16#00#, 16#00#, 16#00#, 16#21#, 16#00#, 16#00#, 16#00#, 16#10#, 16#80#, 16#00#, 16#00#, 16#08#, 16#40#, 16#00#, 16#00#, 16#04#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C1#, 16#80#, 16#00#, 16#00#, 16#60#, 16#C0#, 16#00#, 16#00#, 16#30#, 16#60#, 16#00#, 16#00#, 16#18#, 16#70#, 16#00#, 16#00#, 16#0C#, 16#30#, 16#00#, 16#00#, 16#0E#, 16#18#, 16#00#, 16#00#, 16#06#, 16#0C#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#C0#, 16#00#, 16#1F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#C1#, 16#80#, 16#00#, 16#00#, 16#61#, 16#80#, 16#00#, 16#00#, 16#70#, 16#C0#, 16#00#, 16#00#, 16#30#, 16#60#, 16#00#, 16#01#, 16#FF#, 16#FE#, 16#00#, 16#00#, 16#FF#, 16#FF#, 16#00#, 16#00#, 16#06#, 16#0C#, 16#00#, 16#00#, 16#03#, 16#0C#, 16#00#, 16#00#, 16#01#, 16#86#, 16#00#, 16#00#, 16#01#, 16#83#, 16#00#, 16#00#, 16#00#, 16#C1#, 16#80#, 16#00#, 16#00#, 16#60#, 16#C0#, 16#00#, 16#00#, 16#30#, 16#60#, 16#00#, 16#00#, 16#18#, 16#30#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#01#, 16#93#, 16#80#, 16#00#, 16#01#, 16#88#, 16#60#, 16#00#, 16#01#, 16#C4#, 16#10#, 16#00#, 16#00#, 16#C2#, 16#08#, 16#00#, 16#00#, 16#71#, 16#04#, 16#00#, 16#00#, 16#38#, 16#80#, 16#00#, 16#00#, 16#1E#, 16#40#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#02#, 16#F8#, 16#00#, 16#00#, 16#01#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#8F#, 16#00#, 16#00#, 16#00#, 16#43#, 16#80#, 16#00#, 16#08#, 16#21#, 16#C0#, 16#00#, 16#04#, 16#10#, 16#E0#, 16#00#, 16#02#, 16#08#, 16#70#, 16#00#, 16#01#, 16#84#, 16#70#, 16#00#, 16#00#, 16#E2#, 16#78#, 16#00#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#78#, 16#03#, 16#00#, 16#00#, 16#FE#, 16#07#, 16#00#, 16#00#, 16#F0#, 16#FD#, 16#80#, 16#00#, 16#70#, 16#41#, 16#80#, 16#00#, 16#70#, 16#20#, 16#80#, 16#00#, 16#78#, 16#10#, 16#C0#, 16#00#, 16#38#, 16#08#, 16#40#, 16#00#, 16#1C#, 16#04#, 16#60#, 16#00#, 16#0E#, 16#06#, 16#20#, 16#00#, 16#07#, 16#02#, 16#30#, 16#F0#, 16#01#, 16#83#, 16#31#, 16#FC#, 16#00#, 16#E3#, 16#11#, 16#E3#, 16#00#, 16#3F#, 16#18#, 16#E0#, 16#80#, 16#0F#, 16#08#, 16#E0#, 16#40#, 16#00#, 16#0C#, 16#F0#, 16#20#, 16#00#, 16#0C#, 16#70#, 16#10#, 16#00#, 16#04#, 16#38#, 16#08#, 16#00#, 16#06#, 16#1C#, 16#0C#, 16#00#, 16#02#, 16#0C#, 16#04#, 16#00#, 16#03#, 16#06#, 16#06#, 16#00#, 16#03#, 16#03#, 16#86#, 16#00#, 16#01#, 16#80#, 16#FE#, 16#00#, 16#01#, 16#80#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#38#, 16#C0#, 16#00#, 16#00#, 16#18#, 16#30#, 16#00#, 16#00#, 16#1C#, 16#18#, 16#00#, 16#00#, 16#0E#, 16#0C#, 16#00#, 16#00#, 16#07#, 16#06#, 16#00#, 16#00#, 16#03#, 16#83#, 16#00#, 16#00#, 16#01#, 16#C3#, 16#00#, 16#00#, 16#00#, 16#73#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#1F#, 16#E0#, 16#00#, 16#1E#, 16#03#, 16#C0#, 16#00#, 16#1F#, 16#00#, 16#C0#, 16#00#, 16#3B#, 16#C0#, 16#C0#, 16#00#, 16#38#, 16#E0#, 16#60#, 16#00#, 16#38#, 16#78#, 16#60#, 16#00#, 16#38#, 16#1E#, 16#20#, 16#00#, 16#1C#, 16#07#, 16#A0#, 16#00#, 16#0E#, 16#03#, 16#F0#, 16#00#, 16#0F#, 16#00#, 16#F8#, 16#00#, 16#03#, 16#80#, 16#3E#, 16#00#, 16#01#, 16#E0#, 16#3F#, 16#86#, 16#00#, 16#F8#, 16#73#, 16#FE#, 16#00#, 16#3F#, 16#E0#, 16#FE#, 16#00#, 16#07#, 16#C0#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#01#, 16#8C#, 16#60#, 16#00#, 16#01#, 16#E4#, 16#70#, 16#00#, 16#00#, 16#7A#, 16#70#, 16#00#, 16#00#, 16#07#, 16#40#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#D8#, 16#00#, 16#00#, 16#07#, 16#A7#, 16#80#, 16#00#, 16#07#, 16#91#, 16#C0#, 16#00#, 16#01#, 16#8C#, 16#60#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#FF#, 16#FF#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#01#, 16#8E#, 16#00#, 16#00#, 16#01#, 16#83#, 16#80#, 16#00#, 16#01#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#1C#, 16#00#, 16#00#, 16#70#, 16#0E#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#1C#, 16#01#, 16#E0#, 16#00#, 16#0E#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#00#, 16#78#, 16#00#, 16#03#, 16#80#, 16#3C#, 16#00#, 16#01#, 16#C0#, 16#1E#, 16#00#, 16#00#, 16#E0#, 16#0F#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#00#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#30#, 16#70#, 16#00#, 16#00#, 16#0C#, 16#70#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#9C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#00#, 16#00#, 16#03#, 16#87#, 16#C0#, 16#00#, 16#01#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#80#, 16#78#, 16#00#, 16#00#, 16#80#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#40#, 16#10#, 16#00#, 16#00#, 16#40#, 16#08#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#7F#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#0F#, 16#00#, 16#00#, 16#03#, 16#01#, 16#C0#, 16#00#, 16#01#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#E0#, 16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#02#, 16#E0#, 16#00#, 16#00#, 16#02#, 16#70#, 16#00#, 16#00#, 16#01#, 16#38#, 16#00#, 16#00#, 16#01#, 16#1C#, 16#00#, 16#00#, 16#01#, 16#0E#, 16#00#, 16#00#, 16#01#, 16#87#, 16#00#, 16#00#, 16#00#, 16#83#, 16#80#, 16#00#, 16#00#, 16#81#, 16#C0#, 16#00#, 16#00#, 16#C0#, 16#E0#, 16#00#, 16#00#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#40#, 16#38#, 16#00#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#01#, 16#E0#, 16#C0#, 16#00#, 16#00#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#7C#, 16#00#, 16#00#, 16#0E#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#83#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#F0#, 16#00#, 16#03#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#1C#, 16#00#, 16#00#, 16#E0#, 16#0E#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#3C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#38#, 16#70#, 16#00#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#C0#, 16#00#, 16#07#, 16#FF#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#03#, 16#00#, 16#30#, 16#00#, 16#01#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#00#, 16#07#, 16#07#, 16#00#, 16#00#, 16#03#, 16#01#, 16#80#, 16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#38#, 16#00#, 16#00#, 16#70#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#0C#, 16#00#, 16#00#, 16#0F#, 16#8C#, 16#00#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#37#, 16#C0#, 16#00#, 16#00#, 16#31#, 16#F0#, 16#00#, 16#00#, 16#30#, 16#3C#, 16#00#, 16#00#, 16#38#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#60#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#78#, 16#70#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#F8#, 16#00#, 16#00#, 16#07#, 16#0E#, 16#00#, 16#00#, 16#03#, 16#03#, 16#80#, 16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#00#, 16#E0#, 16#1E#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#1C#, 16#01#, 16#C0#, 16#00#, 16#0F#, 16#00#, 16#E0#, 16#00#, 16#07#, 16#80#, 16#70#, 16#00#, 16#01#, 16#E0#, 16#78#, 16#00#, 16#00#, 16#F8#, 16#7C#, 16#00#, 16#00#, 16#3F#, 16#DC#, 16#00#, 16#00#, 16#07#, 16#CE#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#FE#, 16#00#, 16#03#, 16#FF#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#FC#, 16#00#, 16#07#, 16#FF#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#F8#, 16#00#, 16#00#, 16#06#, 16#1E#, 16#00#, 16#00#, 16#02#, 16#07#, 16#80#, 16#00#, 16#03#, 16#81#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#E0#, 16#00#, 16#00#, 16#60#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#3E#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#00#, 16#E0#, 16#00#, 16#38#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#, 16#03#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#C0#, 16#0E#, 16#07#, 16#EC#, 16#60#, 16#07#, 16#07#, 16#8E#, 16#10#, 16#07#, 16#03#, 16#87#, 16#08#, 16#03#, 16#83#, 16#83#, 16#04#, 16#01#, 16#C1#, 16#81#, 16#82#, 16#00#, 16#E1#, 16#C0#, 16#C1#, 16#00#, 16#70#, 16#E0#, 16#E1#, 16#80#, 16#38#, 16#70#, 16#60#, 16#C0#, 16#1C#, 16#38#, 16#70#, 16#C0#, 16#07#, 16#1C#, 16#58#, 16#C0#, 16#03#, 16#87#, 16#EF#, 16#C0#, 16#00#, 16#E1#, 16#C3#, 16#C0#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#38#, 16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#5C#, 16#00#, 16#00#, 16#00#, 16#6F#, 16#00#, 16#00#, 16#00#, 16#23#, 16#80#, 16#00#, 16#00#, 16#31#, 16#E0#, 16#00#, 16#00#, 16#18#, 16#70#, 16#00#, 16#00#, 16#18#, 16#3C#, 16#00#, 16#00#, 16#0C#, 16#0E#, 16#00#, 16#00#, 16#04#, 16#07#, 16#80#, 16#00#, 16#06#, 16#03#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#03#, 16#FF#, 16#F8#, 16#00#, 16#01#, 16#80#, 16#3C#, 16#00#, 16#01#, 16#80#, 16#0F#, 16#00#, 16#00#, 16#C0#, 16#07#, 16#80#, 16#00#, 16#C0#, 16#01#, 16#E0#, 16#00#, 16#60#, 16#00#, 16#F0#, 16#00#, 16#70#, 16#00#, 16#7C#, 16#00#, 16#7E#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#03#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#F0#, 16#7C#, 16#00#, 16#00#, 16#70#, 16#0F#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#1C#, 16#01#, 16#C0#, 16#00#, 16#0E#, 16#00#, 16#E0#, 16#00#, 16#07#, 16#00#, 16#70#, 16#00#, 16#03#, 16#80#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#00#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#38#, 16#1F#, 16#80#, 16#00#, 16#1C#, 16#03#, 16#E0#, 16#00#, 16#0E#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#00#, 16#3C#, 16#00#, 16#03#, 16#80#, 16#1E#, 16#00#, 16#01#, 16#C0#, 16#0F#, 16#00#, 16#00#, 16#E0#, 16#0F#, 16#00#, 16#00#, 16#70#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#0F#, 16#80#, 16#00#, 16#3F#, 16#FF#, 16#80#, 16#00#, 16#7F#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#82#, 16#00#, 16#00#, 16#7F#, 16#FB#, 16#00#, 16#00#, 16#7C#, 16#1F#, 16#80#, 16#00#, 16#F8#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#00#, 16#E0#, 16#00#, 16#78#, 16#00#, 16#30#, 16#00#, 16#78#, 16#00#, 16#08#, 16#00#, 16#3C#, 16#00#, 16#04#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#40#, 16#00#, 16#7C#, 16#00#, 16#C0#, 16#00#, 16#1F#, 16#81#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#03#, 16#FF#, 16#F8#, 16#00#, 16#01#, 16#E0#, 16#7F#, 16#00#, 16#00#, 16#70#, 16#07#, 16#C0#, 16#00#, 16#38#, 16#01#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#, 16#0E#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#00#, 16#0F#, 16#00#, 16#03#, 16#80#, 16#03#, 16#C0#, 16#01#, 16#C0#, 16#01#, 16#E0#, 16#00#, 16#E0#, 16#00#, 16#F0#, 16#00#, 16#70#, 16#00#, 16#78#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#0E#, 16#00#, 16#0F#, 16#00#, 16#07#, 16#00#, 16#0F#, 16#00#, 16#03#, 16#80#, 16#07#, 16#80#, 16#01#, 16#C0#, 16#07#, 16#80#, 16#00#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#70#, 16#07#, 16#C0#, 16#00#, 16#78#, 16#1F#, 16#C0#, 16#00#, 16#3F#, 16#FF#, 16#80#, 16#00#, 16#7F#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#, 16#07#, 16#FF#, 16#FC#, 16#00#, 16#01#, 16#E0#, 16#06#, 16#00#, 16#00#, 16#70#, 16#01#, 16#00#, 16#00#, 16#38#, 16#00#, 16#80#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#20#, 16#00#, 16#01#, 16#C0#, 16#10#, 16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#38#, 16#02#, 16#00#, 16#00#, 16#1C#, 16#01#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#01#, 16#00#, 16#00#, 16#E0#, 16#01#, 16#80#, 16#00#, 16#70#, 16#01#, 16#80#, 16#00#, 16#78#, 16#03#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#E0#, 16#00#, 16#7F#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#, 16#07#, 16#FF#, 16#FC#, 16#00#, 16#01#, 16#E0#, 16#06#, 16#00#, 16#00#, 16#70#, 16#01#, 16#00#, 16#00#, 16#38#, 16#00#, 16#80#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#20#, 16#00#, 16#01#, 16#C0#, 16#30#, 16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#38#, 16#06#, 16#00#, 16#00#, 16#1C#, 16#01#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#82#, 16#00#, 16#00#, 16#7F#, 16#FB#, 16#00#, 16#00#, 16#7C#, 16#0F#, 16#80#, 16#00#, 16#78#, 16#01#, 16#C0#, 16#00#, 16#78#, 16#00#, 16#60#, 16#00#, 16#78#, 16#00#, 16#30#, 16#00#, 16#78#, 16#00#, 16#08#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#0F#, 16#F8#, 16#03#, 16#C0#, 16#01#, 16#F0#, 16#01#, 16#E0#, 16#00#, 16#78#, 16#00#, 16#F0#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#0E#, 16#00#, 16#0F#, 16#00#, 16#07#, 16#00#, 16#03#, 16#C0#, 16#03#, 16#80#, 16#01#, 16#F0#, 16#01#, 16#C0#, 16#00#, 16#7C#, 16#00#, 16#E0#, 16#00#, 16#1F#, 16#81#, 16#F0#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#7F#, 16#C0#, 16#03#, 16#E0#, 16#0F#, 16#80#, 16#01#, 16#E0#, 16#03#, 16#80#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#00#, 16#E0#, 16#00#, 16#1C#, 16#00#, 16#70#, 16#00#, 16#0E#, 16#00#, 16#38#, 16#00#, 16#07#, 16#00#, 16#1C#, 16#00#, 16#03#, 16#80#, 16#0E#, 16#00#, 16#01#, 16#C0#, 16#07#, 16#00#, 16#00#, 16#FF#, 16#FF#, 16#80#, 16#00#, 16#7F#, 16#FF#, 16#C0#, 16#00#, 16#38#, 16#00#, 16#E0#, 16#00#, 16#1C#, 16#00#, 16#70#, 16#00#, 16#0E#, 16#00#, 16#38#, 16#00#, 16#07#, 16#00#, 16#1C#, 16#00#, 16#03#, 16#80#, 16#0E#, 16#00#, 16#01#, 16#C0#, 16#07#, 16#00#, 16#00#, 16#E0#, 16#03#, 16#80#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#78#, 16#00#, 16#E0#, 16#00#, 16#3E#, 16#00#, 16#F8#, 16#00#, 16#7F#, 16#C1#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F8#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#03#, 16#1C#, 16#00#, 16#00#, 16#03#, 16#CE#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#FF#, 16#80#, 16#03#, 16#E0#, 16#1E#, 16#00#, 16#00#, 16#E0#, 16#0E#, 16#00#, 16#00#, 16#70#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#06#, 16#00#, 16#00#, 16#1C#, 16#0E#, 16#00#, 16#00#, 16#0E#, 16#0E#, 16#00#, 16#00#, 16#07#, 16#0E#, 16#00#, 16#00#, 16#03#, 16#8E#, 16#00#, 16#00#, 16#01#, 16#CC#, 16#00#, 16#00#, 16#00#, 16#EF#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#39#, 16#E0#, 16#00#, 16#00#, 16#1C#, 16#78#, 16#00#, 16#00#, 16#0E#, 16#1E#, 16#00#, 16#00#, 16#07#, 16#07#, 16#80#, 16#00#, 16#03#, 16#81#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#00#, 16#E0#, 16#1E#, 16#00#, 16#00#, 16#70#, 16#0F#, 16#80#, 16#00#, 16#78#, 16#03#, 16#E0#, 16#00#, 16#3E#, 16#01#, 16#FC#, 16#00#, 16#7F#, 16#C3#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#01#, 16#00#, 16#00#, 16#E0#, 16#01#, 16#80#, 16#00#, 16#70#, 16#01#, 16#80#, 16#00#, 16#78#, 16#03#, 16#C0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#7F#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#7F#, 16#03#, 16#E0#, 16#00#, 16#3E#, 16#00#, 16#F8#, 16#00#, 16#3E#, 16#00#, 16#7C#, 16#00#, 16#1F#, 16#00#, 16#2F#, 16#00#, 16#1B#, 16#80#, 16#17#, 16#80#, 16#0D#, 16#C0#, 16#09#, 16#E0#, 16#0C#, 16#E0#, 16#04#, 16#F0#, 16#06#, 16#70#, 16#02#, 16#78#, 16#02#, 16#38#, 16#01#, 16#1E#, 16#03#, 16#1C#, 16#00#, 16#8F#, 16#01#, 16#0E#, 16#00#, 16#43#, 16#C1#, 16#87#, 16#00#, 16#21#, 16#E0#, 16#C3#, 16#80#, 16#10#, 16#78#, 16#C1#, 16#C0#, 16#08#, 16#3C#, 16#60#, 16#E0#, 16#04#, 16#0F#, 16#60#, 16#70#, 16#02#, 16#07#, 16#B0#, 16#38#, 16#01#, 16#01#, 16#F0#, 16#1C#, 16#00#, 16#80#, 16#F8#, 16#0E#, 16#00#, 16#60#, 16#38#, 16#07#, 16#00#, 16#30#, 16#1C#, 16#07#, 16#80#, 16#3C#, 16#04#, 16#03#, 16#E0#, 16#7F#, 16#82#, 16#07#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#1F#, 16#E0#, 16#07#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#F8#, 16#00#, 16#C0#, 16#00#, 16#7C#, 16#00#, 16#60#, 16#00#, 16#3F#, 16#00#, 16#30#, 16#00#, 16#17#, 16#C0#, 16#18#, 16#00#, 16#09#, 16#F0#, 16#0C#, 16#00#, 16#04#, 16#7C#, 16#06#, 16#00#, 16#02#, 16#1E#, 16#03#, 16#00#, 16#01#, 16#07#, 16#81#, 16#80#, 16#00#, 16#83#, 16#E0#, 16#C0#, 16#00#, 16#40#, 16#F8#, 16#60#, 16#00#, 16#20#, 16#3E#, 16#30#, 16#00#, 16#10#, 16#0F#, 16#18#, 16#00#, 16#08#, 16#03#, 16#CC#, 16#00#, 16#04#, 16#00#, 16#F6#, 16#00#, 16#02#, 16#00#, 16#7F#, 16#00#, 16#01#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#80#, 16#07#, 16#C0#, 16#00#, 16#60#, 16#01#, 16#E0#, 16#00#, 16#30#, 16#00#, 16#70#, 16#00#, 16#3C#, 16#00#, 16#18#, 16#00#, 16#7F#, 16#80#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#F8#, 16#00#, 16#00#, 16#F8#, 16#3E#, 16#00#, 16#00#, 16#F0#, 16#07#, 16#80#, 16#00#, 16#F0#, 16#01#, 16#E0#, 16#00#, 16#78#, 16#00#, 16#70#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#3C#, 16#00#, 16#1E#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#1E#, 16#00#, 16#03#, 16#C0#, 16#0F#, 16#00#, 16#01#, 16#E0#, 16#07#, 16#80#, 16#00#, 16#F0#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#01#, 16#E0#, 16#00#, 16#3C#, 16#00#, 16#F0#, 16#00#, 16#1E#, 16#00#, 16#3C#, 16#00#, 16#0F#, 16#00#, 16#1E#, 16#00#, 16#0F#, 16#00#, 16#0F#, 16#00#, 16#07#, 16#80#, 16#03#, 16#C0#, 16#03#, 16#C0#, 16#01#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#03#, 16#C0#, 16#00#, 16#1F#, 16#07#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#01#, 16#E0#, 16#F8#, 16#00#, 16#00#, 16#F0#, 16#1E#, 16#00#, 16#00#, 16#78#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#, 16#1E#, 16#01#, 16#E0#, 16#00#, 16#0F#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#80#, 16#78#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#01#, 16#E0#, 16#3C#, 16#00#, 16#00#, 16#F0#, 16#7C#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#3F#, 16#F8#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#F0#, 16#00#, 16#00#, 16#F8#, 16#3E#, 16#00#, 16#00#, 16#F0#, 16#07#, 16#80#, 16#00#, 16#70#, 16#01#, 16#E0#, 16#00#, 16#78#, 16#00#, 16#70#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#3C#, 16#00#, 16#1E#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#1E#, 16#00#, 16#03#, 16#C0#, 16#0F#, 16#00#, 16#01#, 16#E0#, 16#07#, 16#80#, 16#00#, 16#F0#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#01#, 16#E0#, 16#00#, 16#3C#, 16#00#, 16#F0#, 16#00#, 16#1E#, 16#00#, 16#78#, 16#00#, 16#0F#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#0F#, 16#00#, 16#07#, 16#80#, 16#03#, 16#80#, 16#03#, 16#C0#, 16#01#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#01#, 16#C0#, 16#00#, 16#1E#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#83#, 16#C0#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#01#, 16#E0#, 16#FC#, 16#00#, 16#00#, 16#F0#, 16#1E#, 16#00#, 16#00#, 16#78#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#, 16#1E#, 16#01#, 16#E0#, 16#00#, 16#0F#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#80#, 16#78#, 16#00#, 16#03#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#E0#, 16#F8#, 16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#00#, 16#3C#, 16#F8#, 16#00#, 16#00#, 16#1E#, 16#3E#, 16#00#, 16#00#, 16#0F#, 16#0F#, 16#80#, 16#00#, 16#07#, 16#83#, 16#C0#, 16#00#, 16#03#, 16#C0#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#3C#, 16#00#, 16#00#, 16#F0#, 16#1F#, 16#00#, 16#00#, 16#78#, 16#07#, 16#C0#, 16#00#, 16#3E#, 16#01#, 16#F0#, 16#00#, 16#7F#, 16#C0#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#E1#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#80#, 16#00#, 16#03#, 16#C3#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#18#, 16#00#, 16#00#, 16#E0#, 16#0C#, 16#00#, 16#00#, 16#70#, 16#02#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#20#, 16#03#, 16#C0#, 16#00#, 16#10#, 16#01#, 16#E0#, 16#00#, 16#0C#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#00#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#78#, 16#00#, 16#00#, 16#4F#, 16#F8#, 16#00#, 16#00#, 16#21#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#FC#, 16#00#, 16#0F#, 16#FF#, 16#FF#, 16#00#, 16#06#, 16#07#, 16#03#, 16#80#, 16#02#, 16#03#, 16#80#, 16#C0#, 16#01#, 16#01#, 16#C0#, 16#20#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#1F#, 16#E0#, 16#03#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#E0#, 16#00#, 16#C0#, 16#00#, 16#70#, 16#00#, 16#60#, 16#00#, 16#38#, 16#00#, 16#20#, 16#00#, 16#1C#, 16#00#, 16#10#, 16#00#, 16#0E#, 16#00#, 16#08#, 16#00#, 16#07#, 16#00#, 16#04#, 16#00#, 16#03#, 16#80#, 16#02#, 16#00#, 16#01#, 16#C0#, 16#01#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#80#, 16#00#, 16#70#, 16#00#, 16#40#, 16#00#, 16#38#, 16#00#, 16#20#, 16#00#, 16#1C#, 16#00#, 16#10#, 16#00#, 16#0E#, 16#00#, 16#08#, 16#00#, 16#07#, 16#00#, 16#04#, 16#00#, 16#03#, 16#80#, 16#02#, 16#00#, 16#01#, 16#E0#, 16#03#, 16#00#, 16#00#, 16#F0#, 16#01#, 16#80#, 16#00#, 16#3C#, 16#01#, 16#80#, 16#00#, 16#1F#, 16#03#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#F0#, 16#1F#, 16#C0#, 16#07#, 16#C0#, 16#03#, 16#C0#, 16#01#, 16#E0#, 16#00#, 16#C0#, 16#00#, 16#70#, 16#00#, 16#C0#, 16#00#, 16#3C#, 16#00#, 16#60#, 16#00#, 16#0E#, 16#00#, 16#20#, 16#00#, 16#07#, 16#80#, 16#30#, 16#00#, 16#03#, 16#C0#, 16#18#, 16#00#, 16#00#, 16#F0#, 16#18#, 16#00#, 16#00#, 16#78#, 16#0C#, 16#00#, 16#00#, 16#1E#, 16#04#, 16#00#, 16#00#, 16#0F#, 16#06#, 16#00#, 16#00#, 16#03#, 16#C3#, 16#00#, 16#00#, 16#01#, 16#E3#, 16#00#, 16#00#, 16#00#, 16#71#, 16#80#, 16#00#, 16#00#, 16#3D#, 16#80#, 16#00#, 16#00#, 16#0E#, 16#C0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#E7#, 16#FC#, 16#0F#, 16#E7#, 16#C0#, 16#F8#, 16#01#, 16#C1#, 16#E0#, 16#3C#, 16#00#, 16#C0#, 16#F0#, 16#1E#, 16#00#, 16#60#, 16#38#, 16#07#, 16#80#, 16#20#, 16#1E#, 16#03#, 16#C0#, 16#30#, 16#07#, 16#00#, 16#E0#, 16#18#, 16#03#, 16#C0#, 16#78#, 16#08#, 16#01#, 16#E0#, 16#7C#, 16#0C#, 16#00#, 16#70#, 16#2F#, 16#06#, 16#00#, 16#3C#, 16#37#, 16#82#, 16#00#, 16#1E#, 16#19#, 16#C3#, 16#00#, 16#07#, 16#88#, 16#F1#, 16#00#, 16#03#, 16#CC#, 16#79#, 16#80#, 16#00#, 16#E4#, 16#1E#, 16#C0#, 16#00#, 16#7E#, 16#0F#, 16#40#, 16#00#, 16#3F#, 16#03#, 16#E0#, 16#00#, 16#0F#, 16#01#, 16#F0#, 16#00#, 16#07#, 16#80#, 16#F0#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#00#, 16#C0#, 16#1C#, 16#00#, 16#00#, 16#60#, 16#04#, 16#00#, 16#00#, 16#20#, 16#02#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F8#, 16#3F#, 16#C0#, 16#03#, 16#F0#, 16#07#, 16#80#, 16#00#, 16#F8#, 16#03#, 16#80#, 16#00#, 16#3C#, 16#01#, 16#80#, 16#00#, 16#0F#, 16#01#, 16#80#, 16#00#, 16#03#, 16#C1#, 16#80#, 16#00#, 16#01#, 16#E1#, 16#80#, 16#00#, 16#00#, 16#79#, 16#80#, 16#00#, 16#00#, 16#1E#, 16#C0#, 16#00#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#DE#, 16#00#, 16#00#, 16#00#, 16#67#, 16#80#, 16#00#, 16#00#, 16#61#, 16#E0#, 16#00#, 16#00#, 16#60#, 16#F8#, 16#00#, 16#00#, 16#60#, 16#3C#, 16#00#, 16#00#, 16#60#, 16#0F#, 16#00#, 16#00#, 16#60#, 16#07#, 16#C0#, 16#00#, 16#70#, 16#01#, 16#F0#, 16#00#, 16#78#, 16#00#, 16#FC#, 16#00#, 16#FF#, 16#83#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#F0#, 16#1F#, 16#C0#, 16#07#, 16#E0#, 16#03#, 16#80#, 16#01#, 16#F0#, 16#01#, 16#80#, 16#00#, 16#78#, 16#01#, 16#80#, 16#00#, 16#1E#, 16#00#, 16#C0#, 16#00#, 16#0F#, 16#80#, 16#C0#, 16#00#, 16#03#, 16#C0#, 16#C0#, 16#00#, 16#00#, 16#F0#, 16#60#, 16#00#, 16#00#, 16#3C#, 16#60#, 16#00#, 16#00#, 16#1E#, 16#60#, 16#00#, 16#00#, 16#07#, 16#B0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#01#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#FC#, 16#00#, 16#07#, 16#FF#, 16#FE#, 16#00#, 16#07#, 16#00#, 16#1E#, 16#00#, 16#03#, 16#00#, 16#1E#, 16#00#, 16#01#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#01#, 16#00#, 16#01#, 16#E0#, 16#01#, 16#80#, 16#01#, 16#E0#, 16#00#, 16#C0#, 16#00#, 16#E0#, 16#01#, 16#C0#, 16#00#, 16#FF#, 16#FF#, 16#E0#, 16#00#, 16#FF#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#3B#, 16#00#, 16#00#, 16#00#, 16#19#, 16#C0#, 16#00#, 16#00#, 16#1C#, 16#60#, 16#00#, 16#00#, 16#0C#, 16#38#, 16#00#, 16#00#, 16#0E#, 16#0C#, 16#00#, 16#00#, 16#06#, 16#06#, 16#00#, 16#00#, 16#07#, 16#01#, 16#80#, 16#00#, 16#03#, 16#00#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#30#, 16#00#, 16#01#, 16#80#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#, 16#0F#, 16#FF#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#06#, 16#18#, 16#00#, 16#00#, 16#06#, 16#0E#, 16#00#, 16#00#, 16#03#, 16#83#, 16#00#, 16#00#, 16#01#, 16#81#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#30#, 16#00#, 16#00#, 16#0E#, 16#18#, 16#00#, 16#00#, 16#0E#, 16#0C#, 16#00#, 16#00#, 16#0E#, 16#06#, 16#00#, 16#00#, 16#07#, 16#03#, 16#00#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#, 16#01#, 16#E3#, 16#E0#, 16#00#, 16#00#, 16#FE#, 16#7C#, 16#00#, 16#00#, 16#1E#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#7C#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#00#, 16#03#, 16#C3#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#F0#, 16#00#, 16#00#, 16#E0#, 16#38#, 16#00#, 16#00#, 16#70#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#07#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#78#, 16#70#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#87#, 16#80#, 16#00#, 16#03#, 16#83#, 16#C0#, 16#00#, 16#01#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#40#, 16#00#, 16#01#, 16#F0#, 16#C0#, 16#00#, 16#00#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#01#, 16#E7#, 16#00#, 16#00#, 16#03#, 16#FB#, 16#80#, 16#00#, 16#03#, 16#87#, 16#C0#, 16#00#, 16#03#, 16#81#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#00#, 16#E0#, 16#1C#, 16#00#, 16#00#, 16#70#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#F8#, 16#7C#, 16#00#, 16#00#, 16#3F#, 16#DF#, 16#00#, 16#00#, 16#07#, 16#C8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FC#, 16#00#, 16#00#, 16#03#, 16#07#, 16#00#, 16#00#, 16#03#, 16#03#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#01#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#40#, 16#00#, 16#07#, 16#80#, 16#40#, 16#00#, 16#01#, 16#F0#, 16#E0#, 16#00#, 16#00#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FC#, 16#00#, 16#00#, 16#01#, 16#8E#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#C0#, 16#00#, 16#03#, 16#8F#, 16#E0#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#, 16#01#, 16#C0#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#70#, 16#38#, 16#00#, 16#00#, 16#38#, 16#18#, 16#00#, 16#00#, 16#0E#, 16#0C#, 16#00#, 16#00#, 16#03#, 16#8C#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#F0#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#00#, 16#04#, 16#00#, 16#C0#, 16#00#, 16#04#, 16#00#, 16#20#, 16#00#, 16#06#, 16#00#, 16#20#, 16#00#, 16#03#, 16#00#, 16#10#, 16#00#, 16#01#, 16#E0#, 16#30#, 16#00#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#7C#, 16#00#, 16#00#, 16#07#, 16#7F#, 16#00#, 16#00#, 16#03#, 16#C3#, 16#80#, 16#00#, 16#01#, 16#C0#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#70#, 16#38#, 16#00#, 16#00#, 16#38#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#0E#, 16#00#, 16#00#, 16#0E#, 16#07#, 16#00#, 16#00#, 16#07#, 16#03#, 16#80#, 16#00#, 16#03#, 16#81#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#F0#, 16#38#, 16#00#, 16#00#, 16#78#, 16#3E#, 16#00#, 16#00#, 16#FF#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#03#, 16#8C#, 16#00#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#1F#, 16#C0#, 16#00#, 16#07#, 16#07#, 16#80#, 16#00#, 16#03#, 16#83#, 16#00#, 16#00#, 16#01#, 16#C2#, 16#00#, 16#00#, 16#00#, 16#E2#, 16#00#, 16#00#, 16#00#, 16#76#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#0E#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#38#, 16#00#, 16#00#, 16#03#, 16#8E#, 16#00#, 16#00#, 16#01#, 16#C7#, 16#80#, 16#00#, 16#00#, 16#E1#, 16#E0#, 16#00#, 16#00#, 16#70#, 16#78#, 16#00#, 16#00#, 16#7C#, 16#1E#, 16#00#, 16#00#, 16#FF#, 16#BF#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#3C#, 16#1E#, 16#00#, 16#3F#, 16#7F#, 16#3F#, 16#80#, 16#03#, 16#C3#, 16#F0#, 16#E0#, 16#01#, 16#C0#, 16#E0#, 16#70#, 16#00#, 16#E0#, 16#70#, 16#38#, 16#00#, 16#70#, 16#38#, 16#0C#, 16#00#, 16#38#, 16#1C#, 16#07#, 16#00#, 16#1C#, 16#0E#, 16#03#, 16#80#, 16#0E#, 16#07#, 16#01#, 16#C0#, 16#07#, 16#03#, 16#80#, 16#E0#, 16#03#, 16#81#, 16#C0#, 16#70#, 16#01#, 16#C0#, 16#E0#, 16#38#, 16#00#, 16#E0#, 16#70#, 16#1C#, 16#00#, 16#70#, 16#38#, 16#1E#, 16#00#, 16#78#, 16#1E#, 16#0F#, 16#00#, 16#FF#, 16#3F#, 16#DF#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#78#, 16#00#, 16#00#, 16#3E#, 16#7F#, 16#00#, 16#00#, 16#07#, 16#43#, 16#80#, 16#00#, 16#01#, 16#C1#, 16#C0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#70#, 16#38#, 16#00#, 16#00#, 16#38#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#0E#, 16#00#, 16#00#, 16#0E#, 16#07#, 16#00#, 16#00#, 16#07#, 16#03#, 16#80#, 16#00#, 16#03#, 16#81#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#F0#, 16#38#, 16#00#, 16#00#, 16#78#, 16#3C#, 16#00#, 16#00#, 16#FF#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#87#, 16#80#, 16#00#, 16#03#, 16#81#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#1C#, 16#00#, 16#00#, 16#E0#, 16#0E#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#1C#, 16#01#, 16#C0#, 16#00#, 16#0F#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#70#, 16#00#, 16#01#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#78#, 16#70#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#7C#, 16#00#, 16#00#, 16#3F#, 16#7F#, 16#80#, 16#00#, 16#03#, 16#C3#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#F0#, 16#00#, 16#00#, 16#E0#, 16#38#, 16#00#, 16#00#, 16#70#, 16#1E#, 16#00#, 16#00#, 16#38#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#78#, 16#70#, 16#00#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#00#, 16#1D#, 16#F0#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F1#, 16#00#, 16#00#, 16#03#, 16#FD#, 16#80#, 16#00#, 16#03#, 16#C3#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#00#, 16#E0#, 16#1C#, 16#00#, 16#00#, 16#70#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#F0#, 16#78#, 16#00#, 16#00#, 16#3F#, 16#DC#, 16#00#, 16#00#, 16#0F#, 16#8E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#70#, 16#00#, 16#00#, 16#1F#, 16#7C#, 16#00#, 16#00#, 16#07#, 16#CE#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#0C#, 16#30#, 16#00#, 16#00#, 16#06#, 16#08#, 16#00#, 16#00#, 16#06#, 16#04#, 16#00#, 16#00#, 16#03#, 16#82#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#08#, 16#1C#, 16#00#, 16#00#, 16#04#, 16#07#, 16#00#, 16#00#, 16#02#, 16#03#, 16#80#, 16#00#, 16#01#, 16#81#, 16#80#, 16#00#, 16#00#, 16#E1#, 16#80#, 16#00#, 16#00#, 16#4F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#00#, 16#1F#, 16#E0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#71#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#3F#, 16#00#, 16#00#, 16#0E#, 16#07#, 16#80#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#01#, 16#80#, 16#E0#, 16#00#, 16#00#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#60#, 16#38#, 16#00#, 16#00#, 16#30#, 16#1C#, 16#00#, 16#00#, 16#18#, 16#0E#, 16#00#, 16#00#, 16#0C#, 16#07#, 16#00#, 16#00#, 16#06#, 16#03#, 16#80#, 16#00#, 16#03#, 16#01#, 16#C0#, 16#00#, 16#01#, 16#80#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#F0#, 16#00#, 16#00#, 16#70#, 16#F8#, 16#00#, 16#00#, 16#3F#, 16#DF#, 16#00#, 16#00#, 16#07#, 16#8C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#0F#, 16#80#, 16#00#, 16#1F#, 16#01#, 16#80#, 16#00#, 16#07#, 16#00#, 16#80#, 16#00#, 16#01#, 16#C0#, 16#40#, 16#00#, 16#00#, 16#E0#, 16#60#, 16#00#, 16#00#, 16#38#, 16#20#, 16#00#, 16#00#, 16#1C#, 16#30#, 16#00#, 16#00#, 16#07#, 16#10#, 16#00#, 16#00#, 16#03#, 16#88#, 16#00#, 16#00#, 16#01#, 16#C8#, 16#00#, 16#00#, 16#00#, 16#74#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#3F#, 16#8F#, 16#80#, 16#1E#, 16#0F#, 16#01#, 16#80#, 16#07#, 16#03#, 16#80#, 16#80#, 16#03#, 16#81#, 16#C0#, 16#40#, 16#00#, 16#E0#, 16#E0#, 16#60#, 16#00#, 16#70#, 16#38#, 16#20#, 16#00#, 16#38#, 16#3C#, 16#30#, 16#00#, 16#0E#, 16#17#, 16#10#, 16#00#, 16#07#, 16#1B#, 16#88#, 16#00#, 16#01#, 16#C8#, 16#CC#, 16#00#, 16#00#, 16#EC#, 16#74#, 16#00#, 16#00#, 16#74#, 16#3E#, 16#00#, 16#00#, 16#1E#, 16#0E#, 16#00#, 16#00#, 16#0E#, 16#07#, 16#00#, 16#00#, 16#03#, 16#01#, 16#00#, 16#00#, 16#01#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#BF#, 16#00#, 16#00#, 16#0F#, 16#06#, 16#00#, 16#00#, 16#03#, 16#C6#, 16#00#, 16#00#, 16#00#, 16#E2#, 16#00#, 16#00#, 16#00#, 16#3B#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#B8#, 16#00#, 16#00#, 16#00#, 16#8E#, 16#00#, 16#00#, 16#00#, 16#C7#, 16#80#, 16#00#, 16#00#, 16#C1#, 16#C0#, 16#00#, 16#00#, 16#40#, 16#70#, 16#00#, 16#00#, 16#60#, 16#3C#, 16#00#, 16#00#, 16#F8#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#07#, 16#80#, 16#00#, 16#1F#, 16#01#, 16#80#, 16#00#, 16#07#, 16#00#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#40#, 16#00#, 16#00#, 16#E0#, 16#60#, 16#00#, 16#00#, 16#38#, 16#30#, 16#00#, 16#00#, 16#1C#, 16#10#, 16#00#, 16#00#, 16#0F#, 16#18#, 16#00#, 16#00#, 16#03#, 16#88#, 16#00#, 16#00#, 16#01#, 16#E4#, 16#00#, 16#00#, 16#00#, 16#76#, 16#00#, 16#00#, 16#00#, 16#3A#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#0C#, 16#0E#, 16#00#, 16#00#, 16#04#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#40#, 16#00#, 16#01#, 16#C0#, 16#20#, 16#00#, 16#01#, 16#C0#, 16#30#, 16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#FF#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#87#, 16#00#, 16#00#, 16#71#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#); Font_D : aliased constant Bitmap_Font := ( Bytes_Per_Glyph => 173, Glyph_Width => 33, Glyph_Height => 42, Data => FreeSerif18pt7bBitmaps'Access); Font : constant Bitmap_Font_Ref := Font_D'Access; end GESTE_Fonts.FreeSerif18pt7b;
reznikmm/matreshka
Ada
11,802
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Internals.OCL_Elements; with AMF.OCL.Null_Literal_Exps; with AMF.UML.Comments.Collections; with AMF.UML.Dependencies.Collections; with AMF.UML.Elements.Collections; with AMF.UML.Named_Elements; with AMF.UML.Namespaces.Collections; with AMF.UML.Packages.Collections; with AMF.UML.String_Expressions; with AMF.UML.Types; with AMF.Visitors; package AMF.Internals.OCL_Null_Literal_Exps is type OCL_Null_Literal_Exp_Proxy is limited new AMF.Internals.OCL_Elements.OCL_Element_Proxy and AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp with null record; overriding function Get_Type (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Types.UML_Type_Access; -- Getter of TypedElement::type. -- -- The type of the TypedElement. -- This information is derived from the return result for this Operation. overriding procedure Set_Type (Self : not null access OCL_Null_Literal_Exp_Proxy; To : AMF.UML.Types.UML_Type_Access); -- Setter of TypedElement::type. -- -- The type of the TypedElement. -- This information is derived from the return result for this Operation. overriding function Get_Client_Dependency (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; -- Getter of NamedElement::clientDependency. -- -- Indicates the dependencies that reference the client. overriding function Get_Name (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.Optional_String; -- Getter of NamedElement::name. -- -- The name of the NamedElement. overriding procedure Set_Name (Self : not null access OCL_Null_Literal_Exp_Proxy; To : AMF.Optional_String); -- Setter of NamedElement::name. -- -- The name of the NamedElement. overriding function Get_Name_Expression (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access; -- Getter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding procedure Set_Name_Expression (Self : not null access OCL_Null_Literal_Exp_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access); -- Setter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding function Get_Namespace (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Getter of NamedElement::namespace. -- -- Specifies the namespace that owns the NamedElement. overriding function Get_Qualified_Name (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.Optional_String; -- Getter of NamedElement::qualifiedName. -- -- A name which allows the NamedElement to be identified within a -- hierarchy of nested Namespaces. It is constructed from the names of the -- containing namespaces starting at the root of the hierarchy and ending -- with the name of the NamedElement itself. overriding function Get_Visibility (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Optional_UML_Visibility_Kind; -- Getter of NamedElement::visibility. -- -- Determines where the NamedElement appears within different Namespaces -- within the overall model, and its accessibility. overriding procedure Set_Visibility (Self : not null access OCL_Null_Literal_Exp_Proxy; To : AMF.UML.Optional_UML_Visibility_Kind); -- Setter of NamedElement::visibility. -- -- Determines where the NamedElement appears within different Namespaces -- within the overall model, and its accessibility. overriding function Get_Owned_Comment (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Comments.Collections.Set_Of_UML_Comment; -- Getter of Element::ownedComment. -- -- The Comments owned by this element. overriding function Get_Owned_Element (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element; -- Getter of Element::ownedElement. -- -- The Elements owned by this element. overriding function Get_Owner (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Elements.UML_Element_Access; -- Getter of Element::owner. -- -- The Element that owns this element. overriding function All_Namespaces (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace; -- Operation NamedElement::allNamespaces. -- -- The query allNamespaces() gives the sequence of namespaces in which the -- NamedElement is nested, working outwards. overriding function All_Owning_Packages (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package; -- Operation NamedElement::allOwningPackages. -- -- The query allOwningPackages() returns all the directly or indirectly -- owning packages. overriding function Is_Distinguishable_From (Self : not null access constant OCL_Null_Literal_Exp_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean; -- Operation NamedElement::isDistinguishableFrom. -- -- The query isDistinguishableFrom() determines whether two NamedElements -- may logically co-exist within a Namespace. By default, two named -- elements are distinguishable if (a) they have unrelated types or (b) -- they have related types but different names. overriding function Namespace (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Operation NamedElement::namespace. -- -- Missing derivation for NamedElement::/namespace : Namespace overriding function Qualified_Name (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return League.Strings.Universal_String; -- Operation NamedElement::qualifiedName. -- -- When there is a name, and all of the containing namespaces have a name, -- the qualified name is constructed from the names of the containing -- namespaces. overriding function Separator (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return League.Strings.Universal_String; -- Operation NamedElement::separator. -- -- The query separator() gives the string that is used to separate names -- when constructing a qualified name. overriding function All_Owned_Elements (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element; -- Operation Element::allOwnedElements. -- -- The query allOwnedElements() gives all of the direct and indirect owned -- elements of an element. overriding function Must_Be_Owned (Self : not null access constant OCL_Null_Literal_Exp_Proxy) return Boolean; -- Operation Element::mustBeOwned. -- -- The query mustBeOwned() indicates whether elements of this type must -- have an owner. Subclasses of Element that do not require an owner must -- override this operation. overriding procedure Enter_Element (Self : not null access constant OCL_Null_Literal_Exp_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); overriding procedure Leave_Element (Self : not null access constant OCL_Null_Literal_Exp_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); overriding procedure Visit_Element (Self : not null access constant OCL_Null_Literal_Exp_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); end AMF.Internals.OCL_Null_Literal_Exps;
Fabien-Chouteau/GESTE
Ada
11,247
ads
package GESTE_Fonts.FreeSerif5pt7b is Font : constant Bitmap_Font_Ref; private FreeSerif5pt7bBitmaps : aliased constant Font_Bitmap := ( 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#02#, 16#01#, 16#00#, 16#80#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#05#, 16#02#, 16#83#, 16#E0#, 16#A0#, 16#F8#, 16#28#, 16#28#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#07#, 16#05#, 16#01#, 16#80#, 16#60#, 16#28#, 16#58#, 16#1C#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#02#, 16#E1#, 16#60#, 16#BC#, 16#75#, 16#14#, 16#89#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#01#, 16#40#, 16#D8#, 16#68#, 16#D8#, 16#64#, 16#1D#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#01#, 16#01#, 16#00#, 16#80#, 16#40#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#01#, 16#00#, 16#80#, 16#20#, 16#20#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#03#, 16#81#, 16#C0#, 16#40#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#40#, 16#F8#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#02#, 16#01#, 16#00#, 16#80#, 16#80#, 16#40#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#05#, 16#04#, 16#42#, 16#21#, 16#10#, 16#88#, 16#28#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#10#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#04#, 16#80#, 16#40#, 16#20#, 16#20#, 16#20#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#80#, 16#80#, 16#60#, 16#10#, 16#08#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#03#, 16#81#, 16#41#, 16#20#, 16#F8#, 16#08#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#02#, 16#01#, 16#C0#, 16#20#, 16#10#, 16#08#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#06#, 16#02#, 16#03#, 16#C1#, 16#30#, 16#88#, 16#24#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#04#, 16#80#, 16#40#, 16#40#, 16#20#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#02#, 16#81#, 16#40#, 16#40#, 16#50#, 16#28#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#04#, 16#82#, 16#21#, 16#90#, 16#70#, 16#08#, 16#08#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#00#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#20#, 16#E0#, 16#80#, 16#38#, 16#02#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#60#, 16#0C#, 16#0C#, 16#18#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#02#, 16#80#, 16#40#, 16#20#, 16#20#, 16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C1#, 16#51#, 16#54#, 16#AA#, 16#55#, 16#3F#, 16#07#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#80#, 16#A0#, 16#90#, 16#7C#, 16#22#, 16#31#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#82#, 16#61#, 16#20#, 16#E0#, 16#4C#, 16#22#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#82#, 16#23#, 16#01#, 16#80#, 16#40#, 16#20#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#82#, 16#21#, 16#08#, 16#84#, 16#42#, 16#22#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#82#, 16#01#, 16#00#, 16#F0#, 16#40#, 16#22#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#82#, 16#01#, 16#20#, 16#F0#, 16#48#, 16#20#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#82#, 16#21#, 16#01#, 16#8C#, 16#C4#, 16#22#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#E2#, 16#21#, 16#10#, 16#F8#, 16#44#, 16#22#, 16#3B#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#10#, 16#30#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#E2#, 16#41#, 16#40#, 16#E0#, 16#58#, 16#22#, 16#3B#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#22#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#3B#, 16#19#, 16#94#, 16#EA#, 16#59#, 16#2C#, 16#BC#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#63#, 16#21#, 16#D0#, 16#B8#, 16#4C#, 16#22#, 16#39#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#82#, 16#23#, 16#09#, 16#04#, 16#C2#, 16#22#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#82#, 16#41#, 16#20#, 16#90#, 16#78#, 16#20#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#82#, 16#23#, 16#09#, 16#04#, 16#C2#, 16#22#, 16#0E#, 16#01#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#82#, 16#41#, 16#20#, 16#E0#, 16#50#, 16#26#, 16#39#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#02#, 16#C1#, 16#00#, 16#60#, 16#08#, 16#44#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#C4#, 16#A0#, 16#40#, 16#20#, 16#10#, 16#18#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#62#, 16#21#, 16#10#, 16#88#, 16#44#, 16#22#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#62#, 16#21#, 16#90#, 16#50#, 16#28#, 16#08#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#DA#, 16#45#, 16#34#, 16#5A#, 16#36#, 16#19#, 16#08#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#63#, 16#20#, 16#A0#, 16#20#, 16#28#, 16#22#, 16#33#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#62#, 16#20#, 16#A0#, 16#20#, 16#10#, 16#08#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#C4#, 16#40#, 16#40#, 16#40#, 16#20#, 16#22#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#08#, 16#04#, 16#02#, 16#00#, 16#80#, 16#40#, 16#20#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#10#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#03#, 16#02#, 16#41#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#20#, 16#70#, 16#48#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#02#, 16#01#, 16#C0#, 16#90#, 16#48#, 16#24#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C1#, 16#00#, 16#80#, 16#40#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#81#, 16#C1#, 16#20#, 16#90#, 16#48#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C1#, 16#E0#, 16#80#, 16#40#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#04#, 16#02#, 16#03#, 16#80#, 16#80#, 16#40#, 16#20#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#E1#, 16#20#, 16#50#, 16#30#, 16#1C#, 16#12#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#02#, 16#01#, 16#C0#, 16#A0#, 16#50#, 16#28#, 16#36#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#01#, 16#01#, 16#80#, 16#40#, 16#20#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#80#, 16#C0#, 16#20#, 16#10#, 16#08#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#02#, 16#01#, 16#60#, 16#C0#, 16#60#, 16#28#, 16#36#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#30#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#D8#, 16#B4#, 16#52#, 16#29#, 16#37#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#A0#, 16#50#, 16#28#, 16#36#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C1#, 16#30#, 16#88#, 16#68#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#90#, 16#48#, 16#24#, 16#1C#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#81#, 16#20#, 16#90#, 16#48#, 16#1C#, 16#02#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#80#, 16#40#, 16#20#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#01#, 16#00#, 16#60#, 16#50#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#03#, 16#80#, 16#80#, 16#40#, 16#20#, 16#10#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#40#, 16#A0#, 16#50#, 16#28#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#60#, 16#A0#, 16#50#, 16#30#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C9#, 16#28#, 16#54#, 16#34#, 16#0A#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#40#, 16#C0#, 16#20#, 16#68#, 16#36#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#60#, 16#A0#, 16#50#, 16#10#, 16#08#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C1#, 16#40#, 16#40#, 16#20#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#02#, 16#01#, 16#00#, 16#80#, 16#80#, 16#40#, 16#10#, 16#08#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#04#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#01#, 16#00#, 16#80#, 16#40#, 16#20#, 16#10#, 16#08#, 16#04#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#D0#, 16#B0#, 16#00#, 16#00#, 16#00#, 16#00#); Font_D : aliased constant Bitmap_Font := ( Bytes_Per_Glyph => 14, Glyph_Width => 9, Glyph_Height => 12, Data => FreeSerif5pt7bBitmaps'Access); Font : constant Bitmap_Font_Ref := Font_D'Access; end GESTE_Fonts.FreeSerif5pt7b;
coopht/axmpp
Ada
4,747
adb
------------------------------------------------------------------------------ -- -- -- AXMPP Project -- -- -- -- XMPP Library for Ada -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Alexander Basov <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Alexander Basov, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; package body XMPP.Utils is use League.Strings; Int_Id : Integer := 0; -------------- -- Gen_Id -- -------------- function Gen_Id (Prefix : League.Strings.Universal_String := League.Strings.Empty_Universal_String) return League.Strings.Universal_String is function Image (J : Integer) return Wide_Wide_String; ------------- -- Image -- ------------- function Image (J : Integer) return Wide_Wide_String is S : constant Wide_Wide_String := Integer'Wide_Wide_Image (J); begin return S (S'First + 1 .. S'Last); end Image; Tmp : League.Strings.Universal_String := Prefix; begin Int_Id := Int_Id + 1; if Int_Id > 1000 then Int_Id := 0; end if; if Tmp.Is_Empty then Tmp := Tmp & "aa"; end if; return Tmp & Image (Int_Id); end Gen_Id; ------------------------------- -- To_Stream_Element_Array -- ------------------------------- function To_Stream_Element_Array (Value : String) return Ada.Streams.Stream_Element_Array is subtype Source is String (Value'Range); subtype Result is Ada.Streams.Stream_Element_Array (Ada.Streams.Stream_Element_Offset (Value'First) .. Ada.Streams.Stream_Element_Offset (Value'Last)); function To_Array is new Ada.Unchecked_Conversion (Source, Result); begin return To_Array (Value); end To_Stream_Element_Array; end XMPP.Utils;
AdaCore/Ada_Drivers_Library
Ada
729
adb
package body Bluetooth_Low_Energy is --------------- -- Make_UUID -- --------------- function Make_UUID (UUID : UInt16) return BLE_UUID is begin return (Kind => UUID_16bits, UUID_16 => UUID); end Make_UUID; --------------- -- Make_UUID -- --------------- function Make_UUID (UUID : UInt32) return BLE_UUID is begin return (Kind => UUID_32bits, UUID_32 => UUID); end Make_UUID; --------------- -- Make_UUID -- --------------- function Make_UUID (UUID : BLE_16UInt8s_UUID) return BLE_UUID is begin return (Kind => UUID_16UInt8s, UUID_16_UInt8s => UUID); end Make_UUID; end Bluetooth_Low_Energy;
AdaCore/libadalang
Ada
984
adb
with Ada.Text_IO; use Ada.Text_IO; with Libadalang.Analysis; use Libadalang.Analysis; with Libadalang.Helpers; use Libadalang.Helpers; procedure Main is procedure Process_Unit (Context : App_Job_Context; Unit : Analysis_Unit); package App is new Libadalang.Helpers.App (Name => "example", Description => "Example app", Process_Unit => Process_Unit); ------------------ -- Process_Unit -- ------------------ procedure Process_Unit (Context : App_Job_Context; Unit : Analysis_Unit) is pragma Unreferenced (Context); Filename : constant String := Unit.Get_Filename; Looking_For : constant String := "a-tags.ads"; begin if Filename'Length > Looking_For'Length and then Filename (Filename'Last - Looking_For'Length + 1 .. Filename'Last) = Looking_For then Put_Line ("Found " & Looking_For); end if; end Process_Unit; begin App.Run; end Main;
stcarrez/ada-lzma
Ada
20,387
ads
pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with Lzma.Vli; with System; with Lzma.Base; with Ada.Streams; package Lzma.Filter is LZMA_FILTERS_MAX : constant := 4; -- /usr/include/lzma/filter.h:26 --* -- * \file lzma/filter.h -- * \brief Common filter related types and functions -- -- * Author: Lasse Collin -- * -- * This file has been put into the public domain. -- * You can do whatever you want with this file. -- * -- * See ../lzma.h for information about liblzma as a whole. -- --* -- * \brief Maximum number of filters in a chain -- * -- * A filter chain can have 1-4 filters, of which three are allowed to change -- * the size of the data. Usually only one or two filters are needed. -- --* -- * \brief Filter options -- * -- * This structure is used to pass Filter ID and a pointer filter's -- * options to liblzma. A few functions work with a single lzma_filter -- * structure, while most functions expect a filter chain. -- * -- * A filter chain is indicated with an array of lzma_filter structures. -- * The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter -- * array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to -- * be able to hold any arbitrary filter chain. This is important when -- * using lzma_block_header_decode() from block.h, because too small -- * array would make liblzma write past the end of the filters array. -- --* -- * \brief Filter ID -- * -- * Use constants whose name begin with `LZMA_FILTER_' to specify -- * different filters. In an array of lzma_filter structures, use -- * LZMA_VLI_UNKNOWN to indicate end of filters. -- * -- * \note This is not an enum, because on some systems enums -- * cannot be 64-bit. -- type lzma_filter is record id : aliased Lzma.Vli.lzma_vli; -- /usr/include/lzma/filter.h:54 options : System.Address; -- /usr/include/lzma/filter.h:63 end record; pragma Convention (C_Pass_By_Copy, lzma_filter); -- /usr/include/lzma/filter.h:65 -- skipped anonymous struct anon_7 --* -- * \brief Pointer to filter-specific options structure -- * -- * If the filter doesn't need options, set this to NULL. If id is -- * set to LZMA_VLI_UNKNOWN, options is ignored, and thus -- * doesn't need be initialized. -- --* -- * \brief Test if the given Filter ID is supported for encoding -- * -- * Return true if the give Filter ID is supported for encoding by this -- * liblzma build. Otherwise false is returned. -- * -- * There is no way to list which filters are available in this particular -- * liblzma version and build. It would be useless, because the application -- * couldn't know what kind of options the filter would need. -- function lzma_filter_encoder_is_supported (id : Lzma.Vli.lzma_vli) return Lzma.Base.lzma_bool; -- /usr/include/lzma/filter.h:78 pragma Import (C, lzma_filter_encoder_is_supported, "lzma_filter_encoder_is_supported"); --* -- * \brief Test if the given Filter ID is supported for decoding -- * -- * Return true if the give Filter ID is supported for decoding by this -- * liblzma build. Otherwise false is returned. -- function lzma_filter_decoder_is_supported (id : Lzma.Vli.lzma_vli) return Lzma.Base.lzma_bool; -- /usr/include/lzma/filter.h:88 pragma Import (C, lzma_filter_decoder_is_supported, "lzma_filter_decoder_is_supported"); --* -- * \brief Copy the filters array -- * -- * Copy the Filter IDs and filter-specific options from src to dest. -- * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating -- * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least -- * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that -- * src is smaller than that. -- * -- * Unless the filter-specific options is NULL, the Filter ID has to be -- * supported by liblzma, because liblzma needs to know the size of every -- * filter-specific options structure. The filter-specific options are not -- * validated. If options is NULL, any unsupported Filter IDs are copied -- * without returning an error. -- * -- * Old filter-specific options in dest are not freed, so dest doesn't -- * need to be initialized by the caller in any way. -- * -- * If an error occurs, memory possibly already allocated by this function -- * is always freed. -- * -- * \return - LZMA_OK -- * - LZMA_MEM_ERROR -- * - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options -- * is not NULL. -- * - LZMA_PROG_ERROR: src or dest is NULL. -- function lzma_filters_copy (src : access constant lzma_filter; dest : access lzma_filter; allocator : access Lzma.Base.lzma_allocator) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:119 pragma Import (C, lzma_filters_copy, "lzma_filters_copy"); --* -- * \brief Calculate approximate memory requirements for raw encoder -- * -- * This function can be used to calculate the memory requirements for -- * Block and Stream encoders too because Block and Stream encoders don't -- * need significantly more memory than raw encoder. -- * -- * \param filters Array of filters terminated with -- * .id == LZMA_VLI_UNKNOWN. -- * -- * \return Number of bytes of memory required for the given -- * filter chain when encoding. If an error occurs, -- * for example due to unsupported filter chain, -- * UINT64_MAX is returned. -- function lzma_raw_encoder_memusage (filters : access constant lzma_filter) return Long_Long_Integer; -- /usr/include/lzma/filter.h:138 pragma Import (C, lzma_raw_encoder_memusage, "lzma_raw_encoder_memusage"); --* -- * \brief Calculate approximate memory requirements for raw decoder -- * -- * This function can be used to calculate the memory requirements for -- * Block and Stream decoders too because Block and Stream decoders don't -- * need significantly more memory than raw decoder. -- * -- * \param filters Array of filters terminated with -- * .id == LZMA_VLI_UNKNOWN. -- * -- * \return Number of bytes of memory required for the given -- * filter chain when decoding. If an error occurs, -- * for example due to unsupported filter chain, -- * UINT64_MAX is returned. -- function lzma_raw_decoder_memusage (filters : access constant lzma_filter) return Long_Long_Integer; -- /usr/include/lzma/filter.h:157 pragma Import (C, lzma_raw_decoder_memusage, "lzma_raw_decoder_memusage"); --* -- * \brief Initialize raw encoder -- * -- * This function may be useful when implementing custom file formats. -- * -- * \param strm Pointer to properly prepared lzma_stream -- * \param filters Array of lzma_filter structures. The end of the -- * array must be marked with .id = LZMA_VLI_UNKNOWN. -- * -- * The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the -- * filter chain supports it), or LZMA_FINISH. -- * -- * \return - LZMA_OK -- * - LZMA_MEM_ERROR -- * - LZMA_OPTIONS_ERROR -- * - LZMA_PROG_ERROR -- function lzma_raw_encoder (strm : access Lzma.Base.lzma_stream; filters : access constant lzma_filter) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:178 pragma Import (C, lzma_raw_encoder, "lzma_raw_encoder"); --* -- * \brief Initialize raw decoder -- * -- * The initialization of raw decoder goes similarly to raw encoder. -- * -- * The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using -- * LZMA_FINISH is not required, it is supported just for convenience. -- * -- * \return - LZMA_OK -- * - LZMA_MEM_ERROR -- * - LZMA_OPTIONS_ERROR -- * - LZMA_PROG_ERROR -- function lzma_raw_decoder (strm : access Lzma.Base.lzma_stream; filters : access constant lzma_filter) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:196 pragma Import (C, lzma_raw_decoder, "lzma_raw_decoder"); --* -- * \brief Update the filter chain in the encoder -- * -- * This function is for advanced users only. This function has two slightly -- * different purposes: -- * -- * - After LZMA_FULL_FLUSH when using Stream encoder: Set a new filter -- * chain, which will be used starting from the next Block. -- * -- * - After LZMA_SYNC_FLUSH using Raw, Block, or Stream encoder: Change -- * the filter-specific options in the middle of encoding. The actual -- * filters in the chain (Filter IDs) cannot be changed. In the future, -- * it might become possible to change the filter options without -- * using LZMA_SYNC_FLUSH. -- * -- * While rarely useful, this function may be called also when no data has -- * been compressed yet. In that case, this function will behave as if -- * LZMA_FULL_FLUSH (Stream encoder) or LZMA_SYNC_FLUSH (Raw or Block -- * encoder) had been used right before calling this function. -- * -- * \return - LZMA_OK -- * - LZMA_MEM_ERROR -- * - LZMA_MEMLIMIT_ERROR -- * - LZMA_OPTIONS_ERROR -- * - LZMA_PROG_ERROR -- function lzma_filters_update (strm : access Lzma.Base.lzma_stream; filters : access constant lzma_filter) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:227 pragma Import (C, lzma_filters_update, "lzma_filters_update"); --* -- * \brief Single-call raw encoder -- * -- * \param filters Array of lzma_filter structures. The end of the -- * array must be marked with .id = LZMA_VLI_UNKNOWN. -- * \param allocator lzma_allocator for custom allocator functions. -- * Set to NULL to use malloc() and free(). -- * \param in Beginning of the input buffer -- * \param in_size Size of the input buffer -- * \param out Beginning of the output buffer -- * \param out_pos The next byte will be written to out[*out_pos]. -- * *out_pos is updated only if encoding succeeds. -- * \param out_size Size of the out buffer; the first byte into -- * which no data is written to is out[out_size]. -- * -- * \return - LZMA_OK: Encoding was successful. -- * - LZMA_BUF_ERROR: Not enough output buffer space. -- * - LZMA_OPTIONS_ERROR -- * - LZMA_MEM_ERROR -- * - LZMA_DATA_ERROR -- * - LZMA_PROG_ERROR -- * -- * \note There is no function to calculate how big output buffer -- * would surely be big enough. (lzma_stream_buffer_bound() -- * works only for lzma_stream_buffer_encode(); raw encoder -- * won't necessarily meet that bound.) -- function lzma_raw_buffer_encode (filters : access constant lzma_filter; allocator : access Lzma.Base.lzma_allocator; c_in : access Ada.Streams.Stream_Element; in_size : Interfaces.C.size_t; c_out : access Ada.Streams.Stream_Element; out_pos : access Interfaces.C.size_t; out_size : Interfaces.C.size_t) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:258 pragma Import (C, lzma_raw_buffer_encode, "lzma_raw_buffer_encode"); --* -- * \brief Single-call raw decoder -- * -- * \param filters Array of lzma_filter structures. The end of the -- * array must be marked with .id = LZMA_VLI_UNKNOWN. -- * \param allocator lzma_allocator for custom allocator functions. -- * Set to NULL to use malloc() and free(). -- * \param in Beginning of the input buffer -- * \param in_pos The next byte will be read from in[*in_pos]. -- * *in_pos is updated only if decoding succeeds. -- * \param in_size Size of the input buffer; the first byte that -- * won't be read is in[in_size]. -- * \param out Beginning of the output buffer -- * \param out_pos The next byte will be written to out[*out_pos]. -- * *out_pos is updated only if encoding succeeds. -- * \param out_size Size of the out buffer; the first byte into -- * which no data is written to is out[out_size]. -- function lzma_raw_buffer_decode (filters : access constant lzma_filter; allocator : access Lzma.Base.lzma_allocator; c_in : access Ada.Streams.Stream_Element; in_pos : access Interfaces.C.size_t; in_size : Interfaces.C.size_t; c_out : access Ada.Streams.Stream_Element; out_pos : access Interfaces.C.size_t; out_size : Interfaces.C.size_t) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:282 pragma Import (C, lzma_raw_buffer_decode, "lzma_raw_buffer_decode"); --* -- * \brief Get the size of the Filter Properties field -- * -- * This function may be useful when implementing custom file formats -- * using the raw encoder and decoder. -- * -- * \param size Pointer to uint32_t to hold the size of the properties -- * \param filter Filter ID and options (the size of the properties may -- * vary depending on the options) -- * -- * \return - LZMA_OK -- * - LZMA_OPTIONS_ERROR -- * - LZMA_PROG_ERROR -- * -- * \note This function validates the Filter ID, but does not -- * necessarily validate the options. Thus, it is possible -- * that this returns LZMA_OK while the following call to -- * lzma_properties_encode() returns LZMA_OPTIONS_ERROR. -- function lzma_properties_size (size : access Interfaces.C.unsigned; filter : access constant lzma_filter) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:307 pragma Import (C, lzma_properties_size, "lzma_properties_size"); --* -- * \brief Encode the Filter Properties field -- * -- * \param filter Filter ID and options -- * \param props Buffer to hold the encoded options. The size of -- * buffer must have been already determined with -- * lzma_properties_size(). -- * -- * \return - LZMA_OK -- * - LZMA_OPTIONS_ERROR -- * - LZMA_PROG_ERROR -- * -- * \note Even this function won't validate more options than actually -- * necessary. Thus, it is possible that encoding the properties -- * succeeds but using the same options to initialize the encoder -- * will fail. -- * -- * \note If lzma_properties_size() indicated that the size -- * of the Filter Properties field is zero, calling -- * lzma_properties_encode() is not required, but it -- * won't do any harm either. -- function lzma_properties_encode (filter : access constant lzma_filter; props : access Ada.Streams.Stream_Element) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:333 pragma Import (C, lzma_properties_encode, "lzma_properties_encode"); --* -- * \brief Decode the Filter Properties field -- * -- * \param filter filter->id must have been set to the correct -- * Filter ID. filter->options doesn't need to be -- * initialized (it's not freed by this function). The -- * decoded options will be stored to filter->options. -- * filter->options is set to NULL if there are no -- * properties or if an error occurs. -- * \param allocator Custom memory allocator used to allocate the -- * options. Set to NULL to use the default malloc(), -- * and in case of an error, also free(). -- * \param props Input buffer containing the properties. -- * \param props_size Size of the properties. This must be the exact -- * size; giving too much or too little input will -- * return LZMA_OPTIONS_ERROR. -- * -- * \return - LZMA_OK -- * - LZMA_OPTIONS_ERROR -- * - LZMA_MEM_ERROR -- function lzma_properties_decode (filter : access lzma_filter; allocator : access Lzma.Base.lzma_allocator; props : access Ada.Streams.Stream_Element; props_size : Interfaces.C.size_t) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:358 pragma Import (C, lzma_properties_decode, "lzma_properties_decode"); --* -- * \brief Calculate encoded size of a Filter Flags field -- * -- * Knowing the size of Filter Flags is useful to know when allocating -- * memory to hold the encoded Filter Flags. -- * -- * \param size Pointer to integer to hold the calculated size -- * \param filter Filter ID and associated options whose encoded -- * size is to be calculated -- * -- * \return - LZMA_OK: *size set successfully. Note that this doesn't -- * guarantee that filter->options is valid, thus -- * lzma_filter_flags_encode() may still fail. -- * - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options. -- * - LZMA_PROG_ERROR: Invalid options -- * -- * \note If you need to calculate size of List of Filter Flags, -- * you need to loop over every lzma_filter entry. -- function lzma_filter_flags_size (size : access Interfaces.C.unsigned; filter : access constant lzma_filter) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:382 pragma Import (C, lzma_filter_flags_size, "lzma_filter_flags_size"); --* -- * \brief Encode Filter Flags into given buffer -- * -- * In contrast to some functions, this doesn't allocate the needed buffer. -- * This is due to how this function is used internally by liblzma. -- * -- * \param filter Filter ID and options to be encoded -- * \param out Beginning of the output buffer -- * \param out_pos out[*out_pos] is the next write position. This -- * is updated by the encoder. -- * \param out_size out[out_size] is the first byte to not write. -- * -- * \return - LZMA_OK: Encoding was successful. -- * - LZMA_OPTIONS_ERROR: Invalid or unsupported options. -- * - LZMA_PROG_ERROR: Invalid options or not enough output -- * buffer space (you should have checked it with -- * lzma_filter_flags_size()). -- function lzma_filter_flags_encode (filter : access constant lzma_filter; c_out : access Ada.Streams.Stream_Element; out_pos : access Interfaces.C.size_t; out_size : Interfaces.C.size_t) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:405 pragma Import (C, lzma_filter_flags_encode, "lzma_filter_flags_encode"); --* -- * \brief Decode Filter Flags from given buffer -- * -- * The decoded result is stored into *filter. The old value of -- * filter->options is not free()d. -- * -- * \return - LZMA_OK -- * - LZMA_OPTIONS_ERROR -- * - LZMA_MEM_ERROR -- * - LZMA_PROG_ERROR -- function lzma_filter_flags_decode (filter : access lzma_filter; allocator : access Lzma.Base.lzma_allocator; c_in : access Ada.Streams.Stream_Element; in_pos : access Interfaces.C.size_t; in_size : Interfaces.C.size_t) return Lzma.Base.lzma_ret; -- /usr/include/lzma/filter.h:421 pragma Import (C, lzma_filter_flags_decode, "lzma_filter_flags_decode"); end Lzma.Filter;
charlie5/cBound
Ada
1,679
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_glx_get_polygon_stipple_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; minor_opcode : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; context_tag : aliased xcb.xcb_glx_context_tag_t; lsb_first : aliased Interfaces.Unsigned_8; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_glx_get_polygon_stipple_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_polygon_stipple_request_t.Item, Element_Array => xcb.xcb_glx_get_polygon_stipple_request_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C .size_t range <>) of aliased xcb .xcb_glx_get_polygon_stipple_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_polygon_stipple_request_t.Pointer, Element_Array => xcb.xcb_glx_get_polygon_stipple_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_get_polygon_stipple_request_t;
faelys/natools
Ada
190
ads
package Natools.Static_Maps.S_Expressions.Templates.Integers.MC is pragma Pure; function Hash (S : String) return Natural; end Natools.Static_Maps.S_Expressions.Templates.Integers.MC;
strenkml/EE368
Ada
61
ads
package Test.SPM is procedure Run_Tests; end Test.SPM;
AdaCore/ada-traits-containers
Ada
2,390
adb
-- -- Copyright (C) 2016, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- pragma Ada_2012; package body Conts.Functional.Sequences with SPARK_Mode => Off is use Containers; pragma Assertion_Policy (Pre => Suppressible, Ghost => Suppressible, Post => Ignore); --------- -- "=" -- --------- function "=" (S1, S2 : Sequence) return Boolean is (S1.Content = S2.Content); --------- -- Add -- --------- function Add (S : Sequence; E : Element_Type) return Sequence is (Content => Add (S.Content, E)); --------- -- Get -- --------- function Get (S : Sequence; N : Extended_Index) return Element_Type is (Get (S.Content, N)); ------------ -- Is_Add -- ------------ function Is_Add (S : Sequence; E : Element_Type; Result : Sequence) return Boolean is (Length (Result) = Length (S) + 1 and then Get (Result, Index_Type'Val ((Index_Type'Pos (Index_Type'First) - 1) + Length (Result))) = E and then (for all M in Index_Type'First .. (Index_Type'Val ((Index_Type'Pos (Index_Type'First) - 1) + Length (S))) => Get (Result, M) = Get (S, M))); ------------ -- Is_Set -- ------------ function Is_Set (S : Sequence; N : Index_Type; E : Element_Type; Result : Sequence) return Boolean is (N in Index_Type'First .. (Index_Type'Val ((Index_Type'Pos (Index_Type'First) - 1) + Length (S))) and then Length (Result) = Length (S) and then Get (Result, N) = E and then (for all M in Index_Type'First .. (Index_Type'Val ((Index_Type'Pos (Index_Type'First) - 1) + Length (S))) => (if M /= N then Get (Result, M) = Get (S, M)))); ---------- -- Last -- ---------- function Last (S : Sequence) return Extended_Index is (Index_Type'Val ((Index_Type'Pos (Index_Type'First) - 1) + Length (S))); ------------ -- Length -- ------------ function Length (S : Sequence) return Count_Type is (Length (S.Content)); --------- -- Set -- --------- function Set (S : Sequence; N : Index_Type; E : Element_Type) return Sequence is (Content => Set (S.Content, N, E)); end Conts.Functional.Sequences;
Rodeo-McCabe/orka
Ada
6,101
adb
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2018 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Ada.Real_Time; with Ada.Text_IO; with GL.Barriers; with GL.Compute; with GL.Types.Compute; with Orka.Contexts; with Orka.Debug; with Orka.Rendering.Buffers; with Orka.Rendering.Programs.Modules; with Orka.Rendering.Programs.Uniforms; with Orka.Resources.Locations.Directories; with Orka.Types; with Orka.Windows.GLFW; procedure Orka_Test.Test_10_Compute is Library : constant Orka.Contexts.Library'Class := Orka.Windows.GLFW.Initialize (Major => 3, Minor => 2, Debug => True); Window : aliased Orka.Windows.Window'Class := Library.Create_Window (1, 1, Visible => False); Context : constant Orka.Contexts.Context'Class := Window.Context; pragma Unreferenced (Context); ---------------------------------------------------------------------- use Ada.Text_IO; use type GL.Types.Int; use GL.Types; Numbers : constant Int_Array := (10, 1, 8, -1, 0, -2, 3, 5, -2, -3, 2, 7, 0, 11, 0, 2); begin Orka.Debug.Set_Log_Messages (Enable => True); declare use Orka.Rendering.Buffers; use Orka.Rendering.Programs; use Orka.Resources; Location_Shaders : constant Locations.Location_Ptr := Locations.Directories.Create_Location ("../examples/orka/shaders"); Program_1 : Program := Create_Program (Modules.Create_Module (Location_Shaders, CS => "test-10-module-1.comp")); Uniform_1 : constant Uniforms.Uniform := Program_1.Uniform ("maxNumbers"); Max_Work_Groups, Local_Size : Size; begin Program_1.Use_Program; -- Print some limits about compute shaders Put_Line ("Maximum shared size:" & Size'Image (GL.Compute.Max_Compute_Shared_Memory_Size)); Put_Line ("Maximum invocations:" & Size'Image (GL.Compute.Max_Compute_Work_Group_Invocations)); declare R : GL.Types.Compute.Dimension_Size_Array; begin R := GL.Compute.Max_Compute_Work_Group_Count; Put_Line ("Maximum count:" & R (GL.X)'Image & R (GL.Y)'Image & R (GL.Z)'Image); Max_Work_Groups := R (GL.X); R := GL.Compute.Max_Compute_Work_Group_Size; Put_Line ("Maximum size: " & R (GL.X)'Image & R (GL.Y)'Image & R (GL.Z)'Image); R := Program_1.Compute_Work_Group_Size; Put_Line ("Local size: " & R (GL.X)'Image & R (GL.Y)'Image & R (GL.Z)'Image); Local_Size := R (GL.X); end; declare use all type Orka.Types.Element_Type; use type Ada.Real_Time.Time; Factor : constant Size := (Max_Work_Groups * Local_Size) / Numbers'Length; Buffer_1 : constant Buffer := Create_Buffer (Flags => (Dynamic_Storage => True, others => False), Kind => Int_Type, Length => Numbers'Length * Natural (Factor)); A, B : Ada.Real_Time.Time; procedure Memory_Barrier is begin GL.Barriers.Memory_Barrier ((By_Region => False, Shader_Storage | Buffer_Update => True, others => False)); end Memory_Barrier; begin Put_Line ("Factor:" & Factor'Image); -- Upload numbers to SSBO for Index in 0 .. Factor - 1 loop Buffer_1.Set_Data (Data => Numbers, Offset => Numbers'Length * Natural (Index)); end loop; Buffer_1.Bind (Shader_Storage, 0); A := Ada.Real_Time.Clock; declare Count : constant Size := Size (Buffer_1.Length); Ceiling : Size := Count + (Count rem Local_Size); Groups : Size := Ceiling / Local_Size; begin Put_Line ("Numbers:" & Count'Image); Put_Line ("Groups: " & Groups'Image); pragma Assert (Groups <= Max_Work_Groups); -- The uniform is used to set how many numbers need to be -- summed. If a work group has more threads than there are -- numbers to be summed (happens in the last iteration), -- then these threads will use the number 0 in the shader. Uniform_1.Set_UInt (UInt (Count)); while Groups > 0 loop -- Add an SSBO barrier for the next iteration -- and then dispatch the compute shader Memory_Barrier; GL.Compute.Dispatch_Compute (X => UInt (Groups)); Uniform_1.Set_UInt (UInt (Groups)); Ceiling := Groups + (Groups rem Local_Size); Groups := Ceiling / Local_Size; end loop; -- Perform last iteration. Work groups in X dimension needs -- to be at least one. Memory_Barrier; GL.Compute.Dispatch_Compute (X => UInt (Size'Max (1, Groups))); end; Memory_Barrier; declare Output : Int_Array (1 .. 2) := (others => 0); begin Buffer_1.Get_Data (Output); Put_Line ("Expected Sum:" & Size'Image (Factor * 41)); Put_Line ("Computed sum:" & Output (Output'First)'Image); -- Print the number of shader invocations that execute in -- lockstep. This requires the extension ARB_shader_ballot -- in the shader. Put_Line ("Sub-group size:" & Output (Output'Last)'Image); end; B := Ada.Real_Time.Clock; Put_Line (Duration'Image (1e3 * Ada.Real_Time.To_Duration (B - A)) & " ms"); end; end; end Orka_Test.Test_10_Compute;
sungyeon/drake
Ada
3,686
ads
pragma License (Unrestricted); -- implementation unit specialized for POSIX (Darwin, FreeBSD, or Linux) with Ada.IO_Exceptions; with Ada.IO_Modes; with Ada.Streams; with System.Native_IO; with C.termios; package System.Native_Text_IO is pragma Preelaborate; subtype Handle_Type is Native_IO.Handle_Type; -- file management Default_External : constant Ada.IO_Modes.File_External := Ada.IO_Modes.UTF_8; Default_New_Line : constant Ada.IO_Modes.File_New_Line := Ada.IO_Modes.LF; type Packed_Form is record Stream_Form : Native_IO.Packed_Form; External : Ada.IO_Modes.File_External_Spec; New_Line : Ada.IO_Modes.File_New_Line_Spec; end record; pragma Suppress_Initialization (Packed_Form); pragma Pack (Packed_Form); -- read / write subtype Buffer_Type is String (1 .. 6); -- one code-point of UTF-8 subtype DBCS_Buffer_Type is String (1 .. 6); -- unused procedure To_UTF_8 ( Buffer : aliased DBCS_Buffer_Type; Last : Natural; Out_Buffer : out Buffer_Type; Out_Last : out Natural) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure To_DBCS ( Buffer : Buffer_Type; Last : Natural; Out_Buffer : aliased out DBCS_Buffer_Type; Out_Last : out Natural) with Import, Convention => Ada, External_Name => "__drake_program_error"; procedure Write_Just ( Handle : Handle_Type; Item : String); -- terminal procedure Terminal_Get ( Handle : Handle_Type; Item : Address; Length : Ada.Streams.Stream_Element_Offset; Out_Length : out Ada.Streams.Stream_Element_Offset) -- -1 when error renames Native_IO.Read; procedure Terminal_Get_Immediate ( Handle : Handle_Type; Item : Address; Length : Ada.Streams.Stream_Element_Offset; Out_Length : out Ada.Streams.Stream_Element_Offset) -- -1 when error renames Native_IO.Read; procedure Terminal_Put ( Handle : Handle_Type; Item : Address; Length : Ada.Streams.Stream_Element_Offset; Out_Length : out Ada.Streams.Stream_Element_Offset) -- -1 when error renames Native_IO.Write; procedure Terminal_Size ( Handle : Handle_Type; Line_Length, Page_Length : out Natural); procedure Set_Terminal_Size ( Handle : Handle_Type; Line_Length, Page_Length : Natural); procedure Terminal_View ( Handle : Handle_Type; Left, Top : out Positive; Right, Bottom : out Natural); function Use_Terminal_Position (Handle : Handle_Type) return Boolean; procedure Terminal_Position ( Handle : Handle_Type; Col, Line : out Positive); procedure Set_Terminal_Position ( Handle : Handle_Type; Col, Line : Positive); procedure Set_Terminal_Col ( Handle : Handle_Type; To : Positive); procedure Terminal_Clear ( Handle : Handle_Type); subtype Setting is C.termios.struct_termios; procedure Set_Non_Canonical_Mode ( Handle : Handle_Type; Wait : Boolean; Saved_Settings : aliased out Setting); procedure Restore ( Handle : Handle_Type; Settings : aliased Setting); subtype Output_State is Natural; -- stacking count procedure Save_State (Handle : Handle_Type; To_State : out Output_State); procedure Reset_State (Handle : Handle_Type; From_State : Output_State); -- exceptions Status_Error : exception renames Ada.IO_Exceptions.Status_Error; Device_Error : exception renames Ada.IO_Exceptions.Device_Error; Data_Error : exception renames Ada.IO_Exceptions.Data_Error; end System.Native_Text_IO;
reznikmm/matreshka
Ada
4,359
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.Transformations.UML_Profile_To_CMOF.Contexts; with AMF.Transformations.UML_Profile_To_CMOF.Stage_1; with AMF.Transformations.UML_Profile_To_CMOF.Stage_2; with AMF.Visitors.UML_Containment; package body AMF.Transformations.UML_Profile_To_CMOF is --------------- -- Transform -- --------------- function Transform (Source : not null AMF.Extents.Extent_Access) return not null AMF.Extents.Extent_Access is Context : aliased Contexts.Transformation_Context; Iterator : AMF.Visitors.UML_Containment.UML_Containment_Iterator; Transformer_1 : Stage_1.Transformer (Context'Access); Transformer_2 : Stage_2.Transformer (Context'Access); begin -- Initialize context. Context.Initialize; -- Do transformation. Iterator.Visit (Transformer_1, Source); Iterator.Visit (Transformer_2, Source); return AMF.Extents.Extent_Access (Context.Destination); end Transform; end AMF.Transformations.UML_Profile_To_CMOF;
charlie5/lace
Ada
4,420
adb
with gel.World.simple, gel.Camera.forge, gel.Events, lace.Event.utility; package body gel.Applet.gui_and_sim_world is procedure define (Self : access Item; Name : in String; use_Window : in gel.Window.view) is pragma Unreferenced (use_Window); use lace.Event.utility; begin declare the_world_Info : constant world_Info_view := new world_Info; the_Camera : constant gel.Camera.view := gel.Camera.forge.new_Camera; begin the_world_Info.World := gel.World.simple.forge.new_World (Name, gui_world_Id, space_Kind => physics.Bullet, Renderer => Self.Renderer).all'Access; the_world_Info.World.register (Self.all'unchecked_Access, to_Kind (gel.events.new_sprite_added_to_world_Event'Tag)); the_Camera.Viewport_is (Self.Window.Width, Self.Window.Height); the_Camera.Renderer_is (Self.Renderer); the_Camera.Site_is ([0.0, 5.0, 5.0]); the_world_Info.Cameras.append (the_Camera); Self.Worlds .append (the_world_Info); Self.local_Subject_and_Observer.add (the_add_new_sprite_Response'Access, to_Kind (gel.events.new_sprite_added_to_world_Event'Tag), the_world_Info.World.Name); the_world_Info.World.start; end; declare the_world_Info : constant world_Info_view := new world_Info; the_Camera : constant gel.Camera.View := gel.Camera.forge.new_Camera; begin the_world_Info.World := gel.World.simple.forge.new_World (Name => Name, Id => sim_world_Id, space_Kind => physics.Bullet, Renderer => Self.Renderer).all'Access; the_world_Info.World.register (the_Observer => Self.all'unchecked_Access, of_Kind => to_Kind (gel.events.new_sprite_added_to_world_Event'Tag)); the_Camera.Viewport_is (Self.Window.Width, Self.Window.Height); the_Camera.Renderer_is (Self.Renderer); the_Camera.Site_is ([0.0, 5.0, 5.0]); the_world_Info.Cameras.append (the_Camera); Self.Worlds .append (the_world_Info); Self.local_Subject_and_Observer.add (the_add_new_sprite_Response'Access, to_Kind (gel.events.new_sprite_added_to_world_Event'Tag), the_world_Info.World.Name); the_world_Info.World.start; end; end define; package body Forge is function to_Applet (Name : in String; use_Window : in gel.Window.view) return Item is begin return Self : Item := (gel.Applet.Forge.to_Applet (Name, use_Window) with null record) do define (Self'unchecked_Access, Name, use_Window); end return; end to_Applet; function new_Applet (Name : in String; use_Window : in gel.Window.view) return View is Self : constant View := new Item' (to_Applet (Name, use_Window)); begin return Self; end new_Applet; end Forge; function sim_World (Self : in Item) return gel.World.view is begin return Self.World (sim_world_Id); end sim_World; function sim_Camera (Self : in Item) return gel.Camera.view is begin return Self.Camera (sim_world_Id, sim_camera_Id); end sim_Camera; function gui_World (Self : in Item) return gel.World.view is begin return Self.World (gui_world_Id); end gui_World; function gui_Camera (Self : in Item) return gel.Camera.view is begin return Self.Camera (gui_world_Id, gui_camera_Id); end gui_Camera; end gel.Applet.gui_and_sim_world;
reznikmm/matreshka
Ada
3,971
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.DOM.Chart_Class_Attributes; package Matreshka.ODF_Chart.Class_Attributes is type Chart_Class_Attribute_Node is new Matreshka.ODF_Chart.Abstract_Chart_Attribute_Node and ODF.DOM.Chart_Class_Attributes.ODF_Chart_Class_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Chart_Class_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Chart_Class_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Chart.Class_Attributes;
reznikmm/matreshka
Ada
18,906
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.Internals.UML_Named_Elements; with AMF.UML.Activities; with AMF.UML.Activity_Edges.Collections; with AMF.UML.Activity_Groups.Collections; with AMF.UML.Activity_Nodes.Collections; with AMF.UML.Activity_Partitions.Collections; with AMF.UML.Behaviors; with AMF.UML.Classifiers.Collections; with AMF.UML.Dependencies.Collections; with AMF.UML.Expansion_Nodes; with AMF.UML.Expansion_Regions; with AMF.UML.Interruptible_Activity_Regions.Collections; with AMF.UML.Named_Elements; with AMF.UML.Namespaces; with AMF.UML.Packages.Collections; with AMF.UML.Redefinable_Elements.Collections; with AMF.UML.States.Collections; with AMF.UML.String_Expressions; with AMF.UML.Structured_Activity_Nodes; with AMF.UML.Types; with AMF.UML.Value_Specifications; with AMF.Visitors; package AMF.Internals.UML_Expansion_Nodes is type UML_Expansion_Node_Proxy is limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy and AMF.UML.Expansion_Nodes.UML_Expansion_Node with null record; overriding function Get_Region_As_Input (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Expansion_Regions.UML_Expansion_Region_Access; -- Getter of ExpansionNode::regionAsInput. -- -- The expansion region for which the node is an input. overriding procedure Set_Region_As_Input (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.Expansion_Regions.UML_Expansion_Region_Access); -- Setter of ExpansionNode::regionAsInput. -- -- The expansion region for which the node is an input. overriding function Get_Region_As_Output (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Expansion_Regions.UML_Expansion_Region_Access; -- Getter of ExpansionNode::regionAsOutput. -- -- The expansion region for which the node is an output. overriding procedure Set_Region_As_Output (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.Expansion_Regions.UML_Expansion_Region_Access); -- Setter of ExpansionNode::regionAsOutput. -- -- The expansion region for which the node is an output. overriding function Get_In_State (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.States.Collections.Set_Of_UML_State; -- Getter of ObjectNode::inState. -- -- The required states of the object available at this point in the -- activity. overriding function Get_Is_Control_Type (Self : not null access constant UML_Expansion_Node_Proxy) return Boolean; -- Getter of ObjectNode::isControlType. -- -- Tells whether the type of the object node is to be treated as control. overriding procedure Set_Is_Control_Type (Self : not null access UML_Expansion_Node_Proxy; To : Boolean); -- Setter of ObjectNode::isControlType. -- -- Tells whether the type of the object node is to be treated as control. overriding function Get_Ordering (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.UML_Object_Node_Ordering_Kind; -- Getter of ObjectNode::ordering. -- -- Tells whether and how the tokens in the object node are ordered for -- selection to traverse edges outgoing from the object node. overriding procedure Set_Ordering (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.UML_Object_Node_Ordering_Kind); -- Setter of ObjectNode::ordering. -- -- Tells whether and how the tokens in the object node are ordered for -- selection to traverse edges outgoing from the object node. overriding function Get_Selection (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Behaviors.UML_Behavior_Access; -- Getter of ObjectNode::selection. -- -- Selects tokens for outgoing edges. overriding procedure Set_Selection (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.Behaviors.UML_Behavior_Access); -- Setter of ObjectNode::selection. -- -- Selects tokens for outgoing edges. overriding function Get_Upper_Bound (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Value_Specifications.UML_Value_Specification_Access; -- Getter of ObjectNode::upperBound. -- -- The maximum number of tokens allowed in the node. Objects cannot flow -- into the node if the upper bound is reached. overriding procedure Set_Upper_Bound (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); -- Setter of ObjectNode::upperBound. -- -- The maximum number of tokens allowed in the node. Objects cannot flow -- into the node if the upper bound is reached. overriding function Get_Activity (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Activities.UML_Activity_Access; -- Getter of ActivityNode::activity. -- -- Activity containing the node. overriding procedure Set_Activity (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.Activities.UML_Activity_Access); -- Setter of ActivityNode::activity. -- -- Activity containing the node. overriding function Get_In_Group (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group; -- Getter of ActivityNode::inGroup. -- -- Groups containing the node. overriding function Get_In_Interruptible_Region (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region; -- Getter of ActivityNode::inInterruptibleRegion. -- -- Interruptible regions containing the node. overriding function Get_In_Partition (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition; -- Getter of ActivityNode::inPartition. -- -- Partitions containing the node. overriding function Get_In_Structured_Node (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access; -- Getter of ActivityNode::inStructuredNode. -- -- Structured activity node containing the node. overriding procedure Set_In_Structured_Node (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access); -- Setter of ActivityNode::inStructuredNode. -- -- Structured activity node containing the node. overriding function Get_Incoming (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; -- Getter of ActivityNode::incoming. -- -- Edges that have the node as target. overriding function Get_Outgoing (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; -- Getter of ActivityNode::outgoing. -- -- Edges that have the node as source. overriding function Get_Redefined_Node (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node; -- Getter of ActivityNode::redefinedNode. -- -- Inherited nodes replaced by this node in a specialization of the -- activity. overriding function Get_Is_Leaf (Self : not null access constant UML_Expansion_Node_Proxy) return Boolean; -- Getter of RedefinableElement::isLeaf. -- -- Indicates whether it is possible to further redefine a -- RedefinableElement. If the value is true, then it is not possible to -- further redefine the RedefinableElement. Note that this property is -- preserved through package merge operations; that is, the capability to -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in -- the resulting RedefinableElement of a package merge operation where a -- RedefinableElement with isLeaf=false is merged with a matching -- RedefinableElement with isLeaf=true: the resulting RedefinableElement -- will have isLeaf=false. Default value is false. overriding procedure Set_Is_Leaf (Self : not null access UML_Expansion_Node_Proxy; To : Boolean); -- Setter of RedefinableElement::isLeaf. -- -- Indicates whether it is possible to further redefine a -- RedefinableElement. If the value is true, then it is not possible to -- further redefine the RedefinableElement. Note that this property is -- preserved through package merge operations; that is, the capability to -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in -- the resulting RedefinableElement of a package merge operation where a -- RedefinableElement with isLeaf=false is merged with a matching -- RedefinableElement with isLeaf=true: the resulting RedefinableElement -- will have isLeaf=false. Default value is false. overriding function Get_Redefined_Element (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element; -- Getter of RedefinableElement::redefinedElement. -- -- The redefinable element that is being redefined by this element. overriding function Get_Redefinition_Context (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; -- Getter of RedefinableElement::redefinitionContext. -- -- References the contexts that this element may be redefined from. overriding function Get_Client_Dependency (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; -- Getter of NamedElement::clientDependency. -- -- Indicates the dependencies that reference the client. overriding function Get_Name_Expression (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access; -- Getter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding procedure Set_Name_Expression (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access); -- Setter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding function Get_Namespace (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Getter of NamedElement::namespace. -- -- Specifies the namespace that owns the NamedElement. overriding function Get_Qualified_Name (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.Optional_String; -- Getter of NamedElement::qualifiedName. -- -- A name which allows the NamedElement to be identified within a -- hierarchy of nested Namespaces. It is constructed from the names of the -- containing namespaces starting at the root of the hierarchy and ending -- with the name of the NamedElement itself. overriding function Get_Type (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Types.UML_Type_Access; -- Getter of TypedElement::type. -- -- The type of the TypedElement. -- This information is derived from the return result for this Operation. overriding procedure Set_Type (Self : not null access UML_Expansion_Node_Proxy; To : AMF.UML.Types.UML_Type_Access); -- Setter of TypedElement::type. -- -- The type of the TypedElement. -- This information is derived from the return result for this Operation. overriding function Is_Consistent_With (Self : not null access constant UML_Expansion_Node_Proxy; Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean; -- Operation RedefinableElement::isConsistentWith. -- -- The query isConsistentWith() specifies, for any two RedefinableElements -- in a context in which redefinition is possible, whether redefinition -- would be logically consistent. By default, this is false; this -- operation must be overridden for subclasses of RedefinableElement to -- define the consistency conditions. overriding function Is_Redefinition_Context_Valid (Self : not null access constant UML_Expansion_Node_Proxy; Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean; -- Operation RedefinableElement::isRedefinitionContextValid. -- -- The query isRedefinitionContextValid() specifies whether the -- redefinition contexts of this RedefinableElement are properly related -- to the redefinition contexts of the specified RedefinableElement to -- allow this element to redefine the other. By default at least one of -- the redefinition contexts of this element must be a specialization of -- at least one of the redefinition contexts of the specified element. overriding function All_Owning_Packages (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package; -- Operation NamedElement::allOwningPackages. -- -- The query allOwningPackages() returns all the directly or indirectly -- owning packages. overriding function Is_Distinguishable_From (Self : not null access constant UML_Expansion_Node_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean; -- Operation NamedElement::isDistinguishableFrom. -- -- The query isDistinguishableFrom() determines whether two NamedElements -- may logically co-exist within a Namespace. By default, two named -- elements are distinguishable if (a) they have unrelated types or (b) -- they have related types but different names. overriding function Namespace (Self : not null access constant UML_Expansion_Node_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Operation NamedElement::namespace. -- -- Missing derivation for NamedElement::/namespace : Namespace overriding procedure Enter_Element (Self : not null access constant UML_Expansion_Node_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Leave_Element (Self : not null access constant UML_Expansion_Node_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Visit_Element (Self : not null access constant UML_Expansion_Node_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of iterator interface. end AMF.Internals.UML_Expansion_Nodes;
Rodeo-McCabe/orka
Ada
1,412
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2019 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. private with Ada.Real_Time; package Orka.Inputs.Joysticks.Tapping is type Button_Tap_Detector is tagged private; function Create_Tap_Detector (Button : Button_Index; Max_Delta : Duration) return Button_Tap_Detector; -- Return a button tap detector for the given button index function Detect_Activation (Object : in out Button_Tap_Detector; Joystick : Joystick_Input'Class) return Boolean; -- Return True if the button is tapped rapidly, False otherwise private type Button_Tap_Detector is tagged record Button : Button_Index; Max_Delta : Ada.Real_Time.Time_Span; Last_Press : Ada.Real_Time.Time; Active : Boolean; end record; end Orka.Inputs.Joysticks.Tapping;
zhmu/ananas
Ada
4,687
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . I M G _ U T I L -- -- -- -- S p e c -- -- -- -- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides some common utilities used by the s-imgxxx files package System.Img_Util is pragma Pure; Max_Real_Image_Length : constant := 5200; -- If Exp is set to zero and Aft is set to Text_IO.Field'Last (i.e., 255) -- then Long_Long_Float'Last generates an image whose length is slightly -- less than 5200. procedure Set_Decimal_Digits (Digs : in out String; NDigs : Natural; S : out String; P : in out Natural; Scale : Integer; Fore : Natural; Aft : Natural; Exp : Natural); -- Sets the image of Digs (1 .. NDigs), which is a string of decimal digits -- preceded by either a minus sign or a space, i.e. the integer image of -- the value in units of delta if this is for a decimal fixed point type -- with the given Scale, or the integer image of the value converted to an -- implicit decimal fixed point type with the given Scale if this is for an -- ordinary fixed point type, starting at S (P + 1), updating P to point to -- the last character stored. The caller promises that the buffer is large -- enough and therefore no check is made for it. Constraint_Error will not -- necessarily be raised if the requirement is violated since it is valid -- to compile this unit with checks off. The Fore, Aft and Exp values can -- be set to any valid values for the case of use by Text_IO.Decimal_IO or -- Text_IO.Fixed_IO. Note that there is no leading space stored. The call -- may destroy the value in Digs, which is why Digs is in-out (this happens -- if rounding is required). type Floating_Invalid_Value is (Minus_Infinity, Infinity, Not_A_Number); procedure Set_Floating_Invalid_Value (V : Floating_Invalid_Value; S : out String; P : in out Natural; Fore : Natural; Aft : Natural; Exp : Natural); -- Sets the image of a floating-point invalid value, starting at S (P + 1), -- updating P to point to the last character stored. The caller promises -- that the buffer is large enough and therefore no check is made for it. -- Constraint_Error will not necessarily be raised if the requirement is -- violated since it is valid to compile this unit with checks off. end System.Img_Util;
AdaCore/Ada_Drivers_Library
Ada
4,042
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- Display Serial Interface package HAL.DSI is pragma Preelaborate; subtype DSI_Virtual_Channel_ID is UInt2; type DSI_Data is array (Positive range <>) of UInt8; type DSI_Pkt_Data_Type is (DCS_Short_Pkt_Write_P0, -- DCS Short write, no parameter DCS_Short_Pkt_Write_P1, -- DCS Short write, one parameter Gen_Short_Pkt_Write_P0, -- Generic Short write, no parameter Gen_Short_Pkt_Write_P1, -- Generic Short write, one parameter Gen_Short_Pkt_Write_P2, -- Generic Short write, two parameters DCS_Long_Pkt_Write, -- DCS Long write Gen_Long_Pkt_Write, -- Generic Long write DCS_Short_Pkt_Read, -- DCS Short read Gen_Short_Pkg_Read_P0, -- Gen read, no parameter Gen_Short_Pkg_Read_P1, -- Gen read, one parameter Gen_Short_Pkg_Read_P2); -- Gen read, two parameter subtype DSI_Short_Write_Packet_Data_Type is DSI_Pkt_Data_Type range DCS_Short_Pkt_Write_P0 .. Gen_Short_Pkt_Write_P2; subtype DSI_Long_Write_Packet_Data_Type is DSI_Pkt_Data_Type range DCS_Long_Pkt_Write .. Gen_Long_Pkt_Write; type DSI_Port is limited interface; type Any_DSI_Port is access all DSI_Port'Class; procedure DSI_Short_Write (Port : in out DSI_Port; Channel_ID : DSI_Virtual_Channel_ID; Mode : DSI_Short_Write_Packet_Data_Type; Param1 : UInt8; Param2 : UInt8) is abstract; procedure DSI_Long_Write (Port : in out DSI_Port; Channel_Id : DSI_Virtual_Channel_ID; Mode : DSI_Long_Write_Packet_Data_Type; Param1 : UInt8; Parameters : DSI_Data) is abstract; end HAL.DSI;
reznikmm/matreshka
Ada
4,614
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Svg.Font_Variant_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Svg_Font_Variant_Attribute_Node is begin return Self : Svg_Font_Variant_Attribute_Node do Matreshka.ODF_Svg.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Svg_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Svg_Font_Variant_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Font_Variant_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Svg_URI, Matreshka.ODF_String_Constants.Font_Variant_Attribute, Svg_Font_Variant_Attribute_Node'Tag); end Matreshka.ODF_Svg.Font_Variant_Attributes;
stcarrez/ada-wiki
Ada
2,553
ads
----------------------------------------------------------------------- -- wiki-streams-builders -- Wiki writer to a string builder -- Copyright (C) 2011, 2012, 2013, 2015, 2016 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Wiki.Strings; -- === Output Builder Stream == -- The <tt>Output_Builder_Stream</tt> is a concrete in-memory output stream. -- It collects the output in a <tt>Wiki.Strings.Bstring</tt> object and the -- content can be retrieved at the end by using the <tt>To_String</tt> -- or <tt>Iterate</tt> operation. package Wiki.Streams.Builders is type Output_Builder_Stream is limited new Output_Stream with private; type Output_Builder_Stream_Access is access all Output_Builder_Stream'Class; -- Write the content to the string builder. overriding procedure Write (Stream : in out Output_Builder_Stream; Content : in Wiki.Strings.WString); -- Write a single character to the string builder. overriding procedure Write (Stream : in out Output_Builder_Stream; Content : in Wiki.Strings.WChar); -- Write the string to the string builder. procedure Write_String (Stream : in out Output_Builder_Stream; Content : in String); -- Iterate over the buffer content calling the <tt>Process</tt> procedure with each -- chunk. procedure Iterate (Source : in Output_Builder_Stream; Process : not null access procedure (Chunk : in Wiki.Strings.WString)); -- Convert what was collected in the writer builder to a string and return it. function To_String (Source : in Output_Builder_Stream) return String; private BLOCK_SIZE : constant Positive := 512; type Output_Builder_Stream is limited new Output_Stream with record Content : Wiki.Strings.BString (BLOCK_SIZE); end record; end Wiki.Streams.Builders;
stcarrez/hyperion
Ada
6,836
ads
-- Hyperion API -- Hyperion Monitoring API The monitoring agent is first registered so that the server knows it as well as its security key. Each host are then registered by a monitoring agent. -- -- The version of the OpenAPI document: 1.0.0 -- Contact: [email protected] -- -- NOTE: This package is auto generated by OpenAPI-Generator 4.1.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. with Swagger.Servers; with Hyperion.Rest.Models; with Security.Permissions; package Hyperion.Rest.Skeletons is use Hyperion.Rest.Models; type Server_Type is limited interface; -- Register a new monitoring agent package ACL_Agent_Register is new Security.Permissions.Definition ("agent:register"); -- Register and create a host package ACL_Create_Host is new Security.Permissions.Definition ("create:host"); -- Update a new host package ACL_Write_Host is new Security.Permissions.Definition ("write:host"); -- Read a host information package ACL_Host_Read is new Security.Permissions.Definition ("host:read"); -- Register a monitoring agent -- Register a new monitoring agent in the system procedure Register_Agent (Server : in out Server_Type; Name : in Swagger.UString; Ip : in Swagger.UString; Agent_Key : in Swagger.UString; Result : out Hyperion.Rest.Models.Agent_Type; Context : in out Swagger.Servers.Context_Type) is abstract; -- Get information about the host datasets -- The datasets describes and gives access to the monitored data. procedure Get_Datasets (Server : in out Server_Type; Host_Id : in Swagger.Long; Result : out Hyperion.Rest.Models.Dataset_Type_Vectors.Vector; Context : in out Swagger.Servers.Context_Type) is abstract; -- Get information about the host -- Provide information about the host procedure Get_Host (Server : in out Server_Type; Host_Id : in Swagger.Long; Result : out Hyperion.Rest.Models.Host_Type; Context : in out Swagger.Servers.Context_Type) is abstract; -- Create a host -- Register a new host in the monitoring system procedure Create_Host (Server : in out Server_Type; Name : in Swagger.UString; Ip : in Swagger.UString; Host_Key : in Swagger.UString; Agent_Key : in Swagger.UString; Agent_Id : in Integer; Result : out Hyperion.Rest.Models.Host_Type; Context : in out Swagger.Servers.Context_Type) is abstract; generic type Implementation_Type is limited new Server_Type with private; URI_Prefix : String := ""; package Skeleton is procedure Register (Server : in out Swagger.Servers.Application_Type'Class); -- Register a monitoring agent procedure Register_Agent (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); -- Get information about the host datasets procedure Get_Datasets (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); -- Get information about the host procedure Get_Host (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); -- Create a host procedure Create_Host (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); end Skeleton; generic type Implementation_Type is limited new Server_Type with private; URI_Prefix : String := ""; package Shared_Instance is procedure Register (Server : in out Swagger.Servers.Application_Type'Class); -- Register a monitoring agent procedure Register_Agent (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); -- Get information about the host datasets procedure Get_Datasets (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); -- Get information about the host procedure Get_Host (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); -- Create a host procedure Create_Host (Req : in out Swagger.Servers.Request'Class; Reply : in out Swagger.Servers.Response'Class; Stream : in out Swagger.Servers.Output_Stream'Class; Context : in out Swagger.Servers.Context_Type); private protected Server is -- Register a monitoring agent procedure Register_Agent (Name : in Swagger.UString; Ip : in Swagger.UString; Agent_Key : in Swagger.UString; Result : out Hyperion.Rest.Models.Agent_Type; Context : in out Swagger.Servers.Context_Type); -- Get information about the host datasets procedure Get_Datasets (Host_Id : in Swagger.Long; Result : out Hyperion.Rest.Models.Dataset_Type_Vectors.Vector; Context : in out Swagger.Servers.Context_Type); -- Get information about the host procedure Get_Host (Host_Id : in Swagger.Long; Result : out Hyperion.Rest.Models.Host_Type; Context : in out Swagger.Servers.Context_Type); -- Create a host procedure Create_Host (Name : in Swagger.UString; Ip : in Swagger.UString; Host_Key : in Swagger.UString; Agent_Key : in Swagger.UString; Agent_Id : in Integer; Result : out Hyperion.Rest.Models.Host_Type; Context : in out Swagger.Servers.Context_Type); private Impl : Implementation_Type; end Server; end Shared_Instance; end Hyperion.Rest.Skeletons;
zhmu/ananas
Ada
4,508
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . I O _ A U X -- -- -- -- B o d y -- -- -- -- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Interfaces.C_Streams; use Interfaces.C_Streams; package body GNAT.IO_Aux is Buflen : constant := 2000; -- Buffer length. Works for any non-zero value, larger values take -- more stack space, smaller values require more recursion. ----------------- -- File_Exists -- ----------------- function File_Exists (Name : String) return Boolean is Namestr : aliased String (1 .. Name'Length + 1); -- Name as given with ASCII.NUL appended begin Namestr (1 .. Name'Length) := Name; Namestr (Name'Length + 1) := ASCII.NUL; return file_exists (Namestr'Address) /= 0; end File_Exists; -------------- -- Get_Line -- -------------- -- Current_Input case function Get_Line return String is Buffer : String (1 .. Buflen); -- Buffer to read in chunks of remaining line. Will work with any -- size buffer. We choose a length so that most of the time no -- recursion will be required. Last : Natural; begin Ada.Text_IO.Get_Line (Buffer, Last); -- If the buffer is not full, then we are all done if Last < Buffer'Last then return Buffer (1 .. Last); -- Otherwise, we still have characters left on the line. Note that -- as specified by (RM A.10.7(19)) the end of line is not skipped -- in this case, even if we are right at it now. else return Buffer & GNAT.IO_Aux.Get_Line; end if; end Get_Line; -- Case of reading from a specified file. Note that we could certainly -- share code between these two versions, but these are very short -- routines, and we may as well aim for maximum speed, cutting out an -- intermediate call (calls returning string may be somewhat slow) function Get_Line (File : Ada.Text_IO.File_Type) return String is Buffer : String (1 .. Buflen); Last : Natural; begin Ada.Text_IO.Get_Line (File, Buffer, Last); if Last < Buffer'Last then return Buffer (1 .. Last); else return Buffer & Get_Line (File); end if; end Get_Line; end GNAT.IO_Aux;
stcarrez/mat
Ada
15,730
adb
----------------------------------------------------------------------- -- mat-readers -- Reader -- Copyright (C) 2014, 2015, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Log.Loggers; with MAT.Readers.Marshaller; package body MAT.Events.Probes is -- The logger Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("MAT.Events.Probes"); procedure Read_Probe (Client : in out Probe_Manager_Type; Msg : in out MAT.Readers.Message_Type); P_TIME_SEC : constant MAT.Events.Internal_Reference := 0; P_TIME_USEC : constant MAT.Events.Internal_Reference := 1; P_THREAD_ID : constant MAT.Events.Internal_Reference := 2; P_THREAD_SP : constant MAT.Events.Internal_Reference := 3; P_RUSAGE_MINFLT : constant MAT.Events.Internal_Reference := 4; P_RUSAGE_MAJFLT : constant MAT.Events.Internal_Reference := 5; P_RUSAGE_NVCSW : constant MAT.Events.Internal_Reference := 6; P_RUSAGE_NIVCSW : constant MAT.Events.Internal_Reference := 7; P_FRAME : constant MAT.Events.Internal_Reference := 8; P_FRAME_PC : constant MAT.Events.Internal_Reference := 9; TIME_SEC_NAME : aliased constant String := "time-sec"; TIME_USEC_NAME : aliased constant String := "time-usec"; THREAD_ID_NAME : aliased constant String := "thread-id"; THREAD_SP_NAME : aliased constant String := "thread-sp"; RUSAGE_MINFLT_NAME : aliased constant String := "ru-minflt"; RUSAGE_MAJFLT_NAME : aliased constant String := "ru-majflt"; RUSAGE_NVCSW_NAME : aliased constant String := "ru-nvcsw"; RUSAGE_NIVCSW_NAME : aliased constant String := "ru-nivcsw"; FRAME_NAME : aliased constant String := "frame"; FRAME_PC_NAME : aliased constant String := "frame-pc"; Probe_Attributes : aliased constant MAT.Events.Attribute_Table := (1 => (Name => TIME_SEC_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_TIME_SEC), 2 => (Name => TIME_USEC_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_TIME_USEC), 3 => (Name => THREAD_ID_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_THREAD_ID), 4 => (Name => THREAD_SP_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_THREAD_SP), 5 => (Name => FRAME_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_FRAME), 6 => (Name => FRAME_PC_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_FRAME_PC), 7 => (Name => RUSAGE_MINFLT_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_RUSAGE_MINFLT), 8 => (Name => RUSAGE_MAJFLT_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_RUSAGE_MAJFLT), 9 => (Name => RUSAGE_NVCSW_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_RUSAGE_NVCSW), 10 => (Name => RUSAGE_NIVCSW_NAME'Access, Size => 0, Kind => MAT.Events.T_SIZE_T, Ref => P_RUSAGE_NIVCSW) ); function Hash (Key : in MAT.Types.Uint16) return Ada.Containers.Hash_Type is begin return Ada.Containers.Hash_Type (Key); end Hash; -- ------------------------------ -- Update the Size and Prev_Id information in the event identified by <tt>Id</tt>. -- Update the event represented by <tt>Prev_Id</tt> so that its Next_Id refers -- to the <tt>Id</tt> event. -- ------------------------------ procedure Update_Event (Probe : in Probe_Type; Id : in MAT.Events.Event_Id_Type; Size : in MAT.Types.Target_Size; Prev_Id : in MAT.Events.Event_Id_Type) is begin Probe.Owner.Get_Target_Events.Update_Event (Id, Size, Prev_Id); end Update_Event; -- ------------------------------ -- Initialize the manager instance. -- ------------------------------ overriding procedure Initialize (Manager : in out Probe_Manager_Type) is begin Manager.Events := new MAT.Events.Targets.Target_Events; Manager.Frames := new MAT.Frames.Targets.Target_Frames; end Initialize; -- ------------------------------ -- Register the probe to handle the event identified by the given name. -- The event is mapped to the given id and the attributes table is used -- to setup the mapping from the data stream attributes. -- ------------------------------ procedure Register_Probe (Into : in out Probe_Manager_Type; Probe : in Probe_Type_Access; Name : in String; Id : in MAT.Events.Probe_Index_Type; Model : in MAT.Events.Const_Attribute_Table_Access) is Handler : Probe_Handler; begin Handler.Probe := Probe; Handler.Id := Id; Handler.Attributes := Model; Handler.Mapping := null; Into.Probes.Insert (Name, Handler); Probe.Owner := Into'Unchecked_Access; end Register_Probe; -- ------------------------------ -- Get the target events. -- ------------------------------ function Get_Target_Events (Client : in Probe_Manager_Type) return MAT.Events.Targets.Target_Events_Access is begin return Client.Events; end Get_Target_Events; -- ------------------------------ -- Get the target frames. -- ------------------------------ function Get_Target_Frames (Client : in Probe_Manager_Type) return MAT.Frames.Targets.Target_Frames_Access is begin return Client.Frames; end Get_Target_Frames; procedure Read_Probe (Client : in out Probe_Manager_Type; Msg : in out MAT.Readers.Message) is use type MAT.Types.Target_Tick_Ref; Count : Natural := 0; Time_Sec : MAT.Types.Uint32 := 0; Time_Usec : MAT.Types.Uint32 := 0; Frame : constant access MAT.Events.Frame_Info := Client.Frame; begin Client.Event.Thread := 0; Frame.Stack := 0; Frame.Cur_Depth := 0; for I in Client.Probe'Range loop declare Def : MAT.Events.Attribute renames Client.Probe (I); begin case Def.Ref is when P_TIME_SEC => Time_Sec := MAT.Readers.Marshaller.Get_Target_Uint32 (Msg, Def.Kind); when P_TIME_USEC => Time_Usec := MAT.Readers.Marshaller.Get_Target_Uint32 (Msg, Def.Kind); when P_THREAD_ID => Client.Event.Thread := MAT.Types.Target_Thread_Ref (MAT.Readers.Marshaller.Get_Target_Uint32 (Msg, Def.Kind)); when P_THREAD_SP => Frame.Stack := MAT.Readers.Marshaller.Get_Target_Addr (Msg, Def.Kind); when P_FRAME => Count := Natural (MAT.Readers.Marshaller.Get_Target_Uint32 (Msg, Def.Kind)); when P_FRAME_PC => for I in 1 .. Count loop -- reverse Count .. 1 loop if Count < Frame.Depth then Frame.Frame (Count - I + 1) := MAT.Readers.Marshaller.Get_Target_Addr (Msg, Def.Kind); end if; end loop; when others => null; end case; end; end loop; -- Convert the time in usec to make computation easier. Client.Event.Time := MAT.Types.Target_Tick_Ref (Time_Sec) * 1_000_000; Client.Event.Time := Client.Event.Time + MAT.Types.Target_Tick_Ref (Time_Usec); Frame.Cur_Depth := Count; exception when others => Log.Error ("Marshaling error, frame count {0}", Natural'Image (Count)); raise; end Read_Probe; procedure Dispatch_Message (Client : in out Probe_Manager_Type; Msg : in out MAT.Readers.Message_Type) is use type MAT.Events.Targets.Target_Events_Access; Event : constant MAT.Types.Uint16 := MAT.Readers.Marshaller.Get_Uint16 (Msg.Buffer); Pos : constant Handler_Maps.Cursor := Client.Handlers.Find (Event); begin if Log.Get_Level = Util.Log.DEBUG_LEVEL then Log.Debug ("Dispatch message {0} - size {1}", MAT.Types.Uint16'Image (Event), Natural'Image (Msg.Size)); end if; if not Handler_Maps.Has_Element (Pos) then -- Message is not handled, skip it. null; else if Client.Probe /= null then Read_Probe (Client, Msg); end if; declare Handler : constant Probe_Handler := Handler_Maps.Element (Pos); begin Client.Event.Prev_Id := 0; Client.Event.Old_Size := 0; Client.Event.Event := Event; Client.Event.Index := Handler.Id; Handler.Probe.Extract (Handler.Mapping.all'Access, Msg, Client.Event); Client.Frames.Insert (Pc => Client.Frame.Frame (1 .. Client.Frame.Cur_Depth), Result => Client.Event.Frame); Client.Events.Insert (Client.Event); Handler.Probe.Execute (Client.Event); end; end if; exception when E : others => Log.Error ("Exception while processing event " & MAT.Types.Uint16'Image (Event), E, True); end Dispatch_Message; -- ------------------------------ -- Read an event definition from the stream and configure the reader. -- ------------------------------ procedure Read_Definition (Client : in out Probe_Manager_Type; Msg : in out MAT.Readers.Message_Type) is Name : constant String := MAT.Readers.Marshaller.Get_String (Msg); Event : constant MAT.Types.Uint16 := MAT.Readers.Marshaller.Get_Uint16 (Msg.Buffer); Count : constant MAT.Types.Uint16 := MAT.Readers.Marshaller.Get_Uint16 (Msg.Buffer); Pos : constant Probe_Maps.Cursor := Client.Probes.Find (Name); Frame : Probe_Handler; procedure Add_Handler (Key : in String; Element : in out Probe_Handler); procedure Add_Handler (Key : in String; Element : in out Probe_Handler) is pragma Unreferenced (Key); begin Client.Handlers.Insert (Event, Element); end Add_Handler; begin Log.Debug ("Read event definition {0} with {1} attributes", Name, MAT.Types.Uint16'Image (Count)); if Name = "start" then Frame.Mapping := new MAT.Events.Attribute_Table (1 .. Natural (Count)); Frame.Attributes := Probe_Attributes'Access; Client.Probe := Frame.Mapping; else Frame.Mapping := null; end if; for I in 1 .. Natural (Count) loop declare Name : constant String := MAT.Readers.Marshaller.Get_String (Msg); Size : constant MAT.Types.Uint16 := MAT.Readers.Marshaller.Get_Uint16 (Msg.Buffer); procedure Read_Attribute (Key : in String; Element : in out Probe_Handler); procedure Read_Attribute (Key : in String; Element : in out Probe_Handler) is pragma Unreferenced (Key); begin if Element.Mapping = null then Element.Mapping := new MAT.Events.Attribute_Table (1 .. Natural (Count)); end if; for J in Element.Attributes'Range loop if Element.Attributes (J).Name.all = Name then Element.Mapping (I) := Element.Attributes (J); if Size = 1 then Element.Mapping (I).Kind := MAT.Events.T_UINT8; elsif Size = 2 then Element.Mapping (I).Kind := MAT.Events.T_UINT16; elsif Size = 4 then Element.Mapping (I).Kind := MAT.Events.T_UINT32; elsif Size = 8 then Element.Mapping (I).Kind := MAT.Events.T_UINT64; else Element.Mapping (I).Kind := MAT.Events.T_UINT32; end if; end if; end loop; end Read_Attribute; begin if Probe_Maps.Has_Element (Pos) then Client.Probes.Update_Element (Pos, Read_Attribute'Access); end if; if Frame.Mapping /= null then Read_Attribute ("start", Frame); end if; end; end loop; if Probe_Maps.Has_Element (Pos) then Client.Probes.Update_Element (Pos, Add_Handler'Access); end if; end Read_Definition; -- ------------------------------ -- Read a list of event definitions from the stream and configure the reader. -- ------------------------------ procedure Read_Event_Definitions (Client : in out Probe_Manager_Type; Msg : in out MAT.Readers.Message) is Count : MAT.Types.Uint16; begin if Client.Frame = null then Client.Frame := new MAT.Events.Frame_Info (512); end if; Client.Version := MAT.Readers.Marshaller.Get_Uint16 (Msg.Buffer); Count := MAT.Readers.Marshaller.Get_Uint16 (Msg.Buffer); Log.Info ("Read event stream version {0} with {1} definitions", MAT.Types.Uint16'Image (Client.Version), MAT.Types.Uint16'Image (Count)); for I in 1 .. Count loop Read_Definition (Client, Msg); end loop; -- Look at the probe definition to gather the target address size. Client.Addr_Size := MAT.Events.T_UINT32; for I in Client.Probe'Range loop declare Def : MAT.Events.Attribute renames Client.Probe (I); begin if Def.Ref = P_THREAD_SP or Def.Ref = P_FRAME_PC then Client.Addr_Size := Def.Kind; exit; end if; end; end loop; exception when E : MAT.Readers.Marshaller.Buffer_Underflow_Error => Log.Error ("Not enough data in the message", E, True); end Read_Event_Definitions; -- ------------------------------ -- Get the size of a target address (4 or 8 bytes). -- ------------------------------ function Get_Address_Size (Client : in Probe_Manager_Type) return MAT.Events.Attribute_Type is begin return Client.Addr_Size; end Get_Address_Size; end MAT.Events.Probes;
twdroeger/ada-awa
Ada
2,641
ads
----------------------------------------------------------------------- -- awa-permissions-controllers -- Permission controllers -- Copyright (C) 2011, 2012, 2013, 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Security.Contexts; with Security.Controllers; package AWA.Permissions.Controllers is -- ------------------------------ -- Security Controller -- ------------------------------ -- The <b>Entity_Controller</b> implements an entity based permission check. -- The controller is configured through an XML description. It uses an SQL statement -- to verify that a permission is granted. -- -- The SQL query can use the following query parameters: -- -- <dl> -- <dt>entity_type</dt> -- <dd>The entity type identifier defined by the entity permission</dd> -- <dt>entity_id</dt> -- <dd>The entity identifier which is associated with an <b>ACL</b> entry to check</dd> -- <dt>user_id</dt> -- <dd>The user identifier</dd> -- </dl> type Entity_Controller (Len : Positive) is limited new Security.Controllers.Controller with record Entities : Entity_Type_Array; SQL : String (1 .. Len); end record; type Entity_Controller_Access is access all Entity_Controller'Class; -- Returns true if the user associated with the security context <b>Context</b> has -- the permission to access a database entity. The security context contains some -- information about the entity to check and the permission controller will use an -- SQL statement to verify the permission. overriding function Has_Permission (Handler : in Entity_Controller; Context : in Security.Contexts.Security_Context'Class; Permission : in Security.Permissions.Permission'Class) return Boolean; end AWA.Permissions.Controllers;
reznikmm/matreshka
Ada
3,756
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.Constants; package body Matreshka.ODF_Attributes.FO.Border_Top is -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant FO_Border_Top_Node) return League.Strings.Universal_String is begin return ODF.Constants.Border_Top_Name; end Get_Local_Name; end Matreshka.ODF_Attributes.FO.Border_Top;
tum-ei-rcs/StratoX
Ada
1,972
ads
with Interfaces; package Bit_Types is pragma Preelaborate; type Word is new Interfaces.Unsigned_32; -- for shift/rotate type Half_Word is new Interfaces.Unsigned_16; -- for shift/rotate type Byte is new Interfaces.Unsigned_8; -- for shift/rotate type Unsigned_8 is mod 2**8 with Size => 8; type Bits_1 is mod 2**1 with Size => 1; type Bits_2 is mod 2**2 with Size => 2; type Bits_3 is mod 2**3 with Size => 3; type Bits_4 is mod 2**4 with Size => 4; type Bits_5 is mod 2**5 with Size => 5; type Bits_6 is mod 2**6 with Size => 6; type Bits_7 is mod 2**7 with Size => 7; type Bits_8 is mod 2**8 with Size => 8; type Bits_9 is mod 2**9 with Size => 9; type Bits_10 is mod 2**10 with Size => 10; type Bits_11 is mod 2**11 with Size => 11; type Bits_12 is mod 2**12 with Size => 12; type Bits_13 is mod 2**13 with Size => 13; type Bits_14 is mod 2**14 with Size => 14; type Bits_15 is mod 2**15 with Size => 15; type Bits_16 is mod 2**16 with Size => 16; type Bits_17 is mod 2**17 with Size => 17; type Bits_18 is mod 2**18 with Size => 18; type Bits_19 is mod 2**19 with Size => 19; type Bits_20 is mod 2**20 with Size => 20; type Bits_21 is mod 2**21 with Size => 21; type Bits_22 is mod 2**22 with Size => 22; type Bits_23 is mod 2**23 with Size => 23; type Bits_24 is mod 2**24 with Size => 24; type Bits_25 is mod 2**25 with Size => 25; type Bits_26 is mod 2**26 with Size => 26; type Bits_27 is mod 2**27 with Size => 27; type Bits_28 is mod 2**28 with Size => 28; type Bits_29 is mod 2**29 with Size => 29; type Bits_30 is mod 2**30 with Size => 30; type Bits_31 is mod 2**31 with Size => 31; type Bits_32x1 is array (0 .. 31) of Bits_1 with Pack, Size => 32; type Bits_16x2 is array (0 .. 15) of Bits_2 with Pack, Size => 32; type Bits_8x4 is array (0 .. 7) of Bits_4 with Pack, Size => 32; end Bit_Types;
JeremyGrosser/clock3
Ada
78,259
ads
pragma Style_Checks (Off); -- Copyright (c) 2018 Microchip Technology Inc. -- -- SPDX-License-Identifier: Apache-2.0 -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- This spec has been automatically generated from ATSAMD21G18A.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package SAMD21_SVD.TCC is pragma Preelaborate; --------------- -- Registers -- --------------- -- Enhanced Resolution type CTRLA_RESOLUTIONSelect is (-- Dithering is disabled NONE, -- Dithering is done every 16 PWM frames DITH4, -- Dithering is done every 32 PWM frames DITH5, -- Dithering is done every 64 PWM frames DITH6) with Size => 2; for CTRLA_RESOLUTIONSelect use (NONE => 0, DITH4 => 1, DITH5 => 2, DITH6 => 3); -- Prescaler type CTRLA_PRESCALERSelect is (-- No division DIV1, -- Divide by 2 DIV2, -- Divide by 4 DIV4, -- Divide by 8 DIV8, -- Divide by 16 DIV16, -- Divide by 64 DIV64, -- Divide by 256 DIV256, -- Divide by 1024 DIV1024) with Size => 3; for CTRLA_PRESCALERSelect use (DIV1 => 0, DIV2 => 1, DIV4 => 2, DIV8 => 3, DIV16 => 4, DIV64 => 5, DIV256 => 6, DIV1024 => 7); -- Prescaler and Counter Synchronization Selection type CTRLA_PRESCSYNCSelect is (-- Reload or reset counter on next GCLK GCLK, -- Reload or reset counter on next prescaler clock PRESC, -- Reload or reset counter on next GCLK and reset prescaler counter RESYNC) with Size => 2; for CTRLA_PRESCSYNCSelect use (GCLK => 0, PRESC => 1, RESYNC => 2); -- TCC_CTRLA_CPTEN array type TCC_CTRLA_CPTEN_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_CTRLA_CPTEN type TCC_CTRLA_CPTEN_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CPTEN as a value Val : HAL.UInt4; when True => -- CPTEN as an array Arr : TCC_CTRLA_CPTEN_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_CTRLA_CPTEN_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Control A type TCC_CTRLA_Register is record -- Software Reset SWRST : Boolean := False; -- Enable ENABLE : Boolean := False; -- unspecified Reserved_2_4 : HAL.UInt3 := 16#0#; -- Enhanced Resolution RESOLUTION : CTRLA_RESOLUTIONSelect := SAMD21_SVD.TCC.NONE; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- Prescaler PRESCALER : CTRLA_PRESCALERSelect := SAMD21_SVD.TCC.DIV1; -- Run in Standby RUNSTDBY : Boolean := False; -- Prescaler and Counter Synchronization Selection PRESCSYNC : CTRLA_PRESCSYNCSelect := SAMD21_SVD.TCC.GCLK; -- Auto Lock ALOCK : Boolean := False; -- unspecified Reserved_15_23 : HAL.UInt9 := 16#0#; -- Capture Channel 0 Enable CPTEN : TCC_CTRLA_CPTEN_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CTRLA_Register use record SWRST at 0 range 0 .. 0; ENABLE at 0 range 1 .. 1; Reserved_2_4 at 0 range 2 .. 4; RESOLUTION at 0 range 5 .. 6; Reserved_7_7 at 0 range 7 .. 7; PRESCALER at 0 range 8 .. 10; RUNSTDBY at 0 range 11 .. 11; PRESCSYNC at 0 range 12 .. 13; ALOCK at 0 range 14 .. 14; Reserved_15_23 at 0 range 15 .. 23; CPTEN at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- Ramp Index Command type CTRLBCLR_IDXCMDSelect is (-- Command disabled: Index toggles between cycles A and B DISABLE, -- Set index: cycle B will be forced in the next cycle SET, -- Clear index: cycle A will be forced in the next cycle CLEAR, -- Hold index: the next cycle will be the same as the current cycle HOLD) with Size => 2; for CTRLBCLR_IDXCMDSelect use (DISABLE => 0, SET => 1, CLEAR => 2, HOLD => 3); -- TCC Command type CTRLBCLR_CMDSelect is (-- No action NONE, -- Clear start, restart or retrigger RETRIGGER, -- Force stop STOP, -- Force update of double buffered registers UPDATE, -- Force COUNT read synchronization READSYNC) with Size => 3; for CTRLBCLR_CMDSelect use (NONE => 0, RETRIGGER => 1, STOP => 2, UPDATE => 3, READSYNC => 4); -- Control B Clear type TCC_CTRLBCLR_Register is record -- Counter Direction DIR : Boolean := False; -- Lock Update LUPD : Boolean := False; -- One-Shot ONESHOT : Boolean := False; -- Ramp Index Command IDXCMD : CTRLBCLR_IDXCMDSelect := SAMD21_SVD.TCC.DISABLE; -- TCC Command CMD : CTRLBCLR_CMDSelect := SAMD21_SVD.TCC.NONE; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for TCC_CTRLBCLR_Register use record DIR at 0 range 0 .. 0; LUPD at 0 range 1 .. 1; ONESHOT at 0 range 2 .. 2; IDXCMD at 0 range 3 .. 4; CMD at 0 range 5 .. 7; end record; -- Ramp Index Command type CTRLBSET_IDXCMDSelect is (-- Command disabled: Index toggles between cycles A and B DISABLE, -- Set index: cycle B will be forced in the next cycle SET, -- Clear index: cycle A will be forced in the next cycle CLEAR, -- Hold index: the next cycle will be the same as the current cycle HOLD) with Size => 2; for CTRLBSET_IDXCMDSelect use (DISABLE => 0, SET => 1, CLEAR => 2, HOLD => 3); -- TCC Command type CTRLBSET_CMDSelect is (-- No action NONE, -- Clear start, restart or retrigger RETRIGGER, -- Force stop STOP, -- Force update of double buffered registers UPDATE, -- Force COUNT read synchronization READSYNC) with Size => 3; for CTRLBSET_CMDSelect use (NONE => 0, RETRIGGER => 1, STOP => 2, UPDATE => 3, READSYNC => 4); -- Control B Set type TCC_CTRLBSET_Register is record -- Counter Direction DIR : Boolean := False; -- Lock Update LUPD : Boolean := False; -- One-Shot ONESHOT : Boolean := False; -- Ramp Index Command IDXCMD : CTRLBSET_IDXCMDSelect := SAMD21_SVD.TCC.DISABLE; -- TCC Command CMD : CTRLBSET_CMDSelect := SAMD21_SVD.TCC.NONE; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for TCC_CTRLBSET_Register use record DIR at 0 range 0 .. 0; LUPD at 0 range 1 .. 1; ONESHOT at 0 range 2 .. 2; IDXCMD at 0 range 3 .. 4; CMD at 0 range 5 .. 7; end record; -- TCC_SYNCBUSY_CC array type TCC_SYNCBUSY_CC_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_SYNCBUSY_CC type TCC_SYNCBUSY_CC_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CC as a value Val : HAL.UInt4; when True => -- CC as an array Arr : TCC_SYNCBUSY_CC_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_SYNCBUSY_CC_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- TCC_SYNCBUSY_CCB array type TCC_SYNCBUSY_CCB_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_SYNCBUSY_CCB type TCC_SYNCBUSY_CCB_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CCB as a value Val : HAL.UInt4; when True => -- CCB as an array Arr : TCC_SYNCBUSY_CCB_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_SYNCBUSY_CCB_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Synchronization Busy type TCC_SYNCBUSY_Register is record -- Read-only. Swrst Busy SWRST : Boolean; -- Read-only. Enable Busy ENABLE : Boolean; -- Read-only. Ctrlb Busy CTRLB : Boolean; -- Read-only. Status Busy STATUS : Boolean; -- Read-only. Count Busy COUNT : Boolean; -- Read-only. Pattern Busy PATT : Boolean; -- Read-only. Wave Busy WAVE : Boolean; -- Read-only. Period busy PER : Boolean; -- Read-only. Compare Channel 0 Busy CC : TCC_SYNCBUSY_CC_Field; -- unspecified Reserved_12_15 : HAL.UInt4; -- Read-only. Pattern Buffer Busy PATTB : Boolean; -- Read-only. Wave Buffer Busy WAVEB : Boolean; -- Read-only. Period Buffer Busy PERB : Boolean; -- Read-only. Compare Channel Buffer 0 Busy CCB : TCC_SYNCBUSY_CCB_Field; -- unspecified Reserved_23_31 : HAL.UInt9; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_SYNCBUSY_Register use record SWRST at 0 range 0 .. 0; ENABLE at 0 range 1 .. 1; CTRLB at 0 range 2 .. 2; STATUS at 0 range 3 .. 3; COUNT at 0 range 4 .. 4; PATT at 0 range 5 .. 5; WAVE at 0 range 6 .. 6; PER at 0 range 7 .. 7; CC at 0 range 8 .. 11; Reserved_12_15 at 0 range 12 .. 15; PATTB at 0 range 16 .. 16; WAVEB at 0 range 17 .. 17; PERB at 0 range 18 .. 18; CCB at 0 range 19 .. 22; Reserved_23_31 at 0 range 23 .. 31; end record; -- Fault A Source type FCTRLA_SRCSelect is (-- Fault input disabled DISABLE, -- MCEx (x=0,1) event input ENABLE, -- Inverted MCEx (x=0,1) event input INVERT, -- Alternate fault (A or B) state at the end of the previous period ALTFAULT) with Size => 2; for FCTRLA_SRCSelect use (DISABLE => 0, ENABLE => 1, INVERT => 2, ALTFAULT => 3); -- Fault A Blanking Mode type FCTRLA_BLANKSelect is (-- No blanking applied NONE, -- Blanking applied from rising edge of the output waveform RISE, -- Blanking applied from falling edge of the output waveform FALL, -- Blanking applied from each toggle of the output waveform BOTH) with Size => 2; for FCTRLA_BLANKSelect use (NONE => 0, RISE => 1, FALL => 2, BOTH => 3); -- Fault A Halt Mode type FCTRLA_HALTSelect is (-- Halt action disabled DISABLE, -- Hardware halt action HW, -- Software halt action SW, -- Non-recoverable fault NR) with Size => 2; for FCTRLA_HALTSelect use (DISABLE => 0, HW => 1, SW => 2, NR => 3); -- Fault A Capture Channel type FCTRLA_CHSELSelect is (-- Capture value stored in channel 0 CC0, -- Capture value stored in channel 1 CC1, -- Capture value stored in channel 2 CC2, -- Capture value stored in channel 3 CC3) with Size => 2; for FCTRLA_CHSELSelect use (CC0 => 0, CC1 => 1, CC2 => 2, CC3 => 3); -- Fault A Capture Action type FCTRLA_CAPTURESelect is (-- No capture DISABLE, -- Capture on fault CAPT, -- Minimum capture CAPTMIN, -- Maximum capture CAPTMAX, -- Minimum local detection LOCMIN, -- Maximum local detection LOCMAX, -- Minimum and maximum local detection DERIV0) with Size => 3; for FCTRLA_CAPTURESelect use (DISABLE => 0, CAPT => 1, CAPTMIN => 2, CAPTMAX => 3, LOCMIN => 4, LOCMAX => 5, DERIV0 => 6); subtype TCC_FCTRLA_BLANKVAL_Field is HAL.UInt8; subtype TCC_FCTRLA_FILTERVAL_Field is HAL.UInt4; -- Recoverable Fault A Configuration type TCC_FCTRLA_Register is record -- Fault A Source SRC : FCTRLA_SRCSelect := SAMD21_SVD.TCC.DISABLE; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Fault A Keeper KEEP : Boolean := False; -- Fault A Qualification QUAL : Boolean := False; -- Fault A Blanking Mode BLANK : FCTRLA_BLANKSelect := SAMD21_SVD.TCC.NONE; -- Fault A Restart RESTART : Boolean := False; -- Fault A Halt Mode HALT : FCTRLA_HALTSelect := SAMD21_SVD.TCC.DISABLE; -- Fault A Capture Channel CHSEL : FCTRLA_CHSELSelect := SAMD21_SVD.TCC.CC0; -- Fault A Capture Action CAPTURE : FCTRLA_CAPTURESelect := SAMD21_SVD.TCC.DISABLE; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Fault A Blanking Time BLANKVAL : TCC_FCTRLA_BLANKVAL_Field := 16#0#; -- Fault A Filter Value FILTERVAL : TCC_FCTRLA_FILTERVAL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_FCTRLA_Register use record SRC at 0 range 0 .. 1; Reserved_2_2 at 0 range 2 .. 2; KEEP at 0 range 3 .. 3; QUAL at 0 range 4 .. 4; BLANK at 0 range 5 .. 6; RESTART at 0 range 7 .. 7; HALT at 0 range 8 .. 9; CHSEL at 0 range 10 .. 11; CAPTURE at 0 range 12 .. 14; Reserved_15_15 at 0 range 15 .. 15; BLANKVAL at 0 range 16 .. 23; FILTERVAL at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- Fault B Source type FCTRLB_SRCSelect is (-- Fault input disabled DISABLE, -- MCEx (x=0,1) event input ENABLE, -- Inverted MCEx (x=0,1) event input INVERT, -- Alternate fault (A or B) state at the end of the previous period ALTFAULT) with Size => 2; for FCTRLB_SRCSelect use (DISABLE => 0, ENABLE => 1, INVERT => 2, ALTFAULT => 3); -- Fault B Blanking Mode type FCTRLB_BLANKSelect is (-- No blanking applied NONE, -- Blanking applied from rising edge of the output waveform RISE, -- Blanking applied from falling edge of the output waveform FALL, -- Blanking applied from each toggle of the output waveform BOTH) with Size => 2; for FCTRLB_BLANKSelect use (NONE => 0, RISE => 1, FALL => 2, BOTH => 3); -- Fault B Halt Mode type FCTRLB_HALTSelect is (-- Halt action disabled DISABLE, -- Hardware halt action HW, -- Software halt action SW, -- Non-recoverable fault NR) with Size => 2; for FCTRLB_HALTSelect use (DISABLE => 0, HW => 1, SW => 2, NR => 3); -- Fault B Capture Channel type FCTRLB_CHSELSelect is (-- Capture value stored in channel 0 CC0, -- Capture value stored in channel 1 CC1, -- Capture value stored in channel 2 CC2, -- Capture value stored in channel 3 CC3) with Size => 2; for FCTRLB_CHSELSelect use (CC0 => 0, CC1 => 1, CC2 => 2, CC3 => 3); -- Fault B Capture Action type FCTRLB_CAPTURESelect is (-- No capture DISABLE, -- Capture on fault CAPT, -- Minimum capture CAPTMIN, -- Maximum capture CAPTMAX, -- Minimum local detection LOCMIN, -- Maximum local detection LOCMAX, -- Minimum and maximum local detection DERIV0) with Size => 3; for FCTRLB_CAPTURESelect use (DISABLE => 0, CAPT => 1, CAPTMIN => 2, CAPTMAX => 3, LOCMIN => 4, LOCMAX => 5, DERIV0 => 6); subtype TCC_FCTRLB_BLANKVAL_Field is HAL.UInt8; subtype TCC_FCTRLB_FILTERVAL_Field is HAL.UInt4; -- Recoverable Fault B Configuration type TCC_FCTRLB_Register is record -- Fault B Source SRC : FCTRLB_SRCSelect := SAMD21_SVD.TCC.DISABLE; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Fault B Keeper KEEP : Boolean := False; -- Fault B Qualification QUAL : Boolean := False; -- Fault B Blanking Mode BLANK : FCTRLB_BLANKSelect := SAMD21_SVD.TCC.NONE; -- Fault B Restart RESTART : Boolean := False; -- Fault B Halt Mode HALT : FCTRLB_HALTSelect := SAMD21_SVD.TCC.DISABLE; -- Fault B Capture Channel CHSEL : FCTRLB_CHSELSelect := SAMD21_SVD.TCC.CC0; -- Fault B Capture Action CAPTURE : FCTRLB_CAPTURESelect := SAMD21_SVD.TCC.DISABLE; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Fault B Blanking Time BLANKVAL : TCC_FCTRLB_BLANKVAL_Field := 16#0#; -- Fault B Filter Value FILTERVAL : TCC_FCTRLB_FILTERVAL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_FCTRLB_Register use record SRC at 0 range 0 .. 1; Reserved_2_2 at 0 range 2 .. 2; KEEP at 0 range 3 .. 3; QUAL at 0 range 4 .. 4; BLANK at 0 range 5 .. 6; RESTART at 0 range 7 .. 7; HALT at 0 range 8 .. 9; CHSEL at 0 range 10 .. 11; CAPTURE at 0 range 12 .. 14; Reserved_15_15 at 0 range 15 .. 15; BLANKVAL at 0 range 16 .. 23; FILTERVAL at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype TCC_WEXCTRL_OTMX_Field is HAL.UInt2; -- TCC_WEXCTRL_DTIEN array type TCC_WEXCTRL_DTIEN_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_WEXCTRL_DTIEN type TCC_WEXCTRL_DTIEN_Field (As_Array : Boolean := False) is record case As_Array is when False => -- DTIEN as a value Val : HAL.UInt4; when True => -- DTIEN as an array Arr : TCC_WEXCTRL_DTIEN_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_WEXCTRL_DTIEN_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; subtype TCC_WEXCTRL_DTLS_Field is HAL.UInt8; subtype TCC_WEXCTRL_DTHS_Field is HAL.UInt8; -- Waveform Extension Configuration type TCC_WEXCTRL_Register is record -- Output Matrix OTMX : TCC_WEXCTRL_OTMX_Field := 16#0#; -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; -- Dead-time Insertion Generator 0 Enable DTIEN : TCC_WEXCTRL_DTIEN_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Dead-time Low Side Outputs Value DTLS : TCC_WEXCTRL_DTLS_Field := 16#0#; -- Dead-time High Side Outputs Value DTHS : TCC_WEXCTRL_DTHS_Field := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_WEXCTRL_Register use record OTMX at 0 range 0 .. 1; Reserved_2_7 at 0 range 2 .. 7; DTIEN at 0 range 8 .. 11; Reserved_12_15 at 0 range 12 .. 15; DTLS at 0 range 16 .. 23; DTHS at 0 range 24 .. 31; end record; -- TCC_DRVCTRL_NRE array type TCC_DRVCTRL_NRE_Field_Array is array (0 .. 7) of Boolean with Component_Size => 1, Size => 8; -- Type definition for TCC_DRVCTRL_NRE type TCC_DRVCTRL_NRE_Field (As_Array : Boolean := False) is record case As_Array is when False => -- NRE as a value Val : HAL.UInt8; when True => -- NRE as an array Arr : TCC_DRVCTRL_NRE_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_DRVCTRL_NRE_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- TCC_DRVCTRL_NRV array type TCC_DRVCTRL_NRV_Field_Array is array (0 .. 7) of Boolean with Component_Size => 1, Size => 8; -- Type definition for TCC_DRVCTRL_NRV type TCC_DRVCTRL_NRV_Field (As_Array : Boolean := False) is record case As_Array is when False => -- NRV as a value Val : HAL.UInt8; when True => -- NRV as an array Arr : TCC_DRVCTRL_NRV_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_DRVCTRL_NRV_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- TCC_DRVCTRL_INVEN array type TCC_DRVCTRL_INVEN_Field_Array is array (0 .. 7) of Boolean with Component_Size => 1, Size => 8; -- Type definition for TCC_DRVCTRL_INVEN type TCC_DRVCTRL_INVEN_Field (As_Array : Boolean := False) is record case As_Array is when False => -- INVEN as a value Val : HAL.UInt8; when True => -- INVEN as an array Arr : TCC_DRVCTRL_INVEN_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_DRVCTRL_INVEN_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- TCC_DRVCTRL_FILTERVAL array element subtype TCC_DRVCTRL_FILTERVAL_Element is HAL.UInt4; -- TCC_DRVCTRL_FILTERVAL array type TCC_DRVCTRL_FILTERVAL_Field_Array is array (0 .. 1) of TCC_DRVCTRL_FILTERVAL_Element with Component_Size => 4, Size => 8; -- Type definition for TCC_DRVCTRL_FILTERVAL type TCC_DRVCTRL_FILTERVAL_Field (As_Array : Boolean := False) is record case As_Array is when False => -- FILTERVAL as a value Val : HAL.UInt8; when True => -- FILTERVAL as an array Arr : TCC_DRVCTRL_FILTERVAL_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_DRVCTRL_FILTERVAL_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- Driver Control type TCC_DRVCTRL_Register is record -- Non-Recoverable State 0 Output Enable NRE : TCC_DRVCTRL_NRE_Field := (As_Array => False, Val => 16#0#); -- Non-Recoverable State 0 Output Value NRV : TCC_DRVCTRL_NRV_Field := (As_Array => False, Val => 16#0#); -- Output Waveform 0 Inversion INVEN : TCC_DRVCTRL_INVEN_Field := (As_Array => False, Val => 16#0#); -- Non-Recoverable Fault Input 0 Filter Value FILTERVAL : TCC_DRVCTRL_FILTERVAL_Field := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_DRVCTRL_Register use record NRE at 0 range 0 .. 7; NRV at 0 range 8 .. 15; INVEN at 0 range 16 .. 23; FILTERVAL at 0 range 24 .. 31; end record; -- Debug Control type TCC_DBGCTRL_Register is record -- Debug Running Mode DBGRUN : Boolean := False; -- unspecified Reserved_1_1 : HAL.Bit := 16#0#; -- Fault Detection on Debug Break Detection FDDBD : Boolean := False; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Object_Size => 8, Bit_Order => System.Low_Order_First; for TCC_DBGCTRL_Register use record DBGRUN at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; FDDBD at 0 range 2 .. 2; Reserved_3_7 at 0 range 3 .. 7; end record; -- Timer/counter Input Event0 Action type EVCTRL_EVACT0Select is (-- Event action disabled OFF, -- Start, restart or re-trigger counter on event RETRIGGER, -- Count on event COUNTEV, -- Start counter on event START, -- Increment counter on event INC, -- Count on active state of asynchronous event COUNT, -- Non-recoverable fault FAULT) with Size => 3; for EVCTRL_EVACT0Select use (OFF => 0, RETRIGGER => 1, COUNTEV => 2, START => 3, INC => 4, COUNT => 5, FAULT => 7); -- Timer/counter Input Event1 Action type EVCTRL_EVACT1Select is (-- Event action disabled OFF, -- Re-trigger counter on event RETRIGGER, -- Direction control DIR, -- Stop counter on event STOP, -- Decrement counter on event DEC, -- Period capture value in CC0 register, pulse width capture value in CC1 -- register PPW, -- Period capture value in CC1 register, pulse width capture value in CC0 -- register PWP, -- Non-recoverable fault FAULT) with Size => 3; for EVCTRL_EVACT1Select use (OFF => 0, RETRIGGER => 1, DIR => 2, STOP => 3, DEC => 4, PPW => 5, PWP => 6, FAULT => 7); -- Timer/counter Output Event Mode type EVCTRL_CNTSELSelect is (-- An interrupt/event is generated when a new counter cycle starts START, -- An interrupt/event is generated when a counter cycle ends END_k, -- An interrupt/event is generated when a counter cycle ends, except for the -- first and last cycles BETWEEN, -- An interrupt/event is generated when a new counter cycle starts or a -- counter cycle ends BOUNDARY) with Size => 2; for EVCTRL_CNTSELSelect use (START => 0, END_k => 1, BETWEEN => 2, BOUNDARY => 3); -- TCC_EVCTRL_TCINV array type TCC_EVCTRL_TCINV_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for TCC_EVCTRL_TCINV type TCC_EVCTRL_TCINV_Field (As_Array : Boolean := False) is record case As_Array is when False => -- TCINV as a value Val : HAL.UInt2; when True => -- TCINV as an array Arr : TCC_EVCTRL_TCINV_Field_Array; end case; end record with Unchecked_Union, Size => 2; for TCC_EVCTRL_TCINV_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- TCC_EVCTRL_TCEI array type TCC_EVCTRL_TCEI_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for TCC_EVCTRL_TCEI type TCC_EVCTRL_TCEI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- TCEI as a value Val : HAL.UInt2; when True => -- TCEI as an array Arr : TCC_EVCTRL_TCEI_Field_Array; end case; end record with Unchecked_Union, Size => 2; for TCC_EVCTRL_TCEI_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- TCC_EVCTRL_MCEI array type TCC_EVCTRL_MCEI_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_EVCTRL_MCEI type TCC_EVCTRL_MCEI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- MCEI as a value Val : HAL.UInt4; when True => -- MCEI as an array Arr : TCC_EVCTRL_MCEI_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_EVCTRL_MCEI_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- TCC_EVCTRL_MCEO array type TCC_EVCTRL_MCEO_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_EVCTRL_MCEO type TCC_EVCTRL_MCEO_Field (As_Array : Boolean := False) is record case As_Array is when False => -- MCEO as a value Val : HAL.UInt4; when True => -- MCEO as an array Arr : TCC_EVCTRL_MCEO_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_EVCTRL_MCEO_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Event Control type TCC_EVCTRL_Register is record -- Timer/counter Input Event0 Action EVACT0 : EVCTRL_EVACT0Select := SAMD21_SVD.TCC.OFF; -- Timer/counter Input Event1 Action EVACT1 : EVCTRL_EVACT1Select := SAMD21_SVD.TCC.OFF; -- Timer/counter Output Event Mode CNTSEL : EVCTRL_CNTSELSelect := SAMD21_SVD.TCC.START; -- Overflow/Underflow Output Event Enable OVFEO : Boolean := False; -- Retrigger Output Event Enable TRGEO : Boolean := False; -- Timer/counter Output Event Enable CNTEO : Boolean := False; -- unspecified Reserved_11_11 : HAL.Bit := 16#0#; -- Inverted Event 0 Input Enable TCINV : TCC_EVCTRL_TCINV_Field := (As_Array => False, Val => 16#0#); -- Timer/counter Event 0 Input Enable TCEI : TCC_EVCTRL_TCEI_Field := (As_Array => False, Val => 16#0#); -- Match or Capture Channel 0 Event Input Enable MCEI : TCC_EVCTRL_MCEI_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_20_23 : HAL.UInt4 := 16#0#; -- Match or Capture Channel 0 Event Output Enable MCEO : TCC_EVCTRL_MCEO_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_EVCTRL_Register use record EVACT0 at 0 range 0 .. 2; EVACT1 at 0 range 3 .. 5; CNTSEL at 0 range 6 .. 7; OVFEO at 0 range 8 .. 8; TRGEO at 0 range 9 .. 9; CNTEO at 0 range 10 .. 10; Reserved_11_11 at 0 range 11 .. 11; TCINV at 0 range 12 .. 13; TCEI at 0 range 14 .. 15; MCEI at 0 range 16 .. 19; Reserved_20_23 at 0 range 20 .. 23; MCEO at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- TCC_INTENCLR_FAULT array type TCC_INTENCLR_FAULT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for TCC_INTENCLR_FAULT type TCC_INTENCLR_FAULT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- FAULT as a value Val : HAL.UInt2; when True => -- FAULT as an array Arr : TCC_INTENCLR_FAULT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for TCC_INTENCLR_FAULT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- TCC_INTENCLR_MC array type TCC_INTENCLR_MC_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_INTENCLR_MC type TCC_INTENCLR_MC_Field (As_Array : Boolean := False) is record case As_Array is when False => -- MC as a value Val : HAL.UInt4; when True => -- MC as an array Arr : TCC_INTENCLR_MC_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_INTENCLR_MC_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Interrupt Enable Clear type TCC_INTENCLR_Register is record -- Overflow Interrupt Enable OVF : Boolean := False; -- Retrigger Interrupt Enable TRG : Boolean := False; -- Counter Interrupt Enable CNT : Boolean := False; -- Error Interrupt Enable ERR : Boolean := False; -- unspecified Reserved_4_10 : HAL.UInt7 := 16#0#; -- Non-Recoverable Debug Fault Interrupt Enable DFS : Boolean := False; -- Recoverable Fault A Interrupt Enable FAULTA : Boolean := False; -- Recoverable Fault B Interrupt Enable FAULTB : Boolean := False; -- Non-Recoverable Fault 0 Interrupt Enable FAULT : TCC_INTENCLR_FAULT_Field := (As_Array => False, Val => 16#0#); -- Match or Capture Channel 0 Interrupt Enable MC : TCC_INTENCLR_MC_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_20_31 : HAL.UInt12 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_INTENCLR_Register use record OVF at 0 range 0 .. 0; TRG at 0 range 1 .. 1; CNT at 0 range 2 .. 2; ERR at 0 range 3 .. 3; Reserved_4_10 at 0 range 4 .. 10; DFS at 0 range 11 .. 11; FAULTA at 0 range 12 .. 12; FAULTB at 0 range 13 .. 13; FAULT at 0 range 14 .. 15; MC at 0 range 16 .. 19; Reserved_20_31 at 0 range 20 .. 31; end record; -- TCC_INTENSET_FAULT array type TCC_INTENSET_FAULT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for TCC_INTENSET_FAULT type TCC_INTENSET_FAULT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- FAULT as a value Val : HAL.UInt2; when True => -- FAULT as an array Arr : TCC_INTENSET_FAULT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for TCC_INTENSET_FAULT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- TCC_INTENSET_MC array type TCC_INTENSET_MC_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_INTENSET_MC type TCC_INTENSET_MC_Field (As_Array : Boolean := False) is record case As_Array is when False => -- MC as a value Val : HAL.UInt4; when True => -- MC as an array Arr : TCC_INTENSET_MC_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_INTENSET_MC_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Interrupt Enable Set type TCC_INTENSET_Register is record -- Overflow Interrupt Enable OVF : Boolean := False; -- Retrigger Interrupt Enable TRG : Boolean := False; -- Counter Interrupt Enable CNT : Boolean := False; -- Error Interrupt Enable ERR : Boolean := False; -- unspecified Reserved_4_10 : HAL.UInt7 := 16#0#; -- Non-Recoverable Debug Fault Interrupt Enable DFS : Boolean := False; -- Recoverable Fault A Interrupt Enable FAULTA : Boolean := False; -- Recoverable Fault B Interrupt Enable FAULTB : Boolean := False; -- Non-Recoverable Fault 0 Interrupt Enable FAULT : TCC_INTENSET_FAULT_Field := (As_Array => False, Val => 16#0#); -- Match or Capture Channel 0 Interrupt Enable MC : TCC_INTENSET_MC_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_20_31 : HAL.UInt12 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_INTENSET_Register use record OVF at 0 range 0 .. 0; TRG at 0 range 1 .. 1; CNT at 0 range 2 .. 2; ERR at 0 range 3 .. 3; Reserved_4_10 at 0 range 4 .. 10; DFS at 0 range 11 .. 11; FAULTA at 0 range 12 .. 12; FAULTB at 0 range 13 .. 13; FAULT at 0 range 14 .. 15; MC at 0 range 16 .. 19; Reserved_20_31 at 0 range 20 .. 31; end record; -- TCC_INTFLAG_FAULT array type TCC_INTFLAG_FAULT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for TCC_INTFLAG_FAULT type TCC_INTFLAG_FAULT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- FAULT as a value Val : HAL.UInt2; when True => -- FAULT as an array Arr : TCC_INTFLAG_FAULT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for TCC_INTFLAG_FAULT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- TCC_INTFLAG_MC array type TCC_INTFLAG_MC_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_INTFLAG_MC type TCC_INTFLAG_MC_Field (As_Array : Boolean := False) is record case As_Array is when False => -- MC as a value Val : HAL.UInt4; when True => -- MC as an array Arr : TCC_INTFLAG_MC_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_INTFLAG_MC_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Interrupt Flag Status and Clear type TCC_INTFLAG_Register is record -- Overflow OVF : Boolean := False; -- Retrigger TRG : Boolean := False; -- Counter CNT : Boolean := False; -- Error ERR : Boolean := False; -- unspecified Reserved_4_10 : HAL.UInt7 := 16#0#; -- Non-Recoverable Debug Fault DFS : Boolean := False; -- Recoverable Fault A FAULTA : Boolean := False; -- Recoverable Fault B FAULTB : Boolean := False; -- Non-Recoverable Fault 0 FAULT : TCC_INTFLAG_FAULT_Field := (As_Array => False, Val => 16#0#); -- Match or Capture 0 MC : TCC_INTFLAG_MC_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_20_31 : HAL.UInt12 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_INTFLAG_Register use record OVF at 0 range 0 .. 0; TRG at 0 range 1 .. 1; CNT at 0 range 2 .. 2; ERR at 0 range 3 .. 3; Reserved_4_10 at 0 range 4 .. 10; DFS at 0 range 11 .. 11; FAULTA at 0 range 12 .. 12; FAULTB at 0 range 13 .. 13; FAULT at 0 range 14 .. 15; MC at 0 range 16 .. 19; Reserved_20_31 at 0 range 20 .. 31; end record; -- TCC_STATUS_FAULT array type TCC_STATUS_FAULT_Field_Array is array (0 .. 1) of Boolean with Component_Size => 1, Size => 2; -- Type definition for TCC_STATUS_FAULT type TCC_STATUS_FAULT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- FAULT as a value Val : HAL.UInt2; when True => -- FAULT as an array Arr : TCC_STATUS_FAULT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for TCC_STATUS_FAULT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- TCC_STATUS_CCBV array type TCC_STATUS_CCBV_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_STATUS_CCBV type TCC_STATUS_CCBV_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CCBV as a value Val : HAL.UInt4; when True => -- CCBV as an array Arr : TCC_STATUS_CCBV_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_STATUS_CCBV_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- TCC_STATUS_CMP array type TCC_STATUS_CMP_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_STATUS_CMP type TCC_STATUS_CMP_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CMP as a value Val : HAL.UInt4; when True => -- CMP as an array Arr : TCC_STATUS_CMP_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_STATUS_CMP_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Status type TCC_STATUS_Register is record -- Read-only. Stop STOP : Boolean := True; -- Read-only. Ramp IDX : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Non-Recoverable Debug Fault State DFS : Boolean := False; -- Read-only. Slave SLAVE : Boolean := False; -- Pattern Buffer Valid PATTBV : Boolean := False; -- Wave Buffer Valid WAVEBV : Boolean := False; -- Period Buffer Valid PERBV : Boolean := False; -- Read-only. Recoverable Fault A Input FAULTAIN : Boolean := False; -- Read-only. Recoverable Fault B Input FAULTBIN : Boolean := False; -- Read-only. Non-Recoverable Fault0 Input FAULT0IN : Boolean := False; -- Read-only. Non-Recoverable Fault1 Input FAULT1IN : Boolean := False; -- Recoverable Fault A State FAULTA : Boolean := False; -- Recoverable Fault B State FAULTB : Boolean := False; -- Non-Recoverable Fault 0 State FAULT : TCC_STATUS_FAULT_Field := (As_Array => False, Val => 16#0#); -- Compare Channel 0 Buffer Valid CCBV : TCC_STATUS_CCBV_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_20_23 : HAL.UInt4 := 16#0#; -- Read-only. Compare Channel 0 Value CMP : TCC_STATUS_CMP_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_STATUS_Register use record STOP at 0 range 0 .. 0; IDX at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; DFS at 0 range 3 .. 3; SLAVE at 0 range 4 .. 4; PATTBV at 0 range 5 .. 5; WAVEBV at 0 range 6 .. 6; PERBV at 0 range 7 .. 7; FAULTAIN at 0 range 8 .. 8; FAULTBIN at 0 range 9 .. 9; FAULT0IN at 0 range 10 .. 10; FAULT1IN at 0 range 11 .. 11; FAULTA at 0 range 12 .. 12; FAULTB at 0 range 13 .. 13; FAULT at 0 range 14 .. 15; CCBV at 0 range 16 .. 19; Reserved_20_23 at 0 range 20 .. 23; CMP at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype TCC_COUNT_COUNT_Field is HAL.UInt24; -- Count type TCC_COUNT_Register is record -- Counter Value COUNT : TCC_COUNT_COUNT_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_COUNT_Register use record COUNT at 0 range 0 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_COUNT_DITH4_COUNT_Field is HAL.UInt20; -- Count type TCC_COUNT_DITH4_Register is record -- unspecified Reserved_0_3 : HAL.UInt4 := 16#0#; -- Counter Value COUNT : TCC_COUNT_DITH4_COUNT_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_COUNT_DITH4_Register use record Reserved_0_3 at 0 range 0 .. 3; COUNT at 0 range 4 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_COUNT_DITH5_COUNT_Field is HAL.UInt19; -- Count type TCC_COUNT_DITH5_Register is record -- unspecified Reserved_0_4 : HAL.UInt5 := 16#0#; -- Counter Value COUNT : TCC_COUNT_DITH5_COUNT_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_COUNT_DITH5_Register use record Reserved_0_4 at 0 range 0 .. 4; COUNT at 0 range 5 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_COUNT_DITH6_COUNT_Field is HAL.UInt18; -- Count type TCC_COUNT_DITH6_Register is record -- unspecified Reserved_0_5 : HAL.UInt6 := 16#0#; -- Counter Value COUNT : TCC_COUNT_DITH6_COUNT_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_COUNT_DITH6_Register use record Reserved_0_5 at 0 range 0 .. 5; COUNT at 0 range 6 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- TCC_PATT_PGE array type TCC_PATT_PGE_Field_Array is array (0 .. 7) of Boolean with Component_Size => 1, Size => 8; -- Type definition for TCC_PATT_PGE type TCC_PATT_PGE_Field (As_Array : Boolean := False) is record case As_Array is when False => -- PGE as a value Val : HAL.UInt8; when True => -- PGE as an array Arr : TCC_PATT_PGE_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_PATT_PGE_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- TCC_PATT_PGV array type TCC_PATT_PGV_Field_Array is array (0 .. 7) of Boolean with Component_Size => 1, Size => 8; -- Type definition for TCC_PATT_PGV type TCC_PATT_PGV_Field (As_Array : Boolean := False) is record case As_Array is when False => -- PGV as a value Val : HAL.UInt8; when True => -- PGV as an array Arr : TCC_PATT_PGV_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_PATT_PGV_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- Pattern type TCC_PATT_Register is record -- Pattern Generator 0 Output Enable PGE : TCC_PATT_PGE_Field := (As_Array => False, Val => 16#0#); -- Pattern Generator 0 Output Value PGV : TCC_PATT_PGV_Field := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Object_Size => 16, Bit_Order => System.Low_Order_First; for TCC_PATT_Register use record PGE at 0 range 0 .. 7; PGV at 0 range 8 .. 15; end record; -- Waveform Generation type WAVE_WAVEGENSelect is (-- Normal frequency NFRQ, -- Match frequency MFRQ, -- Normal PWM NPWM, -- Dual-slope critical DSCRITICAL, -- Dual-slope with interrupt/event condition when COUNT reaches ZERO DSBOTTOM, -- Dual-slope with interrupt/event condition when COUNT reaches ZERO or TOP DSBOTH, -- Dual-slope with interrupt/event condition when COUNT reaches TOP DSTOP) with Size => 3; for WAVE_WAVEGENSelect use (NFRQ => 0, MFRQ => 1, NPWM => 2, DSCRITICAL => 4, DSBOTTOM => 5, DSBOTH => 6, DSTOP => 7); -- Ramp Mode type WAVE_RAMPSelect is (-- RAMP1 operation RAMP1, -- Alternative RAMP2 operation RAMP2A, -- RAMP2 operation RAMP2) with Size => 2; for WAVE_RAMPSelect use (RAMP1 => 0, RAMP2A => 1, RAMP2 => 2); -- TCC_WAVE_CICCEN array type TCC_WAVE_CICCEN_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_WAVE_CICCEN type TCC_WAVE_CICCEN_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CICCEN as a value Val : HAL.UInt4; when True => -- CICCEN as an array Arr : TCC_WAVE_CICCEN_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_WAVE_CICCEN_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- TCC_WAVE_POL array type TCC_WAVE_POL_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_WAVE_POL type TCC_WAVE_POL_Field (As_Array : Boolean := False) is record case As_Array is when False => -- POL as a value Val : HAL.UInt4; when True => -- POL as an array Arr : TCC_WAVE_POL_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_WAVE_POL_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- TCC_WAVE_SWAP array type TCC_WAVE_SWAP_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_WAVE_SWAP type TCC_WAVE_SWAP_Field (As_Array : Boolean := False) is record case As_Array is when False => -- SWAP as a value Val : HAL.UInt4; when True => -- SWAP as an array Arr : TCC_WAVE_SWAP_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_WAVE_SWAP_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Waveform Control type TCC_WAVE_Register is record -- Waveform Generation WAVEGEN : WAVE_WAVEGENSelect := SAMD21_SVD.TCC.NFRQ; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- Ramp Mode RAMP : WAVE_RAMPSelect := SAMD21_SVD.TCC.RAMP1; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- Circular period Enable CIPEREN : Boolean := False; -- Circular Channel 0 Enable CICCEN : TCC_WAVE_CICCEN_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Channel 0 Polarity POL : TCC_WAVE_POL_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_20_23 : HAL.UInt4 := 16#0#; -- Swap DTI Output Pair 0 SWAP : TCC_WAVE_SWAP_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_WAVE_Register use record WAVEGEN at 0 range 0 .. 2; Reserved_3_3 at 0 range 3 .. 3; RAMP at 0 range 4 .. 5; Reserved_6_6 at 0 range 6 .. 6; CIPEREN at 0 range 7 .. 7; CICCEN at 0 range 8 .. 11; Reserved_12_15 at 0 range 12 .. 15; POL at 0 range 16 .. 19; Reserved_20_23 at 0 range 20 .. 23; SWAP at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype TCC_PER_PER_Field is HAL.UInt24; -- Period type TCC_PER_Register is record -- Period Value PER : TCC_PER_PER_Field := 16#FFFFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PER_Register use record PER at 0 range 0 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_PER_DITH4_DITHERCY_Field is HAL.UInt4; subtype TCC_PER_DITH4_PER_Field is HAL.UInt20; -- Period type TCC_PER_DITH4_Register is record -- Dithering Cycle Number DITHERCY : TCC_PER_DITH4_DITHERCY_Field := 16#F#; -- Period Value PER : TCC_PER_DITH4_PER_Field := 16#FFFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PER_DITH4_Register use record DITHERCY at 0 range 0 .. 3; PER at 0 range 4 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_PER_DITH5_DITHERCY_Field is HAL.UInt5; subtype TCC_PER_DITH5_PER_Field is HAL.UInt19; -- Period type TCC_PER_DITH5_Register is record -- Dithering Cycle Number DITHERCY : TCC_PER_DITH5_DITHERCY_Field := 16#1F#; -- Period Value PER : TCC_PER_DITH5_PER_Field := 16#7FFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PER_DITH5_Register use record DITHERCY at 0 range 0 .. 4; PER at 0 range 5 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_PER_DITH6_DITHERCY_Field is HAL.UInt6; subtype TCC_PER_DITH6_PER_Field is HAL.UInt18; -- Period type TCC_PER_DITH6_Register is record -- Dithering Cycle Number DITHERCY : TCC_PER_DITH6_DITHERCY_Field := 16#3F#; -- Period Value PER : TCC_PER_DITH6_PER_Field := 16#3FFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PER_DITH6_Register use record DITHERCY at 0 range 0 .. 5; PER at 0 range 6 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_CC_CC_Field is HAL.UInt24; -- Compare and Capture type TCC_CC_Register is record -- Channel Compare/Capture Value CC : TCC_CC_CC_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CC_Register use record CC at 0 range 0 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture type TCC_CC_Registers is array (0 .. 3) of TCC_CC_Register; subtype TCC_CC_DITH4_DITHERCY_Field is HAL.UInt4; subtype TCC_CC_DITH4_CC_Field is HAL.UInt20; -- Compare and Capture type TCC_CC_DITH4_Register is record -- Dithering Cycle Number DITHERCY : TCC_CC_DITH4_DITHERCY_Field := 16#0#; -- Channel Compare/Capture Value CC : TCC_CC_DITH4_CC_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CC_DITH4_Register use record DITHERCY at 0 range 0 .. 3; CC at 0 range 4 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture type TCC_CC_DITH4_Registers is array (0 .. 3) of TCC_CC_DITH4_Register; subtype TCC_CC_DITH5_DITHERCY_Field is HAL.UInt5; subtype TCC_CC_DITH5_CC_Field is HAL.UInt19; -- Compare and Capture type TCC_CC_DITH5_Register is record -- Dithering Cycle Number DITHERCY : TCC_CC_DITH5_DITHERCY_Field := 16#0#; -- Channel Compare/Capture Value CC : TCC_CC_DITH5_CC_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CC_DITH5_Register use record DITHERCY at 0 range 0 .. 4; CC at 0 range 5 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture type TCC_CC_DITH5_Registers is array (0 .. 3) of TCC_CC_DITH5_Register; subtype TCC_CC_DITH6_DITHERCY_Field is HAL.UInt6; subtype TCC_CC_DITH6_CC_Field is HAL.UInt18; -- Compare and Capture type TCC_CC_DITH6_Register is record -- Dithering Cycle Number DITHERCY : TCC_CC_DITH6_DITHERCY_Field := 16#0#; -- Channel Compare/Capture Value CC : TCC_CC_DITH6_CC_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CC_DITH6_Register use record DITHERCY at 0 range 0 .. 5; CC at 0 range 6 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture type TCC_CC_DITH6_Registers is array (0 .. 3) of TCC_CC_DITH6_Register; -- TCC_PATTB_PGEB array type TCC_PATTB_PGEB_Field_Array is array (0 .. 7) of Boolean with Component_Size => 1, Size => 8; -- Type definition for TCC_PATTB_PGEB type TCC_PATTB_PGEB_Field (As_Array : Boolean := False) is record case As_Array is when False => -- PGEB as a value Val : HAL.UInt8; when True => -- PGEB as an array Arr : TCC_PATTB_PGEB_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_PATTB_PGEB_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- TCC_PATTB_PGVB array type TCC_PATTB_PGVB_Field_Array is array (0 .. 7) of Boolean with Component_Size => 1, Size => 8; -- Type definition for TCC_PATTB_PGVB type TCC_PATTB_PGVB_Field (As_Array : Boolean := False) is record case As_Array is when False => -- PGVB as a value Val : HAL.UInt8; when True => -- PGVB as an array Arr : TCC_PATTB_PGVB_Field_Array; end case; end record with Unchecked_Union, Size => 8; for TCC_PATTB_PGVB_Field use record Val at 0 range 0 .. 7; Arr at 0 range 0 .. 7; end record; -- Pattern Buffer type TCC_PATTB_Register is record -- Pattern Generator 0 Output Enable Buffer PGEB : TCC_PATTB_PGEB_Field := (As_Array => False, Val => 16#0#); -- Pattern Generator 0 Output Enable PGVB : TCC_PATTB_PGVB_Field := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Object_Size => 16, Bit_Order => System.Low_Order_First; for TCC_PATTB_Register use record PGEB at 0 range 0 .. 7; PGVB at 0 range 8 .. 15; end record; -- Waveform Generation Buffer type WAVEB_WAVEGENBSelect is (-- Normal frequency NFRQ, -- Match frequency MFRQ, -- Normal PWM NPWM, -- Dual-slope critical DSCRITICAL, -- Dual-slope with interrupt/event condition when COUNT reaches ZERO DSBOTTOM, -- Dual-slope with interrupt/event condition when COUNT reaches ZERO or TOP DSBOTH, -- Dual-slope with interrupt/event condition when COUNT reaches TOP DSTOP) with Size => 3; for WAVEB_WAVEGENBSelect use (NFRQ => 0, MFRQ => 1, NPWM => 2, DSCRITICAL => 4, DSBOTTOM => 5, DSBOTH => 6, DSTOP => 7); -- Ramp Mode Buffer type WAVEB_RAMPBSelect is (-- RAMP1 operation RAMP1, -- Alternative RAMP2 operation RAMP2A, -- RAMP2 operation RAMP2) with Size => 2; for WAVEB_RAMPBSelect use (RAMP1 => 0, RAMP2A => 1, RAMP2 => 2); -- TCC_WAVEB_CICCENB array type TCC_WAVEB_CICCENB_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_WAVEB_CICCENB type TCC_WAVEB_CICCENB_Field (As_Array : Boolean := False) is record case As_Array is when False => -- CICCENB as a value Val : HAL.UInt4; when True => -- CICCENB as an array Arr : TCC_WAVEB_CICCENB_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_WAVEB_CICCENB_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- TCC_WAVEB_POLB array type TCC_WAVEB_POLB_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_WAVEB_POLB type TCC_WAVEB_POLB_Field (As_Array : Boolean := False) is record case As_Array is when False => -- POLB as a value Val : HAL.UInt4; when True => -- POLB as an array Arr : TCC_WAVEB_POLB_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_WAVEB_POLB_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- TCC_WAVEB_SWAPB array type TCC_WAVEB_SWAPB_Field_Array is array (0 .. 3) of Boolean with Component_Size => 1, Size => 4; -- Type definition for TCC_WAVEB_SWAPB type TCC_WAVEB_SWAPB_Field (As_Array : Boolean := False) is record case As_Array is when False => -- SWAPB as a value Val : HAL.UInt4; when True => -- SWAPB as an array Arr : TCC_WAVEB_SWAPB_Field_Array; end case; end record with Unchecked_Union, Size => 4; for TCC_WAVEB_SWAPB_Field use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Waveform Control Buffer type TCC_WAVEB_Register is record -- Waveform Generation Buffer WAVEGENB : WAVEB_WAVEGENBSelect := SAMD21_SVD.TCC.NFRQ; -- unspecified Reserved_3_3 : HAL.Bit := 16#0#; -- Ramp Mode Buffer RAMPB : WAVEB_RAMPBSelect := SAMD21_SVD.TCC.RAMP1; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- Circular Period Enable Buffer CIPERENB : Boolean := False; -- Circular Channel 0 Enable Buffer CICCENB : TCC_WAVEB_CICCENB_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Channel 0 Polarity Buffer POLB : TCC_WAVEB_POLB_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_20_23 : HAL.UInt4 := 16#0#; -- Swap DTI Output Pair 0 Buffer SWAPB : TCC_WAVEB_SWAPB_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_WAVEB_Register use record WAVEGENB at 0 range 0 .. 2; Reserved_3_3 at 0 range 3 .. 3; RAMPB at 0 range 4 .. 5; Reserved_6_6 at 0 range 6 .. 6; CIPERENB at 0 range 7 .. 7; CICCENB at 0 range 8 .. 11; Reserved_12_15 at 0 range 12 .. 15; POLB at 0 range 16 .. 19; Reserved_20_23 at 0 range 20 .. 23; SWAPB at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype TCC_PERB_PERB_Field is HAL.UInt24; -- Period Buffer type TCC_PERB_Register is record -- Period Buffer Value PERB : TCC_PERB_PERB_Field := 16#FFFFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PERB_Register use record PERB at 0 range 0 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_PERB_DITH4_DITHERCYB_Field is HAL.UInt4; subtype TCC_PERB_DITH4_PERB_Field is HAL.UInt20; -- Period Buffer type TCC_PERB_DITH4_Register is record -- Dithering Buffer Cycle Number DITHERCYB : TCC_PERB_DITH4_DITHERCYB_Field := 16#F#; -- Period Buffer Value PERB : TCC_PERB_DITH4_PERB_Field := 16#FFFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PERB_DITH4_Register use record DITHERCYB at 0 range 0 .. 3; PERB at 0 range 4 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_PERB_DITH5_DITHERCYB_Field is HAL.UInt5; subtype TCC_PERB_DITH5_PERB_Field is HAL.UInt19; -- Period Buffer type TCC_PERB_DITH5_Register is record -- Dithering Buffer Cycle Number DITHERCYB : TCC_PERB_DITH5_DITHERCYB_Field := 16#1F#; -- Period Buffer Value PERB : TCC_PERB_DITH5_PERB_Field := 16#7FFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PERB_DITH5_Register use record DITHERCYB at 0 range 0 .. 4; PERB at 0 range 5 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_PERB_DITH6_DITHERCYB_Field is HAL.UInt6; subtype TCC_PERB_DITH6_PERB_Field is HAL.UInt18; -- Period Buffer type TCC_PERB_DITH6_Register is record -- Dithering Buffer Cycle Number DITHERCYB : TCC_PERB_DITH6_DITHERCYB_Field := 16#3F#; -- Period Buffer Value PERB : TCC_PERB_DITH6_PERB_Field := 16#3FFFF#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#FF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_PERB_DITH6_Register use record DITHERCYB at 0 range 0 .. 5; PERB at 0 range 6 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype TCC_CCB_CCB_Field is HAL.UInt24; -- Compare and Capture Buffer type TCC_CCB_Register is record -- Channel Compare/Capture Buffer Value CCB : TCC_CCB_CCB_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CCB_Register use record CCB at 0 range 0 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture Buffer type TCC_CCB_Registers is array (0 .. 3) of TCC_CCB_Register; subtype TCC_CCB_DITH4_DITHERCYB_Field is HAL.UInt4; subtype TCC_CCB_DITH4_CCB_Field is HAL.UInt20; -- Compare and Capture Buffer type TCC_CCB_DITH4_Register is record -- Dithering Buffer Cycle Number DITHERCYB : TCC_CCB_DITH4_DITHERCYB_Field := 16#0#; -- Channel Compare/Capture Buffer Value CCB : TCC_CCB_DITH4_CCB_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CCB_DITH4_Register use record DITHERCYB at 0 range 0 .. 3; CCB at 0 range 4 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture Buffer type TCC_CCB_DITH4_Registers is array (0 .. 3) of TCC_CCB_DITH4_Register; subtype TCC_CCB_DITH5_DITHERCYB_Field is HAL.UInt5; subtype TCC_CCB_DITH5_CCB_Field is HAL.UInt19; -- Compare and Capture Buffer type TCC_CCB_DITH5_Register is record -- Dithering Buffer Cycle Number DITHERCYB : TCC_CCB_DITH5_DITHERCYB_Field := 16#0#; -- Channel Compare/Capture Buffer Value CCB : TCC_CCB_DITH5_CCB_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CCB_DITH5_Register use record DITHERCYB at 0 range 0 .. 4; CCB at 0 range 5 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture Buffer type TCC_CCB_DITH5_Registers is array (0 .. 3) of TCC_CCB_DITH5_Register; subtype TCC_CCB_DITH6_DITHERCYB_Field is HAL.UInt6; subtype TCC_CCB_DITH6_CCB_Field is HAL.UInt18; -- Compare and Capture Buffer type TCC_CCB_DITH6_Register is record -- Dithering Buffer Cycle Number DITHERCYB : TCC_CCB_DITH6_DITHERCYB_Field := 16#0#; -- Channel Compare/Capture Buffer Value CCB : TCC_CCB_DITH6_CCB_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TCC_CCB_DITH6_Register use record DITHERCYB at 0 range 0 .. 5; CCB at 0 range 6 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; -- Compare and Capture Buffer type TCC_CCB_DITH6_Registers is array (0 .. 3) of TCC_CCB_DITH6_Register; ----------------- -- Peripherals -- ----------------- type TCC0_Disc is (Default, DITH4, DITH5, DITH6); -- Timer Counter Control 0 type TCC_Peripheral (Discriminent : TCC0_Disc := Default) is record -- Control A CTRLA : aliased TCC_CTRLA_Register; -- Control B Clear CTRLBCLR : aliased TCC_CTRLBCLR_Register; -- Control B Set CTRLBSET : aliased TCC_CTRLBSET_Register; -- Synchronization Busy SYNCBUSY : aliased TCC_SYNCBUSY_Register; -- Recoverable Fault A Configuration FCTRLA : aliased TCC_FCTRLA_Register; -- Recoverable Fault B Configuration FCTRLB : aliased TCC_FCTRLB_Register; -- Waveform Extension Configuration WEXCTRL : aliased TCC_WEXCTRL_Register; -- Driver Control DRVCTRL : aliased TCC_DRVCTRL_Register; -- Debug Control DBGCTRL : aliased TCC_DBGCTRL_Register; -- Event Control EVCTRL : aliased TCC_EVCTRL_Register; -- Interrupt Enable Clear INTENCLR : aliased TCC_INTENCLR_Register; -- Interrupt Enable Set INTENSET : aliased TCC_INTENSET_Register; -- Interrupt Flag Status and Clear INTFLAG : aliased TCC_INTFLAG_Register; -- Status STATUS : aliased TCC_STATUS_Register; -- Pattern PATT : aliased TCC_PATT_Register; -- Waveform Control WAVE : aliased TCC_WAVE_Register; -- Pattern Buffer PATTB : aliased TCC_PATTB_Register; -- Waveform Control Buffer WAVEB : aliased TCC_WAVEB_Register; case Discriminent is when Default => -- Count COUNT : aliased TCC_COUNT_Register; -- Period PER : aliased TCC_PER_Register; -- Compare and Capture CC : aliased TCC_CC_Registers; -- Period Buffer PERB : aliased TCC_PERB_Register; -- Compare and Capture Buffer CCB : aliased TCC_CCB_Registers; when DITH4 => -- Count COUNT_DITH4 : aliased TCC_COUNT_DITH4_Register; -- Period PER_DITH4 : aliased TCC_PER_DITH4_Register; -- Compare and Capture CC_DITH4 : aliased TCC_CC_DITH4_Registers; -- Period Buffer PERB_DITH4 : aliased TCC_PERB_DITH4_Register; -- Compare and Capture Buffer CCB_DITH4 : aliased TCC_CCB_DITH4_Registers; when DITH5 => -- Count COUNT_DITH5 : aliased TCC_COUNT_DITH5_Register; -- Period PER_DITH5 : aliased TCC_PER_DITH5_Register; -- Compare and Capture CC_DITH5 : aliased TCC_CC_DITH5_Registers; -- Period Buffer PERB_DITH5 : aliased TCC_PERB_DITH5_Register; -- Compare and Capture Buffer CCB_DITH5 : aliased TCC_CCB_DITH5_Registers; when DITH6 => -- Count COUNT_DITH6 : aliased TCC_COUNT_DITH6_Register; -- Period PER_DITH6 : aliased TCC_PER_DITH6_Register; -- Compare and Capture CC_DITH6 : aliased TCC_CC_DITH6_Registers; -- Period Buffer PERB_DITH6 : aliased TCC_PERB_DITH6_Register; -- Compare and Capture Buffer CCB_DITH6 : aliased TCC_CCB_DITH6_Registers; end case; end record with Unchecked_Union, Volatile; for TCC_Peripheral use record CTRLA at 16#0# range 0 .. 31; CTRLBCLR at 16#4# range 0 .. 7; CTRLBSET at 16#5# range 0 .. 7; SYNCBUSY at 16#8# range 0 .. 31; FCTRLA at 16#C# range 0 .. 31; FCTRLB at 16#10# range 0 .. 31; WEXCTRL at 16#14# range 0 .. 31; DRVCTRL at 16#18# range 0 .. 31; DBGCTRL at 16#1E# range 0 .. 7; EVCTRL at 16#20# range 0 .. 31; INTENCLR at 16#24# range 0 .. 31; INTENSET at 16#28# range 0 .. 31; INTFLAG at 16#2C# range 0 .. 31; STATUS at 16#30# range 0 .. 31; PATT at 16#38# range 0 .. 15; WAVE at 16#3C# range 0 .. 31; PATTB at 16#64# range 0 .. 15; WAVEB at 16#68# range 0 .. 31; COUNT at 16#34# range 0 .. 31; PER at 16#40# range 0 .. 31; CC at 16#44# range 0 .. 127; PERB at 16#6C# range 0 .. 31; CCB at 16#70# range 0 .. 127; COUNT_DITH4 at 16#34# range 0 .. 31; PER_DITH4 at 16#40# range 0 .. 31; CC_DITH4 at 16#44# range 0 .. 127; PERB_DITH4 at 16#6C# range 0 .. 31; CCB_DITH4 at 16#70# range 0 .. 127; COUNT_DITH5 at 16#34# range 0 .. 31; PER_DITH5 at 16#40# range 0 .. 31; CC_DITH5 at 16#44# range 0 .. 127; PERB_DITH5 at 16#6C# range 0 .. 31; CCB_DITH5 at 16#70# range 0 .. 127; COUNT_DITH6 at 16#34# range 0 .. 31; PER_DITH6 at 16#40# range 0 .. 31; CC_DITH6 at 16#44# range 0 .. 127; PERB_DITH6 at 16#6C# range 0 .. 31; CCB_DITH6 at 16#70# range 0 .. 127; end record; -- Timer Counter Control 0 TCC0_Periph : aliased TCC_Peripheral with Import, Address => TCC0_Base; -- Timer Counter Control 1 TCC1_Periph : aliased TCC_Peripheral with Import, Address => TCC1_Base; -- Timer Counter Control 2 TCC2_Periph : aliased TCC_Peripheral with Import, Address => TCC2_Base; end SAMD21_SVD.TCC;
ellamosi/Ada_BMP_Library
Ada
3,701
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- This package provides routines for drawing shapes, characters, and strings -- on a bit-mapped device or graphical buffer. with BMP_Fonts; use BMP_Fonts; with Hershey_Fonts; use Hershey_Fonts; with Bitmap; use Bitmap; with Bitmap.Buffer; use Bitmap.Buffer; package Bitmapped_Drawing is procedure Draw_Char (Buffer : in out Bitmap_Buffer'Class; Start : Point; Char : Character; Font : BMP_Font; Foreground : UInt32; Background : UInt32); procedure Draw_String (Buffer : in out Bitmap_Buffer'Class; Start : Point; Msg : String; Font : BMP_Font; Foreground : Bitmap_Color; Background : Bitmap_Color); procedure Draw_String (Buffer : in out Bitmap_Buffer'Class; Start : Point; Msg : String; Font : Hershey_Font; Height : Natural; Bold : Boolean; Foreground : Bitmap_Color; Fast : Boolean := True); procedure Draw_String (Buffer : in out Bitmap_Buffer'Class; Area : Rect; Msg : String; Font : Hershey_Font; Bold : Boolean; Outline : Boolean; Foreground : Bitmap_Color; Fast : Boolean := True); end Bitmapped_Drawing;
reznikmm/matreshka
Ada
4,688
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Style.Text_Underline_Type_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Text_Underline_Type_Attribute_Node is begin return Self : Style_Text_Underline_Type_Attribute_Node do Matreshka.ODF_Style.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Style_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Text_Underline_Type_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Text_Underline_Type_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Style_URI, Matreshka.ODF_String_Constants.Text_Underline_Type_Attribute, Style_Text_Underline_Type_Attribute_Node'Tag); end Matreshka.ODF_Style.Text_Underline_Type_Attributes;
reznikmm/matreshka
Ada
6,719
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Svg.Desc_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Svg_Desc_Element_Node is begin return Self : Svg_Desc_Element_Node do Matreshka.ODF_Svg.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Svg_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Svg_Desc_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Svg_Desc (ODF.DOM.Svg_Desc_Elements.ODF_Svg_Desc_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Svg_Desc_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Desc_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Svg_Desc_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Svg_Desc (ODF.DOM.Svg_Desc_Elements.ODF_Svg_Desc_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Svg_Desc_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Svg_Desc (Visitor, ODF.DOM.Svg_Desc_Elements.ODF_Svg_Desc_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Svg_URI, Matreshka.ODF_String_Constants.Desc_Element, Svg_Desc_Element_Node'Tag); end Matreshka.ODF_Svg.Desc_Elements;
gerr135/ada_composition
Ada
1,929
ads
-- -- This is a very basic wrapper package performing proper instantiations and defining types. -- Everything can be done explicitly in a few lines of code, as shown in main demo procedure. -- However this is shown for completeness and also to demonstrate how partial view can -- present inheritance in a much more evident form. Full definition in a private part -- is exactly the same as in main demo code. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- with base_iface; use base_iface; with base_type; use base_type; with generic_mixin; package generic_mixin_compositor is type Extension is limited new The_Interface with private; type Mixin is new The_Type and The_Interface with private; type Mixin_Child is new Mixin with private; overriding procedure simple (Self : Mixin_Child); -- overriding procedure compound (Self : Mixin_Child); -- overriding procedure redispatching(Self : Mixin_Child); private type Stub is tagged limited null record; -- needed for generic package P_stub is new generic_mixin(Base=>Stub); type Extension is limited new P_stub.Derived with null record; package P_base1 is new generic_mixin(Base=>The_Type); type Mixin is new P_base1.Derived with null record; -- NOTE: You can chain multiple mixins to get defaults for various interfaces. -- For Example: -- package A_Pkg is new A_Mixin(Base => Some_Base); -- package B_Pkg is new B_Mixin(Base => A_Pkg.Derived); -- This will add both interfaces from A_Mixin and B_Mixin to the base type. --------------- -- try further inheritance and overriding various methods type Mixin_Child is new Mixin with null record; end generic_mixin_compositor;
fnarenji/BezierToSTL
Ada
1,341
ads
with Courbes; use Courbes; with Iterateur_Mots; use Iterateur_Mots; package Parser_Svg is use Liste_Courbes; Courbe_Abs : exception; Courbe_Illisible : exception; --parse un fichier svg et retourne une liste de points (voir documentation) -- lève Courbe_Abs si pas de courbe trouvée -- lève Courbe_Illisible si erreur de syntaxe procedure Charger_SVG(Nom_Fichier : String; L : out Liste); private Marqueur_Ligne : constant String := "d="""; Separateur : constant Character := ' '; Separateur_Coord : constant Character := ','; type Op_Code is ('m', 'l', 'h', 'v', 'c', 'q', 'M', 'L', 'H', 'V', 'C', 'Q'); subtype Op_Code_Relative is Op_Code range 'm' .. 'q'; subtype Op_Code_Absolute is Op_Code range 'M' .. 'Q'; -- Lit un opcode procedure Lire_OpCode ( Iterateur : in out Iterateur_Mot; Op : out Op_Code); -- Execute l'opcode procedure Gerer_OpCode ( Iterateur : in out Iterateur_Mot; Op : Op_Code; L : in out Liste); -- Valide le mot suivant comme opcode function Mot_Suivant_Est_Op_Code_Ou_Vide (Iterateur : Iterateur_Mot) return Boolean; -- Interprete le texte en tant qu'opcode -- True si success function Interpreter_Op_Code (Contenu : String; Op : in out Op_Code) return Boolean; end;
glencornell/ada-socketcan
Ada
3,379
ads
-- MIT License -- -- Copyright (c) 2021 Glen Cornell <[email protected]> -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. package Sockets.Can.Broadcast_Manager is type Broadcast_Manager_Type is tagged private; procedure Create (This : out Broadcast_Manager_Type; Interface_Name : in String); -- Object initialization. function Get_Socket (This : in Broadcast_Manager_Type) return Sockets.Can.Socket_Type; -- Socket type accessor procedure Send_Periodic (This : in Broadcast_Manager_Type; Item : in Sockets.Can_Frame.Can_Frame; Interval : in Duration); -- Periodically send the CAN frame at the specified interval. procedure Send_Once (This : in Broadcast_Manager_Type; Item : in Sockets.Can_Frame.Can_Frame); -- Send the CAN frame only once. procedure Update_Periodic (This : in Broadcast_Manager_Type; Item : in Sockets.Can_Frame.Can_Frame); -- Change the contents of the CAN frame that is periodically sent. procedure Stop_Periodic (This : in Broadcast_Manager_Type; Can_Id : in Sockets.Can_Frame.Can_Id_Type); -- Delete the cyclic send job of the CAN frame with the specified -- CAN ID. procedure Add_Receive_Filter (This : in Broadcast_Manager_Type; Item : in Sockets.Can_Frame.Can_Frame; Interval : in Duration := 0.0); -- Setup the receive filter for the given CAN ID. Mask is the -- content filter - if data changes on the specified mask, the -- broadcast manager will send the CAN frame to your socket. If -- the mask is empty, content filtering is disabled and any change -- will be forwarded to the receiving socket. Interval is the -- down-sampling inteval. Down-sampling will reduce the CPU -- burden on the application at the expense of dropping all -- packets in between intervals. procedure Remove_Receive_Filter (This : in Broadcast_Manager_Type; Can_Id : in Sockets.Can_Frame.Can_Id_Type); -- Remove the receive filter. procedure Receive_Can_Frame (This : in Broadcast_Manager_Type; Frame : out Sockets.Can_Frame.Can_Frame); private type Broadcast_Manager_Type is tagged record Socket : Sockets.Can.Socket_Type; Address : Sockets.Can.Sock_Addr_Type; end record; end Sockets.Can.Broadcast_Manager;
helgeanl/vigilant-pancake
Ada
4,088
adb
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Numerics.Float_Random; use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Numerics.Float_Random; procedure exercise7 is Count_Failed : exception; -- Exception to be raised when counting fails Gen : Generator; -- Random number generator protected type Transaction_Manager (N : Positive) is entry Finished; function Commit return Boolean; procedure Signal_Abort; private Finished_Gate_Open : Boolean := False; Aborted : Boolean := False; Should_Commit : Boolean := True; end Transaction_Manager; protected body Transaction_Manager is entry Finished when Finished_Gate_Open or Finished'Count = N is begin ------------------------------------------ -- PART 3: Complete the exit protocol here ------------------------------------------ if Finished'Count = N-1 then -- First one in let all in Finished_Gate_Open := True; end if; if Aborted = True then Should_Commit := False; else Should_Commit := True; end if; if Finished'Count = 0 then Finished_Gate_Open := False; Aborted := False; end if; end Finished; procedure Signal_Abort is begin Aborted := True; end Signal_Abort; function Commit return Boolean is begin return Should_Commit; end Commit; end Transaction_Manager; function Unreliable_Slow_Add (x : Integer) return Integer is Error_Rate : Constant := 0.15; -- (between 0 and 1) return_value : Integer := 0; begin ------------------------------------------- -- PART 1: Create the transaction work here ------------------------------------------- -- compare Random(Gen) with Error_Rate and do: if Random(Gen) > Error_Rate then ---- The intended behaviour: delay Duration(Random(Gen)*4.0); -- Work takes 4-ish seconds return_value := x + 10; return return_value; else ---- The faulty behaviour: delay Duration(Random(Gen)*0.5); -- Work takes up to half a second Put_Line("-- ** Exception was raised from worker **"); raise Count_Failed; -- Error, raise exception end if; end Unreliable_Slow_Add; task type Transaction_Worker (Initial : Integer; Manager : access Transaction_Manager); task body Transaction_Worker is Num : Integer := Initial; Prev : Integer := Num; Round_Num : Integer := 0; begin Put_Line ("Worker" & Integer'Image(Initial) & " started"); loop Put_Line ("Worker" & Integer'Image(Initial) & " started round" & Integer'Image(Round_Num)); Round_Num := Round_Num + 1; --------------------------------------- -- PART 2: Do the transaction work here --------------------------------------- begin Num := Unreliable_Slow_Add (Num); -- Add Num +10 Manager.Finished; exception -- Start of exception handlers when Count_Failed => Manager.Signal_Abort; end; if Manager.Commit = True then Put_Line ("-- Worker" & Integer'Image(Initial) & " comitting" & Integer'Image(Num)); else Put_Line ("-- Worker" & Integer'Image(Initial) & " reverting from" & Integer'Image(Num) & " to" & Integer'Image(Prev)); ------------------------------------------- -- PART 2: Roll back to previous value here ------------------------------------------- Num := Prev; end if; Prev := Num; delay 0.5; end loop; end Transaction_Worker; Manager : aliased Transaction_Manager (3); Worker_1 : Transaction_Worker (0, Manager'Access); Worker_2 : Transaction_Worker (1, Manager'Access); Worker_3 : Transaction_Worker (2, Manager'Access); begin Reset(Gen); -- Seed the random number generator end exercise7;
stcarrez/atlas
Ada
2,842
adb
----------------------------------------------------------------------- -- atlas-server -- Application server -- Copyright (C) 2011 - 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Log.Loggers; with Util.Commands; with AWA.Commands.Drivers; with AWA.Commands.Start; with AWA.Commands.Setup; with AWA.Commands.Stop; with AWA.Commands.List; with AWA.Commands.Info; with Awa.Commands.Migrate; with ADO.Sqlite; -- with ADO.Mysql; -- with ADO.Postgresql; with Atlas.Applications; with Atlas.Init; procedure Atlas.Server is package Server_Commands is new AWA.Commands.Drivers (Driver_Name => "atlas", Container_Type => Atlas.Init.Container_Type); package List_Command is new AWA.Commands.List (Server_Commands); package Start_Command is new AWA.Commands.Start (Server_Commands); package Stop_Command is new AWA.Commands.Stop (Server_Commands); package Info_Command is new AWA.Commands.Info (Server_Commands); package Migrate_Command is new AWA.Commands.Migrate (Server_Commands); package Setup_Command is new AWA.Commands.Setup (Start_Command); pragma Unreferenced (List_Command, Start_Command, Stop_Command, Info_Command, Setup_Command, Migrate_Command); Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Atlas.Server"); App : constant Atlas.Applications.Application_Access := new Atlas.Applications.Application; WS : Atlas.Init.Container_Type renames Server_Commands.WS; Context : AWA.Commands.Context_Type; Arguments : Util.Commands.Dynamic_Argument_List; begin -- Initialize the database drivers (all of them or specific ones). -- ADO.Drivers.Initialize; ADO.Sqlite.Initialize; -- ADO.Mysql.Initialize; -- ADO.Postgresql.Initialize; WS.Register_Application (Atlas.Applications.CONTEXT_PATH, App.all'Access); Atlas.Init.Initialize (Log); Log.Info ("Connect you browser to: http://localhost:8080{0}/index.html", Atlas.Applications.CONTEXT_PATH); Server_Commands.Run (Context, Arguments); exception when E : others => Context.Print (E); end Atlas.Server;
zhmu/ananas
Ada
7,503
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . V E C T O R S . B O O L E A N _ O P E R A T I O N S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains functions for runtime operations on boolean vectors -- Preconditions in this unit are meant for analysis only, not for run-time -- checking, so that the expected exceptions are raised. This is enforced by -- setting the corresponding assertion policy to Ignore. Postconditions and -- contract cases should not be executed at runtime as well, in order not to -- slow down the execution of these functions. pragma Assertion_Policy (Pre => Ignore, Post => Ignore, Contract_Cases => Ignore, Ghost => Ignore); package System.Vectors.Boolean_Operations with Pure, SPARK_Mode is pragma Warnings (Off, "aspect ""Pre"" not enforced on inlined subprogram", Reason => "Pre only used in proof"); pragma Warnings (Off, "aspect ""Post"" not enforced on inlined subprogram", Reason => "Post only used in proof"); -- Type Vectors.Vector represents an array of Boolean, each of which -- takes 8 bits of the representation, with the 7 msb set to zero. Express -- in contracts the constraint on valid vectors and the model that they -- represent, and the relationship between input models and output model. Vector_Boolean_Size : constant Positive := System.Word_Size / System.Storage_Unit with Ghost; type Vector_Element is mod 2 ** System.Storage_Unit with Ghost; type Vector_Boolean_Array is array (1 .. Vector_Boolean_Size) of Boolean with Ghost; function Shift_Right (V : Vectors.Vector; N : Natural) return Vectors.Vector with Ghost, Import, Convention => Intrinsic; function Element (V : Vectors.Vector; N : Positive) return Vector_Element is (Vector_Element (Shift_Right (V, (N - 1) * System.Storage_Unit) and (2 ** System.Storage_Unit - 1))) with Ghost, Pre => N <= Vector_Boolean_Size; -- Return the Nth element represented by the vector function Valid (V : Vectors.Vector) return Boolean is (for all J in 1 .. Vector_Boolean_Size => Element (V, J) in 0 .. 1) with Ghost; -- A valid vector is one for which all elements are 0 (representing False) -- or 1 (representing True). function Model (V : Vectors.Vector) return Vector_Boolean_Array with Ghost, Pre => Valid (V); function Model (V : Vectors.Vector) return Vector_Boolean_Array is (for J in 1 .. Vector_Boolean_Size => Element (V, J) = 1); -- The model of a valid vector is the corresponding array of Boolean values -- Although in general the boolean operations on arrays of booleans are -- identical to operations on arrays of unsigned words of the same size, -- for the "not" operator this is not the case as False is typically -- represented by 0 and true by 1. function "not" (Item : Vectors.Vector) return Vectors.Vector with Pre => Valid (Item), Post => Valid ("not"'Result) and then (for all J in 1 .. Vector_Boolean_Size => Model ("not"'Result) (J) = not Model (Item) (J)); -- The three boolean operations "nand", "nor" and "nxor" are needed -- for cases where the compiler moves boolean array operations into -- the body of the loop that iterates over the array elements. -- Note the following equivalences: -- (not X) or (not Y) = not (X and Y) = Nand (X, Y) -- (not X) and (not Y) = not (X or Y) = Nor (X, Y) -- (not X) xor (not Y) = X xor Y -- X xor (not Y) = not (X xor Y) = Nxor (X, Y) function Nand (Left, Right : Boolean) return Boolean with Post => Nand'Result = not (Left and Right); function Nor (Left, Right : Boolean) return Boolean with Post => Nor'Result = not (Left or Right); function Nxor (Left, Right : Boolean) return Boolean with Post => Nxor'Result = not (Left xor Right); function Nand (Left, Right : Vectors.Vector) return Vectors.Vector with Pre => Valid (Left) and then Valid (Right), Post => Valid (Nand'Result) and then (for all J in 1 .. Vector_Boolean_Size => Model (Nand'Result) (J) = Nand (Model (Left) (J), Model (Right) (J))); function Nor (Left, Right : Vectors.Vector) return Vectors.Vector with Pre => Valid (Left) and then Valid (Right), Post => Valid (Nor'Result) and then (for all J in 1 .. Vector_Boolean_Size => Model (Nor'Result) (J) = Nor (Model (Left) (J), Model (Right) (J))); function Nxor (Left, Right : Vectors.Vector) return Vectors.Vector with Pre => Valid (Left) and then Valid (Right), Post => Valid (Nxor'Result) and then (for all J in 1 .. Vector_Boolean_Size => Model (Nxor'Result) (J) = Nxor (Model (Left) (J), Model (Right) (J))); pragma Inline_Always ("not"); pragma Inline_Always (Nand); pragma Inline_Always (Nor); pragma Inline_Always (Nxor); end System.Vectors.Boolean_Operations;
1Crazymoney/LearnAda
Ada
451
adb
with Racionalisok, Ada.Integer_Text_IO, Ada.Text_IO; use Racionalisok, Ada.Integer_Text_IO, Ada.Text_IO; procedure RacionalisDemo is X: Racionalis := 1/2; Y: Racionalis := 3/5; R: Racionalis := 1/1; -- X: Racionális := 3/4/5; begin --R := R / (R/2); --Put( Szamlalo(R) ); --Put( '/' ); --Put( Nevezo(R) ); R := X + Y; Put( Szamlalo(R) ); Put( '/' ); Put( Nevezo(R) ); end;
AdaCore/Ada-IntelliJ
Ada
460
adb
-- Numeric Literals 123 123_456 12_34_56 123.456 123_456.789 123.456_789 12_34.567_89 123E12 1.23e5_4 12_3E+5 1.2_3e+5 1_2.3E-5 123.4e-5 1#123# 1_6#123.3#e-12 32#12_3_Ab#E4_5 -- Textual Literals ' ' 'A' 'b' '0' ';' '"' '[' '}' '#' '=' '+' '/' '?' "Hello" "Hello world!" "A single quote ' in a string literal" "The following is not a comment -- hello world!" "This is a ""single valid string literal"" in Ada" "But these are separate" "string literals in Ada"
sungyeon/drake
Ada
18,563
adb
with Ada.Exception_Identification.From_Here; with Ada.Exceptions.Finally; with System.Formatting; with System.UTF_Conversions; package body Ada.Text_IO.Formatting is use Exception_Identification.From_Here; use type System.Long_Long_Integer_Types.Word_Integer; use type System.Long_Long_Integer_Types.Word_Unsigned; use type System.Long_Long_Integer_Types.Long_Long_Unsigned; subtype Word_Integer is System.Long_Long_Integer_Types.Word_Integer; subtype Word_Unsigned is System.Long_Long_Integer_Types.Word_Unsigned; subtype Long_Long_Unsigned is System.Long_Long_Integer_Types.Long_Long_Unsigned; procedure Skip_Spaces ( File : File_Type); -- Input_File_Type procedure Skip_Spaces ( File : File_Type) is Item : Character; End_Of_Line : Boolean; begin loop Look_Ahead (File, Item, End_Of_Line); -- checking the predicate exit when not End_Of_Line and then Item /= ' ' and then Item /= Character'Val (9); Skip_Ahead (File); end loop; end Skip_Spaces; procedure Adjust ( File : File_Type; -- Output_File_Type Width : Field); procedure Adjust ( File : File_Type; Width : Field) is Line : constant Count := Line_Length (File); -- checking the predicate begin if Line > 0 then if Count (Width) > Line then Raise_Exception (Layout_Error'Identity); elsif Col (File) + Count (Width) - 1 > Line then New_Line (File); end if; end if; end Adjust; procedure Add ( Buffer : in out String_Access; Last : in out Natural; Item : Character); procedure Add ( Buffer : in out String_Access; Last : in out Natural; Item : Character) is begin Last := Last + 1; if Last > Buffer'Last then Reallocate (Buffer, 1, String_Grow (Buffer'Last)); -- Buffer'First = 1 end if; Buffer (Last) := Item; end Add; procedure Get_Num ( File : File_Type; -- Input_File_Type Buffer : in out String_Access; Last : in out Natural; Based : Boolean); procedure Get_Num ( File : File_Type; Buffer : in out String_Access; Last : in out Natural; Based : Boolean) is Start : constant Natural := Last; Item : Character; End_Of_Line : Boolean; begin Look_Ahead (File, Item, End_Of_Line); -- checking the predicate loop if Item = '_' then exit when Last = Start; Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); end if; exit when Item not in '0' .. '9' and then ( not Based or else ( Item not in 'A' .. 'F' and then Item not in 'a' .. 'f')); Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); end loop; end Get_Num; procedure Get_Numeric_Literal_To_Buffer ( File : File_Type; -- Input_File_Type Buffer : in out String_Access; Last : in out Natural; Real : Boolean); procedure Get_Numeric_Literal_To_Buffer ( File : File_Type; -- Input_File_Type Buffer : in out String_Access; Last : in out Natural; Real : Boolean) is Prev_Last : Natural; Mark : Character; Item : Character; End_Of_Line : Boolean; begin Look_Ahead (File, Item, End_Of_Line); if Item = '+' or else Item = '-' then Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); end if; Prev_Last := Last; Get_Num (File, Buffer, Last, Based => False); if Last > Prev_Last then Look_Ahead (File, Item, End_Of_Line); if Item = '#' or else Item = ':' then Mark := Item; Add (Buffer, Last, Item); Skip_Ahead (File); Get_Num (File, Buffer, Last, Based => True); Look_Ahead (File, Item, End_Of_Line); if Item = '.' and then Real then Add (Buffer, Last, Item); Skip_Ahead (File); Get_Num (File, Buffer, Last, Based => False); Look_Ahead (File, Item, End_Of_Line); end if; if Item = Mark then Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); end if; elsif Item = '.' and then Real then Add (Buffer, Last, Item); Skip_Ahead (File); Get_Num (File, Buffer, Last, Based => False); Look_Ahead (File, Item, End_Of_Line); end if; if Item = 'E' or else Item = 'e' then Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); if Item = '+' or else Item = '-' then Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); end if; Get_Num (File, Buffer, Last, Based => False); end if; end if; end Get_Numeric_Literal_To_Buffer; -- implementation procedure Integer_Image ( To : out String; Last : out Natural; Item : System.Long_Long_Integer_Types.Word_Integer; Base : Number_Base) is Unsigned_Item : Word_Unsigned; begin Last := To'First - 1; if Item < 0 then Last := Last + 1; To (Last) := '-'; Unsigned_Item := -Word_Unsigned'Mod (Item); else Unsigned_Item := Word_Unsigned (Item); end if; Modular_Image (To (Last + 1 .. To'Last), Last, Unsigned_Item, Base); end Integer_Image; procedure Integer_Image ( To : out String; Last : out Natural; Item : Long_Long_Integer; Base : Number_Base) is begin if Standard'Word_Size < Long_Long_Unsigned'Size then -- optimized for 32bit declare Unsigned_Item : Long_Long_Unsigned; begin Last := To'First - 1; if Item < 0 then Last := Last + 1; To (Last) := '-'; Unsigned_Item := -Long_Long_Unsigned'Mod (Item); else Unsigned_Item := Long_Long_Unsigned (Item); end if; Modular_Image ( To (Last + 1 .. To'Last), Last, Unsigned_Item, Base); end; else -- optimized for 64bit Integer_Image (To, Last, Word_Integer (Item), Base); end if; end Integer_Image; procedure Modular_Image ( To : out String; Last : out Natural; Item : System.Long_Long_Integer_Types.Word_Unsigned; Base : Number_Base) is Error : Boolean; begin Last := To'First - 1; if Base /= 10 then System.Formatting.Image ( Word_Unsigned (Base), To (Last + 1 .. To'Last), Last, Error => Error); if Error then Raise_Exception (Layout_Error'Identity); end if; Last := Last + 1; if Last > To'Last then Raise_Exception (Layout_Error'Identity); end if; To (Last) := '#'; end if; System.Formatting.Image ( Item, To (Last + 1 .. To'Last), Last, Base => Base, Error => Error); if Error then Raise_Exception (Layout_Error'Identity); end if; if Base /= 10 then Last := Last + 1; if Last > To'Last then Raise_Exception (Layout_Error'Identity); end if; To (Last) := '#'; end if; end Modular_Image; procedure Modular_Image ( To : out String; Last : out Natural; Item : System.Long_Long_Integer_Types.Long_Long_Unsigned; Base : Number_Base) is begin if Standard'Word_Size < Long_Long_Unsigned'Size then -- optimized for 32bit declare Error : Boolean; begin Last := To'First - 1; if Base /= 10 then System.Formatting.Image ( Word_Unsigned (Base), To (Last + 1 .. To'Last), Last, Error => Error); if Error then Raise_Exception (Layout_Error'Identity); end if; Last := Last + 1; if Last > To'Last then Raise_Exception (Layout_Error'Identity); end if; To (Last) := '#'; end if; System.Formatting.Image ( Item, To (Last + 1 .. To'Last), Last, Base => Base, Error => Error); if Error then Raise_Exception (Layout_Error'Identity); end if; if Base /= 10 then Last := Last + 1; if Last > To'Last then Raise_Exception (Layout_Error'Identity); end if; To (Last) := '#'; end if; end; else -- optimized for 64bit Modular_Image (To, Last, Word_Unsigned (Item), Base); end if; end Modular_Image; function Get_Numeric_Literal ( File : File_Type; Real : Boolean) return String is begin Skip_Spaces (File); -- checking the predicate declare Buffer : aliased String_Access := new String (1 .. 256); Last : Natural := 0; package Holder is new Exceptions.Finally.Scoped_Holder (String_Access, Free); begin Holder.Assign (Buffer); Get_Numeric_Literal_To_Buffer (File, Buffer, Last, Real => Real); return Buffer (1 .. Last); end; end Get_Numeric_Literal; function Get_Complex_Literal ( File : File_Type) return String is begin Skip_Spaces (File); -- checking the predicate declare Buffer : aliased String_Access := new String (1 .. 256); Last : Natural := 0; package Holder is new Exceptions.Finally.Scoped_Holder (String_Access, Free); begin Holder.Assign (Buffer); declare Item : Character; End_Of_Line : Boolean; Paren : Boolean; begin Look_Ahead (File, Item, End_Of_Line); Paren := Item = '('; if Paren then Add (Buffer, Last, Item); Skip_Ahead (File); Skip_Spaces (File); end if; Get_Numeric_Literal_To_Buffer (File, Buffer, Last, Real => True); Skip_Spaces (File); Look_Ahead (File, Item, End_Of_Line); if Item = ',' then Add (Buffer, Last, Item); Skip_Ahead (File); Skip_Spaces (File); else Add (Buffer, Last, ' '); end if; Get_Numeric_Literal_To_Buffer (File, Buffer, Last, Real => True); if Paren then Skip_Spaces (File); Look_Ahead (File, Item, End_Of_Line); if Item = ')' then Add (Buffer, Last, Item); Skip_Ahead (File); else Raise_Exception (Data_Error'Identity); end if; end if; end; return Buffer (1 .. Last); end; end Get_Complex_Literal; function Get_Enum_Literal ( File : File_Type) return String is begin Skip_Spaces (File); -- checking the predicate declare Buffer : aliased String_Access := new String (1 .. 256); Last : Natural := 0; package Holder is new Exceptions.Finally.Scoped_Holder (String_Access, Free); begin Holder.Assign (Buffer); declare Item : Character; End_Of_Line : Boolean; begin Look_Ahead (File, Item, End_Of_Line); if Item = ''' then Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); if not End_Of_Line then declare Length : Natural; Sequence_Status : System.UTF_Conversions.Sequence_Status_Type; -- ignore begin System.UTF_Conversions.UTF_8_Sequence ( Item, Length, Sequence_Status); Add (Buffer, Last, Item); Skip_Ahead (File); for I in 2 .. Length loop Look_Ahead (File, Item, End_Of_Line); exit when End_Of_Line; Add (Buffer, Last, Item); Skip_Ahead (File); end loop; end; Look_Ahead (File, Item, End_Of_Line); if Item = ''' then Add (Buffer, Last, Item); Skip_Ahead (File); end if; end if; elsif Item in 'A' .. 'Z' or else Item in 'a' .. 'z' or else Item >= Character'Val (16#80#) then while not End_Of_Line and then Item /= ' ' and then Item /= Character'Val (9) loop if Item = '_' then Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); end if; exit when not ( Item in 'A' .. 'Z' or else Item in 'a' .. 'z' or else Item in '0' .. '9' or else Item >= Character'Val (16#80#)); Add (Buffer, Last, Item); Skip_Ahead (File); Look_Ahead (File, Item, End_Of_Line); end loop; end if; end; return Buffer (1 .. Last); end; end Get_Enum_Literal; procedure Get_Field ( File : File_Type; Item : out String; Last : out Natural) is pragma Check (Dynamic_Predicate, Check => Is_Open (File) or else raise Status_Error); pragma Check (Dynamic_Predicate, Check => Mode (File) = In_File or else raise Mode_Error); Has_Data : Boolean := False; End_Of_Line : Boolean; begin Last := Item'First - 1; for I in Item'Range loop Look_Ahead (File, Item (I), End_Of_Line); exit when End_Of_Line; Skip_Ahead (File); if Item (I) = Character'Val (9) then Item (I) := ' '; -- treat tab as space, RM A.10.6(5/2) elsif Item (I) /= ' ' then Has_Data := True; end if; Last := I; end loop; if not Has_Data then if End_Of_File (File) then Raise_Exception (End_Error'Identity); else Raise_Exception (Data_Error'Identity); end if; end if; end Get_Field; procedure Head ( File : File_Type; Item : String; Width : Field) is begin Adjust (File, Field'Max (Width, Item'Last)); -- checking the predicate Put (File, Item); for I in Item'Length + 1 .. Width loop Put (File, ' '); end loop; end Head; procedure Tail ( File : File_Type; Item : String; Width : Field) is begin Adjust (File, Field'Max (Width, Item'Last)); -- checking the predicate for I in Item'Length + 1 .. Width loop Put (File, ' '); end loop; Put (File, Item); end Tail; procedure Get_Head ( Item : String; First : out Positive; Last : out Natural) is begin Get_Tail (Item, First); -- skip first spaces Last := First; while Last < Item'Last and then Item (Last + 1) /= ' ' and then Item (Last + 1) /= Character'Val (9) loop Last := Last + 1; end loop; end Get_Head; procedure Get_Tail (Item : String; First : out Positive) is begin First := Item'First; loop if First > Item'Last then Raise_Exception (End_Error'Identity); end if; exit when Item (First) /= ' ' and then Item (First) /= Character'Val (9); First := First + 1; end loop; end Get_Tail; procedure Head (Target : out String; Source : String) is Source_Length : constant Natural := Source'Length; begin if Target'Length < Source_Length then Raise_Exception (Layout_Error'Identity); end if; Target (Target'First .. Target'First + Source_Length - 1) := Source; System.Formatting.Fill_Padding ( Target (Target'First + Source_Length .. Target'Last), ' '); end Head; procedure Tail (Target : out String; Source : String) is Source_Length : constant Natural := Source'Length; begin if Target'Length < Source_Length then Raise_Exception (Layout_Error'Identity); end if; Target (Target'Last - Source_Length + 1 .. Target'Last) := Source; System.Formatting.Fill_Padding ( Target (Target'First .. Target'Last - Source_Length), ' '); end Tail; procedure Tail (Target : out Wide_String; Source : Wide_String) is Source_Length : constant Natural := Source'Length; begin if Target'Length < Source_Length then Raise_Exception (Layout_Error'Identity); end if; for I in Target'First .. Target'Last - Source_Length loop Target (I) := ' '; end loop; Target (Target'Last - Source_Length + 1 .. Target'Last) := Source; end Tail; procedure Tail (Target : out Wide_Wide_String; Source : Wide_Wide_String) is Source_Length : constant Natural := Source'Length; begin if Target'Length < Source_Length then Raise_Exception (Layout_Error'Identity); end if; for I in Target'First .. Target'Last - Source_Length loop Target (I) := ' '; end loop; Target (Target'Last - Source_Length + 1 .. Target'Last) := Source; end Tail; end Ada.Text_IO.Formatting;
zhmu/ananas
Ada
77,232
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ W I D E _ T E X T _ I O . E D I T I N G -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Strings.Fixed; with Ada.Strings.Wide_Wide_Fixed; package body Ada.Wide_Wide_Text_IO.Editing is package Strings renames Ada.Strings; package Strings_Fixed renames Ada.Strings.Fixed; package Strings_Wide_Wide_Fixed renames Ada.Strings.Wide_Wide_Fixed; package Wide_Wide_Text_IO renames Ada.Wide_Wide_Text_IO; ----------------------- -- Local_Subprograms -- ----------------------- function To_Wide (C : Character) return Wide_Wide_Character; pragma Inline (To_Wide); -- Convert Character to corresponding Wide_Wide_Character --------------------- -- Blank_When_Zero -- --------------------- function Blank_When_Zero (Pic : Picture) return Boolean is begin return Pic.Contents.Original_BWZ; end Blank_When_Zero; -------------------- -- Decimal_Output -- -------------------- package body Decimal_Output is ----------- -- Image -- ----------- function Image (Item : Num; Pic : Picture; Currency : Wide_Wide_String := Default_Currency; Fill : Wide_Wide_Character := Default_Fill; Separator : Wide_Wide_Character := Default_Separator; Radix_Mark : Wide_Wide_Character := Default_Radix_Mark) return Wide_Wide_String is begin return Format_Number (Pic.Contents, Num'Image (Item), Currency, Fill, Separator, Radix_Mark); end Image; ------------ -- Length -- ------------ function Length (Pic : Picture; Currency : Wide_Wide_String := Default_Currency) return Natural is Picstr : constant String := Pic_String (Pic); V_Adjust : Integer := 0; Cur_Adjust : Integer := 0; begin -- Check if Picstr has 'V' or '$' -- If 'V', then length is 1 less than otherwise -- If '$', then length is Currency'Length-1 more than otherwise -- This should use the string handling package ??? for J in Picstr'Range loop if Picstr (J) = 'V' then V_Adjust := -1; elsif Picstr (J) = '$' then Cur_Adjust := Currency'Length - 1; end if; end loop; return Picstr'Length - V_Adjust + Cur_Adjust; end Length; --------- -- Put -- --------- procedure Put (File : Wide_Wide_Text_IO.File_Type; Item : Num; Pic : Picture; Currency : Wide_Wide_String := Default_Currency; Fill : Wide_Wide_Character := Default_Fill; Separator : Wide_Wide_Character := Default_Separator; Radix_Mark : Wide_Wide_Character := Default_Radix_Mark) is begin Wide_Wide_Text_IO.Put (File, Image (Item, Pic, Currency, Fill, Separator, Radix_Mark)); end Put; procedure Put (Item : Num; Pic : Picture; Currency : Wide_Wide_String := Default_Currency; Fill : Wide_Wide_Character := Default_Fill; Separator : Wide_Wide_Character := Default_Separator; Radix_Mark : Wide_Wide_Character := Default_Radix_Mark) is begin Wide_Wide_Text_IO.Put (Image (Item, Pic, Currency, Fill, Separator, Radix_Mark)); end Put; procedure Put (To : out Wide_Wide_String; Item : Num; Pic : Picture; Currency : Wide_Wide_String := Default_Currency; Fill : Wide_Wide_Character := Default_Fill; Separator : Wide_Wide_Character := Default_Separator; Radix_Mark : Wide_Wide_Character := Default_Radix_Mark) is Result : constant Wide_Wide_String := Image (Item, Pic, Currency, Fill, Separator, Radix_Mark); begin if Result'Length > To'Length then raise Wide_Wide_Text_IO.Layout_Error; else Strings_Wide_Wide_Fixed.Move (Source => Result, Target => To, Justify => Strings.Right); end if; end Put; ----------- -- Valid -- ----------- function Valid (Item : Num; Pic : Picture; Currency : Wide_Wide_String := Default_Currency) return Boolean is begin declare Temp : constant Wide_Wide_String := Image (Item, Pic, Currency); pragma Warnings (Off, Temp); begin return True; end; exception when Layout_Error => return False; end Valid; end Decimal_Output; ------------ -- Expand -- ------------ function Expand (Picture : String) return String is Result : String (1 .. MAX_PICSIZE); Picture_Index : Integer := Picture'First; Result_Index : Integer := Result'First; Count : Natural; Last : Integer; begin if Picture'Length < 1 then raise Picture_Error; end if; if Picture (Picture'First) = '(' then raise Picture_Error; end if; loop case Picture (Picture_Index) is when '(' => -- We now need to scan out the count after a left paren. In -- the non-wide version we used Integer_IO.Get, but that is -- not convenient here, since we don't want to drag in normal -- Text_IO just for this purpose. So we do the scan ourselves, -- with the normal validity checks. Last := Picture_Index + 1; Count := 0; if Picture (Last) not in '0' .. '9' then raise Picture_Error; end if; Count := Character'Pos (Picture (Last)) - Character'Pos ('0'); Last := Last + 1; loop if Last > Picture'Last then raise Picture_Error; end if; if Picture (Last) = '_' then if Picture (Last - 1) = '_' then raise Picture_Error; end if; elsif Picture (Last) = ')' then exit; elsif Picture (Last) not in '0' .. '9' then raise Picture_Error; else Count := Count * 10 + Character'Pos (Picture (Last)) - Character'Pos ('0'); end if; Last := Last + 1; end loop; -- In what follows note that one copy of the repeated -- character has already been made, so a count of one is -- no-op, and a count of zero erases a character. for J in 2 .. Count loop Result (Result_Index + J - 2) := Picture (Picture_Index - 1); end loop; Result_Index := Result_Index + Count - 1; -- Last was a ')' throw it away too Picture_Index := Last + 1; when ')' => raise Picture_Error; when others => Result (Result_Index) := Picture (Picture_Index); Picture_Index := Picture_Index + 1; Result_Index := Result_Index + 1; end case; exit when Picture_Index > Picture'Last; end loop; return Result (1 .. Result_Index - 1); exception when others => raise Picture_Error; end Expand; ------------------- -- Format_Number -- ------------------- function Format_Number (Pic : Format_Record; Number : String; Currency_Symbol : Wide_Wide_String; Fill_Character : Wide_Wide_Character; Separator_Character : Wide_Wide_Character; Radix_Point : Wide_Wide_Character) return Wide_Wide_String is Attrs : Number_Attributes := Parse_Number_String (Number); Position : Integer; Rounded : String := Number; Sign_Position : Integer := Pic.Sign_Position; -- may float. Answer : Wide_Wide_String (1 .. Pic.Picture.Length); Last : Integer; Currency_Pos : Integer := Pic.Start_Currency; Dollar : Boolean := False; -- Overridden immediately if necessary Zero : Boolean := True; -- Set to False when a non-zero digit is output begin -- If the picture has fewer decimal places than the number, the image -- must be rounded according to the usual rules. if Attrs.Has_Fraction then declare R : constant Integer := (Attrs.End_Of_Fraction - Attrs.Start_Of_Fraction + 1) - Pic.Max_Trailing_Digits; R_Pos : Integer; begin if R > 0 then R_Pos := Rounded'Length - R; if Rounded (R_Pos + 1) > '4' then if Rounded (R_Pos) = '.' then R_Pos := R_Pos - 1; end if; if Rounded (R_Pos) /= '9' then Rounded (R_Pos) := Character'Succ (Rounded (R_Pos)); else Rounded (R_Pos) := '0'; R_Pos := R_Pos - 1; while R_Pos > 1 loop if Rounded (R_Pos) = '.' then R_Pos := R_Pos - 1; end if; if Rounded (R_Pos) /= '9' then Rounded (R_Pos) := Character'Succ (Rounded (R_Pos)); exit; else Rounded (R_Pos) := '0'; R_Pos := R_Pos - 1; end if; end loop; -- The rounding may add a digit in front. Either the -- leading blank or the sign (already captured) can be -- overwritten. if R_Pos = 1 then Rounded (R_Pos) := '1'; Attrs.Start_Of_Int := Attrs.Start_Of_Int - 1; end if; end if; end if; end if; end; end if; for J in Answer'Range loop Answer (J) := To_Wide (Pic.Picture.Expanded (J)); end loop; if Pic.Start_Currency /= Invalid_Position then Dollar := Answer (Pic.Start_Currency) = '$'; end if; -- Fix up "direct inserts" outside the playing field. Set up as one -- loop to do the beginning, one (reverse) loop to do the end. Last := 1; loop exit when Last = Pic.Start_Float; exit when Last = Pic.Radix_Position; exit when Answer (Last) = '9'; case Answer (Last) is when '_' => Answer (Last) := Separator_Character; when 'b' => Answer (Last) := ' '; when others => null; end case; exit when Last = Answer'Last; Last := Last + 1; end loop; -- Now for the end... for J in reverse Last .. Answer'Last loop exit when J = Pic.Radix_Position; -- Do this test First, Separator_Character can equal Pic.Floater if Answer (J) = Pic.Floater then exit; end if; case Answer (J) is when '_' => Answer (J) := Separator_Character; when 'b' => Answer (J) := ' '; when '9' => exit; when others => null; end case; end loop; -- Non-floating sign if Pic.Start_Currency /= -1 and then Answer (Pic.Start_Currency) = '#' and then Pic.Floater /= '#' then if Currency_Symbol'Length > Pic.End_Currency - Pic.Start_Currency + 1 then raise Picture_Error; elsif Currency_Symbol'Length = Pic.End_Currency - Pic.Start_Currency + 1 then Answer (Pic.Start_Currency .. Pic.End_Currency) := Currency_Symbol; elsif Pic.Radix_Position = Invalid_Position or else Pic.Start_Currency < Pic.Radix_Position then Answer (Pic.Start_Currency .. Pic.End_Currency) := [others => ' ']; Answer (Pic.End_Currency - Currency_Symbol'Length + 1 .. Pic.End_Currency) := Currency_Symbol; else Answer (Pic.Start_Currency .. Pic.End_Currency) := [others => ' ']; Answer (Pic.Start_Currency .. Pic.Start_Currency + Currency_Symbol'Length - 1) := Currency_Symbol; end if; end if; -- Fill in leading digits if Attrs.End_Of_Int - Attrs.Start_Of_Int + 1 > Pic.Max_Leading_Digits then raise Layout_Error; end if; Position := (if Pic.Radix_Position = Invalid_Position then Answer'Last else Pic.Radix_Position - 1); for J in reverse Attrs.Start_Of_Int .. Attrs.End_Of_Int loop while Answer (Position) /= '9' and then Answer (Position) /= Pic.Floater loop if Answer (Position) = '_' then Answer (Position) := Separator_Character; elsif Answer (Position) = 'b' then Answer (Position) := ' '; end if; Position := Position - 1; end loop; Answer (Position) := To_Wide (Rounded (J)); if Rounded (J) /= '0' then Zero := False; end if; Position := Position - 1; end loop; -- Do lead float if Pic.Start_Float = Invalid_Position then -- No leading floats, but need to change '9' to '0', '_' to -- Separator_Character and 'b' to ' '. for J in Last .. Position loop -- Last set when fixing the "uninteresting" leaders above. -- Don't duplicate the work. if Answer (J) = '9' then Answer (J) := '0'; elsif Answer (J) = '_' then Answer (J) := Separator_Character; elsif Answer (J) = 'b' then Answer (J) := ' '; end if; end loop; elsif Pic.Floater = '<' or else Pic.Floater = '+' or else Pic.Floater = '-' then for J in Pic.End_Float .. Position loop -- May be null range if Answer (J) = '9' then Answer (J) := '0'; elsif Answer (J) = '_' then Answer (J) := Separator_Character; elsif Answer (J) = 'b' then Answer (J) := ' '; end if; end loop; if Position > Pic.End_Float then Position := Pic.End_Float; end if; for J in Pic.Start_Float .. Position - 1 loop Answer (J) := ' '; end loop; Answer (Position) := Pic.Floater; Sign_Position := Position; elsif Pic.Floater = '$' then for J in Pic.End_Float .. Position loop -- May be null range if Answer (J) = '9' then Answer (J) := '0'; elsif Answer (J) = '_' then Answer (J) := ' '; -- no separator before leftmost digit elsif Answer (J) = 'b' then Answer (J) := ' '; end if; end loop; if Position > Pic.End_Float then Position := Pic.End_Float; end if; for J in Pic.Start_Float .. Position - 1 loop Answer (J) := ' '; end loop; Answer (Position) := Pic.Floater; Currency_Pos := Position; elsif Pic.Floater = '*' then for J in Pic.End_Float .. Position loop -- May be null range if Answer (J) = '9' then Answer (J) := '0'; elsif Answer (J) = '_' then Answer (J) := Separator_Character; elsif Answer (J) = 'b' then Answer (J) := '*'; end if; end loop; if Position > Pic.End_Float then Position := Pic.End_Float; end if; for J in Pic.Start_Float .. Position loop Answer (J) := '*'; end loop; else if Pic.Floater = '#' then Currency_Pos := Currency_Symbol'Length; end if; for J in reverse Pic.Start_Float .. Position loop case Answer (J) is when '*' => Answer (J) := Fill_Character; when 'Z' | 'b' | '/' | '0' => Answer (J) := ' '; when '9' => Answer (J) := '0'; when '.' | 'V' | 'v' | '<' | '$' | '+' | '-' => null; when '#' => if Currency_Pos = 0 then Answer (J) := ' '; else Answer (J) := Currency_Symbol (Currency_Pos); Currency_Pos := Currency_Pos - 1; end if; when '_' => case Pic.Floater is when '*' => Answer (J) := Fill_Character; when 'Z' | 'b' => Answer (J) := ' '; when '#' => if Currency_Pos = 0 then Answer (J) := ' '; else Answer (J) := Currency_Symbol (Currency_Pos); Currency_Pos := Currency_Pos - 1; end if; when others => null; end case; when others => null; end case; end loop; if Pic.Floater = '#' and then Currency_Pos /= 0 then raise Layout_Error; end if; end if; -- Do sign if Sign_Position = Invalid_Position then if Attrs.Negative then raise Layout_Error; end if; else if Attrs.Negative then case Answer (Sign_Position) is when 'C' | 'D' | '-' => null; when '+' => Answer (Sign_Position) := '-'; when '<' => Answer (Sign_Position) := '('; Answer (Pic.Second_Sign) := ')'; when others => raise Picture_Error; end case; else -- positive case Answer (Sign_Position) is when '-' => Answer (Sign_Position) := ' '; when '<' | 'C' | 'D' => Answer (Sign_Position) := ' '; Answer (Pic.Second_Sign) := ' '; when '+' => null; when others => raise Picture_Error; end case; end if; end if; -- Fill in trailing digits if Pic.Max_Trailing_Digits > 0 then if Attrs.Has_Fraction then Position := Attrs.Start_Of_Fraction; Last := Pic.Radix_Position + 1; for J in Last .. Answer'Last loop if Answer (J) = '9' or else Answer (J) = Pic.Floater then Answer (J) := To_Wide (Rounded (Position)); if Rounded (Position) /= '0' then Zero := False; end if; Position := Position + 1; Last := J + 1; -- Used up fraction but remember place in Answer exit when Position > Attrs.End_Of_Fraction; elsif Answer (J) = 'b' then Answer (J) := ' '; elsif Answer (J) = '_' then Answer (J) := Separator_Character; end if; Last := J + 1; end loop; Position := Last; else Position := Pic.Radix_Position + 1; end if; -- Now fill remaining 9's with zeros and _ with separators Last := Answer'Last; for J in Position .. Last loop if Answer (J) = '9' then Answer (J) := '0'; elsif Answer (J) = Pic.Floater then Answer (J) := '0'; elsif Answer (J) = '_' then Answer (J) := Separator_Character; elsif Answer (J) = 'b' then Answer (J) := ' '; end if; end loop; Position := Last + 1; else if Pic.Floater = '#' and then Currency_Pos /= 0 then raise Layout_Error; end if; -- No trailing digits, but now J may need to stick in a currency -- symbol or sign. Position := (if Pic.Start_Currency = Invalid_Position then Answer'Last + 1 else Pic.Start_Currency); end if; for J in Position .. Answer'Last loop if Pic.Start_Currency /= Invalid_Position and then Answer (Pic.Start_Currency) = '#' then Currency_Pos := 1; end if; -- Note: There are some weird cases J can imagine with 'b' or '#' -- in currency strings where the following code will cause -- glitches. The trick is to tell when the character in the -- answer should be checked, and when to look at the original -- string. Some other time. RIE 11/26/96 ??? case Answer (J) is when '*' => Answer (J) := Fill_Character; when 'b' => Answer (J) := ' '; when '#' => if Currency_Pos > Currency_Symbol'Length then Answer (J) := ' '; else Answer (J) := Currency_Symbol (Currency_Pos); Currency_Pos := Currency_Pos + 1; end if; when '_' => case Pic.Floater is when '*' => Answer (J) := Fill_Character; when 'Z' | 'z' => Answer (J) := ' '; when '#' => if Currency_Pos > Currency_Symbol'Length then Answer (J) := ' '; else Answer (J) := Currency_Symbol (Currency_Pos); Currency_Pos := Currency_Pos + 1; end if; when others => null; end case; when others => exit; end case; end loop; -- Now get rid of Blank_when_Zero and complete Star fill if Zero and then Pic.Blank_When_Zero then -- Value is zero, and blank it Last := Answer'Last; if Dollar then Last := Last - 1 + Currency_Symbol'Length; end if; if Pic.Radix_Position /= Invalid_Position and then Answer (Pic.Radix_Position) = 'V' then Last := Last - 1; end if; return Wide_Wide_String'(1 .. Last => ' '); elsif Zero and then Pic.Star_Fill then Last := Answer'Last; if Dollar then Last := Last - 1 + Currency_Symbol'Length; end if; if Pic.Radix_Position /= Invalid_Position then if Answer (Pic.Radix_Position) = 'V' then Last := Last - 1; elsif Dollar then if Pic.Radix_Position > Pic.Start_Currency then return Wide_Wide_String'(1 .. Pic.Radix_Position - 1 => '*') & Radix_Point & Wide_Wide_String'(Pic.Radix_Position + 1 .. Last => '*'); else return Wide_Wide_String' (1 .. Pic.Radix_Position + Currency_Symbol'Length - 2 => '*') & Radix_Point & Wide_Wide_String' (Pic.Radix_Position + Currency_Symbol'Length .. Last => '*'); end if; else return Wide_Wide_String'(1 .. Pic.Radix_Position - 1 => '*') & Radix_Point & Wide_Wide_String'(Pic.Radix_Position + 1 .. Last => '*'); end if; end if; return Wide_Wide_String'(1 .. Last => '*'); end if; -- This was once a simple return statement, now there are nine different -- return cases. Not to mention the five above to deal with zeros. Why -- not split things out? -- Processing the radix and sign expansion separately would require -- lots of copying--the string and some of its indexes--without -- really simplifying the logic. The cases are: -- 1) Expand $, replace '.' with Radix_Point -- 2) No currency expansion, replace '.' with Radix_Point -- 3) Expand $, radix blanked -- 4) No currency expansion, radix blanked -- 5) Elide V -- 6) Expand $, Elide V -- 7) Elide V, Expand $ (Two cases depending on order.) -- 8) No radix, expand $ -- 9) No radix, no currency expansion if Pic.Radix_Position /= Invalid_Position then if Answer (Pic.Radix_Position) = '.' then Answer (Pic.Radix_Position) := Radix_Point; if Dollar then -- 1) Expand $, replace '.' with Radix_Point return Answer (1 .. Currency_Pos - 1) & Currency_Symbol & Answer (Currency_Pos + 1 .. Answer'Last); else -- 2) No currency expansion, replace '.' with Radix_Point return Answer; end if; elsif Answer (Pic.Radix_Position) = ' ' then -- blanked radix. if Dollar then -- 3) Expand $, radix blanked return Answer (1 .. Currency_Pos - 1) & Currency_Symbol & Answer (Currency_Pos + 1 .. Answer'Last); else -- 4) No expansion, radix blanked return Answer; end if; -- V cases else if not Dollar then -- 5) Elide V return Answer (1 .. Pic.Radix_Position - 1) & Answer (Pic.Radix_Position + 1 .. Answer'Last); elsif Currency_Pos < Pic.Radix_Position then -- 6) Expand $, Elide V return Answer (1 .. Currency_Pos - 1) & Currency_Symbol & Answer (Currency_Pos + 1 .. Pic.Radix_Position - 1) & Answer (Pic.Radix_Position + 1 .. Answer'Last); else -- 7) Elide V, Expand $ return Answer (1 .. Pic.Radix_Position - 1) & Answer (Pic.Radix_Position + 1 .. Currency_Pos - 1) & Currency_Symbol & Answer (Currency_Pos + 1 .. Answer'Last); end if; end if; elsif Dollar then -- 8) No radix, expand $ return Answer (1 .. Currency_Pos - 1) & Currency_Symbol & Answer (Currency_Pos + 1 .. Answer'Last); else -- 9) No radix, no currency expansion return Answer; end if; end Format_Number; ------------------------- -- Parse_Number_String -- ------------------------- function Parse_Number_String (Str : String) return Number_Attributes is Answer : Number_Attributes; begin for J in Str'Range loop case Str (J) is when ' ' => null; -- ignore when '1' .. '9' => -- Decide if this is the start of a number. -- If so, figure out which one... if Answer.Has_Fraction then Answer.End_Of_Fraction := J; else if Answer.Start_Of_Int = Invalid_Position then -- start integer Answer.Start_Of_Int := J; end if; Answer.End_Of_Int := J; end if; when '0' => -- Only count a zero before the decimal point if it follows a -- non-zero digit. After the decimal point, zeros will be -- counted if followed by a non-zero digit. if not Answer.Has_Fraction then if Answer.Start_Of_Int /= Invalid_Position then Answer.End_Of_Int := J; end if; end if; when '-' => -- Set negative Answer.Negative := True; when '.' => -- Close integer, start fraction if Answer.Has_Fraction then raise Picture_Error; end if; -- Two decimal points is a no-no Answer.Has_Fraction := True; Answer.End_Of_Fraction := J; -- Could leave this at Invalid_Position, but this seems the -- right way to indicate a null range... Answer.Start_Of_Fraction := J + 1; Answer.End_Of_Int := J - 1; when others => raise Picture_Error; -- can this happen? probably not end case; end loop; if Answer.Start_Of_Int = Invalid_Position then Answer.Start_Of_Int := Answer.End_Of_Int + 1; end if; -- No significant (intger) digits needs a null range return Answer; end Parse_Number_String; ---------------- -- Pic_String -- ---------------- -- The following ensures that we return B and not b being careful not -- to break things which expect lower case b for blank. See CXF3A02. function Pic_String (Pic : Picture) return String is Temp : String (1 .. Pic.Contents.Picture.Length) := Pic.Contents.Picture.Expanded; begin for J in Temp'Range loop if Temp (J) = 'b' then Temp (J) := 'B'; end if; end loop; return Temp; end Pic_String; ------------------ -- Precalculate -- ------------------ procedure Precalculate (Pic : in out Format_Record) is Computed_BWZ : Boolean := True; type Legality is (Okay, Reject); State : Legality := Reject; -- Start in reject, which will reject null strings Index : Pic_Index := Pic.Picture.Expanded'First; function At_End return Boolean; pragma Inline (At_End); procedure Set_State (L : Legality); pragma Inline (Set_State); function Look return Character; pragma Inline (Look); function Is_Insert return Boolean; pragma Inline (Is_Insert); procedure Skip; pragma Inline (Skip); procedure Trailing_Currency; procedure Trailing_Bracket; procedure Number_Fraction; procedure Number_Completion; procedure Number_Fraction_Or_Bracket; procedure Number_Fraction_Or_Z_Fill; procedure Zero_Suppression; procedure Floating_Bracket; procedure Number_Fraction_Or_Star_Fill; procedure Star_Suppression; procedure Number_Fraction_Or_Dollar; procedure Leading_Dollar; procedure Number_Fraction_Or_Pound; procedure Leading_Pound; procedure Picture; procedure Floating_Plus; procedure Floating_Minus; procedure Picture_Plus; procedure Picture_Minus; procedure Picture_Bracket; procedure Number; procedure Optional_RHS_Sign; procedure Picture_String; ------------ -- At_End -- ------------ function At_End return Boolean is begin return Index > Pic.Picture.Length; end At_End; ---------------------- -- Floating_Bracket -- ---------------------- -- Note that Floating_Bracket is only called with an acceptable -- prefix. But we don't set Okay, because we must end with a '>'. procedure Floating_Bracket is begin Pic.Floater := '<'; Pic.End_Float := Index; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; -- First bracket wasn't counted... Skip; -- known '<' loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when '<' => Pic.End_Float := Index; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Skip; when '9' => Number_Completion; when '$' => Leading_Dollar; when '#' => Leading_Pound; when 'V' | 'v' | '.' => Pic.Radix_Position := Index; Skip; Number_Fraction_Or_Bracket; return; when others => return; end case; end loop; end Floating_Bracket; -------------------- -- Floating_Minus -- -------------------- procedure Floating_Minus is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when '-' => Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.End_Float := Index; Skip; when '9' => Number_Completion; return; when '.' | 'V' | 'v' => Pic.Radix_Position := Index; Skip; -- Radix while Is_Insert loop Skip; end loop; if At_End then return; end if; if Look = '-' then loop if At_End then return; end if; case Look is when '-' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when others => return; end case; end loop; else Number_Completion; end if; return; when others => return; end case; end loop; end Floating_Minus; ------------------- -- Floating_Plus -- ------------------- procedure Floating_Plus is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when '+' => Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.End_Float := Index; Skip; when '9' => Number_Completion; return; when '.' | 'V' | 'v' => Pic.Radix_Position := Index; Skip; -- Radix while Is_Insert loop Skip; end loop; if At_End then return; end if; if Look = '+' then loop if At_End then return; end if; case Look is when '+' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when others => return; end case; end loop; else Number_Completion; end if; return; when others => return; end case; end loop; end Floating_Plus; --------------- -- Is_Insert -- --------------- function Is_Insert return Boolean is begin if At_End then return False; end if; case Pic.Picture.Expanded (Index) is when '_' | '0' | '/' => return True; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; -- canonical return True; when others => return False; end case; end Is_Insert; -------------------- -- Leading_Dollar -- -------------------- -- Note that Leading_Dollar can be called in either State. It will set -- state to Okay only if a 9 or (second) is encountered. -- Also notice the tricky bit with State and Zero_Suppression. -- Zero_Suppression is Picture_Error if a '$' or a '9' has been -- encountered, exactly the cases where State has been set. procedure Leading_Dollar is begin -- Treat as a floating dollar, and unwind otherwise Pic.Floater := '$'; Pic.Start_Currency := Index; Pic.End_Currency := Index; Pic.Start_Float := Index; Pic.End_Float := Index; -- Don't increment Pic.Max_Leading_Digits, we need one "real" -- currency place. Skip; -- known '$' loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; -- A trailing insertion character is not part of the -- floating currency, so need to look ahead. if Look /= '$' then Pic.End_Float := Pic.End_Float - 1; end if; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when 'Z' | 'z' => Pic.Picture.Expanded (Index) := 'Z'; -- consistency if State = Okay then raise Picture_Error; else -- Will overwrite Floater and Start_Float Zero_Suppression; end if; when '*' => if State = Okay then raise Picture_Error; else -- Will overwrite Floater and Start_Float Star_Suppression; end if; when '$' => Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.End_Float := Index; Pic.End_Currency := Index; Set_State (Okay); Skip; when '9' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; -- A single dollar does not a floating make Number_Completion; return; when 'V' | 'v' | '.' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; -- Only one dollar before the sign is okay, but doesn't -- float. Pic.Radix_Position := Index; Skip; Number_Fraction_Or_Dollar; return; when others => return; end case; end loop; end Leading_Dollar; ------------------- -- Leading_Pound -- ------------------- -- This one is complex. A Leading_Pound can be fixed or floating, but -- in some cases the decision has to be deferred until we leave this -- procedure. Also note that Leading_Pound can be called in either -- State. -- It will set state to Okay only if a 9 or (second) # is encountered -- One Last note: In ambiguous cases, the currency is treated as -- floating unless there is only one '#'. procedure Leading_Pound is Inserts : Boolean := False; -- Set to True if a '_', '0', '/', 'B', or 'b' is encountered Must_Float : Boolean := False; -- Set to true if a '#' occurs after an insert begin -- Treat as a floating currency. If it isn't, this will be -- overwritten later. Pic.Floater := '#'; Pic.Start_Currency := Index; Pic.End_Currency := Index; Pic.Start_Float := Index; Pic.End_Float := Index; -- Don't increment Pic.Max_Leading_Digits, we need one "real" -- currency place. Pic.Max_Currency_Digits := 1; -- we've seen one. Skip; -- known '#' loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Inserts := True; Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Pic.End_Float := Index; Inserts := True; Skip; when 'Z' | 'z' => Pic.Picture.Expanded (Index) := 'Z'; -- consistency if Must_Float then raise Picture_Error; else Pic.Max_Leading_Digits := 0; -- Will overwrite Floater and Start_Float Zero_Suppression; end if; when '*' => if Must_Float then raise Picture_Error; else Pic.Max_Leading_Digits := 0; -- Will overwrite Floater and Start_Float Star_Suppression; end if; when '#' => if Inserts then Must_Float := True; end if; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.End_Float := Index; Pic.End_Currency := Index; Set_State (Okay); Skip; when '9' => if State /= Okay then -- A single '#' doesn't float Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; Number_Completion; return; when 'V' | 'v' | '.' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; -- Only one pound before the sign is okay, but doesn't -- float. Pic.Radix_Position := Index; Skip; Number_Fraction_Or_Pound; return; when others => return; end case; end loop; end Leading_Pound; ---------- -- Look -- ---------- function Look return Character is begin if At_End then raise Picture_Error; end if; return Pic.Picture.Expanded (Index); end Look; ------------ -- Number -- ------------ procedure Number is begin loop case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '9' => Computed_BWZ := False; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Set_State (Okay); Skip; when '.' | 'V' | 'v' => Pic.Radix_Position := Index; Skip; Number_Fraction; return; when others => return; end case; if At_End then return; end if; -- Will return in Okay state if a '9' was seen end loop; end Number; ----------------------- -- Number_Completion -- ----------------------- procedure Number_Completion is begin while not At_End loop case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '9' => Computed_BWZ := False; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Set_State (Okay); Skip; when 'V' | 'v' | '.' => Pic.Radix_Position := Index; Skip; Number_Fraction; return; when others => return; end case; end loop; end Number_Completion; --------------------- -- Number_Fraction -- --------------------- procedure Number_Fraction is begin -- Note that number fraction can be called in either State. -- It will set state to Valid only if a 9 is encountered. loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '9' => Computed_BWZ := False; Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Set_State (Okay); Skip; when others => return; end case; end loop; end Number_Fraction; -------------------------------- -- Number_Fraction_Or_Bracket -- -------------------------------- procedure Number_Fraction_Or_Bracket is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '<' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '<' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; when others => return; end case; end loop; when others => Number_Fraction; return; end case; end loop; end Number_Fraction_Or_Bracket; ------------------------------- -- Number_Fraction_Or_Dollar -- ------------------------------- procedure Number_Fraction_Or_Dollar is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '$' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '$' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; when others => return; end case; end loop; when others => Number_Fraction; return; end case; end loop; end Number_Fraction_Or_Dollar; ------------------------------ -- Number_Fraction_Or_Pound -- ------------------------------ procedure Number_Fraction_Or_Pound is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '#' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '#' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; when others => return; end case; end loop; when others => Number_Fraction; return; end case; end loop; end Number_Fraction_Or_Pound; ---------------------------------- -- Number_Fraction_Or_Star_Fill -- ---------------------------------- procedure Number_Fraction_Or_Star_Fill is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '*' => Pic.Star_Fill := True; Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '*' => Pic.Star_Fill := True; Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; when others => return; end case; end loop; when others => Number_Fraction; return; end case; end loop; end Number_Fraction_Or_Star_Fill; ------------------------------- -- Number_Fraction_Or_Z_Fill -- ------------------------------- procedure Number_Fraction_Or_Z_Fill is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when 'Z' | 'z' => Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'Z'; -- consistency Skip; loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when 'Z' | 'z' => Pic.Picture.Expanded (Index) := 'Z'; -- consistency Pic.Max_Trailing_Digits := Pic.Max_Trailing_Digits + 1; Pic.End_Float := Index; Skip; when others => return; end case; end loop; when others => Number_Fraction; return; end case; end loop; end Number_Fraction_Or_Z_Fill; ----------------------- -- Optional_RHS_Sign -- ----------------------- procedure Optional_RHS_Sign is begin if At_End then return; end if; case Look is when '+' | '-' => Pic.Sign_Position := Index; Skip; return; when 'C' | 'c' => Pic.Sign_Position := Index; Pic.Picture.Expanded (Index) := 'C'; Skip; if Look = 'R' or else Look = 'r' then Pic.Second_Sign := Index; Pic.Picture.Expanded (Index) := 'R'; Skip; else raise Picture_Error; end if; return; when 'D' | 'd' => Pic.Sign_Position := Index; Pic.Picture.Expanded (Index) := 'D'; Skip; if Look = 'B' or else Look = 'b' then Pic.Second_Sign := Index; Pic.Picture.Expanded (Index) := 'B'; Skip; else raise Picture_Error; end if; return; when '>' => if Pic.Picture.Expanded (Pic.Sign_Position) = '<' then Pic.Second_Sign := Index; Skip; else raise Picture_Error; end if; when others => return; end case; end Optional_RHS_Sign; ------------- -- Picture -- ------------- -- Note that Picture can be called in either State -- It will set state to Valid only if a 9 is encountered or floating -- currency is called. procedure Picture is begin loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when '$' => Leading_Dollar; return; when '#' => Leading_Pound; return; when '9' => Computed_BWZ := False; Set_State (Okay); Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Skip; when 'V' | 'v' | '.' => Pic.Radix_Position := Index; Skip; Number_Fraction; Trailing_Currency; return; when others => return; end case; end loop; end Picture; --------------------- -- Picture_Bracket -- --------------------- procedure Picture_Bracket is begin Pic.Sign_Position := Index; Pic.Sign_Position := Index; -- Treat as a floating sign, and unwind otherwise Pic.Floater := '<'; Pic.Start_Float := Index; Pic.End_Float := Index; -- Don't increment Pic.Max_Leading_Digits, we need one "real" -- sign place. Skip; -- Known Bracket loop case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when '<' => Set_State (Okay); -- "<<>" is enough. Floating_Bracket; Trailing_Currency; Trailing_Bracket; return; when '$' | '#' | '9' | '*' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; Picture; Trailing_Bracket; Set_State (Okay); return; when '.' | 'V' | 'v' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; -- Don't assume that state is okay, haven't seen a digit Picture; Trailing_Bracket; return; when others => raise Picture_Error; end case; end loop; end Picture_Bracket; ------------------- -- Picture_Minus -- ------------------- procedure Picture_Minus is begin Pic.Sign_Position := Index; -- Treat as a floating sign, and unwind otherwise Pic.Floater := '-'; Pic.Start_Float := Index; Pic.End_Float := Index; -- Don't increment Pic.Max_Leading_Digits, we need one "real" -- sign place. Skip; -- Known Minus loop case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when '-' => Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.End_Float := Index; Skip; Set_State (Okay); -- "-- " is enough. Floating_Minus; Trailing_Currency; return; when '$' | '#' | '9' | '*' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; Picture; Set_State (Okay); return; when 'Z' | 'z' => -- Can't have Z and a floating sign if State = Okay then Set_State (Reject); end if; Pic.Picture.Expanded (Index) := 'Z'; -- consistency Zero_Suppression; Trailing_Currency; Optional_RHS_Sign; return; when '.' | 'V' | 'v' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; -- Don't assume that state is okay, haven't seen a digit Picture; return; when others => return; end case; end loop; end Picture_Minus; ------------------ -- Picture_Plus -- ------------------ procedure Picture_Plus is begin Pic.Sign_Position := Index; -- Treat as a floating sign, and unwind otherwise Pic.Floater := '+'; Pic.Start_Float := Index; Pic.End_Float := Index; -- Don't increment Pic.Max_Leading_Digits, we need one "real" -- sign place. Skip; -- Known Plus loop case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when '+' => Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.End_Float := Index; Skip; Set_State (Okay); -- "++" is enough Floating_Plus; Trailing_Currency; return; when '$' | '#' | '9' | '*' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; Picture; Set_State (Okay); return; when 'Z' | 'z' => if State = Okay then Set_State (Reject); end if; -- Can't have Z and a floating sign Pic.Picture.Expanded (Index) := 'Z'; -- consistency -- '+Z' is acceptable Set_State (Okay); Zero_Suppression; Trailing_Currency; Optional_RHS_Sign; return; when '.' | 'V' | 'v' => if State /= Okay then Pic.Floater := '!'; Pic.Start_Float := Invalid_Position; Pic.End_Float := Invalid_Position; end if; -- Don't assume that state is okay, haven't seen a digit Picture; return; when others => return; end case; end loop; end Picture_Plus; -------------------- -- Picture_String -- -------------------- procedure Picture_String is begin while Is_Insert loop Skip; end loop; case Look is when '$' | '#' => Picture; Optional_RHS_Sign; when '+' => Picture_Plus; when '-' => Picture_Minus; when '<' => Picture_Bracket; when 'Z' | 'z' => Pic.Picture.Expanded (Index) := 'Z'; -- consistency Zero_Suppression; Trailing_Currency; Optional_RHS_Sign; when '*' => Star_Suppression; Trailing_Currency; Optional_RHS_Sign; when '9' | '.' | 'V' | 'v' => Number; Trailing_Currency; Optional_RHS_Sign; when others => raise Picture_Error; end case; -- Blank when zero either if the PIC does not contain a '9' or if -- requested by the user and no '*'. Pic.Blank_When_Zero := (Computed_BWZ or else Pic.Blank_When_Zero) and then not Pic.Star_Fill; -- Star fill if '*' and no '9' Pic.Star_Fill := Pic.Star_Fill and then Computed_BWZ; if not At_End then Set_State (Reject); end if; end Picture_String; --------------- -- Set_State -- --------------- procedure Set_State (L : Legality) is begin State := L; end Set_State; ---------- -- Skip -- ---------- procedure Skip is begin Index := Index + 1; end Skip; ---------------------- -- Star_Suppression -- ---------------------- procedure Star_Suppression is begin Pic.Floater := '*'; Pic.Start_Float := Index; Pic.End_Float := Index; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Set_State (Okay); -- Even a single * is a valid picture Pic.Star_Fill := True; Skip; -- Known * loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when '*' => Pic.End_Float := Index; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Set_State (Okay); Skip; when '9' => Set_State (Okay); Number_Completion; return; when '.' | 'V' | 'v' => Pic.Radix_Position := Index; Skip; Number_Fraction_Or_Star_Fill; return; when '#' | '$' => Trailing_Currency; Set_State (Okay); return; when others => raise Picture_Error; end case; end loop; end Star_Suppression; ---------------------- -- Trailing_Bracket -- ---------------------- procedure Trailing_Bracket is begin if Look = '>' then Pic.Second_Sign := Index; Skip; else raise Picture_Error; end if; end Trailing_Bracket; ----------------------- -- Trailing_Currency -- ----------------------- procedure Trailing_Currency is begin if At_End then return; end if; if Look = '$' then Pic.Start_Currency := Index; Pic.End_Currency := Index; Skip; else while not At_End and then Look = '#' loop if Pic.Start_Currency = Invalid_Position then Pic.Start_Currency := Index; end if; Pic.End_Currency := Index; Skip; end loop; end if; loop if At_End then return; end if; case Look is when '_' | '0' | '/' => Skip; when 'B' | 'b' => Pic.Picture.Expanded (Index) := 'b'; Skip; when others => return; end case; end loop; end Trailing_Currency; ---------------------- -- Zero_Suppression -- ---------------------- procedure Zero_Suppression is begin Pic.Floater := 'Z'; Pic.Start_Float := Index; Pic.End_Float := Index; Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.Picture.Expanded (Index) := 'Z'; -- consistency Skip; -- Known Z loop -- Even a single Z is a valid picture if At_End then Set_State (Okay); return; end if; case Look is when '_' | '0' | '/' => Pic.End_Float := Index; Skip; when 'B' | 'b' => Pic.End_Float := Index; Pic.Picture.Expanded (Index) := 'b'; Skip; when 'Z' | 'z' => Pic.Picture.Expanded (Index) := 'Z'; -- consistency Pic.Max_Leading_Digits := Pic.Max_Leading_Digits + 1; Pic.End_Float := Index; Set_State (Okay); Skip; when '9' => Set_State (Okay); Number_Completion; return; when '.' | 'V' | 'v' => Pic.Radix_Position := Index; Skip; Number_Fraction_Or_Z_Fill; return; when '#' | '$' => Trailing_Currency; Set_State (Okay); return; when others => return; end case; end loop; end Zero_Suppression; -- Start of processing for Precalculate begin Picture_String; if State = Reject then raise Picture_Error; end if; exception when Constraint_Error => -- To deal with special cases like null strings raise Picture_Error; end Precalculate; ---------------- -- To_Picture -- ---------------- function To_Picture (Pic_String : String; Blank_When_Zero : Boolean := False) return Picture is Result : Picture; begin declare Item : constant String := Expand (Pic_String); begin Result.Contents.Picture := (Item'Length, Item); Result.Contents.Original_BWZ := Blank_When_Zero; Result.Contents.Blank_When_Zero := Blank_When_Zero; Precalculate (Result.Contents); return Result; end; exception when others => raise Picture_Error; end To_Picture; ------------- -- To_Wide -- ------------- function To_Wide (C : Character) return Wide_Wide_Character is begin return Wide_Wide_Character'Val (Character'Pos (C)); end To_Wide; ----------- -- Valid -- ----------- function Valid (Pic_String : String; Blank_When_Zero : Boolean := False) return Boolean is begin declare Expanded_Pic : constant String := Expand (Pic_String); -- Raises Picture_Error if Item not well-formed Format_Rec : Format_Record; begin Format_Rec.Picture := (Expanded_Pic'Length, Expanded_Pic); Format_Rec.Blank_When_Zero := Blank_When_Zero; Format_Rec.Original_BWZ := Blank_When_Zero; Precalculate (Format_Rec); -- False only if Blank_When_0 is True but the pic string has a '*' return not Blank_When_Zero or else Strings_Fixed.Index (Expanded_Pic, "*") = 0; end; exception when others => return False; end Valid; end Ada.Wide_Wide_Text_IO.Editing;
JeremyGrosser/Ada_Drivers_Library
Ada
6,549
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016-2020, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with NRF_SVD.GPIOTE; use NRF_SVD.GPIOTE; with HAL; use HAL; package body nRF.GPIO.Tasks_And_Events is ----------------------------------- -- Acknowledge_Channel_Interrupt -- ----------------------------------- procedure Acknowledge_Channel_Interrupt (Chan : GPIOTE_Channel) is begin GPIOTE_Periph.EVENTS_IN (Integer (Chan)) := 0; end Acknowledge_Channel_Interrupt; -------------------------------- -- Acknowledge_Port_Interrupt -- -------------------------------- procedure Acknowledge_Port_Interrupt is begin GPIOTE_Periph.EVENTS_PORT := 0; end Acknowledge_Port_Interrupt; ----------------------- -- Channel_Event_Set -- ----------------------- function Channel_Event_Set (Chan : GPIOTE_Channel) return Boolean is (GPIOTE_Periph.EVENTS_IN (Integer (Chan)) /= 0); ------------- -- Disable -- ------------- procedure Disable (Chan : GPIOTE_Channel) is begin GPIOTE_Periph.CONFIG (Integer (Chan)).MODE := Disabled; end Disable; ------------------------------- -- Disable_Channel_Interrupt -- ------------------------------- procedure Disable_Channel_Interrupt (Chan : GPIOTE_Channel) is INTENCLR : INTENCLR_Register renames GPIOTE_Periph.INTENCLR; begin INTENCLR.IN_k.Arr (Integer (Chan)) := Clear; end Disable_Channel_Interrupt; ---------------------------- -- Disable_Port_Interrupt -- ---------------------------- procedure Disable_Port_Interrupt is INTENCLR : INTENCLR_Register renames GPIOTE_Periph.INTENCLR; begin INTENCLR.PORT := Clear; end Disable_Port_Interrupt; ------------------------------ -- Enable_Channel_Interrupt -- ------------------------------ procedure Enable_Channel_Interrupt (Chan : GPIOTE_Channel) is INTENSET : INTENSET_Register renames GPIOTE_Periph.INTENSET; begin INTENSET.IN_k.Arr (Integer (Chan)) := Set; end Enable_Channel_Interrupt; ------------------ -- Enable_Event -- ------------------ procedure Enable_Event (Chan : GPIOTE_Channel; GPIO_Pin : GPIO_Pin_Index; Polarity : Event_Polarity) is CONFIG : CONFIG_Register renames GPIOTE_Periph.CONFIG (Integer (Chan)); begin CONFIG.PSEL := UInt5 (GPIO_Pin); CONFIG.POLARITY := (case Polarity is when Rising_Edge => Lotohi, when Falling_Edge => Hitolo, when Any_Change => Toggle); CONFIG.MODE := Event; end Enable_Event; --------------------------- -- Enable_Port_Interrupt -- --------------------------- procedure Enable_Port_Interrupt is INTENSET : INTENSET_Register renames GPIOTE_Periph.INTENSET; begin INTENSET.PORT := Set; end Enable_Port_Interrupt; ----------------- -- Enable_Task -- ----------------- procedure Enable_Task (Chan : GPIOTE_Channel; GPIO_Pin : GPIO_Pin_Index; Action : Task_Action; Initial_Value : Init_Value) is CONFIG : CONFIG_Register renames GPIOTE_Periph.CONFIG (Integer (Chan)); begin CONFIG.PSEL := UInt5 (GPIO_Pin); CONFIG.POLARITY := (case Action is when Set_Pin => Lotohi, when Clear_Pin => Hitolo, when Toggle_Pin => Toggle); CONFIG.OUTINIT := (case Initial_Value is when Init_Set => High, when Init_Clear => Low); CONFIG.MODE := Task_k; end Enable_Task; -------------- -- Out_Task -- -------------- function Out_Task (Chan : GPIOTE_Channel) return Task_Type is (Task_Type (GPIOTE_Periph.TASKS_OUT (Integer (Chan))'Address)); -------------------- -- Port_Event_Set -- -------------------- function Port_Event_Set return Boolean is (GPIOTE_Periph.EVENTS_PORT /= 0); -------------- -- In_Event -- -------------- function In_Event (Chan : GPIOTE_Channel) return Event_Type is (Event_Type (GPIOTE_Periph.EVENTS_IN (Integer (Chan))'Address)); end nRF.GPIO.Tasks_And_Events;
VitalijBondarenko/Formatted_Output_NG
Ada
23,958
adb
------------------------------------------------------------------------------ -- -- -- Copyright (c) 2016-2022 Vitalii Bondarenko <[email protected]> -- -- -- ------------------------------------------------------------------------------ -- -- -- The MIT License (MIT) -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, sublicense, and/or sell copies of the Software, and to -- -- permit persons to whom the Software is furnished to do so, subject to -- -- the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -- -- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -- -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -- -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- ------------------------------------------------------------------------------ -- -- This is a fork of the GNAT.Calendar.Time_IO package with modifications for -- NLS support using. with GNAT.Calendar; use GNAT.Calendar; with Ada.Calendar; use Ada.Calendar; with Ada.Calendar.Time_Zones; use Ada.Calendar.Time_Zones; with Ada.Strings; use Ada.Strings; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Characters.Handling; with L10n.Langinfo; use L10n.Langinfo; package body Formatted_Output.Time_Output is Day_Abbr_Names : constant array (0 .. 6) of Locale_Item := (ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7); Day_Full_Names : constant array (0 .. 6) of Locale_Item := (DAY_1, DAY_2, DAY_3, DAY_4, DAY_5, DAY_6, DAY_7); Month_Abbr_Names : constant array (Month_Number) of Locale_Item := (ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12); Month_Full_Names : constant array (Month_Number) of Locale_Item := (MON_1, MON_2, MON_3, MON_4, MON_5, MON_6, MON_7, MON_8, MON_9, MON_10, MON_11, MON_12); Alt_Month_Full_Names : constant array (Month_Number) of Locale_Item := (ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, ALTMON_11, ALTMON_12); type Padding_Mode is (None, Zero, Space); type Sec_Number is mod 2 ** 64; -- Type used to compute the number of seconds since 1970-01-01. --------------------------------------------------------------------------- -- Local Subprograms --------------------------------------------------------------------------- function Format (Picture : String; Date : Ada.Calendar.Time) return String; function Am_Pm (H : Natural) return String; -- Return AM or PM depending on the hour H or empty string if not defined -- in locale. function Hour_12 (H : Natural) return Positive; -- Convert a 1-24h format to a 0-12 hour format. function Image (Str : String; Length : Natural := 0) return String; -- Return Str capitalized and cut to length number of characters. If -- length is 0, then no cut operation is performed. function Image (N : Sec_Number; Padding : Padding_Mode := Zero; Length : Natural := 0) return String; -- Return image of N. This number is eventually padded with zeros or spaces -- depending of the length required. If length is 0 then no padding occurs. function Image (N : Natural; Padding : Padding_Mode := Zero; Length : Natural := 0) return String; -- As above with N provided in Integer format function Julian_Day (Year : Year_Number; Month : Month_Number; Day : Day_Number) return Integer; -- Finding Julian day number function Julian_Day (Date : Time) return Integer; -- Finding Julian day number function Day_Abbr_Name (Date : Time) return String; -- Returns locale's abbreviated weekday name. function Day_Full_Name (Date : Time) return String; -- Returns locale's full weekday name. function Mon_Abbr_Name (Month : Month_Number) return String; function Mon_Abbr_Name (Date : Time) return String; -- Returns locale's abbreviated month name. function Mon_Full_Name (Month : Month_Number) return String; function Mon_Full_Name (Date : Time) return String; -- Returns locale's full month name. function Alt_Mon_Full_Name (Month : Month_Number) return String; -- Returns locale's full month name. ----------- -- Am_Pm -- ----------- function Am_Pm (H : Natural) return String is begin if H = 0 or else H > 12 then return Nl_Langinfo (PM_STR); else return Nl_Langinfo (AM_STR); end if; end Am_Pm; ------------- -- Hour_12 -- ------------- function Hour_12 (H : Natural) return Positive is begin if H = 0 then return 12; elsif H <= 12 then return H; else return H - 12; end if; end Hour_12; ----------- -- Image -- ----------- function Image (Str : String; Length : Natural := 0) return String is Local : constant String := Ada.Characters.Handling.To_Upper (Str (Str'First)) & Ada.Characters.Handling.To_Lower (Str (Str'First + 1 .. Str'Last)); begin if Length = 0 then return Local; else return Local (1 .. Length); end if; end Image; ----------- -- Image -- ----------- function Image (N : Natural; Padding : Padding_Mode := Zero; Length : Natural := 0) return String is begin return Image (Sec_Number (N), Padding, Length); end Image; ----------- -- Image -- ----------- function Image (N : Sec_Number; Padding : Padding_Mode := Zero; Length : Natural := 0) return String is function Pad_Char return String is begin case Padding is when None => return ""; when Zero => return "00"; when Space => return " "; end case; end Pad_Char; -- Local Declarations NI : constant String := Sec_Number'Image (N); NIP : constant String := Pad_Char & NI (2 .. NI'Last); begin if Length = 0 or else Padding = None then return NI (2 .. NI'Last); else return NIP (NIP'Last - Length + 1 .. NIP'Last); end if; end Image; ---------------- -- Julian_Day -- ---------------- function Julian_Day (Year : Year_Number; Month : Month_Number; Day : Day_Number) return Integer is IY : Integer := Integer (Year); IM : Integer := Integer (Month); ID : Integer := Integer (Day); A : Integer := (14 - IM) / 12; Y : Integer := IY + 4800 - A; M : Integer := IM + 12 * A - 3; begin return ID + (153 * M + 2) / 5 + 365 * Y + Y / 4 - Y / 100 + Y / 400 - 32045; end Julian_Day; ---------------- -- Julian_Day -- ---------------- function Julian_Day (Date : Time) return Integer is Year : Year_Number; Month : Month_Number; Day : Day_Number; Sec : Day_Duration; begin Split (Date, Year, Month, Day, Sec); return Julian_Day (Year, Month, Day); end Julian_Day; ------------------- -- Day_Abbr_Name -- ------------------- function Day_Abbr_Name (Date : Time) return String is begin return Nl_Langinfo (Day_Abbr_Names ((Julian_Day (Date) + 1) mod 7)); end Day_Abbr_Name; ------------------- -- Day_Full_Name -- ------------------- function Day_Full_Name (Date : Time) return String is begin return Nl_Langinfo (Day_Full_Names ((Julian_Day (Date) + 1) mod 7)); end Day_Full_Name; ------------------- -- Mon_Abbr_Name -- ------------------- function Mon_Abbr_Name (Month : Month_Number) return String is begin return Nl_Langinfo (Month_Abbr_Names (Month)); end Mon_Abbr_Name; ------------------- -- Mon_Abbr_Name -- ------------------- function Mon_Abbr_Name (Date : Time) return String is Year : Year_Number; Month : Month_Number; Day : Day_Number; Sec : Day_Duration; begin Split (Date, Year, Month, Day, Sec); return Mon_Abbr_Name (Month); end Mon_Abbr_Name; ------------------- -- Mon_Full_Name -- ------------------- function Mon_Full_Name (Month : Month_Number) return String is begin return Nl_Langinfo (Month_Full_Names (Month)); end Mon_Full_Name; ------------------- -- Mon_Full_Name -- ------------------- function Mon_Full_Name (Date : Time) return String is Year : Year_Number; Month : Month_Number; Day : Day_Number; Sec : Day_Duration; begin Split (Date, Year, Month, Day, Sec); return Mon_Full_Name (Month); end Mon_Full_Name; ----------------------- -- Alt_Mon_Full_Name -- ----------------------- function Alt_Mon_Full_Name (Month : Month_Number) return String is R : String := Nl_Langinfo (Alt_Month_Full_Names (Month)); begin if R'Length = 0 then return Nl_Langinfo (Month_Full_Names (Month)); else return R; end if; end Alt_Mon_Full_Name; ------------ -- Format -- ------------ function Format (Picture : String; Date : Ada.Calendar.Time) return String is Padding : Padding_Mode := Zero; -- Padding is set for one directive Result : Unbounded_String; Year : Year_Number; Month : Month_Number; Day : Day_Number; Hour : Hour_Number; Minute : Minute_Number; Second : Second_Number; Sub_Second : Second_Duration; TZ : Integer; P : Positive; Use_O_Modifier : Boolean := False; begin -- Get current time in split format Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second); TZ := Integer (UTC_Time_Offset (Date)); -- Null picture string is error if Picture = "" then raise Time_Picture_Error with "null picture string"; end if; -- Loop through characters of picture string, building result Result := Null_Unbounded_String; P := Picture'First; while P <= Picture'Last loop -- A directive has the following format "%[-_0]." if Picture (P) = '%' then Padding := Zero; if P = Picture'Last then raise Time_Picture_Error with "picture string ends with '%"; end if; -- Check for the padding, 'O' modifier case Picture (P + 1) is when '-' => Padding := None; P := P + 1; when '_' => Padding := Space; P := P + 1; when '0' => Padding := Zero; P := P + 1; when 'O' => Use_O_Modifier := True; P := P + 1; when others => null; end case; if P = Picture'Last then raise Time_Picture_Error with "picture string ends with '-', '_' or '0'"; end if; case Picture (P + 1) is -- Literal % when '%' => Result := Result & '%'; -- A newline when 'n' => Result := Result & ASCII.LF; -- A horizontal tab when 't' => Result := Result & ASCII.HT; ------------------------------------------------------------ -- Date & time fields ------------------------------------------------------------ -- Locale's abbreviated weekday name (Sun .. Sat) when 'a' => Result := Result & Day_Abbr_Name (Date); -- Locale's full weekday name, variable length -- (Sunday .. Saturday) when 'A' => Result := Result & Day_Full_Name (Date); -- Locale's abbreviated month name (Jan .. Dec) when 'b' | 'h' => Result := Result & Mon_Abbr_Name (Month); -- Locale's full month name, variable length -- (January .. December). when 'B' => if Use_O_Modifier then Result := Result & Alt_Mon_Full_Name (Month); else Result := Result & Mon_Full_Name (Month); end if; -- Locale's date and time (Sat Nov 04 12:02:33 EST 1989) when 'c' => Result := Result & Format (Nl_Langinfo (D_T_FMT), Date); -- Century when 'C' => Result := Result & Image (Year / 100, None); -- Day of month (01 .. 31) when 'd' => Result := Result & Image (Day, Padding, 2); -- Date (mm/dd/yy) when 'D' => Result := Result & Image (Month, Padding, 2) & '/' & Image (Day, Padding, 2) & '/' & Image (Year, Padding, 2); -- Day of month ( 1..31) when 'e' => Result := Result & Image (Day, Space, 2); -- Date (yyyy-mm-dd) when 'F' => Result := Result & Image (Year, None, 4) & '-' & Image (Month, Padding, 2) & '-' & Image (Day, Padding, 2); -- Hour (00 .. 23) when 'H' => Result := Result & Image (Hour, Padding, 2); -- Hour (01 .. 12) when 'I' => Result := Result & Image (Hour_12 (Hour), Padding, 2); -- Day of year (001 .. 366) when 'j' => Result := Result & Image (Day_In_Year (Date), Padding, 3); -- Hour ( 0 .. 23) when 'k' => Result := Result & Image (Hour, Space, 2); -- Hour ( 1 .. 12) when 'l' => Result := Result & Image (Hour_12 (Hour), Space, 2); -- Month (01 .. 12) when 'm' => Result := Result & Image (Month, Padding, 2); -- Minute (00 .. 59) when 'M' => Result := Result & Image (Minute, Padding, 2); -- AM/PM when 'p' => Result := Result & Am_Pm (Hour); -- am/pm lower case when 'P' => Result := Result & Ada.Characters.Handling.To_Lower (Am_Pm (Hour)); -- Time, 12-hour (hh:mm:ss [AP]M) when 'r' => begin Result := Result & Format (Nl_Langinfo (T_FMT_AMPM), Date); exception when others => Result := Result & Image (Hour_12 (Hour), Padding, 2) & ":" & Image (Minute, Padding, 2) & ":" & Image (Second, Padding, 2); end; -- Time, 24-hour (hh:mm) when 'R' => Result := Result & Image (Hour, Padding, 2) & ":" & Image (Minute, Padding, 2); -- Seconds since 1970-01-01 00:00:00 UTC -- (a GNU extension) when 's' => declare -- Compute the number of seconds using Ada.Calendar.Time -- values rather than Julian days to account for Daylight -- Savings Time. Neg : Boolean := False; Sec : Duration := Date - Time_Of (1970, 1, 1, 0.0); begin -- Avoid rounding errors and perform special processing -- for dates earlier than the Unix Epoc. if Sec > 0.0 then Sec := Sec - 0.5; elsif Sec < 0.0 then Neg := True; Sec := abs (Sec + 0.5); end if; -- Prepend a minus sign to the result since Sec_Number -- cannot handle negative numbers. Result := Result & (if Neg then "-" else "") & Image (Sec_Number (Sec), None); end; -- Second (00 .. 59) when 'S' => Result := Result & Image (Second, Padding, 2); -- Time, 24-hour (hh:mm:ss) when 'T' => Result := Result & Image (Hour, Padding, 2) & ':' & Image (Minute, Padding, 2) & ':' & Image (Second, Padding, 2); -- Day of week (1 .. 7) with 1 corresponding to Monday when 'u' => declare DOW : constant Natural range 1 .. 7 := Day_Name'Pos (Day_Of_Week (Date)) + 1; begin Result := Result & Image (DOW, Length => 1); end; -- Week number of year with Sunday as first day of week -- (00 .. 53) when 'U' => declare Offset : constant Natural := (Julian_Day (Year, 1, 1) + 1) mod 7; Week : constant Natural := 1 + ((Day_In_Year (Date) - 1) + Offset) / 7; begin Result := Result & Image (Week, Padding, 2); end; -- Day of week (0 .. 6) with 0 corresponding to Sunday when 'w' => declare DOW : constant Natural range 0 .. 6 := (if Day_Of_Week (Date) = Sunday then 0 else Day_Name'Pos (Day_Of_Week (Date)) + 1); begin Result := Result & Image (DOW, Length => 1); end; -- Week number of year with Monday as first day of week -- (00 .. 53) when 'W' => Result := Result & Image (Week_In_Year (Date), Padding, 2); -- Locale's date when 'x' => Result := Result & Format (Nl_Langinfo (D_FMT), Date); -- Locale's time when 'X' => Result := Result & Format (Nl_Langinfo (T_FMT), Date); -- Last two digits of year (00 .. 99) when 'y' => declare Y : constant Natural := Year - (Year / 100) * 100; begin Result := Result & Image (Y, Padding, 2); end; -- Year (1970...) when 'Y' => Result := Result & Image (Year, None, 4); -- z Numeric timezone -- Z Alphabetic time zone abbreviation when 'z' | 'Z' => declare TZH : constant String := Image (abs (TZ / 60), Zero, 2); TZM : constant String := Image (abs (TZ mod 60), Zero, 2); Sing : constant String := (if TZ < 0 then "-" else "+"); begin case Picture (P + 1) is when 'z' => Result := Result & Sing & TZH & TZM; when 'Z' => Result := Result & "UTC" & Sing & TZH & ":" & TZM; when others => null; end case; end; ------------------------------------------------------------ -- Additional time fields ------------------------------------------------------------ -- i Milliseconds (3 digits) -- o Microseconds (6 digits) -- N Nanoseconds (9 digits) when 'i' | 'o' | 'N' => declare Sub_Sec : constant Long_Integer := Long_Integer (Sub_Second * 1_000_000_000); Img1 : constant String := Sub_Sec'Img; Img2 : constant String := "00000000" & Img1 (Img1'First + 1 .. Img1'Last); Nanos : constant String := Img2 (Img2'Last - 8 .. Img2'Last); begin case Picture (P + 1) is when 'i' => Result := Result & Nanos (Nanos'First .. Nanos'First + 2); when 'o' => Result := Result & Nanos (Nanos'First .. Nanos'First + 5); when 'N' => Result := Result & Nanos; when others => null; end case; end; -- Unknown character when others => raise Time_Picture_Error with "unknown format character in picture string"; end case; -- Skip past % and format character P := P + 2; -- Reset modifier flag Use_O_Modifier := False; -- Character other than % is copied into the result else Result := Result & Picture (P); P := P + 1; end if; end loop; return To_String (Result); end Format; ----------------- -- Format_Time -- ----------------- function Format_Time (Picture : String; Value : Ada.Calendar.Time) return String is begin return Format (Picture, Value); end Format_Time; end Formatted_Output.Time_Output;
python36/0xfa
Ada
6,588
adb
package body getter.macros is function get return character is c : character; procedure rem_var (cur : in params_t.cursor) is begin environment.delete(environment_t.key(params_t.element(cur))); end rem_var; begin if current_called.last > unb.length(current_macros.code) then params_t.iterate(current_called.params, rem_var'access); stack.delete_last; if not stack_t.is_empty(stack) then current_called := stack_t.element(stack_t.last(stack)); current_macros := macroses_t.element(current_called.macros_cursor); end if; pop; return ' '; end if; c := unb.element(current_macros.code, current_called.last); inc(current_called.last); return c; end get; procedure define (name, params : string) is eqs : natural := 1; c : character; tmp_macros : macros_t; len_end : constant natural := end_macros_statement'length; start_pos : natural := 1; cur_pos : natural := 1; mustbe_only_default : boolean := false; t_param : param_t; begin loop c := getter.get(false); if c = ascii.nul then raise ERROR_NO_CLOSED; end if; if end_macros_statement(eqs) = c and then unb.element(tmp_macros.code, unb.length(tmp_macros.code) - eqs + 1) in ' '|ascii.lf then inc(eqs); if eqs > len_end then unb.delete(tmp_macros.code, unb.length(tmp_macros.code) - (end_macros_statement'length - 2), unb.length(tmp_macros.code)); exit; end if; else eqs := 1; end if; unb.append(tmp_macros.code, c); end loop; for i in params'range loop c := params(i); if c in ' '|ascii.lf then if start_pos /= cur_pos then declare param : constant string := params(start_pos..(cur_pos - 1)); assignment_pos : natural := fix.index(param, "="); begin if assignment_pos > 0 then mustbe_only_default := true; if assignment_pos = param'last or assignment_pos = param'first or not validate_variable(param(param'first..(assignment_pos - 1))) or not validate_word(param((assignment_pos + 1)..param'last)) then raise ERROR_PARAM with param; end if; t_param.name := unb.to_unbounded_string(param(param'first..(assignment_pos - 1))); t_param.default_val := value(param((assignment_pos + 1)..param'last)); t_param.has_default := true; elsif mustbe_only_default then raise ERROR_NONDEFAULT_AFTER_DEFAULT with param; elsif not validate_variable(param) then raise ERROR_PARAM with param; else inc(tmp_macros.num_required_params); t_param.name := unb.to_unbounded_string(param); end if; end; tmp_macros.param_names.append(t_param); end if; start_pos := cur_pos + 1; end if; inc(cur_pos); end loop; macroses.insert(name, tmp_macros); end define; procedure call (name, params : string) is t_i : positive := 1; param_i : param_names_t.cursor; tmp_env_cur : environment_t.cursor; tb : boolean; num_req : natural; tmp_n : natural; mustbe_only_default : boolean := false; t_param : param_t; begin if not macroses_t.contains(macroses, name) then raise ERROR_NO_DEFINED; end if; if not stack_t.is_empty(stack) then stack.replace_element(stack_t.last(stack), current_called); end if; current_called.last := 1; current_called.cur_line := 1; current_called.params.clear; current_called.macros_cursor := macroses_t.find(macroses, name); current_macros := macroses_t.element(current_called.macros_cursor); num_req := current_macros.num_required_params; stack.append(current_called); param_i := param_names_t.first(current_macros.param_names); for i in params'range loop if params(i) = ' ' then declare param_raw : constant string := params(t_i..i - 1); assignment_pos : natural := fix.index(param_raw, "="); name : constant string := param_raw(param_raw'first..(assignment_pos - 1)); param : constant string := param_raw(natural'max((assignment_pos + 1), param_raw'first)..param_raw'last); begin if assignment_pos > 0 then if assignment_pos = param_raw'first or assignment_pos = param_raw'last then raise ERROR_PARAM with param; end if; mustbe_only_default := true; param_i := param_names_t.first(current_macros.param_names); while param_names_t.has_element(param_i) loop t_param := param_names_t.element(param_i); if t_param.name = name then if not t_param.has_default then if num_req = 0 then raise ERROR_COUNT_PARAMS with params; end if; dec(num_req); end if; exit; end if; param_names_t.next(param_i); end loop; if not param_names_t.has_element(param_i) then raise ERROR_UNEXPECTED_NAME with name; end if; environment.insert(name, value(param), tmp_env_cur, tb); elsif mustbe_only_default then raise ERROR_NONDEFAULT_AFTER_DEFAULT with params; else if num_req > 0 then dec(num_req); end if; environment.insert(unb.to_string(param_names_t.element(param_i).name), value(param), tmp_env_cur, tb); param_names_t.next(param_i); end if; if not tb then raise ERROR_ALREADY_DEFINED; end if; end; current_called.params.append(tmp_env_cur); t_i := i + 1; end if; end loop; if num_req > 0 then raise ERROR_COUNT_PARAMS with params; end if; param_i := param_names_t.first(current_macros.param_names); while param_names_t.has_element(param_i) loop t_param := param_names_t.element(param_i); if t_param.has_default then environment.insert(unb.to_string(param_names_t.element(param_i).name), t_param.default_val, tmp_env_cur, tb); if tb then current_called.params.append(tmp_env_cur); end if; end if; param_names_t.next(param_i); end loop; getter.push(get'access); end call; end getter.macros;
AdaCore/gpr
Ada
14,217
adb
-- -- Copyright (C) 2021-2023, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-Exception -- with Ada.Containers.Vectors; package body GPR2.View_Ids.DAGs is use type Ada.Containers.Count_Type; package Node_Vectors is new Ada.Containers.Vectors (Positive, Node_Id); subtype Node_Vector is Node_Vectors.Vector; package Node_Int_Maps is new Ada.Containers.Ordered_Maps (Node_Id, Natural); subtype Node_Int_Map is Node_Int_Maps.Map; function Allocate_Node (Self : in out DAG; Vertex : View_Id) return Node_Id; -- Return the Node_Id associated with a vertex name. function Min (List : Node_Sets.Set; Map : Node_Int_Map) return Node_Id; -- return the key that corresponds to the minimum value in the map function Shortest_Path (Self : DAG; Source, Target : Node_Id) return View_Ids.Vector.Vector; procedure Update (Self : in out Node_Node_Set_Maps.Map; Key : Node_Id; Value : Node_Sets.Set); -- If Self contains Key then map Key to Value, otherwise map Key to the -- union of Value and previous mapping of Key. procedure Update (Self : in out Node_Node_Set_Maps.Map; Key : Node_Id; Value : Node_Id); -- Idem as previous function for the case only one Value should be -- inserted. ---------------- -- Add_Vertex -- ---------------- procedure Add_Vertex (Self : in out DAG; Vertex : View_Id; Predecessors : View_Ids.Set.Set := View_Ids.Set.Empty_Set) is begin if Self.Contains (Vertex) then raise DAG_Error with "insert error: vertex " & String (Image (Vertex)) & " already exist"; end if; Self.Update_Vertex (Vertex => Vertex, Predecessors => Predecessors); end Add_Vertex; -------------------- -- Allocate_Node -- -------------------- function Allocate_Node (Self : in out DAG; Vertex : View_Id) return Node_Id is use Name_Node_Maps; Node : Node_Id; Name_Cursor : Cursor; begin -- Check if there is already a node called Vertex Name_Cursor := Self.Vertex_Names.Find (Vertex); if Name_Cursor = No_Element then -- If there is no node called Vertex allocate a node id and -- associate it with Vertex Node := Self.Next_Free_Node; pragma Assert (Self.Next_Free_Node < Node_Id'Last); Self.Next_Free_Node := Self.Next_Free_Node + 1; Self.Vertex_Names.Include (Vertex, Node); Self.Vertex_Ids.Include (Node, Vertex); Self.Predecessors.Include (Node, Node_Sets.Empty_Set); Self.Successors.Include (Node, Node_Sets.Empty_Set); Self.Cache_Valid := False; else -- A node id is already associated with Vertex Node := Element (Name_Cursor); end if; return Node; end Allocate_Node; ------------ -- As_Dot -- ------------ function As_Dot (Self : DAG) return Unbounded_String is use Node_Node_Set_Maps; Result : Unbounded_String; begin Append (Result, "digraph G {" & ASCII.LF); Append (Result, "rankdir=""LR"";" & ASCII.LF); for Pred_Cursor in Self.Predecessors.Iterate loop Append (Result, """"); Append (Result, String (Image (Self.Vertex_Ids.Element (Key (Pred_Cursor))))); Append (Result, """"); Append (Result, ASCII.LF); if Element (Pred_Cursor).Length > 0 then for Pred of Element (Pred_Cursor) loop Append (Result, """"); Append (Result, String (Image (Self.Vertex_Ids.Element (Key (Pred_Cursor))))); Append (Result, """"); Append (Result, " -> "); Append (Result, """"); Append (Result, String (Image (Self.Vertex_Ids.Element (Pred)))); Append (Result, """" & ASCII.LF); end loop; end if; end loop; Append (Result, "}"); return Result; end As_Dot; ----------- -- Clear -- ----------- procedure Clear (Self : in out DAG) is begin Self.Next_Free_Node := 1; Self.Predecessors.Clear; Self.Successors.Clear; Self.Vertex_Names.Clear; Self.Vertex_Ids.Clear; Self.Sort_Cache.Clear; Self.Cache_Valid := True; end Clear; -------------- -- Contains -- -------------- function Contains (Self : DAG; Vertex : View_Id) return Boolean is begin return Self.Vertex_Names.Contains (Vertex); end Contains; --------- -- Min -- --------- function Min (List : Node_Sets.Set; Map : Node_Int_Map) return Node_Id is Result : Node_Id; Value : Integer := Integer'Last; begin for Key of List loop if Value > Map.Element (Key) then Value := Map.Element (Key); Result := Key; end if; end loop; return Result; end Min; --------------------- -- Shortest_Circle -- --------------------- function Shortest_Circle (Self : DAG) return GPR2.View_Ids.Vector.Vector is Result : GPR2.View_Ids.Vector.Vector; begin if not Self.Has_Cycle then return GPR2.View_Ids.Vector.Empty_Vector; end if; for Id of Self.Vertex_Names loop Result := Shortest_Path (Self, Id, Id); if not Result.Is_Empty then return Result; end if; end loop; raise DAG_Error with "Has_Circularity set but no circularity found"; end Shortest_Circle; ------------------- -- Shortest_Path -- ------------------- function Shortest_Path (Self : DAG; Source, Target : View_Id) return View_Ids.Vector.Vector is begin return Shortest_Path (Self, Self.Vertex_Names.Element (Source), Self.Vertex_Names.Element (Target)); end Shortest_Path; function Shortest_Path (Self : DAG; Source, Target : Node_Id) return View_Ids.Vector.Vector is Infinite : constant Natural := Natural (Self.Vertex_Ids.Length) + 1; -- Maximum distance between two vertices is the number of nodes in the -- DAG - 1, unless Source and Target are equal in which case the -- maximum possible distance is the number of nodes. So infinity is -- Length (Nodes) + 1. Dist : Node_Int_Map; -- This map will keep track of minimal distance between vertices and the -- source. Prev : Node_Node_Maps.Map; -- This keeps track of the minimum distance Non_Visited : Node_Sets.Set; -- Non visited nodes T_Id : Node_Id renames Target; S_Id : Node_Id := Source; U, V : Node_Id; Alt : Natural; Result : View_Ids.Vector.Vector; begin -- We use the Dijkstra algorithm to compute the shortest path. -- Note that this is a slight variation so that the algorithm -- can be used to compute shortest cycle on a given node. -- Initialize Dist: for Id of Self.Vertex_Names loop if Id = T_Id then -- Only known distance at startup Dist.Insert (Id, 0); else Dist.Insert (Id, Infinite); end if; end loop; -- Initialize Prev: for Id of Self.Vertex_Names loop Prev.Insert (Id, Undefined); end loop; for Id of Self.Vertex_Names loop Non_Visited.Insert (Id); end loop; if S_Id = T_Id then -- If Source is equal to target, default Dijkstra algorithm does -- not work. Add a fake node and use it as target. When iterating -- on predecessors, replace all occurrences of sources to that node. -- If we find a path between that node and the source, it means we -- have our shortest cycle. Dist.Insert (Undefined, Infinite); Prev.Insert (Undefined, Undefined); Non_Visited.Insert (Undefined); S_Id := Undefined; end if; while not Non_Visited.Is_Empty loop U := Min (Non_Visited, Dist); Non_Visited.Delete (U); if U = S_Id then -- We found the shortest path exit; elsif U /= Undefined then for U_Pred of Self.Predecessors.Element (U) loop if S_Id = Undefined and then U_Pred = T_Id then -- Handle cycle detection case V := Undefined; else V := U_Pred; end if; Alt := Dist.Element (U) + 1; if Alt < Dist.Element (V) then Dist.Replace (V, Alt); Prev.Replace (V, U); end if; end loop; end if; end loop; if Dist.Element (S_Id) = Infinite then -- No path between source and target return View_Ids.Vector.Empty_Vector; end if; U := S_Id; Result.Append (Self.Vertex_Ids (Source)); while Prev.Element (U) /= Undefined loop U := Prev.Element (U); Result.Append (Self.Vertex_Ids.Element (U)); end loop; return Result; end Shortest_Path; ---------------------- -- Topological_Sort -- ---------------------- function Topological_Sort (Self : DAG) return View_Ids.Vector.Vector is begin return Self.Sort_Cache; end Topological_Sort; ------------ -- Update -- ------------ procedure Update (Self : in out DAG; Circularity : out Boolean) is Non_Visited : Node_Int_Map; Result_Nodes : Node_Vector; use Node_Node_Set_Maps; begin if Self.Cache_Valid then Circularity := Self.Has_Cycle; return; end if; Self.Sort_Cache.Clear; Self.Has_Cycle := False; -- First compute set of non visited nodes and the number of -- predecessors that should be visited first. for Cursor in Self.Predecessors.Iterate loop Non_Visited.Include (Key (Cursor), Natural (Element (Cursor).Length)); end loop; while not Non_Visited.Is_Empty loop declare Visited_Nodes : Node_Sets.Set; Excluded : Boolean := False; begin -- Add nodes that have no more predecessors to visit for Cursor in Non_Visited.Iterate loop if Node_Int_Maps.Element (Cursor) = 0 then Visited_Nodes.Include (Node_Int_Maps.Key (Cursor)); Result_Nodes.Append (Node_Int_Maps.Key (Cursor)); end if; end loop; -- Remove visited from non_visited for Visited_Node of Visited_Nodes loop Non_Visited.Exclude (Visited_Node); Excluded := True; end loop; -- Update number of predecessors that should be visited -- for remaining nodes for Visited_Node of Visited_Nodes loop for Successor of Self.Successors (Visited_Node) loop Non_Visited.Include (Successor, Non_Visited.Element (Successor) - 1); end loop; end loop; if not Excluded then -- Non_Visited is not empty and no more nodes to remove: -- no leaf node, so there's some circular dependency. Self.Has_Cycle := True; exit; end if; end; end loop; if not Self.Has_Cycle then for Node of Result_Nodes loop Self.Sort_Cache.Append (Self.Vertex_Ids.Element (Node)); end loop; end if; -- Do not re-compute unless we add/modify vertices Self.Cache_Valid := True; Circularity := Self.Has_Cycle; end Update; procedure Update (Self : in out Node_Node_Set_Maps.Map; Key : Node_Id; Value : Node_Sets.Set) is use Node_Node_Set_Maps; Pred_Cursor : Cursor; Final_Value : Node_Sets.Set; begin Final_Value.Union (Value); Pred_Cursor := Self.Find (Key); if Pred_Cursor /= No_Element then Final_Value.Union (Element (Pred_Cursor)); end if; Self.Include (Key, Final_Value); end Update; procedure Update (Self : in out Node_Node_Set_Maps.Map; Key : Node_Id; Value : Node_Id) is use Node_Node_Set_Maps; Pred_Cursor : Cursor; Final_Value : Node_Sets.Set; begin Final_Value.Include (Value); Pred_Cursor := Self.Find (Key); if Pred_Cursor /= No_Element then Final_Value.Union (Element (Pred_Cursor)); end if; Self.Include (Key, Final_Value); end Update; ------------------- -- Update_Vertex -- ------------------- procedure Update_Vertex (Self : in out DAG; Vertex : View_Id; Predecessors : View_Ids.Set.Set := View_Ids.Set.Empty_Set) is Node : Node_Id; begin Node := Self.Allocate_Node (Vertex); declare Pred_Nodes : Node_Sets.Set; begin -- Compute the corresponding list of nodes for Vertex_Name of Predecessors loop Pred_Nodes.Include (Self.Allocate_Node (Vertex_Name)); end loop; -- Update predecessors Update (Self.Predecessors, Node, Pred_Nodes); -- Update successors for Pred_Node of Pred_Nodes loop Update (Self.Successors, Pred_Node, Node); end loop; Self.Cache_Valid := False; end; end Update_Vertex; procedure Update_Vertex (Self : in out DAG; Vertex : View_Id; Predecessor : View_Id) is Predecessors : View_Ids.Set.Set; begin Predecessors.Include (Predecessor); Self.Update_Vertex (Vertex, Predecessors); end Update_Vertex; end GPR2.View_Ids.DAGs;
afrl-rq/OpenUxAS
Ada
1,959
ads
with DOM.Core; with Waypoint_Plan_Manager; use Waypoint_Plan_Manager; with Waypoint_Plan_Manager_Communication; use Waypoint_Plan_Manager_Communication; with AFRL.CMASI.Enumerations; use AFRL.CMASI.Enumerations; with AFRL.CMASI.MissionCommand; use AFRL.CMASI.MissionCommand; with Common; use Common; package UxAS.Comms.LMCP_Net_Client.Service.Waypoint_Plan_Management is type Waypoint_Plan_Manager_Service is new Service_Base with private; type Waypoint_Plan_Manager_Service_Ref is access all Waypoint_Plan_Manager_Service; Type_Name : constant String := "WaypointPlanManagerService"; Directory_Name : constant String := ""; function Registry_Service_Type_Names return Service_Type_Names_List; function Create return Any_Service; private type Waypoint_Plan_Manager_Service is new Service_Base with record Timer : Common.Int64 := 0; Time_Elapsed : Boolean := False; Min_Time_Between_Commands_ms : Common.Int64 := 1000; Config : Waypoint_Plan_Manager_Configuration_Data; Mailbox : Waypoint_Plan_Manager_Mailbox; State : Waypoint_Plan_Manager_State; end record; overriding procedure Configure (This : in out Waypoint_Plan_Manager_Service; XML_Node : DOM.Core.Element; Result : out Boolean); overriding procedure Initialize (This : in out Waypoint_Plan_Manager_Service; Result : out Boolean); overriding procedure Process_Received_LMCP_Message (This : in out Waypoint_Plan_Manager_Service; Received_Message : not null Any_LMCP_Message; Should_Terminate : out Boolean); -- TODO: TIMER CALLBACKS -- this function gets called when the response timer expires -- void OnResponseTimeout(); -- this function gets called when the tasks involved have not reported initialization in time -- void OnTasksReadyTimeout(); end UxAS.Comms.LMCP_Net_Client.Service.Waypoint_Plan_Management;
rveenker/sdlada
Ada
25,308
adb
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2020, Luke A. Guest -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- -- 3. This notice may not be removed or altered from any source -- distribution. -------------------------------------------------------------------------------------------------------------------- with Ada.Unchecked_Conversion; with Interfaces.C; with Interfaces.C.Strings; private with SDL.C_Pointers; with SDL.Error; package body SDL.Video.GL is package C renames Interfaces.C; use type C.int; use type SDL.C_Pointers.GL_Context_Pointer; type Attributes is (Attribute_Red_Size, Attribute_Green_Size, Attribute_Blue_Size, Attribute_Alpha_Size, Attribute_Buffer_Size, Attribute_Double_Buffer, Attribute_Depth_Buffer_Size, Attribute_Stencil_Size, Attribute_Accumulator_Red_Size, Attribute_Accumulator_Green_Size, Attribute_Accumulator_Blue_Size, Attribute_Accumulator_Alpha_Size, Attribute_Stereo, Attribute_Multisample_Buffers, Attribute_Multisample_Samples, Attribute_Accelerated, Attribute_Retained_Backing, Attribute_Context_Major_Version, Attribute_Context_Minor_Version, Attribute_Context_EGL, Attribute_Context_Flags, Attribute_Context_Profile, Attribute_Share_With_Current_Context) with Convention => C; function To_int is new Ada.Unchecked_Conversion (Source => Profiles, Target => C.int); function SDL_GL_Set_Attribute (Attr : in Attributes; Value : in C.int) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_SetAttribute"; function SDL_GL_Get_Attribute (Attr : in Attributes; Value : out C.int) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_GetAttribute"; function Red_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Red_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Red_Size; procedure Set_Red_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Red_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Red_Size; function Green_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Green_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Green_Size; procedure Set_Green_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Green_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Green_Size; function Blue_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Blue_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Blue_Size; procedure Set_Blue_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Blue_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Blue_Size; function Alpha_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Alpha_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Alpha_Size; procedure Set_Alpha_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Alpha_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Alpha_Size; function Buffer_Size return Buffer_Sizes is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Buffer_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Buffer_Sizes (Data); end Buffer_Size; procedure Set_Buffer_Size (Size : in Buffer_Sizes) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Buffer_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Buffer_Size; function Is_Double_Buffered return Boolean is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Double_Buffer, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return (Data = 1); end Is_Double_Buffered; procedure Set_Double_Buffer (On : in Boolean) is Data : C.int := (if On = True then 1 else 0); Result : C.int := SDL_GL_Set_Attribute (Attribute_Double_Buffer, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Double_Buffer; function Depth_Buffer_Size return Depth_Buffer_Sizes is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Depth_Buffer_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Depth_Buffer_Sizes (Data); end Depth_Buffer_Size; procedure Set_Depth_Buffer_Size (Size : in Depth_Buffer_Sizes) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Depth_Buffer_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Depth_Buffer_Size; function Stencil_Buffer_Size return Stencil_Buffer_Sizes is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Stencil_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Stencil_Buffer_Sizes (Data); end Stencil_Buffer_Size; procedure Set_Stencil_Buffer_Size (Size : in Stencil_Buffer_Sizes) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Stencil_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Stencil_Buffer_Size; function Accumulator_Red_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Accumulator_Red_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Accumulator_Red_Size; procedure Set_Accumulator_Red_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Accumulator_Red_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Accumulator_Red_Size; function Accumulator_Green_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Accumulator_Green_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Accumulator_Green_Size; procedure Set_Accumulator_Green_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Accumulator_Green_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Accumulator_Green_Size; function Accumulator_Blue_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Accumulator_Blue_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Accumulator_Blue_Size; procedure Set_Accumulator_Blue_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Accumulator_Blue_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Accumulator_Blue_Size; function Accumulator_Alpha_Size return Colour_Bit_Size is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Accumulator_Alpha_Size, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Colour_Bit_Size (Data); end Accumulator_Alpha_Size; procedure Set_Accumulator_Alpha_Size (Size : in Colour_Bit_Size) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Accumulator_Alpha_Size, C.int (Size)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Accumulator_Alpha_Size; function Is_Stereo return Boolean is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Stereo, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return (Data = 1); end Is_Stereo; procedure Set_Stereo (On : in Boolean) is Data : C.int := (if On = True then 1 else 0); Result : C.int := SDL_GL_Set_Attribute (Attribute_Stereo, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Stereo; function Is_Multisampled return Boolean is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Multisample_Buffers, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return (Data = 1); end Is_Multisampled; procedure Set_Multisampling (On : in Boolean) is Data : C.int := (if On = True then 1 else 0); Result : C.int := SDL_GL_Set_Attribute (Attribute_Multisample_Buffers, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Multisampling; function Multisampling_Samples return Multisample_Samples is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Multisample_Samples, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Multisample_Samples (Data); end Multisampling_Samples; procedure Set_Multisampling_Samples (Samples : in Multisample_Samples) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Multisample_Samples, C.int (Samples)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Multisampling_Samples; function Is_Accelerated return Boolean is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Accelerated, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return (Result = 1); end Is_Accelerated; procedure Set_Accelerated (On : in Boolean) is Data : C.int := (if On = True then 1 else 0); Result : C.int := SDL_GL_Set_Attribute (Attribute_Accelerated, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Accelerated; function Context_Major_Version return Major_Versions is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Context_Major_Version, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Major_Versions (Data); end Context_Major_Version; procedure Set_Context_Major_Version (Version : Major_Versions) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Context_Major_Version, C.int (Version)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Context_Major_Version; function Context_Minor_Version return Minor_Versions is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Context_Minor_Version, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Minor_Versions (Data); end Context_Minor_Version; procedure Set_Context_Minor_Version (Version : Minor_Versions) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Context_Minor_Version, C.int (Version)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Context_Minor_Version; function Is_Context_EGL return Boolean is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Context_EGL, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return (Data = 1); end Is_Context_EGL; procedure Set_Context_EGL (On : in Boolean) is Data : C.int := (if On = True then 1 else 0); Result : C.int := SDL_GL_Set_Attribute (Attribute_Context_EGL, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Context_EGL; function Context_Flags return Flags is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Context_Flags, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Flags (Data); end Context_Flags; procedure Set_Context_Flags (Context_Flags : in Flags) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Context_Flags, C.int (Context_Flags)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Context_Flags; function Context_Profile return Profiles is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Context_Profile, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return Profiles'Val (Data); end Context_Profile; procedure Set_Context_Profile (Profile : in Profiles) is Result : C.int := SDL_GL_Set_Attribute (Attribute_Context_Profile, To_int (Profile)); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Context_Profile; procedure Set_Core_Context_Profile (Major : in Major_Versions; Minor : Minor_Versions) is Result : C.int; begin Result := SDL_GL_Set_Attribute (Attribute_Context_Profile, To_int (Core)); if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; Result := SDL_GL_Set_Attribute (Attribute_Context_Major_Version, C.int (Major)); if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; Result := SDL_GL_Set_Attribute (Attribute_Context_Minor_Version, C.int (Minor)); if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Core_Context_Profile; function Is_Sharing_With_Current_Context return Boolean is Data : C.int; Result : C.int := SDL_GL_Get_Attribute (Attribute_Share_With_Current_Context, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; return (Data = 1); end Is_Sharing_With_Current_Context; procedure Set_Share_With_Current_Context (On : in Boolean) is Data : C.int := (if On = True then 1 else 0); Result : C.int := SDL_GL_Set_Attribute (Attribute_Share_With_Current_Context, Data); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Share_With_Current_Context; -- Some helper functions to get make this type work ok. function Get_Internal_Window (Self : in SDL.Video.Windows.Window) return SDL.C_Pointers.Windows_Pointer with Import => True, Convention => Ada; function Get_Internal_Texture (Self : in SDL.Video.Textures.Texture) return SDL.C_Pointers.Texture_Pointer with Import => True, Convention => Ada; -- The GL context. procedure Create (Self : in out Contexts; From : in SDL.Video.Windows.Window) is function SDL_GL_Create_Context (W : in SDL.C_Pointers.Windows_Pointer) return SDL.C_Pointers.GL_Context_Pointer with Import => True, Convention => C, External_Name => "SDL_GL_CreateContext"; C : SDL.C_Pointers.GL_Context_Pointer := SDL_GL_Create_Context (Get_Internal_Window (From)); begin if C = null then raise SDL_GL_Error with SDL.Error.Get; end if; Self.Internal := C; Self.Owns := True; end Create; overriding procedure Finalize (Self : in out Contexts) is procedure SDL_GL_Delete_Context (W : in SDL.C_Pointers.GL_Context_Pointer) with Import => True, Convention => C, External_Name => "SDL_GL_DeleteContext"; begin -- We have to own this pointer before we go any further... -- and make sure we don't delete this twice if we do! if Self.Internal /= null and then Self.Owns then SDL_GL_Delete_Context (Self.Internal); Self.Internal := null; end if; end Finalize; -- TODO: Make sure we make all similar functions across the API match this pattern. -- Create a temporary Context. function Get_Current return Contexts is function SDL_GL_Get_Current_Context return SDL.C_Pointers.GL_Context_Pointer with Import => True, Convention => C, External_Name => "SDL_GL_GetCurrentContext"; begin return C : constant Contexts := (Ada.Finalization.Limited_Controlled with Internal => SDL_GL_Get_Current_Context, Owns => False) do if C.Internal = null then raise SDL_GL_Error with SDL.Error.Get; end if; end return; end Get_Current; procedure Set_Current (Self : in Contexts; To : in SDL.Video.Windows.Window) is function SDL_GL_Make_Current (W : in SDL.C_Pointers.Windows_Pointer; Context : in SDL.C_Pointers.GL_Context_Pointer) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_MakeCurrent"; Result : C.int := SDL_GL_Make_Current (Get_Internal_Window (To), Self.Internal); begin if Result /= Success then raise SDL_GL_Error with SDL.Error.Get; end if; end Set_Current; procedure Bind_Texture (Texture : in SDL.Video.Textures.Texture) is function SDL_GL_Bind_Texture (T : in SDL.C_Pointers.Texture_Pointer) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_BindTexture"; begin if SDL_GL_Bind_Texture (Get_Internal_Texture (Texture)) /= SDL.Success then raise SDL_GL_Error with "Cannot bind texture, unsupported operation in this context."; end if; end Bind_Texture; procedure Bind_Texture (Texture : in SDL.Video.Textures.Texture; Size : out SDL.Sizes) is function SDL_GL_Bind_Texture (T : in SDL.C_Pointers.Texture_Pointer; W, H : out C.int) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_BindTexture"; begin if SDL_GL_Bind_Texture (Get_Internal_Texture (Texture), Size.Width, Size.Height) /= SDL.Success then raise SDL_GL_Error with "Cannot bind texture, unsupported operation in this context."; end if; end Bind_Texture; procedure Unbind_Texture (Texture : in SDL.Video.Textures.Texture) is function SDL_GL_Unbind_Texture (T : in SDL.C_Pointers.Texture_Pointer) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_UnbindTexture"; begin if SDL_GL_Unbind_Texture (Get_Internal_Texture (Texture)) /= SDL.Success then raise SDL_GL_Error with "Cannot unbind texture, unsupported operation in this context."; end if; end Unbind_Texture; function Get_Sub_Program (Name : in String) return Access_To_Sub_Program is function SDL_GL_Get_Proc_Address (P : in C.Strings.chars_ptr) return Access_To_Sub_Program with Import => True, Convention => C, External_Name => "SDL_GL_GetProcAddress"; C_Name_Str : C.Strings.chars_ptr := C.Strings.New_String (Name); Sub_Program : Access_To_Sub_Program := SDL_GL_Get_Proc_Address (C_Name_Str); begin C.Strings.Free (C_Name_Str); return Sub_Program; end Get_Sub_Program; function Supports (Extension : in String) return Boolean is function SDL_GL_Extension_Supported (E : in C.Strings.chars_ptr) return SDL_Bool with Import => True, Convention => C, External_Name => "SDL_GL_ExtensionSupported"; C_Name_Str : C.Strings.chars_ptr := C.Strings.New_String (Extension); Result : SDL_Bool := SDL_GL_Extension_Supported (C_Name_Str); begin C.Strings.Free (C_Name_Str); return (Result = SDL_True); end Supports; function Get_Swap_Interval return Swap_Intervals is function SDL_GL_Get_Swap_Interval return Swap_Intervals with Import => True, Convention => C, External_Name => "SDL_GL_GetSwapInterval"; begin return SDL_GL_Get_Swap_Interval; end Get_Swap_Interval; function Set_Swap_Interval (Interval : in Allowed_Swap_Intervals; Late_Swap_Tear : in Boolean) return Boolean is function SDL_GL_Set_Swap_Interval (Interval : in Swap_Intervals) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_SetSwapInterval"; Late_Tearing : Swap_Intervals renames Not_Supported; Result : C.int; begin if Late_Swap_Tear then -- Override the interval passed. Result := SDL_GL_Set_Swap_Interval (Late_Tearing); if Result = -1 then -- Try again with synchronised. Result := SDL_GL_Set_Swap_Interval (Synchronised); return (if Result = -1 then False else True); elsif Result = Success then return True; else raise SDL_GL_Error with "Something unexpected happend whilst setting swap interval."; end if; end if; Result := SDL_GL_Set_Swap_Interval (Synchronised); return (if Result = -1 then False else True); end Set_Swap_Interval; procedure Swap (Window : in out SDL.Video.Windows.Window) is procedure SDL_GL_Swap_Window (W : in SDL.C_Pointers.Windows_Pointer) with Import => True, Convention => C, External_Name => "SDL_GL_SwapWindow"; begin SDL_GL_Swap_Window (Get_Internal_Window (Window)); end Swap; function SDL_GL_Load_Library (P : in C.Strings.chars_ptr) return C.int with Import => True, Convention => C, External_Name => "SDL_GL_LoadLibrary"; -- Load the default OpenGL library. procedure Load_Library is Result : C.int := SDL_GL_Load_Library (C.Strings.Null_Ptr); begin if Result /= SDL.Success then raise SDL_GL_Error with "Unable to load the default OpenGL library"; end if; end Load_Library; procedure Load_Library (Path : in String) is C_Name_Str : C.Strings.chars_ptr := C.Strings.New_String (Path); Result : C.int := SDL_GL_Load_Library (C_Name_Str); begin C.Strings.Free (C_Name_Str); if Result /= SDL.Success then raise SDL_GL_Error with "Unable to load OpenGL library """ & Path & '"'; end if; end Load_Library; procedure Unload_Library is procedure SDL_GL_Unload_Library with Import => True, Convention => C, External_Name => "SDL_GL_UnloadLibrary"; begin SDL_GL_Unload_Library; end Unload_Library; end SDL.Video.GL;
stcarrez/ada-awa
Ada
2,941
ads
----------------------------------------------------------------------- -- awa-votes-modules -- Module votes -- Copyright (C) 2013, 2014, 2018, 2020 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Applications; with ADO; with AWA.Modules; -- == Integration == -- To be able to use the `votes` module, you will need to add the -- following line in your GNAT project file: -- -- with "awa_votes"; -- -- The `Vote_Module` manages the votes on entities. It provides operations -- that are used by the vote beans or other services to vote for an item. -- An instance of the `Vote_Module` must be declared and registered -- in the AWA application. -- -- The module instance can be defined as follows: -- -- type Application is new AWA.Applications.Application with record -- Vote_Module : aliased AWA.Votes.Modules.Vote_Module; -- end record; -- -- And registered in the `Initialize_Modules` procedure by using: -- -- Register (App => App.Self.all'Access, -- Name => AWA.Votes.Modules.NAME, -- URI => "votes", -- Module => App.Vote_Module'Access); -- package AWA.Votes.Modules is -- The name under which the module is registered. NAME : constant String := "votes"; -- ------------------------------ -- Module votes -- ------------------------------ type Vote_Module is new AWA.Modules.Module with private; type Vote_Module_Access is access all Vote_Module'Class; -- Initialize the votes module. overriding procedure Initialize (Plugin : in out Vote_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config); -- Get the votes module. function Get_Vote_Module return Vote_Module_Access; -- Vote for the given element and return the total vote for that element. procedure Vote_For (Model : in Vote_Module; Id : in ADO.Identifier; Entity_Type : in String; Permission : in String; Value : in Integer; Total : out Integer); private type Vote_Module is new AWA.Modules.Module with null record; end AWA.Votes.Modules;
albertklee/SPARKZumo
Ada
5,476
ads
pragma SPARK_Mode; with Interfaces.C; use Interfaces.C; with Proc_Types; use Proc_Types; with Types; use Types; -- @summary -- This package exposes many Arduino runtime routines to Ada -- -- @description -- This package imports all of the necessary Arduino runtime library calls -- that are needed. -- package Sparkduino is -- Configures the specified pin to behave either as an input or an output -- @param Pin the number of the pin whose mode you wish to set -- @param Mode use PinMode'Pos (io_mode) where io_mode is of type PinMode -- see Types package for more info procedure SetPinMode (Pin : Pin_Type; Mode : unsigned) with Global => null; pragma Import (C, SetPinMode, "pinMode"); -- Write a HIGH or a LOW value to a digital pin. -- @param Pin the pin number -- @param Val use DigPinValue'Pos (state) where state is of type -- DigPinValue see Types package for more info procedure DigitalWrite (Pin : Pin_Type; Val : unsigned) with Global => null; pragma Import (C, DigitalWrite, "digitalWrite"); -- Reads the value from a specified digital pin, either HIGH or LOW. -- @param Pin the number of the digital pin you want to read -- @return an Integer that maps to HIGH or LOW with DigPinValue'Pos function DigitalRead (Pin : Pin_Type) return Integer with Global => null; pragma Import (C, DigitalRead, "digitalRead"); -- Writes an analog value to a pin -- @param Pin the pin to write to -- @param Val the duty cycle: between 0 (always off) and 255 (always on) procedure AnalogWrite (Pin : Pin_Type; Val : unsigned) with Global => null; pragma Import (C, AnalogWrite, "analogWrite"); -- Sets the resolution of the analogWrite() function -- @param Resolution determines the resolution (in bits) of the values -- used in the analogWrite() function. The value can range from 1 to 32. -- If you choose a resolution high or lower than your board's hardware -- capabilities, the value used in analogWrite () will be either -- truncated if its too high or padded with zeros if its too low procedure AnalogWriteResolution (Resolution : Integer) with Global => null; pragma Import (C, AnalogWriteResolution, "analogWriteResolution"); -- Returns the number of milliseconds since the Arduino board began running -- the current program. This number will overflow (go back to zero), -- after approximately 50 days. -- @return Number of milliseconds since the program started (unsigned long) function Millis return unsigned_long with Global => null; pragma Import (C, Millis, "millis"); -- Returns the number of microseconds since the Arduino board began -- running the current program. This number will overflow -- (go back to zero), after approximately 70 minutes. On 16 MHz Arduino -- boards (e.g. Duemilanove and Nano), this function has a resolution of -- four microseconds (i.e. the value returned is always a multiple of -- four). On 8 MHz Arduino boards (e.g. the LilyPad), this function has -- a resolution of eight microseconds. -- @return Returns the number of microseconds since the Arduino board began -- running the current program. (unsigned long) function Micros return unsigned_long with Global => null; pragma Import (C, Micros, "micros"); -- Pauses the program for the amount of time -- @param Time the number of microseconds to pause procedure DelayMicroseconds (Time : unsigned) with Global => null; pragma Import (C, DelayMicroseconds, "delayMicroseconds"); -- Pauses the program for the amount of time (in milliseconds) -- @param Time the number of milliseconds to pause procedure SysDelay (Time : unsigned_long) with Global => null; pragma Import (C, SysDelay, "delay"); -- Print a string to the serial console -- @param Msg the string to print procedure Serial_Print (Msg : String); -- Print a byte to the serial console -- @param Msg the string to prepend -- @param Val the byte to print procedure Serial_Print_Byte (Msg : String; Val : Byte); -- Print a short to the serial console -- @param Msg the string to prepend -- @param Val the short to print procedure Serial_Print_Short (Msg : String; Val : short); -- Print a float to the serial console -- @param Msg the string to prepend -- @param Val the float to print procedure Serial_Print_Float (Msg : String; Val : Float); -- Print the format calibration data to the serial console -- @param Index the specific sensor calibration data to print -- @param Min the min sensor value in the calibration record -- @param Max the max sensor value in the calibration record procedure Serial_Print_Calibration (Index : Integer; Min : Sensor_Value; Max : Sensor_Value); pragma Import (C, Serial_Print_Calibration, "Serial_Print_Calibration"); -- analog pin mappings A0 : constant := 14; A1 : constant := 15; A2 : constant := 16; A3 : constant := 17; A4 : constant := 18; A5 : constant := 19; A6 : constant := 20; A7 : constant := 21; end Sparkduino;
fmqa/simulatedannealing-ada
Ada
275
ads
with Bitmaps.RGB; package ImageOps is function Manhattan_Distance (A, B : in Bitmaps.RGB.Pixel) return Natural; function Adj_Distance_Sum (Source : in Bitmaps.RGB.Image) return Long_Integer; procedure Noise (Target : in out Bitmaps.RGB.Image); end ImageOps;
Tim-Tom/scratch
Ada
888
ads
with Ada.Strings.Bounded; package Trie is package BoundedString is new Ada.Strings.Bounded.Generic_Bounded_Length(Max => 16); type Trie is private; type Fragment_Endpoints is record first, last : Positive; end record; type Fragment_Endpoint_Array is Array(Positive range <>) of Fragment_Endpoints; function Make_Trie(filename : String) return Trie; procedure Find_Words(words : Trie; fragments: String; endpoints: Fragment_Endpoint_Array); private type Trie_Node; type Trie_Node_Access is access Trie_Node; type Trie_Descendant is Array (Character range 'a' .. 'z') of Trie_Node_Access; type Trie_Node is record is_terminal : Boolean; word : BoundedString.Bounded_String; children : Trie_Descendant; end record; type Trie is record root : Trie_Node_Access; node_count : Natural; end record; end Trie;
ptrebuc/ewok-kernel
Ada
2,508
ads
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok.tasks_shared; use ewok.tasks_shared; with ewok.syscalls; with soc.interrupts; with rings; package ewok.softirq with spark_mode => off is type t_state is (DONE, WAITING); type t_isr_parameters is record handler : system_address; interrupt : soc.interrupts.t_interrupt; posthook_status : unsigned_32; posthook_data : unsigned_32; end record; type t_isr_request is record caller_id : ewok.tasks_shared.t_task_id; state : t_state; params : t_isr_parameters; end record; type t_syscall_request is record caller_id : ewok.tasks_shared.t_task_id; svc : ewok.syscalls.t_svc; state : t_state; end record; -- softirq input queue depth. Can be configured depending -- on the devices behavior (IRQ bursts) -- defaulting to 20 (see Kconfig) MAX_QUEUE_SIZE : constant := $CONFIG_KERNEL_SOFTIRQ_QUEUE_DEPTH; package p_isr_requests is new rings (t_isr_request, MAX_QUEUE_SIZE); use p_isr_requests; isr_queue : p_isr_requests.ring; package p_syscall_requests is new rings (t_syscall_request, MAX_QUEUE_SIZE); use p_syscall_requests; syscall_queue : p_syscall_requests.ring; procedure init; procedure push_isr (task_id : in ewok.tasks_shared.t_task_id; params : in t_isr_parameters); procedure push_syscall (task_id : in ewok.tasks_shared.t_task_id; svc : in ewok.syscalls.t_svc); procedure syscall_handler (req : in t_syscall_request); procedure isr_handler (req : in t_isr_request); procedure main_task; private previous_isr_owner : t_task_id := ID_UNUSED; end ewok.softirq;
BrickBot/Bound-T-H8-300
Ada
2,284
ads
-- String_Pool.Opt -- -- Command-line options for String_Pool and String_Sets. -- -- A component of the Bound-T Worst-Case Execution Time Tool. -- ------------------------------------------------------------------------------- -- Copyright (c) 1999 .. 2015 Tidorum Ltd -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above copyright notice, -- this list of conditions and the following disclaimer in the documentation -- and/or other materials provided with the distribution. -- -- This software is provided by the copyright holders and contributors "as is" and -- any express or implied warranties, including, but not limited to, the implied -- warranties of merchantability and fitness for a particular purpose are -- disclaimed. In no event shall the copyright owner or contributors be liable for -- any direct, indirect, incidental, special, exemplary, or consequential damages -- (including, but not limited to, procurement of substitute goods or services; -- loss of use, data, or profits; or business interruption) however caused and -- on any theory of liability, whether in contract, strict liability, or tort -- (including negligence or otherwise) arising in any way out of the use of this -- software, even if advised of the possibility of such damage. -- -- Other modules (files) of this software composition should contain their -- own copyright statements, which may have different copyright and usage -- conditions. The above conditions apply to this file. ------------------------------------------------------------------------------- -- -- $Revision: 1.2 $ -- $Date: 2015/10/24 19:36:53 $ -- -- $Log: string_pool-opt.ads,v $ -- Revision 1.2 2015/10/24 19:36:53 niklas -- Moved to free licence. -- -- Revision 1.1 2007-01-25 21:25:20 niklas -- BT-CH-0043. -- package String_Pool.Opt is Deallocate : Boolean := True; -- -- Whether to use Unchecked_Deallocation to release unused -- heap memory. end String_Pool.Opt;
sungyeon/drake
Ada
520
ads
pragma License (Unrestricted); -- runtime unit specialized for POSIX (Darwin, FreeBSD, or Linux) package System.Termination is pragma Preelaborate; -- write to standard error output procedure Error_Put_Line (S : String); -- force to abort procedure Force_Abort; pragma No_Return (Force_Abort); -- register exit handler type Exit_Handler is access procedure; pragma Favor_Top_Level (Exit_Handler); procedure Register_Exit (Handler : not null Exit_Handler); end System.Termination;
reznikmm/matreshka
Ada
3,724
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Table_Member_Type_Attributes is pragma Preelaborate; type ODF_Table_Member_Type_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Table_Member_Type_Attribute_Access is access all ODF_Table_Member_Type_Attribute'Class with Storage_Size => 0; end ODF.DOM.Table_Member_Type_Attributes;
onox/sdlada
Ada
20,090
adb
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2018 Luke A. Guest -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- -- 3. This notice may not be removed or altered from any source -- distribution. -------------------------------------------------------------------------------------------------------------------- with Ada.Unchecked_Conversion; with SDL.Error; package body SDL.Video.Surfaces is use type C.int; function Pixel_Format (Self : in Surface) return Pixel_Formats.Pixel_Format_Access is begin return Self.Internal.Pixel_Format; end Pixel_Format; function Size (Self : in Surface) return SDL.Sizes is begin return SDL.Sizes'(Self.Internal.Width, Self.Internal.Height); end Size; function Pixels (Self : in Surface) return System.Address is use type C.int; begin if Must_Lock (Self) and then Self.Internal.Locked <= 0 then raise Surface_Error with "Surface must be locked before access can be gained to the pixel data."; end if; return Self.Internal.Pixels; end Pixels; package body User_Data is function Convert is new Ada.Unchecked_Conversion (Source => Data_Pointer, Target => User_Data_Pointer); function Convert is new Ada.Unchecked_Conversion (Source => User_Data_Pointer, Target => Data_Pointer); function Get (Self : in Surface) return Data_Pointer is begin return Convert (Self.Internal.User_Data); end Get; procedure Set (Self : in out Surface; Data : in Data_Pointer) is begin Self.Internal.User_Data := Convert (Data); end Set; end User_Data; procedure Blit (Self : in out Surface; Source : in Surface) is function SDL_Blit_Surface (S : in Internal_Surface_Pointer; SR : access Rectangles.Rectangle; D : in Internal_Surface_Pointer; DR : access Rectangles.Rectangle) return C.int with Import => True, Convention => C, External_Name => "SDL_UpperBlit"; -- SDL_BlitSurface is a macro in SDL_surface.h Result : C.int := SDL_Blit_Surface (Source.Internal, null, Self.Internal, null); begin if Result /= SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Blit; procedure Blit (Self : in out Surface; Self_Area : in out Rectangles.Rectangle; Source : in Surface; Source_Area : in out Rectangles.Rectangle) is function SDL_Blit_Surface (S : in Internal_Surface_Pointer; SR : access Rectangles.Rectangle; D : in Internal_Surface_Pointer; DR : access Rectangles.Rectangle) return C.int with Import => True, Convention => C, External_Name => "SDL_UpperBlit"; -- SDL_BlitSurface is a macro in SDL_surface.h use type Rectangles.Rectangle; Result : C.int := 0; Src_Area : aliased Rectangles.Rectangle := Source_Area; Dest_Area : aliased Rectangles.Rectangle := Self_Area; begin if Dest_Area = Rectangles.Null_Rectangle then if Src_Area = Rectangles.Null_Rectangle then Result := SDL_Blit_Surface (Source.Internal, null, Self.Internal, null); else Result := SDL_Blit_Surface (Source.Internal, Src_Area'Access, Self.Internal, null); Source_Area := Src_Area; end if; else if Src_Area = Rectangles.Null_Rectangle then Result := SDL_Blit_Surface (Source.Internal, null, Self.Internal, Dest_Area'Access); else Result := SDL_Blit_Surface (Source.Internal, Src_Area'Access, Self.Internal, Dest_Area'Access); Source_Area := Src_Area; end if; Self_Area := Dest_Area; end if; if Result /= SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Blit; procedure Blit_Scaled (Self : in out Surface; Source : in Surface) is function SDL_Blit_Scaled (S : in Internal_Surface_Pointer; SR : access Rectangles.Rectangle; D : in Internal_Surface_Pointer; DR : access Rectangles.Rectangle) return C.int with Import => True, Convention => C, External_Name => "SDL_UpperBlitScaled"; -- SDL_BlitScaled is a macro in SDL_surface.h Result : C.int := SDL_Blit_Scaled (Source.Internal, null, Self.Internal, null); begin if Result /= SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Blit_Scaled; -- Blit_Scaled -- -- Self : The destination surface to blit onto. -- Self_Area : The coordinates and size of the area to blit into. -- Source : The surface to blit onto Self. -- Source_Area : The coordinates and size of the area to blit from. procedure Blit_Scaled (Self : in out Surface; Self_Area : in out Rectangles.Rectangle; Source : in Surface; Source_Area : in Rectangles.Rectangle := Rectangles.Null_Rectangle) is function SDL_Blit_Scaled (S : in Internal_Surface_Pointer; SR : access Rectangles.Rectangle; D : in Internal_Surface_Pointer; DR : access Rectangles.Rectangle) return C.int with Import => True, Convention => C, External_Name => "SDL_UpperBlitScaled"; -- SDL_BlitScaled is a macro in SDL_surface.h use type Rectangles.Rectangle; Result : C.int := 0; Area : aliased Rectangles.Rectangle := Self_Area; Src_Area : aliased Rectangles.Rectangle := Source_Area; begin if Self_Area = Rectangles.Null_Rectangle then if Source_Area = Rectangles.Null_Rectangle then Result := SDL_Blit_Scaled (Source.Internal, null, Self.Internal, null); else Result := SDL_Blit_Scaled (Source.Internal, Src_Area'Access, Self.Internal, null); end if; else if Source_Area = Rectangles.Null_Rectangle then Result := SDL_Blit_Scaled (Source.Internal, null, Self.Internal, Area'Access); else Result := SDL_Blit_Scaled (Source.Internal, Src_Area'Access, Self.Internal, Area'Access); end if; Self_Area := Area; end if; if Result /= SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Blit_Scaled; procedure Lower_Blit (Self : in out Surface; Self_Area : in Rectangles.Rectangle; Source : in Surface; Source_Area : in Rectangles.Rectangle) is function SDL_Lower_Blit (S : in Internal_Surface_Pointer; SR : in Rectangles.Rectangle; D : in Internal_Surface_Pointer; DR : in Rectangles.Rectangle) return C.int with Import => True, Convention => C, External_Name => "SDL_LowerBlit"; Result : C.int := SDL_Lower_Blit (Source.Internal, Source_Area, Self.Internal, Self_Area); begin if Result /= SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Lower_Blit; procedure Lower_Blit_Scaled (Self : in out Surface; Self_Area : in Rectangles.Rectangle; Source : in Surface; Source_Area : in Rectangles.Rectangle) is function SDL_Lower_Blit_Scaled (S : in Internal_Surface_Pointer; SR : in Rectangles.Rectangle; D : in Internal_Surface_Pointer; DR : in Rectangles.Rectangle) return C.int with Import => True, Convention => C, External_Name => "SDL_LowerBlitScaled"; Result : C.int := SDL_Lower_Blit_Scaled (Source.Internal, Source_Area, Self.Internal, Self_Area); begin if Result /= SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Lower_Blit_Scaled; procedure Fill (Self : in out Surface; Area : in Rectangles.Rectangle; Colour : in Interfaces.Unsigned_32) is function SDL_Fill_Rect (S : in Internal_Surface_Pointer; Rect : in Rectangles.Rectangle; Colour : in Interfaces.Unsigned_32) return C.int with Import => True, Convention => C, External_Name => "SDL_FillRect"; Result : C.int := SDL_Fill_Rect (Self.Internal, Area, Colour); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Fill; procedure Fill (Self : in out Surface; Areas : in Rectangles.Rectangle_Arrays; Colour : in Interfaces.Unsigned_32) is function SDL_Fill_Rects (S : in Internal_Surface_Pointer; Rects : in Rectangles.Rectangle_Arrays; Count : in C.int; Colour : in Interfaces.Unsigned_32) return C.int with Import => True, Convention => C, External_Name => "SDL_FillRects"; Result : C.int := SDL_Fill_Rects (Self.Internal, Areas, Areas'Length, Colour); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Fill; function Clip_Rectangle (Self : in Surface) return Rectangles.Rectangle is procedure SDL_Get_Clip_Rect (S : in Internal_Surface_Pointer; R : out Rectangles.Rectangle) with Import => True, Convention => C, External_Name => "SDL_GetClipRect"; begin return Result : Rectangles.Rectangle := Rectangles.Null_Rectangle do SDL_Get_Clip_Rect (Self.Internal, Result); end return; end Clip_Rectangle; procedure Set_Clip_Rectangle (Self : in out Surface; Now : in Rectangles.Rectangle) is function SDL_Set_Clip_Rect (S : in Internal_Surface_Pointer; R : in Rectangles.Rectangle) return SDL_Bool with Import => True, Convention => C, External_Name => "SDL_SetClipRect"; Result : SDL_Bool := SDL_Set_Clip_Rect (S => Self.Internal, R => Now); begin if Result = SDL_False then raise Surface_Error with SDL.Error.Get; end if; end Set_Clip_Rectangle; function Colour_Key (Self : in Surface) return Palettes.Colour is function SDL_Get_Color_Key (S : in Internal_Surface_Pointer; K : out Interfaces.Unsigned_32) return C.int with Import => True, Convention => C, External_Name => "SDL_GetColorKey"; Key : Interfaces.Unsigned_32; Result : C.int := SDL_Get_Color_Key (Self.Internal, Key); begin if Result < SDL.Success then -- TODO: The SDL source does not set an error message, see https://bugzilla.libsdl.org/show_bug.cgi?id=3992 raise Surface_Error with "No colour key set for this surface."; -- with SDL.Error.Get; end if; return Pixel_Formats.To_Colour (Pixel => Key, Format => Self.Pixel_Format); end Colour_Key; procedure Set_Colour_Key (Self : in out Surface; Now : in Palettes.Colour; Enable : in Boolean := True) is -- TODO: This can work as an "in out Internal_Surface" as the compiler will pass the object as a reference. -- Should the entire API use this? For review! function SDL_Set_Color_Key (S : in Internal_Surface_Pointer; F : in C.int; K : in Interfaces.Unsigned_32) return C.int with Import => True, Convention => C, External_Name => "SDL_SetColorKey"; Result : C.int := SDL_Set_Color_Key (S => Self.Internal, F => (if Enable then 1 else 0), K => Pixel_Formats.To_Pixel (Colour => Now, Format => Self.Pixel_Format)); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Set_Colour_Key; function Alpha_Blend (Self : in Surface) return Palettes.Colour_Component is function SDL_Get_Surface_Alpha_Mod (S : in Internal_Surface_Pointer; A : out Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_GetSurfaceAlphaMod"; Alpha : Palettes.Colour_Component; Result : C.int := SDL_Get_Surface_Alpha_Mod (S => Self.Internal, A => Alpha); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; return Alpha; end Alpha_Blend; procedure Set_Alpha_Blend (Self : in out Surface; Now : in Palettes.Colour_Component) is function SDL_Set_Surface_Alpha_Mod (S : in Internal_Surface_Pointer; A : in Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_SetSurfaceAlphaMod"; Result : C.int := SDL_Set_Surface_Alpha_Mod (S => Self.Internal, A => Now); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Set_Alpha_Blend; function Blend_Mode (Self : in Surface) return Blend_Modes is function SDL_Get_Surface_Blend_Mode (S : in Internal_Surface_Pointer; B : out Blend_Modes) return C.int with Import => True, Convention => C, External_Name => "SDL_GetSurfaceAlphaMod"; Blend_Mode : Blend_Modes; Result : C.int := SDL_Get_Surface_Blend_Mode (S => Self.Internal, B => Blend_Mode); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; return Blend_Mode; end Blend_Mode; procedure Set_Blend_Mode (Self : in out Surface; Now : in Blend_Modes) is function SDL_Set_Surface_Blend_Mode (S : in Internal_Surface_Pointer; B : in Blend_Modes) return C.int with Import => True, Convention => C, External_Name => "SDL_SetSurfaceBlendMode"; Result : C.int := SDL_Set_Surface_Blend_Mode (S => Self.Internal, B => Now); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Set_Blend_Mode; function Colour (Self : in Surface) return Palettes.RGB_Colour is function SDL_Get_Surface_Color_Mod (S : in Internal_Surface_Pointer; R : out Palettes.Colour_Component; G : out Palettes.Colour_Component; B : out Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_GetSurfaceColorMod"; Red : Palettes.Colour_Component; Green : Palettes.Colour_Component; Blue : Palettes.Colour_Component; Result : C.int := SDL_Get_Surface_Color_Mod (S => Self.Internal, R => Red, G => Green, B => Blue); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; return (Red, Green, Blue); end Colour; procedure Set_Colour (Self : in out Surface; Now : in Palettes.RGB_Colour) is function SDL_Set_Surface_Color_Mod (S : in Internal_Surface_Pointer; R : in Palettes.Colour_Component; G : in Palettes.Colour_Component; B : in Palettes.Colour_Component) return C.int with Import => True, Convention => C, External_Name => "SDL_SetSurfaceColorMod"; Result : C.int := SDL_Set_Surface_Color_Mod (S => Self.Internal, R => Now.Red, G => Now.Green, B => Now.Blue); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Set_Colour; procedure Lock (Self : in out Surface) is function SDL_Lock_Surface (Self : in Internal_Surface_Pointer) return C.int with Import => True, Convention => C, External_Name => "SDL_LockSurface"; Result : C.int := SDL_Lock_Surface (Self.Internal); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Lock; procedure Unlock (Self : in out Surface) is procedure SDL_Unlock_Surface (Self : in Internal_Surface_Pointer) with Import => True, Convention => C, External_Name => "SDL_UnlockSurface"; begin SDL_Unlock_Surface (Self.Internal); end Unlock; procedure Set_RLE (Self : in out Surface; Enabled : in Boolean) is function SDL_Set_Surface_RLE (Self : in Internal_Surface_Pointer; Enabled : in C.int) return C.int with Import => True, Convention => C, External_Name => "SDL_SetSurfaceRLE"; Result : C.int := SDL_Set_Surface_RLE (Self.Internal, C.int (if Enabled then 1 else 0)); begin if Result < SDL.Success then raise Surface_Error with SDL.Error.Get; end if; end Set_RLE; -- This is equivalent to the macro SDL_MUSTLOCK in SDL_surface.h. function Must_Lock (Self : in Surface) return Boolean is begin return (Self.Internal.Flags and RLE_Encoded) = RLE_Encoded; end Must_Lock; overriding procedure Adjust (Self : in out Surface) is begin -- if Self.Internal.Flags and Dont_Free = Dont_Free then -- end if; if Self.Internal /= null and Self.Owns then Self.Internal.Reference_Count := Self.Internal.Reference_Count + 1; end if; end Adjust; overriding procedure Finalize (Self : in out Surface) is procedure SDL_Free_Surface (S : in Internal_Surface_Pointer) with Import => True, Convention => C, External_Name => "SDL_FreeSurface"; begin if Self.Internal /= null and then Self.Owns then SDL_Free_Surface (Self.Internal); end if; end Finalize; end SDL.Video.Surfaces;
dkm/atomic
Ada
22,402
adb
with System; package body Atomic.Signed with SPARK_Mode => Off is ---------- -- Load -- ---------- function Load (This : aliased Instance; Order : Mem_Order := Seq_Cst) return T is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_load_1"); function Intrinsic16 (Ptr : System.Address; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_load_2"); function Intrinsic32 (Ptr : System.Address; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_load_4"); function Intrinsic64 (Ptr : System.Address; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_load_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => return Intrinsic8 (This'Address, Order'Enum_Rep); when 16 => return Intrinsic16 (This'Address, Order'Enum_Rep); when 32 => return Intrinsic32 (This'Address, Order'Enum_Rep); when 64 => return Intrinsic64 (This'Address, Order'Enum_Rep); when others => raise Program_Error; end case; end Load; ----------- -- Store -- ----------- procedure Store (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) is pragma Warnings (Off); procedure Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer); pragma Import (Intrinsic, Intrinsic8, "__atomic_store_1"); procedure Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer); pragma Import (Intrinsic, Intrinsic16, "__atomic_store_2"); procedure Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer); pragma Import (Intrinsic, Intrinsic32, "__atomic_store_4"); procedure Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer); pragma Import (Intrinsic, Intrinsic64, "__atomic_store_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Store; --------- -- Add -- --------- procedure Add (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) is Unused : T; pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_add_fetch_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_add_fetch_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_add_fetch_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_add_fetch_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Unused := Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Unused := Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Unused := Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Unused := Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Add; --------- -- Sub -- --------- procedure Sub (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) is Unused : T; pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_sub_fetch_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_sub_fetch_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_sub_fetch_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_sub_fetch_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Unused := Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Unused := Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Unused := Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Unused := Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Sub; -- SPARK compatible -- -------------- -- Exchange -- -------------- procedure Exchange (This : aliased in out Instance; Val : T; Old : out T; Order : Mem_Order := Seq_Cst) is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_exchange_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_exchange_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_exchange_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_exchange_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Old := Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Old := Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Old := Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Old := Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Exchange; ---------------------- -- Compare_Exchange -- ---------------------- procedure Compare_Exchange (This : aliased in out Instance; Expected : T; Desired : T; Weak : Boolean; Success : out Boolean; Success_Order : Mem_Order := Seq_Cst; Failure_Order : Mem_Order := Seq_Cst) is pragma Warnings (Off); function Intrinsic8 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic8, "__atomic_compare_exchange_1"); function Intrinsic16 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic16, "__atomic_compare_exchange_2"); function Intrinsic32 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic32, "__atomic_compare_exchange_4"); function Intrinsic64 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic64, "__atomic_compare_exchange_8"); pragma Warnings (On); Exp : T := Expected; begin case T'Object_Size is when 8 => Success := Intrinsic8 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when 16 => Success := Intrinsic16 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when 32 => Success := Intrinsic32 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when 64 => Success := Intrinsic64 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when others => raise Program_Error; end case; end Compare_Exchange; --------------- -- Add_Fetch -- --------------- procedure Add_Fetch (This : aliased in out Instance; Val : T; Result : out T; Order : Mem_Order := Seq_Cst) is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_add_fetch_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_add_fetch_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_add_fetch_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_add_fetch_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Result := Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Result := Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Result := Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Result := Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Add_Fetch; --------------- -- Sub_Fetch -- --------------- procedure Sub_Fetch (This : aliased in out Instance; Val : T; Result : out T; Order : Mem_Order := Seq_Cst) is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_sub_fetch_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_sub_fetch_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_sub_fetch_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_sub_fetch_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Result := Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Result := Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Result := Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Result := Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Sub_Fetch; --------------- -- Fetch_Add -- --------------- procedure Fetch_Add (This : aliased in out Instance; Val : T; Result : out T; Order : Mem_Order := Seq_Cst) is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_fetch_add_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_fetch_add_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_fetch_add_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_fetch_add_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Result := Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Result := Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Result := Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Result := Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Fetch_Add; --------------- -- Fetch_Sub -- --------------- procedure Fetch_Sub (This : aliased in out Instance; Val : T; Result : out T; Order : Mem_Order := Seq_Cst) is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_fetch_sub_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_fetch_sub_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_fetch_sub_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_fetch_sub_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => Result := Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => Result := Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => Result := Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => Result := Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Fetch_Sub; -- NOT SPARK Compatible -- -------------- -- Exchange -- -------------- function Exchange (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) return T is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_exchange_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_exchange_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_exchange_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_exchange_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => return Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => return Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => return Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => return Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Exchange; ---------------------- -- Compare_Exchange -- ---------------------- function Compare_Exchange (This : aliased in out Instance; Expected : T; Desired : T; Weak : Boolean; Success_Order : Mem_Order := Seq_Cst; Failure_Order : Mem_Order := Seq_Cst) return Boolean is pragma Warnings (Off); function Intrinsic8 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic8, "__atomic_compare_exchange_1"); function Intrinsic16 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic16, "__atomic_compare_exchange_2"); function Intrinsic32 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic32, "__atomic_compare_exchange_4"); function Intrinsic64 (Ptr, Expected : System.Address; Desired : T; Weak : Boolean; Success_Order, Failure_Order : Integer) return Boolean; pragma Import (Intrinsic, Intrinsic64, "__atomic_compare_exchange_8"); pragma Warnings (On); Exp : T := Expected; begin case T'Object_Size is when 8 => return Intrinsic8 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when 16 => return Intrinsic16 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when 32 => return Intrinsic32 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when 64 => return Intrinsic64 (This'Address, Exp'Address, Desired, Weak, Success_Order'Enum_Rep, Failure_Order'Enum_Rep); when others => raise Program_Error; end case; end Compare_Exchange; --------------- -- Add_Fetch -- --------------- function Add_Fetch (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) return T is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_add_fetch_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_add_fetch_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_add_fetch_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_add_fetch_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => return Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => return Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => return Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => return Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Add_Fetch; --------------- -- Sub_Fetch -- --------------- function Sub_Fetch (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) return T is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_sub_fetch_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_sub_fetch_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_sub_fetch_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_sub_fetch_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => return Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => return Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => return Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => return Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Sub_Fetch; --------------- -- Fetch_Add -- --------------- function Fetch_Add (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) return T is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_fetch_add_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_fetch_add_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_fetch_add_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_fetch_add_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => return Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => return Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => return Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => return Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Fetch_Add; --------------- -- Fetch_Sub -- --------------- function Fetch_Sub (This : aliased in out Instance; Val : T; Order : Mem_Order := Seq_Cst) return T is pragma Warnings (Off); function Intrinsic8 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic8, "__atomic_fetch_sub_1"); function Intrinsic16 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic16, "__atomic_fetch_sub_2"); function Intrinsic32 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic32, "__atomic_fetch_sub_4"); function Intrinsic64 (Ptr : System.Address; Val : T; Model : Integer) return T; pragma Import (Intrinsic, Intrinsic64, "__atomic_fetch_sub_8"); pragma Warnings (On); begin case T'Object_Size is when 8 => return Intrinsic8 (This'Address, Val, Order'Enum_Rep); when 16 => return Intrinsic16 (This'Address, Val, Order'Enum_Rep); when 32 => return Intrinsic32 (This'Address, Val, Order'Enum_Rep); when 64 => return Intrinsic64 (This'Address, Val, Order'Enum_Rep); when others => raise Program_Error; end case; end Fetch_Sub; end Atomic.Signed;
reznikmm/matreshka
Ada
3,654
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Elements; package ODF.DOM.Table_Title_Elements is pragma Preelaborate; type ODF_Table_Title is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Table_Title_Access is access all ODF_Table_Title'Class with Storage_Size => 0; end ODF.DOM.Table_Title_Elements;
persan/a-cups
Ada
86
ads
package CUPS is type Job_Id is new Natural; Cups_Error : exception; end CUPS;
reznikmm/matreshka
Ada
4,648
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Style.Rotation_Align_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Rotation_Align_Attribute_Node is begin return Self : Style_Rotation_Align_Attribute_Node do Matreshka.ODF_Style.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Style_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Rotation_Align_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Rotation_Align_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Style_URI, Matreshka.ODF_String_Constants.Rotation_Align_Attribute, Style_Rotation_Align_Attribute_Node'Tag); end Matreshka.ODF_Style.Rotation_Align_Attributes;
PThierry/ewok-kernel
Ada
36
adb
../stm32f439/soc-gpio-interfaces.adb
Tim-Tom/project-euler
Ada
3,564
adb
with Ada.Text_IO; with BigInteger; package body Problem_55 is package IO renames Ada.Text_IO; type Lychrel is (Unknown, True, False); Is_Lychrel_Cache : Array (Long_Long_Integer range 1 .. 10_000) of Lychrel := (others => Unknown); function Reverse_String(input : string) return String is result : string(input'Range); begin for i in input'range loop result(result'Last - i + input'First) := input(i); end loop; return result; end Reverse_String; function Is_Lychrel(num : Integer) return Boolean is function "+"(left, right : BigInteger.BigInt) return BigInteger.BigInt renames BigInteger."+"; function Check_Lychrel(num : BigInteger.BigInt; count : Positive) return Lychrel is procedure Reverse_Big_Int(reversed : out BigInteger.BigInt; same : out Boolean) is str : constant String := BigInteger.ToString(num); rev : constant String := Reverse_String(str); begin if str = rev then same := True; else same := False; reversed := BigInteger.Create(rev); end if; end; reversed : BigInteger.BigInt; same : Boolean; begin if count = 50 then return False; else Reverse_Big_Int(reversed, same); if same then return True; else return Check_Lychrel(reversed + num, count + 1); end if; end if; end Check_Lychrel; function Check_Lychrel(num : Long_Long_Integer; count : Natural) return Lychrel is function Reverse_Num return Long_Long_Integer is part : Long_Long_Integer := num; reversed : Long_Long_Integer := 0; begin while part > 0 loop reversed := reversed * 10 + (part mod 10); part := part / 10; end loop; return reversed; end; function Insert_Cache(result : Lychrel) return Lychrel is begin if num <= Is_Lychrel_Cache'Last then Is_Lychrel_Cache(num) := result; end if; return result; end Insert_Cache; begin if num <= Is_Lychrel_Cache'Last and then Is_Lychrel_Cache(num) /= Unknown then return Is_Lychrel_Cache(num); elsif count = 50 then return Insert_Cache(False); else declare reversed : constant Long_Long_Integer := Reverse_Num; begin if count > 1 and reversed = num then return True; elsif Long_Long_Integer'Last - num > reversed then return Insert_Cache(Check_Lychrel(num + reversed, count + 1)); else return Check_Lychrel(BigInteger.Create(num) + BigInteger.Create(reversed), count + 1); end if; end; end if; end Check_Lychrel; begin case(Check_Lychrel(Long_Long_Integer(num), 0)) is when True => return True; when False => return False; when Others => raise Constraint_Error; end case; end Is_Lychrel; procedure Solve is count : Natural := 0; begin for num in 1 .. 10_000 loop if Is_Lychrel(num) then count := count + 1; else null; end if; end loop; IO.Put(Natural'Image(count)); end Solve; end Problem_55;
AdaCore/libadalang
Ada
179
adb
pragma Restrictions(No_Elaboration_Code); package body Foo is procedure Set_X (V : Myint) is begin X := V; -- # body end; procedure Do_Stuff is separate; end;
AdaCore/ada-traits-containers
Ada
629
adb
-- -- Copyright (C) 2016, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- pragma Ada_2012; with Conts.Lists.Indefinite_Unbounded; with Support; procedure Main is package Int_Lists is new Conts.Lists.Indefinite_Unbounded (Integer); function Image (R : Int_Lists.Constant_Returned) return String is (Integer'Image (R)); package Tests is new Support (Image => Image, Elements => Int_Lists.Elements.Traits, Storage => Int_Lists.Storage.Traits, Lists => Int_Lists.Lists); L1, L2 : Int_Lists.List; begin Tests.Test (L1, L2); end Main;
stcarrez/ada-util
Ada
3,231
ads
----------------------------------------------------------------------- -- util-streams-files -- File Stream utilities -- Copyright (C) 2010, 2013, 2015, 2017, 2018, 2019, 2023 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with Ada.Streams.Stream_IO; -- == File streams == -- The `Util.Streams.Files` package provides input and output streams that access -- files on top of the Ada `Stream_IO` standard package. The `File_Stream` implements -- both the `Input_Stream` and `Output_Stream` interfaces. The stream is opened -- by using the `Open` or `Create` procedures. -- -- with Util.Streams.Files; -- ... -- In_Stream : Util.Streams.Files.File_Stream; -- In_Stream.Open (Mode => Ada.Streams.Stream_IO.In_File, "cert.pem"); -- package Util.Streams.Files is -- ----------------------- -- File stream -- ----------------------- -- The <b>File_Stream</b> is an output/input stream that reads or writes -- into a file-based stream. type File_Stream is limited new Output_Stream and Input_Stream with private; -- Open the file and initialize the stream for reading or writing. procedure Open (Stream : in out File_Stream; Mode : in Ada.Streams.Stream_IO.File_Mode; Name : in String := ""; Form : in String := ""); -- Create the file and initialize the stream for writing. procedure Create (Stream : in out File_Stream; Mode : in Ada.Streams.Stream_IO.File_Mode; Name : in String := ""; Form : in String := ""); -- Close the stream. overriding procedure Close (Stream : in out File_Stream); -- Write the buffer array to the output stream. overriding procedure Write (Stream : in out File_Stream; Buffer : in Ada.Streams.Stream_Element_Array); -- Read into the buffer as many bytes as possible and return in -- <b>last</b> the position of the last byte read. overriding procedure Read (Stream : in out File_Stream; Into : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset); private type File_Stream is limited new Ada.Finalization.Limited_Controlled and Output_Stream and Input_Stream with record File : Ada.Streams.Stream_IO.File_Type; end record; -- Flush the stream and release the buffer. overriding procedure Finalize (Object : in out File_Stream); end Util.Streams.Files;
AdaCore/ada-traits-containers
Ada
970
adb
-- -- Copyright (C) 2015-2016, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- package body Memory is ----------- -- Reset -- ----------- procedure Reset is begin Current := (Total_Allocated => 0, Allocs => 0, Frees => 0, Reallocs => 0); end Reset; --------- -- "-" -- --------- function "-" (M1, M2 : Mem_Info) return Mem_Info is begin return (Total_Allocated => M1.Total_Allocated - M2.Total_Allocated, Allocs => M1.Allocs - M2.Allocs, Frees => M1.Frees - M2.Frees, Reallocs => M1.Reallocs - M2.Reallocs); end "-"; ----------- -- Pause -- ----------- procedure Pause is begin Paused := True; end Pause; ------------- -- Unpause -- ------------- procedure Unpause is begin Paused := False; end Unpause; end Memory;
reznikmm/matreshka
Ada
3,630
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.UML.Send_Signal_Actions.Hash is new AMF.Elements.Generic_Hash (UML_Send_Signal_Action, UML_Send_Signal_Action_Access);
stcarrez/ada-util
Ada
1,257
ads
----------------------------------------------------------------------- -- util-systems-dlls-tests -- Unit tests for shared libraries -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Systems.DLLs.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test the loading a shared library. procedure Test_Load (T : in out Test); -- Test getting a shared library symbol. procedure Test_Get_Symbol (T : in out Test); end Util.Systems.DLLs.Tests;
AdaCore/langkit
Ada
691
adb
with Langkit_Support.Adalog.Main_Support; use Langkit_Support.Adalog.Main_Support; procedure Main is use T_Solver, Refs; X : constant Refs.Logic_Var := Create ("X"); Y : constant Refs.Logic_Var := Create ("Y"); Ors : constant Relation := "or" (Domain (X, (1, 2, 3, 4, 5, 6)), "or" (Domain (Y, (10, 11)), "or" (R_Any ((1 => Logic_False)), "or" (R_Any (No_Relation_Array), R_All (No_Relation_Array))))); R : constant Relation := "and" (Ors, "and" (X = Y, "and" (R_Any ((1 => Logic_True)), R_All ((1 => Logic_True))))); begin Solve_All (R); end Main;
optikos/oasis
Ada
4,360
adb
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Program.Nodes.Index_Constraints is function Create (Left_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Ranges : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Right_Bracket_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Index_Constraint is begin return Result : Index_Constraint := (Left_Bracket_Token => Left_Bracket_Token, Ranges => Ranges, Right_Bracket_Token => Right_Bracket_Token, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Ranges : not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Index_Constraint is begin return Result : Implicit_Index_Constraint := (Ranges => Ranges, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Ranges (Self : Base_Index_Constraint) return not null Program.Elements.Discrete_Ranges .Discrete_Range_Vector_Access is begin return Self.Ranges; end Ranges; overriding function Left_Bracket_Token (Self : Index_Constraint) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Left_Bracket_Token; end Left_Bracket_Token; overriding function Right_Bracket_Token (Self : Index_Constraint) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Right_Bracket_Token; end Right_Bracket_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Index_Constraint) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Index_Constraint) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Index_Constraint) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : aliased in out Base_Index_Constraint'Class) is begin for Item in Self.Ranges.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; null; end Initialize; overriding function Is_Index_Constraint_Element (Self : Base_Index_Constraint) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Index_Constraint_Element; overriding function Is_Constraint_Element (Self : Base_Index_Constraint) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Constraint_Element; overriding function Is_Definition_Element (Self : Base_Index_Constraint) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Definition_Element; overriding procedure Visit (Self : not null access Base_Index_Constraint; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Index_Constraint (Self); end Visit; overriding function To_Index_Constraint_Text (Self : aliased in out Index_Constraint) return Program.Elements.Index_Constraints.Index_Constraint_Text_Access is begin return Self'Unchecked_Access; end To_Index_Constraint_Text; overriding function To_Index_Constraint_Text (Self : aliased in out Implicit_Index_Constraint) return Program.Elements.Index_Constraints.Index_Constraint_Text_Access is pragma Unreferenced (Self); begin return null; end To_Index_Constraint_Text; end Program.Nodes.Index_Constraints;
sungyeon/drake
Ada
1,169
ads
pragma License (Unrestricted); -- implementation unit package System.Packed_Arrays is pragma Pure; -- for System.Compare_Array_Signed_XX/Compare_Array_Unsigned_XX generic type Element_Type is (<>); package Ordering is -- this surrounding package is necessary for propagating -- pragma Machine_Attribute to its instances. function Compare ( Left : Address; Right : Address; Left_Len : Natural; Right_Len : Natural) return Integer; pragma Machine_Attribute (Compare, "pure"); end Ordering; -- for System.Pack_XX generic type Element_Type is (<>); package Indexing is function Get ( Arr : Address; N : Natural; Rev_SSO : Boolean) return Element_Type with Convention => Intrinsic; procedure Set ( Arr : Address; N : Natural; E : Element_Type; Rev_SSO : Boolean) with Convention => Intrinsic; pragma Machine_Attribute (Get, "pure"); pragma Inline_Always (Get); pragma Inline_Always (Set); end Indexing; end System.Packed_Arrays;
positivevaib/nyu-archive
Ada
1,118
adb
with Text_IO; with Ada.Integer_Text_IO; with Matrix_Mult; use Text_IO; use Ada.Integer_Text_IO; use Matrix_Mult; procedure Assignment_Main is A: Mat; B: Mat; C: Mat; task type Read_Mat is entry Read(M: out Mat); end Read_Mat; task body Read_Mat is begin accept Read(M: out Mat) do for i in 1..Size loop for j in 1..Size loop Ada.Integer_Text_IO.Get(M(i, j)); end loop; end loop; end Read; end Read_Mat; task Print is entry Mat_Multiplied(C: in Mat); end Print; task body Print is begin accept Mat_Multiplied(C: in Mat) do for i in 1..Size loop for j in 1..Size loop Put(C(i, j), width => 10); end loop; New_Line; end loop; end Mat_Multiplied; end Print; Read_One: Read_Mat; Read_Two: Read_Mat; begin Read_One.Read(A); Read_Two.Read(B); Matrix_Mult.Mat_Mult(A, B, C); Print.Mat_Multiplied(C); end Assignment_main;
reznikmm/matreshka
Ada
3,627
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Attributes.Style.Color is type ODF_Style_Color is new XML.DOM.Attributes.DOM_Attribute with private; private type ODF_Style_Color is new XML.DOM.Attributes.DOM_Attribute with null record; end ODF.DOM.Attributes.Style.Color;
reznikmm/matreshka
Ada
3,801
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.OCL.Ocl_Expressions; package AMF.OCL.Literal_Exps is pragma Preelaborate; type OCL_Literal_Exp is limited interface and AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression; type OCL_Literal_Exp_Access is access all OCL_Literal_Exp'Class; for OCL_Literal_Exp_Access'Storage_Size use 0; end AMF.OCL.Literal_Exps;
reznikmm/matreshka
Ada
4,608
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Table.End_Table_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Table_End_Table_Attribute_Node is begin return Self : Table_End_Table_Attribute_Node do Matreshka.ODF_Table.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Table_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Table_End_Table_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.End_Table_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Table_URI, Matreshka.ODF_String_Constants.End_Table_Attribute, Table_End_Table_Attribute_Node'Tag); end Matreshka.ODF_Table.End_Table_Attributes;
reznikmm/matreshka
Ada
4,591
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Text.Duration_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Text_Duration_Attribute_Node is begin return Self : Text_Duration_Attribute_Node do Matreshka.ODF_Text.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Text_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Text_Duration_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Duration_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Text_URI, Matreshka.ODF_String_Constants.Duration_Attribute, Text_Duration_Attribute_Node'Tag); end Matreshka.ODF_Text.Duration_Attributes;
VMika/DES_Ada
Ada
17,367
adb
pragma Warnings (Off); pragma Ada_95; pragma Source_File_Name (ada_main, Spec_File_Name => "b__mainp.ads"); pragma Source_File_Name (ada_main, Body_File_Name => "b__mainp.adb"); pragma Suppress (Overflow_Check); with System.Restrictions; with Ada.Exceptions; package body ada_main is E070 : Short_Integer; pragma Import (Ada, E070, "system__os_lib_E"); E013 : Short_Integer; pragma Import (Ada, E013, "system__soft_links_E"); E023 : Short_Integer; pragma Import (Ada, E023, "system__exception_table_E"); E066 : Short_Integer; pragma Import (Ada, E066, "ada__io_exceptions_E"); E050 : Short_Integer; pragma Import (Ada, E050, "ada__strings_E"); E038 : Short_Integer; pragma Import (Ada, E038, "ada__containers_E"); E025 : Short_Integer; pragma Import (Ada, E025, "system__exceptions_E"); E017 : Short_Integer; pragma Import (Ada, E017, "system__secondary_stack_E"); E076 : Short_Integer; pragma Import (Ada, E076, "interfaces__c_E"); E052 : Short_Integer; pragma Import (Ada, E052, "ada__strings__maps_E"); E056 : Short_Integer; pragma Import (Ada, E056, "ada__strings__maps__constants_E"); E078 : Short_Integer; pragma Import (Ada, E078, "system__object_reader_E"); E045 : Short_Integer; pragma Import (Ada, E045, "system__dwarf_lines_E"); E037 : Short_Integer; pragma Import (Ada, E037, "system__traceback__symbolic_E"); E108 : Short_Integer; pragma Import (Ada, E108, "interfaces__c__strings_E"); E201 : Short_Integer; pragma Import (Ada, E201, "interfaces__cobol_E"); E118 : Short_Integer; pragma Import (Ada, E118, "system__task_info_E"); E134 : Short_Integer; pragma Import (Ada, E134, "ada__tags_E"); E153 : Short_Integer; pragma Import (Ada, E153, "ada__streams_E"); E173 : Short_Integer; pragma Import (Ada, E173, "system__file_control_block_E"); E155 : Short_Integer; pragma Import (Ada, E155, "system__finalization_root_E"); E151 : Short_Integer; pragma Import (Ada, E151, "ada__finalization_E"); E172 : Short_Integer; pragma Import (Ada, E172, "system__file_io_E"); E216 : Short_Integer; pragma Import (Ada, E216, "ada__streams__stream_io_E"); E157 : Short_Integer; pragma Import (Ada, E157, "system__storage_pools_E"); E148 : Short_Integer; pragma Import (Ada, E148, "system__finalization_masters_E"); E146 : Short_Integer; pragma Import (Ada, E146, "system__storage_pools__subpools_E"); E130 : Short_Integer; pragma Import (Ada, E130, "ada__strings__unbounded_E"); E006 : Short_Integer; pragma Import (Ada, E006, "ada__calendar_E"); E102 : Short_Integer; pragma Import (Ada, E102, "ada__real_time_E"); E168 : Short_Integer; pragma Import (Ada, E168, "ada__text_io_E"); E203 : Short_Integer; pragma Import (Ada, E203, "system__pool_global_E"); E212 : Short_Integer; pragma Import (Ada, E212, "system__sequential_io_E"); E234 : Short_Integer; pragma Import (Ada, E234, "system__tasking__initialization_E"); E242 : Short_Integer; pragma Import (Ada, E242, "system__tasking__protected_objects_E"); E246 : Short_Integer; pragma Import (Ada, E246, "system__tasking__protected_objects__entries_E"); E250 : Short_Integer; pragma Import (Ada, E250, "system__tasking__queuing_E"); E256 : Short_Integer; pragma Import (Ada, E256, "system__tasking__stages_E"); E177 : Short_Integer; pragma Import (Ada, E177, "p_structuraltypes_E"); E175 : Short_Integer; pragma Import (Ada, E175, "p_stephandler_E"); E207 : Short_Integer; pragma Import (Ada, E207, "p_stephandler__feistelhandler_E"); E209 : Short_Integer; pragma Import (Ada, E209, "p_stephandler__inputhandler_E"); E220 : Short_Integer; pragma Import (Ada, E220, "p_stephandler__iphandler_E"); E222 : Short_Integer; pragma Import (Ada, E222, "p_stephandler__keyhandler_E"); E224 : Short_Integer; pragma Import (Ada, E224, "p_stephandler__outputhandler_E"); E226 : Short_Integer; pragma Import (Ada, E226, "p_stephandler__reverseiphandler_E"); Local_Priority_Specific_Dispatching : constant String := ""; Local_Interrupt_States : constant String := ""; Is_Elaborated : Boolean := False; procedure finalize_library is begin E226 := E226 - 1; declare procedure F1; pragma Import (Ada, F1, "p_stephandler__reverseiphandler__finalize_spec"); begin F1; end; E224 := E224 - 1; declare procedure F2; pragma Import (Ada, F2, "p_stephandler__outputhandler__finalize_spec"); begin F2; end; E222 := E222 - 1; declare procedure F3; pragma Import (Ada, F3, "p_stephandler__keyhandler__finalize_spec"); begin F3; end; E220 := E220 - 1; declare procedure F4; pragma Import (Ada, F4, "p_stephandler__iphandler__finalize_spec"); begin F4; end; E209 := E209 - 1; declare procedure F5; pragma Import (Ada, F5, "p_stephandler__inputhandler__finalize_spec"); begin F5; end; E207 := E207 - 1; declare procedure F6; pragma Import (Ada, F6, "p_stephandler__feistelhandler__finalize_spec"); begin F6; end; E175 := E175 - 1; declare procedure F7; pragma Import (Ada, F7, "p_stephandler__finalize_spec"); begin F7; end; E246 := E246 - 1; declare procedure F8; pragma Import (Ada, F8, "system__tasking__protected_objects__entries__finalize_spec"); begin F8; end; E212 := E212 - 1; declare procedure F9; pragma Import (Ada, F9, "system__sequential_io__finalize_spec"); begin F9; end; E203 := E203 - 1; declare procedure F10; pragma Import (Ada, F10, "system__pool_global__finalize_spec"); begin F10; end; E168 := E168 - 1; declare procedure F11; pragma Import (Ada, F11, "ada__text_io__finalize_spec"); begin F11; end; E130 := E130 - 1; declare procedure F12; pragma Import (Ada, F12, "ada__strings__unbounded__finalize_spec"); begin F12; end; E146 := E146 - 1; declare procedure F13; pragma Import (Ada, F13, "system__storage_pools__subpools__finalize_spec"); begin F13; end; E148 := E148 - 1; declare procedure F14; pragma Import (Ada, F14, "system__finalization_masters__finalize_spec"); begin F14; end; E216 := E216 - 1; declare procedure F15; pragma Import (Ada, F15, "ada__streams__stream_io__finalize_spec"); begin F15; end; declare procedure F16; pragma Import (Ada, F16, "system__file_io__finalize_body"); begin E172 := E172 - 1; F16; end; declare procedure Reraise_Library_Exception_If_Any; pragma Import (Ada, Reraise_Library_Exception_If_Any, "__gnat_reraise_library_exception_if_any"); begin Reraise_Library_Exception_If_Any; end; end finalize_library; procedure adafinal is procedure s_stalib_adafinal; pragma Import (C, s_stalib_adafinal, "system__standard_library__adafinal"); procedure Runtime_Finalize; pragma Import (C, Runtime_Finalize, "__gnat_runtime_finalize"); begin if not Is_Elaborated then return; end if; Is_Elaborated := False; Runtime_Finalize; s_stalib_adafinal; end adafinal; type No_Param_Proc is access procedure; procedure adainit is Main_Priority : Integer; pragma Import (C, Main_Priority, "__gl_main_priority"); Time_Slice_Value : Integer; pragma Import (C, Time_Slice_Value, "__gl_time_slice_val"); WC_Encoding : Character; pragma Import (C, WC_Encoding, "__gl_wc_encoding"); Locking_Policy : Character; pragma Import (C, Locking_Policy, "__gl_locking_policy"); Queuing_Policy : Character; pragma Import (C, Queuing_Policy, "__gl_queuing_policy"); Task_Dispatching_Policy : Character; pragma Import (C, Task_Dispatching_Policy, "__gl_task_dispatching_policy"); Priority_Specific_Dispatching : System.Address; pragma Import (C, Priority_Specific_Dispatching, "__gl_priority_specific_dispatching"); Num_Specific_Dispatching : Integer; pragma Import (C, Num_Specific_Dispatching, "__gl_num_specific_dispatching"); Main_CPU : Integer; pragma Import (C, Main_CPU, "__gl_main_cpu"); Interrupt_States : System.Address; pragma Import (C, Interrupt_States, "__gl_interrupt_states"); Num_Interrupt_States : Integer; pragma Import (C, Num_Interrupt_States, "__gl_num_interrupt_states"); Unreserve_All_Interrupts : Integer; pragma Import (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts"); Detect_Blocking : Integer; pragma Import (C, Detect_Blocking, "__gl_detect_blocking"); Default_Stack_Size : Integer; pragma Import (C, Default_Stack_Size, "__gl_default_stack_size"); Leap_Seconds_Support : Integer; pragma Import (C, Leap_Seconds_Support, "__gl_leap_seconds_support"); Bind_Env_Addr : System.Address; pragma Import (C, Bind_Env_Addr, "__gl_bind_env_addr"); procedure Runtime_Initialize (Install_Handler : Integer); pragma Import (C, Runtime_Initialize, "__gnat_runtime_initialize"); Finalize_Library_Objects : No_Param_Proc; pragma Import (C, Finalize_Library_Objects, "__gnat_finalize_library_objects"); begin if Is_Elaborated then return; end if; Is_Elaborated := True; Main_Priority := -1; Time_Slice_Value := -1; WC_Encoding := 'b'; Locking_Policy := ' '; Queuing_Policy := ' '; Task_Dispatching_Policy := ' '; System.Restrictions.Run_Time_Restrictions := (Set => (False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False), Value => (0, 0, 0, 0, 0, 0, 0, 0, 0, 0), Violated => (False, False, False, True, True, False, False, True, False, False, True, True, True, True, False, False, False, False, False, True, True, False, True, True, False, True, True, True, True, False, False, False, False, False, True, False, False, True, False, True, False, False, True, False, False, False, True, False, False, True, True, False, True, True, False, False, True, False, True, False, True, True, True, False, False, True, False, True, True, True, False, True, True, False, True, True, True, True, False, False, True, False, False, False, False, False, True, True, False, False, False), Count => (0, 0, 0, 0, 0, 2, 1, 0, 0, 0), Unknown => (False, False, False, False, False, False, True, False, False, False)); Priority_Specific_Dispatching := Local_Priority_Specific_Dispatching'Address; Num_Specific_Dispatching := 0; Main_CPU := -1; Interrupt_States := Local_Interrupt_States'Address; Num_Interrupt_States := 0; Unreserve_All_Interrupts := 0; Detect_Blocking := 0; Default_Stack_Size := -1; Leap_Seconds_Support := 0; Runtime_Initialize (1); Finalize_Library_Objects := finalize_library'access; System.Soft_Links'Elab_Spec; System.Exception_Table'Elab_Body; E023 := E023 + 1; Ada.Io_Exceptions'Elab_Spec; E066 := E066 + 1; Ada.Strings'Elab_Spec; E050 := E050 + 1; Ada.Containers'Elab_Spec; E038 := E038 + 1; System.Exceptions'Elab_Spec; E025 := E025 + 1; System.Soft_Links'Elab_Body; E013 := E013 + 1; Interfaces.C'Elab_Spec; System.Os_Lib'Elab_Body; E070 := E070 + 1; Ada.Strings.Maps'Elab_Spec; Ada.Strings.Maps.Constants'Elab_Spec; E056 := E056 + 1; System.Secondary_Stack'Elab_Body; E017 := E017 + 1; System.Object_Reader'Elab_Spec; System.Dwarf_Lines'Elab_Spec; E045 := E045 + 1; E076 := E076 + 1; E052 := E052 + 1; System.Traceback.Symbolic'Elab_Body; E037 := E037 + 1; E078 := E078 + 1; Interfaces.C.Strings'Elab_Spec; E108 := E108 + 1; Interfaces.Cobol'Elab_Spec; E201 := E201 + 1; System.Task_Info'Elab_Spec; E118 := E118 + 1; Ada.Tags'Elab_Spec; Ada.Tags'Elab_Body; E134 := E134 + 1; Ada.Streams'Elab_Spec; E153 := E153 + 1; System.File_Control_Block'Elab_Spec; E173 := E173 + 1; System.Finalization_Root'Elab_Spec; E155 := E155 + 1; Ada.Finalization'Elab_Spec; E151 := E151 + 1; System.File_Io'Elab_Body; E172 := E172 + 1; Ada.Streams.Stream_Io'Elab_Spec; E216 := E216 + 1; System.Storage_Pools'Elab_Spec; E157 := E157 + 1; System.Finalization_Masters'Elab_Spec; System.Finalization_Masters'Elab_Body; E148 := E148 + 1; System.Storage_Pools.Subpools'Elab_Spec; E146 := E146 + 1; Ada.Strings.Unbounded'Elab_Spec; E130 := E130 + 1; Ada.Calendar'Elab_Spec; Ada.Calendar'Elab_Body; E006 := E006 + 1; Ada.Real_Time'Elab_Spec; Ada.Real_Time'Elab_Body; E102 := E102 + 1; Ada.Text_Io'Elab_Spec; Ada.Text_Io'Elab_Body; E168 := E168 + 1; System.Pool_Global'Elab_Spec; E203 := E203 + 1; System.Sequential_Io'Elab_Spec; E212 := E212 + 1; System.Tasking.Initialization'Elab_Body; E234 := E234 + 1; System.Tasking.Protected_Objects'Elab_Body; E242 := E242 + 1; System.Tasking.Protected_Objects.Entries'Elab_Spec; E246 := E246 + 1; System.Tasking.Queuing'Elab_Body; E250 := E250 + 1; System.Tasking.Stages'Elab_Body; E256 := E256 + 1; E177 := E177 + 1; P_Stephandler'Elab_Spec; P_Stephandler'Elab_Body; E175 := E175 + 1; P_Stephandler.Feistelhandler'Elab_Spec; P_Stephandler.Feistelhandler'Elab_Body; E207 := E207 + 1; P_Stephandler.Inputhandler'Elab_Spec; P_Stephandler.Inputhandler'Elab_Body; E209 := E209 + 1; P_Stephandler.Iphandler'Elab_Spec; P_Stephandler.Iphandler'Elab_Body; E220 := E220 + 1; P_Stephandler.Keyhandler'Elab_Spec; P_Stephandler.Keyhandler'Elab_Body; E222 := E222 + 1; P_Stephandler.Outputhandler'Elab_Spec; P_Stephandler.Outputhandler'Elab_Body; E224 := E224 + 1; P_Stephandler.Reverseiphandler'Elab_Spec; P_Stephandler.Reverseiphandler'Elab_Body; E226 := E226 + 1; end adainit; procedure Ada_Main_Program; pragma Import (Ada, Ada_Main_Program, "_ada_mainp"); 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); end; -- BEGIN Object file/option list -- C:\Users\vadim\des-ada\Des-Ada\obj\p_structuraltypes.o -- C:\Users\vadim\des-ada\Des-Ada\obj\p_stephandler.o -- C:\Users\vadim\des-ada\Des-Ada\obj\p_stephandler-feistelhandler.o -- C:\Users\vadim\des-ada\Des-Ada\obj\p_stephandler-inputhandler.o -- C:\Users\vadim\des-ada\Des-Ada\obj\p_stephandler-iphandler.o -- C:\Users\vadim\des-ada\Des-Ada\obj\p_stephandler-keyhandler.o -- C:\Users\vadim\des-ada\Des-Ada\obj\p_stephandler-outputhandler.o -- C:\Users\vadim\des-ada\Des-Ada\obj\p_stephandler-reverseiphandler.o -- C:\Users\vadim\des-ada\Des-Ada\obj\mainp.o -- -LC:\Users\vadim\des-ada\Des-Ada\obj\ -- -LC:\Users\vadim\des-ada\Des-Ada\obj\ -- -LC:/gnat/2017/lib/gcc/i686-pc-mingw32/6.3.1/adalib/ -- -static -- -lgnarl -- -lgnat -- -Xlinker -- --stack=0x200000,0x1000 -- -mthreads -- -Wl,--stack=0x2000000 -- END Object file/option list end ada_main;
godunko/cga
Ada
731
adb
-- -- Copyright (C) 2023, Vadim Godunko <[email protected]> -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- package body CGK is ------------------------------- -- Assert_Construction_Error -- ------------------------------- procedure Assert_Construction_Error (Value : Boolean) is begin if not Value then raise Construction_Error; end if; end Assert_Construction_Error; -------------------------------- -- Assert_Invalid_State_Error -- -------------------------------- procedure Assert_Invalid_State_Error (Valid : Boolean) is begin if not Valid then raise Invalid_State_Error; end if; end Assert_Invalid_State_Error; end CGK;
Fabien-Chouteau/cortex-m
Ada
2,985
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with HAL; package Cortex_M.Systick is pragma Preelaborate; type Clock_Source is (CPU_Clock, External_Clock); procedure Configure (Source : Clock_Source; Generate_Interrupt : Boolean; Reload_Value : HAL.UInt24); procedure Enable; -- Enable Systick procedure Disable; -- Disable Systick function Counted_To_Zero return Boolean; -- Return the value of the COUNTFLAB bit of the Control and Status Register function Counter return HAL.UInt24; -- Return the current value of the counter end Cortex_M.Systick;
AaronC98/PlaneSystem
Ada
2,699
ads
------------------------------------------------------------------------------ -- Ada Web Server -- -- -- -- Copyright (C) 2000-2015, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify -- -- it under terms of the GNU General Public License as published by the -- -- Free Software Foundation; either version 3, or (at your option) any -- -- later version. This library is distributed in the hope that it will be -- -- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ------------------------------------------------------------------------------ with AWS.Response; with SOAP.Message.Payload; package SOAP.Message.Response is type Object is new Message.Object with null record; function Build (R : Object'Class; Schema : WSDL.Schema.Definition := WSDL.Schema.Empty) return AWS.Response.Data; function From (P : Message.Payload.Object) return Object; -- Returns a Response object, initialized from a payload object function Is_Error (R : Object) return Boolean; end SOAP.Message.Response;
reznikmm/matreshka
Ada
4,712
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Style.Text_Line_Through_Mode_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Text_Line_Through_Mode_Attribute_Node is begin return Self : Style_Text_Line_Through_Mode_Attribute_Node do Matreshka.ODF_Style.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Style_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Text_Line_Through_Mode_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Text_Line_Through_Mode_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Style_URI, Matreshka.ODF_String_Constants.Text_Line_Through_Mode_Attribute, Style_Text_Line_Through_Mode_Attribute_Node'Tag); end Matreshka.ODF_Style.Text_Line_Through_Mode_Attributes;
io7m/coreland-serial_io
Ada
1,047
adb
with Ada.Streams.Stream_IO; with Serial_IO; with Test; procedure T_R16_01 is package Stream_IO renames Ada.Streams.Stream_IO; use type Serial_IO.Unsigned_16_t; Output : Stream_IO.File_Type; Input : Stream_IO.File_Type; type R_t is record A : Serial_IO.Unsigned_16_t; B : Serial_IO.Unsigned_16_t; C : Serial_IO.Unsigned_16_t; D : Serial_IO.Unsigned_16_t; E : Serial_IO.Unsigned_16_t; end record; R : R_t; S : R_t; begin Stream_IO.Create (Name => "t_r16_01.dat", Mode => Stream_IO.Out_File, File => Output); R.A := 16#ffff#; R.B := 16#7fff#; R.C := 16#00ff#; R.D := 16#007f#; R.E := 16#0000#; R_t'Output (Stream_IO.Stream (Output), R); pragma Warnings (Off); Stream_IO.Close (Output); pragma Warnings (On); Stream_IO.Open (Name => "t_r16_01.dat", Mode => Stream_IO.In_File, File => Input); S := R_t'Input (Stream_IO.Stream (Input)); Test.Assert (S = R); pragma Warnings (Off); Stream_IO.Close (Input); pragma Warnings (On); end T_R16_01;
AdaCore/libadalang
Ada
257
ads
package Pkg.Der is type U is tagged private; --% node.p_get_primitives() procedure Bar (X : U); procedure Foo (X : U); private type U is new T with null record; --% node.p_get_primitives() procedure Bar (X : U) is null; end Pkg.Der;
ecalderini/bingada
Ada
2,638
adb
--***************************************************************************** --* --* PROJECT: BingAda --* --* FILE: q_bingo_help.adb --* --* AUTHOR: Javier Fuica Fernandez --* --***************************************************************************** with GTK.ABOUT_DIALOG; with GTK.DIALOG; package body Q_BINGO_HELP is use type GTK.DIALOG.GTK_RESPONSE_TYPE; --================================================================== procedure P_SHOW_WINDOW (V_PARENT_WINDOW : GTK.WINDOW.GTK_WINDOW) is V_DIALOG : GTK.ABOUT_DIALOG.GTK_ABOUT_DIALOG; begin GTK.ABOUT_DIALOG.GTK_NEW (V_DIALOG); GTK.ABOUT_DIALOG.SET_TRANSIENT_FOR (V_DIALOG, V_PARENT_WINDOW); GTK.ABOUT_DIALOG.SET_DESTROY_WITH_PARENT (V_DIALOG, TRUE); GTK.ABOUT_DIALOG.SET_MODAL (V_DIALOG, TRUE); GTK.ABOUT_DIALOG.ADD_CREDIT_SECTION (About => V_DIALOG, Section_Name => "Beta Testers : ", People => (1 => new STRING'("Wife"), 2 => new STRING'("Sons"))); GTK.ABOUT_DIALOG.SET_AUTHORS (V_Dialog, (1 => new String'("Javier Fuica Fernandez <[email protected]>"))); GTK.ABOUT_DIALOG.Set_Comments (V_Dialog, "Comment about the application"); GTK.ABOUT_DIALOG.SET_LICENSE (V_Dialog, "This library is free software; you can redistribute it and/or" & " modify it under the terms of the GNU General Public" & " License as published by the Free Software Foundation; either" & " version 2 of the License, or (at your option) any later version." & ASCII.LF & "This library is distributed in the hope that it will be useful," & " but WITHOUT ANY WARRANTY; without even the implied warranty of" & " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" & " GNU General Public License for more details."); GTK.ABOUT_DIALOG.SET_WRAP_LICENSE (V_Dialog, True); GTK.ABOUT_DIALOG.SET_PROGRAM_NAME (V_Dialog, "BingAda"); GTK.ABOUT_DIALOG.SET_VERSION (V_Dialog, "0.9 Beta"); if GTK.ABOUT_DIALOG.Run (V_Dialog) /= GTK.DIALOG.GTK_RESPONSE_CLOSE then -- Dialog was destroyed by user, not closed through Close button null; end if; GTK.ABOUT_DIALOG.Destroy (V_Dialog); --GTK.ABOUT_DIALOG.ON_ACTIVATE_LINK (V_DIALOG,P_ON_ACTIVATE_LINK'Access); --GTK.ABOUT_DIALOG.DESTROY (V_DIALOG); end P_SHOW_WINDOW; --================================================================== end Q_BINGO_HELP;