repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
MinimSecure/unum-sdk
Ada
799
ads
-- Copyright 2011-2019 Free Software Foundation, Inc. -- -- This program 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 3 of the License, or -- (at your option) any later version. -- -- 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. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. package Pck is task Dummy_Task is entry Start; end Dummy_Task; end Pck;
reznikmm/matreshka
Ada
3,804
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_Source_Cell_Range_Addresses_Attributes is pragma Preelaborate; type ODF_Table_Source_Cell_Range_Addresses_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Table_Source_Cell_Range_Addresses_Attribute_Access is access all ODF_Table_Source_Cell_Range_Addresses_Attribute'Class with Storage_Size => 0; end ODF.DOM.Table_Source_Cell_Range_Addresses_Attributes;
micahwelf/FLTK-Ada
Ada
1,764
ads
package FLTK.Widgets.Groups.Tabbed is type Tabbed_Group is new Group with private; type Tabbed_Group_Reference (Data : not null access Tabbed_Group'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Tabbed_Group; end Forge; procedure Get_Client_Area (This : in Tabbed_Group; Tab_Height : in Natural; X, Y, W, H : out Integer); function Get_Push (This : in Tabbed_Group) return access Widget'Class; procedure Set_Push (This : in out Tabbed_Group; Item : in out Widget'Class); function Get_Visible (This : in Tabbed_Group) return access Widget'Class; procedure Set_Visible (This : in out Tabbed_Group; Item : in out Widget'Class); function Get_Which (This : in Tabbed_Group; Event_X, Event_Y : in Integer) return access Widget'Class; procedure Draw (This : in out Tabbed_Group); function Handle (This : in out Tabbed_Group; Event : in Event_Kind) return Event_Outcome; private type Tabbed_Group is new Group with null record; overriding procedure Finalize (This : in out Tabbed_Group); pragma Inline (Get_Client_Area); pragma Inline (Get_Push); pragma Inline (Set_Push); pragma Inline (Get_Visible); pragma Inline (Set_Visible); pragma Inline (Get_Which); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Groups.Tabbed;
Fabien-Chouteau/Ada_Drivers_Library
Ada
3,340
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 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. -- -- -- ------------------------------------------------------------------------------ with NRF51_SVD.RNG; use NRF51_SVD.RNG; package body nRF51.RNG is ------------------------------------- -- Enable_Digital_Error_Correction -- ------------------------------------- procedure Enable_Digital_Error_Correction is begin RNG_Periph.CONFIG.DERCEN := Enabled; end Enable_Digital_Error_Correction; -------------------------------------- -- Disable_Digital_Error_Correction -- -------------------------------------- procedure Disable_Digital_Error_Correction is begin RNG_Periph.CONFIG.DERCEN := Disabled; end Disable_Digital_Error_Correction; ---------- -- Read -- ---------- function Read return UInt8 is begin -- Clear event RNG_Periph.EVENTS_VALRDY := 0; -- Start random numnber generator RNG_Periph.TASKS_START := 1; while RNG_Periph.EVENTS_VALRDY = 0 loop null; end loop; return RNG_Periph.VALUE.VALUE; end Read; end nRF51.RNG;
Fabien-Chouteau/cortex-m
Ada
3,723
adb
------------------------------------------------------------------------------ -- -- -- 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 Cortex_M_SVD.SysTick; use Cortex_M_SVD.SysTick; with HAL; use HAL; package body Cortex_M.Systick is --------------- -- Configure -- --------------- procedure Configure (Source : Clock_Source; Generate_Interrupt : Boolean; Reload_Value : HAL.UInt24) is begin SysTick_Periph.CSR.CLKSOURCE := (case Source is when CPU_Clock => Cpu_Clk, when External_Clock => External_Clk); SysTick_Periph.CSR.TICKINT := (if Generate_Interrupt then Enable else Disable); SysTick_Periph.RVR.RELOAD := Reload_Value; SysTick_Periph.CVR.CURRENT := Counter; end Configure; ------------ -- Enable -- ------------ procedure Enable is begin SysTick_Periph.CSR.ENABLE := Enable; end Enable; ------------- -- Disable -- ------------- procedure Disable is begin SysTick_Periph.CSR.ENABLE := Disable; end Disable; --------------------- -- Counted_To_Zero -- --------------------- function Counted_To_Zero return Boolean is begin return SysTick_Periph.CSR.COUNTFLAG; end Counted_To_Zero; ------------- -- Counter -- ------------- function Counter return HAL.UInt24 is begin return SysTick_Periph.CVR.CURRENT; end Counter; end Cortex_M.Systick;
LionelDraghi/smk
Ada
10,326
adb
-- ----------------------------------------------------------------------------- -- smk, the smart make (http://lionel.draghi.free.fr/smk/) -- © 2018, 2019 Lionel Draghi <[email protected]> -- SPDX-License-Identifier: APSL-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. -- ----------------------------------------------------------------------------- with Smk.IO; with Ada.Characters.Latin_1; with Ada.Directories; with Ada.Strings.Fixed; with Ada.Strings.Maps.Constants; with Ada.Text_IO; use Ada.Text_IO; with Smk.Settings; use Smk.Settings; -- ----------------------------------------------------------------------------- package body Smk.Smkfiles is Debug : constant Boolean := False; Prefix : constant String := ""; -- -------------------------------------------------------------------------- function "+" (Name : Smk_File_Name) return String is (Files."+" (Files.File_Name (Name))); function "+" (Name : String) return Smk_File_Name is (Smk_File_Name (Files."+" (Name))); use Ada.Strings; use Ada.Strings.Fixed; Current_Section : Section_Names := Default_Section; use Ada.Strings.Maps; use Ada.Strings.Maps.Constants; Whitespace_Set : constant Ada.Strings.Maps.Character_Set := Ada.Strings.Maps.To_Set (Ada.Characters.Latin_1.HT & Ada.Characters.Latin_1.Space & '@'); Identifier_Set : constant Ada.Strings.Maps.Character_Set := Alphanumeric_Set or To_Set (".-_"); -- -------------------------------------------------------------------------- function Is_Empty (Line : in String) return Boolean is (Index_Non_Blank (Line) = 0); -- -------------------------------------------------------------------------- function Is_A_Comment (Line : in String) return Boolean is begin return Head (Line, Count => 1) = "#" or else -- Shell style comment Head (Line, Count => 2) = "--" or else -- Ada style comment Head (Line, Count => 2) = "//"; -- Java style comment end Is_A_Comment; -- -------------------------------------------------------------------------- function Is_A_Section (Line : in String) return Boolean is -- A section line starts with an identifier immediatly followed by -- a semicolon, e.g. "mrproper:" -- Warning: this function updates the global Current_Section variable First : Positive; Last : Natural; begin Find_Token (Source => Line, Set => Identifier_Set, Test => Inside, First => First, Last => Last); if Last = 0 then -- The line don't start with an identifier, can't be a section return False; elsif Last = Line'Last then -- There is only an identifier on this line return False; else if Line (Last + 1) = ':' then Current_Section := +(Line (First .. Last)); return True; else return False; end if; end if; end Is_A_Section; -- -------------------------------------------------------------------------- function Load_Smkfile return Smkfile is Make_Fl : Ada.Text_IO.File_Type; Entry_List : Smkfile_Entry_Lists.List; In_A_Multiline : Boolean := False; Multiline : Command_Lines := Null_Command_Line; Line_List : Smkfile; begin Open (Make_Fl, In_File, Smkfile_Name); Analysis : while not End_Of_File (Make_Fl) loop declare -- Line = Get_Line, but heading blanks or tabs character are removed -- If there is not heading blank, First_Non_Blank will be null, -- and Line will start at 1. Line : constant String := Trim (Get_Line (Make_Fl), Left => Whitespace_Set, Right => Whitespace_Set); Line_Nb : constant Integer := Integer (Ada.Text_IO.Line (Make_Fl)); begin if Is_A_Comment (Line) then IO.Put_Debug_Line (Line & "<", Debug => Debug, Prefix => Prefix & "Comment >", File => Smkfile_Name, Line => Line_Nb); elsif Is_Empty (Line) then IO.Put_Debug_Line (Line & "<", Debug => Debug, Prefix => Prefix & "Empty line >", File => Smkfile_Name, Line => Line_Nb); elsif Is_A_Section (Line) then IO.Put_Debug_Line (+Current_Section & "<", Debug => Debug, Prefix => Prefix & "Section >", File => Smkfile_Name, Line => Line_Nb); else -- Last but not least, it's a command line. if Line (Line'Last) = '\' then -- first or continuation line of the multiline declare Last_Non_Blank_Before_Backslash : constant Natural := Index (Source => Line (Line'First .. Line'Last - 1), Set => Whitespace_Set, Test => Outside, Going => Backward); begin -- we replace all all blanks and tab befor '\' with -- a single blank Multiline := Multiline & Line (Line'First .. Last_Non_Blank_Before_Backslash) & " "; In_A_Multiline := True; IO.Put_Debug_Line ((+Multiline) & "<", Debug => Debug, Prefix => Prefix & "First or continuation >", File => Smkfile_Name, Line => Line_Nb); end; else if In_A_Multiline then -- last line of the multiline Multiline := Multiline & Line; Entry_List.Append ((Line => Line_Nb - 1, -- why -1 ??? Section => Current_Section, Command => Multiline, Was_Run => False)); IO.Put_Debug_Line (+Multiline & "<", Debug => Debug, Prefix => Prefix & "Last line >", File => Smkfile_Name, Line => Line_Nb); Multiline := Null_Command_Line; In_A_Multiline := False; else -- single line command Entry_List.Append ((Line => Line_Nb - 1, -- why -1 ??? Section => Current_Section, Command => +(Line), Was_Run => False)); IO.Put_Debug_Line (Line & "<", Debug => Debug, Prefix => Prefix & "Single line >", File => Smkfile_Name, Line => Line_Nb); end if; end if; end if; end; end loop Analysis; if In_A_Multiline then IO.Put_Error (Smkfile_Name & " ends with incomplete multine, last command ignored"); end if; Close (Make_Fl); declare use Ada.Directories; begin Line_List := (Name => +Smkfile_Name, Time_Tag => Modification_Time (Smkfile_Name), Entries => Entry_List); end; return Line_List; end Load_Smkfile; -- -------------------------------------------------------------------------- procedure Dump is The_Smkfile : constant Smkfile := Load_Smkfile; Time_Tag : constant String := IO.Image (The_Smkfile.Time_Tag); begin IO.Put_Line (+The_Smkfile.Name & " (" & Time_Tag & ") :"); for E of The_Smkfile.Entries loop IO.Put_Line (Trim (Positive'Image (E.Line), Left) & ": [" & (+E.Section) & "] " & (+E.Command)); end loop; end Dump; -- -------------------------------------------------------------------------- function Contains (The_Smkfile : in Smkfile; The_Command : in Command_Lines) return Boolean is (for some E of The_Smkfile.Entries => E.Command = The_Command); -- -------------------------------------------------------------------------- procedure Add_To_Smkfile (Cmd_Line : String) is Smk_File : Ada.Text_IO.File_Type; The_Smkfile : Smkfiles.Smkfile; begin if Ada.Directories.Exists (Smkfile_Name) then The_Smkfile := Smkfiles.Load_Smkfile; Open (Smk_File, Mode => Append_File, Name => Smkfile_Name); else Create (Smk_File, Mode => Append_File, Name => Smkfile_Name); end if; if not Smkfiles.Contains (The_Smkfile, +Cmd_Line) then Put_Line (Smk_File, Cmd_Line); end if; Close (Smk_File); end Add_To_Smkfile; end Smk.Smkfiles;
Letractively/ada-ado
Ada
11,359
adb
----------------------------------------------------------------------- -- ADO Databases -- Database Connections -- Copyright (C) 2010, 2011, 2012, 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.Log; with Util.Log.Loggers; with Ada.Unchecked_Deallocation; with ADO.Statements.Create; package body ADO.Databases is use Util.Log; use ADO.Drivers; use type ADO.Drivers.Connections.Database_Connection_Access; Log : constant Loggers.Logger := Loggers.Create ("ADO.Databases"); -- ------------------------------ -- Get the database connection status. -- ------------------------------ function Get_Status (Database : in Connection) return Connection_Status is begin if Database.Impl = null then return CLOSED; else return OPEN; end if; end Get_Status; -- ------------------------------ -- Create a query statement. The statement is not prepared -- ------------------------------ function Create_Statement (Database : in Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Query_Statement is begin if Database.Impl = null then Log.Error ("Database implementation is not initialized"); raise NOT_OPEN with "No connection to the database"; end if; declare Query : constant Query_Statement_Access := Database.Impl.all.Create_Statement (Table); begin return ADO.Statements.Create.Create_Statement (Query); end; end Create_Statement; -- ------------------------------ -- Create a query statement. The statement is not prepared -- ------------------------------ function Create_Statement (Database : in Connection; Query : in String) return Query_Statement is begin if Database.Impl = null then Log.Error ("Database implementation is not initialized"); raise NOT_OPEN with "No connection to the database"; end if; declare Stmt : constant Query_Statement_Access := Database.Impl.all.Create_Statement (null); begin Append (Query => Stmt.all, SQL => Query); return ADO.Statements.Create.Create_Statement (Stmt); end; end Create_Statement; -- ------------------------------ -- Get the database driver which manages this connection. -- ------------------------------ function Get_Driver (Database : in Connection) return ADO.Drivers.Connections.Driver_Access is begin if Database.Impl = null then Log.Error ("Database implementation is not initialized"); raise NOT_OPEN with "No connection to the database"; end if; return Database.Impl.Get_Driver; end Get_Driver; -- ------------------------------ -- Get the database driver index. -- ------------------------------ function Get_Driver_Index (Database : in Connection) return ADO.Drivers.Driver_Index is Driver : constant ADO.Drivers.Connections.Driver_Access := Database.Get_Driver; begin return Driver.Get_Driver_Index; end Get_Driver_Index; -- ------------------------------ -- Get a database connection identifier. -- ------------------------------ function Get_Ident (Database : in Connection) return String is begin if Database.Impl = null then return "null"; else return Database.Impl.Ident; end if; end Get_Ident; -- ------------------------------ -- Load the database schema definition for the current database. -- ------------------------------ procedure Load_Schema (Database : in Connection; Schema : out ADO.Schemas.Schema_Definition) is begin if Database.Impl = null then Log.Error ("Database connection is not initialized"); raise NOT_OPEN with "No connection to the database"; end if; Database.Impl.Load_Schema (Schema); end Load_Schema; -- ------------------------------ -- Close the database connection -- ------------------------------ procedure Close (Database : in out Connection) is begin Log.Info ("Closing database connection {0}", Database.Get_Ident); if Database.Impl /= null then Database.Impl.Close; end if; end Close; -- ------------------------------ -- Start a transaction. -- ------------------------------ procedure Begin_Transaction (Database : in out Master_Connection) is begin Log.Info ("Begin transaction {0}", Database.Get_Ident); if Database.Impl = null then Log.Error ("Database implementation is not initialized"); raise NOT_OPEN with "No connection to the database"; end if; Database.Impl.Begin_Transaction; end Begin_Transaction; -- ------------------------------ -- Commit the current transaction. -- ------------------------------ procedure Commit (Database : in out Master_Connection) is begin Log.Info ("Commit transaction {0}", Database.Get_Ident); if Database.Impl = null then Log.Error ("Database implementation is not initialized"); raise NOT_OPEN with "No connection to the database"; end if; Database.Impl.Commit; end Commit; -- ------------------------------ -- Rollback the current transaction. -- ------------------------------ procedure Rollback (Database : in out Master_Connection) is begin Log.Info ("Rollback transaction {0}", Database.Get_Ident); if Database.Impl = null then Log.Error ("Database implementation is not initialized"); raise NOT_OPEN with "Database implementation is not initialized"; end if; Database.Impl.Rollback; end Rollback; -- ------------------------------ -- Create a delete statement. -- ------------------------------ function Create_Statement (Database : in Master_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Delete_Statement is begin Log.Debug ("Create delete statement {0}", Database.Get_Ident); declare Stmt : constant Delete_Statement_Access := Database.Impl.all.Create_Statement (Table); begin return ADO.Statements.Create.Create_Statement (Stmt); end; end Create_Statement; -- ------------------------------ -- Create an insert statement. -- ------------------------------ function Create_Statement (Database : in Master_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Insert_Statement is begin Log.Debug ("Create insert statement {0}", Database.Get_Ident); declare Stmt : constant Insert_Statement_Access := Database.Impl.all.Create_Statement (Table); begin return ADO.Statements.Create.Create_Statement (Stmt.all'Access); end; end Create_Statement; -- ------------------------------ -- Create an update statement. -- ------------------------------ function Create_Statement (Database : in Master_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Update_Statement is begin Log.Debug ("Create update statement {0}", Database.Get_Ident); return ADO.Statements.Create.Create_Statement (Database.Impl.all.Create_Statement (Table)); end Create_Statement; -- ------------------------------ -- Adjust the connection reference counter -- ------------------------------ overriding procedure Adjust (Object : in out Connection) is begin if Object.Impl /= null then Object.Impl.Count := Object.Impl.Count + 1; end if; end Adjust; -- ------------------------------ -- Releases the connection reference counter -- ------------------------------ overriding procedure Finalize (Object : in out Connection) is procedure Free is new Ada.Unchecked_Deallocation (Object => ADO.Drivers.Connections.Database_Connection'Class, Name => ADO.Drivers.Connections.Database_Connection_Access); begin if Object.Impl /= null then Object.Impl.Count := Object.Impl.Count - 1; if Object.Impl.Count = 0 then Free (Object.Impl); end if; end if; end Finalize; -- ------------------------------ -- Attempts to establish a connection with the data source -- that this DataSource object represents. -- ------------------------------ function Get_Connection (Controller : in DataSource) return Master_Connection'Class is Connection : ADO.Drivers.Connections.Database_Connection_Access; begin Log.Info ("Get master connection from data-source"); Controller.Create_Connection (Connection); return Master_Connection '(Ada.Finalization.Controlled with Impl => Connection); end Get_Connection; -- ------------------------------ -- Set the master data source -- ------------------------------ procedure Set_Master (Controller : in out Replicated_DataSource; Master : in DataSource_Access) is begin Controller.Master := Master; end Set_Master; -- ------------------------------ -- Get the master data source -- ------------------------------ function Get_Master (Controller : in Replicated_DataSource) return DataSource_Access is begin return Controller.Master; end Get_Master; -- ------------------------------ -- Set the slave data source -- ------------------------------ procedure Set_Slave (Controller : in out Replicated_DataSource; Slave : in DataSource_Access) is begin Controller.Slave := Slave; end Set_Slave; -- ------------------------------ -- Get the slave data source -- ------------------------------ function Get_Slave (Controller : in Replicated_DataSource) return DataSource_Access is begin return Controller.Slave; end Get_Slave; -- ------------------------------ -- Get a slave database connection -- ------------------------------ function Get_Slave_Connection (Controller : in Replicated_DataSource) return Connection'Class is begin return Controller.Slave.Get_Connection; end Get_Slave_Connection; end ADO.Databases;
reznikmm/matreshka
Ada
3,719
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_Use_Labels_Attributes is pragma Preelaborate; type ODF_Table_Use_Labels_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Table_Use_Labels_Attribute_Access is access all ODF_Table_Use_Labels_Attribute'Class with Storage_Size => 0; end ODF.DOM.Table_Use_Labels_Attributes;
tum-ei-rcs/StratoX
Ada
9,947
ads
-- This spec has been automatically generated from STM32F429x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with HAL; with System; package STM32_SVD.SYSCFG is pragma Preelaborate; --------------- -- Registers -- --------------- -------------------- -- MEMRM_Register -- -------------------- subtype MEMRM_MEM_MODE_Field is HAL.UInt3; subtype MEMRM_SWP_FMC_Field is HAL.UInt2; -- memory remap register type MEMRM_Register is record -- Memory mapping selection MEM_MODE : MEMRM_MEM_MODE_Field := 16#0#; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; -- Flash bank mode selection FB_MODE : Boolean := False; -- unspecified Reserved_9_9 : HAL.Bit := 16#0#; -- FMC memory mapping swap SWP_FMC : MEMRM_SWP_FMC_Field := 16#0#; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MEMRM_Register use record MEM_MODE at 0 range 0 .. 2; Reserved_3_7 at 0 range 3 .. 7; FB_MODE at 0 range 8 .. 8; Reserved_9_9 at 0 range 9 .. 9; SWP_FMC at 0 range 10 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; ------------------ -- PMC_Register -- ------------------ -- peripheral mode configuration register type PMC_Register is record -- unspecified Reserved_0_15 : HAL.Short := 16#0#; -- ADC1DC2 ADC1DC2 : Boolean := False; -- ADC2DC2 ADC2DC2 : Boolean := False; -- ADC3DC2 ADC3DC2 : Boolean := False; -- unspecified Reserved_19_22 : HAL.UInt4 := 16#0#; -- Ethernet PHY interface selection MII_RMII_SEL : Boolean := False; -- unspecified Reserved_24_31 : HAL.Byte := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PMC_Register use record Reserved_0_15 at 0 range 0 .. 15; ADC1DC2 at 0 range 16 .. 16; ADC2DC2 at 0 range 17 .. 17; ADC3DC2 at 0 range 18 .. 18; Reserved_19_22 at 0 range 19 .. 22; MII_RMII_SEL at 0 range 23 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; ---------------------- -- EXTICR1_Register -- ---------------------- ------------------ -- EXTICR1.EXTI -- ------------------ -- EXTICR1_EXTI array element subtype EXTICR1_EXTI_Element is HAL.UInt4; -- EXTICR1_EXTI array type EXTICR1_EXTI_Field_Array is array (0 .. 3) of EXTICR1_EXTI_Element with Component_Size => 4, Size => 16; -- Type definition for EXTICR1_EXTI type EXTICR1_EXTI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- EXTI as a value Val : HAL.Short; when True => -- EXTI as an array Arr : EXTICR1_EXTI_Field_Array; end case; end record with Unchecked_Union, Size => 16; for EXTICR1_EXTI_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- external interrupt configuration register 1 type EXTICR1_Register is record -- EXTI x configuration (x = 0 to 3) EXTI : EXTICR1_EXTI_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EXTICR1_Register use record EXTI at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ---------------------- -- EXTICR2_Register -- ---------------------- ------------------ -- EXTICR2.EXTI -- ------------------ -- EXTICR2_EXTI array element subtype EXTICR2_EXTI_Element is HAL.UInt4; -- EXTICR2_EXTI array type EXTICR2_EXTI_Field_Array is array (4 .. 7) of EXTICR2_EXTI_Element with Component_Size => 4, Size => 16; -- Type definition for EXTICR2_EXTI type EXTICR2_EXTI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- EXTI as a value Val : HAL.Short; when True => -- EXTI as an array Arr : EXTICR2_EXTI_Field_Array; end case; end record with Unchecked_Union, Size => 16; for EXTICR2_EXTI_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- external interrupt configuration register 2 type EXTICR2_Register is record -- EXTI x configuration (x = 4 to 7) EXTI : EXTICR2_EXTI_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EXTICR2_Register use record EXTI at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ---------------------- -- EXTICR3_Register -- ---------------------- ------------------ -- EXTICR3.EXTI -- ------------------ -- EXTICR3_EXTI array element subtype EXTICR3_EXTI_Element is HAL.UInt4; -- EXTICR3_EXTI array type EXTICR3_EXTI_Field_Array is array (8 .. 11) of EXTICR3_EXTI_Element with Component_Size => 4, Size => 16; -- Type definition for EXTICR3_EXTI type EXTICR3_EXTI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- EXTI as a value Val : HAL.Short; when True => -- EXTI as an array Arr : EXTICR3_EXTI_Field_Array; end case; end record with Unchecked_Union, Size => 16; for EXTICR3_EXTI_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- external interrupt configuration register 3 type EXTICR3_Register is record -- EXTI x configuration (x = 8 to 11) EXTI : EXTICR3_EXTI_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EXTICR3_Register use record EXTI at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ---------------------- -- EXTICR4_Register -- ---------------------- ------------------ -- EXTICR4.EXTI -- ------------------ -- EXTICR4_EXTI array element subtype EXTICR4_EXTI_Element is HAL.UInt4; -- EXTICR4_EXTI array type EXTICR4_EXTI_Field_Array is array (12 .. 15) of EXTICR4_EXTI_Element with Component_Size => 4, Size => 16; -- Type definition for EXTICR4_EXTI type EXTICR4_EXTI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- EXTI as a value Val : HAL.Short; when True => -- EXTI as an array Arr : EXTICR4_EXTI_Field_Array; end case; end record with Unchecked_Union, Size => 16; for EXTICR4_EXTI_Field use record Val at 0 range 0 .. 15; Arr at 0 range 0 .. 15; end record; -- external interrupt configuration register 4 type EXTICR4_Register is record -- EXTI x configuration (x = 12 to 15) EXTI : EXTICR4_EXTI_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EXTICR4_Register use record EXTI at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- CMPCR_Register -- -------------------- -- Compensation cell control register type CMPCR_Register is record -- Read-only. Compensation cell power-down CMP_PD : Boolean; -- unspecified Reserved_1_7 : HAL.UInt7; -- Read-only. READY READY : Boolean; -- unspecified Reserved_9_31 : HAL.UInt23; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CMPCR_Register use record CMP_PD at 0 range 0 .. 0; Reserved_1_7 at 0 range 1 .. 7; READY at 0 range 8 .. 8; Reserved_9_31 at 0 range 9 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- System configuration controller type SYSCFG_Peripheral is record -- memory remap register MEMRM : MEMRM_Register; -- peripheral mode configuration register PMC : PMC_Register; -- external interrupt configuration register 1 EXTICR1 : EXTICR1_Register; -- external interrupt configuration register 2 EXTICR2 : EXTICR2_Register; -- external interrupt configuration register 3 EXTICR3 : EXTICR3_Register; -- external interrupt configuration register 4 EXTICR4 : EXTICR4_Register; -- Compensation cell control register CMPCR : CMPCR_Register; end record with Volatile; for SYSCFG_Peripheral use record MEMRM at 0 range 0 .. 31; PMC at 4 range 0 .. 31; EXTICR1 at 8 range 0 .. 31; EXTICR2 at 12 range 0 .. 31; EXTICR3 at 16 range 0 .. 31; EXTICR4 at 20 range 0 .. 31; CMPCR at 32 range 0 .. 31; end record; -- System configuration controller SYSCFG_Periph : aliased SYSCFG_Peripheral with Import, Address => SYSCFG_Base; end STM32_SVD.SYSCFG;
reznikmm/matreshka
Ada
3,647
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.Line_Style is type ODF_Style_Line_Style is new XML.DOM.Attributes.DOM_Attribute with private; private type ODF_Style_Line_Style is new XML.DOM.Attributes.DOM_Attribute with null record; end ODF.DOM.Attributes.Style.Line_Style;
dilawar/ahir
Ada
166
adb
-- RUN: %llvmgcc -c %s -I%p/Support package body Unc_Constructor is procedure P (X : A) is begin if X = A0 then null; end if; end; end;
charlie5/aIDE
Ada
1,136
ads
with AdaM.context_Item, Ada.Containers.Vectors, Ada.Streams; package AdaM.use_Clause is type Item is new context_Item.item with private; -- View -- type View is access all Item'Class; procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : in View); procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Self : out View); for View'write use View_write; for View'read use View_read; -- Vector -- package Vectors is new ada.Containers.Vectors (Positive, View); subtype Vector is Vectors.Vector; -- Forge -- function new_Subprogram return use_Clause.view; procedure free (Self : in out use_Clause.view); overriding procedure destruct (Self : in out use_Clause.item); -- Attributes -- overriding function Id (Self : access Item) return AdaM.Id; private type Item is new context_Item.item with record null; end record; end AdaM.use_Clause;
reznikmm/matreshka
Ada
3,989
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.Fo_Text_Indent_Attributes; package Matreshka.ODF_Fo.Text_Indent_Attributes is type Fo_Text_Indent_Attribute_Node is new Matreshka.ODF_Fo.Abstract_Fo_Attribute_Node and ODF.DOM.Fo_Text_Indent_Attributes.ODF_Fo_Text_Indent_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Fo_Text_Indent_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Fo_Text_Indent_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Fo.Text_Indent_Attributes;
optikos/oasis
Ada
493
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Nodes.Generic_Vectors; with Program.Elements.Defining_Identifiers; package Program.Nodes.Defining_Identifier_Vectors is new Program.Nodes.Generic_Vectors (Program.Elements.Defining_Identifiers.Defining_Identifier_Vector); pragma Preelaborate (Program.Nodes.Defining_Identifier_Vectors);
tum-ei-rcs/StratoX
Ada
5,663
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . S O U R C E _ I N F O -- -- -- -- S p e c -- -- -- -- Copyright (C) 2000-2015, 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. -- -- -- -- -- -- -- -- -- -- -- -- 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 useful utility subprograms that provide access -- to source code information known at compile time. These subprograms are -- intrinsic operations that provide information known to the compiler in -- a form that can be embedded into the source program for identification -- and logging purposes. For example, an exception handler can print out -- the name of the source file in which the exception is handled. package GNAT.Source_Info with SPARK_Mode => On is pragma Preelaborate; -- Note that this unit is Preelaborate, but not Pure, that's because the -- functions here such as Line are clearly not pure functions, and normally -- we mark intrinsic functions in a Pure unit as Pure, even though they are -- imported. -- -- Historical note: this used to be Pure, but that was when we marked all -- intrinsics as not Pure, even in Pure units, so no problems arose. function File return String with Import, Convention => Intrinsic; -- Return the name of the current file, not including the path information. -- The result is considered to be a static string constant. function Line return Positive with Import, Convention => Intrinsic; -- Return the current input line number. The result is considered to be a -- static expression. function Source_Location return String with Import, Convention => Intrinsic; -- Return a string literal of the form "name:line", where name is the -- current source file name without path information, and line is the -- current line number. In the event that instantiations are involved, -- additional suffixes of the same form are appended after the separating -- string " instantiated at ". The result is considered to be a static -- string constant. function Enclosing_Entity return String with Import, Convention => Intrinsic; -- Return the name of the current subprogram, package, task, entry or -- protected subprogram. The string is in exactly the form used for the -- declaration of the entity (casing and encoding conventions), and is -- considered to be a static string constant. The name is fully qualified -- using periods where possible (this is not always possible, notably in -- the case of entities appearing in unnamed block statements.) -- -- Note: if this function is used at the outer level of a generic package, -- the string returned will be the name of the instance, not the generic -- package itself. This is useful in identifying and logging information -- from within generic templates. function Compilation_ISO_Date return String with Import, Convention => Intrinsic; -- Returns date of compilation as a static string "yyyy-mm-dd". function Compilation_Date return String with Import, Convention => Intrinsic; -- Returns date of compilation as a static string "mmm dd yyyy". This is -- in local time form, and is exactly compatible with C macro __DATE__. function Compilation_Time return String with Import, Convention => Intrinsic; -- Returns GMT time of compilation as a static string "hh:mm:ss". This is -- in local time form, and is exactly compatible with C macro __TIME__. end GNAT.Source_Info;
reznikmm/matreshka
Ada
4,631
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_Form.Current_State_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Form_Current_State_Attribute_Node is begin return Self : Form_Current_State_Attribute_Node do Matreshka.ODF_Form.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Form_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Form_Current_State_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Current_State_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Form_URI, Matreshka.ODF_String_Constants.Current_State_Attribute, Form_Current_State_Attribute_Node'Tag); end Matreshka.ODF_Form.Current_State_Attributes;
stcarrez/ada-ado
Ada
1,813
adb
----------------------------------------------------------------------- -- ado-sqlite -- SQLite Database Drivers -- Copyright (C) 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 ADO.Configs; with ADO.Connections.Sqlite; package body ADO.Sqlite is -- ------------------------------ -- Initialize the SQLite driver. -- ------------------------------ procedure Initialize is begin ADO.Connections.Sqlite.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; end ADO.Sqlite;
flyx/OpenGLAda
Ada
5,730
adb
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with Ada.Text_IO.Text_Streams; with GL.Attributes; with GL.Buffers; with GL.Debug; with GL.Files; with GL.Objects.Buffers; with GL.Objects.Shaders; with GL.Objects.Programs; with GL.Objects.Vertex_Arrays; with GL.Toggles; with GL.Types.Colors; with GL_Test.Display_Backend; procedure GL_Test.Debugging is use GL.Buffers; use GL.Types; use GL.Objects.Vertex_Arrays; procedure Load_Vectors is new GL.Objects.Buffers.Load_To_Buffer (Singles.Vector3_Pointers); procedure Load_Colors is new GL.Objects.Buffers.Load_To_Buffer (Colors.Basic_Color_Pointers); procedure Load_Data (Array1, Array2 : Vertex_Array_Object; Buffer1, Buffer2, Buffer3 : GL.Objects.Buffers.Buffer) is use GL.Objects.Buffers; Triangle1 : constant Singles.Vector3_Array := ((-0.3, 0.5, -1.0), (-0.8, -0.5, -1.0), (0.2, -0.5, -1.0)); Triangle2 : constant Singles.Vector3_Array := ((-0.2, 0.5, -1.0), (0.3, -0.5, -1.0), (0.8, 0.5, -1.0)); Color_Array : constant Colors.Basic_Color_Array := ((1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0)); begin -- First vertex array object: Colored vertices Array1.Bind; Array_Buffer.Bind (Buffer1); Load_Vectors (Array_Buffer, Triangle1, Static_Draw); GL.Attributes.Set_Vertex_Attrib_Pointer (0, 3, Single_Type, False, 0, 0); GL.Attributes.Enable_Vertex_Attrib_Array (0); Array_Buffer.Bind (Buffer2); Load_Colors (Array_Buffer, Color_Array, Static_Draw); GL.Attributes.Set_Vertex_Attrib_Pointer (1, 3, Single_Type, False, 0, 0); GL.Attributes.Enable_Vertex_Attrib_Array (1); -- Second vertex array object: Only vertices Array2.Bind; Array_Buffer.Bind (Buffer3); Load_Vectors (Array_Buffer, Triangle2, Static_Draw); GL.Attributes.Set_Vertex_Attrib_Pointer (0, 3, Single_Type, False, 0, 0); GL.Attributes.Enable_Vertex_Attrib_Array (0); end Load_Data; procedure Load_Shaders (Program : out GL.Objects.Programs.Program) is Vertex_Shader : GL.Objects.Shaders.Shader (Kind => GL.Objects.Shaders.Vertex_Shader); Fragment_Shader : GL.Objects.Shaders.Shader (Kind => GL.Objects.Shaders.Fragment_Shader); begin Vertex_Shader.Initialize_Id; Fragment_Shader.Initialize_Id; Program.Initialize_Id; -- load shader sources and compile shaders GL.Files.Load_Shader_Source_From_File (Vertex_Shader, "../tests/gl/gl_test-opengl3-vertex.glsl"); GL.Files.Load_Shader_Source_From_File (Fragment_Shader, "../tests/gl/gl_test-opengl3-fragment.glsl"); Vertex_Shader.Compile; Fragment_Shader.Compile; if not Vertex_Shader.Compile_Status then Ada.Text_IO.Put_Line ("Compilation of vertex shader failed. log:"); Ada.Text_IO.Put_Line (Vertex_Shader.Info_Log); end if; if not Fragment_Shader.Compile_Status then Ada.Text_IO.Put_Line ("Compilation of fragment shader failed. log:"); Ada.Text_IO.Put_Line (Fragment_Shader.Info_Log); end if; -- set up program Program.Attach (Vertex_Shader); Program.Attach (Fragment_Shader); Program.Bind_Attrib_Location (0, "in_Position"); Program.Bind_Attrib_Location (1, "in_Color"); Program.Link; if not Program.Link_Status then Ada.Text_IO.Put_Line ("Program linking failed. Log:"); Ada.Text_IO.Put_Line (Program.Info_Log); return; end if; Program.Use_Program; end Load_Shaders; Program : GL.Objects.Programs.Program; Vector_Buffer1, Vector_Buffer2, Color_Buffer : GL.Objects.Buffers.Buffer; Array1, Array2 : GL.Objects.Vertex_Arrays.Vertex_Array_Object; Logger : aliased GL.Debug.Stream_Logger; begin Display_Backend.Init (True); Display_Backend.Configure_Minimum_OpenGL_Version (Major => 4, Minor => 3); Display_Backend.Open_Window (Width => 500, Height => 500); Logger.Set_Stream (Ada.Text_IO.Text_Streams.Stream (Ada.Text_IO.Standard_Output)); GL.Toggles.Enable (GL.Toggles.Debug_Output); GL.Debug.Message_Callback (Logger'Access); GL.Debug.Message_Insert (GL.Debug.Application, GL.Debug.Other, 1, GL.Debug.Notification, "Initialized GLFW window"); Vector_Buffer1.Initialize_Id; Vector_Buffer2.Initialize_Id; Color_Buffer.Initialize_Id; Array1.Initialize_Id; Array2.Initialize_Id; GL.Debug.Message_Insert (GL.Debug.Application, GL.Debug.Other, 2, GL.Debug.Notification, "Initialized objects"); Load_Shaders (Program); GL.Debug.Message_Insert (GL.Debug.Application, GL.Debug.Other, 3, GL.Debug.Notification, "Loaded shaders"); Load_Data (Array1, Array2, Vector_Buffer1, Color_Buffer, Vector_Buffer2); GL.Debug.Message_Insert (GL.Debug.Application, GL.Debug.Other, 4, GL.Debug.Notification, "Loaded data"); while Display_Backend.Window_Opened loop Clear (Buffer_Bits'(Color => True, Depth => True, others => False)); Array1.Bind; GL.Objects.Vertex_Arrays.Draw_Arrays (Triangles, 0, 3); Array2.Bind; GL.Attributes.Set_Single (1, 1.0, 0.0, 0.0); GL.Objects.Vertex_Arrays.Draw_Arrays (Triangles, 0, 3); GL.Objects.Vertex_Arrays.Null_Array_Object.Bind; GL.Flush; Display_Backend.Swap_Buffers; Display_Backend.Poll_Events; end loop; Display_Backend.Shutdown; end GL_Test.Debugging;
micahwelf/FLTK-Ada
Ada
2,308
ads
package FLTK.Images is type Image is new Wrapper with private; type Image_Reference (Data : not null access Image'Class) is limited null record with Implicit_Dereference => Data; type Scaling_Kind is (Nearest, Bilinear); type Blend is new Float range 0.0 .. 1.0; No_Image_Error, File_Access_Error, Format_Error : exception; package Forge is function Create (Width, Height, Depth : in Natural) return Image; end Forge; function Get_Copy_Algorithm return Scaling_Kind; procedure Set_Copy_Algorithm (To : in Scaling_Kind); function Copy (This : in Image; Width, Height : in Natural) return Image'Class; function Copy (This : in Image) return Image'Class; procedure Color_Average (This : in out Image; Col : in Color; Amount : in Blend); procedure Desaturate (This : in out Image); procedure Inactive (This : in out Image); function Is_Empty (This : in Image) return Boolean; function Get_W (This : in Image) return Natural; function Get_H (This : in Image) return Natural; function Get_D (This : in Image) return Natural; procedure Draw (This : in Image; X, Y : in Integer); procedure Draw (This : in Image; X, Y, W, H : in Integer; CX, CY : in Integer := 0); procedure Draw_Empty (This : in Image; X, Y : in Integer); private type Image is new Wrapper with null record; overriding procedure Finalize (This : in out Image); pragma Inline (Copy); pragma Inline (Color_Average); pragma Inline (Desaturate); pragma Inline (Inactive); pragma Inline (Is_Empty); pragma Inline (Get_W); pragma Inline (Get_H); pragma Inline (Get_D); pragma Inline (Draw); pragma Inline (Draw_Empty); function fl_image_fail (I : in System.Address) return Interfaces.C.int; pragma Import (C, fl_image_fail, "fl_image_fail"); end FLTK.Images;
Black-Photon/Programming-Language-of-the-Month
Ada
84
ads
with types; function get_rod_absorption (a : types.Rod_Array) return types.Percent;
charlie5/lace
Ada
371
ads
with GL; package openGL.Variable -- -- Models a shader variable. -- is type Item is abstract tagged private; --------- -- Forge -- procedure define (Self : in out Item); procedure destroy (Self : in out Item); private type Item is abstract tagged record gl_Variable : gl.GLint; end record; end openGL.Variable;
reznikmm/matreshka
Ada
4,041
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.Meta_Character_Count_Attributes; package Matreshka.ODF_Meta.Character_Count_Attributes is type Meta_Character_Count_Attribute_Node is new Matreshka.ODF_Meta.Abstract_Meta_Attribute_Node and ODF.DOM.Meta_Character_Count_Attributes.ODF_Meta_Character_Count_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Meta_Character_Count_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Meta_Character_Count_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Meta.Character_Count_Attributes;
reznikmm/matreshka
Ada
3,687
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.Read_Link_Object_End_Qualifier_Actions.Hash is new AMF.Elements.Generic_Hash (UML_Read_Link_Object_End_Qualifier_Action, UML_Read_Link_Object_End_Qualifier_Action_Access);
zhmu/ananas
Ada
676
adb
-- { dg-do compile } with Ada.Containers.Indefinite_Holders; procedure Discr51 is package Inner is type Str (<>) is private; private type Str is array (Positive range <>) of Character; end Inner; package Inner2 is type Str2 (<>) is private; private type str2 is new inner.Str; end Inner2; type Str3 is new Inner.str; package Str_Holders is new Ada.Containers.Indefinite_Holders (Inner.Str, Inner."="); package Str2_Holders is new Ada.Containers.Indefinite_Holders (Inner2.Str2, Inner2."="); package Str3_Holders is new Ada.Containers.Indefinite_Holders (Str3, "="); begin null; end Discr51;
onox/sdlada
Ada
5,777
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 Interfaces.C; with Interfaces.C.Strings; package body SDL.Log is package C renames Interfaces.C; procedure Put (Message : in String) is procedure SDL_Log (Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_Log"; begin SDL_Log (C.To_C (Message)); end Put; procedure Put (Message : in String; Category : in Categories; Priority : in Priorities) is procedure SDL_Log (Category : in Categories; Priority : in Priorities; Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_LogMessage"; begin SDL_Log (Category, Priority, C.To_C (Message)); end Put; procedure Put_Critical (Message : in String; Category : in Categories := Application) is procedure SDL_Log (Category : in Categories; Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_LogCritical"; begin SDL_Log (Category, C.To_C (Message)); end Put_Critical; procedure Put_Debug (Message : in String; Category : in Categories := Application) is procedure SDL_Log (Category : in Categories; Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_LogDebug"; begin SDL_Log (Category, C.To_C (Message)); end Put_Debug; procedure Put_Error (Message : in String; Category : in Categories := Application) is procedure SDL_Log (Category : in Categories; Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_LogError"; begin SDL_Log (Category, C.To_C (Message)); end Put_Error; procedure Put_Info (Message : in String; Category : in Categories := Application) is procedure SDL_Log (Category : in Categories; Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_LogInfo"; begin SDL_Log (Category, C.To_C (Message)); end Put_Info; procedure Put_Verbose (Message : in String; Category : in Categories := Application) is procedure SDL_Log (Category : in Categories; Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_LogVerbose"; begin SDL_Log (Category, C.To_C (Message)); end Put_Verbose; procedure Put_Warn (Message : in String; Category : in Categories := Application) is procedure SDL_Log (Category : in Categories; Message : in C.char_array) with Import => True, Convention => C, External_Name => "SDL_LogWarn"; begin SDL_Log (Category, C.To_C (Message)); end Put_Warn; procedure Reset_Priorities is procedure SDL_Reset_Priorities with Import => True, Convention => C, External_Name => "SDL_LogResetPriorities"; begin SDL_Reset_Priorities; end Reset_Priorities; procedure Set (Priority : in Priorities) is procedure SDL_Set_All_Priorities (Priority : in Priorities) with Import => True, Convention => C, External_Name => "SDL_LogSetAllPriority"; begin SDL_Set_All_Priorities (Priority); end Set; procedure Set (Category : in Categories; Priority : in Priorities) is procedure SDL_Set_Priority (Category : in Categories; Priority : in Priorities) with Import => True, Convention => C, External_Name => "SDL_LogSetPriority"; begin SDL_Set_Priority (Category, Priority); end Set; -- Logging. -- A local record type which gets initialised with an access to callback -- and a copy to the actual user data. type Local_User_Data is record Callback : Output_Callback; Data : Root_User_Data; end record with Convention => C; procedure Local_Callback (User_Data : in Local_User_Data; Category : in Categories; Priority : in Priorities; Message : in C.Strings.chars_ptr) with Convention => C; procedure Local_Callback (User_Data : in Local_User_Data; Category : in Categories; Priority : in Priorities; Message : in C.Strings.chars_ptr) is begin -- Call the Ada callback now. User_Data.Callback (User_Data.Data, Category, Priority, C.Strings.Value (Message)); end Local_Callback; end SDL.Log;
reznikmm/matreshka
Ada
3,977
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.Text_Chapter_Attributes; package Matreshka.ODF_Text.Chapter_Attributes is type Text_Chapter_Attribute_Node is new Matreshka.ODF_Text.Abstract_Text_Attribute_Node and ODF.DOM.Text_Chapter_Attributes.ODF_Text_Chapter_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Text_Chapter_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Text_Chapter_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Text.Chapter_Attributes;
Fabien-Chouteau/GESTE
Ada
63,046
ads
package GESTE_Fonts.FreeSansBold12pt7b is Font : constant Bitmap_Font_Ref; private FreeSansBold12pt7bBitmaps : 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 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#1E#, 16#70#, 16#00#, 16#3C#, 16#E0#, 16#00#, 16#79#, 16#C0#, 16#00#, 16#E3#, 16#80#, 16#00#, 16#C7#, 16#00#, 16#01#, 16#84#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#1C#, 16#E0#, 16#00#, 16#31#, 16#80#, 16#03#, 16#FF#, 16#C0#, 16#07#, 16#FF#, 16#80#, 16#0F#, 16#FF#, 16#00#, 16#07#, 16#38#, 16#00#, 16#0C#, 16#60#, 16#00#, 16#18#, 16#C0#, 16#01#, 16#FF#, 16#E0#, 16#03#, 16#FF#, 16#C0#, 16#07#, 16#FF#, 16#80#, 16#03#, 16#18#, 16#00#, 16#06#, 16#30#, 16#00#, 16#1C#, 16#E0#, 16#00#, 16#39#, 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#80#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#7F#, 16#E0#, 16#01#, 16#E9#, 16#C0#, 16#03#, 16#93#, 16#80#, 16#07#, 16#20#, 16#00#, 16#0F#, 16#40#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#04#, 16#E0#, 16#01#, 16#C9#, 16#E0#, 16#03#, 16#93#, 16#C0#, 16#07#, 16#A7#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#0F#, 16#F8#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#02#, 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#00#, 16#00#, 16#00#, 16#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#01#, 16#80#, 16#3F#, 16#03#, 16#00#, 16#FF#, 16#0C#, 16#01#, 16#8E#, 16#10#, 16#03#, 16#0C#, 16#60#, 16#06#, 16#39#, 16#80#, 16#0F#, 16#F3#, 16#00#, 16#0F#, 16#CC#, 16#00#, 16#0F#, 16#19#, 16#E0#, 16#00#, 16#67#, 16#F0#, 16#00#, 16#DF#, 16#E0#, 16#03#, 16#38#, 16#E0#, 16#04#, 16#61#, 16#C0#, 16#18#, 16#E3#, 16#80#, 16#61#, 16#FE#, 16#00#, 16#C1#, 16#FC#, 16#03#, 16#01#, 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#03#, 16#E0#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#79#, 16#C0#, 16#00#, 16#E3#, 16#80#, 16#01#, 16#EF#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#0F#, 16#E3#, 16#00#, 16#3D#, 16#EE#, 16#00#, 16#71#, 16#FC#, 16#01#, 16#E1#, 16#F8#, 16#03#, 16#C1#, 16#E0#, 16#03#, 16#C7#, 16#C0#, 16#07#, 16#FF#, 16#C0#, 16#07#, 16#FB#, 16#C0#, 16#07#, 16#E7#, 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#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#C0#, 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#01#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#01#, 16#C0#, 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#02#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#69#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#03#, 16#60#, 16#00#, 16#04#, 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#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#C0#, 16#00#, 16#01#, 16#80#, 16#00#, 16#03#, 16#00#, 16#00#, 16#FF#, 16#F0#, 16#01#, 16#FF#, 16#E0#, 16#03#, 16#FF#, 16#C0#, 16#00#, 16#30#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#C0#, 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#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#C0#, 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#7E#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#01#, 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#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 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#02#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#40#, 16#00#, 16#01#, 16#80#, 16#00#, 16#03#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#80#, 16#00#, 16#03#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#30#, 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#07#, 16#C0#, 16#00#, 16#1F#, 16#E0#, 16#00#, 16#7F#, 16#C0#, 16#01#, 16#E3#, 16#C0#, 16#03#, 16#C3#, 16#80#, 16#07#, 16#07#, 16#00#, 16#0E#, 16#0E#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#38#, 16#38#, 16#00#, 16#70#, 16#70#, 16#00#, 16#E0#, 16#E0#, 16#01#, 16#C1#, 16#C0#, 16#03#, 16#C3#, 16#80#, 16#07#, 16#8F#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#07#, 16#F8#, 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#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 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#07#, 16#C0#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#7F#, 16#E0#, 16#01#, 16#E3#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#70#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#1F#, 16#FC#, 16#00#, 16#3F#, 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#07#, 16#C0#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#FF#, 16#C0#, 16#01#, 16#E3#, 16#C0#, 16#03#, 16#87#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#8F#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#0F#, 16#F8#, 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#01#, 16#F0#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#6F#, 16#00#, 16#01#, 16#DE#, 16#00#, 16#03#, 16#3C#, 16#00#, 16#0E#, 16#78#, 16#00#, 16#38#, 16#F0#, 16#00#, 16#61#, 16#E0#, 16#00#, 16#FF#, 16#F0#, 16#01#, 16#FF#, 16#E0#, 16#03#, 16#FF#, 16#C0#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 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#0F#, 16#F8#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#80#, 16#00#, 16#03#, 16#78#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#1F#, 16#FC#, 16#00#, 16#3C#, 16#78#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#07#, 16#0F#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#0F#, 16#F8#, 16#00#, 16#0F#, 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#07#, 16#E0#, 16#00#, 16#1F#, 16#E0#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#E1#, 16#C0#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#3C#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#1F#, 16#FC#, 16#00#, 16#3C#, 16#78#, 16#00#, 16#70#, 16#70#, 16#00#, 16#E0#, 16#E0#, 16#01#, 16#C1#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#8F#, 16#00#, 16#07#, 16#FC#, 16#00#, 16#07#, 16#F8#, 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#3F#, 16#FC#, 16#00#, 16#7F#, 16#F8#, 16#00#, 16#FF#, 16#F0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#80#, 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#07#, 16#C0#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#7F#, 16#C0#, 16#01#, 16#E3#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#07#, 16#00#, 16#07#, 16#1E#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#78#, 16#F0#, 16#00#, 16#E0#, 16#E0#, 16#01#, 16#C1#, 16#E0#, 16#03#, 16#83#, 16#C0#, 16#07#, 16#8F#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#0F#, 16#F8#, 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#07#, 16#C0#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#7F#, 16#C0#, 16#01#, 16#E3#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#07#, 16#00#, 16#0E#, 16#0E#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#3C#, 16#78#, 16#00#, 16#7F#, 16#F0#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#3D#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#07#, 16#0F#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#0F#, 16#F0#, 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#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 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#0F#, 16#00#, 16#00#, 16#1E#, 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#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 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#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#C0#, 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#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#1E#, 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#1F#, 16#FE#, 16#00#, 16#3F#, 16#FC#, 16#00#, 16#7F#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#80#, 16#0F#, 16#FF#, 16#00#, 16#1F#, 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#0E#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#FC#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#1E#, 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#01#, 16#F0#, 16#00#, 16#0F#, 16#F8#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#78#, 16#F0#, 16#00#, 16#E0#, 16#E0#, 16#01#, 16#C1#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 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#1F#, 16#C0#, 16#00#, 16#FF#, 16#E0#, 16#07#, 16#81#, 16#F0#, 16#1C#, 16#00#, 16#F0#, 16#70#, 16#00#, 16#F1#, 16#C1#, 16#EE#, 16#E3#, 16#07#, 16#F8#, 16#CE#, 16#1C#, 16#71#, 16#DC#, 16#70#, 16#E3#, 16#B0#, 16#C1#, 16#87#, 16#63#, 16#83#, 16#0E#, 16#C7#, 16#06#, 16#19#, 16#8E#, 16#1C#, 16#73#, 16#1C#, 16#79#, 16#C7#, 16#1F#, 16#FF#, 16#07#, 16#1E#, 16#3C#, 16#0E#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#0F#, 16#81#, 16#80#, 16#0F#, 16#FF#, 16#00#, 16#03#, 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#F8#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#3B#, 16#80#, 16#00#, 16#F7#, 16#80#, 16#01#, 16#CF#, 16#00#, 16#03#, 16#8E#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#1C#, 16#3C#, 16#00#, 16#7F#, 16#F8#, 16#00#, 16#FF#, 16#F8#, 16#01#, 16#FF#, 16#F0#, 16#07#, 16#80#, 16#E0#, 16#0F#, 16#01#, 16#E0#, 16#1C#, 16#03#, 16#C0#, 16#78#, 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#0F#, 16#FE#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#78#, 16#3C#, 16#00#, 16#F0#, 16#38#, 16#01#, 16#E0#, 16#70#, 16#03#, 16#C1#, 16#E0#, 16#07#, 16#FF#, 16#80#, 16#0F#, 16#FE#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#3C#, 16#0E#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#F0#, 16#07#, 16#FF#, 16#C0#, 16#0F#, 16#FF#, 16#00#, 16#1F#, 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#FC#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#7C#, 16#3E#, 16#00#, 16#F0#, 16#3C#, 16#03#, 16#C0#, 16#38#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#1C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#E1#, 16#F0#, 16#03#, 16#FF#, 16#C0#, 16#03#, 16#FF#, 16#00#, 16#01#, 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#0F#, 16#FC#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#78#, 16#3C#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#70#, 16#07#, 16#80#, 16#E0#, 16#0F#, 16#01#, 16#C0#, 16#1E#, 16#03#, 16#80#, 16#3C#, 16#07#, 16#00#, 16#78#, 16#0E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C1#, 16#E0#, 16#07#, 16#FF#, 16#C0#, 16#0F#, 16#FF#, 16#00#, 16#1F#, 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#0F#, 16#FF#, 16#80#, 16#1F#, 16#FF#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#FF#, 16#80#, 16#0F#, 16#FF#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#FF#, 16#C0#, 16#0F#, 16#FF#, 16#80#, 16#1F#, 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#0F#, 16#FF#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#3F#, 16#FC#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#1F#, 16#FC#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 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#FE#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#7C#, 16#1F#, 16#00#, 16#F0#, 16#1E#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#0F#, 16#E0#, 16#3C#, 16#1F#, 16#C0#, 16#78#, 16#3F#, 16#80#, 16#F0#, 16#07#, 16#00#, 16#E0#, 16#0E#, 16#01#, 16#E0#, 16#3C#, 16#01#, 16#E0#, 16#F8#, 16#03#, 16#FF#, 16#F0#, 16#03#, 16#FE#, 16#60#, 16#01#, 16#F8#, 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#0F#, 16#03#, 16#C0#, 16#1E#, 16#07#, 16#80#, 16#3C#, 16#0F#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#F0#, 16#07#, 16#FF#, 16#E0#, 16#0F#, 16#FF#, 16#C0#, 16#1F#, 16#FF#, 16#80#, 16#3C#, 16#0F#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#F0#, 16#07#, 16#81#, 16#E0#, 16#0F#, 16#03#, 16#C0#, 16#1E#, 16#07#, 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#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 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#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#E1#, 16#E0#, 16#01#, 16#C3#, 16#C0#, 16#03#, 16#87#, 16#80#, 16#07#, 16#8F#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#0F#, 16#F8#, 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#0F#, 16#03#, 16#C0#, 16#1E#, 16#0F#, 16#00#, 16#3C#, 16#3C#, 16#00#, 16#78#, 16#F0#, 16#00#, 16#F3#, 16#E0#, 16#01#, 16#E7#, 16#80#, 16#03#, 16#DE#, 16#00#, 16#07#, 16#F8#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#3E#, 16#F0#, 16#00#, 16#79#, 16#E0#, 16#00#, 16#F1#, 16#E0#, 16#01#, 16#E1#, 16#E0#, 16#03#, 16#C1#, 16#E0#, 16#07#, 16#83#, 16#C0#, 16#0F#, 16#03#, 16#C0#, 16#1E#, 16#03#, 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#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#FF#, 16#80#, 16#0F#, 16#FF#, 16#00#, 16#1F#, 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#0F#, 16#81#, 16#F8#, 16#1F#, 16#83#, 16#F0#, 16#3F#, 16#07#, 16#E0#, 16#7E#, 16#0F#, 16#C0#, 16#FC#, 16#1F#, 16#81#, 16#FC#, 16#7F#, 16#03#, 16#F8#, 16#FE#, 16#07#, 16#F1#, 16#FC#, 16#0F#, 16#E3#, 16#78#, 16#1E#, 16#CE#, 16#F0#, 16#3D#, 16#DD#, 16#E0#, 16#7B#, 16#BB#, 16#C0#, 16#F7#, 16#77#, 16#81#, 16#E6#, 16#CF#, 16#03#, 16#CF#, 16#9E#, 16#07#, 16#9F#, 16#3C#, 16#0F#, 16#3E#, 16#78#, 16#1E#, 16#38#, 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#0F#, 16#01#, 16#C0#, 16#1E#, 16#03#, 16#80#, 16#3E#, 16#07#, 16#00#, 16#7E#, 16#0E#, 16#00#, 16#FC#, 16#1C#, 16#01#, 16#FC#, 16#38#, 16#03#, 16#F8#, 16#70#, 16#07#, 16#B8#, 16#E0#, 16#0F#, 16#71#, 16#C0#, 16#1E#, 16#73#, 16#80#, 16#3C#, 16#F7#, 16#00#, 16#78#, 16#EE#, 16#00#, 16#F1#, 16#FC#, 16#01#, 16#E1#, 16#F8#, 16#03#, 16#C1#, 16#F0#, 16#07#, 16#83#, 16#E0#, 16#0F#, 16#03#, 16#C0#, 16#1E#, 16#07#, 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#FC#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#7C#, 16#3E#, 16#00#, 16#F0#, 16#1E#, 16#03#, 16#C0#, 16#3C#, 16#07#, 16#80#, 16#3C#, 16#0F#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#F0#, 16#07#, 16#81#, 16#E0#, 16#1E#, 16#01#, 16#E0#, 16#3C#, 16#03#, 16#E1#, 16#F0#, 16#03#, 16#FF#, 16#E0#, 16#03#, 16#FF#, 16#00#, 16#01#, 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#0F#, 16#FC#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#78#, 16#3C#, 16#00#, 16#F0#, 16#38#, 16#01#, 16#E0#, 16#70#, 16#03#, 16#C0#, 16#E0#, 16#07#, 16#83#, 16#C0#, 16#0F#, 16#FF#, 16#80#, 16#1F#, 16#FE#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 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#FC#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#7C#, 16#3E#, 16#00#, 16#F0#, 16#1E#, 16#03#, 16#C0#, 16#3C#, 16#07#, 16#80#, 16#3C#, 16#0F#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#F0#, 16#27#, 16#80#, 16#E0#, 16#EE#, 16#01#, 16#E1#, 16#FC#, 16#03#, 16#E1#, 16#F0#, 16#03#, 16#FF#, 16#E0#, 16#03#, 16#FF#, 16#E0#, 16#01#, 16#F8#, 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#0F#, 16#FF#, 16#00#, 16#1F#, 16#FF#, 16#00#, 16#3F#, 16#FF#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#F0#, 16#07#, 16#81#, 16#C0#, 16#0F#, 16#FF#, 16#80#, 16#1F#, 16#FC#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#78#, 16#3C#, 16#00#, 16#F0#, 16#38#, 16#01#, 16#E0#, 16#70#, 16#03#, 16#C0#, 16#E0#, 16#07#, 16#81#, 16#C0#, 16#0F#, 16#03#, 16#C0#, 16#1E#, 16#07#, 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#01#, 16#F8#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#3F#, 16#FC#, 16#00#, 16#78#, 16#7C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#01#, 16#FE#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#38#, 16#03#, 16#C0#, 16#70#, 16#07#, 16#C1#, 16#E0#, 16#07#, 16#FF#, 16#80#, 16#07#, 16#FE#, 16#00#, 16#03#, 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#1F#, 16#FF#, 16#80#, 16#3F#, 16#FF#, 16#00#, 16#7F#, 16#FE#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 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#0F#, 16#03#, 16#C0#, 16#1E#, 16#07#, 16#80#, 16#3C#, 16#0F#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#C0#, 16#F0#, 16#07#, 16#81#, 16#E0#, 16#0F#, 16#03#, 16#C0#, 16#1E#, 16#07#, 16#80#, 16#3C#, 16#0F#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#F0#, 16#3C#, 16#01#, 16#E0#, 16#78#, 16#03#, 16#E1#, 16#E0#, 16#03#, 16#FF#, 16#C0#, 16#03#, 16#FF#, 16#00#, 16#01#, 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#1C#, 16#03#, 16#80#, 16#3C#, 16#0F#, 16#00#, 16#78#, 16#1E#, 16#00#, 16#70#, 16#38#, 16#00#, 16#E0#, 16#70#, 16#01#, 16#E1#, 16#E0#, 16#01#, 16#C3#, 16#80#, 16#03#, 16#87#, 16#00#, 16#07#, 16#9E#, 16#00#, 16#07#, 16#38#, 16#00#, 16#0E#, 16#70#, 16#00#, 16#1C#, 16#E0#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 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#1C#, 16#0E#, 16#07#, 16#3C#, 16#3E#, 16#1E#, 16#78#, 16#7C#, 16#3C#, 16#F0#, 16#F8#, 16#78#, 16#E1#, 16#B0#, 16#E1#, 16#C3#, 16#61#, 16#C3#, 16#CE#, 16#E7#, 16#83#, 16#9D#, 16#CF#, 16#07#, 16#3B#, 16#9C#, 16#0E#, 16#63#, 16#38#, 16#1C#, 16#C6#, 16#70#, 16#1F#, 16#8E#, 16#C0#, 16#3F#, 16#1F#, 16#80#, 16#7E#, 16#3F#, 16#00#, 16#F8#, 16#3E#, 16#00#, 16#F0#, 16#78#, 16#01#, 16#E0#, 16#F0#, 16#03#, 16#C1#, 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#1E#, 16#07#, 16#80#, 16#1E#, 16#1F#, 16#00#, 16#3C#, 16#3C#, 16#00#, 16#3C#, 16#F0#, 16#00#, 16#79#, 16#E0#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#1F#, 16#E0#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#F3#, 16#C0#, 16#01#, 16#E3#, 16#C0#, 16#07#, 16#87#, 16#80#, 16#1F#, 16#07#, 16#80#, 16#3C#, 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#3C#, 16#07#, 16#80#, 16#3C#, 16#0E#, 16#00#, 16#38#, 16#3C#, 16#00#, 16#78#, 16#70#, 16#00#, 16#71#, 16#E0#, 16#00#, 16#F3#, 16#C0#, 16#00#, 16#EF#, 16#00#, 16#01#, 16#FE#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 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#1F#, 16#FF#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#78#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#FF#, 16#80#, 16#1F#, 16#FF#, 16#00#, 16#3F#, 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#0F#, 16#80#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#01#, 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#40#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#80#, 16#00#, 16#01#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#01#, 16#80#, 16#00#, 16#01#, 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#3F#, 16#00#, 16#00#, 16#7E#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#07#, 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#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#6E#, 16#00#, 16#01#, 16#CE#, 16#00#, 16#03#, 16#9C#, 16#00#, 16#06#, 16#18#, 16#00#, 16#1C#, 16#38#, 16#00#, 16#38#, 16#70#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#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#1C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 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#7E#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#1E#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#7F#, 16#E0#, 16#01#, 16#E1#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#8F#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#0F#, 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#DF#, 16#00#, 16#03#, 16#FF#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#1C#, 16#1E#, 16#00#, 16#38#, 16#3C#, 16#00#, 16#70#, 16#38#, 16#00#, 16#E0#, 16#F0#, 16#01#, 16#C1#, 16#E0#, 16#03#, 16#C7#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#1D#, 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#7E#, 16#00#, 16#01#, 16#FE#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#1E#, 16#1C#, 16#00#, 16#3C#, 16#3C#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#C3#, 16#C0#, 16#07#, 16#87#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#07#, 16#F8#, 16#00#, 16#07#, 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#79#, 16#C0#, 16#01#, 16#FF#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#3C#, 16#1C#, 16#00#, 16#70#, 16#38#, 16#00#, 16#E0#, 16#70#, 16#01#, 16#C0#, 16#E0#, 16#03#, 16#C1#, 16#C0#, 16#07#, 16#C7#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#07#, 16#DC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#00#, 16#01#, 16#FE#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#1E#, 16#1E#, 16#00#, 16#38#, 16#3C#, 16#00#, 16#7F#, 16#F8#, 16#00#, 16#FF#, 16#F0#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#87#, 16#80#, 16#07#, 16#FE#, 16#00#, 16#07#, 16#F8#, 16#00#, 16#07#, 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#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#F8#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 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#79#, 16#C0#, 16#01#, 16#FB#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#3C#, 16#3C#, 16#00#, 16#70#, 16#38#, 16#00#, 16#E0#, 16#70#, 16#01#, 16#C0#, 16#E0#, 16#03#, 16#C1#, 16#C0#, 16#07#, 16#87#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#07#, 16#9C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#01#, 16#E1#, 16#E0#, 16#01#, 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#CF#, 16#00#, 16#03#, 16#FF#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#1C#, 16#3C#, 16#00#, 16#38#, 16#38#, 16#00#, 16#70#, 16#70#, 16#00#, 16#E0#, 16#E0#, 16#01#, 16#C1#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#07#, 16#00#, 16#0E#, 16#0E#, 16#00#, 16#1C#, 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#03#, 16#E0#, 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C3#, 16#C0#, 16#03#, 16#8F#, 16#00#, 16#07#, 16#3C#, 16#00#, 16#0E#, 16#F0#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#7F#, 16#00#, 16#00#, 16#FF#, 16#00#, 16#01#, 16#CF#, 16#00#, 16#03#, 16#9E#, 16#00#, 16#07#, 16#1E#, 16#00#, 16#0E#, 16#1C#, 16#00#, 16#1C#, 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#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 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#01#, 16#DF#, 16#1E#, 16#03#, 16#FF#, 16#FE#, 16#07#, 16#FF#, 16#FE#, 16#0F#, 16#1E#, 16#3C#, 16#1C#, 16#3C#, 16#38#, 16#38#, 16#70#, 16#70#, 16#70#, 16#E0#, 16#E0#, 16#E1#, 16#C1#, 16#C1#, 16#C3#, 16#83#, 16#83#, 16#87#, 16#07#, 16#07#, 16#0E#, 16#0E#, 16#0E#, 16#1C#, 16#1C#, 16#1C#, 16#38#, 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#01#, 16#CF#, 16#00#, 16#03#, 16#FF#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#38#, 16#38#, 16#00#, 16#70#, 16#70#, 16#00#, 16#E0#, 16#E0#, 16#01#, 16#C1#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#07#, 16#00#, 16#0E#, 16#0E#, 16#00#, 16#1C#, 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#3E#, 16#00#, 16#01#, 16#FF#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#3C#, 16#1E#, 16#00#, 16#70#, 16#3C#, 16#00#, 16#E0#, 16#78#, 16#01#, 16#C0#, 16#F0#, 16#03#, 16#C1#, 16#E0#, 16#03#, 16#C7#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#07#, 16#FC#, 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#01#, 16#CF#, 16#00#, 16#03#, 16#FF#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#1C#, 16#1E#, 16#00#, 16#38#, 16#3C#, 16#00#, 16#70#, 16#38#, 16#00#, 16#E0#, 16#F0#, 16#01#, 16#C1#, 16#E0#, 16#03#, 16#C7#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#1C#, 16#F0#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 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#79#, 16#C0#, 16#01#, 16#FB#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#1E#, 16#00#, 16#3C#, 16#1C#, 16#00#, 16#70#, 16#38#, 16#00#, 16#E0#, 16#70#, 16#01#, 16#C0#, 16#E0#, 16#03#, 16#C1#, 16#C0#, 16#03#, 16#C7#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#07#, 16#9C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 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#01#, 16#CC#, 16#00#, 16#03#, 16#F8#, 16#00#, 16#07#, 16#F0#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 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#7C#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#1E#, 16#1C#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#07#, 16#07#, 16#00#, 16#0F#, 16#FE#, 16#00#, 16#0F#, 16#F8#, 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#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#0F#, 16#80#, 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#01#, 16#C1#, 16#C0#, 16#03#, 16#83#, 16#80#, 16#07#, 16#07#, 16#00#, 16#0E#, 16#0E#, 16#00#, 16#1C#, 16#1C#, 16#00#, 16#38#, 16#38#, 16#00#, 16#70#, 16#70#, 16#00#, 16#E0#, 16#E0#, 16#01#, 16#C1#, 16#C0#, 16#03#, 16#C7#, 16#80#, 16#07#, 16#FF#, 16#00#, 16#0F#, 16#EE#, 16#00#, 16#07#, 16#9C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#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#83#, 16#C0#, 16#07#, 16#07#, 16#00#, 16#0F#, 16#0E#, 16#00#, 16#1E#, 16#3C#, 16#00#, 16#1C#, 16#70#, 16#00#, 16#38#, 16#E0#, 16#00#, 16#3B#, 16#C0#, 16#00#, 16#77#, 16#00#, 16#00#, 16#EE#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#03#, 16#E0#, 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#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#87#, 16#0E#, 16#07#, 16#1E#, 16#1C#, 16#0E#, 16#3E#, 16#78#, 16#1E#, 16#7C#, 16#F0#, 16#3C#, 16#D9#, 16#C0#, 16#39#, 16#B3#, 16#80#, 16#77#, 16#77#, 16#00#, 16#EE#, 16#FC#, 16#00#, 16#F9#, 16#F8#, 16#01#, 16#F1#, 16#F0#, 16#03#, 16#E3#, 16#E0#, 16#07#, 16#C7#, 16#80#, 16#07#, 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#03#, 16#C7#, 16#80#, 16#07#, 16#8F#, 16#00#, 16#07#, 16#BC#, 16#00#, 16#07#, 16#70#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#01#, 16#DE#, 16#00#, 16#07#, 16#BC#, 16#00#, 16#1E#, 16#3C#, 16#00#, 16#3C#, 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#07#, 16#83#, 16#C0#, 16#07#, 16#07#, 16#00#, 16#0F#, 16#0E#, 16#00#, 16#0E#, 16#3C#, 16#00#, 16#1C#, 16#70#, 16#00#, 16#3C#, 16#E0#, 16#00#, 16#39#, 16#C0#, 16#00#, 16#77#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#01#, 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#03#, 16#FF#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#00#, 16#78#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#78#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#07#, 16#80#, 16#00#, 16#0F#, 16#FC#, 16#00#, 16#1F#, 16#F8#, 16#00#, 16#3F#, 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#03#, 16#C0#, 16#00#, 16#0F#, 16#80#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 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#0C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#01#, 16#80#, 16#00#, 16#03#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#01#, 16#80#, 16#00#, 16#03#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#C0#, 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#0E#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#00#, 16#07#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#01#, 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#38#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#01#, 16#39#, 16#80#, 16#00#, 16#3F#, 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#); Font_D : aliased constant Bitmap_Font := ( Bytes_Per_Glyph => 81, Glyph_Width => 23, Glyph_Height => 28, Data => FreeSansBold12pt7bBitmaps'Access); Font : constant Bitmap_Font_Ref := Font_D'Access; end GESTE_Fonts.FreeSansBold12pt7b;
MinimSecure/unum-sdk
Ada
801
ads
-- Copyright 2007-2019 Free Software Foundation, Inc. -- -- This program 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 3 of the License, or -- (at your option) any later version. -- -- 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. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. with System; package Pck is procedure Do_Nothing (A : System.Address); end Pck;
tum-ei-rcs/StratoX
Ada
59,721
ads
-- This spec has been automatically generated from STM32F427x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with System; with HAL; package STM32_SVD.DMA is pragma Preelaborate; --------------- -- Registers -- --------------- ------------------- -- LISR_Register -- ------------------- -- low interrupt status register type LISR_Register is record -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF0 : Boolean; -- unspecified Reserved_1_1 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF0 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF0 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF0 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF0 : Boolean; -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF1 : Boolean; -- unspecified Reserved_7_7 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF1 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF1 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF1 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF1 : Boolean; -- unspecified Reserved_12_15 : HAL.UInt4; -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF2 : Boolean; -- unspecified Reserved_17_17 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF2 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF2 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF2 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF2 : Boolean; -- Read-only. Stream x FIFO error interrupt flag (x=3..0) FEIF3 : Boolean; -- unspecified Reserved_23_23 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=3..0) DMEIF3 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=3..0) TEIF3 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=3..0) HTIF3 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x = 3..0) TCIF3 : Boolean; -- unspecified Reserved_28_31 : HAL.UInt4; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for LISR_Register use record FEIF0 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; DMEIF0 at 0 range 2 .. 2; TEIF0 at 0 range 3 .. 3; HTIF0 at 0 range 4 .. 4; TCIF0 at 0 range 5 .. 5; FEIF1 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; DMEIF1 at 0 range 8 .. 8; TEIF1 at 0 range 9 .. 9; HTIF1 at 0 range 10 .. 10; TCIF1 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; FEIF2 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; DMEIF2 at 0 range 18 .. 18; TEIF2 at 0 range 19 .. 19; HTIF2 at 0 range 20 .. 20; TCIF2 at 0 range 21 .. 21; FEIF3 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; DMEIF3 at 0 range 24 .. 24; TEIF3 at 0 range 25 .. 25; HTIF3 at 0 range 26 .. 26; TCIF3 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; ------------------- -- HISR_Register -- ------------------- -- high interrupt status register type HISR_Register is record -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF4 : Boolean; -- unspecified Reserved_1_1 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF4 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF4 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF4 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF4 : Boolean; -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF5 : Boolean; -- unspecified Reserved_7_7 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF5 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF5 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF5 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF5 : Boolean; -- unspecified Reserved_12_15 : HAL.UInt4; -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF6 : Boolean; -- unspecified Reserved_17_17 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF6 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF6 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF6 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF6 : Boolean; -- Read-only. Stream x FIFO error interrupt flag (x=7..4) FEIF7 : Boolean; -- unspecified Reserved_23_23 : HAL.Bit; -- Read-only. Stream x direct mode error interrupt flag (x=7..4) DMEIF7 : Boolean; -- Read-only. Stream x transfer error interrupt flag (x=7..4) TEIF7 : Boolean; -- Read-only. Stream x half transfer interrupt flag (x=7..4) HTIF7 : Boolean; -- Read-only. Stream x transfer complete interrupt flag (x=7..4) TCIF7 : Boolean; -- unspecified Reserved_28_31 : HAL.UInt4; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for HISR_Register use record FEIF4 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; DMEIF4 at 0 range 2 .. 2; TEIF4 at 0 range 3 .. 3; HTIF4 at 0 range 4 .. 4; TCIF4 at 0 range 5 .. 5; FEIF5 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; DMEIF5 at 0 range 8 .. 8; TEIF5 at 0 range 9 .. 9; HTIF5 at 0 range 10 .. 10; TCIF5 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; FEIF6 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; DMEIF6 at 0 range 18 .. 18; TEIF6 at 0 range 19 .. 19; HTIF6 at 0 range 20 .. 20; TCIF6 at 0 range 21 .. 21; FEIF7 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; DMEIF7 at 0 range 24 .. 24; TEIF7 at 0 range 25 .. 25; HTIF7 at 0 range 26 .. 26; TCIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -------------------- -- LIFCR_Register -- -------------------- -- low interrupt flag clear register type LIFCR_Register is record -- Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF0 : Boolean := False; -- unspecified Reserved_1_1 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 3..0) CDMEIF0 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 3..0) CTEIF0 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 3..0) CHTIF0 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 3..0) CTCIF0 : Boolean := False; -- Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF1 : Boolean := False; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 3..0) CDMEIF1 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 3..0) CTEIF1 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 3..0) CHTIF1 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 3..0) CTCIF1 : Boolean := False; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF2 : Boolean := False; -- unspecified Reserved_17_17 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 3..0) CDMEIF2 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 3..0) CTEIF2 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 3..0) CHTIF2 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 3..0) CTCIF2 : Boolean := False; -- Stream x clear FIFO error interrupt flag (x = 3..0) CFEIF3 : Boolean := False; -- unspecified Reserved_23_23 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 3..0) CDMEIF3 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 3..0) CTEIF3 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 3..0) CHTIF3 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 3..0) CTCIF3 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for LIFCR_Register use record CFEIF0 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; CDMEIF0 at 0 range 2 .. 2; CTEIF0 at 0 range 3 .. 3; CHTIF0 at 0 range 4 .. 4; CTCIF0 at 0 range 5 .. 5; CFEIF1 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; CDMEIF1 at 0 range 8 .. 8; CTEIF1 at 0 range 9 .. 9; CHTIF1 at 0 range 10 .. 10; CTCIF1 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; CFEIF2 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; CDMEIF2 at 0 range 18 .. 18; CTEIF2 at 0 range 19 .. 19; CHTIF2 at 0 range 20 .. 20; CTCIF2 at 0 range 21 .. 21; CFEIF3 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; CDMEIF3 at 0 range 24 .. 24; CTEIF3 at 0 range 25 .. 25; CHTIF3 at 0 range 26 .. 26; CTCIF3 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -------------------- -- HIFCR_Register -- -------------------- -- high interrupt flag clear register type HIFCR_Register is record -- Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF4 : Boolean := False; -- unspecified Reserved_1_1 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 7..4) CDMEIF4 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 7..4) CTEIF4 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 7..4) CHTIF4 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 7..4) CTCIF4 : Boolean := False; -- Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF5 : Boolean := False; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 7..4) CDMEIF5 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 7..4) CTEIF5 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 7..4) CHTIF5 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 7..4) CTCIF5 : Boolean := False; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF6 : Boolean := False; -- unspecified Reserved_17_17 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 7..4) CDMEIF6 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 7..4) CTEIF6 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 7..4) CHTIF6 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 7..4) CTCIF6 : Boolean := False; -- Stream x clear FIFO error interrupt flag (x = 7..4) CFEIF7 : Boolean := False; -- unspecified Reserved_23_23 : HAL.Bit := 16#0#; -- Stream x clear direct mode error interrupt flag (x = 7..4) CDMEIF7 : Boolean := False; -- Stream x clear transfer error interrupt flag (x = 7..4) CTEIF7 : Boolean := False; -- Stream x clear half transfer interrupt flag (x = 7..4) CHTIF7 : Boolean := False; -- Stream x clear transfer complete interrupt flag (x = 7..4) CTCIF7 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for HIFCR_Register use record CFEIF4 at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; CDMEIF4 at 0 range 2 .. 2; CTEIF4 at 0 range 3 .. 3; CHTIF4 at 0 range 4 .. 4; CTCIF4 at 0 range 5 .. 5; CFEIF5 at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; CDMEIF5 at 0 range 8 .. 8; CTEIF5 at 0 range 9 .. 9; CHTIF5 at 0 range 10 .. 10; CTCIF5 at 0 range 11 .. 11; Reserved_12_15 at 0 range 12 .. 15; CFEIF6 at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; CDMEIF6 at 0 range 18 .. 18; CTEIF6 at 0 range 19 .. 19; CHTIF6 at 0 range 20 .. 20; CTCIF6 at 0 range 21 .. 21; CFEIF7 at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; CDMEIF7 at 0 range 24 .. 24; CTEIF7 at 0 range 25 .. 25; CHTIF7 at 0 range 26 .. 26; CTCIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; ------------------- -- S0CR_Register -- ------------------- subtype S0CR_DIR_Field is HAL.UInt2; subtype S0CR_PSIZE_Field is HAL.UInt2; subtype S0CR_MSIZE_Field is HAL.UInt2; subtype S0CR_PL_Field is HAL.UInt2; subtype S0CR_PBURST_Field is HAL.UInt2; subtype S0CR_MBURST_Field is HAL.UInt2; subtype S0CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S0CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S0CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S0CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S0CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S0CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- Peripheral burst transfer configuration PBURST : S0CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S0CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S0CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S0CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S0NDTR_Register -- --------------------- subtype S0NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S0NDTR_Register is record -- Number of data items to transfer NDT : S0NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S0NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S0FCR_Register -- -------------------- subtype S0FCR_FTH_Field is HAL.UInt2; subtype S0FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S0FCR_Register is record -- FIFO threshold selection FTH : S0FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S0FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S0FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------- -- S1CR_Register -- ------------------- subtype S1CR_DIR_Field is HAL.UInt2; subtype S1CR_PSIZE_Field is HAL.UInt2; subtype S1CR_MSIZE_Field is HAL.UInt2; subtype S1CR_PL_Field is HAL.UInt2; subtype S1CR_PBURST_Field is HAL.UInt2; subtype S1CR_MBURST_Field is HAL.UInt2; subtype S1CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S1CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S1CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S1CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S1CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S1CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- ACK ACK : Boolean := False; -- Peripheral burst transfer configuration PBURST : S1CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S1CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S1CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S1CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S1NDTR_Register -- --------------------- subtype S1NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S1NDTR_Register is record -- Number of data items to transfer NDT : S1NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S1NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S1FCR_Register -- -------------------- subtype S1FCR_FTH_Field is HAL.UInt2; subtype S1FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S1FCR_Register is record -- FIFO threshold selection FTH : S1FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S1FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S1FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------- -- S2CR_Register -- ------------------- subtype S2CR_DIR_Field is HAL.UInt2; subtype S2CR_PSIZE_Field is HAL.UInt2; subtype S2CR_MSIZE_Field is HAL.UInt2; subtype S2CR_PL_Field is HAL.UInt2; subtype S2CR_PBURST_Field is HAL.UInt2; subtype S2CR_MBURST_Field is HAL.UInt2; subtype S2CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S2CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S2CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S2CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S2CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S2CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- ACK ACK : Boolean := False; -- Peripheral burst transfer configuration PBURST : S2CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S2CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S2CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S2CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S2NDTR_Register -- --------------------- subtype S2NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S2NDTR_Register is record -- Number of data items to transfer NDT : S2NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S2NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S2FCR_Register -- -------------------- subtype S2FCR_FTH_Field is HAL.UInt2; subtype S2FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S2FCR_Register is record -- FIFO threshold selection FTH : S2FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S2FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S2FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------- -- S3CR_Register -- ------------------- subtype S3CR_DIR_Field is HAL.UInt2; subtype S3CR_PSIZE_Field is HAL.UInt2; subtype S3CR_MSIZE_Field is HAL.UInt2; subtype S3CR_PL_Field is HAL.UInt2; subtype S3CR_PBURST_Field is HAL.UInt2; subtype S3CR_MBURST_Field is HAL.UInt2; subtype S3CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S3CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S3CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S3CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S3CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S3CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- ACK ACK : Boolean := False; -- Peripheral burst transfer configuration PBURST : S3CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S3CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S3CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S3CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S3NDTR_Register -- --------------------- subtype S3NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S3NDTR_Register is record -- Number of data items to transfer NDT : S3NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S3NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S3FCR_Register -- -------------------- subtype S3FCR_FTH_Field is HAL.UInt2; subtype S3FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S3FCR_Register is record -- FIFO threshold selection FTH : S3FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S3FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S3FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------- -- S4CR_Register -- ------------------- subtype S4CR_DIR_Field is HAL.UInt2; subtype S4CR_PSIZE_Field is HAL.UInt2; subtype S4CR_MSIZE_Field is HAL.UInt2; subtype S4CR_PL_Field is HAL.UInt2; subtype S4CR_PBURST_Field is HAL.UInt2; subtype S4CR_MBURST_Field is HAL.UInt2; subtype S4CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S4CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S4CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S4CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S4CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S4CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- ACK ACK : Boolean := False; -- Peripheral burst transfer configuration PBURST : S4CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S4CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S4CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S4CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S4NDTR_Register -- --------------------- subtype S4NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S4NDTR_Register is record -- Number of data items to transfer NDT : S4NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S4NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S4FCR_Register -- -------------------- subtype S4FCR_FTH_Field is HAL.UInt2; subtype S4FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S4FCR_Register is record -- FIFO threshold selection FTH : S4FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S4FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S4FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------- -- S5CR_Register -- ------------------- subtype S5CR_DIR_Field is HAL.UInt2; subtype S5CR_PSIZE_Field is HAL.UInt2; subtype S5CR_MSIZE_Field is HAL.UInt2; subtype S5CR_PL_Field is HAL.UInt2; subtype S5CR_PBURST_Field is HAL.UInt2; subtype S5CR_MBURST_Field is HAL.UInt2; subtype S5CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S5CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S5CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S5CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S5CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S5CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- ACK ACK : Boolean := False; -- Peripheral burst transfer configuration PBURST : S5CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S5CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S5CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S5CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S5NDTR_Register -- --------------------- subtype S5NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S5NDTR_Register is record -- Number of data items to transfer NDT : S5NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S5NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S5FCR_Register -- -------------------- subtype S5FCR_FTH_Field is HAL.UInt2; subtype S5FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S5FCR_Register is record -- FIFO threshold selection FTH : S5FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S5FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S5FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------- -- S6CR_Register -- ------------------- subtype S6CR_DIR_Field is HAL.UInt2; subtype S6CR_PSIZE_Field is HAL.UInt2; subtype S6CR_MSIZE_Field is HAL.UInt2; subtype S6CR_PL_Field is HAL.UInt2; subtype S6CR_PBURST_Field is HAL.UInt2; subtype S6CR_MBURST_Field is HAL.UInt2; subtype S6CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S6CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S6CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S6CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S6CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S6CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- ACK ACK : Boolean := False; -- Peripheral burst transfer configuration PBURST : S6CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S6CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S6CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S6CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S6NDTR_Register -- --------------------- subtype S6NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S6NDTR_Register is record -- Number of data items to transfer NDT : S6NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S6NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S6FCR_Register -- -------------------- subtype S6FCR_FTH_Field is HAL.UInt2; subtype S6FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S6FCR_Register is record -- FIFO threshold selection FTH : S6FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S6FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S6FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------- -- S7CR_Register -- ------------------- subtype S7CR_DIR_Field is HAL.UInt2; subtype S7CR_PSIZE_Field is HAL.UInt2; subtype S7CR_MSIZE_Field is HAL.UInt2; subtype S7CR_PL_Field is HAL.UInt2; subtype S7CR_PBURST_Field is HAL.UInt2; subtype S7CR_MBURST_Field is HAL.UInt2; subtype S7CR_CHSEL_Field is HAL.UInt3; -- stream x configuration register type S7CR_Register is record -- Stream enable / flag stream ready when read low EN : Boolean := False; -- Direct mode error interrupt enable DMEIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Peripheral flow controller PFCTRL : Boolean := False; -- Data transfer direction DIR : S7CR_DIR_Field := 16#0#; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral data size PSIZE : S7CR_PSIZE_Field := 16#0#; -- Memory data size MSIZE : S7CR_MSIZE_Field := 16#0#; -- Peripheral increment offset size PINCOS : Boolean := False; -- Priority level PL : S7CR_PL_Field := 16#0#; -- Double buffer mode DBM : Boolean := False; -- Current target (only in double buffer mode) CT : Boolean := False; -- ACK ACK : Boolean := False; -- Peripheral burst transfer configuration PBURST : S7CR_PBURST_Field := 16#0#; -- Memory burst transfer configuration MBURST : S7CR_MBURST_Field := 16#0#; -- Channel selection CHSEL : S7CR_CHSEL_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S7CR_Register use record EN at 0 range 0 .. 0; DMEIE at 0 range 1 .. 1; TEIE at 0 range 2 .. 2; HTIE at 0 range 3 .. 3; TCIE at 0 range 4 .. 4; PFCTRL at 0 range 5 .. 5; DIR at 0 range 6 .. 7; CIRC at 0 range 8 .. 8; PINC at 0 range 9 .. 9; MINC at 0 range 10 .. 10; PSIZE at 0 range 11 .. 12; MSIZE at 0 range 13 .. 14; PINCOS at 0 range 15 .. 15; PL at 0 range 16 .. 17; DBM at 0 range 18 .. 18; CT at 0 range 19 .. 19; ACK at 0 range 20 .. 20; PBURST at 0 range 21 .. 22; MBURST at 0 range 23 .. 24; CHSEL at 0 range 25 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; --------------------- -- S7NDTR_Register -- --------------------- subtype S7NDTR_NDT_Field is HAL.Short; -- stream x number of data register type S7NDTR_Register is record -- Number of data items to transfer NDT : S7NDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S7NDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- S7FCR_Register -- -------------------- subtype S7FCR_FTH_Field is HAL.UInt2; subtype S7FCR_FS_Field is HAL.UInt3; -- stream x FIFO control register type S7FCR_Register is record -- FIFO threshold selection FTH : S7FCR_FTH_Field := 16#1#; -- Direct mode disable DMDIS : Boolean := False; -- Read-only. FIFO status FS : S7FCR_FS_Field := 16#4#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- FIFO error interrupt enable FEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for S7FCR_Register use record FTH at 0 range 0 .. 1; DMDIS at 0 range 2 .. 2; FS at 0 range 3 .. 5; Reserved_6_6 at 0 range 6 .. 6; FEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- DMA controller type DMA_Peripheral is record -- low interrupt status register LISR : LISR_Register; -- high interrupt status register HISR : HISR_Register; -- low interrupt flag clear register LIFCR : LIFCR_Register; -- high interrupt flag clear register HIFCR : HIFCR_Register; -- stream x configuration register S0CR : S0CR_Register; -- stream x number of data register S0NDTR : S0NDTR_Register; -- stream x peripheral address register S0PAR : HAL.Word; -- stream x memory 0 address register S0M0AR : HAL.Word; -- stream x memory 1 address register S0M1AR : HAL.Word; -- stream x FIFO control register S0FCR : S0FCR_Register; -- stream x configuration register S1CR : S1CR_Register; -- stream x number of data register S1NDTR : S1NDTR_Register; -- stream x peripheral address register S1PAR : HAL.Word; -- stream x memory 0 address register S1M0AR : HAL.Word; -- stream x memory 1 address register S1M1AR : HAL.Word; -- stream x FIFO control register S1FCR : S1FCR_Register; -- stream x configuration register S2CR : S2CR_Register; -- stream x number of data register S2NDTR : S2NDTR_Register; -- stream x peripheral address register S2PAR : HAL.Word; -- stream x memory 0 address register S2M0AR : HAL.Word; -- stream x memory 1 address register S2M1AR : HAL.Word; -- stream x FIFO control register S2FCR : S2FCR_Register; -- stream x configuration register S3CR : S3CR_Register; -- stream x number of data register S3NDTR : S3NDTR_Register; -- stream x peripheral address register S3PAR : HAL.Word; -- stream x memory 0 address register S3M0AR : HAL.Word; -- stream x memory 1 address register S3M1AR : HAL.Word; -- stream x FIFO control register S3FCR : S3FCR_Register; -- stream x configuration register S4CR : S4CR_Register; -- stream x number of data register S4NDTR : S4NDTR_Register; -- stream x peripheral address register S4PAR : HAL.Word; -- stream x memory 0 address register S4M0AR : HAL.Word; -- stream x memory 1 address register S4M1AR : HAL.Word; -- stream x FIFO control register S4FCR : S4FCR_Register; -- stream x configuration register S5CR : S5CR_Register; -- stream x number of data register S5NDTR : S5NDTR_Register; -- stream x peripheral address register S5PAR : HAL.Word; -- stream x memory 0 address register S5M0AR : HAL.Word; -- stream x memory 1 address register S5M1AR : HAL.Word; -- stream x FIFO control register S5FCR : S5FCR_Register; -- stream x configuration register S6CR : S6CR_Register; -- stream x number of data register S6NDTR : S6NDTR_Register; -- stream x peripheral address register S6PAR : HAL.Word; -- stream x memory 0 address register S6M0AR : HAL.Word; -- stream x memory 1 address register S6M1AR : HAL.Word; -- stream x FIFO control register S6FCR : S6FCR_Register; -- stream x configuration register S7CR : S7CR_Register; -- stream x number of data register S7NDTR : S7NDTR_Register; -- stream x peripheral address register S7PAR : HAL.Word; -- stream x memory 0 address register S7M0AR : HAL.Word; -- stream x memory 1 address register S7M1AR : HAL.Word; -- stream x FIFO control register S7FCR : S7FCR_Register; end record with Volatile; for DMA_Peripheral use record LISR at 0 range 0 .. 31; HISR at 4 range 0 .. 31; LIFCR at 8 range 0 .. 31; HIFCR at 12 range 0 .. 31; S0CR at 16 range 0 .. 31; S0NDTR at 20 range 0 .. 31; S0PAR at 24 range 0 .. 31; S0M0AR at 28 range 0 .. 31; S0M1AR at 32 range 0 .. 31; S0FCR at 36 range 0 .. 31; S1CR at 40 range 0 .. 31; S1NDTR at 44 range 0 .. 31; S1PAR at 48 range 0 .. 31; S1M0AR at 52 range 0 .. 31; S1M1AR at 56 range 0 .. 31; S1FCR at 60 range 0 .. 31; S2CR at 64 range 0 .. 31; S2NDTR at 68 range 0 .. 31; S2PAR at 72 range 0 .. 31; S2M0AR at 76 range 0 .. 31; S2M1AR at 80 range 0 .. 31; S2FCR at 84 range 0 .. 31; S3CR at 88 range 0 .. 31; S3NDTR at 92 range 0 .. 31; S3PAR at 96 range 0 .. 31; S3M0AR at 100 range 0 .. 31; S3M1AR at 104 range 0 .. 31; S3FCR at 108 range 0 .. 31; S4CR at 112 range 0 .. 31; S4NDTR at 116 range 0 .. 31; S4PAR at 120 range 0 .. 31; S4M0AR at 124 range 0 .. 31; S4M1AR at 128 range 0 .. 31; S4FCR at 132 range 0 .. 31; S5CR at 136 range 0 .. 31; S5NDTR at 140 range 0 .. 31; S5PAR at 144 range 0 .. 31; S5M0AR at 148 range 0 .. 31; S5M1AR at 152 range 0 .. 31; S5FCR at 156 range 0 .. 31; S6CR at 160 range 0 .. 31; S6NDTR at 164 range 0 .. 31; S6PAR at 168 range 0 .. 31; S6M0AR at 172 range 0 .. 31; S6M1AR at 176 range 0 .. 31; S6FCR at 180 range 0 .. 31; S7CR at 184 range 0 .. 31; S7NDTR at 188 range 0 .. 31; S7PAR at 192 range 0 .. 31; S7M0AR at 196 range 0 .. 31; S7M1AR at 200 range 0 .. 31; S7FCR at 204 range 0 .. 31; end record; -- DMA controller DMA1_Periph : aliased DMA_Peripheral with Import, Address => DMA1_Base; -- DMA controller DMA2_Periph : aliased DMA_Peripheral with Import, Address => DMA2_Base; end STM32_SVD.DMA;
clairvoyant/qt5ada
Ada
1,890
adb
-- -- This library is free software; you can redistribute it and/or modify -- it under the terms of the GNU Library General Public License as -- published by the Free Software Foundation; either version 3 of the -- License; or (at your option) any later version. package body Unbounded_Sequential_Queues is ------------ -- Insert -- ------------ procedure Insert (Into : in out Queue; Item : in Element) is Ptr : Link; begin Ptr := new Node'(Data => Item, Next => null); if Into.Count = 0 then -- initial case Into.Rear := Ptr; Into.Front := Into.Rear; Into.Count := 1; else -- nodes already in list Into.Rear.Next := Ptr; Into.Rear := Ptr; Into.Count := Into.Count + 1; end if; exception when Storage_Error => raise Overflow; end Insert; ------------ -- Remove -- ------------ procedure Remove (From : in out Queue; Item : out Element) is begin if From.Count > 0 then -- have data items to Remove Item := From.Front.Data; From.Front := From.Front.Next; From.Count := From.Count - 1; else -- user didn't check raise Underflow; end if; end Remove; ----------- -- Empty -- ----------- function Empty (Q : Queue) return Boolean is begin return Q.Count = 0; end Empty; ---------- -- Size -- ---------- function Size (Q : Queue) return Natural is begin return Q.Count; end Size; --------------- -- Iteration -- --------------- procedure Iteration (Over : in Queue) is Ptr : Link := Over.Front; Enabled : Boolean := True; begin while Ptr /= null and Enabled loop Process (Ptr.Data, Enabled); Ptr := Ptr.Next; end loop; end Iteration; end Unbounded_Sequential_Queues;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
448
ads
with Ada.Interrupts; with STM32_SVD.USART; with STM32_SVD; use STM32_SVD; generic with package USART is new STM32GD.USART.Peripheral (<>); IRQ : Ada.Interrupts.Interrupt_ID; package STM32GD.USART.IRQ is procedure Init; protected IRQ_Handler is entry Wait; private procedure Handler; pragma Attach_Handler (Handler, IRQ); Data_Available : Boolean := False; end IRQ_Handler; end STM32GD.USART.IRQ;
tsoding/ada-gol
Ada
2,866
adb
with Ada.Text_IO; with Ada.Characters.Latin_1; -- There's also 'with ASCII;', but that's obsolete with Ada.Strings.Fixed; procedure Gol is use Ada.Text_IO; Width : constant Positive := 5; Height : constant Positive := 5; type Cell is (Dead, Alive); type Rows is mod Height; type Cols is mod Width; type Board is array (Rows, Cols) of Cell; type Neighbors is range 0 .. 8; procedure Render_Board(B: Board) is begin for Row in Rows loop for Col in Cols loop case B(Row, Col) is when Alive => Put('#'); when Dead => Put('.'); end case; end loop; New_Line; end loop; end; function Count_Neighbors(B: Board; Row0: Rows; Col0: Cols) return Neighbors is begin return Result : Neighbors := 0 do for Delta_Row in Rows range 0 .. 2 loop for Delta_Col in Cols range 0 .. 2 loop if Delta_Row /= 1 or Delta_Col /= 1 then declare Row : constant Rows := Row0 + Delta_Row - 1; Col : constant Cols := Col0 + Delta_Col - 1; begin if B(Row, Col) = Alive then Result := Result + 1; end if; end; end if; end loop; end loop; end return; end; function Next(Current : Board) return Board is begin return Result : Board do for Row in Rows loop for Col in Cols loop declare N : constant Neighbors := Count_Neighbors(Current, Row, Col); begin case Current(Row, Col) is when Dead => Result(Row, Col) := (if N = 3 then Alive else Dead); when Alive => Result(Row, Col) := (if N in 2 .. 3 then Alive else Dead); end case; end; end loop; end loop; end return; end; Current : Board := ( ( Dead, Alive, Dead, others => Dead), ( Dead, Dead, Alive, others => Dead), (Alive, Alive, Alive, others => Dead), others => (others => Dead) ); begin --for I in 1 .. 2 loop Render_Board(Current); Current := Next(Current); delay Duration(0.25); Put(Ada.Characters.Latin_1.ESC & "[" & Ada.Strings.Fixed.Trim(Height'Image, Ada.Strings.Left) & "A"); Put(Ada.Characters.Latin_1.ESC & "[" & Ada.Strings.Fixed.Trim(Width'Image, Ada.Strings.Left) & "D"); end loop; end;
reznikmm/spawn
Ada
2,553
ads
-- -- Copyright (C) 2018-2022, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- -- Notes about names of variables: its case sensitivity is platform dependent. -- On case insensitive platforms original casing is returned by Keys function. with Spawn.String_Vectors; private with Ada.Containers.Indefinite_Ordered_Maps; package Spawn.Environments is type Process_Environment is tagged private; procedure Clear (Self : in out Process_Environment'Class); -- Reset given Process_Environment to an empty state. function Contains (Self : Process_Environment'Class; Name : UTF_8_String) return Boolean; -- Check if given Process_Environment has variable with given Name. procedure Insert (Self : in out Process_Environment'Class; Name : UTF_8_String; Value : UTF_8_String); -- Insert variable into Process_Environment, replace existing variable -- with the same name if any. procedure Insert (Self : in out Process_Environment'Class; Environemnt : Process_Environment'Class); -- Insert all variables into Process_Environment. function Keys (Self : Process_Environment'Class) return Spawn.String_Vectors.UTF_8_String_Vector; -- Return list of names of variables. procedure Remove (Self : in out Process_Environment'Class; Name : UTF_8_String); -- Delete variable from Process_Environment. Do nothing if no such variable function Value (Self : Process_Environment'Class; Name : UTF_8_String; Default : UTF_8_String := "") return UTF_8_String; -- Get value of an variable from Process_Environment function Search_Path (Self : Process_Environment'Class; File : UTF_8_String; Name : UTF_8_String := "PATH") return UTF_8_String; -- Take an environment variable with given Name as directory list, then -- search for the File in each of this directory. Return path to found file -- or empty string if not found. function System_Environment return Process_Environment; private function Less (Left, Right : UTF_8_String) return Boolean; function Equal (Left, Right : UTF_8_String) return Boolean; package UTF_8_String_Maps is new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => UTF_8_String, Element_Type => UTF_8_String, "<" => Less, "=" => Equal); -- Spawn.Internal.Environments."="); type Process_Environment is tagged record Map : UTF_8_String_Maps.Map; end record; end Spawn.Environments;
AdaCore/libadalang
Ada
116
ads
generic type T is private; package Foo.Bar is V : T; pragma Test (I); pragma Test (Foo.I); end Foo.Bar;
yannickmoy/SPARKNaCl
Ada
1,570
adb
with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.Core; use SPARKNaCl.Core; with SPARKNaCl.Debug; use SPARKNaCl.Debug; with SPARKNaCl.Secretbox; use SPARKNaCl.Secretbox; with SPARKNaCl.Stream; with Ada.Text_IO; use Ada.Text_IO; with System.Assertions; use System.Assertions; procedure Secretbox3 is Firstkey : constant Core.Salsa20_Key := Construct ((16#1b#, 16#27#, 16#55#, 16#64#, 16#73#, 16#e9#, 16#85#, 16#d4#, 16#62#, 16#cd#, 16#51#, 16#19#, 16#7a#, 16#9a#, 16#46#, 16#c7#, 16#60#, 16#09#, 16#54#, 16#9e#, 16#ac#, 16#64#, 16#74#, 16#f2#, 16#06#, 16#c4#, 16#ee#, 16#08#, 16#44#, 16#f6#, 16#83#, 16#89#)); Nonce : constant Stream.HSalsa20_Nonce := (16#69#, 16#69#, 16#6e#, 16#e9#, 16#55#, 16#b6#, 16#2b#, 16#73#, 16#cd#, 16#62#, 16#bd#, 16#a8#, 16#75#, 16#fc#, 16#73#, 16#d6#, 16#82#, 16#19#, 16#e0#, 16#03#, 16#6b#, 16#7a#, 16#0b#, 16#37#); -- C too short C : constant Byte_Seq (0 .. 15) := (16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#); M : Byte_Seq (0 .. 15); S : Boolean; begin S := False; Open (M, S, C, Nonce, Firstkey); if S then Put_Line ("Status is " & S'Img); DH ("M is", M); else Put_Line ("Precondition failure expected OK"); end if; exception when Assert_Failure => Put_Line ("Precondition failure expected OK"); end Secretbox3;
PacoReinaCampo/MPSoC-NoC
Ada
4,108
ads
----------------------------------------------------------------------------------- -- __ _ _ _ -- -- / _(_) | | | | -- -- __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | -- -- / _` | | | |/ _ \/ _ \ '_ \| _| |/ _ \ |/ _` | -- -- | (_| | |_| | __/ __/ | | | | | | __/ | (_| | -- -- \__, |\__,_|\___|\___|_| |_|_| |_|\___|_|\__,_| -- -- | | -- -- |_| -- -- -- -- -- -- Peripheral-NTM for MPSoC -- -- Neural Turing Machine for MPSoC -- -- -- ----------------------------------------------------------------------------------- ----------------------------------------------------------------------------------- -- -- -- Copyright (c) 2020-2024 by the author(s) -- -- -- -- 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. -- -- -- -- ============================================================================= -- -- Author(s): -- -- Paco Reina Campo <[email protected]> -- -- -- ----------------------------------------------------------------------------------- with Ada.Text_IO; use Ada.Text_IO; package peripheral_design is procedure ntm_scalar_adder ( data_a_in : in float; data_b_in : in float; data_out : out float ); procedure ntm_scalar_substractor ( data_a_in : in float; data_b_in : in float; data_out : out float ); procedure ntm_scalar_multiplier ( data_a_in : in float; data_b_in : in float; data_out : out float ); procedure ntm_scalar_divider ( data_a_in : in float; data_b_in : in float; data_out : out float ); end peripheral_design;
tum-ei-rcs/StratoX
Ada
2,136
ads
with Generic_Sensor; with Interfaces; use Interfaces; with Units; use Units; with Units.Vectors; use Units.Vectors; with Units.Navigation; use Units.Navigation; package IMU with SPARK_Mode, Abstract_State => State is -- this is how data from the IMU looks like type IMU_Data_Type is record Acc_X : Integer_16 := 0; Acc_Y : Integer_16 := 0; Acc_Z : Integer_16 := 0; Gyro_X : Integer_16 := 0; Gyro_Y : Integer_16 := 0; Gyro_Z : Integer_16 := 0; end record; package IMU_Sensor is new Generic_Sensor(IMU_Data_Type); use IMU_Sensor; --package IMU_Signal is new Gneric_Signal( IMU_Data_Type ); --type Data_Type is new IMU_Signal.Sample_Type; type IMU_Tag is new IMU_Sensor.Sensor_Tag with record -- inherit the sensor tag and extend record. Freefall_Counter : Natural; end record; -- package bar with Initializes => IMU_Sensor.Sensor_State is -- foo : Integer := 0; -- end bar; -- --overriding procedure initialize (Self : in out IMU_Tag); --with Global => (Output => IMU_Sensor.Sensor_State); -- with Global => (Input => (MPU6000.Driver.State, Ada.Real_Time.Clock_Time), In_Out => IMU.State); --overriding procedure read_Measurement(Self : in out IMU_Tag); --with Global => (In_Out => IMU_Sensor.Sensor_State); -- with Global => (MPU6000.Driver.State); procedure perform_Kalman_Filtering(Self : IMU_Tag; newAngle : Orientation_Type); function get_Linear_Acceleration(Self : IMU_Tag) return Linear_Acceleration_Vector; function get_Angular_Velocity(Self : IMU_Tag) return Angular_Velocity_Vector; function get_Orientation(Self : IMU_Tag) return Orientation_Type; procedure Fused_Orientation(Self : IMU_Tag; Orientation : Orientation_Type; Angular_Rate : Angular_Velocity_Vector; result : out Orientation_Type); procedure check_Freefall(Self : in out IMU_Tag; isFreefall : out Boolean); -- function get_Angular_Velocity (Self : IMU_Tag) -- FIXME: why is this private:? Sensor : IMU_Tag;-- with Part_Of => State; end IMU;
stcarrez/ada-asf
Ada
10,331
ads
----------------------------------------------------------------------- -- asf-contexts-writer -- Response stream writer -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015, 2019, 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. ----------------------------------------------------------------------- -- The <b>ASF.Contexts.Writer</b> defines the response writer to -- write the rendered result to the response stream. The <b>IOWriter</b> -- interface defines the procedure for writing the buffer to the output -- stream. The <b>Response_Writer</b> is the main type that provides -- various methods for writing the content. -- -- The result stream is encoded according to the encoding type. -- with Unicode.Encodings; with Ada.Streams; with Ada.Strings.Unbounded; with Ada.Strings.Wide_Wide_Unbounded; with EL.Objects; with Util.Beans.Objects; with Util.Strings.Builders; with ASF.Streams; package ASF.Contexts.Writer is use Ada.Strings.Unbounded; use Ada.Strings.Wide_Wide_Unbounded; -- ------------------------------ -- IO Writer -- ------------------------------ type IOWriter is limited interface; procedure Write (Stream : in out IOWriter; Buffer : in Ada.Streams.Stream_Element_Array) is abstract; -- ------------------------------ -- Response Writer -- ------------------------------ type Response_Writer is new ASF.Streams.Print_Stream with private; type Response_Writer_Access is access all Response_Writer'Class; -- Backward compatibility subtype ResponseWriter is Response_Writer; pragma Obsolescent (Entity => ResponseWriter); subtype ResponseWriter_Access is Response_Writer_Access; pragma Obsolescent (Entity => ResponseWriter_Access); -- Initialize the response stream for the given content type and -- encoding. An internal buffer is allocated for writing the stream. procedure Initialize (Stream : in out Response_Writer; Content_Type : in String; Encoding : in String; Output : in ASF.Streams.Print_Stream); -- Get the content type. function Get_Content_Type (Stream : in Response_Writer) return String; -- Get the character encoding. function Get_Encoding (Stream : in Response_Writer) return String; -- Close the current XML entity if an entity was started procedure Close_Current (Stream : in out Response_Writer'Class); -- Start an XML element with the given name. procedure Start_Element (Stream : in out Response_Writer; Name : in String); -- Start an optional XML element with the given name. -- The element is written only if it has at least one attribute. -- The optional XML element must not contain other XML entities. procedure Start_Optional_Element (Stream : in out Response_Writer; Name : in String); -- Closes an XML element of the given name. procedure End_Element (Stream : in out Response_Writer; Name : in String); -- Closes an optional XML element of the given name. -- The ending tag is written only if the start tag was written. procedure End_Optional_Element (Stream : in out Response_Writer; Name : in String); -- Write an XML element using the given name and with the content. -- This is similar to calling <b>Start_Element</b>, <b>Write_Text</b> -- and <b>End_Element</b>. procedure Write_Element (Stream : in out Response_Writer; Name : in String; Content : in String); procedure Write_Wide_Element (Stream : in out Response_Writer; Name : in String; Content : in Wide_Wide_String); procedure Write_Wide_Element (Stream : in out Response_Writer; Name : in String; Content : in Unbounded_Wide_Wide_String); -- Write an XML attribute within an XML element. -- The attribute value is escaped according to the XML escape rules. procedure Write_Attribute (Stream : in out Response_Writer; Name : in String; Value : in String); procedure Write_Attribute (Stream : in out Response_Writer; Name : in String; Value : in Unbounded_String); procedure Write_Attribute (Stream : in out Response_Writer; Name : in String; Value : in EL.Objects.Object); procedure Write_Wide_Attribute (Stream : in out Response_Writer; Name : in String; Value : in Wide_Wide_String); procedure Write_Wide_Attribute (Stream : in out Response_Writer; Name : in String; Value : in Unbounded_Wide_Wide_String); -- Write a text escaping any character as necessary. procedure Write_Text (Stream : in out Response_Writer; Text : in String); procedure Write_Text (Stream : in out Response_Writer; Text : in Unbounded_String); procedure Write_Wide_Text (Stream : in out Response_Writer; Text : in Wide_Wide_String); procedure Write_Wide_Text (Stream : in out Response_Writer; Text : in Unbounded_Wide_Wide_String); procedure Write_Text (Stream : in out Response_Writer; Value : in EL.Objects.Object); -- Write a character on the response stream and escape that character -- as necessary. procedure Write_Char (Stream : in out Response_Writer; Char : in Character); -- Write a character on the response stream and escape that character -- as necessary. procedure Write_Wide_Char (Stream : in out Response_Writer; Char : in Wide_Wide_Character); -- Write a string on the stream. overriding procedure Write (Stream : in out Response_Writer; Item : in Ada.Strings.Unbounded.Unbounded_String); -- Write a raw string on the stream. procedure Write_Raw (Stream : in out Response_Writer; Item : in String); -- Write a raw wide string on the stream. procedure Write_Raw (Stream : in out Response_Writer; Item : in Ada.Strings.Wide_Wide_Unbounded.Unbounded_Wide_Wide_String); -- Write a raw wide string on the stream. procedure Write_Wide_Raw (Stream : in out Response_Writer; Item : in Wide_Wide_String); -- ------------------------------ -- Javascript Support -- ------------------------------ -- To optimize the execution of Javascript page code, ASF components can queue some -- javascript code and have it merged and executed in a single <script> command. -- Write the java scripts that have been queued by <b>Queue_Script</b> procedure Write_Scripts (Stream : in out Response_Writer); -- Append the <b>Script</b> to the javascript buffer queue. The <b>Script</b> is not escaped. procedure Queue_Script (Stream : in out Response_Writer; Script : in String); -- Append the <b>Script</b> to the javascript buffer queue. The <b>Script</b> is not escaped. procedure Queue_Script (Stream : in out Response_Writer; Script : in Ada.Strings.Unbounded.Unbounded_String); -- Append the <b>Value</b> to the javascript buffer queue. The value is escaped according -- to Javascript escape rules. procedure Queue_Script (Stream : in out Response_Writer; Value : in Util.Beans.Objects.Object); -- Append a <b>script</b> include command to include the Javascript file at the given URL. -- The include scripts are flushed by <b>Flush</b> or <b>Write_Scripts</b>. procedure Queue_Include_Script (Stream : in out Response_Writer; URL : in String; Async : in Boolean := False); -- Flush the response. -- Before flushing the response, the javascript are also flushed -- by calling <b>Write_Scripts</b>. overriding procedure Flush (Stream : in out Response_Writer); private -- Flush the response stream and release the buffer. overriding procedure Finalize (Object : in out Response_Writer); type Buffer_Access is access Ada.Streams.Stream_Element_Array; type Response_Writer is new ASF.Streams.Print_Stream with record -- Whether an XML element must be closed (that is a '>' is necessary) Close_Start : Boolean := False; -- The encoding scheme. Encoding : Unicode.Encodings.Unicode_Encoding; -- The content type. Content_Type : Unbounded_String; -- The javascript that has been queued by <b>Queue_Script</b>. Script_Queue : Unbounded_String; -- Util.Strings.Builders.Builder (256); -- The javascript files that must be included at the end of the file. -- This javascript part is written before the Javascript that was queued. Include_Queue : Util.Strings.Builders.Builder (256); -- An optional element to write in the stream. Optional_Element : String (1 .. 32); Optional_Element_Size : Natural := 0; Optional_Element_Written : Boolean := False; end record; end ASF.Contexts.Writer;
reznikmm/matreshka
Ada
4,299
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 Matreshka.DOM_Nodes; with XML.DOM.Attributes.Internals; package body ODF.DOM.Attributes.Draw.Shadow_Offset_Y.Internals is ------------ -- Create -- ------------ function Create (Node : Matreshka.ODF_Attributes.Draw.Shadow_Offset_Y.Draw_Shadow_Offset_Y_Access) return ODF.DOM.Attributes.Draw.Shadow_Offset_Y.ODF_Draw_Shadow_Offset_Y is begin return (XML.DOM.Attributes.Internals.Create (Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record); end Create; ---------- -- Wrap -- ---------- function Wrap (Node : Matreshka.ODF_Attributes.Draw.Shadow_Offset_Y.Draw_Shadow_Offset_Y_Access) return ODF.DOM.Attributes.Draw.Shadow_Offset_Y.ODF_Draw_Shadow_Offset_Y is begin return (XML.DOM.Attributes.Internals.Wrap (Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record); end Wrap; end ODF.DOM.Attributes.Draw.Shadow_Offset_Y.Internals;
fionahiklas/ada_unit_test_examples
Ada
50
adb
package body Alarm_Tests is end Alarm_Tests;
sungyeon/drake
Ada
3,179
adb
with Ada.Exception_Identification.From_Here; package body Ada.Streams.Block_Transmission is pragma Suppress (All_Checks); use Exception_Identification.From_Here; procedure Read ( Stream : not null access Root_Stream_Type'Class; Item : out Array_Type) is begin if Element_Type'Size = Element_Type'Stream_Size and then Array_Type'Component_Size = Element_Type'Stream_Size then declare Item_As_SEA : Stream_Element_Array ( 1 .. (Element_Type'Stream_Size / Stream_Element'Size) * Item'Length); for Item_As_SEA'Address use Item'Address; begin Stream_Element_Arrays.Read (Stream, Item_As_SEA); end; else Array_Type'Read (Stream, Item); end if; end Read; procedure Write ( Stream : not null access Root_Stream_Type'Class; Item : Array_Type) is begin if Element_Type'Size = Element_Type'Stream_Size and then Array_Type'Component_Size = Element_Type'Stream_Size then declare Item_As_SEA : Stream_Element_Array ( 1 .. (Element_Type'Stream_Size / Stream_Element'Size) * Item'Length); for Item_As_SEA'Address use Item'Address; begin Stream_Element_Arrays.Write (Stream, Item_As_SEA); end; else Array_Type'Write (Stream, Item); end if; end Write; function Input ( Stream : not null access Root_Stream_Type'Class) return Array_Type is First, Last : Index_Type'Base; begin Index_Type'Base'Read (Stream, First); Index_Type'Base'Read (Stream, Last); if First < Index_Type'First or else Last > Index_Type'Last then Raise_Exception (Data_Error'Identity); end if; return Result : Array_Type (First .. Last) do Read (Stream, Result); end return; end Input; procedure Output ( Stream : not null access Root_Stream_Type'Class; Item : Array_Type) is begin Index_Type'Write (Stream, Item'First); Index_Type'Write (Stream, Item'Last); Write (Stream, Item); end Output; package body Stream_Element_Arrays is procedure Read ( Stream : not null access Root_Stream_Type'Class; Item : out Stream_Element_Array) is I : Stream_Element_Offset := Item'First; begin if I <= Item'Last then loop declare Last : Stream_Element_Offset; begin Streams.Read (Stream.all, Item (I .. Item'Last), Last); exit when Last >= Item'Last; if Last < I then Raise_Exception (End_Error'Identity); end if; I := Last + 1; end; end loop; end if; end Read; procedure Write ( Stream : not null access Root_Stream_Type'Class; Item : Stream_Element_Array) is begin Streams.Write (Stream.all, Item); end Write; end Stream_Element_Arrays; end Ada.Streams.Block_Transmission;
AdaCore/gpr
Ada
21
ads
package Data is end;
reznikmm/matreshka
Ada
8,798
adb
------------------------------------------------------------------------------ -- -- -- 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.Elements; with AMF.Internals.Element_Collections; with AMF.Internals.Helpers; with AMF.Internals.Tables.UML_Attributes; with AMF.Visitors.UML_Iterators; with AMF.Visitors.UML_Visitors; package body AMF.Internals.UML_Package_Merges is ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant UML_Package_Merge_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Enter_Package_Merge (AMF.UML.Package_Merges.UML_Package_Merge_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant UML_Package_Merge_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Leave_Package_Merge (AMF.UML.Package_Merges.UML_Package_Merge_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant UML_Package_Merge_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then AMF.Visitors.UML_Iterators.UML_Iterator'Class (Iterator).Visit_Package_Merge (Visitor, AMF.UML.Package_Merges.UML_Package_Merge_Access (Self), Control); end if; end Visit_Element; ------------------------ -- Get_Merged_Package -- ------------------------ overriding function Get_Merged_Package (Self : not null access constant UML_Package_Merge_Proxy) return AMF.UML.Packages.UML_Package_Access is begin return AMF.UML.Packages.UML_Package_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Merged_Package (Self.Element))); end Get_Merged_Package; ------------------------ -- Set_Merged_Package -- ------------------------ overriding procedure Set_Merged_Package (Self : not null access UML_Package_Merge_Proxy; To : AMF.UML.Packages.UML_Package_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Merged_Package (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Merged_Package; --------------------------- -- Get_Receiving_Package -- --------------------------- overriding function Get_Receiving_Package (Self : not null access constant UML_Package_Merge_Proxy) return AMF.UML.Packages.UML_Package_Access is begin return AMF.UML.Packages.UML_Package_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Receiving_Package (Self.Element))); end Get_Receiving_Package; --------------------------- -- Set_Receiving_Package -- --------------------------- overriding procedure Set_Receiving_Package (Self : not null access UML_Package_Merge_Proxy; To : AMF.UML.Packages.UML_Package_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Receiving_Package (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Receiving_Package; ---------------- -- Get_Source -- ---------------- overriding function Get_Source (Self : not null access constant UML_Package_Merge_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Source (Self.Element))); end Get_Source; ---------------- -- Get_Target -- ---------------- overriding function Get_Target (Self : not null access constant UML_Package_Merge_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Target (Self.Element))); end Get_Target; ------------------------- -- Get_Related_Element -- ------------------------- overriding function Get_Related_Element (Self : not null access constant UML_Package_Merge_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Related_Element (Self.Element))); end Get_Related_Element; end AMF.Internals.UML_Package_Merges;
tum-ei-rcs/StratoX
Ada
13,066
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2001-2016, AdaCore -- -- -- -- GNARL 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. GNARL 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. -- -- -- -- -- -- -- -- -- -- -- -- 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/>. -- -- -- ------------------------------------------------------------------------------ -- This is the generic bare board version of this package -- This package contains all the GNULL primitives that interface directly with -- the underlying kernel. pragma Restrictions (No_Elaboration_Code); with Ada.Unchecked_Conversion; with System.Storage_Elements; with System.Tasking.Debug; with System.Task_Info; package body System.Task_Primitives.Operations is use System.OS_Interface; use System.Parameters; use System.Storage_Elements; use System.Multiprocessors; use type System.Tasking.Task_Id; --------------------- -- Local Functions -- --------------------- function To_Address is new Ada.Unchecked_Conversion (ST.Task_Id, System.Address); function To_Task_Id is new Ada.Unchecked_Conversion (System.Address, ST.Task_Id); procedure Initialize_Idle (CPU_Id : CPU); -- Initialize an Idle task for CPU_ID procedure Initialize_Slave (CPU_Id : System.Multiprocessors.CPU); pragma Export (Asm, Initialize_Slave, "__gnat_initialize_slave"); -- Initialize a fake environment task for the current CPU. This fake task -- is used to give a context during interrupt handling if the CPU doesn't -- have a regular task. procedure Idle (Param : Address); -- Procedure executed by an idle task Idle_Stack_Size : constant System.Storage_Elements.Storage_Count := (2048 / Standard'Maximum_Alignment) * Standard'Maximum_Alignment; -- 2 KB stacks for each of the idle tasks type Idle_Stack_Space is new Storage_Elements.Storage_Array (1 .. Idle_Stack_Size); for Idle_Stack_Space'Alignment use Standard'Maximum_Alignment; -- Stack for idle tasks Idle_Stacks : array (CPU) of Idle_Stack_Space; -- Array that contains the stack space for idle tasks Idle_Stacks_Table : array (CPU) of System.Address; pragma Export (Asm, Idle_Stacks_Table, "__gnat_idle_stack_table"); -- Array that contains the stack pointers for idle tasks Idle_Tasks : array (Multiprocessors.CPU) of aliased Tasking.Ada_Task_Control_Block (Entry_Num => 0); -- ATCB for the idle tasks. They are used to put the cpu in idle mode, -- and for slave cpus, they are also present to correctly handle interrupts -- (changing the current priority). ---------- -- Self -- ---------- function Self return ST.Task_Id is begin return To_Task_Id (System.OS_Interface.Get_ATCB); end Self; ----------- -- Sleep -- ----------- procedure Sleep (Self_ID : ST.Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); begin -- A task can only suspend itself pragma Assert (Self_ID = Self); System.OS_Interface.Sleep; end Sleep; ----------------- -- Delay_Until -- ----------------- procedure Delay_Until (Abs_Time : Time) is Self_ID : constant ST.Task_Id := Self; begin Self_ID.Common.State := ST.Delay_Sleep; System.OS_Interface.Delay_Until (System.OS_Interface.Time (Abs_Time)); Self_ID.Common.State := ST.Runnable; end Delay_Until; --------------------- -- Monotonic_Clock -- --------------------- function Monotonic_Clock return Time is begin return Time (System.OS_Interface.Clock); end Monotonic_Clock; ------------ -- Wakeup -- ------------ procedure Wakeup (T : ST.Task_Id; Reason : System.Tasking.Task_States) is pragma Unreferenced (Reason); begin System.OS_Interface.Wakeup (T.Common.LL.Thread); end Wakeup; ------------------ -- Set_Priority -- ------------------ procedure Set_Priority (T : ST.Task_Id; Prio : ST.Extended_Priority) is begin -- A task can only change its own priority pragma Assert (T = Self); -- Change the priority in the underlying executive System.OS_Interface.Set_Priority (Prio); end Set_Priority; ------------------ -- Get_Priority -- ------------------ function Get_Priority (T : ST.Task_Id) return ST.Extended_Priority is begin -- Get current active priority return System.OS_Interface.Get_Priority (T.Common.LL.Thread); end Get_Priority; ------------------ -- Get_Affinity -- ------------------ function Get_Affinity (T : ST.Task_Id) return System.Multiprocessors.CPU_Range is begin return System.OS_Interface.Get_Affinity (T.Common.LL.Thread); end Get_Affinity; ------------- -- Get_CPU -- ------------- function Get_CPU (T : ST.Task_Id) return System.Multiprocessors.CPU is begin return System.OS_Interface.Get_CPU (T.Common.LL.Thread); end Get_CPU; ------------------- -- Get_Thread_Id -- ------------------- function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is begin return T.Common.LL.Thread; end Get_Thread_Id; ---------------- -- Enter_Task -- ---------------- procedure Enter_Task (Self_ID : ST.Task_Id) is begin -- Set lwp (for gdb) Self_ID.Common.LL.Lwp := Lwp_Self; -- Register the task to System.Tasking.Debug System.Tasking.Debug.Add_Task_Id (Self_ID); -- Ensure that the task has the right priority priority at the end -- of its initialization (before calling the task's code). System.OS_Interface.Set_Priority (Self_ID.Common.Base_Priority); end Enter_Task; ---------- -- Idle -- ---------- procedure Idle (Param : Address) is pragma Unreferenced (Param); T : constant Tasking.Task_Id := Self; begin Enter_Task (T); loop OS_Interface.Power_Down; end loop; end Idle; -------------------- -- Initialize_TCB -- -------------------- procedure Initialize_TCB (Self_ID : ST.Task_Id; Succeeded : out Boolean) is pragma Unreferenced (Self_ID); begin -- Nothing to be done as part of the initialization of TCBs Succeeded := True; end Initialize_TCB; ---------------------- -- Initialize_Slave -- ---------------------- procedure Initialize_Slave (CPU_Id : CPU) is Idle_Task : Tasking.Ada_Task_Control_Block renames Idle_Tasks (CPU_Id); Success : Boolean; pragma Warnings (Off, Success); begin -- Initialize ATCB for the idle task Initialize_Idle (CPU_Id); -- Initialize the environment thread System.OS_Interface.Initialize_Slave (Idle_Task.Common.LL.Thread, Idle_Task.Common.Base_Priority, Idle_Task.Common.Compiler_Data.Pri_Stack_Info.Start_Address, Idle_Task.Common.Compiler_Data.Pri_Stack_Info.Size); -- Link the underlying executive thread to the Ada task System.OS_Interface.Set_ATCB (Idle_Task.Common.LL.Thread, To_Address (Idle_Task'Access)); -- Run the idle procedure Idle (Null_Address); end Initialize_Slave; ----------------- -- Create_Task -- ----------------- procedure Create_Task (T : ST.Task_Id; Wrapper : System.Address; Stack_Size : System.Parameters.Size_Type; Priority : ST.Extended_Priority; Base_CPU : System.Multiprocessors.CPU_Range; Succeeded : out Boolean) is begin -- The stack has been preallocated for these targets pragma Assert (T.Common.Compiler_Data.Pri_Stack_Info.Start_Address /= Null_Address and then Storage_Offset (Stack_Size) = T.Common.Compiler_Data.Pri_Stack_Info.Size); T.Common.LL.Thread := T.Common.LL.Thread_Desc'Access; -- Create the underlying task System.OS_Interface.Thread_Create (T.Common.LL.Thread, Wrapper, To_Address (T), Priority, Base_CPU, T.Common.Compiler_Data.Pri_Stack_Info.Start_Address, T.Common.Compiler_Data.Pri_Stack_Info.Size); -- Link the underlying executive thread to the Ada task System.OS_Interface.Set_ATCB (T.Common.LL.Thread, To_Address (T)); Succeeded := True; end Create_Task; ---------------- -- Initialize -- ---------------- procedure Initialize (Environment_Task : ST.Task_Id) is T : Thread_Id renames Environment_Task.Common.LL.Thread; begin -- Set the thread T := Environment_Task.Common.LL.Thread_Desc'Access; -- Clear Activation_Link, as required by Add_Task_Id Environment_Task.Common.Activation_Link := null; -- First the underlying multitasking executive must be initialized. -- The ATCB is already initialized and task priority is set. System.OS_Interface.Initialize (T, Environment_Task.Common.Base_Priority); -- Link the underlying executive thread to the Ada task System.OS_Interface.Set_ATCB (T, To_Address (Environment_Task)); -- The environment task must also execute its initialization Enter_Task (Environment_Task); -- Store the identifier for the environment task Operations.Environment_Task := Environment_Task; -- Compute the stack pointers of idle tasks for CPU_Id in CPU loop Idle_Stacks_Table (CPU_Id) := (if System.Parameters.Stack_Grows_Down then (Idle_Stacks (CPU_Id)'Address + Idle_Stack_Size) else Idle_Stacks (CPU_Id)'Address); end loop; -- Create the idle task for the main cpu declare Idle_Task : Tasking.Ada_Task_Control_Block renames Idle_Tasks (CPU'First); Success : Boolean; pragma Unreferenced (Success); begin Initialize_Idle (CPU'First); Create_Task (Idle_Task'Access, Idle'Address, Parameters.Size_Type (Idle_Task.Common.Compiler_Data.Pri_Stack_Info.Size), Tasking.Idle_Priority, CPU'First, Success); end; end Initialize; --------------------- -- Initialize_Idle -- --------------------- procedure Initialize_Idle (CPU_Id : CPU) is Success : Boolean; pragma Warnings (Off, Success); Idle_Task : Tasking.Ada_Task_Control_Block renames Idle_Tasks (CPU_Id); begin -- Initialize a fake environment task for this slave CPU Tasking.Initialize_ATCB (Idle'Access, Null_Address, Tasking.Idle_Priority, CPU_Id, Task_Info.Unspecified_Task_Info, Idle_Stacks (CPU_Id)'Address, Parameters.Size_Type (Idle_Stack_Size), Idle_Task'Access, Success); Idle_Task.Common.LL.Thread := Idle_Task.Common.LL.Thread_Desc'Access; Idle_Task.Entry_Call.Self := Idle_Task'Access; Idle_Task.Common.State := Tasking.Runnable; end Initialize_Idle; --------------------- -- Is_Task_Context -- --------------------- function Is_Task_Context return Boolean is begin return System.OS_Interface.Current_Interrupt = No_Interrupt; end Is_Task_Context; end System.Task_Primitives.Operations;
HeisenbugLtd/open_weather_map_api
Ada
2,830
ads
-------------------------------------------------------------------------------- -- Copyright (C) 2020 by Heisenbug Ltd. ([email protected]) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hocevar. See the LICENSE file for more details. -------------------------------------------------------------------------------- pragma License (Unrestricted); -------------------------------------------------------------------------------- --% @summary --% Open_Weather_Map.API.Service.Group -- --% @description --% Provides the query object implementing a group query (i.e. a list of Ids for --% which weather information shall be retrieved). -------------------------------------------------------------------------------- package Open_Weather_Map.API.Service.Group is ----------------------------------------------------------------------------- -- API: Current weather data (by list of city IDs) ----------------------------------------------------------------------------- type T is new Service.T with private; ----------------------------------------------------------------------------- -- Initialize ----------------------------------------------------------------------------- procedure Initialize (Self : out T; Configuration : in GNATCOLL.JSON.JSON_Value; Connection : not null Client.T_Access; Max_Cache_Interval : in Ada.Real_Time.Time_Span := Default_Cache_Interval; Ids : in Group_List); --% Initializes the group query instance. -- --% @param Self --% The instance of the group query to initialize. -- --% @param Configuration --% Used to configure necessary internals (proxy server etc.). -- --% @param Connection --% Access to the connection object to be used for client server --% communication. -- --% @param Max_Cache_Interval --% Denotes the maximum frequency of actual queries sent to the server. -- --% @param Ids --% The list of location ids to be queried. private type T is new Service.T with null record; ----------------------------------------------------------------------------- -- Decode_Response ----------------------------------------------------------------------------- overriding function Decode_Response (Self : in T; Root : in GNATCOLL.JSON.JSON_Value) return Data_Set; --% Decodes a group query response. -- --% @param Self --% The group query instance. -- --% @param Root --% The root of the JSON response sent by the server. -- --% @return --% The data set decoded from the JSON data in Root. end Open_Weather_Map.API.Service.Group;
reznikmm/matreshka
Ada
3,659
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.Chart_Legend_Elements is pragma Preelaborate; type ODF_Chart_Legend is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Chart_Legend_Access is access all ODF_Chart_Legend'Class with Storage_Size => 0; end ODF.DOM.Chart_Legend_Elements;
reznikmm/matreshka
Ada
3,644
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.Form_Time_Elements is pragma Preelaborate; type ODF_Form_Time is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Form_Time_Access is access all ODF_Form_Time'Class with Storage_Size => 0; end ODF.DOM.Form_Time_Elements;
optikos/oasis
Ada
2,917
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Null_Literals; with Program.Element_Visitors; package Program.Nodes.Null_Literals is pragma Preelaborate; type Null_Literal is new Program.Nodes.Node and Program.Elements.Null_Literals.Null_Literal and Program.Elements.Null_Literals.Null_Literal_Text with private; function Create (Null_Literal_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Null_Literal; type Implicit_Null_Literal is new Program.Nodes.Node and Program.Elements.Null_Literals.Null_Literal with private; function Create (Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Null_Literal with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Null_Literal is abstract new Program.Nodes.Node and Program.Elements.Null_Literals.Null_Literal with null record; procedure Initialize (Self : aliased in out Base_Null_Literal'Class); overriding procedure Visit (Self : not null access Base_Null_Literal; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Is_Null_Literal_Element (Self : Base_Null_Literal) return Boolean; overriding function Is_Expression_Element (Self : Base_Null_Literal) return Boolean; type Null_Literal is new Base_Null_Literal and Program.Elements.Null_Literals.Null_Literal_Text with record Null_Literal_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Null_Literal_Text (Self : aliased in out Null_Literal) return Program.Elements.Null_Literals.Null_Literal_Text_Access; overriding function Null_Literal_Token (Self : Null_Literal) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Null_Literal is new Base_Null_Literal with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Null_Literal_Text (Self : aliased in out Implicit_Null_Literal) return Program.Elements.Null_Literals.Null_Literal_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Null_Literal) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Null_Literal) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Null_Literal) return Boolean; end Program.Nodes.Null_Literals;
Fabien-Chouteau/Ada_Drivers_Library
Ada
5,871
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 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. -- -- -- ------------------------------------------------------------------------------ with STM32.Device; use STM32.Device; with HAL; use HAL; package body Serial_IO.Streaming is ---------------- -- Initialize -- ---------------- procedure Initialize (This : out Serial_Port) is begin Serial_IO.Initialize_Peripheral (This.Device); This.Initialized := True; end Initialize; ----------------- -- Initialized -- ----------------- function Initialized (This : Serial_Port) return Boolean is (This.Initialized); --------------- -- Configure -- --------------- procedure Configure (This : in out Serial_Port; Baud_Rate : Baud_Rates; Parity : Parities := No_Parity; Data_Bits : Word_Lengths := Word_Length_8; End_Bits : Stop_Bits := Stopbits_1; Control : Flow_Control := No_Flow_Control) is begin Serial_IO.Configure (This.Device, Baud_Rate, Parity, Data_Bits, End_Bits, Control); end Configure; ---------------------- -- Await_Send_Ready -- ---------------------- procedure Await_Send_Ready (This : USART) is begin loop exit when Tx_Ready (This); end loop; end Await_Send_Ready; ---------------------- -- Set_Read_Timeout -- ---------------------- procedure Set_Read_Timeout (This : in out Serial_Port; Wait : Time_Span := Time_Span_Last) is begin This.Timeout := Wait; end Set_Read_Timeout; -------------------------- -- Await_Data_Available -- -------------------------- procedure Await_Data_Available (This : USART; Timeout : Time_Span := Time_Span_Last; Timed_Out : out Boolean) is Deadline : constant Time := Clock + Timeout; begin Timed_Out := True; while Clock < Deadline loop if Rx_Ready (This) then Timed_Out := False; exit; end if; end loop; end Await_Data_Available; ---------------- -- Last_Index -- ---------------- function Last_Index (First : Stream_Element_Offset; Count : Long_Integer) return Stream_Element_Offset is begin if First = Stream_Element_Offset'First and then Count = 0 then -- we need to return First - 1, but cannot raise Constraint_Error; -- per RM else return First + Stream_Element_Offset (Count) - 1; end if; end Last_Index; ---------- -- Read -- ---------- overriding procedure Read (This : in out Serial_Port; Buffer : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset) is Raw : UInt9; Timed_Out : Boolean; Count : Long_Integer := 0; begin Receiving : for K in Buffer'Range loop Await_Data_Available (This.Device.Transceiver.all, This.Timeout, Timed_Out); exit Receiving when Timed_Out; Receive (This.Device.Transceiver.all, Raw); Buffer (K) := Stream_Element (Raw); Count := Count + 1; end loop Receiving; Last := Last_Index (Buffer'First, Count); end Read; ----------- -- Write -- ----------- overriding procedure Write (This : in out Serial_Port; Buffer : Ada.Streams.Stream_Element_Array) is begin for Next of Buffer loop Await_Send_Ready (This.Device.Transceiver.all); Transmit (This.Device.Transceiver.all, Stream_Element'Pos (Next)); end loop; end Write; end Serial_IO.Streaming;
Rodeo-McCabe/orka
Ada
2,310
ads
-- 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 Orka.Behaviors; with Orka.Cameras; with Orka.Jobs; with Orka.Rendering.Fences; with Orka.Simulation; with Orka.Transforms.Singles.Vectors; with Orka.Windows; private package Orka.Simulation_Jobs is use Ada.Real_Time; type Buffer_Region_Type is mod 4; package Transforms renames Orka.Transforms.Singles.Vectors; package Fences is new Orka.Rendering.Fences (Buffer_Region_Type); ----------------------------------------------------------------------------- function Clone_Fixed_Update_Job (Job : Jobs.Parallel_Job_Ptr; Length : Positive) return Jobs.Dependency_Array; function Create_Fixed_Update_Job (Scene : not null Behaviors.Behavior_Array_Access; Time_Step : Time_Span; Count : Natural) return Jobs.Parallel_Job_Ptr; function Create_Finished_Job (Scene : not null Behaviors.Behavior_Array_Access; Time_Step : Time_Span; Position : Behaviors.Vector4; Batch_Length : Positive) return Jobs.Job_Ptr; ----------------------------------------------------------------------------- function Create_Start_Render_Job (Fence : not null access Fences.Buffer_Fence; Window : Windows.Window_Ptr) return Jobs.Job_Ptr; function Create_Scene_Render_Job (Render : Simulation.Render_Ptr; Scene : not null Behaviors.Behavior_Array_Access; Camera : Cameras.Camera_Ptr) return Jobs.Job_Ptr; function Create_Finish_Render_Job (Fence : not null access Fences.Buffer_Fence; Window : Windows.Window_Ptr; Stop : Simulation.Stop_Ptr) return Jobs.Job_Ptr; end Orka.Simulation_Jobs;
reznikmm/matreshka
Ada
4,599
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_Draw.End_Guide_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Draw_End_Guide_Attribute_Node is begin return Self : Draw_End_Guide_Attribute_Node do Matreshka.ODF_Draw.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Draw_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Draw_End_Guide_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.End_Guide_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Draw_URI, Matreshka.ODF_String_Constants.End_Guide_Attribute, Draw_End_Guide_Attribute_Node'Tag); end Matreshka.ODF_Draw.End_Guide_Attributes;
charlie5/lace
Ada
781
adb
with lace.Environ.Paths, ada.Text_IO; procedure test_Environ_Paths is use lace.Environ.Paths, ada.Text_IO; Error : exception; begin put_Line ("Begin"); -- Test load of an empty file. -- declare Output : constant String := to_File ("data/empty.txt").load; begin if Output /= "" then raise Error with "Loading an empty file fails: '" & Output & "'"; end if; end; -- Test load of simple text. -- declare Output : constant String := to_File ("data/digits.txt").load; begin if Output /= "0123456789" then raise Error with "Loading a simple text file fails: '" & Output & "'"; end if; end; put_Line ("Success"); put_Line ("End"); end test_Environ_Paths;
AdaCore/gpr
Ada
76
adb
separate (Parent_Unit) task body My_Body_Task is null; end My_Body_Task;
zhmu/ananas
Ada
95
ads
with Generic_Inst6_I1, Generic_Inst6_G1.C; package Generic_Inst6_I2 is new Generic_Inst6_I1.C;
im-prakher/Amass
Ada
400
ads
-- Copyright 2017 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. name = "RapidDNS" type = "scrape" function start() setratelimit(1) end function vertical(ctx, domain) scrape(ctx, {url=buildurl(domain)}) end function buildurl(domain) return "https://rapiddns.io/subdomain/" .. domain .. "?full=1" end
python36/vibecrypt
Ada
1,353
adb
package body file_crypter is procedure init_key(key : key_s) is begin raiden.init_key(key); end init_key; procedure file_crypt(in_file : byte_io.File_Type; out_file : out byte_io.File_Type; mode_crypt : mode) is type raiden_access is access procedure (x : in byte_array_8; y : out byte_array_8); raiden_operation : raiden_access; t_b : byte; in_buf, out_buf : byte_array_8; in_ind : earth := 0; t_i : integer := 7; begin if mode_crypt = mode'(encrypt) then raiden_operation := raiden.raiden_encrypt'access; else raiden_operation := raiden.raiden_decrypt'access; end if; loop if byte_io.end_of_file(in_file) then if in_ind /= 0 then for i in in_ind..7 loop in_buf(integer(i)) := 0; end loop; else exit; end if; in_ind := 0; else byte_io.read(in_file, t_b); in_buf(integer(in_ind)) := t_b; increment(in_ind); end if; if in_ind = 0 then raiden_operation(in_buf, out_buf); if byte_io.end_of_file(in_file) then for i in reverse 0..7 loop if out_buf(i) /= 0 then t_i := i; exit; end if; end loop; end if; for i in 0..t_i loop byte_io.write(out_file, out_buf(i)); end loop; end if; end loop; end file_crypt; end file_crypter;
reznikmm/matreshka
Ada
3,892
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$ ------------------------------------------------------------------------------ package Matreshka.ODF_Attributes.Style.Font_Independent_Line_Spacing is type Style_Font_Independent_Line_Spacing_Node is new Matreshka.ODF_Attributes.Style.Style_Node_Base with null record; type Style_Font_Independent_Line_Spacing_Access is access all Style_Font_Independent_Line_Spacing_Node'Class; overriding function Get_Local_Name (Self : not null access constant Style_Font_Independent_Line_Spacing_Node) return League.Strings.Universal_String; end Matreshka.ODF_Attributes.Style.Font_Independent_Line_Spacing;
reznikmm/matreshka
Ada
3,739
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.Chart_Error_Category_Attributes is pragma Preelaborate; type ODF_Chart_Error_Category_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Chart_Error_Category_Attribute_Access is access all ODF_Chart_Error_Category_Attribute'Class with Storage_Size => 0; end ODF.DOM.Chart_Error_Category_Attributes;
sungyeon/drake
Ada
468
ads
pragma License (Unrestricted); -- implementation unit specialized for POSIX (Darwin, FreeBSD, or Linux) with C; package System.Native_Interrupts is pragma Preelaborate; subtype Interrupt_Id is C.signed_int; function Is_Blocked (Interrupt : Interrupt_Id) return Boolean; procedure Block (Interrupt : Interrupt_Id); procedure Unblock (Interrupt : Interrupt_Id); procedure Raise_Interrupt (Interrupt : Interrupt_Id); end System.Native_Interrupts;
AaronC98/PlaneSystem
Ada
3,741
ads
------------------------------------------------------------------------------ -- Ada Web Server -- -- -- -- Copyright (C) 2000-2013, 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/>. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ------------------------------------------------------------------------------ pragma Ada_2012; package AWS.Services.Dispatchers with Pure is -- Services on the Dispatcher tree are to help building big servers. -- Experiences shows that a lot of user's code is to check the value of a -- specific URI or request method to call the right callback that will -- handle the request. This code is a big "if/elsif/end if" that just hide -- the real job. A dispatcher is to replace this code. Currently there is -- five of them: -- -- URI (AWS.Services.Dispatchers.URI) -- to dispatch to a callback depending of the resource name. -- -- Method (AWS.Services.Dispatchers.Method) -- to dispatch to a callback depending of the request method. -- -- Virtual_Host (AWS.Services.Dispatchers.Virtual_Host) -- to dispatch to a callback depending on the host name. This is known -- as virtual hosting and permit to have multiple servers on the same -- machine using the same port. -- -- Transient_Pages (AWS.Services.Dispatchers.Transient_Pages) -- to handle transient pages, if the default user's callback returns -- 404 this dispatcher checks if the requested resource is a transient -- page. -- -- Timer (AWS.Services.Dispatchers.Timer) -- to dispatch to a specific callback depending on the current time. -- -- Linker (AWS.Services.Dispatchers.Linker) -- to link two dispatchers together, if the first one retruns 404 tries -- the second one. end AWS.Services.Dispatchers;
reznikmm/matreshka
Ada
4,541
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_Db.Port_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Db_Port_Attribute_Node is begin return Self : Db_Port_Attribute_Node do Matreshka.ODF_Db.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Db_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Db_Port_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Port_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Db_URI, Matreshka.ODF_String_Constants.Port_Attribute, Db_Port_Attribute_Node'Tag); end Matreshka.ODF_Db.Port_Attributes;
stcarrez/ada-keystore
Ada
3,533
adb
----------------------------------------------------------------------- -- keystore-tools-tests -- Tests for files -- Copyright (C) 2019, 2021, 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 Ada.Directories; with Util.Test_Caller; with Util.Strings; with Keystore.Files; package body Keystore.Tools.Tests is use Ada.Directories; use type Interfaces.Unsigned_64; package Caller is new Util.Test_Caller (Test, "Keystore.Tools"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Keystore.Files.Create+Open", Test_Store_Directory'Access); end Add_Tests; -- ------------------------------ -- Test storing a directory tree -- ------------------------------ procedure Test_Store_Directory (T : in out Test) is function Filter (Ent : in Directory_Entry_Type) return Boolean; function Filter (Ent : in Directory_Entry_Type) return Boolean is Name : constant String := Ada.Directories.Simple_Name (Ent); Kind : constant File_Kind := Ada.Directories.Kind (Ent); begin if Kind = Ada.Directories.Ordinary_File then return Util.Strings.Ends_With (Name, ".ads"); else return Name /= ".git" and then Name /= "results"; end if; end Filter; Path : constant String := Util.Tests.Get_Test_Path ("test-store.akt"); Password : Keystore.Secret_Key := Keystore.Create ("mypassword"); Config : Keystore.Wallet_Config := Unsecure_Config; begin declare W : Keystore.Files.Wallet_File; begin Config.Overwrite := True; W.Create (Path => Path, Password => Password, Config => Config); Keystore.Tools.Store (Wallet => W, Path => ".", Prefix => "store/", Pattern => "*", Filter => Filter'Access); end; declare procedure Check (Name : in String); W : Keystore.Files.Wallet_File; procedure Check (Name : in String) is Item : Keystore.Entry_Info; begin Item := W.Find (Name); T.Assert (Item.Size > 8192, "Invalid item size for " & Name); T.Assert (Item.Size < 128 * 1024, "Invalid item size for " & Name); T.Assert (Item.Block_Count > 2, "Invalid item for " & Name); T.Assert (Item.Kind = T_FILE, "Invalid item type for " & Name); end Check; begin W.Open (Password => Password, Path => Path); Check ("store/src/keystore.ads"); Check ("store/src/keystore-repository.ads"); Check ("store/obj/b__akt-main.ads"); end; end Test_Store_Directory; end Keystore.Tools.Tests;
anshumang/cp-snucl
Ada
217
ads
-- RUN: %llvmgcc -S %s package Field_Order is type Tagged_Type is abstract tagged null record; type With_Discriminant (L : Positive) is new Tagged_Type with record S : String (1 .. L); end record; end;
charlie5/cBound
Ada
435
ads
-- This file is generated by SWIG. Please do *not* modify by hand. -- with clib.Pointers; with Interfaces.C.Pointers; with Interfaces.C.Strings; with System; package clib.pointer_Pointers is -- time_t_Pointer_Pointer -- type time_t_Pointer_Pointer is access all clib.Pointers.time_t_Pointer; -- FILE_Pointer_Pointer -- type FILE_Pointer_Pointer is access all clib.Pointers.FILE_Pointer; end clib.pointer_Pointers;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
1,432
ads
with STM32GD.Clock; with STM32GD.Clock.Tree; generic Clock : STM32GD.Clock.Clock_Type; with package Clock_Tree is new STM32GD.Clock.Tree (<>); package STM32GD.RTC is subtype Year_Type is Natural range 2000 .. 2099; subtype Month_Type is Natural range 1 .. 12; subtype Day_Type is Natural range 1 .. 31; subtype Hour_Type is Natural range 0 .. 23; subtype Minute_Type is Natural range 0 .. 59; subtype Second_Type is Natural range 0 .. 59; subtype Second_Delta_Type is Natural range 0 .. (60 * 60 * 24); subtype Minute_Delta_Type is Natural range 0 .. (60 * 24); type Date_Time_Type is record Year : Year_Type; Month : Month_Type; Day : Day_Type; Hour : Hour_Type; Minute : Minute_Type; Second : Second_Type; end record; procedure Init; procedure Unlock; procedure Lock; procedure Read (Date_Time : out Date_Time_Type); generic with procedure Put (S : String); procedure Print (Date_Time : Date_Time_Type); procedure Add_Seconds (Date_Time : in out Date_Time_Type; Second_Delta : Second_Delta_Type); procedure Add_Minutes (Date_Time : in out Date_Time_Type; Minute_Delta : Minute_Delta_Type); procedure Set_Alarm (Date_Time : Date_Time_Type); procedure Wait_For_Alarm; function To_Seconds (Date_Time : Date_Time_Type) return Natural; end STM32GD.RTC;
rogermc2/GA_Ada
Ada
4,601
adb
with Ada.Text_IO; use Ada.Text_IO; with GL.Objects.Shaders; with Program_Loader; package body Shader_Manager is Black : constant GL.Types.Singles.Vector4 := (0.0, 0.0, 0.0, 0.0); Render_Uniforms : Shader_Uniforms; procedure Init (Render_Program : in out GL.Objects.Programs.Program) is use GL.Objects.Programs; use GL.Objects.Shaders; use GL.Types.Singles; use Program_Loader; Light : constant Singles.Vector3 := (0.0, 4.0, 1.0); begin Render_Program := Program_From ((Src ("src/shaders/vertex_shader_line.glsl", Vertex_Shader), Src ("src/shaders/fragment_shader_line.glsl", Fragment_Shader))); Render_Uniforms.View_Matrix_ID := Uniform_Location (Render_Program, "view_matrix"); Render_Uniforms.Model_Matrix_ID := Uniform_Location (Render_Program, "model_matrix"); Render_Uniforms.Projection_Matrix_ID := Uniform_Location (Render_Program, "projection_matrix"); Render_Uniforms.Model_View_Matrix_ID := Uniform_Location (Render_Program, "mv_matrix"); Render_Uniforms.Light_Position_ID := Uniform_Location (Render_Program, "light_position"); Render_Uniforms.Ambient_Colour_ID := Uniform_Location (Render_Program, "Ambient_Colour"); Render_Uniforms.Diffuse_Colour_ID := Uniform_Location (Render_Program, "Diffuse_Colour"); Render_Uniforms.Drawing_Colour_ID := Uniform_Location (Render_Program, "Drawing_Colour"); Use_Program (Render_Program); GL.Uniforms.Set_Single (Render_Uniforms.Light_Position_ID, Light); GL.Uniforms.Set_Single (Render_Uniforms.Model_Matrix_ID, Identity4); GL.Uniforms.Set_Single (Render_Uniforms.Model_View_Matrix_ID, Identity4); GL.Uniforms.Set_Single (Render_Uniforms.Light_Position_ID, Light); GL.Uniforms.Set_Single (Render_Uniforms.View_Matrix_ID, Identity4); GL.Uniforms.Set_Single (Render_Uniforms.Ambient_Colour_ID, Black); GL.Uniforms.Set_Single (Render_Uniforms.Diffuse_Colour_ID, Black); GL.Uniforms.Set_Single (Render_Uniforms.Drawing_Colour_ID, Black); exception when others => Put_Line ("An exception occurred in Shader_Manager.Init."); raise; end Init; -- ------------------------------------------------------------------------- procedure Set_Ambient_Colour (Ambient_Colour : Singles.Vector4) is begin GL.Uniforms.Set_Single (Render_Uniforms.Ambient_Colour_ID, Ambient_Colour); end Set_Ambient_Colour; -- ------------------------------------------------------------------------- procedure Set_Diffuse_Colour (Diffuse_Colour : Singles.Vector4) is begin GL.Uniforms.Set_Single (Render_Uniforms.Diffuse_Colour_ID, Diffuse_Colour); end Set_Diffuse_Colour; -- ------------------------------------------------------------------------- procedure Set_Drawing_Colour (Drawing_Colour : Singles.Vector4) is begin GL.Uniforms.Set_Single (Render_Uniforms.Drawing_Colour_ID, Drawing_Colour); end Set_Drawing_Colour; -- ------------------------------------------------------------------------- procedure Set_Light_Position_Vector (Light_Position : Singles.Vector3) is begin GL.Uniforms.Set_Single (Render_Uniforms.Light_Position_ID, Light_Position); end Set_Light_Position_Vector; -- ------------------------------------------------------------------------- procedure Set_Model_Matrix (Model_Matrix : Singles.Matrix4) is begin GL.Uniforms.Set_Single (Render_Uniforms.Model_Matrix_ID, Model_Matrix); end Set_Model_Matrix; -- ------------------------------------------------------------------------- procedure Set_View_Matrix (View_Matrix : Singles.Matrix4) is begin GL.Uniforms.Set_Single (Render_Uniforms.View_Matrix_ID, View_Matrix); end Set_View_Matrix; -- ------------------------------------------------------------------------- procedure Set_Model_View_Matrix (Model_View_Matrix : Singles.Matrix4) is begin GL.Uniforms.Set_Single (Render_Uniforms.Model_View_Matrix_ID, Model_View_Matrix); end Set_Model_View_Matrix; -- ------------------------------------------------------------------------- procedure Set_Projection_Matrix (Projection_Matrix : Singles.Matrix4) is begin GL.Uniforms.Set_Single (Render_Uniforms.Projection_Matrix_ID, Projection_Matrix); end Set_Projection_Matrix; -- ------------------------------------------------------------------------- end Shader_Manager;
zrmyers/VulkanAda
Ada
4,051
ads
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2021 Zane Myers -- -- 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. -------------------------------------------------------------------------------- with stdint_h; with Ada.Unchecked_Conversion; with Ada.Strings.Bounded; with Ada.Containers.Vectors; with Ada.Characters.Latin_1; with Interfaces.C; -------------------------------------------------------------------------------- --< @group Vulkan Core -------------------------------------------------------------------------------- --< @summary --< This package encompasses the core Vulkan API via its subpackages. -------------------------------------------------------------------------------- package Vulkan.Core is pragma Preelaborate; --< An exception that can be thrown during runtime. VULKAN_ERROR : exception; --< Local definition of line feed. LF : constant String := "" & Ada.Characters.Latin_1.LF; --< Vulkan Specification Major Version Number. type Vk_Spec_Major is mod (2 ** 10); --< Vulkan Specification Minor Version Number. type Vk_Spec_Minor is mod (2 ** 10); --< Vulkan Specification Patch Version Number. type Vk_Spec_Patch is mod (2 ** 12); --< Vulkan Specification Version Number. type Vk_Spec_Version is record major : Vk_Spec_Major; minor : Vk_Spec_Minor; patch : Vk_Spec_Patch; end record; --< Describes bits used to pack or unpack data from the record. for Vk_Spec_Version use record major at 0 range 22 .. 31; minor at 0 range 12 .. 21; patch at 0 range 0 .. 11; end record; for Vk_Spec_Version'Size use Interfaces.C.unsigned'Size; --< Common string type used throughout Vulkan interface. package Vk_Strings is new Ada.Strings.Bounded.Generic_Bounded_Length (Max => 256); type Vk_String is new Vk_Strings.Bounded_String; package Vk_String_Vectors is new Ada.Containers.Vectors ( Index_Type => Natural, Element_Type => Vk_String); subtype Vk_String_Vector is Vk_String_Vectors.Vector; --< Useful function to convert an unsigned 32-bit number into a version --< record. function To_Vk_Spec_Version is new Ada.Unchecked_Conversion ( Source => stdint_h.uint32_t, Target => Vk_Spec_Version); function To_Uint32 is new Ada.Unchecked_Conversion ( Source => Vk_Spec_Version, Target => stdint_h.uint32_t); function To_Vk_String(from : in String) return Vk_String is (Vk_String(Vk_Strings.To_Bounded_String(from))); function Image(from : in Vk_Spec_Version) return String is (from.major'Image & "." & from.minor'Image & "." & from.patch'Image); function Image(string_ref : in Vk_String) return String is (To_String(string_ref)); end Vulkan.Core;
reznikmm/matreshka
Ada
3,852
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.Literal_Exps; package AMF.OCL.Primitive_Literal_Exps is pragma Preelaborate; type OCL_Primitive_Literal_Exp is limited interface and AMF.OCL.Literal_Exps.OCL_Literal_Exp; type OCL_Primitive_Literal_Exp_Access is access all OCL_Primitive_Literal_Exp'Class; for OCL_Primitive_Literal_Exp_Access'Storage_Size use 0; end AMF.OCL.Primitive_Literal_Exps;
AdaCore/libadalang
Ada
25
ads
package P.Q is end P.Q;
reznikmm/matreshka
Ada
3,694
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.Form_Toggle_Attributes is pragma Preelaborate; type ODF_Form_Toggle_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Form_Toggle_Attribute_Access is access all ODF_Form_Toggle_Attribute'Class with Storage_Size => 0; end ODF.DOM.Form_Toggle_Attributes;
zhmu/ananas
Ada
25,531
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P R E P C O M P -- -- -- -- B o d y -- -- -- -- Copyright (C) 2003-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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Atree; use Atree; with Errout; use Errout; with Lib.Writ; use Lib.Writ; with Opt; use Opt; with Osint; use Osint; with Prep; use Prep; with Scans; use Scans; with Scn; use Scn; with Sinput.L; use Sinput.L; with Stringt; use Stringt; with Table; package body Prepcomp is No_Preprocessing : Boolean := True; -- Set to False if there is at least one source that needs to be -- preprocessed. Source_Index_Of_Preproc_Data_File : Source_File_Index := No_Source_File; -- The following variable should be a constant, but this is not possible -- because its type GNAT.Dynamic_Tables.Instance has a component P of -- uninitialized private type GNAT.Dynamic_Tables.Table_Private and there -- are no exported values for this private type. Warnings are Off because -- it is never assigned a value. pragma Warnings (Off); No_Mapping : Prep.Symbol_Table.Instance; pragma Warnings (On); type Preproc_Data is record Mapping : Symbol_Table.Instance; File_Name : File_Name_Type := No_File; Deffile : String_Id := No_String; Undef_False : Boolean := False; Always_Blank : Boolean := False; Comments : Boolean := False; No_Deletion : Boolean := False; List_Symbols : Boolean := False; Processed : Boolean := False; end record; -- Structure to keep the preprocessing data for a file name or for the -- default (when Name_Id = No_Name). No_Preproc_Data : constant Preproc_Data := (Mapping => No_Mapping, File_Name => No_File, Deffile => No_String, Undef_False => False, Always_Blank => False, Comments => False, No_Deletion => False, List_Symbols => False, Processed => False); Default_Data : Preproc_Data := No_Preproc_Data; -- The preprocessing data to be used when no specific preprocessing data -- is specified for a source. Default_Data_Defined : Boolean := False; -- True if source for which no specific preprocessing is specified need to -- be preprocess with the Default_Data. Current_Data : Preproc_Data := No_Preproc_Data; package Preproc_Data_Table is new Table.Table (Table_Component_Type => Preproc_Data, Table_Index_Type => Int, Table_Low_Bound => 1, Table_Initial => 5, Table_Increment => 100, Table_Name => "Prepcomp.Preproc_Data_Table"); -- Table to store the specific preprocessing data Command_Line_Symbols : Symbol_Table.Instance; -- A table to store symbol definitions specified on the command line with -- -gnateD switches. package Dependencies is new Table.Table (Table_Component_Type => Source_File_Index, Table_Index_Type => Int, Table_Low_Bound => 1, Table_Initial => 10, Table_Increment => 100, Table_Name => "Prepcomp.Dependencies"); -- Table to store the dependencies on preprocessing files procedure Add_Command_Line_Symbols; -- Add the command line symbol definitions, if any, to Prep.Mapping table procedure Skip_To_End_Of_Line; -- Ignore errors and scan up to the next end of line or the end of file ------------------------------ -- Add_Command_Line_Symbols -- ------------------------------ procedure Add_Command_Line_Symbols is Symbol_Id : Prep.Symbol_Id; begin for J in 1 .. Symbol_Table.Last (Command_Line_Symbols) loop Symbol_Id := Prep.Index_Of (Command_Line_Symbols.Table (J).Symbol); if Symbol_Id = No_Symbol then Symbol_Table.Increment_Last (Prep.Mapping); Symbol_Id := Symbol_Table.Last (Prep.Mapping); end if; Prep.Mapping.Table (Symbol_Id) := Command_Line_Symbols.Table (J); end loop; end Add_Command_Line_Symbols; -------------------- -- Add_Dependency -- -------------------- procedure Add_Dependency (S : Source_File_Index) is begin Dependencies.Increment_Last; Dependencies.Table (Dependencies.Last) := S; end Add_Dependency; ---------------------- -- Add_Dependencies -- ---------------------- procedure Add_Dependencies is begin for Index in 1 .. Dependencies.Last loop Add_Preprocessing_Dependency (Dependencies.Table (Index)); end loop; end Add_Dependencies; ------------------- -- Check_Symbols -- ------------------- procedure Check_Symbols is begin -- If there is at least one switch -gnateD specified if Symbol_Table.Last (Command_Line_Symbols) >= 1 then Current_Data := No_Preproc_Data; No_Preprocessing := False; Current_Data.Processed := True; -- Start with an empty, initialized mapping table; use Prep.Mapping, -- because Prep.Index_Of uses Prep.Mapping. Prep.Mapping := No_Mapping; Symbol_Table.Init (Prep.Mapping); -- Add the command line symbols Add_Command_Line_Symbols; -- Put the resulting Prep.Mapping in Current_Data, and immediately -- set Prep.Mapping to nil. Current_Data.Mapping := Prep.Mapping; Prep.Mapping := No_Mapping; -- Set the default data Default_Data := Current_Data; Default_Data_Defined := True; end if; end Check_Symbols; ----------------------------------- -- Parse_Preprocessing_Data_File -- ----------------------------------- procedure Parse_Preprocessing_Data_File (N : File_Name_Type) is OK : Boolean := False; Dash_Location : Source_Ptr; Symbol_Data : Prep.Symbol_Data; Symbol_Id : Prep.Symbol_Id; T : constant Nat := Total_Errors_Detected; begin -- Load the preprocessing data file Source_Index_Of_Preproc_Data_File := Load_Preprocessing_Data_File (N); -- Fail if preprocessing data file cannot be found if Source_Index_Of_Preproc_Data_File = No_Source_File then Get_Name_String (N); Fail ("preprocessing data file """ & Name_Buffer (1 .. Name_Len) & """ not found"); end if; -- Initialize scanner and set its behavior for processing a data file Scn.Scanner.Initialize_Scanner (Source_Index_Of_Preproc_Data_File); Scn.Scanner.Set_End_Of_Line_As_Token (True); Scn.Scanner.Reset_Special_Characters; For_Each_Line : loop <<Scan_Line>> Scan; exit For_Each_Line when Token = Tok_EOF; if Token = Tok_End_Of_Line then goto Scan_Line; end if; -- Line is not empty OK := False; No_Preprocessing := False; Current_Data := No_Preproc_Data; case Token is when Tok_Asterisk => -- Default data if Default_Data_Defined then Error_Msg ("multiple default preprocessing data", Token_Ptr); else OK := True; Default_Data_Defined := True; end if; when Tok_String_Literal => -- Specific data String_To_Name_Buffer (String_Literal_Id); Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len)); Current_Data.File_Name := Name_Find; OK := True; for Index in 1 .. Preproc_Data_Table.Last loop if Current_Data.File_Name = Preproc_Data_Table.Table (Index).File_Name then Error_Msg_File_1 := Current_Data.File_Name; Error_Msg ("multiple preprocessing data for{", Token_Ptr); OK := False; exit; end if; end loop; when others => Error_Msg ("`'*` or literal string expected", Token_Ptr); end case; -- If there is a problem, skip the line if not OK then Skip_To_End_Of_Line; goto Scan_Line; end if; -- Scan past the * or the literal string Scan; -- A literal string in second position is a definition file if Token = Tok_String_Literal then Current_Data.Deffile := String_Literal_Id; Current_Data.Processed := False; Scan; else -- If there is no definition file, set Processed to True now Current_Data.Processed := True; end if; -- Start with an empty, initialized mapping table; use Prep.Mapping, -- because Prep.Index_Of uses Prep.Mapping. Prep.Mapping := No_Mapping; Symbol_Table.Init (Prep.Mapping); -- Check the switches that may follow while Token /= Tok_End_Of_Line and then Token /= Tok_EOF loop if Token /= Tok_Minus then Error_Msg -- CODEFIX ("`'-` expected", Token_Ptr); Skip_To_End_Of_Line; goto Scan_Line; end if; -- Keep the location of the '-' for possible error reporting Dash_Location := Token_Ptr; -- Scan past the '-' Scan; OK := False; Change_Reserved_Keyword_To_Symbol; -- An identifier (or a reserved word converted to an -- identifier) is expected and there must be no blank space -- between the '-' and the identifier. if Token = Tok_Identifier and then Token_Ptr = Dash_Location + 1 then Get_Name_String (Token_Name); -- Check the character in the source, because the case is -- significant. case Sinput.Source (Token_Ptr) is when 'a' => -- All source text preserved (also implies -u) if Name_Len = 1 then Current_Data.No_Deletion := True; Current_Data.Undef_False := True; OK := True; end if; when 'u' => -- Undefined symbol are False if Name_Len = 1 then Current_Data.Undef_False := True; OK := True; end if; when 'b' => -- Blank lines if Name_Len = 1 then Current_Data.Always_Blank := True; OK := True; end if; when 'c' => -- Comment removed lines if Name_Len = 1 then Current_Data.Comments := True; OK := True; end if; when 's' => -- List symbols if Name_Len = 1 then Current_Data.List_Symbols := True; OK := True; end if; when 'D' => -- Symbol definition OK := Name_Len > 1; if OK then -- A symbol must be an Ada identifier; it cannot start -- with an underline or a digit. if Name_Buffer (2) = '_' or else Name_Buffer (2) in '0' .. '9' then Error_Msg ("symbol expected", Token_Ptr + 1); Skip_To_End_Of_Line; goto Scan_Line; end if; -- Get the name id of the symbol Symbol_Data.On_The_Command_Line := True; Name_Buffer (1 .. Name_Len - 1) := Name_Buffer (2 .. Name_Len); Name_Len := Name_Len - 1; Symbol_Data.Symbol := Name_Find; if Name_Buffer (1 .. Name_Len) = "if" or else Name_Buffer (1 .. Name_Len) = "else" or else Name_Buffer (1 .. Name_Len) = "elsif" or else Name_Buffer (1 .. Name_Len) = "end" or else Name_Buffer (1 .. Name_Len) = "not" or else Name_Buffer (1 .. Name_Len) = "and" or else Name_Buffer (1 .. Name_Len) = "then" then Error_Msg ("symbol expected", Token_Ptr + 1); Skip_To_End_Of_Line; goto Scan_Line; end if; -- Get the name id of the original symbol, with -- possibly capital letters. Name_Len := Integer (Scan_Ptr - Token_Ptr - 1); for J in 1 .. Name_Len loop Name_Buffer (J) := Sinput.Source (Token_Ptr + Text_Ptr (J)); end loop; Symbol_Data.Original := Name_Find; -- Scan past D<symbol> Scan; if Token /= Tok_Equal then Error_Msg -- CODEFIX ("`=` expected", Token_Ptr); Skip_To_End_Of_Line; goto Scan_Line; end if; -- Scan past '=' Scan; -- Here any reserved word is OK Change_Reserved_Keyword_To_Symbol (All_Keywords => True); -- Value can be an identifier (or a reserved word) -- or a literal string. case Token is when Tok_String_Literal => Symbol_Data.Is_A_String := True; Symbol_Data.Value := String_Literal_Id; when Tok_Identifier => Symbol_Data.Is_A_String := False; Start_String; for J in Token_Ptr .. Scan_Ptr - 1 loop Store_String_Char (Sinput.Source (J)); end loop; Symbol_Data.Value := End_String; when others => Error_Msg ("literal string or identifier expected", Token_Ptr); Skip_To_End_Of_Line; goto Scan_Line; end case; -- If symbol already exists, replace old definition -- by new one. Symbol_Id := Prep.Index_Of (Symbol_Data.Symbol); -- Otherwise, add a new entry in the table if Symbol_Id = No_Symbol then Symbol_Table.Increment_Last (Prep.Mapping); Symbol_Id := Symbol_Table.Last (Mapping); end if; Prep.Mapping.Table (Symbol_Id) := Symbol_Data; end if; when others => null; end case; Scan; end if; if not OK then Error_Msg ("invalid switch", Dash_Location); Skip_To_End_Of_Line; goto Scan_Line; end if; end loop; -- Add the command line symbols, if any, possibly replacing symbols -- just defined. Add_Command_Line_Symbols; -- Put the resulting Prep.Mapping in Current_Data, and immediately -- set Prep.Mapping to nil. Current_Data.Mapping := Prep.Mapping; Prep.Mapping := No_Mapping; -- Record Current_Data if Current_Data.File_Name = No_File then Default_Data := Current_Data; else Preproc_Data_Table.Increment_Last; Preproc_Data_Table.Table (Preproc_Data_Table.Last) := Current_Data; end if; Current_Data := No_Preproc_Data; end loop For_Each_Line; Scn.Scanner.Set_End_Of_Line_As_Token (False); -- Fail if there were errors in the preprocessing data file if Total_Errors_Detected > T then Errout.Finalize (Last_Call => True); Errout.Output_Messages; Fail ("errors found in preprocessing data file """ & Get_Name_String (N) & """"); end if; -- Record the dependency on the preprocessor data file Add_Dependency (Source_Index_Of_Preproc_Data_File); end Parse_Preprocessing_Data_File; --------------------------- -- Prepare_To_Preprocess -- --------------------------- procedure Prepare_To_Preprocess (Source : File_Name_Type; Preprocessing_Needed : out Boolean) is Default : Boolean := False; Index : Int := 0; begin -- By default, preprocessing is not needed Preprocessing_Needed := False; if No_Preprocessing then return; end if; -- First, look for preprocessing data specific to the current source for J in 1 .. Preproc_Data_Table.Last loop if Preproc_Data_Table.Table (J).File_Name = Source then Index := J; Current_Data := Preproc_Data_Table.Table (J); exit; end if; end loop; -- If no specific preprocessing data, then take the default if Index = 0 then if Default_Data_Defined then Current_Data := Default_Data; Default := True; else -- If no default, then nothing to do return; end if; end if; -- Set the preprocessing flags according to the preprocessing data if Current_Data.Comments and not Current_Data.Always_Blank then Comment_Deleted_Lines := True; Blank_Deleted_Lines := False; else Comment_Deleted_Lines := False; Blank_Deleted_Lines := True; end if; No_Deletion := Current_Data.No_Deletion; Undefined_Symbols_Are_False := Current_Data.Undef_False; List_Preprocessing_Symbols := Current_Data.List_Symbols; -- If not already done it, process the definition file if Current_Data.Processed then -- Set Prep.Mapping Prep.Mapping := Current_Data.Mapping; else -- First put the mapping in Prep.Mapping, because Prep.Parse_Def_File -- works on Prep.Mapping. Prep.Mapping := Current_Data.Mapping; String_To_Name_Buffer (Current_Data.Deffile); declare N : constant File_Name_Type := Name_Find; Deffile : constant Source_File_Index := Load_Definition_File (N); T : constant Nat := Total_Errors_Detected; Add_Deffile : Boolean := True; begin if Deffile <= No_Source_File then Fail ("definition file """ & Get_Name_String (N) & """ not found"); end if; -- Initialize the preprocessor and set the characteristics of the -- scanner for a definition file. Prep.Setup_Hooks (Error_Msg => Errout.Error_Msg'Access, Scan => Scn.Scanner.Scan'Access, Set_Ignore_Errors => Errout.Set_Ignore_Errors'Access, Put_Char => null, New_EOL => null); Scn.Scanner.Set_End_Of_Line_As_Token (True); Scn.Scanner.Reset_Special_Characters; -- Initialize the scanner and process the definition file Scn.Scanner.Initialize_Scanner (Deffile); Prep.Parse_Def_File; -- Reset the behavior of the scanner to the default Scn.Scanner.Set_End_Of_Line_As_Token (False); -- Fail if errors were found while processing the definition file if T /= Total_Errors_Detected then Errout.Finalize (Last_Call => True); Errout.Output_Messages; Fail ("errors found in definition file """ & Get_Name_String (N) & """"); end if; for Index in 1 .. Dependencies.Last loop if Dependencies.Table (Index) = Deffile then Add_Deffile := False; exit; end if; end loop; if Add_Deffile then Add_Dependency (Deffile); end if; end; -- Get back the mapping, indicate that the definition file is -- processed and store back the preprocessing data. Current_Data.Mapping := Prep.Mapping; Current_Data.Processed := True; if Default then Default_Data := Current_Data; else Preproc_Data_Table.Table (Index) := Current_Data; end if; end if; Preprocessing_Needed := True; end Prepare_To_Preprocess; --------------------------------------------- -- Process_Command_Line_Symbol_Definitions -- --------------------------------------------- procedure Process_Command_Line_Symbol_Definitions is Symbol_Data : Prep.Symbol_Data; Found : Boolean := False; begin Symbol_Table.Init (Command_Line_Symbols); -- The command line definitions have been stored temporarily in -- array Symbol_Definitions. for Index in 1 .. Preprocessing_Symbol_Last loop -- Check each symbol definition, fail immediately if syntax is not -- correct. Check_Command_Line_Symbol_Definition (Definition => Preprocessing_Symbol_Defs (Index).all, Data => Symbol_Data); Found := False; -- If there is already a definition for this symbol, replace the old -- definition by this one. for J in 1 .. Symbol_Table.Last (Command_Line_Symbols) loop if Command_Line_Symbols.Table (J).Symbol = Symbol_Data.Symbol then Command_Line_Symbols.Table (J) := Symbol_Data; Found := True; exit; end if; end loop; -- Otherwise, create a new entry in the table if not Found then Symbol_Table.Increment_Last (Command_Line_Symbols); Command_Line_Symbols.Table (Symbol_Table.Last (Command_Line_Symbols)) := Symbol_Data; end if; end loop; end Process_Command_Line_Symbol_Definitions; ------------------------- -- Skip_To_End_Of_Line -- ------------------------- procedure Skip_To_End_Of_Line is begin Set_Ignore_Errors (To => True); while Token /= Tok_End_Of_Line and then Token /= Tok_EOF loop Scan; end loop; Set_Ignore_Errors (To => False); end Skip_To_End_Of_Line; end Prepcomp;
godunko/adawebpack
Ada
2,950
ads
------------------------------------------------------------------------------ -- -- -- AdaWebPack -- -- -- ------------------------------------------------------------------------------ -- Copyright © 2020, Vadim Godunko -- -- 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. -- -- -- -- 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. -- ------------------------------------------------------------------------------ procedure WASM.Abort_Execution with Preelaborate; -- This procedure terminates current execution and destroys stack content. It's -- implemented as a throw of JavaScript exception.
charlie5/cBound
Ada
1,488
ads
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces.C; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_glx_context_tag_iterator_t is -- Item -- type Item is record data : access xcb.xcb_glx_context_tag_t; the_rem : aliased Interfaces.C.int; index : aliased Interfaces.C.int; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_glx_context_tag_iterator_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_context_tag_iterator_t.Item, Element_Array => xcb.xcb_glx_context_tag_iterator_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_context_tag_iterator_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_context_tag_iterator_t.Pointer, Element_Array => xcb.xcb_glx_context_tag_iterator_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_context_tag_iterator_t;
KissmyAsthma99/opp
Ada
18,470
adb
GNAT Community 2020 (20200818-93) Copyright 1992-2020, Free Software Foundation, I Cling: src\lab1.adb Se file time stamp: 2021-05-20 11:40:26 Cled at: 2021-05-20 14:41 1. -- RGR. Ada 2. -- A = (B*C)*(Z*MM)+D*(MX*MR) 3. -- 4. -- Date 5. with Ada.Integer_Text_IO, Ada.Text_IO; 6. use Ada.Integer_Text_IO, Ada.Text_IO; 7. procedure Lab1 is 8. N: Integer:=2400; 9. P: Integer:=4; 10. H: Integer:=N/P; 11. type Vector_All is array(Integer range <>) of Integer; 12. subtype Vector is Vector_All(1..N); 13. subtype VectorH is Vector_All(1..1*H); 14. subtype Vector2H is Vector_All(1..2*H); 15. subtype Vector3H is Vector_All(1..3*H); 16. type Matrix_All is array(Integer range <>) of Vector; 17. subtype Matrix is Matrix_All(1..N); 18. subtype MatrixH is Matrix_All(1..1*H); 19. subtype Matrix2H is Matrix_All(1..2*H); 20. subtype Matrix3H is Matrix_All(1..3*H); 21. -----Procedure for Input Vector----- 22. procedure VectorInput(V: out Vector) is 23. begin 24. for i in 1..N loop 25. V(i) := 1; 26. end loop; 27. end VectorInput; 28. -----Procedure for Input Matrix----- 29. procedure MatrixInput(M: out Matrix) is 30. begin 31. for i in 1..N loop 32. for j in 1..N loop 33. M(i)(j) := 1; 34. end loop; 35. end loop; 36. end MatrixInput; 37. -----Procedure for Output Vector----- 38. procedure VectorOutput(V: in Vector; str: in String) is 39. begin 40. Put("Vector " & str & ":"); 41. for i in 1..N loop 42. put(V(i)); 43. Put_Line(" "); 44. end loop; 45. Put_Line(""); 46. end VectorOutput; 47. -----Procedure of calculation AH = a*K+DH*(MX*MRH)----- 48. procedure Calculate(a : Integer; DH : VectorH; K : Vector; MX : Matrix; MRH : MatrixH; AH : out VectorH) is 49. sum1 : Integer; 50. begin 51. for i in 1..H loop 52. for j in 1..N loop 53. sum1 := 0; 54. for k in 1..N loop 55. sum1 := sum1 + MX(k)(j) * MRH(i)(k); 56. end loop; 57. -----calculation AH----- 58. AH(i) := a * K(j) + DH(i) * sum1; 59. end loop; 60. end loop; 61. end Calculate; 62. procedure tasksProcedure is 63. ------------------------------Specification Task 1------------------------------ 64. task T1 is 65. pragma Storage_Size(3000000000); 66. entry DataT4T1(VH : VectorH; MH : MatrixH); -- CH MRH 67. entry DataT3T1(V : Vector; VH : VectorH); 68. entry DataT2T1(MX : Matrix; MMH : MatrixH); 69. entry T4KT1(V4H : Vector); 70. entry T3KT1(V3H : Vector3H); 71. entry T2KT1(V2H : Vector2H); 72. entry T1a(a : Integer); 73. entry T2AH(resAH : VectorH); 74. entry T3AH(res2AH : VectorH); 75. entry T4AH(res3AH : VectorH); 76. end T1; 77. ------------------------------Specification Task 2----------------------- 78. task T2 is 79. pragma Storage_Size(3000000000); 80. entry DataT4T2(VH : VectorH; MH : MatrixH); -- CH MRH 81. entry DataT3T2(V : Vector; VH : VectorH); 82. entry DataT1T2(VH : VectorH); 83. entry T4KT2(V4H : Vector4H); 84. entry T3KT2(V3H : Vector3H); 85. entry T1KT2(VH : VectorH); 86. entry T2a(a : Integer); 87. entry a1T2(a1 : Integer); 88. end T2; 89. ------------------------------Specification Task 3--------------------- 90. task T3 is 91. pragma Storage_Size(3000000000); 92. entry DataT4T3(VH : VectorH; MH : MatrixH); -- CH MRH 93. entry DataT2T3(M : Matrix; MMH : MatrixH); 94. entry DataT1T3(V : Vector); 95. entry T4KT3(V4H : Vector4H); 96. entry T2KT3(V2H : Vector2H); 97. entry T1KT3(VH : VectorH); 98. entry a2T3(a2 : Integer); 99. entry a4T3(a4 : Integer); 100. end T3; 101. ------------------------------Specification Task 4---------------------- 102. task T4 is 103. pragma Storage_Size(3000000000); 104. entry DataT3T4(V : Vector; VH : VectorH); -- CH MRH 105. entry DataT2T4(M : Matrix; MMH : MatrixH); 106. entry DataT1T4(VH : VectorH); 107. entry T3KT4(V3H : Vector3H); 108. entry T2KT4(V2H : Vector2H); 109. entry T1KT4(VH : VectorH); 110. entry a3T4(a3 : Integer); 111. entry T4a(a : Integer); 112. end T4; 113. ------------------------------Task 1------------------------------ 114. task body T1 is 115. a1, resa : Integer; 116. B, Z, A, resk: Vector; 117. MXH, MMH, MRH : MatrixH; 118. DH, BH, CH, KH, AH : VectorH; K2H : VactorH; 119. begin 120. Put_Line("T1 started."); 121. VectorInput(B); 122. ----------------------passing BH to T2--------------------- 123. T2.DataT1T2(B(H+1..2*H)); 124. ----------------------passing BH to T3--------------------- 125. T3.DataT1T3(B(2*H+1..3*H)); 126. ----------------------passing BH to T4--------------------- 127. T4.DataT1T4(B(3*H+1..N)); 128. ----------------------get MXH, MMH ot T2----------------------- 129. accept DataT2T1 (M : Matrix; MMH : MatrixH) do 130. MX := M; 131. MMH := MMH; 132. end DataT2T1; 133. ----------------------get Z, DH ot T3----------------------- 134. accept DataT3T1 (V : in Vector; VH : in VectorH) do 135. Z := V; 136. DH := VH; 137. end DataT3T1; 138. ----------------------get CH, MRH ot T4----------------------- 139. accept DataT4T1 (VH : in VectorH; MH : in MatrixH) do 140. CH := VH; 141. MRH := MH; 142. end DataT4T1; 143. ----------------------calculation a1 = BH * CH---------------------- 144. a1 := 0; 145. for i in 1..H loop 146. a1 := a1 + BH(i) * CH(i); 147. end loop; 148. ------------------passing a1 to T2---------------------------------- 149. T2.a1T2(a1); 150. ----------------------------get a ot T3----------------------------- 151. accept T1a (a : in Integer) do 152. resa := a; 153. end T1a; 154. -----------------calculation KH = (Z*MMH)------------------ 155. for i in 1..H loop 156. for j in 1..N loop 157. KH := Z(j)*MMH(i)(j); 158. end loop; 159. end loop; 160. -------------------passing KH to T2, T3, T4------------------------- 161. T2.T1KT2(KH); 162. T3.T1KT3(KH); 163. T4.T1KT4(KH); 164. ----------------------get KH ot T2---------------------------------- 165. accept T2KT1 (V2H : in Vector2H) do 166. KH:=V2H; 167. 168. end T2KT1; 169. ----------------------get KH ot T3---------------------------------- 170. accept T3KT1 (V3H : in Vector3H) do 171. K2H:=V3H; 172. KH := K2H; 173. end T3KT1; 174. ----------------------get KH ot T4---------------------------------- 175. accept T4KT1 (V4H : in Vector_All) do 176. K4H := V4H; 177. resk := KH; 178. end T4KT1; 179. ----------------------calculation AH = K + a*EH*x------------------- 180. Calculate(a => resa, DH => DH, MX => MX, MRH => MRH, K => resk, AH => AH); 181. ----------------------get AH ot T2--------------------------------- 182. accept T2AH (resAH : in VectorH) do 183. A(1..H) := AH; 184. A(H+1..2*H) := resAH; 185. end T2AH; 186. accept T3AH (res2AH : in VectorH) do 187. A(1..H) := AH; 188. A(2*H+1..3*H) := res2AH; 189. end T3AH; 190. accept T4AH (res3AH : in VectorH) do 191. A(1..H) := AH; 192. A(3*H+1..N) := res3AH; 193. end T4AH; 194. ---------------------print A---------------------------------------- 195. if (N<10) then 196. delay(0.5); 197. VectorOutput(A, "A"); 198. end if; 199. Put_Line("T1 finished."); 200. end T1; 201. ---------------------------------Task 2------------------------------------ 202. task body T2 is 203. a2, resa : Integer; 204. DH, BH, CH, KH : VectorH; 205. K2H : Vector2H; 206. Z, resk : Vector; 207. MX, MM : Matrix; 208. MRH : MatrixH; 209. begin 210. Put_Line("T2 started."); 211. ----------------------------Enter MX, MM---------------------------- 212. MatrixInput(MX); 213. MatrixInput(MM); 214. ----------------------passing MX, MMH to T1--------------------- 215. T1.DataT2T1(MX, MMH(2*H+1..3*H)); 216. ----------------------passing MX, MMH to T3--------------------- 217. T3.DataT2T3(MX, MMH(2*H+1..3*H)); 218. ----------------------passing MX, MMH to T4--------------------- 219. T4.DataT2T4(MX, MMH(2*H+1..3*H)); 220. -----------------get B, Z, DH, CH, MRH ot T1, T3, T4----------------- 221. accept DataT1T2 (VH : in VectorH) do 222. BH := VH; 223. end DataT1T2; 224. accept DataT3T2 (V : in Vector; VH : in VectorH) do 225. Z := V; 226. DH := VH; 227. end DataT3T2; 228. accept DataT4T2 (VH : in VectorH; MH : in MatrixH) do 229. CH := VH; 230. MRH := MH; 231. end DataT4T2; 232. ----------------------calculation a2 = BH * CH---------------------- 233. a2 := 0; 234. for i in H+1..2*H loop 235. a2 := a2 + BH(i) * CH(i); 236. end loop; 237. -------------accept a1 ot T1 and calculation a2 = a2 + a1----------- 238. accept a1T2 (a1 : in Integer) do 239. a2 := a2 + a1; 240. end a1T2; 241. ------------------------passing a2 to T3---------------------------- 242. T3.a2T3(a2); 243. ----------------------------get a ot T3----------------------------- 244. accept T2a (a : in Integer) do 245. resa := a; 246. end T2a; 247. -----------------calculation KH = (Z*MMH)------------------ 248. for i in H+1..2*H loop 249. for j in 1..N loop 250. KH := Z(j)*MMH(i)(j); 251. end loop; 252. end loop; 253. ----------------------passing KH to T4------------------------------ 254. T1.T2KT1(K2H); 255. T3.T2KT3(K2H); 256. T4.T2KT4(K2H); 257. ----------------------get KH ot T2---------------------------------- 258. accept T1KT2 (VH : in VectorH) do 259. KH:=VH; 260. KH := K2H; 261. end T1KT2; 262. accept T3KT2 (V3H : in Vector3H) do 263. KH := V3H; 264. resk := KH; 265. end T3KT2; 266. accept T4KT2 (V4H : in Vector) do 267. K2H := V4H; 268. resk := K2H; 269. end T4KT2; 270. -------------------calculation AH = a*K+DH*(MX*MRH)------------------ 271. Calculate(a => resa, DH => DH, MX => MX, MRH => MRH, K => K, AH => AH); 272. --------------------------passing AH to T1------------------------- 273. T1.T2AH(AH); 274. Put_Line("T2 finished."); 275. end T2; 276. ----------------------Task 3------------------------- 277. task body T3 is 278. x, a3, resa : Integer; 279. D, Z, resk: Vector; 280. MM, MRH, MX : Matrix; 281. AH, KH, KH2 : VectorH; 282. K2H : Vector2H; K3H : Vector3H; 283. CH, BH, D3H : Vector3H; 284. begin 285. Put_Line("T3 started."); 286. ----------------------------Enter MX, MM---------------------------- 287. VectorInput(Z); 288. VectorInput(D); 289. ----------------------passing MX, MMH to T1--------------------- 290. T1.DataT2T1(Z, DH(3*H+1..N)); 291. ----------------------passing MX, MMH to T3--------------------- 292. T3.DataT2T3(MX, MMH(3*H+1..N)); 293. ----------------------passing MX, MMH to T4--------------------- 294. T4.DataT2T4(MX, MMH(3*H+1..N)); 295. -----------------get B, Z, DH, CH, MRH ot T1, T3, T4----------------- 296. accept DataT1T3 (VH : in VectorH) do 297. BH := VH; 298. end DataT1T3; 299. accept DataT2T3 (V : in Vector; VH : in VectorH) do 300. Z := V; 301. DH := VH; 302. end DataT2T3; 303. accept DataT4T3 (VH : in VectorH; MH : in MatrixH) do 304. CH := VH; 305. MRH := MH; 306. end DataT4T3; 307. ----------------------calculation a2 = BH * CH---------------------- 308. a3 := 0; 309. for i in 3*H+1..N loop 310. a3 := a3 + BH(i) * CH(i); 311. end loop; 312. ------------------------passing a3 to T4---------------------------- 313. T4.a3T4(a3); 314. -----------accept a2 ot T2 and calculation a3 = a3 + a2------------ 315. accept a4T3 (a4 : in Integer) do 316. a3 := a2 + a4; 317. end a4T3; 318. resa := a3; 319. ----------------------pass a to T1, T2, T4-------------------------- 320. T1.T1a(resa); 321. T2.T2a(resa); 322. T4.T4a(resa); 323. -----------------calculation KH = (Z*MMH)------------------ 324. for i in 2*H+1..3*H loop 325. for j in 1..N loop 326. KH := Z(j)*MMH(j)(i); 327. end loop; 328. end loop; 329. ----------------- get H ot T1, T2, T3 ----------------- 330. accept T1KT3 (VH : in VectorH) do 331. KH:=VH; 332. KH:=K3H; 333. end T1KT3; 334. accept T2KT3 (V2H : in Vector2H) do 335. K3H:= V2H; 336. end T2KT3; 337. accept T4KT3 (V4H : in Vector) do 338. K3H := V4H; 339. resk:=K3H; 340. end T4KT3; 341. -------------------calculation AH = a*K+DH*(MX*MRH)------------------ 342. Calculate(a => resa, DH => DH, MX => MX, MRH => MRH, K => K, AH => AH); 343. --------------------------passing A2H to T1------------------------- 344. T1.T3AH(AH); 345. Put_Line("T3 finished."); 346. end T3; 347. ------------------------------Task 4------------------------------ 348. task body T4 is 349. resa, a4: Integer; 350. E, B, C, D, resk : Vector; 351. ME : Matrix; 352. AH, KH, KH4 : VectorH; 353. K2H : Vector2H; K3H : Vector3H; 354. MMH : MatrixH; 355. begin 356. Put_Line("T4 started."); 357. --------------------------Input C, MR-------------------------- 358. VectorInput(C); 359. MatrixInput(MR); 360. ----------------passing CH, MRH to T1, T2, T3, T4------------------ 361. T4.DataT2T4(CH, MRH(3*H+1..N)); 362. T1.DataT4T1(CH, MRH); 363. T2.DataT4T2(CH, MRH); 364. T3.DataT4T3(CH, MRH); 365. -----------------get B, Z, DH, CH, MRH ot T1, T3, T4----------------- 366. accept DataT1T4 (VH : in VectorH) do 367. BH := VH; 368. end DataT1T4; 369. accept DataT2T4 (M : in Matrix; MMH : in MatrixH) do 370. MX := M; 371. MMH := MH; 372. end DataT2T4; 373. accept DataT3T4 (V : in Vector; VH : VectorH) do 374. Z := V; 375. DH := VH; 376. end DataT3T4; 377. ----------------------calculation a4 = BH * CH----------------------- 378. a4 := 0; 379. for i in 3*H+1..N loop 380. a4 := a4 + BH(i) * CH(i); 381. end loop; 382. ---------------------accept a3 ot T3------------------------------- 383. accept a3T4 (a3 : in Integer) do 384. a4 := a4 + a3; 385. end a3T4; 386. ------------------------passing a4 to T3----------------------------- 387. T3.a4T3(a); 388. accept T4a (a : in Integer) do 389. resa := a; 390. end T4a; 391. -----------------calculation KH = (Z*MMH)------------------ 392. for i in 3*H+1..N loop 393. for j in 1..N loop 394. KH4 := Z(j)*MMH(j)(i); 395. end loop; 396. end loop; 397. ----------------- pass K to T1, T2, T3 ----------------- 398. T1.T4KT1(KH4); 399. T2.T4KT2(KH4); 400. T3.T4KT3(KH4); 401. ----------------- get KH ot T1, T2, T3 ----------------- 402. accept T1KT4 (VH : in VectorH) do 403. KH:=VH; 404. end T1KT4; 405. accept T2KT4 (V2H : in Vector2H) do 406. KH2:= V2H; 407. end T2KT4; 408. accept T3KT4 (V3H : in Vector3H) do 409. KH4 := V3H; 410. resk:=KH4; 411. end T3KT4; 412. -------------------calculation AH = a*K+DH*(MX*MRH)------------------ 413. Calculate(a => resa, DH => DH, MX => MX, MRH => MRH, K => K, AH => AH); 414. --------------------------passing AH to T1------------------------- 415. T1.T3AH(AH); 416. Put_Line("T4 finished."); 417. end T4; 418. begin 419. Put_Line(""); 420. end tasksProcedure; 421. begin 422. Put_Line("Lab4 started."); 423. New_Line; 424. tasksProcedure; 425. Put_Line("Lab4 finished."); 426. New_Line; 427. end Lab1; 427 lines: 49 errors, 7 warnings
CopyPasteBugs/ActionGameContestProject
Ada
520
adb
<AnimDB FragDef="Animations/Mannequin/ADB/FaceFragmentIds.xml" TagDef="Animations/Mannequin/ADB/FaceTags.xml"> <FragmentList> <BodyMove> <Fragment BlendOutDuration="0.2" Tags=""> <AnimLayer> <Blend ExitTime="0" StartTime="0" Duration="0.2"/> <Animation name="BodyAnim" flags="Loop"/> </AnimLayer> <AnimLayer> <Blend ExitTime="0" StartTime="0" Duration="0.25999999"/> <Animation name="FaceAnim" flags="Loop"/> </AnimLayer> </Fragment> </BodyMove> </FragmentList> </AnimDB>
MinimSecure/unum-sdk
Ada
853
adb
-- Copyright 2017-2019 Free Software Foundation, Inc. -- -- This program 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 3 of the License, or -- (at your option) any later version. -- -- 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. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. with Pck; use Pck; procedure Foo_P211_061 is My_Str : Str := "ABCD"; begin Do_Nothing (My_Str'Address); -- STOP end Foo_P211_061;
zhmu/ananas
Ada
26,720
ads
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . A W K -- -- -- -- S p e c -- -- -- -- Copyright (C) 2000-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. -- -- -- ------------------------------------------------------------------------------ -- This is an AWK-like unit. It provides an easy interface for parsing one -- or more files containing formatted data. The file can be viewed seen as -- a database where each record is a line and a field is a data element in -- this line. In this implementation an AWK record is a line. This means -- that a record cannot span multiple lines. The operating procedure is to -- read files line by line, with each line being presented to the user of -- the package. The interface provides services to access specific fields -- in the line. Thus it is possible to control actions taken on a line based -- on values of some fields. This can be achieved directly or by registering -- callbacks triggered on programmed conditions. -- -- The state of an AWK run is recorded in an object of type session. -- The following is the procedure for using a session to control an -- AWK run: -- -- 1) Specify which session is to be used. It is possible to use the -- default session or to create a new one by declaring an object of -- type Session_Type. For example: -- -- Computers : Session_Type; -- -- 2) Specify how to cut a line into fields. There are two modes: using -- character fields separators or column width. This is done by using -- Set_Fields_Separators or Set_Fields_Width. For example by: -- -- AWK.Set_Field_Separators (";,", Computers); -- -- or by using iterators' Separators parameter. -- -- 3) Specify which files to parse. This is done with Add_File/Add_Files -- services, or by using the iterators' Filename parameter. For -- example: -- -- AWK.Add_File ("myfile.db", Computers); -- -- 4) Run the AWK session using one of the provided iterators. -- -- Parse -- This is the most automated iterator. You can gain control on -- the session only by registering one or more callbacks (see -- Register). -- -- Get_Line/End_Of_Data -- This is a manual iterator to be used with a loop. You have -- complete control on the session. You can use callbacks but -- this is not required. -- -- For_Every_Line -- This provides a mixture of manual/automated iterator action. -- -- Examples of these three approaches appear below -- -- There are many ways to use this package. The following discussion shows -- three approaches to using this package, using the three iterator forms. -- All examples will use the following file (computer.db): -- -- Pluton;Windows-NT;Pentium III -- Mars;Linux;Pentium Pro -- Venus;Solaris;Sparc -- Saturn;OS/2;i486 -- Jupiter;MacOS;PPC -- -- 1) Using Parse iterator -- -- Here the first step is to register some action associated to a pattern -- and then to call the Parse iterator (this is the simplest way to use -- this unit). The default session is used here. For example to output the -- second field (the OS) of computer "Saturn". -- -- procedure Action is -- begin -- Put_Line (AWK.Field (2)); -- end Action; -- -- begin -- AWK.Register (1, "Saturn", Action'Access); -- AWK.Parse (";", "computer.db"); -- -- -- 2) Using the Get_Line/End_Of_Data iterator -- -- Here you have full control. For example to do the same as -- above but using a specific session, you could write: -- -- Computer_File : Session_Type; -- -- begin -- AWK.Set_Current (Computer_File); -- AWK.Open (Separators => ";", -- Filename => "computer.db"); -- -- -- Display Saturn OS -- -- while not AWK.End_Of_File loop -- AWK.Get_Line; -- -- if AWK.Field (1) = "Saturn" then -- Put_Line (AWK.Field (2)); -- end if; -- end loop; -- -- AWK.Close (Computer_File); -- -- -- 3) Using For_Every_Line iterator -- -- In this case you use a provided iterator and you pass the procedure -- that must be called for each record. You could code the previous -- example could be coded as follows (using the iterator quick interface -- but without using the current session): -- -- Computer_File : Session_Type; -- -- procedure Action (Quit : in out Boolean) is -- begin -- if AWK.Field (1, Computer_File) = "Saturn" then -- Put_Line (AWK.Field (2, Computer_File)); -- end if; -- end Action; -- -- procedure Look_For_Saturn is -- new AWK.For_Every_Line (Action); -- -- begin -- Look_For_Saturn (Separators => ";", -- Filename => "computer.db", -- Session => Computer_File); -- -- Integer_Text_IO.Put -- (Integer (AWK.NR (Session => Computer_File))); -- Put_Line (" line(s) have been processed."); -- -- You can also use a regular expression for the pattern. Let us output -- the computer name for all computer for which the OS has a character -- O in its name. -- -- Regexp : String := ".*O.*"; -- -- Matcher : Regpat.Pattern_Matcher := Regpat.Compile (Regexp); -- -- procedure Action is -- begin -- Text_IO.Put_Line (AWK.Field (2)); -- end Action; -- -- begin -- AWK.Register (2, Matcher, Action'Unrestricted_Access); -- AWK.Parse (";", "computer.db"); -- with Ada.Finalization; with GNAT.Regpat; package GNAT.AWK is Session_Error : exception; -- Raised when a Session is reused but is not closed File_Error : exception; -- Raised when there is a file problem (see below) End_Error : exception; -- Raised when an attempt is made to read beyond the end of the last -- file of a session. Field_Error : exception; -- Raised when accessing a field value which does not exist Data_Error : exception; -- Raised when it is impossible to convert a field value to a specific type type Count is new Natural; type Widths_Set is array (Positive range <>) of Positive; -- Used to store a set of columns widths Default_Separators : constant String := " " & ASCII.HT; Use_Current : constant String := ""; -- Value used when no separator or filename is specified in iterators type Session_Type is limited private; -- This is the main exported type. A session is used to keep the state of -- a full AWK run. The state comprises a list of files, the current file, -- the number of line processed, the current line, the number of fields in -- the current line... A default session is provided (see Set_Current, -- Current_Session and Default_Session below). ---------------------------- -- Package initialization -- ---------------------------- -- To be thread safe it is not possible to use the default provided -- session. Each task must used a specific session and specify it -- explicitly for every services. procedure Set_Current (Session : Session_Type); -- Set the session to be used by default. This file will be used when the -- Session parameter in following services is not specified. function Current_Session return not null access Session_Type; -- Returns the session used by default by all services. This is the -- latest session specified by Set_Current service or the session -- provided by default with this implementation. function Default_Session return not null access Session_Type; -- Returns the default session provided by this package. Note that this is -- the session return by Current_Session if Set_Current has not been used. procedure Set_Field_Separators (Separators : String := Default_Separators; Session : Session_Type); procedure Set_Field_Separators (Separators : String := Default_Separators); -- Set the field separators. Each character in the string is a field -- separator. When a line is read it will be split by field using the -- separators set here. Separators can be changed at any point and in this -- case the current line is split according to the new separators. In the -- special case that Separators is a space and a tabulation -- (Default_Separators), fields are separated by runs of spaces and/or -- tabs. procedure Set_FS (Separators : String := Default_Separators; Session : Session_Type) renames Set_Field_Separators; procedure Set_FS (Separators : String := Default_Separators) renames Set_Field_Separators; -- FS is the AWK abbreviation for above service procedure Set_Field_Widths (Field_Widths : Widths_Set; Session : Session_Type); procedure Set_Field_Widths (Field_Widths : Widths_Set); -- This is another way to split a line by giving the length (in number of -- characters) of each field in a line. Field widths can be changed at any -- point and in this case the current line is split according to the new -- field lengths. A line split with this method must have a length equal or -- greater to the total of the field widths. All characters remaining on -- the line after the latest field are added to a new automatically -- created field. procedure Add_File (Filename : String; Session : Session_Type); procedure Add_File (Filename : String); -- Add Filename to the list of file to be processed. There is no limit on -- the number of files that can be added. Files are processed in the order -- they have been added (i.e. the filename list is FIFO). If Filename does -- not exist or if it is not readable, File_Error is raised. procedure Add_Files (Directory : String; Filenames : String; Number_Of_Files_Added : out Natural; Session : Session_Type); procedure Add_Files (Directory : String; Filenames : String; Number_Of_Files_Added : out Natural); -- Add all files matching the regular expression Filenames in the specified -- directory to the list of file to be processed. There is no limit on -- the number of files that can be added. Each file is processed in -- the same order they have been added (i.e. the filename list is FIFO). -- The number of files (possibly 0) added is returned in -- Number_Of_Files_Added. ------------------------------------- -- Information about current state -- ------------------------------------- function Number_Of_Fields (Session : Session_Type) return Count; function Number_Of_Fields return Count; pragma Inline (Number_Of_Fields); -- Returns the number of fields in the current record. It returns 0 when -- no file is being processed. function NF (Session : Session_Type) return Count renames Number_Of_Fields; function NF return Count renames Number_Of_Fields; -- AWK abbreviation for above service function Number_Of_File_Lines (Session : Session_Type) return Count; function Number_Of_File_Lines return Count; pragma Inline (Number_Of_File_Lines); -- Returns the current line number in the processed file. It returns 0 when -- no file is being processed. function FNR (Session : Session_Type) return Count renames Number_Of_File_Lines; function FNR return Count renames Number_Of_File_Lines; -- AWK abbreviation for above service function Number_Of_Lines (Session : Session_Type) return Count; function Number_Of_Lines return Count; pragma Inline (Number_Of_Lines); -- Returns the number of line processed until now. This is equal to number -- of line in each already processed file plus FNR. It returns 0 when -- no file is being processed. function NR (Session : Session_Type) return Count renames Number_Of_Lines; function NR return Count renames Number_Of_Lines; -- AWK abbreviation for above service function Number_Of_Files (Session : Session_Type) return Natural; function Number_Of_Files return Natural; pragma Inline (Number_Of_Files); -- Returns the number of files associated with Session. This is the total -- number of files added with Add_File and Add_Files services. function File (Session : Session_Type) return String; function File return String; -- Returns the name of the file being processed. It returns the empty -- string when no file is being processed. --------------------- -- Field accessors -- --------------------- function Field (Rank : Count; Session : Session_Type) return String; function Field (Rank : Count) return String; -- Returns field number Rank value of the current record. If Rank = 0 it -- returns the current record (i.e. the line as read in the file). It -- raises Field_Error if Rank > NF or if Session is not open. function Field (Rank : Count; Session : Session_Type) return Integer; function Field (Rank : Count) return Integer; -- Returns field number Rank value of the current record as an integer. It -- raises Field_Error if Rank > NF or if Session is not open. It -- raises Data_Error if the field value cannot be converted to an integer. function Field (Rank : Count; Session : Session_Type) return Float; function Field (Rank : Count) return Float; -- Returns field number Rank value of the current record as a float. It -- raises Field_Error if Rank > NF or if Session is not open. It -- raises Data_Error if the field value cannot be converted to a float. generic type Discrete is (<>); function Discrete_Field (Rank : Count; Session : Session_Type) return Discrete; generic type Discrete is (<>); function Discrete_Field_Current_Session (Rank : Count) return Discrete; -- Returns field number Rank value of the current record as a type -- Discrete. It raises Field_Error if Rank > NF. It raises Data_Error if -- the field value cannot be converted to type Discrete. -------------------- -- Pattern/Action -- -------------------- -- AWK defines rules like "PATTERN { ACTION }". Which means that ACTION -- will be executed if PATTERN match. A pattern in this implementation can -- be a simple string (match function is equality), a regular expression, -- a function returning a boolean. An action is associated to a pattern -- using the Register services. -- -- Each procedure Register will add a rule to the set of rules for the -- session. Rules are examined in the order they have been added. type Pattern_Callback is access function return Boolean; -- This is a pattern function pointer. When it returns True the associated -- action will be called. type Action_Callback is access procedure; -- A simple action pointer type Match_Action_Callback is access procedure (Matches : GNAT.Regpat.Match_Array); -- An advanced action pointer used with a regular expression pattern. It -- returns an array of all the matches. See GNAT.Regpat for further -- information. procedure Register (Field : Count; Pattern : String; Action : Action_Callback; Session : Session_Type); procedure Register (Field : Count; Pattern : String; Action : Action_Callback); -- Register an Action associated with a Pattern. The pattern here is a -- simple string that must match exactly the field number specified. procedure Register (Field : Count; Pattern : GNAT.Regpat.Pattern_Matcher; Action : Action_Callback; Session : Session_Type); procedure Register (Field : Count; Pattern : GNAT.Regpat.Pattern_Matcher; Action : Action_Callback); -- Register an Action associated with a Pattern. The pattern here is a -- simple regular expression which must match the field number specified. procedure Register (Field : Count; Pattern : GNAT.Regpat.Pattern_Matcher; Action : Match_Action_Callback; Session : Session_Type); procedure Register (Field : Count; Pattern : GNAT.Regpat.Pattern_Matcher; Action : Match_Action_Callback); -- Same as above but it pass the set of matches to the action -- procedure. This is useful to analyze further why and where a regular -- expression did match. procedure Register (Pattern : Pattern_Callback; Action : Action_Callback; Session : Session_Type); procedure Register (Pattern : Pattern_Callback; Action : Action_Callback); -- Register an Action associated with a Pattern. The pattern here is a -- function that must return a boolean. Action callback will be called if -- the pattern callback returns True and nothing will happen if it is -- False. This version is more general, the two other register services -- trigger an action based on the value of a single field only. procedure Register (Action : Action_Callback; Session : Session_Type); procedure Register (Action : Action_Callback); -- Register an Action that will be called for every line. This is -- equivalent to a Pattern_Callback function always returning True. -------------------- -- Parse iterator -- -------------------- procedure Parse (Separators : String := Use_Current; Filename : String := Use_Current; Session : Session_Type); procedure Parse (Separators : String := Use_Current; Filename : String := Use_Current); -- Launch the iterator, it will read every line in all specified -- session's files. Registered callbacks are then called if the associated -- pattern match. It is possible to specify a filename and a set of -- separators directly. This offer a quick way to parse a single -- file. These parameters will override those specified by Set_FS and -- Add_File. The Session will be opened and closed automatically. -- File_Error is raised if there is no file associated with Session, or if -- a file associated with Session is not longer readable. It raises -- Session_Error is Session is already open. ----------------------------------- -- Get_Line/End_Of_Data Iterator -- ----------------------------------- type Callback_Mode is (None, Only, Pass_Through); -- These mode are used for Get_Line/End_Of_Data and For_Every_Line -- iterators. The associated semantic is: -- -- None -- callbacks are not active. This is the default mode for -- Get_Line/End_Of_Data and For_Every_Line iterators. -- -- Only -- callbacks are active, if at least one pattern match, the associated -- action is called and this line will not be passed to the user. In -- the Get_Line case the next line will be read (if there is some -- line remaining), in the For_Every_Line case Action will -- not be called for this line. -- -- Pass_Through -- callbacks are active, for patterns which match the associated -- action is called. Then the line is passed to the user. It means -- that Action procedure is called in the For_Every_Line case and -- that Get_Line returns with the current line active. -- procedure Open (Separators : String := Use_Current; Filename : String := Use_Current; Session : Session_Type); procedure Open (Separators : String := Use_Current; Filename : String := Use_Current); -- Open the first file and initialize the unit. This must be called once -- before using Get_Line. It is possible to specify a filename and a set of -- separators directly. This offer a quick way to parse a single file. -- These parameters will override those specified by Set_FS and Add_File. -- File_Error is raised if there is no file associated with Session, or if -- the first file associated with Session is no longer readable. It raises -- Session_Error is Session is already open. procedure Get_Line (Callbacks : Callback_Mode := None; Session : Session_Type); procedure Get_Line (Callbacks : Callback_Mode := None); -- Read a line from the current input file. If the file index is at the -- end of the current input file (i.e. End_Of_File is True) then the -- following file is opened. If there is no more file to be processed, -- exception End_Error will be raised. File_Error will be raised if Open -- has not been called. Next call to Get_Line will return the following -- line in the file. By default the registered callbacks are not called by -- Get_Line, this can activated by setting Callbacks (see Callback_Mode -- description above). File_Error may be raised if a file associated with -- Session is not readable. -- -- When Callbacks is not None, it is possible to exhaust all the lines -- of all the files associated with Session. In this case, File_Error -- is not raised. -- -- This procedure can be used from a subprogram called by procedure Parse -- or by an instantiation of For_Every_Line (see below). function End_Of_Data (Session : Session_Type) return Boolean; function End_Of_Data return Boolean; pragma Inline (End_Of_Data); -- Returns True if there is no more data to be processed in Session. It -- means that the latest session's file is being processed and that -- there is no more data to be read in this file (End_Of_File is True). function End_Of_File (Session : Session_Type) return Boolean; function End_Of_File return Boolean; pragma Inline (End_Of_File); -- Returns True when there is no more data to be processed on the current -- session's file. procedure Close (Session : Session_Type); -- Release all associated data with Session. All memory allocated will -- be freed, the current file will be closed if needed, the callbacks -- will be unregistered. Close is convenient in reestablishing a session -- for new use. Get_Line is no longer usable (will raise File_Error) -- except after a successful call to Open, Parse or an instantiation -- of For_Every_Line. ----------------------------- -- For_Every_Line iterator -- ----------------------------- generic with procedure Action (Quit : in out Boolean); procedure For_Every_Line (Separators : String := Use_Current; Filename : String := Use_Current; Callbacks : Callback_Mode := None; Session : Session_Type); generic with procedure Action (Quit : in out Boolean); procedure For_Every_Line_Current_Session (Separators : String := Use_Current; Filename : String := Use_Current; Callbacks : Callback_Mode := None); -- This is another iterator. Action will be called for each new -- record. The iterator's termination can be controlled by setting Quit -- to True. It is by default set to False. It is possible to specify a -- filename and a set of separators directly. This offer a quick way to -- parse a single file. These parameters will override those specified by -- Set_FS and Add_File. By default the registered callbacks are not called -- by For_Every_Line, this can activated by setting Callbacks (see -- Callback_Mode description above). The Session will be opened and -- closed automatically. File_Error is raised if there is no file -- associated with Session. It raises Session_Error is Session is already -- open. private type Session_Data; type Session_Data_Access is access Session_Data; type Session_Type is new Ada.Finalization.Limited_Controlled with record Data : Session_Data_Access; Self : not null access Session_Type := Session_Type'Unchecked_Access; end record; procedure Initialize (Session : in out Session_Type); procedure Finalize (Session : in out Session_Type); end GNAT.AWK;
reznikmm/matreshka
Ada
3,704
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.Fo_Column_Gap_Attributes is pragma Preelaborate; type ODF_Fo_Column_Gap_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Fo_Column_Gap_Attribute_Access is access all ODF_Fo_Column_Gap_Attribute'Class with Storage_Size => 0; end ODF.DOM.Fo_Column_Gap_Attributes;
reznikmm/matreshka
Ada
4,599
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.Protected_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Text_Protected_Attribute_Node is begin return Self : Text_Protected_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_Protected_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Protected_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Text_URI, Matreshka.ODF_String_Constants.Protected_Attribute, Text_Protected_Attribute_Node'Tag); end Matreshka.ODF_Text.Protected_Attributes;
zhmu/ananas
Ada
419
adb
-- { dg-do compile } -- { dg-options "-O2 -gnatp -Wuninitialized" } procedure Forward_Vla is function N return Natural is begin return 1; end; type Sequence; type Sequence_Access is access all Sequence; Ptr : Sequence_Access := null; -- freeze access type Sequence_Length : Natural := N; type Sequence is array (1 .. Sequence_Length) of Natural; Seq : Sequence; begin Seq (1) := 0; end;
tum-ei-rcs/StratoX
Ada
3,425
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- ADA.NUMERICS.LONG_ELEMENTARY_FUNCTIONS -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2014, 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. -- -- -- -- -- -- -- -- -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- @llrset a-nlelfu.ads -- Long_Elementary_Functions -- ========================= -- -- This is the Ada Cert Math specific version of a-nlelfu.ads. with System.Generic_C_Math_Interface; with System.Libm_Double; package Ada.Numerics.Long_Elementary_Functions is new System.Generic_C_Math_Interface (Float_Type => Long_Float, C_Sqrt => System.Libm_Double.Sqrt, C_Log => System.Libm_Double.Log, C_Exp => System.Libm_Double.Exp, C_Pow => System.Libm_Double.Pow, C_Sin => System.Libm_Double.Sin, C_Cos => System.Libm_Double.Cos, C_Tan => System.Libm_Double.Tan, C_Asin => System.Libm_Double.Asin, C_Acos => System.Libm_Double.Acos, C_Atan2 => System.Libm_Double.Atan2, C_Sinh => System.Libm_Double.Sinh, C_Cosh => System.Libm_Double.Cosh, C_Tanh => System.Libm_Double.Tanh, C_Asinh => System.Libm_Double.Asinh, C_Acosh => System.Libm_Double.Acosh, C_Atanh => System.Libm_Double.Atanh); pragma Pure (Long_Elementary_Functions);
reznikmm/matreshka
Ada
2,397
ads
-- $Header: /dc/uc/self/arcadia/ayacc/src/RCS/goto_file.a,v 1.2 1993/05/31 22:36:35 self Exp self $ -- Copyright (c) 1990 Regents of the University of California. -- All rights reserved. -- -- The primary authors of ayacc were David Taback and Deepak Tolani. -- Enhancements were made by Ronald J. Schmalz. -- -- Send requests for ayacc information to [email protected] -- Send bug reports for ayacc to [email protected] -- -- Redistribution and use in source and binary forms are permitted -- provided that the above copyright notice and this paragraph are -- duplicated in all such forms and that any documentation, -- advertising materials, and other materials related to such -- distribution and use acknowledge that the software was developed -- by the University of California, Irvine. The name of the -- University may not be used to endorse or promote products derived -- from this software without specific prior written permission. -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- Module : goto_file.ada -- Component of : ayacc -- Version : 1.2 -- Date : 11/21/86 12:29:33 -- SCCS File : disk21~/rschm/hasee/sccs/ayacc/sccs/sxgoto_file.ada -- $Header: /dc/uc/self/arcadia/ayacc/src/RCS/goto_file.a,v 1.2 1993/05/31 22:36:35 self Exp self $ -- $Log: goto_file.a,v $ -- Revision 1.2 1993/05/31 22:36:35 self -- added exception handler when opening files -- -- Revision 1.1 1993/05/31 22:14:38 self -- Initial revision -- --Revision 1.1 88/08/08 13:43:29 arcadia --Initial revision -- -- Revision 0.1 86/04/01 15:04:27 ada -- This version fixes some minor bugs with empty grammars -- and $$ expansion. It also uses vads5.1b enhancements -- such as pragma inline. -- -- -- Revision 0.0 86/02/19 18:36:31 ada -- -- These files comprise the initial version of Ayacc -- designed and implemented by David Taback and Deepak Tolani. -- Ayacc has been compiled and tested under the Verdix Ada compiler -- version 4.06 on a vax 11/750 running Unix 4.2BSD. -- package Goto_File is procedure Open_Write; procedure Close_Write; procedure Write(S: in String); procedure Write_Line(S: in String); procedure Write(C: in Character); end Goto_File;
eqcola/ada-ado
Ada
6,837
ads
----------------------------------------------------------------------- -- ado-queries -- Database Queries -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 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.Strings; with Util.Refs; with ADO.SQL; with ADO.Drivers; with Interfaces; with Ada.Strings.Unbounded; package ADO.Queries is type Query_File; type Query_File_Access is access all Query_File; type Query_Definition; type Query_Definition_Access is access all Query_Definition; type Query_Info is limited private; type Query_Info_Access is access all Query_Info; type Query_Info_Ref_Access is private; Null_Query_Info_Ref : constant Query_Info_Ref_Access; -- ------------------------------ -- Query Context -- ------------------------------ -- The <b>Context</b> type holds the necessary information to build and execute -- a query whose SQL pattern is defined in an XML query file. type Context is new ADO.SQL.Query with private; -- Set the query definition which identifies the SQL query to execute. -- The query is represented by the <tt>sql</tt> XML entry. procedure Set_Query (Into : in out Context; Query : in Query_Definition_Access); -- Set the query count definition which identifies the SQL query to execute. -- The query count is represented by the <tt>sql-count</tt> XML entry. procedure Set_Count_Query (Into : in out Context; Query : in Query_Definition_Access); -- Set the query to execute as SQL statement. procedure Set_SQL (Into : in out Context; SQL : in String); procedure Set_Query (Into : in out Context; Name : in String); -- Set the limit for the SQL query. procedure Set_Limit (Into : in out Context; First : in Natural; Last : in Natural); -- Get the first row index. function Get_First_Row_Index (From : in Context) return Natural; -- Get the last row index. function Get_Last_Row_Index (From : in Context) return Natural; -- Get the maximum number of rows that the SQL query can return. -- This operation uses the <b>sql-count</b> query. function Get_Max_Row_Count (From : in Context) return Natural; -- Get the SQL query that correspond to the query context. function Get_SQL (From : in Context; Driver : in ADO.Drivers.Driver_Index) return String; -- ------------------------------ -- Query Definition -- ------------------------------ -- The <b>Query_Definition</b> holds the SQL query pattern which is defined -- in an XML query file. The query is identified by a name and a given XML -- query file can contain several queries. The Dynamo generator generates -- one instance of <b>Query_Definition</b> for each query defined in the XML -- file. The XML file is loaded during application initialization (or later) -- to get the SQL query pattern. Multi-thread concurrency is achieved by -- the Query_Info_Ref atomic reference. type Query_Definition is limited record -- The query name. Name : Util.Strings.Name_Access; -- The query file in which the query is defined. File : Query_File_Access; -- The next query defined in the query file. Next : Query_Definition_Access; -- The SQL query pattern (initialized when reading the XML query file). Query : Query_Info_Ref_Access; end record; function Get_SQL (From : in Query_Definition_Access; Driver : in ADO.Drivers.Driver_Index; Use_Count : in Boolean) return String; -- ------------------------------ -- Query File -- ------------------------------ -- The <b>Query_File</b> describes the SQL queries associated and loaded from -- a given XML query file. The Dynamo generator generates one instance of -- <b>Query_File</b> for each XML query file that it has read. The Path, -- Sha1_Map, Queries and Next are initialized statically by the generator (during -- package elaboration). type Query_File is limited record -- Query relative path name Name : Util.Strings.Name_Access; -- Query absolute path name (after path resolution). Path : Ada.Strings.Unbounded.String_Access; -- The SHA1 hash of the query map section. Sha1_Map : Util.Strings.Name_Access; -- Stamp when the query file will be checked. Next_Check : Interfaces.Unsigned_32; -- Stamp identifying the modification date of the query file. Last_Modified : Interfaces.Unsigned_32; -- The first query defined for that file. Queries : Query_Definition_Access; -- The next XML query file registered in the application. Next : Query_File_Access; end record; private type Context is new ADO.SQL.Query with record First : Natural := 0; Last : Natural := 0; Last_Index : Natural := 0; Max_Row_Count : Natural := 0; Query_Def : Query_Definition_Access := null; Is_Count : Boolean := False; end record; -- Find the query with the given name. -- Returns the query definition that matches the name or null if there is none function Find_Query (File : in Query_File; Name : in String) return Query_Definition_Access; use Ada.Strings.Unbounded; -- SQL query pattern type Query_Pattern is limited record SQL : Ada.Strings.Unbounded.Unbounded_String; end record; type Query_Pattern_Array is array (ADO.Drivers.Driver_Index) of Query_Pattern; type Query_Info is new Util.Refs.Ref_Entity with record Main_Query : Query_Pattern_Array; Count_Query : Query_Pattern_Array; end record; package Query_Info_Ref is new Util.Refs.References (Query_Info, Query_Info_Access); type Query_Info_Ref_Access is access all Query_Info_Ref.Atomic_Ref; Null_Query_Info_Ref : constant Query_Info_Ref_Access := null; end ADO.Queries;
1Crazymoney/LearnAda
Ada
1,901
adb
with Ada.Text_IO; use Ada.Text_IO; procedure Crossroad is -- Colors type colors is (red, redyellow, green, yellow); -- Lamp protected Lamp is procedure Switch; function Color return colors; private currentColor : colors := red; end Lamp; protected body Lamp is procedure Switch is begin if currentColor = yellow then currentColor := red; else currentColor := colors'Succ(currentColor); end if; Put_Line("Lamp switched to " & colors'Image(currentColor)); end Switch; function Color return colors is begin return currentColor; end Color; end Lamp; -- Controller task Controller is entry Stop; end Controller; task body Controller is stopped : Boolean := false; begin while not stopped loop select accept Stop do stopped := true; end Stop; or -- red delay 3.0; Lamp.Switch; -- redyellow delay 1.0; Lamp.Switch; -- green delay 3.0; Lamp.Switch; -- yellow delay 2.0; Lamp.Switch; end select; end loop; end Controller; type String_Access is access String; task type Vehicle(plate: String_Access); type Vehicle_Access is access Vehicle; task body Vehicle is crossed : Boolean := false; begin Put_Line(plate.all & " arrived"); while not crossed loop if Lamp.Color = green then Put_Line(plate.all & " crossed"); crossed := true; else Put_Line(plate.all & " waiting"); delay 0.2; end if; end loop; end Vehicle; vehicles : array(1 .. 10) of Vehicle_Access; plate : String_Access; begin for i in 1 .. 10 loop plate := new String'("CAR" & Integer'Image(i)); vehicles(i) := new Vehicle(plate); delay 0.5; end loop; --Skip_Line(); delay 15.0; Controller.Stop; end Crossroad;
reznikmm/matreshka
Ada
3,694
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_Steps_Attributes is pragma Preelaborate; type ODF_Table_Steps_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Table_Steps_Attribute_Access is access all ODF_Table_Steps_Attribute'Class with Storage_Size => 0; end ODF.DOM.Table_Steps_Attributes;
pombredanne/ravenadm
Ada
8,011
ads
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Definitions; use Definitions; private with HelperText; private with PortScan; private with Ada.Containers.Vectors; package Pilot is procedure display_usage; procedure react_to_unknown_first_level_command (argument : String); procedure react_to_unknown_second_level_command (level1, level2 : String); procedure dump_ravensource (optional_directory : String); procedure show_short_help; procedure launch_man_page (level2 : String); procedure generate_makefile (optional_directory : String; optional_variant : String); procedure generate_webpage (required_namebase : String; optional_variant : String); procedure generate_buildsheet (sourcedir : String; save_command : String); procedure generate_website; -- Return True when TERM is defined in environment (required) function TERM_defined_in_environment return Boolean; -- The current working directory will cause ravenadm to fail -- Known issue for when cwd is within <system root>/usr/local function launch_clash_detected return Boolean; -- Returns True if the root user didn't execute ravenadm. function insufficient_privileges return Boolean; -- Returns True if a pidfile is found and it's a valid ravenadm process function already_running return Boolean; -- Create a pidfile on major actions and remove it when complete. procedure create_pidfile; procedure destroy_pidfile; -- Checks if things are mounted from aborted previous run. -- The action upon "True" would be to try to clean them up (else abort) function previous_run_mounts_detected return Boolean; -- Checks if work directories are left over from aborted previous run -- The action upon "True" would be to remove them completely function previous_realfs_work_detected return Boolean; -- Returns True if all the old mounts were unmounted without issue. -- If not, it will emit messages so ravenadm can just eject directly. function old_mounts_successfully_removed return Boolean; -- Returns True if all the old SL*_(work|localbase) directories -- were removed without any problems function old_realfs_work_successfully_removed return Boolean; -- libexec/ravenexec is required, make sure it's installed! function ravenexec_missing return Boolean; -- pass-through for configure package procedure launch_configure_menu; -- Returns the conspiracy location for candidate. The wording changes bases on if the -- buildsheet exists or not. procedure locate (candidate : String); -- Scan sysroot to get exact OS versions, return False if anything fails function slave_platform_determined return Boolean; -- Iterate through stack of individual build requests and scan each one. -- If any scan fails, return False. function scan_stack_of_single_ports (always_build : Boolean) return Boolean; -- Runs post-scan sanity check -- If successful, then scans for all "ignored" ports, failing them -- For each ignored port, cascade the failures (designated "skipped" ports) -- Starts the build log documenting all this. -- Return True if no problems are encountered. function sanity_check_then_prefail (delete_first : Boolean := False; dry_run : Boolean := False) return Boolean; -- Everything is fine so kick of the parallel builders. They will -- continue until everything is complete. procedure perform_bulk_run (testmode : Boolean); -- Returns "True" when all the port origins -- (command line or inside file) are verified and arguments are correct. function store_origins (start_from : Positive) return Boolean; -- Sends a basic template for writing specifications to standard out. procedure print_spec_template (save_command : String); -- Explodes current directory specfication into scan slave and generates a distinfo -- file which is copied back to current directory. procedure generate_distinfo; -- This procedure removes the single CLI listed port from the queue, -- executes "perform_bulk_run" and then builds the final port, but -- breaks into the jail at the specified (by ENTERAFTER env) point -- The test mode is always "True" so that's not an argument. procedure bulk_run_then_interact_with_final_port; -- If ENTERAFTER is defined to valid phase and there's only one port -- given on the command line, then return True function interact_with_single_builder return Boolean; -- If the toolchain compiler packages are missing from the packages directory, copy -- the missing ones from the system root. Returns True on success. function install_compiler_packages return Boolean; -- Generates the conspiracy_variants file at Mk/Misc of the conspiracy directory procedure generate_ports_index; -- Call portscan procedure of the same name procedure display_results_of_dry_run; -- Determines all possible unique distfiles, then scans the distfiles directory for -- actual downloads and removes any distfiles that don't belong. procedure purge_distfiles; -- Launches options dialog to allow user to set them procedure change_options; -- Provides information about currency of installed ravenports procedure check_ravenports_version; -- Executes routine to update to the latest published ravenports procedure update_to_latest_ravenports; -- Scan entire ports tree function fully_scan_ports_tree return Boolean; -- Executes routine to validate and create repository files procedure generate_repository; -- Lists the subpackages of all given ports procedure list_subpackages; -- Print info message if [conspiracy]/Mk/Misc/raverreq contents is <= ravenadm version -- If file does not exist, do nothing procedure check_that_ravenadm_is_modern_enough; private package HT renames HelperText; package CON renames Ada.Containers; subtype logname_field is String (1 .. 19); type dim_logname is array (count_type) of logname_field; type verdiff is (newbuild, rebuild, change); specfile : constant String := "specification"; errprefix : constant String := "Error : "; pidfile : constant String := "/var/run/ravenadm.pid"; bailing : constant String := " (ravenadm must exit)"; shutreq : constant String := "Graceful shutdown requested, exiting ..."; brkname : constant String := "ENTERAFTER"; badformat : constant String := "Invalid format: "; badname : constant String := "Invalid port namebase: "; badvariant : constant String := "Invalid port variant: "; scan_slave : constant builders := 9; ss_base : constant String := "/SL09"; sysrootver : PortScan.sysroot_characteristics; all_stdvar : Boolean := False; logname : constant dim_logname := ("00_last_results.log", "01_success_list.log", "02_failure_list.log", "03_ignored_list.log", "04_skipped_list.log"); procedure DNE (filename : String); -- Returns True if given port-variant name is valid (existing buildsheet and variant -- exists on that buildsheet. Unkindness directory takes precedence over conspiracy. function valid_origin (port_variant : String; bad_namebase : out Boolean; bad_format : out Boolean; assume_std : out Boolean; known_std : out Boolean) return Boolean; -- scan given file. Everything line must be either blank (whitespace -- ignored) or a valid port origin, and returns true if it is. -- Internally, the ports are stacked. function valid_origin_file (regular_file : String) return Boolean; end Pilot;
jhumphry/aLua
Ada
787
ads
-- Example_Userdata -- A simple example of an Ada type turned into a Lua userdata type -- Copyright (c) 2015, James Humphry - see LICENSE for terms with Lua, Lua.Userdata; use Lua; package Example_Userdata is type Grandparent is abstract tagged record Flag : Boolean; end record; type Parent is new Grandparent with null record; type Child is new Parent with record Counter : Integer := 0; end record; package Grandparent_Userdata is new Lua.Userdata(T => Grandparent); package Child_Userdata is new Lua.Userdata(T => Child); function Toggle (L : Lua_State'Class) return Natural; function Increment (L : Lua_State'Class) return Natural; procedure Register_Operations(L : Lua_State'Class); end Example_Userdata;
reznikmm/matreshka
Ada
5,262
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.Generic_Collections; package AMF.UMLDI.UML_Class_Diagrams.Collections is pragma Preelaborate; package UMLDI_UML_Class_Diagram_Collections is new AMF.Generic_Collections (UMLDI_UML_Class_Diagram, UMLDI_UML_Class_Diagram_Access); type Set_Of_UMLDI_UML_Class_Diagram is new UMLDI_UML_Class_Diagram_Collections.Set with null record; Empty_Set_Of_UMLDI_UML_Class_Diagram : constant Set_Of_UMLDI_UML_Class_Diagram; type Ordered_Set_Of_UMLDI_UML_Class_Diagram is new UMLDI_UML_Class_Diagram_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UMLDI_UML_Class_Diagram : constant Ordered_Set_Of_UMLDI_UML_Class_Diagram; type Bag_Of_UMLDI_UML_Class_Diagram is new UMLDI_UML_Class_Diagram_Collections.Bag with null record; Empty_Bag_Of_UMLDI_UML_Class_Diagram : constant Bag_Of_UMLDI_UML_Class_Diagram; type Sequence_Of_UMLDI_UML_Class_Diagram is new UMLDI_UML_Class_Diagram_Collections.Sequence with null record; Empty_Sequence_Of_UMLDI_UML_Class_Diagram : constant Sequence_Of_UMLDI_UML_Class_Diagram; private Empty_Set_Of_UMLDI_UML_Class_Diagram : constant Set_Of_UMLDI_UML_Class_Diagram := (UMLDI_UML_Class_Diagram_Collections.Set with null record); Empty_Ordered_Set_Of_UMLDI_UML_Class_Diagram : constant Ordered_Set_Of_UMLDI_UML_Class_Diagram := (UMLDI_UML_Class_Diagram_Collections.Ordered_Set with null record); Empty_Bag_Of_UMLDI_UML_Class_Diagram : constant Bag_Of_UMLDI_UML_Class_Diagram := (UMLDI_UML_Class_Diagram_Collections.Bag with null record); Empty_Sequence_Of_UMLDI_UML_Class_Diagram : constant Sequence_Of_UMLDI_UML_Class_Diagram := (UMLDI_UML_Class_Diagram_Collections.Sequence with null record); end AMF.UMLDI.UML_Class_Diagrams.Collections;
hergin/ada2fuml
Ada
453
ads
with Globals_Example1; with Ada.Finalization; package Md_Example6 is type T is new Ada.Finalization.Controlled with record Attribute : Globals_Example1.Itype; end record; -- Ada Rules state that all tagged operations must be defined here function Do_It (The_T : T) return Globals_Example1.Itype; procedure Initialize(The_T : in out T); -- Did not declare procedure Finalize and thus there is no destructor end Md_Example6;
reznikmm/matreshka
Ada
7,021
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.Data_Pilot_Member_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Table_Data_Pilot_Member_Element_Node is begin return Self : Table_Data_Pilot_Member_Element_Node do Matreshka.ODF_Table.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Table_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Table_Data_Pilot_Member_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_Table_Data_Pilot_Member (ODF.DOM.Table_Data_Pilot_Member_Elements.ODF_Table_Data_Pilot_Member_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 Table_Data_Pilot_Member_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Data_Pilot_Member_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Table_Data_Pilot_Member_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_Table_Data_Pilot_Member (ODF.DOM.Table_Data_Pilot_Member_Elements.ODF_Table_Data_Pilot_Member_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 Table_Data_Pilot_Member_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_Table_Data_Pilot_Member (Visitor, ODF.DOM.Table_Data_Pilot_Member_Elements.ODF_Table_Data_Pilot_Member_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.Table_URI, Matreshka.ODF_String_Constants.Data_Pilot_Member_Element, Table_Data_Pilot_Member_Element_Node'Tag); end Matreshka.ODF_Table.Data_Pilot_Member_Elements;
ytomino/web-ada
Ada
830
adb
with Ada.Calendar.Formatting; with Ada.Calendar.Time_Zones; with Ada.Command_Line; with Ada.Text_IO; with Web; procedure test_time is use type Ada.Calendar.Time; use type Ada.Calendar.Time_Zones.Time_Offset; Verbose : Boolean := False; S : constant String := Web.Image (Ada.Calendar.Clock); begin for I in 1 .. Ada.Command_Line.Argument_Count loop if Ada.Command_Line.Argument (I) = "-v" then Verbose := True; end if; end loop; if Verbose then Ada.Text_IO.Put_Line (S); end if; if S /= Web.Image (Web.Value (S)) then raise Program_Error; end if; if Web.Value ("Thu, 21 Jul 2005 14:46:19 +0900") /= Ada.Calendar.Formatting.Time_Of (2005, 7, 21, 14, 46, 19, Time_Zone => 9 * 60) then raise Program_Error; end if; -- finish Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "ok"); end test_time;
reznikmm/webdriver
Ada
1,405
adb
-- Copyright (c) 2017-2020 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with League.JSON.Values; separate (WebDriver.Remote) package body Drivers is function "+" (Text : Wide_Wide_String) return League.Strings.Universal_String renames League.Strings.To_Universal_String; Capabilities_Key : constant Wide_Wide_String := "desiredCapabilities"; type Session_Access is access all Sessions.Session; ----------------- -- New_Session -- ----------------- overriding function New_Session (Self : access Driver; Capabilities : League.JSON.Values.JSON_Value := League.JSON.Values.Empty_JSON_Value) return WebDriver.Sessions.Session_Access is Result : constant not null Session_Access := new Sessions.Session; Command : WebDriver.Remote.Command; Response : WebDriver.Remote.Response; begin Command.Method := Post; Command.Path.Append ("/session"); Command.Parameters.Insert (+Capabilities_Key, Capabilities); Response := Self.Executor.Execute (Command); Result.Session_Id := Response.Value (+"sessionId").To_String; Result.Executor := Self.Executor'Unchecked_Access; return WebDriver.Sessions.Session_Access (Result); end New_Session; end Drivers;
jscparker/math_packages
Ada
7,266
adb
----------------------------------------------------------------------- -- package body Predictor_1, 17th order Predictor-Corrector integrator -- Copyright (C) 2008-2018 Jonathan S. Parker. -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ----------------------------------------------------------------------- with Ada.Numerics.Generic_Elementary_Functions; with pc_1_interface; with Runge_8th; package body Predictor_1 is package Coeffs is new pc_1_interface.Predictor_Corrector_Rules (Real); use Coeffs; package Maths is new Ada.Numerics.Generic_Elementary_Functions (Real); use Maths; package Runge is new Runge_8th (Real, Dyn_Index, Dynamical_Variable, F, "*", "+", "-", Norm); type Derivative_History is array(PC_Rule_Range) of Dynamical_Variable; --------------- -- Integrate -- --------------- procedure Integrate (Final_State : out Dynamical_Variable; Final_Time : in Real; Initial_State : in Dynamical_Variable; Initial_Time : in Real; No_Of_Steps : in Step_Integer) is Static_dt : constant Real := (Final_Time-Initial_Time) / Real (No_Of_Steps); Final_Time_Test : constant Real := Abs (Final_Time-Initial_Time + 0.5*Static_dt); Delta_t, New_t, Previous_t : Real; New_Y_Corrector, Predict_Last, Correct_Last : Real; Predictor, Corrector : Integration_Rule; Previous_Y : Dynamical_Variable; New_Y : Dynamical_Variable; Index_Of_Oldest_Deriv : PC_Rule_Range := PC_Rule_Range'First; Derivative_Storage : Derivative_History; -------------------------- -- Vectors_times_Matrix -- -------------------------- subtype Matrix is Derivative_History; subtype Matrix_Row is Dynamical_Variable; subtype Vector is Integration_Rule; procedure Vectors_times_Matrix (Mat : in Matrix; Vector1 : in Vector; Vector2 : in Vector; Product1 : out Matrix_Row; Product2 : out Matrix_Row) is Row_ID : PC_Rule_Range'Base; Sum1, Sum2 : Real; begin for Col in Dyn_Index loop Row_ID := PC_Rule_Range'First; Sum1 := 0.0; Sum2 := 0.0; for i in PC_Rule_Range loop Sum1 := Sum1 + Mat(Row_ID)(Col) * Vector1(Row_ID); Sum2 := Sum2 + Mat(Row_ID)(Col) * Vector2(Row_ID); Row_ID := Row_ID + 1; end loop; Product1(Col) := Sum1; Product2(Col) := Sum2; end loop; end Vectors_times_Matrix; begin Delta_t := Static_dt; for i in PC_Rule_Range loop Predictor(i) := Delta_t * Predictor_Rule(i); Corrector(i) := Delta_t * Corrector_Rule(i); end loop; New_Y_Corrector := Delta_t * Final_Step_Corrector; -- use Runge-Kutta to Initialize Derivative_Storage: Previous_Y := Initial_State; Previous_t := Initial_Time; Derivative_Storage(PC_Rule_Range'First) := F (Previous_t, Previous_Y); for I in PC_Rule_Range'First+1 .. PC_Rule_Range'Last loop New_t := Previous_t + Delta_t; if Abs (New_t - Initial_Time) > Final_Time_Test then -- tried to go too far Final_State := Previous_Y; return; end if; Runge.Integrate (Final_State => New_Y, -- output latest Y Final_Time => New_t, Initial_State => Previous_Y, Initial_Time => Previous_t, No_Of_Steps => 2); Previous_Y := New_Y; Previous_t := New_t; Derivative_Storage(i) := F (Previous_t, Previous_Y); end loop; Index_Of_Oldest_Deriv := PC_Rule_Range'First; -- Starting pt. is Previous_Y, and Previous_t: Time_Steps: loop New_t := Previous_t + Delta_t; exit Time_Steps when Abs (New_t - Initial_Time) > Final_Time_Test; Predict_and_Correct: declare Predictor_Delta_Y : Dynamical_Variable; Corrector_Delta_Y : Dynamical_Variable; Predicted_New_Y : Dynamical_Variable; Almost_New_Y : Dynamical_Variable; Error_in_New_Y : Dynamical_Variable; Latest_Derivative_Val : Dynamical_Variable; begin Vectors_times_Matrix (Mat => Derivative_Storage, Vector1 => Predictor, Vector2 => Corrector, Product1 => Predictor_Delta_Y, Product2 => Corrector_Delta_Y); -- Use Predicted Y to evaluate the derivative of Y: Predicted_New_Y := Previous_Y + Predictor_Delta_Y; Latest_Derivative_Val := F (New_t, Predicted_New_Y); -- Complete calculation of the Corrected Y: New_Y. It can be done -- iteratively, but usually just one Iterations is best: Almost_New_Y := Previous_Y + Corrector_Delta_Y; for I in 1 .. No_Of_Corrector_Evaluate_Iterations loop New_Y := Almost_New_Y + New_Y_Corrector * Latest_Derivative_Val; Latest_Derivative_Val := F (New_t, New_Y); end loop; if Final_Corrector_Desired then New_Y := Almost_New_Y + New_Y_Corrector * Latest_Derivative_Val; end if; if Extrapolation_Desired then -- Subtract away estimated error: Error_in_New_Y := Extrap_Factor*(New_Y - Predicted_New_Y); New_Y := New_Y - Error_in_New_Y; end if; -- Save F(t,Y) in Derivative_Storage (write over oldest F), -- and adjust the predictor-corrector rules to the right -- starting points: Derivative_Storage(Index_Of_Oldest_Deriv) := Latest_Derivative_Val; end Predict_and_Correct; Previous_Y := New_Y; Previous_t := New_t; if Index_Of_Oldest_Deriv = PC_Rule_Range'Last then Index_Of_Oldest_Deriv := PC_Rule_Range'First; else Index_Of_Oldest_Deriv := Index_Of_Oldest_Deriv + 1; end if; Predict_Last := Predictor(PC_Rule_Range'Last); for I in reverse PC_Rule_Range'First+1 .. PC_Rule_Range'Last loop Predictor(I) := Predictor(I-1); end loop; Predictor(PC_Rule_Range'First) := Predict_Last; Correct_Last := Corrector(PC_Rule_Range'Last); for I in reverse PC_Rule_Range'First+1 .. PC_Rule_Range'Last loop Corrector(I) := Corrector(I-1); end loop; Corrector(PC_Rule_Range'First) := Correct_Last; end loop Time_Steps; -- All done, go home: Final_State := Previous_Y; end Integrate; end Predictor_1;
reznikmm/matreshka
Ada
4,651
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.Form_Date_Elements; package Matreshka.ODF_Form.Date_Elements is type Form_Date_Element_Node is new Matreshka.ODF_Form.Abstract_Form_Element_Node and ODF.DOM.Form_Date_Elements.ODF_Form_Date with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Form_Date_Element_Node; overriding function Get_Local_Name (Self : not null access constant Form_Date_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Form_Date_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 Form_Date_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 Form_Date_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_Form.Date_Elements;
thierr26/gnatdoc_test
Ada
1,241
adb
package body My_Package is ---------------------------------------------------------------------------- function My_Function (A : Arr) return Boolean is (for all Z in A'Range => A(Z) = A(A'First)); ---------------------------------------------------------------------------- not overriding function Create return My_Implementation is begin return (others => <>); end Create; ---------------------------------------------------------------------------- overriding function My_Primitive (Obj : in out My_Implementation) return Count is Ret : Count; begin if Obj.K = 0 then Ret := Obj.Prev_Prev_Term; elsif Obj.K = 1 then Ret := Obj.Prev_Term; elsif Count'Last - Obj.Prev_Term < Obj.Prev_Prev_Term then raise My_Package_Range_Error with "Cannot compute " & Count'Image (Obj.K + 1) & "th Fibonacci number"; else Ret := Obj.Prev_Prev_Term + Obj.Prev_Term; Obj.Prev_Prev_Term := Obj.Prev_Term; Obj.Prev_Term := Ret; end if; Obj.K := Obj.K + 1; return Ret; end My_Primitive; ---------------------------------------------------------------------------- end My_Package;
ekoeppen/STM32_Generic_Ada_Drivers
Ada
34,225
ads
-- This spec has been automatically generated from STM32F103.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.RCC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR_HSION_Field is STM32_SVD.Bit; subtype CR_HSIRDY_Field is STM32_SVD.Bit; subtype CR_HSITRIM_Field is STM32_SVD.UInt5; subtype CR_HSICAL_Field is STM32_SVD.Byte; subtype CR_HSEON_Field is STM32_SVD.Bit; subtype CR_HSERDY_Field is STM32_SVD.Bit; subtype CR_HSEBYP_Field is STM32_SVD.Bit; subtype CR_CSSON_Field is STM32_SVD.Bit; subtype CR_PLLON_Field is STM32_SVD.Bit; subtype CR_PLLRDY_Field is STM32_SVD.Bit; -- Clock control register type CR_Register is record -- Internal High Speed clock enable HSION : CR_HSION_Field := 16#1#; -- Read-only. Internal High Speed clock ready flag HSIRDY : CR_HSIRDY_Field := 16#1#; -- unspecified Reserved_2_2 : STM32_SVD.Bit := 16#0#; -- Internal High Speed clock trimming HSITRIM : CR_HSITRIM_Field := 16#10#; -- Read-only. Internal High Speed clock Calibration HSICAL : CR_HSICAL_Field := 16#0#; -- External High Speed clock enable HSEON : CR_HSEON_Field := 16#0#; -- Read-only. External High Speed clock ready flag HSERDY : CR_HSERDY_Field := 16#0#; -- External High Speed clock Bypass HSEBYP : CR_HSEBYP_Field := 16#0#; -- Clock Security System enable CSSON : CR_CSSON_Field := 16#0#; -- unspecified Reserved_20_23 : STM32_SVD.UInt4 := 16#0#; -- PLL enable PLLON : CR_PLLON_Field := 16#0#; -- Read-only. PLL clock ready flag PLLRDY : CR_PLLRDY_Field := 16#0#; -- unspecified Reserved_26_31 : STM32_SVD.UInt6 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record HSION at 0 range 0 .. 0; HSIRDY at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; HSITRIM at 0 range 3 .. 7; HSICAL at 0 range 8 .. 15; HSEON at 0 range 16 .. 16; HSERDY at 0 range 17 .. 17; HSEBYP at 0 range 18 .. 18; CSSON at 0 range 19 .. 19; Reserved_20_23 at 0 range 20 .. 23; PLLON at 0 range 24 .. 24; PLLRDY at 0 range 25 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; subtype CFGR_SW_Field is STM32_SVD.UInt2; subtype CFGR_SWS_Field is STM32_SVD.UInt2; subtype CFGR_HPRE_Field is STM32_SVD.UInt4; -- CFGR_PPRE array element subtype CFGR_PPRE_Element is STM32_SVD.UInt3; -- CFGR_PPRE array type CFGR_PPRE_Field_Array is array (1 .. 2) of CFGR_PPRE_Element with Component_Size => 3, Size => 6; -- Type definition for CFGR_PPRE type CFGR_PPRE_Field (As_Array : Boolean := False) is record case As_Array is when False => -- PPRE as a value Val : STM32_SVD.UInt6; when True => -- PPRE as an array Arr : CFGR_PPRE_Field_Array; end case; end record with Unchecked_Union, Size => 6; for CFGR_PPRE_Field use record Val at 0 range 0 .. 5; Arr at 0 range 0 .. 5; end record; subtype CFGR_ADCPRE_Field is STM32_SVD.UInt2; subtype CFGR_PLLSRC_Field is STM32_SVD.Bit; subtype CFGR_PLLXTPRE_Field is STM32_SVD.Bit; subtype CFGR_PLLMUL_Field is STM32_SVD.UInt4; subtype CFGR_OTGFSPRE_Field is STM32_SVD.Bit; subtype CFGR_MCO_Field is STM32_SVD.UInt3; -- Clock configuration register (RCC_CFGR) type CFGR_Register is record -- System clock Switch SW : CFGR_SW_Field := 16#0#; -- Read-only. System Clock Switch Status SWS : CFGR_SWS_Field := 16#0#; -- AHB prescaler HPRE : CFGR_HPRE_Field := 16#0#; -- APB Low speed prescaler (APB1) PPRE : CFGR_PPRE_Field := (As_Array => False, Val => 16#0#); -- ADC prescaler ADCPRE : CFGR_ADCPRE_Field := 16#0#; -- PLL entry clock source PLLSRC : CFGR_PLLSRC_Field := 16#0#; -- HSE divider for PLL entry PLLXTPRE : CFGR_PLLXTPRE_Field := 16#0#; -- PLL Multiplication Factor PLLMUL : CFGR_PLLMUL_Field := 16#0#; -- USB OTG FS prescaler OTGFSPRE : CFGR_OTGFSPRE_Field := 16#0#; -- unspecified Reserved_23_23 : STM32_SVD.Bit := 16#0#; -- Microcontroller clock output MCO : CFGR_MCO_Field := 16#0#; -- unspecified Reserved_27_31 : STM32_SVD.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CFGR_Register use record SW at 0 range 0 .. 1; SWS at 0 range 2 .. 3; HPRE at 0 range 4 .. 7; PPRE at 0 range 8 .. 13; ADCPRE at 0 range 14 .. 15; PLLSRC at 0 range 16 .. 16; PLLXTPRE at 0 range 17 .. 17; PLLMUL at 0 range 18 .. 21; OTGFSPRE at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; MCO at 0 range 24 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; subtype CIR_LSIRDYF_Field is STM32_SVD.Bit; subtype CIR_LSERDYF_Field is STM32_SVD.Bit; subtype CIR_HSIRDYF_Field is STM32_SVD.Bit; subtype CIR_HSERDYF_Field is STM32_SVD.Bit; subtype CIR_PLLRDYF_Field is STM32_SVD.Bit; subtype CIR_CSSF_Field is STM32_SVD.Bit; subtype CIR_LSIRDYIE_Field is STM32_SVD.Bit; subtype CIR_LSERDYIE_Field is STM32_SVD.Bit; subtype CIR_HSIRDYIE_Field is STM32_SVD.Bit; subtype CIR_HSERDYIE_Field is STM32_SVD.Bit; subtype CIR_PLLRDYIE_Field is STM32_SVD.Bit; subtype CIR_LSIRDYC_Field is STM32_SVD.Bit; subtype CIR_LSERDYC_Field is STM32_SVD.Bit; subtype CIR_HSIRDYC_Field is STM32_SVD.Bit; subtype CIR_HSERDYC_Field is STM32_SVD.Bit; subtype CIR_PLLRDYC_Field is STM32_SVD.Bit; subtype CIR_CSSC_Field is STM32_SVD.Bit; -- Clock interrupt register (RCC_CIR) type CIR_Register is record -- Read-only. LSI Ready Interrupt flag LSIRDYF : CIR_LSIRDYF_Field := 16#0#; -- Read-only. LSE Ready Interrupt flag LSERDYF : CIR_LSERDYF_Field := 16#0#; -- Read-only. HSI Ready Interrupt flag HSIRDYF : CIR_HSIRDYF_Field := 16#0#; -- Read-only. HSE Ready Interrupt flag HSERDYF : CIR_HSERDYF_Field := 16#0#; -- Read-only. PLL Ready Interrupt flag PLLRDYF : CIR_PLLRDYF_Field := 16#0#; -- unspecified Reserved_5_6 : STM32_SVD.UInt2 := 16#0#; -- Read-only. Clock Security System Interrupt flag CSSF : CIR_CSSF_Field := 16#0#; -- LSI Ready Interrupt Enable LSIRDYIE : CIR_LSIRDYIE_Field := 16#0#; -- LSE Ready Interrupt Enable LSERDYIE : CIR_LSERDYIE_Field := 16#0#; -- HSI Ready Interrupt Enable HSIRDYIE : CIR_HSIRDYIE_Field := 16#0#; -- HSE Ready Interrupt Enable HSERDYIE : CIR_HSERDYIE_Field := 16#0#; -- PLL Ready Interrupt Enable PLLRDYIE : CIR_PLLRDYIE_Field := 16#0#; -- unspecified Reserved_13_15 : STM32_SVD.UInt3 := 16#0#; -- Write-only. LSI Ready Interrupt Clear LSIRDYC : CIR_LSIRDYC_Field := 16#0#; -- Write-only. LSE Ready Interrupt Clear LSERDYC : CIR_LSERDYC_Field := 16#0#; -- Write-only. HSI Ready Interrupt Clear HSIRDYC : CIR_HSIRDYC_Field := 16#0#; -- Write-only. HSE Ready Interrupt Clear HSERDYC : CIR_HSERDYC_Field := 16#0#; -- Write-only. PLL Ready Interrupt Clear PLLRDYC : CIR_PLLRDYC_Field := 16#0#; -- unspecified Reserved_21_22 : STM32_SVD.UInt2 := 16#0#; -- Write-only. Clock security system interrupt clear CSSC : CIR_CSSC_Field := 16#0#; -- unspecified Reserved_24_31 : STM32_SVD.Byte := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CIR_Register use record LSIRDYF at 0 range 0 .. 0; LSERDYF at 0 range 1 .. 1; HSIRDYF at 0 range 2 .. 2; HSERDYF at 0 range 3 .. 3; PLLRDYF at 0 range 4 .. 4; Reserved_5_6 at 0 range 5 .. 6; CSSF at 0 range 7 .. 7; LSIRDYIE at 0 range 8 .. 8; LSERDYIE at 0 range 9 .. 9; HSIRDYIE at 0 range 10 .. 10; HSERDYIE at 0 range 11 .. 11; PLLRDYIE at 0 range 12 .. 12; Reserved_13_15 at 0 range 13 .. 15; LSIRDYC at 0 range 16 .. 16; LSERDYC at 0 range 17 .. 17; HSIRDYC at 0 range 18 .. 18; HSERDYC at 0 range 19 .. 19; PLLRDYC at 0 range 20 .. 20; Reserved_21_22 at 0 range 21 .. 22; CSSC at 0 range 23 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype APB2RSTR_AFIORST_Field is STM32_SVD.Bit; subtype APB2RSTR_IOPARST_Field is STM32_SVD.Bit; subtype APB2RSTR_IOPBRST_Field is STM32_SVD.Bit; subtype APB2RSTR_IOPCRST_Field is STM32_SVD.Bit; subtype APB2RSTR_IOPDRST_Field is STM32_SVD.Bit; subtype APB2RSTR_IOPERST_Field is STM32_SVD.Bit; subtype APB2RSTR_IOPFRST_Field is STM32_SVD.Bit; subtype APB2RSTR_IOPGRST_Field is STM32_SVD.Bit; subtype APB2RSTR_ADC1RST_Field is STM32_SVD.Bit; subtype APB2RSTR_ADC2RST_Field is STM32_SVD.Bit; subtype APB2RSTR_TIM1RST_Field is STM32_SVD.Bit; subtype APB2RSTR_SPI1RST_Field is STM32_SVD.Bit; subtype APB2RSTR_TIM8RST_Field is STM32_SVD.Bit; subtype APB2RSTR_USART1RST_Field is STM32_SVD.Bit; subtype APB2RSTR_ADC3RST_Field is STM32_SVD.Bit; subtype APB2RSTR_TIM9RST_Field is STM32_SVD.Bit; subtype APB2RSTR_TIM10RST_Field is STM32_SVD.Bit; subtype APB2RSTR_TIM11RST_Field is STM32_SVD.Bit; -- APB2 peripheral reset register (RCC_APB2RSTR) type APB2RSTR_Register is record -- Alternate function I/O reset AFIORST : APB2RSTR_AFIORST_Field := 16#0#; -- unspecified Reserved_1_1 : STM32_SVD.Bit := 16#0#; -- IO port A reset IOPARST : APB2RSTR_IOPARST_Field := 16#0#; -- IO port B reset IOPBRST : APB2RSTR_IOPBRST_Field := 16#0#; -- IO port C reset IOPCRST : APB2RSTR_IOPCRST_Field := 16#0#; -- IO port D reset IOPDRST : APB2RSTR_IOPDRST_Field := 16#0#; -- IO port E reset IOPERST : APB2RSTR_IOPERST_Field := 16#0#; -- IO port F reset IOPFRST : APB2RSTR_IOPFRST_Field := 16#0#; -- IO port G reset IOPGRST : APB2RSTR_IOPGRST_Field := 16#0#; -- ADC 1 interface reset ADC1RST : APB2RSTR_ADC1RST_Field := 16#0#; -- ADC 2 interface reset ADC2RST : APB2RSTR_ADC2RST_Field := 16#0#; -- TIM1 timer reset TIM1RST : APB2RSTR_TIM1RST_Field := 16#0#; -- SPI 1 reset SPI1RST : APB2RSTR_SPI1RST_Field := 16#0#; -- TIM8 timer reset TIM8RST : APB2RSTR_TIM8RST_Field := 16#0#; -- USART1 reset USART1RST : APB2RSTR_USART1RST_Field := 16#0#; -- ADC 3 interface reset ADC3RST : APB2RSTR_ADC3RST_Field := 16#0#; -- unspecified Reserved_16_18 : STM32_SVD.UInt3 := 16#0#; -- TIM9 timer reset TIM9RST : APB2RSTR_TIM9RST_Field := 16#0#; -- TIM10 timer reset TIM10RST : APB2RSTR_TIM10RST_Field := 16#0#; -- TIM11 timer reset TIM11RST : APB2RSTR_TIM11RST_Field := 16#0#; -- unspecified Reserved_22_31 : STM32_SVD.UInt10 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for APB2RSTR_Register use record AFIORST at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; IOPARST at 0 range 2 .. 2; IOPBRST at 0 range 3 .. 3; IOPCRST at 0 range 4 .. 4; IOPDRST at 0 range 5 .. 5; IOPERST at 0 range 6 .. 6; IOPFRST at 0 range 7 .. 7; IOPGRST at 0 range 8 .. 8; ADC1RST at 0 range 9 .. 9; ADC2RST at 0 range 10 .. 10; TIM1RST at 0 range 11 .. 11; SPI1RST at 0 range 12 .. 12; TIM8RST at 0 range 13 .. 13; USART1RST at 0 range 14 .. 14; ADC3RST at 0 range 15 .. 15; Reserved_16_18 at 0 range 16 .. 18; TIM9RST at 0 range 19 .. 19; TIM10RST at 0 range 20 .. 20; TIM11RST at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; subtype APB1RSTR_TIM2RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM3RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM4RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM5RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM6RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM7RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM12RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM13RST_Field is STM32_SVD.Bit; subtype APB1RSTR_TIM14RST_Field is STM32_SVD.Bit; subtype APB1RSTR_WWDGRST_Field is STM32_SVD.Bit; subtype APB1RSTR_SPI2RST_Field is STM32_SVD.Bit; subtype APB1RSTR_SPI3RST_Field is STM32_SVD.Bit; subtype APB1RSTR_USART2RST_Field is STM32_SVD.Bit; subtype APB1RSTR_USART3RST_Field is STM32_SVD.Bit; subtype APB1RSTR_UART4RST_Field is STM32_SVD.Bit; subtype APB1RSTR_UART5RST_Field is STM32_SVD.Bit; subtype APB1RSTR_I2C1RST_Field is STM32_SVD.Bit; subtype APB1RSTR_I2C2RST_Field is STM32_SVD.Bit; subtype APB1RSTR_USBRST_Field is STM32_SVD.Bit; subtype APB1RSTR_CANRST_Field is STM32_SVD.Bit; subtype APB1RSTR_BKPRST_Field is STM32_SVD.Bit; subtype APB1RSTR_PWRRST_Field is STM32_SVD.Bit; subtype APB1RSTR_DACRST_Field is STM32_SVD.Bit; -- APB1 peripheral reset register (RCC_APB1RSTR) type APB1RSTR_Register is record -- Timer 2 reset TIM2RST : APB1RSTR_TIM2RST_Field := 16#0#; -- Timer 3 reset TIM3RST : APB1RSTR_TIM3RST_Field := 16#0#; -- Timer 4 reset TIM4RST : APB1RSTR_TIM4RST_Field := 16#0#; -- Timer 5 reset TIM5RST : APB1RSTR_TIM5RST_Field := 16#0#; -- Timer 6 reset TIM6RST : APB1RSTR_TIM6RST_Field := 16#0#; -- Timer 7 reset TIM7RST : APB1RSTR_TIM7RST_Field := 16#0#; -- Timer 12 reset TIM12RST : APB1RSTR_TIM12RST_Field := 16#0#; -- Timer 13 reset TIM13RST : APB1RSTR_TIM13RST_Field := 16#0#; -- Timer 14 reset TIM14RST : APB1RSTR_TIM14RST_Field := 16#0#; -- unspecified Reserved_9_10 : STM32_SVD.UInt2 := 16#0#; -- Window watchdog reset WWDGRST : APB1RSTR_WWDGRST_Field := 16#0#; -- unspecified Reserved_12_13 : STM32_SVD.UInt2 := 16#0#; -- SPI2 reset SPI2RST : APB1RSTR_SPI2RST_Field := 16#0#; -- SPI3 reset SPI3RST : APB1RSTR_SPI3RST_Field := 16#0#; -- unspecified Reserved_16_16 : STM32_SVD.Bit := 16#0#; -- USART 2 reset USART2RST : APB1RSTR_USART2RST_Field := 16#0#; -- USART 3 reset USART3RST : APB1RSTR_USART3RST_Field := 16#0#; -- UART 4 reset UART4RST : APB1RSTR_UART4RST_Field := 16#0#; -- UART 5 reset UART5RST : APB1RSTR_UART5RST_Field := 16#0#; -- I2C1 reset I2C1RST : APB1RSTR_I2C1RST_Field := 16#0#; -- I2C2 reset I2C2RST : APB1RSTR_I2C2RST_Field := 16#0#; -- USB reset USBRST : APB1RSTR_USBRST_Field := 16#0#; -- unspecified Reserved_24_24 : STM32_SVD.Bit := 16#0#; -- CAN reset CANRST : APB1RSTR_CANRST_Field := 16#0#; -- unspecified Reserved_26_26 : STM32_SVD.Bit := 16#0#; -- Backup interface reset BKPRST : APB1RSTR_BKPRST_Field := 16#0#; -- Power interface reset PWRRST : APB1RSTR_PWRRST_Field := 16#0#; -- DAC interface reset DACRST : APB1RSTR_DACRST_Field := 16#0#; -- unspecified Reserved_30_31 : STM32_SVD.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for APB1RSTR_Register use record TIM2RST at 0 range 0 .. 0; TIM3RST at 0 range 1 .. 1; TIM4RST at 0 range 2 .. 2; TIM5RST at 0 range 3 .. 3; TIM6RST at 0 range 4 .. 4; TIM7RST at 0 range 5 .. 5; TIM12RST at 0 range 6 .. 6; TIM13RST at 0 range 7 .. 7; TIM14RST at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; WWDGRST at 0 range 11 .. 11; Reserved_12_13 at 0 range 12 .. 13; SPI2RST at 0 range 14 .. 14; SPI3RST at 0 range 15 .. 15; Reserved_16_16 at 0 range 16 .. 16; USART2RST at 0 range 17 .. 17; USART3RST at 0 range 18 .. 18; UART4RST at 0 range 19 .. 19; UART5RST at 0 range 20 .. 20; I2C1RST at 0 range 21 .. 21; I2C2RST at 0 range 22 .. 22; USBRST at 0 range 23 .. 23; Reserved_24_24 at 0 range 24 .. 24; CANRST at 0 range 25 .. 25; Reserved_26_26 at 0 range 26 .. 26; BKPRST at 0 range 27 .. 27; PWRRST at 0 range 28 .. 28; DACRST at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; subtype AHBENR_DMA1EN_Field is STM32_SVD.Bit; subtype AHBENR_DMA2EN_Field is STM32_SVD.Bit; subtype AHBENR_SRAMEN_Field is STM32_SVD.Bit; subtype AHBENR_FLITFEN_Field is STM32_SVD.Bit; subtype AHBENR_CRCEN_Field is STM32_SVD.Bit; subtype AHBENR_FSMCEN_Field is STM32_SVD.Bit; subtype AHBENR_SDIOEN_Field is STM32_SVD.Bit; -- AHB Peripheral Clock enable register (RCC_AHBENR) type AHBENR_Register is record -- DMA1 clock enable DMA1EN : AHBENR_DMA1EN_Field := 16#0#; -- DMA2 clock enable DMA2EN : AHBENR_DMA2EN_Field := 16#0#; -- SRAM interface clock enable SRAMEN : AHBENR_SRAMEN_Field := 16#1#; -- unspecified Reserved_3_3 : STM32_SVD.Bit := 16#0#; -- FLITF clock enable FLITFEN : AHBENR_FLITFEN_Field := 16#1#; -- unspecified Reserved_5_5 : STM32_SVD.Bit := 16#0#; -- CRC clock enable CRCEN : AHBENR_CRCEN_Field := 16#0#; -- unspecified Reserved_7_7 : STM32_SVD.Bit := 16#0#; -- FSMC clock enable FSMCEN : AHBENR_FSMCEN_Field := 16#0#; -- unspecified Reserved_9_9 : STM32_SVD.Bit := 16#0#; -- SDIO clock enable SDIOEN : AHBENR_SDIOEN_Field := 16#0#; -- unspecified Reserved_11_31 : STM32_SVD.UInt21 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for AHBENR_Register use record DMA1EN at 0 range 0 .. 0; DMA2EN at 0 range 1 .. 1; SRAMEN at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; FLITFEN at 0 range 4 .. 4; Reserved_5_5 at 0 range 5 .. 5; CRCEN at 0 range 6 .. 6; Reserved_7_7 at 0 range 7 .. 7; FSMCEN at 0 range 8 .. 8; Reserved_9_9 at 0 range 9 .. 9; SDIOEN at 0 range 10 .. 10; Reserved_11_31 at 0 range 11 .. 31; end record; subtype APB2ENR_AFIOEN_Field is STM32_SVD.Bit; subtype APB2ENR_IOPAEN_Field is STM32_SVD.Bit; subtype APB2ENR_IOPBEN_Field is STM32_SVD.Bit; subtype APB2ENR_IOPCEN_Field is STM32_SVD.Bit; subtype APB2ENR_IOPDEN_Field is STM32_SVD.Bit; subtype APB2ENR_IOPEEN_Field is STM32_SVD.Bit; subtype APB2ENR_IOPFEN_Field is STM32_SVD.Bit; subtype APB2ENR_IOPGEN_Field is STM32_SVD.Bit; subtype APB2ENR_ADC1EN_Field is STM32_SVD.Bit; subtype APB2ENR_ADC2EN_Field is STM32_SVD.Bit; subtype APB2ENR_TIM1EN_Field is STM32_SVD.Bit; subtype APB2ENR_SPI1EN_Field is STM32_SVD.Bit; subtype APB2ENR_TIM8EN_Field is STM32_SVD.Bit; subtype APB2ENR_USART1EN_Field is STM32_SVD.Bit; subtype APB2ENR_ADC3EN_Field is STM32_SVD.Bit; subtype APB2ENR_TIM9EN_Field is STM32_SVD.Bit; subtype APB2ENR_TIM10EN_Field is STM32_SVD.Bit; subtype APB2ENR_TIM11EN_Field is STM32_SVD.Bit; -- APB2 peripheral clock enable register (RCC_APB2ENR) type APB2ENR_Register is record -- Alternate function I/O clock enable AFIOEN : APB2ENR_AFIOEN_Field := 16#0#; -- unspecified Reserved_1_1 : STM32_SVD.Bit := 16#0#; -- I/O port A clock enable IOPAEN : APB2ENR_IOPAEN_Field := 16#0#; -- I/O port B clock enable IOPBEN : APB2ENR_IOPBEN_Field := 16#0#; -- I/O port C clock enable IOPCEN : APB2ENR_IOPCEN_Field := 16#0#; -- I/O port D clock enable IOPDEN : APB2ENR_IOPDEN_Field := 16#0#; -- I/O port E clock enable IOPEEN : APB2ENR_IOPEEN_Field := 16#0#; -- I/O port F clock enable IOPFEN : APB2ENR_IOPFEN_Field := 16#0#; -- I/O port G clock enable IOPGEN : APB2ENR_IOPGEN_Field := 16#0#; -- ADC 1 interface clock enable ADC1EN : APB2ENR_ADC1EN_Field := 16#0#; -- ADC 2 interface clock enable ADC2EN : APB2ENR_ADC2EN_Field := 16#0#; -- TIM1 Timer clock enable TIM1EN : APB2ENR_TIM1EN_Field := 16#0#; -- SPI 1 clock enable SPI1EN : APB2ENR_SPI1EN_Field := 16#0#; -- TIM8 Timer clock enable TIM8EN : APB2ENR_TIM8EN_Field := 16#0#; -- USART1 clock enable USART1EN : APB2ENR_USART1EN_Field := 16#0#; -- ADC3 interface clock enable ADC3EN : APB2ENR_ADC3EN_Field := 16#0#; -- unspecified Reserved_16_18 : STM32_SVD.UInt3 := 16#0#; -- TIM9 Timer clock enable TIM9EN : APB2ENR_TIM9EN_Field := 16#0#; -- TIM10 Timer clock enable TIM10EN : APB2ENR_TIM10EN_Field := 16#0#; -- TIM11 Timer clock enable TIM11EN : APB2ENR_TIM11EN_Field := 16#0#; -- unspecified Reserved_22_31 : STM32_SVD.UInt10 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for APB2ENR_Register use record AFIOEN at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; IOPAEN at 0 range 2 .. 2; IOPBEN at 0 range 3 .. 3; IOPCEN at 0 range 4 .. 4; IOPDEN at 0 range 5 .. 5; IOPEEN at 0 range 6 .. 6; IOPFEN at 0 range 7 .. 7; IOPGEN at 0 range 8 .. 8; ADC1EN at 0 range 9 .. 9; ADC2EN at 0 range 10 .. 10; TIM1EN at 0 range 11 .. 11; SPI1EN at 0 range 12 .. 12; TIM8EN at 0 range 13 .. 13; USART1EN at 0 range 14 .. 14; ADC3EN at 0 range 15 .. 15; Reserved_16_18 at 0 range 16 .. 18; TIM9EN at 0 range 19 .. 19; TIM10EN at 0 range 20 .. 20; TIM11EN at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; subtype APB1ENR_TIM2EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM3EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM4EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM5EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM6EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM7EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM12EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM13EN_Field is STM32_SVD.Bit; subtype APB1ENR_TIM14EN_Field is STM32_SVD.Bit; subtype APB1ENR_WWDGEN_Field is STM32_SVD.Bit; subtype APB1ENR_SPI2EN_Field is STM32_SVD.Bit; subtype APB1ENR_SPI3EN_Field is STM32_SVD.Bit; subtype APB1ENR_USART2EN_Field is STM32_SVD.Bit; subtype APB1ENR_USART3EN_Field is STM32_SVD.Bit; subtype APB1ENR_UART4EN_Field is STM32_SVD.Bit; subtype APB1ENR_UART5EN_Field is STM32_SVD.Bit; subtype APB1ENR_I2C1EN_Field is STM32_SVD.Bit; subtype APB1ENR_I2C2EN_Field is STM32_SVD.Bit; subtype APB1ENR_USBEN_Field is STM32_SVD.Bit; subtype APB1ENR_CANEN_Field is STM32_SVD.Bit; subtype APB1ENR_BKPEN_Field is STM32_SVD.Bit; subtype APB1ENR_PWREN_Field is STM32_SVD.Bit; subtype APB1ENR_DACEN_Field is STM32_SVD.Bit; -- APB1 peripheral clock enable register (RCC_APB1ENR) type APB1ENR_Register is record -- Timer 2 clock enable TIM2EN : APB1ENR_TIM2EN_Field := 16#0#; -- Timer 3 clock enable TIM3EN : APB1ENR_TIM3EN_Field := 16#0#; -- Timer 4 clock enable TIM4EN : APB1ENR_TIM4EN_Field := 16#0#; -- Timer 5 clock enable TIM5EN : APB1ENR_TIM5EN_Field := 16#0#; -- Timer 6 clock enable TIM6EN : APB1ENR_TIM6EN_Field := 16#0#; -- Timer 7 clock enable TIM7EN : APB1ENR_TIM7EN_Field := 16#0#; -- Timer 12 clock enable TIM12EN : APB1ENR_TIM12EN_Field := 16#0#; -- Timer 13 clock enable TIM13EN : APB1ENR_TIM13EN_Field := 16#0#; -- Timer 14 clock enable TIM14EN : APB1ENR_TIM14EN_Field := 16#0#; -- unspecified Reserved_9_10 : STM32_SVD.UInt2 := 16#0#; -- Window watchdog clock enable WWDGEN : APB1ENR_WWDGEN_Field := 16#0#; -- unspecified Reserved_12_13 : STM32_SVD.UInt2 := 16#0#; -- SPI 2 clock enable SPI2EN : APB1ENR_SPI2EN_Field := 16#0#; -- SPI 3 clock enable SPI3EN : APB1ENR_SPI3EN_Field := 16#0#; -- unspecified Reserved_16_16 : STM32_SVD.Bit := 16#0#; -- USART 2 clock enable USART2EN : APB1ENR_USART2EN_Field := 16#0#; -- USART 3 clock enable USART3EN : APB1ENR_USART3EN_Field := 16#0#; -- UART 4 clock enable UART4EN : APB1ENR_UART4EN_Field := 16#0#; -- UART 5 clock enable UART5EN : APB1ENR_UART5EN_Field := 16#0#; -- I2C 1 clock enable I2C1EN : APB1ENR_I2C1EN_Field := 16#0#; -- I2C 2 clock enable I2C2EN : APB1ENR_I2C2EN_Field := 16#0#; -- USB clock enable USBEN : APB1ENR_USBEN_Field := 16#0#; -- unspecified Reserved_24_24 : STM32_SVD.Bit := 16#0#; -- CAN clock enable CANEN : APB1ENR_CANEN_Field := 16#0#; -- unspecified Reserved_26_26 : STM32_SVD.Bit := 16#0#; -- Backup interface clock enable BKPEN : APB1ENR_BKPEN_Field := 16#0#; -- Power interface clock enable PWREN : APB1ENR_PWREN_Field := 16#0#; -- DAC interface clock enable DACEN : APB1ENR_DACEN_Field := 16#0#; -- unspecified Reserved_30_31 : STM32_SVD.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for APB1ENR_Register use record TIM2EN at 0 range 0 .. 0; TIM3EN at 0 range 1 .. 1; TIM4EN at 0 range 2 .. 2; TIM5EN at 0 range 3 .. 3; TIM6EN at 0 range 4 .. 4; TIM7EN at 0 range 5 .. 5; TIM12EN at 0 range 6 .. 6; TIM13EN at 0 range 7 .. 7; TIM14EN at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; WWDGEN at 0 range 11 .. 11; Reserved_12_13 at 0 range 12 .. 13; SPI2EN at 0 range 14 .. 14; SPI3EN at 0 range 15 .. 15; Reserved_16_16 at 0 range 16 .. 16; USART2EN at 0 range 17 .. 17; USART3EN at 0 range 18 .. 18; UART4EN at 0 range 19 .. 19; UART5EN at 0 range 20 .. 20; I2C1EN at 0 range 21 .. 21; I2C2EN at 0 range 22 .. 22; USBEN at 0 range 23 .. 23; Reserved_24_24 at 0 range 24 .. 24; CANEN at 0 range 25 .. 25; Reserved_26_26 at 0 range 26 .. 26; BKPEN at 0 range 27 .. 27; PWREN at 0 range 28 .. 28; DACEN at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; subtype BDCR_LSEON_Field is STM32_SVD.Bit; subtype BDCR_LSERDY_Field is STM32_SVD.Bit; subtype BDCR_LSEBYP_Field is STM32_SVD.Bit; subtype BDCR_RTCSEL_Field is STM32_SVD.UInt2; subtype BDCR_RTCEN_Field is STM32_SVD.Bit; subtype BDCR_BDRST_Field is STM32_SVD.Bit; -- Backup domain control register (RCC_BDCR) type BDCR_Register is record -- External Low Speed oscillator enable LSEON : BDCR_LSEON_Field := 16#0#; -- Read-only. External Low Speed oscillator ready LSERDY : BDCR_LSERDY_Field := 16#0#; -- External Low Speed oscillator bypass LSEBYP : BDCR_LSEBYP_Field := 16#0#; -- unspecified Reserved_3_7 : STM32_SVD.UInt5 := 16#0#; -- RTC clock source selection RTCSEL : BDCR_RTCSEL_Field := 16#0#; -- unspecified Reserved_10_14 : STM32_SVD.UInt5 := 16#0#; -- RTC clock enable RTCEN : BDCR_RTCEN_Field := 16#0#; -- Backup domain software reset BDRST : BDCR_BDRST_Field := 16#0#; -- unspecified Reserved_17_31 : STM32_SVD.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for BDCR_Register use record LSEON at 0 range 0 .. 0; LSERDY at 0 range 1 .. 1; LSEBYP at 0 range 2 .. 2; Reserved_3_7 at 0 range 3 .. 7; RTCSEL at 0 range 8 .. 9; Reserved_10_14 at 0 range 10 .. 14; RTCEN at 0 range 15 .. 15; BDRST at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; subtype CSR_LSION_Field is STM32_SVD.Bit; subtype CSR_LSIRDY_Field is STM32_SVD.Bit; subtype CSR_RMVF_Field is STM32_SVD.Bit; subtype CSR_PINRSTF_Field is STM32_SVD.Bit; subtype CSR_PORRSTF_Field is STM32_SVD.Bit; subtype CSR_SFTRSTF_Field is STM32_SVD.Bit; subtype CSR_IWDGRSTF_Field is STM32_SVD.Bit; subtype CSR_WWDGRSTF_Field is STM32_SVD.Bit; subtype CSR_LPWRRSTF_Field is STM32_SVD.Bit; -- Control/status register (RCC_CSR) type CSR_Register is record -- Internal low speed oscillator enable LSION : CSR_LSION_Field := 16#0#; -- Read-only. Internal low speed oscillator ready LSIRDY : CSR_LSIRDY_Field := 16#0#; -- unspecified Reserved_2_23 : STM32_SVD.UInt22 := 16#0#; -- Remove reset flag RMVF : CSR_RMVF_Field := 16#0#; -- unspecified Reserved_25_25 : STM32_SVD.Bit := 16#0#; -- PIN reset flag PINRSTF : CSR_PINRSTF_Field := 16#1#; -- POR/PDR reset flag PORRSTF : CSR_PORRSTF_Field := 16#1#; -- Software reset flag SFTRSTF : CSR_SFTRSTF_Field := 16#0#; -- Independent watchdog reset flag IWDGRSTF : CSR_IWDGRSTF_Field := 16#0#; -- Window watchdog reset flag WWDGRSTF : CSR_WWDGRSTF_Field := 16#0#; -- Low-power reset flag LPWRRSTF : CSR_LPWRRSTF_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CSR_Register use record LSION at 0 range 0 .. 0; LSIRDY at 0 range 1 .. 1; Reserved_2_23 at 0 range 2 .. 23; RMVF at 0 range 24 .. 24; Reserved_25_25 at 0 range 25 .. 25; PINRSTF at 0 range 26 .. 26; PORRSTF at 0 range 27 .. 27; SFTRSTF at 0 range 28 .. 28; IWDGRSTF at 0 range 29 .. 29; WWDGRSTF at 0 range 30 .. 30; LPWRRSTF at 0 range 31 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Reset and clock control type RCC_Peripheral is record -- Clock control register CR : aliased CR_Register; -- Clock configuration register (RCC_CFGR) CFGR : aliased CFGR_Register; -- Clock interrupt register (RCC_CIR) CIR : aliased CIR_Register; -- APB2 peripheral reset register (RCC_APB2RSTR) APB2RSTR : aliased APB2RSTR_Register; -- APB1 peripheral reset register (RCC_APB1RSTR) APB1RSTR : aliased APB1RSTR_Register; -- AHB Peripheral Clock enable register (RCC_AHBENR) AHBENR : aliased AHBENR_Register; -- APB2 peripheral clock enable register (RCC_APB2ENR) APB2ENR : aliased APB2ENR_Register; -- APB1 peripheral clock enable register (RCC_APB1ENR) APB1ENR : aliased APB1ENR_Register; -- Backup domain control register (RCC_BDCR) BDCR : aliased BDCR_Register; -- Control/status register (RCC_CSR) CSR : aliased CSR_Register; end record with Volatile; for RCC_Peripheral use record CR at 16#0# range 0 .. 31; CFGR at 16#4# range 0 .. 31; CIR at 16#8# range 0 .. 31; APB2RSTR at 16#C# range 0 .. 31; APB1RSTR at 16#10# range 0 .. 31; AHBENR at 16#14# range 0 .. 31; APB2ENR at 16#18# range 0 .. 31; APB1ENR at 16#1C# range 0 .. 31; BDCR at 16#20# range 0 .. 31; CSR at 16#24# range 0 .. 31; end record; -- Reset and clock control RCC_Periph : aliased RCC_Peripheral with Import, Address => System'To_Address (16#40021000#); end STM32_SVD.RCC;
TamaMcGlinn/ada_raspio
Ada
482
adb
with Ada.Text_IO; with Raspio.GPIO; procedure Polling is use Raspio.GPIO; begin Raspio.Initialize; declare -- connect button from pin 12 to ground Button : constant Pin_Type := Create (Pin_ID => GPIO_P1_12, Mode => Input, Internal_Resistor => Pull_Up); State : Pin_State := Off; begin loop State := Read (Button); Ada.Text_IO.Put_Line (State'Image); delay 0.2; end loop; end; end Polling;
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_Table.Start_Position_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Table_Start_Position_Attribute_Node is begin return Self : Table_Start_Position_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_Start_Position_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Start_Position_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Table_URI, Matreshka.ODF_String_Constants.Start_Position_Attribute, Table_Start_Position_Attribute_Node'Tag); end Matreshka.ODF_Table.Start_Position_Attributes;
Gabriel-Degret/adalib
Ada
1,260
ads
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual --------------------------------------------------------------------------- with Ada.Strings.Unbounded; package Ada.Text_IO.Unbounded_IO is procedure Put (File : in File_Type; Item : in Strings.Unbounded.Unbounded_String); procedure Put (Item : in Strings.Unbounded.Unbounded_String); procedure Put_Line (File : in File_Type; Item : in Strings.Unbounded.Unbounded_String); procedure Put_Line (Item : in Strings.Unbounded.Unbounded_String); function Get_Line (File : in File_Type) return Strings.Unbounded.Unbounded_String; function Get_Line return Strings.Unbounded.Unbounded_String; procedure Get_Line (File : in File_Type; Item : out Strings.Unbounded.Unbounded_String); procedure Get_Line (Item : out Strings.Unbounded.Unbounded_String); end Ada.Text_IO.Unbounded_IO;
leo-brewin/adm-bssn-numerical
Ada
3,613
adb
with Ada.Text_IO; use Ada.Text_IO; with Support.Strings; use Support.Strings; with Ada.Calendar; package body Support.Clock is package Real_IO is new Ada.Text_IO.Float_IO (Real); use Real_IO; function get_date Return string is the_date : String (1..17) := (others => '?'); the_year : integer; the_month : integer; the_day : integer; the_seconds : real; dur_seconds : duration; the_hour : integer; the_minute : integer; str_month : string(1..3); first : integer; function get_seconds (the_seconds : duration) return real is last : integer; result : real; begin get(duration'image(the_seconds),result,last); return result; end; -- round(+1.23) --> +1 and round(-1.23) --> -1 -- round(+1.78) --> +2 and round(-1.78) --> -2 function round (item : real) return integer is begin return Integer(real'floor(item+0.5e0)); end; -- trunc(+6.66) --> +6 and trunc(-6.66) --> -6 function trunc (item : real) return integer is begin return Integer(real'truncation(item)); end; begin Ada.Calendar.Split (Ada.Calendar.Clock, the_year, the_month, the_day, dur_seconds); the_seconds := get_seconds (dur_seconds); the_hour := trunc ( (the_seconds/3600.0) ); the_minute := round ( (the_seconds-3600.0*Real(the_hour))/60.0 ); if the_minute = 60 then the_minute := 0; the_hour := the_hour + 1; end if; case the_month is when 1 => str_month := "Jan"; when 2 => str_month := "Feb"; when 3 => str_month := "Mar"; when 4 => str_month := "Apr"; when 5 => str_month := "May"; when 6 => str_month := "Jun"; when 7 => str_month := "Jul"; when 8 => str_month := "Aug"; when 9 => str_month := "Sep"; when 10 => str_month := "Oct"; when 11 => str_month := "Nov"; when 12 => str_month := "Dec"; when others => str_month := "???"; end case; writestr (the_date, str(the_hour,2)&":"& str(the_minute,2)&" "& str(the_day,2)&"-"& str_month&"-"& str(the_year,4)); first := the_date'first; if the_date (first + 0) = ' ' then the_date (first + 0) := '0'; end if; if the_date (first + 3) = ' ' then the_date (first + 3) := '0'; end if; if the_date (first + 6) = ' ' then the_date (first + 6) := '0'; end if; return the_date; end get_date; function get_elapsed (beg_clock : Ada.Real_Time.Time; end_clock : Ada.Real_Time.Time) return Real is last : integer; result : real; use Ada.Real_Time; begin get(duration'image(To_Duration(end_clock-beg_clock)),result,last); return result; end get_elapsed; procedure reset_elapsed_cpu is begin beg_clock := Ada.Real_Time.Clock; end_clock := beg_clock; end reset_elapsed_cpu; procedure report_elapsed_cpu (num_points, num_loop : Integer) is cpu_time : Real; begin end_clock := Ada.Real_Time.Clock; cpu_time := get_elapsed (beg_clock,end_clock); put_line("> Elapsed time (secs) : "&str(cpu_time,10)); put_line("> Time per node per step : "&str(cpu_time/(Real(num_points)*Real(num_loop)),10)); end report_elapsed_cpu; end Support.Clock;