content
stringlengths
23
1.05M
PACKAGE BODY math IS -- body of Math function package, which interfaces to the Ultrix -- math library. Normally we could interface our Ada math functions -- directly to the corresponding C functions, but this is not possible -- because the C functions deal only with double-precision float -- quantities and AdaEd deals only with single-precision currently. -- For a number of reasons, the coercion between precisions can be -- done only on the C side of the interface. Hence the extra layer -- of Ada functions: my_sin, etc., which interface directly to an -- extra layer of C functions contained in math.c. -- To use this interface package, you must -- 1. gcc -c math.c -- 2. adacomp -l <your AdaEd library> math.ads -- 3. adacomp -l <your AdaEd library> math.adb -- Assuming a client programs called UsesMath has been compiled as usual, -- bind it with -- adabind -i math.o -m usesmath <your library name> -- NOTE: this will cause a rather large entry to be placed in your AdaEd -- library, because AdaEd's interface to C requires that part of the AdaEd -- interpreter be linked in. -- written by Michael B. Feldman, The George Washington University -- May 1992 FUNCTION my_sin (X : Float) RETURN Float; PRAGMA interface (c, my_sin); FUNCTION Sin (X : Float) RETURN Float IS BEGIN RETURN my_sin (X); END Sin; FUNCTION my_cos (X : Float) RETURN Float; PRAGMA interface (c, my_cos); FUNCTION Cos (X : Float) RETURN Float IS BEGIN RETURN my_cos (X); END Cos; FUNCTION my_tan (X : Float) RETURN Float; PRAGMA interface (c, my_tan); FUNCTION Tan (X : Float) RETURN Float IS BEGIN RETURN my_tan (X); END Tan; FUNCTION my_sinh (X : Float) RETURN Float; PRAGMA interface (c, my_sinh); FUNCTION Sinh (X : Float) RETURN Float IS BEGIN RETURN my_sinh (X); END Sinh; FUNCTION my_cosh (X : Float) RETURN Float; PRAGMA interface (c, my_cosh); FUNCTION Cosh (X : Float) RETURN Float IS BEGIN RETURN my_cosh (X); END Cosh; FUNCTION my_tanh (X : Float) RETURN Float; PRAGMA interface (c, my_tanh); FUNCTION Tanh (X : Float) RETURN Float IS BEGIN RETURN my_tanh (X); END Tanh; FUNCTION my_asin (X : Float) RETURN Float; PRAGMA interface (c, my_asin); FUNCTION Asin (X : Float) RETURN Float IS BEGIN RETURN my_asin (X); END Asin; FUNCTION my_acos (X : Float) RETURN Float; PRAGMA interface (c, my_acos); FUNCTION Acos (X : Float) RETURN Float IS BEGIN RETURN my_acos (X); END Acos; FUNCTION my_atan (X : Float) RETURN Float; PRAGMA interface (c, my_atan); FUNCTION Atan (X : Float) RETURN Float IS BEGIN RETURN my_atan (X); END Atan; FUNCTION my_asinh (X : Float) RETURN Float; PRAGMA interface (c, my_asinh); FUNCTION Asinh (X : Float) RETURN Float IS BEGIN RETURN my_asinh (X); END Asinh; FUNCTION my_acosh (X : Float) RETURN Float; PRAGMA interface (c, my_acosh); FUNCTION Acosh (X : Float) RETURN Float IS BEGIN RETURN my_acosh (X); END Acosh; FUNCTION my_atanh (X : Float) RETURN Float; PRAGMA interface (c, my_atanh); FUNCTION Atanh (X : Float) RETURN Float IS BEGIN RETURN my_atanh (X); END Atanh; FUNCTION my_exp (X : Float) RETURN Float; PRAGMA interface (c, my_exp); FUNCTION Exp (X : Float) RETURN Float IS BEGIN RETURN my_exp (X); END Exp; FUNCTION my_log (X : Float) RETURN Float; PRAGMA interface (c, my_log); FUNCTION Log (X : Float) RETURN Float IS BEGIN RETURN my_log (X); END Log; FUNCTION my_sqrt (X : Float) RETURN Float; PRAGMA interface (c, my_sqrt); FUNCTION Sqrt (X : Float) RETURN Float IS BEGIN RETURN my_sqrt (X); END Sqrt; FUNCTION my_cbrt (X : Float) RETURN Float; PRAGMA interface (c, my_cbrt); FUNCTION Cbrt (X : Float) RETURN Float IS BEGIN RETURN my_cbrt (X); END Cbrt; END Math;
-- The Village of Vampire by YT, このソースコードはNYSLです with Ada.Calendar.Formatting; with Ada.Characters.Latin_1; with Ada.Directories; with Ada.Hierarchical_File_Names; with Ada.Streams.Stream_IO; with Tabula.Calendar; with System.Debug; package body Tabula.Debug is Line_Break : constant Character := Ada.Characters.Latin_1.LF; Name : Static_String_Access; File : Ada.Streams.Stream_IO.File_Type; Time : Ada.Calendar.Time; procedure Start is Time_Image : constant String := Ada.Calendar.Formatting.Image (Time, Time_Zone => Tabula.Calendar.Time_Offset); Offset_Image : constant String := Ada.Calendar.Formatting.Image (Tabula.Calendar.Time_Offset); begin if Name = null then raise Program_Error with "debug log handler is not installed."; end if; -- create the directory declare Dir : constant String := Ada.Hierarchical_File_Names.Unchecked_Containing_Directory (Name.all); begin if Dir'Length /= 0 then Ada.Directories.Create_Path (Dir); end if; end; -- open Ada.Streams.Stream_IO.Create ( File, Ada.Streams.Stream_IO.Append_File, Name => Name.all); declare Stream : Ada.Streams.Stream_IO.Stream_Access := Ada.Streams.Stream_IO.Stream (File); begin String'Write ( Stream, "---- " & Time_Image & " (GMT" & Offset_Image & ") ----" & Line_Break); end; end Start; function Put ( S : in String; Source_Location : in String; Enclosing_Entity : in String) return Boolean is begin if not Ada.Streams.Stream_IO.Is_Open (File) then Start; end if; declare Stream : Ada.Streams.Stream_IO.Stream_Access := Ada.Streams.Stream_IO.Stream (File); begin String'Write ( Stream, Source_Location & ": (" & Enclosing_Entity & ") " & S & Line_Break); end; Ada.Streams.Stream_IO.Flush (File); return True; end Put; procedure Hook ( Name : not null Static_String_Access; Time : in Ada.Calendar.Time) is begin Debug.Name := Name; Debug.Time := Time; System.Debug.Put_Hook := Put'Access; end Hook; end Tabula.Debug;
pragma License (Unrestricted); -- with Ada.Task_Identification; package Ada.Asynchronous_Task_Control is pragma Preelaborate; -- procedure Hold (T : Task_Identification.Task_Id); -- procedure Continue (T : Task_Identification.Task_Id); -- function Is_Held (T : Task_Identification.Task_Id) -- return Boolean; end Ada.Asynchronous_Task_Control;
-- package Mes_Tasches_P is package Input_1 is task Ma_Tasche is entry Accepter (Continuer : Boolean); end Ma_Tasche; task Mon_Autre_Tasche; task type Tasche_Type_1_T; Une_Tasche : Tasche_Type_1_T; task type Tasche_Type_2_T is entry Start; entry Lire (Donnee : out Integer); end Tasche_Type_2_T; -- Task type with discriminant. task type Tasche_Type_3_T -- We could have any number of arguments in discriminant -- Work exactly like argument in procedure/function/entry/accept (Taille : Integer) is entry Start; end Tasche_Type_3_T; -- protected objects. protected Objet_Protege is entry Demarrer; procedure Faire; function Tester return Boolean; private Variable : Boolean := True; end Objet_Protege; protected type Type_Protege is entry Demarrer; procedure Faire; function Tester return Boolean; private Variable : Boolean := True; end Type_Protege; protected type Discriminant_Protege (Priorite : Natural) is entry Demarrer; procedure Faire; function Tester return Boolean; private Variable : Boolean := True; end Discriminant_Protege; end Input_1; -- end Mes_Tasches_P;
with Solve; use Solve; with Ada.Text_IO; use Ada.Text_IO; procedure Solve_Part_1 is Input_File : File_Type; Previous_Value : Integer; Value : Integer; Answer : Integer := 0; begin Open (Input_File, In_File, "input.txt"); Previous_Value := Get_Line_Integer (Input_File); while not End_Of_File (Input_File) loop Value := Get_Line_Integer (Input_File); if Value > Previous_Value then Answer := Answer + 1; end if; Previous_Value := Value; end loop; Put ("ANSWER:" & Integer'Image (Answer)); New_Line; Close (Input_File); end Solve_Part_1;
with Ada.Text_IO; with Ada.Integer_Text_IO; with Ada.Containers.Vectors; use Ada.Text_IO; use Ada.Integer_Text_IO; use Ada.Containers; procedure Euler is package Integer_Vectors is new Vectors(Natural, Integer); Fibs : Integer_Vectors.Vector; Last : Integer_Vectors.Cursor; Second_To_Last : Integer_Vectors.Cursor; Cursor : Integer_Vectors.Cursor; Sum : Integer := 0; begin Integer_Vectors.Append(Fibs, 0); Integer_Vectors.Append(Fibs, 1); Last := Integer_Vectors.Last(Fibs); Second_To_Last := Integer_Vectors.Previous(Last); while Integer_Vectors.Element(Last) + Integer_Vectors.Element(Second_To_Last) < 4000000 loop Integer_Vectors.Append(Fibs, Integer_Vectors.Element(Last) + Integer_Vectors.Element(Second_To_Last)); Last := Integer_Vectors.Last(Fibs); Second_To_Last := Integer_Vectors.Previous(Last); end loop; Cursor := Integer_Vectors.First(Fibs); while Integer_Vectors.Has_Element(Cursor) loop if (Integer_Vectors.Element(Cursor) mod 2) = 0 then sum := (sum + Integer_Vectors.Element(Cursor)); end if; Cursor := Integer_Vectors.Next(Cursor); end loop; put(Item => sum, Width => 1); new_line; end Euler;
package openGL.Model.hexagon_Column -- -- Models a column with six sides. -- is type Item is abstract new Model.item with record Radius : Real := 1.0; Height : Real := 1.0; end record; private Normal : constant Vector_3 := (0.0, 0.0, 1.0); end openGL.Model.hexagon_Column;
with Ada.IO_Exceptions; private with Ada.Finalization; private with C.libxml.encoding; private with C.libxml.xmlerror; private with C.libxml.xmlreader; private with C.libxml.xmlwriter; package XML is pragma Preelaborate; pragma Linker_Options ("-lxml2"); function Version return String; procedure Check_Version; procedure Cleanup; -- do finalization type Encoding_Type is private; function No_Encoding return Encoding_Type; function Find (Name : String) return Encoding_Type; function Name (Encoding : Encoding_Type) return String; type Standalone_Type is (No_Specific, No, Yes); for Standalone_Type use (No_Specific => -1, No => 0, Yes => 1); package Event_Types is type Event_Type is ( No_Event, Element_Start, Attribute, Text, CDATA, Entity_Reference, Entity_Start, Processing_Instruction, -- <?xml-stylesheet ...?> Comment, Document, -- not used Document_Type, -- <!DOCTYPE ...> Document_Fragment, Notation, Whitespace, Significant_Whitespace, Element_End, Entity_End, XML_Declaration); -- <?xml ...?>, not used private use C.libxml.xmlreader; for Event_Type use ( No_Event => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_NONE), Element_Start => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_ELEMENT), Attribute => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_ATTRIBUTE), Text => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_TEXT), CDATA => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_CDATA), Entity_Reference => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_ENTITY_REFERENCE), Entity_Start => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_ENTITY), Processing_Instruction => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_PROCESSING_INSTRUCTION), Comment => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_COMMENT), Document => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_DOCUMENT), Document_Type => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_DOCUMENT_TYPE), Document_Fragment => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_DOCUMENT_FRAGMENT), Notation => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_NOTATION), Whitespace => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_WHITESPACE), Significant_Whitespace => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_SIGNIFICANT_WHITESPACE), Element_End => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_END_ELEMENT), Entity_End => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_END_ENTITY), XML_Declaration => xmlReaderTypes'Enum_Rep (XML_READER_TYPE_XML_DECLARATION)); end Event_Types; type Event_Type is new Event_Types.Event_Type; type Event (Event_Type : XML.Event_Type := No_Event) is record case Event_Type is when Element_Start | Attribute | Processing_Instruction | Document_Type => Name : not null access constant String; case Event_Type is when Attribute => Value : not null access constant String; when Document_Type => Public_Id : access constant String; System_Id : access constant String; Subset : access constant String; when others => null; end case; when Text | CDATA | Comment | Whitespace | Significant_Whitespace => Content : not null access constant String; when others => null; end case; end record; -- reader type Parsing_Entry_Type is limited private; pragma Preelaborable_Initialization (Parsing_Entry_Type); function Is_Assigned (Parsing_Entry : Parsing_Entry_Type) return Boolean; pragma Inline (Is_Assigned); type Event_Reference_Type ( Element : not null access constant Event) is null record with Implicit_Dereference => Element; function Value (Parsing_Entry : aliased Parsing_Entry_Type) return Event_Reference_Type; pragma Inline (Value); type Reader (<>) is limited private; function Create ( Input : not null access procedure (Item : out String; Last : out Natural); Encoding : Encoding_Type := No_Encoding; URI : String := "") return Reader; procedure Set_DTD_Loading (Object : in out Reader; Value : in Boolean); procedure Set_Default_Attributes ( Object : in out Reader; Value : in Boolean); procedure Set_Validation (Object : in out Reader; Value : in Boolean); procedure Set_Substitute_Entities ( Object : in out Reader; Value : in Boolean); function Version (Object : in out Reader) return access constant String; function Encoding (Object : in out Reader) return Encoding_Type; function Standalone (Object : in out Reader) return Standalone_Type; function Base_URI (Object : in out Reader) return String; procedure Get ( Object : in out Reader; Process : not null access procedure (Event : in XML.Event)); procedure Get ( Object : in out Reader; Parsing_Entry : out Parsing_Entry_Type); procedure Get_Until_Element_End (Object : in out Reader); procedure Get_Document_Start (Object : in out Reader) is null; procedure Get_Document_End (Object : in out Reader) is null; procedure Finish (Object : in out Reader); function Last_Error_Line (Object : Reader) return Natural; function Last_Error_Message (Object : Reader) return String; -- writer type Writer (<>) is limited private; function Create ( Output : not null access procedure (Item : in String); Encoding : Encoding_Type := No_Encoding) return Writer; function Finished (Object : Writer) return Boolean; pragma Inline (Finished); procedure Flush (Object : in out Writer); procedure Set_Indent (Object : in out Writer; Indent : in Natural); procedure Set_Indent (Object : in out Writer; Indent : in String); procedure Put (Object : in out Writer; Event : in XML.Event); procedure Put_Document_Start ( Object : in out Writer; Version : access constant String := null; Encoding : Encoding_Type := No_Encoding; Standalone : Standalone_Type := No_Specific); procedure Put_Document_End (Object : in out Writer); procedure Finish (Object : in out Writer); -- exceptions Status_Error : exception renames Ada.IO_Exceptions.Status_Error; Name_Error : exception renames Ada.IO_Exceptions.Name_Error; Use_Error : exception renames Ada.IO_Exceptions.Use_Error; Data_Error : exception renames Ada.IO_Exceptions.Data_Error; private type Encoding_Type is new C.libxml.encoding.xmlCharEncodingHandlerPtr; type String_Access is access String; type String_Constraint is record First : Positive; Last : Natural; end record; pragma Suppress_Initialization (String_Constraint); -- reader type Parsed_Data_Type is limited record Event : aliased XML.Event; Name_Constraint : aliased String_Constraint; Value_Constraint : aliased String_Constraint; Public_Id_Constraint : aliased String_Constraint; System_Id_Constraint : aliased String_Constraint; Subset_Constraint : aliased String_Constraint; Content_Constraint : aliased String_Constraint; end record; pragma Suppress_Initialization (Parsed_Data_Type); type Parsing_Entry_Type is limited record -- may be controlled type -- uninitialized Data : aliased Parsed_Data_Type; -- initialized Assigned : Boolean := False; end record; type Reader_State is ( Next, Start, Remaining, Empty_Element); -- have to supplement Element_End pragma Discard_Names (Reader_State); type Uninitialized_Non_Controlled_Reader is limited record Last_Error : aliased C.libxml.xmlerror.xmlError; end record; pragma Suppress_Initialization (Uninitialized_Non_Controlled_Reader); type Non_Controlled_Reader is limited record -- uninitialized U : Uninitialized_Non_Controlled_Reader; -- initialized by Controlled_Readers.Reader Raw : C.libxml.xmlreader.xmlTextReaderPtr; State : Reader_State; Error : Boolean; Version : String_Access; end record; pragma Suppress_Initialization (Non_Controlled_Reader); procedure Install_Error_Handler ( NC_Object : aliased in out Non_Controlled_Reader); procedure Reset_Last_Error (NC_Object : in out Non_Controlled_Reader); procedure Raise_Last_Error (NC_Object : in Non_Controlled_Reader); package Controlled_Readers is type Reader is limited private; function Reference (Object : aliased in out XML.Reader) return not null access Non_Controlled_Reader; pragma Inline (Reference); generic type Result_Type (<>) is limited private; with function Process (Raw : Non_Controlled_Reader) return Result_Type; function Query (Object : XML.Reader) return Result_Type; pragma Inline (Query); generic with procedure Process (Raw : in out Non_Controlled_Reader); procedure Update (Object : in out XML.Reader); pragma Inline (Update); private type Reader is new Ada.Finalization.Limited_Controlled with record Data : aliased Non_Controlled_Reader := (U => <>, Raw => null, State => Start, Error => False, Version => null); end record; overriding procedure Finalize (Object : in out Reader); end Controlled_Readers; type Reader is new Controlled_Readers.Reader; -- writer type Non_Controlled_Writer is limited record Raw : C.libxml.xmlwriter.xmlTextWriterPtr := null; Finished : Boolean := False; end record; pragma Suppress_Initialization (Non_Controlled_Writer); package Controlled_Writers is type Writer is limited private; generic type Result_Type (<>) is limited private; with function Process (Raw : Non_Controlled_Writer) return Result_Type; function Query (Object : XML.Writer) return Result_Type; pragma Inline (Query); generic with procedure Process (Raw : in out Non_Controlled_Writer); procedure Update (Object : in out XML.Writer); pragma Inline (Update); private type Writer is new Ada.Finalization.Limited_Controlled with record Data : aliased Non_Controlled_Writer := (Raw => null, Finished => False); end record; overriding procedure Finalize (Object : in out Writer); end Controlled_Writers; type Writer is new Controlled_Writers.Writer; -- exceptions procedure Raise_Error (Error : access constant C.libxml.xmlerror.xmlError); pragma No_Return (Raise_Error); end XML;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 onox <denkpadje@gmail.com> -- -- 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 Orka.SIMD.SSE.Singles; with Orka.SIMD.SSE2.Doubles; package Orka.SIMD.AVX.Doubles.Swizzle is pragma Pure; use SIMD.SSE2.Doubles; use SIMD.SSE.Singles; function Shuffle_Within_Lanes (Left, Right : m256d; Mask : Unsigned_32) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_shufpd256"; -- Shuffle the 64-bit doubles in Left and Right per 128-bit lane -- using the given Mask. The first and third doubles are retrieved -- from Left. The second and fourth doubles are retrieved from Right: -- -- Result (1) := if Mask (a) = 0 then Left (1) else Left (2) -- Result (2) := if Mask (b) = 0 then Right (1) else Right (2) -- Result (3) := if Mask (c) = 0 then Left (3) else Left (4) -- Result (4) := if Mask (d) = 0 then Right (3) else Right (4) -- -- The compiler needs access to the Mask at compile-time, thus construct it -- as follows: -- -- Mask_a_b_c_d : constant Unsigned_32 := a or b * 2 or c * 4 or d * 8; -- -- or by simply writing 2#dcba#. a, b, c, and d must be either 0 or 1. -- a and c select the doubles to use from Left, b and d from Right. -- -- Warning: shuffling works per 128-bit lane. An element cannot be -- shuffled to the other half. function Unpack_High (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_unpckhpd256"; -- Unpack and interleave the 64-bit doubles from the upper halves of -- the 128-bit lanes of Left and Right as follows: -- Left (2), Right (2), Left (4), Right (4) function Unpack_Low (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_unpcklpd256"; -- Unpack and interleave the 64-bit doubles from the lower halves of -- the 128-bit lanes of Left and Right as follows: -- Left (1), Right (1), Left (3), Right (3) function Duplicate (Elements : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_movddup256"; -- Duplicate first and third element as follows: -- Elements (1), Elements (1), Elements (3), Elements (3) function Duplicate_LH (Elements : m256d) return m256d with Inline; function Duplicate_HL (Elements : m256d) return m256d with Inline; procedure Transpose (Matrix : in out m256d_Array) with Inline; function Transpose (Matrix : m256d_Array) return m256d_Array with Inline; function Blend (Left, Right : m256d; Mask : Unsigned_32) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendpd256"; -- Select elements from two sources (Left and Right) using a constant mask. -- -- The compiler needs access to the Mask at compile-time, thus construct it -- as follows: -- -- Mask_a_b_c_d : constant Unsigned_32 := a or b * 2 or c * 4 or d * 8; -- -- or by simply writing 2#dcba#. a, b, c, and d must be either 0 or 1. function Blend (Left, Right, Mask : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_blendvpd256"; -- Select elements from two sources (Left and Right) using a variable mask function Cast (Elements : m256d) return m128d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_pd_pd256"; function Convert (Elements : m256d) return m128 with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_cvtpd2ps256"; function Convert (Elements : m128) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_cvtps2pd256"; function Extract (Elements : m256d; Mask : Unsigned_32) return m128d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vextractf128_pd256"; -- Extract 128-bit from either the lower half (Mask = 0) or upper -- half (Mask = 1) function Insert (Left : m256d; Right : m128d; Mask : Unsigned_32) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vinsertf128_pd256"; -- Insert Right into the lower half (Mask = 0) or upper half (Mask = 1) function Permute (Elements : m128d; Mask : Unsigned_32) return m128d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vpermilpd"; -- Shuffle the 64-bit doubles in Elements. Similar to Shuffle (Elements, Elements, Mask): -- -- Result (1) := if Mask (a) = 0 then Elements (1) else Elements (2) -- Result (2) := if Mask (b) = 0 then Elements (1) else Elements (2) -- -- The compiler needs access to the Mask at compile-time, thus construct it -- as follows: -- -- Mask_a_b : constant Unsigned_32 := a or b * 2; -- -- or by simply writing 2#ba#. a and b must be either 0 or 1. function Permute_Within_Lanes (Elements : m256d; Mask : Unsigned_32) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vpermilpd256"; -- Shuffle elements within the two 128-bit lanes. Similar to -- Shuffle_Within_Lanes (Elements, Elements, Mask): -- -- Result (1) := if Mask (a) = 0 then Elements (1) else Elements (2) -- Result (2) := if Mask (b) = 0 then Elements (1) else Elements (2) -- Result (3) := if Mask (c) = 0 then Elements (3) else Elements (4) -- Result (4) := if Mask (d) = 0 then Elements (3) else Elements (4) -- -- The compiler needs access to the Mask at compile-time, thus construct it -- as follows: -- -- Mask_a_b_c_d : constant Unsigned_32 := a or b * 2 or c * 4 or d * 8; -- -- or by simply writing 2#dcba#. a, b, c, and d must be either 0 or 1. function Permute_Lanes (Left, Right : m256d; Mask : Unsigned_32) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_vperm2f128_pd256"; -- Shuffle 128-bit lanes. -- -- Bits 1-2 of Mask are used to control which of the four 128-bit lanes -- to use for the lower half (128-bit) of the result. Bits 5-6 to select -- a lane for the upper half of the result: -- -- 0 => Left (1 .. 2) -- 1 => Left (3 .. 4) -- 2 => Right (1 .. 2) -- 3 => Right (3 .. 4) -- -- Bits 4 and 8 are used to zero the corresponding half (lower or upper). -- -- The compiler needs access to the Mask at compile-time, thus construct it -- as follows: -- -- Mask_l_u_zl_zu : constant Unsigned_32 := l or u * 16 or zl * 8 or zu * 128; -- -- u and l are numbers between 0 and 3 (see above). zu and zl are either 0 or 1 -- to zero a lane. end Orka.SIMD.AVX.Doubles.Swizzle;
generic type elem is private; -- generico package dpila is type pila is limited private; -- evitas asignacion y comparacion de igualdad/desigualdad mal_uso: exception; espacio_desbordado: exception; --overflow procedure pvacia(p: out pila); procedure empila(p: in out pila; x: in elem); procedure desempila(p: in out pila); function cima(p: in pila) return elem; function estavacia(p: in pila) return boolean; private type nodo; type pnodo is access nodo; type nodo is record x: elem; sig: pnodo; end record; type pila is record top: pnodo; end record; end dpila;
with RASCAL.Utility; use RASCAL.Utility; with RASCAL.UserMessages; with Main; use Main; with Interfaces.C; use Interfaces.C; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Exceptions; with Reporter; package body Controller_Choices is -- package Utility renames RASCAL.Utility; package UserMessages renames RASCAL.UserMessages; -- procedure Handle (The : in TEL_ViewChoices_Type) is begin Call_OS_CLI("Filer_Run <Meaning$Dir>.!Configure"); exception when e: others => Report_Error("CHOICES",Ada.Exceptions.Exception_Information (e)); end Handle; -- procedure Handle (The : in MEL_Message_ConfiX) is Message : String := To_Ada(The.Event.all.Message); begin if Index(To_Lower(Message),"config") >= Message'First then null; -- read choices end if; exception when e: others => Report_Error("MCONFIX",Ada.Exceptions.Exception_Information (e)); end Handle; -- end Controller_Choices;
with Ada.Text_IO; use Ada.Text_IO; procedure sample is -- ================ -- VARIABLES -- ================ Const : constant Integer := 3; Var : Positive := 5; -- ================ -- TYPES -- ================ type My_Range is range 1 .. 5; -- inclusive Mod_Size : constant Positive := 5; type Modular_Element is mod Mod_Size; type My_Array is array (My_Range) of Positive; -- array with index 1 .. 5; Array_Instance : My_Array := (1, 2, 3, 4, 5); -- ================ -- FUNCTIONS -- ================ -- have return values, should be side effect free aka pure function Increment_By (X : Integer := 0; -- parameters, can have default values Incr : Integer := 1) return Integer is begin return X + Incr; end Increment_By; -- calls -- Var := Increment_By; -- parameterless, uses default values -- Var := Increment_By (1, 3); -- regular parameter passing -- Var := Increment_by (X => 3); -- named parameter passing -- single line definition for boolean function isGreaterThanTen (X : Integer) return Boolean is (X > 10); -- ================ -- PROCEDURE -- ================ -- must define parameter modes: -- * in : parameter can only be read, not written (default) -- * out : parameter can only be written to, then read -- * in out : parameter can be both read and written procedure Add_Ten (X : in out Integer) is type iter is range 1 .. 10; begin for I in iter loop X := X + 1; end loop; end Add_Ten; -- ================ -- TASKS -- ================ -- static task, only needs to be declared to be instantiated, runs on parent begin task Static_Task; task body Static_Task is begin delay 1.0; -- note: delay until x; is more precise. delay 0.0; to signal CPU to schedule in a different thread. Put_Line ("Start of Static Task"); end Static_Task; -- task type, used to create multiple instances, must be instantiated separately task type Task_Type (Id : Positive); task body Task_Type is begin delay 1.0; Put_Line ("Start of Task Type " & Positive'Image (Id)); end Task_Type; -- allocation Task_1_Instance : Task_Type (1); Task_2_Instance : Task_Type (2); -- Task_Array : array (1 .. 10) of Task_Type (3); -- dynamic task type task type Dynamic_Task_Type (Id : Positive); -- tasks are bound to the scope where pointer is declared, between type declaration and allocation -- note: the task itself can last longer than its pointer type Dynamic_Task_Type_Pointer is access Dynamic_Task_Type; task body Dynamic_Task_Type is begin delay 1.0; Put_Line ("Start of Dynamic Task Type " & Positive'Image (Id)); end Dynamic_Task_Type; -- allocation, use new for dynamic tasks Dynamic_Task : Dynamic_Task_Type_Pointer := new Dynamic_Task_Type (1); -- tasks can be nested, in this case Nested_Task is the parent task Nested_Task; task body Nested_Task is begin delay 1.0; Put_Line ("Start of Nested Task"); declare -- can also have additional declare blocks after begin -- allocation of another task (doesn't necessarily need to be dynamic) Inner_Task : Dynamic_Task_Type_Pointer := new Dynamic_Task_Type (2); begin Put_Line ("End of Nested Task Declare"); end; end Nested_Task; -- task synchronization: rendez-vous task Sync_Task is entry Continue; -- define an entry (note: different to protected entry) end Sync_Task; task body Sync_Task is begin Put_Line ("Start of Sync Task"); accept Continue; -- task will wait until the entry is called Put_Line ("End of Sync Task"); end Sync_Task; -- ================ -- PROTECTED OBJECTS -- ================ -- enforce protected operations for mutex on shared resources to avoid race conditions, etc. protected Protected_Obj is procedure Set (V : Modular_Element); function Get return Modular_Element; entry Inc; entry Dec; private -- information hiding Local : Modular_Element := 0; end Protected_Obj; protected body Protected_Obj is -- procedures can modify data, only 1 protected object can access at a time procedure Set (V : Modular_Element) is begin Local := V; end Set; -- functions cannot modify data, can be called in parallel function Get return Modular_Element is begin return Local; end Get; -- entries create barriers that are only passed when the condition evaluates to True -- note: different to task entries entry Inc when Local < Modular_Element'Last is begin Local := Modular_Element'Succ (Local); end Inc; entry Dec when Local > Modular_Element'First is begin Local := Modular_Element'Pred (Local); end Dec; end Protected_Obj; -- protected types are similar to task types -- main begin -- example print statements Put_Line ("Start of main scope"); Put_Line (Integer'Image (Const)); -- use [type]'Image to print -- imperative Add_Ten (Var); -- procedure call -- Var := 10; -- assignment if isGreaterThanTen (Var) then Put_Line ("Var is > 10"); elsif not isGreaterThanTen (Var) then Put_Line ("Var is <= 10"); else Put_Line ("How did you get here???"); end if; -- use 'and then' for lazy evaluation (will not evaluate second expression if first is False) if False and then True then null; end if; -- use 'or else' for lazy evaluation (will not evaluate second expression if first is True) if True or else False then null; end if; -- example for loop can be found in procedures -- task synchronization usage delay 3.0; Sync_Task.Continue; -- call Sync_Task's entry -- protected object usage delay 1.0; Protected_Obj.Set (3); -- only 1 thread can be inside a protected procedure at a time Protected_Obj.Inc; -- entry will wait until condition is True Put_Line ("Protect Obj number is: " & Modular_Element'Image (Protected_Obj.Get)); null; end sample;
with Ada.Text_IO; package body MathUtils is function rand01 return Float is begin return Ada.Numerics.Float_Random.Random(gen); end rand01; function rand(min, max: Float) return Float is begin return (max - min)*rand01 + min; end rand; function mse(a, b: in Vector) return Float is result: Float := 0.0; ib: Positive := b.First_Index; begin for x of a loop result := result + (x - b(ib)) * (x - b(ib)); ib := ib + 1; end loop; return result / Float(a.Length); end mse; function logLoss(target, predictions: in Vector) return Float is result: Float := 0.0; tmp: Float; ib: Positive := predictions.First_Index; begin for y of target loop tmp := y * F.Log(predictions(ib) + 0.00001) + (1.0 - y) * F.Log(1.00001 - predictions(ib)); result := result - tmp; ib := ib + 1; end loop; return result / Float(target.Length); end logLoss; procedure multiply(vec: in out MathUtils.Vector; value: Float) is begin for x of vec loop x := x * value; end loop; end multiply; procedure softmax(vec: in out MathUtils.Vector) is total: Float := 0.0; begin for x of vec loop declare xp: constant Float := MathUtils.F.Exp(x); begin x := xp; total := total + xp; end; end loop; for x of vec loop x := x / total; end loop; end softmax; procedure print(vec: in MathUtils.Vector) is x: Float; begin for i in vec.First_Index .. vec.Last_Index loop x := vec(i); Ada.Text_IO.Put(x'Image & ", "); end loop; end print; begin Ada.Numerics.Float_Random.Reset(gen); end MathUtils;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . D I R E C T O R I E S . V A L I D I T Y -- -- -- -- B o d y -- -- (Windows Version) -- -- -- -- Copyright (C) 2004-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the Windows version of this package with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; package body Ada.Directories.Validity is Invalid_Character : constant array (Character) of Boolean := (NUL .. US | '\' => True, '/' | ':' | '*' | '?' => True, '"' | '<' | '>' | '|' => True, DEL => True, others => False); -- Note that a valid file-name or path-name is implementation defined. -- To support UTF-8 file and directory names, we do not want to be too -- restrictive here. --------------------------------- -- Is_Path_Name_Case_Sensitive -- --------------------------------- function Is_Path_Name_Case_Sensitive return Boolean is begin return False; end Is_Path_Name_Case_Sensitive; ------------------------ -- Is_Valid_Path_Name -- ------------------------ function Is_Valid_Path_Name (Name : String) return Boolean is Start : Positive := Name'First; Last : Natural; begin -- A path name cannot be empty, cannot contain more than 256 characters, -- cannot contain invalid characters and each directory/file name need -- to be valid. if Name'Length = 0 or else Name'Length > 256 then return False; else -- A drive letter may be specified at the beginning if Name'Length >= 2 and then Name (Start + 1) = ':' and then (Name (Start) in 'A' .. 'Z' or else Name (Start) in 'a' .. 'z') then Start := Start + 2; -- A drive letter followed by a colon and followed by nothing or -- by a relative path is an ambiguous path name on Windows, so we -- don't accept it. if Start > Name'Last or else (Name (Start) /= '/' and then Name (Start) /= '\') then return False; end if; end if; loop -- Look for the start of the next directory or file name while Start <= Name'Last and then (Name (Start) = '\' or Name (Start) = '/') loop Start := Start + 1; end loop; -- If all directories/file names are OK, return True exit when Start > Name'Last; Last := Start; -- Look for the end of the directory/file name while Last < Name'Last loop exit when Name (Last + 1) = '\' or Name (Last + 1) = '/'; Last := Last + 1; end loop; -- Check if the directory/file name is valid if not Is_Valid_Simple_Name (Name (Start .. Last)) then return False; end if; -- Move to the next name Start := Last + 1; end loop; end if; -- If Name follows the rules, it is valid return True; end Is_Valid_Path_Name; -------------------------- -- Is_Valid_Simple_Name -- -------------------------- function Is_Valid_Simple_Name (Name : String) return Boolean is Only_Spaces : Boolean; begin -- A file name cannot be empty, cannot contain more than 256 characters, -- and cannot contain invalid characters. if Name'Length = 0 or else Name'Length > 256 then return False; -- Name length is OK else Only_Spaces := True; for J in Name'Range loop if Invalid_Character (Name (J)) then return False; elsif Name (J) /= ' ' then Only_Spaces := False; end if; end loop; -- If no invalid chars, and not all spaces, file name is valid return not Only_Spaces; end if; end Is_Valid_Simple_Name; ------------- -- Windows -- ------------- function Windows return Boolean is begin return True; end Windows; end Ada.Directories.Validity;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with ABR; use ABR; -- Afficher la fréquence absolue des caractères d'une chaîne de caractère. procedure Frequences_Caracteres is -- Calculer la fréquence absolue (Frequences) de chaque caractère de Texte. procedure Calculer_Frequences_Absolues (Texte : in String ; Frequences : out T_ABR) is begin Initialiser (Frequences); for I in Texte'Range loop declare C : constant Character := Texte (I); begin Modifier (Frequences, C, La_Donnee (Frequences, C) + 1); exception when Cle_Absente_Exception => Inserer (Frequences, C, 1); end; end loop; end Calculer_Frequences_Absolues; Frequences: T_ABR; begin Calculer_Frequences_Absolues ("DCEFABCCAABAA", Frequences); -- afficher les résultats Put_Line ("Nombre de caractères différents : " & Integer'Image (Taille (Frequences))); Afficher (Frequences); Afficher_Debug (Frequences); -- vérifier les résulats pragma Assert (Taille (Frequences) = 6); pragma Assert (La_Donnee (Frequences, 'A') = 5); pragma Assert (La_Donnee (Frequences, 'B') = 2); pragma Assert (La_Donnee (Frequences, 'C') = 3); for C in Character range 'D'..'F' loop pragma Assert (La_Donnee (Frequences, C) = 1); end loop; end Frequences_Caracteres;
-- This spec has been automatically generated from STM32F0xx.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.NVIC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype IPR0_PRI_00_Field is STM32_SVD.UInt2; subtype IPR0_PRI_01_Field is STM32_SVD.UInt2; subtype IPR0_PRI_02_Field is STM32_SVD.UInt2; subtype IPR0_PRI_03_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 0 type IPR0_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_00 PRI_00 : IPR0_PRI_00_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_01 PRI_01 : IPR0_PRI_01_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_02 PRI_02 : IPR0_PRI_02_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_03 PRI_03 : IPR0_PRI_03_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR0_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_00 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_01 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_02 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_03 at 0 range 30 .. 31; end record; subtype IPR1_PRI_40_Field is STM32_SVD.UInt2; subtype IPR1_PRI_41_Field is STM32_SVD.UInt2; subtype IPR1_PRI_42_Field is STM32_SVD.UInt2; subtype IPR1_PRI_43_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 1 type IPR1_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_40 PRI_40 : IPR1_PRI_40_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_41 PRI_41 : IPR1_PRI_41_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_42 PRI_42 : IPR1_PRI_42_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_43 PRI_43 : IPR1_PRI_43_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR1_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_40 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_41 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_42 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_43 at 0 range 30 .. 31; end record; subtype IPR2_PRI_80_Field is STM32_SVD.UInt2; subtype IPR2_PRI_81_Field is STM32_SVD.UInt2; subtype IPR2_PRI_82_Field is STM32_SVD.UInt2; subtype IPR2_PRI_83_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 2 type IPR2_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_80 PRI_80 : IPR2_PRI_80_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_81 PRI_81 : IPR2_PRI_81_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_82 PRI_82 : IPR2_PRI_82_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_83 PRI_83 : IPR2_PRI_83_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR2_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_80 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_81 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_82 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_83 at 0 range 30 .. 31; end record; subtype IPR3_PRI_120_Field is STM32_SVD.UInt2; subtype IPR3_PRI_121_Field is STM32_SVD.UInt2; subtype IPR3_PRI_122_Field is STM32_SVD.UInt2; subtype IPR3_PRI_123_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 3 type IPR3_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_120 PRI_120 : IPR3_PRI_120_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_121 PRI_121 : IPR3_PRI_121_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_122 PRI_122 : IPR3_PRI_122_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_123 PRI_123 : IPR3_PRI_123_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR3_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_120 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_121 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_122 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_123 at 0 range 30 .. 31; end record; subtype IPR4_PRI_160_Field is STM32_SVD.UInt2; subtype IPR4_PRI_161_Field is STM32_SVD.UInt2; subtype IPR4_PRI_162_Field is STM32_SVD.UInt2; subtype IPR4_PRI_163_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 4 type IPR4_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_160 PRI_160 : IPR4_PRI_160_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_161 PRI_161 : IPR4_PRI_161_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_162 PRI_162 : IPR4_PRI_162_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_163 PRI_163 : IPR4_PRI_163_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR4_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_160 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_161 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_162 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_163 at 0 range 30 .. 31; end record; subtype IPR5_PRI_200_Field is STM32_SVD.UInt2; subtype IPR5_PRI_201_Field is STM32_SVD.UInt2; subtype IPR5_PRI_202_Field is STM32_SVD.UInt2; subtype IPR5_PRI_203_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 5 type IPR5_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_200 PRI_200 : IPR5_PRI_200_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_201 PRI_201 : IPR5_PRI_201_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_202 PRI_202 : IPR5_PRI_202_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_203 PRI_203 : IPR5_PRI_203_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR5_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_200 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_201 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_202 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_203 at 0 range 30 .. 31; end record; subtype IPR6_PRI_240_Field is STM32_SVD.UInt2; subtype IPR6_PRI_241_Field is STM32_SVD.UInt2; subtype IPR6_PRI_242_Field is STM32_SVD.UInt2; subtype IPR6_PRI_243_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 6 type IPR6_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_240 PRI_240 : IPR6_PRI_240_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_241 PRI_241 : IPR6_PRI_241_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_242 PRI_242 : IPR6_PRI_242_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_243 PRI_243 : IPR6_PRI_243_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR6_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_240 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_241 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_242 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_243 at 0 range 30 .. 31; end record; subtype IPR7_PRI_280_Field is STM32_SVD.UInt2; subtype IPR7_PRI_281_Field is STM32_SVD.UInt2; subtype IPR7_PRI_282_Field is STM32_SVD.UInt2; subtype IPR7_PRI_283_Field is STM32_SVD.UInt2; -- Interrupt Priority Register 7 type IPR7_Register is record -- unspecified Reserved_0_5 : STM32_SVD.UInt6 := 16#0#; -- PRI_280 PRI_280 : IPR7_PRI_280_Field := 16#0#; -- unspecified Reserved_8_13 : STM32_SVD.UInt6 := 16#0#; -- PRI_281 PRI_281 : IPR7_PRI_281_Field := 16#0#; -- unspecified Reserved_16_21 : STM32_SVD.UInt6 := 16#0#; -- PRI_282 PRI_282 : IPR7_PRI_282_Field := 16#0#; -- unspecified Reserved_24_29 : STM32_SVD.UInt6 := 16#0#; -- PRI_283 PRI_283 : IPR7_PRI_283_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IPR7_Register use record Reserved_0_5 at 0 range 0 .. 5; PRI_280 at 0 range 6 .. 7; Reserved_8_13 at 0 range 8 .. 13; PRI_281 at 0 range 14 .. 15; Reserved_16_21 at 0 range 16 .. 21; PRI_282 at 0 range 22 .. 23; Reserved_24_29 at 0 range 24 .. 29; PRI_283 at 0 range 30 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Nested Vectored Interrupt Controller type NVIC_Peripheral is record -- Interrupt Set Enable Register ISER : aliased STM32_SVD.UInt32; -- Interrupt Clear Enable Register ICER : aliased STM32_SVD.UInt32; -- Interrupt Set-Pending Register ISPR : aliased STM32_SVD.UInt32; -- Interrupt Clear-Pending Register ICPR : aliased STM32_SVD.UInt32; -- Interrupt Priority Register 0 IPR0 : aliased IPR0_Register; -- Interrupt Priority Register 1 IPR1 : aliased IPR1_Register; -- Interrupt Priority Register 2 IPR2 : aliased IPR2_Register; -- Interrupt Priority Register 3 IPR3 : aliased IPR3_Register; -- Interrupt Priority Register 4 IPR4 : aliased IPR4_Register; -- Interrupt Priority Register 5 IPR5 : aliased IPR5_Register; -- Interrupt Priority Register 6 IPR6 : aliased IPR6_Register; -- Interrupt Priority Register 7 IPR7 : aliased IPR7_Register; end record with Volatile; for NVIC_Peripheral use record ISER at 16#0# range 0 .. 31; ICER at 16#80# range 0 .. 31; ISPR at 16#100# range 0 .. 31; ICPR at 16#180# range 0 .. 31; IPR0 at 16#300# range 0 .. 31; IPR1 at 16#304# range 0 .. 31; IPR2 at 16#308# range 0 .. 31; IPR3 at 16#30C# range 0 .. 31; IPR4 at 16#310# range 0 .. 31; IPR5 at 16#314# range 0 .. 31; IPR6 at 16#318# range 0 .. 31; IPR7 at 16#31C# range 0 .. 31; end record; -- Nested Vectored Interrupt Controller NVIC_Periph : aliased NVIC_Peripheral with Import, Address => System'To_Address (16#E000E100#); end STM32_SVD.NVIC;
with Ada.Text_IO; with Ada.Text_IO.Text_Streams; procedure Goodbye_World is stdout: Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output; begin String'Write(Ada.Text_IO.Text_Streams.Stream(stdout), "Goodbye World"); end Goodbye_World;
with Littlefs; package RAM_BD is function Create (Size : Littlefs.LFS_Size) return access constant Littlefs.LFS_Config; end RAM_BD;
with Ada.Text_IO; procedure part1 is type Index is range 0 .. 200; type Cell is range 0 .. 9; type Row is array (Index) of Cell; type Grid is array (Index) of Row; type RowResult is record parsedRow: Row; width: Integer; end record; type GridResult is record parsedGrid: Grid; width: Integer; height: Integer; end record; procedure writeln(n: integer) is str : String := Integer'Image(n); begin Ada.Text_IO.Put_Line(str); end writeln; function parseCell(chr: Character) return Cell is begin return Cell(Character'Pos(chr) - 48); end parseCell; function readln return RowResult is line: String(1 .. 200) := (others => ' '); len: integer; resultRow: Row; result: RowResult; begin Ada.Text_IO.Get_Line(line, len); for i in 1 .. len loop resultRow(Index(i)) := parseCell(line(i)); end loop; result := (resultRow, len); return result; end readln; function readg return GridResult is line: RowResult; width: Integer; height: Integer := 0; the_grid: Grid; result: GridResult; begin line := readln; while line.width /= 0 loop height := height + 1; width := line.width; the_grid(Index(height)) := line.parsedRow; line := readln; end loop; result := (the_grid, width, height); return result; end readg; function e(the_grid: Grid; x: Integer; y: Integer) return Integer is begin return Integer(the_grid(Index(y))(Index(x))); end; grid_result: GridResult; the_grid: Grid; width: Integer; height: Integer; risk: Integer := 0; value: Integer; begin grid_result := readg; the_grid := grid_result.parsedGrid; width := grid_result.width; height := grid_result.height; for x in 1 .. width loop for y in 1 .. height loop value := e(the_grid, x, y); if (x = 1 or value < e(the_grid, x - 1, y)) and (x = width or value < e(the_grid, x + 1, y)) and (y = 1 or value < e(the_grid, x, y - 1)) and (y = height or value < e(the_grid, x, y + 1)) then risk := risk + value + 1; end if; end loop; end loop; writeln(risk); end part1;
----------------------------------------------------------------------- -- ado-schemas-tests -- Test loading of database schema -- Copyright (C) 2009 - 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- 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.Vectors; with Util.Strings.Transforms; with ADO.Parameters; with ADO.Schemas.Databases; with ADO.Sessions.Sources; with ADO.Sessions.Entities; with ADO.Schemas.Entities; with Regtests; with Regtests.Audits.Model; with Regtests.Simple.Model; package body ADO.Schemas.Tests is use Util.Tests; function To_Lower_Case (S : in String) return String renames Util.Strings.Transforms.To_Lower_Case; package Caller is new Util.Test_Caller (Test, "ADO.Schemas"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test ADO.Schemas.Entities.Find_Entity_Type", Test_Find_Entity_Type'Access); Caller.Add_Test (Suite, "Test ADO.Schemas.Entities.Find_Entity_Type (error)", Test_Find_Entity_Type_Error'Access); Caller.Add_Test (Suite, "Test ADO.Sessions.Load_Schema", Test_Load_Schema'Access); Caller.Add_Test (Suite, "Test ADO.Schemas.Get_Table", Test_Table_Iterator'Access); Caller.Add_Test (Suite, "Test ADO.Schemas.Get_Table (Empty schema)", Test_Empty_Schema'Access); Caller.Add_Test (Suite, "Test ADO.Schemas.Databases.Create_Database", Test_Create_Schema'Access); end Add_Tests; -- ------------------------------ -- Test reading the entity cache and the Find_Entity_Type operation -- ------------------------------ procedure Test_Find_Entity_Type (T : in out Test) is S : ADO.Sessions.Session := Regtests.Get_Database; C : ADO.Schemas.Entities.Entity_Cache; begin ADO.Schemas.Entities.Initialize (Cache => C, Session => S); declare T4 : constant ADO.Entity_Type := Entities.Find_Entity_Type (Cache => C, Table => Regtests.Simple.Model.ALLOCATE_TABLE); T5 : constant ADO.Entity_Type := Entities.Find_Entity_Type (Cache => C, Table => Regtests.Simple.Model.USER_TABLE); T1 : constant ADO.Entity_Type := Sessions.Entities.Find_Entity_Type (Session => S, Table => Regtests.Audits.Model.AUDIT_TABLE); T2 : constant ADO.Entity_Type := Sessions.Entities.Find_Entity_Type (Session => S, Table => Regtests.Audits.Model.EMAIL_TABLE); T3 : constant ADO.Entity_Type := Sessions.Entities.Find_Entity_Type (Session => S, Name => "audit_property"); begin T.Assert (T1 > 0, "T1 must be positive"); T.Assert (T2 > 0, "T2 must be positive"); T.Assert (T3 > 0, "T3 must be positive"); T.Assert (T4 > 0, "T4 must be positive"); T.Assert (T5 > 0, "T5 must be positive"); T.Assert (T1 /= T2, "Two distinct tables have different entity types (T1, T2)"); T.Assert (T2 /= T3, "Two distinct tables have different entity types (T2, T3)"); T.Assert (T3 /= T4, "Two distinct tables have different entity types (T3, T4)"); T.Assert (T4 /= T5, "Two distinct tables have different entity types (T4, T5)"); T.Assert (T5 /= T1, "Two distinct tables have different entity types (T5, T1)"); end; end Test_Find_Entity_Type; -- ------------------------------ -- Test calling Find_Entity_Type with an invalid table. -- ------------------------------ procedure Test_Find_Entity_Type_Error (T : in out Test) is C : ADO.Schemas.Entities.Entity_Cache; begin declare R : ADO.Entity_Type; pragma Unreferenced (R); begin R := Entities.Find_Entity_Type (Cache => C, Table => Regtests.Simple.Model.USER_TABLE); T.Assert (False, "Find_Entity_Type did not raise the No_Entity_Type exception"); exception when ADO.Schemas.Entities.No_Entity_Type => null; end; declare P : ADO.Parameters.Parameter := ADO.Parameters.Parameter'(T => ADO.Parameters.T_INTEGER, Num => 0, Len => 0, Value_Len => 0, Position => 0, Name => ""); begin P := C.Expand ("something"); T.Assert (False, "Expand did not raise the No_Entity_Type exception"); exception when ADO.Schemas.Entities.No_Entity_Type => null; end; end Test_Find_Entity_Type_Error; -- ------------------------------ -- Test the Load_Schema operation and check the result schema. -- ------------------------------ procedure Test_Load_Schema (T : in out Test) is S : constant ADO.Sessions.Session := Regtests.Get_Database; Schema : Schema_Definition; Table : Table_Definition; begin S.Load_Schema (Schema); Table := ADO.Schemas.Find_Table (Schema, "allocate"); T.Assert (Table /= null, "Table schema for test_allocate not found"); Assert_Equals (T, "allocate", Get_Name (Table)); declare C : Column_Cursor := Get_Columns (Table); Nb_Columns : Integer := 0; begin while Has_Element (C) loop Nb_Columns := Nb_Columns + 1; Next (C); end loop; Assert_Equals (T, 3, Nb_Columns, "Invalid number of columns"); end; declare C : constant Column_Definition := Find_Column (Table, "ID"); begin T.Assert (C /= null, "Cannot find column 'id' in table schema"); Assert_Equals (T, "id", To_Lower_Case (Get_Name (C)), "Invalid column name"); T.Assert (Get_Type (C) = T_LONG_INTEGER, "Invalid column type"); T.Assert (not Is_Null (C), "Column is null"); T.Assert (Is_Primary (C), "Column must be a primary key"); end; declare C : constant Column_Definition := Find_Column (Table, "NAME"); begin T.Assert (C /= null, "Cannot find column 'NAME' in table schema"); Assert_Equals (T, "name", To_Lower_Case (Get_Name (C)), "Invalid column name"); T.Assert (Get_Type (C) = T_VARCHAR, "Invalid column type"); T.Assert (Is_Null (C), "Column is null"); T.Assert (not Is_Primary (C), "Column must not be a primary key"); Assert_Equals (T, 255, Get_Size (C), "Column has invalid size"); end; declare C : constant Column_Definition := Find_Column (Table, "version"); begin T.Assert (C /= null, "Cannot find column 'version' in table schema"); Assert_Equals (T, "version", To_Lower_Case (Get_Name (C)), "Invalid column name"); T.Assert (Get_Type (C) = T_INTEGER, "Invalid column type"); T.Assert (not Is_Null (C), "Column is null"); end; declare C : constant Column_Definition := Find_Column (Table, "this_column_does_not_exist"); begin T.Assert (C = null, "Find_Column must return null for an unknown column"); end; end Test_Load_Schema; -- ------------------------------ -- Test the Table_Cursor operations and check the result schema. -- ------------------------------ procedure Test_Table_Iterator (T : in out Test) is S : constant ADO.Sessions.Session := Regtests.Get_Database; Schema : Schema_Definition; Table : Table_Definition; Driver : constant String := S.Get_Driver.Get_Driver_Name; begin S.Load_Schema (Schema); declare Iter : Table_Cursor := Schema.Get_Tables; Count : Natural := 0; begin T.Assert (Has_Element (Iter), "The Get_Tables returns an empty iterator"); while Has_Element (Iter) loop Table := Element (Iter); T.Assert (Table /= null, "Element function must not return null"); declare Col_Iter : Column_Cursor := Get_Columns (Table); begin -- T.Assert (Has_Element (Col_Iter), "Table has a column"); while Has_Element (Col_Iter) loop T.Assert (Element (Col_Iter) /= null, "Element function must not return null"); Next (Col_Iter); end loop; end; Count := Count + 1; Next (Iter); end loop; if Driver = "sqlite" then Util.Tests.Assert_Equals (T, 11, Count, "Invalid number of tables found in the schema"); elsif Driver = "mysql" then Util.Tests.Assert_Equals (T, 11, Count, "Invalid number of tables found in the schema"); elsif Driver = "postgresql" then Util.Tests.Assert_Equals (T, 11, Count, "Invalid number of tables found in the schema"); end if; end; end Test_Table_Iterator; -- ------------------------------ -- Test the Table_Cursor operations on an empty schema. -- ------------------------------ procedure Test_Empty_Schema (T : in out Test) is Schema : Schema_Definition; Iter : constant Table_Cursor := Schema.Get_Tables; begin T.Assert (not Has_Element (Iter), "The Get_Tables must return an empty iterator"); T.Assert (Schema.Find_Table ("test") = null, "The Find_Table must return null"); end Test_Empty_Schema; -- ------------------------------ -- Test the creation of database. -- ------------------------------ procedure Test_Create_Schema (T : in out Test) is use ADO.Sessions.Sources; Msg : Util.Strings.Vectors.Vector; Cfg : Data_Source := Data_Source (Regtests.Get_Controller); Driver : constant String := Cfg.Get_Driver; Database : constant String := Cfg.Get_Database; Path : constant String := "db/regtests/" & Cfg.Get_Driver & "/create-ado-" & Driver & ".sql"; pragma Unreferenced (Msg); begin if Driver = "sqlite" then if Ada.Directories.Exists (Database & ".test") then Ada.Directories.Delete_File (Database & ".test"); end if; Cfg.Set_Database (Database & ".test"); ADO.Schemas.Databases.Create_Database (Admin => Cfg, Config => Cfg, Schema_Path => Path, Messages => Msg); T.Assert (Ada.Directories.Exists (Database & ".test"), "The sqlite database was not created"); else ADO.Schemas.Databases.Create_Database (Admin => Cfg, Config => Cfg, Schema_Path => Path, Messages => Msg); end if; end Test_Create_Schema; end ADO.Schemas.Tests;
-- -*- Mode: Ada -*- -- Filename : multiboot.ads -- Description : Provides access to the multiboot information from GRUB -- Legacy and GRUB 2. -- Author : Luke A. Guest -- Created On : Fri Jun 15 14:43:04 2012 -- Licence : See LICENCE in the root directory. with System; with Interfaces; use Interfaces; package Multiboot is subtype Magic_Values is Unsigned_32; Magic_Value : constant Magic_Values := 16#2BAD_B002#; type MB_Info; ---------------------------------------------------------------------------- -- Multiboot information. ---------------------------------------------------------------------------- type Features is record Memory : Boolean; -- Bit 0 Boot_Device : Boolean; -- Bit 1 Command_Line : Boolean; -- Bit 2 Modules : Boolean; -- Bit 3 Symbol_Table : Boolean; -- Bit 4 - this is Aout only. Section_Header_Table : Boolean; -- Bit 5 - this is ELF only. BIOS_Memory_Map : Boolean; -- Bit 6 Drives : Boolean; -- Bit 7 ROM_Configuration : Boolean; -- Bit 8 Boot_Loader : Boolean; -- Bit 9 APM_Table : Boolean; -- Bit 10 Graphics_Table : Boolean; -- Bit 11 end record; for Features use record Memory at 0 range 0 .. 0; Boot_Device at 0 range 1 .. 1; Command_Line at 0 range 2 .. 2; Modules at 0 range 3 .. 3; Symbol_Table at 0 range 4 .. 4; Section_Header_Table at 0 range 5 .. 5; BIOS_Memory_Map at 0 range 6 .. 6; Drives at 0 range 7 .. 7; ROM_Configuration at 1 range 0 .. 0; Boot_Loader at 1 range 1 .. 1; APM_Table at 1 range 2 .. 2; Graphics_Table at 1 range 3 .. 3; end record; for Features'Size use 32; ---------------------------------------------------------------------------- -- Boot device information. ---------------------------------------------------------------------------- type Boot_Devices is record Drive : Unsigned_8; Partition_1 : Unsigned_8; Partition_2 : Unsigned_8; Partition_3 : Unsigned_8; end record; for Boot_Devices use record Drive at 0 range 0 .. 7; Partition_1 at 1 range 0 .. 7; Partition_2 at 2 range 0 .. 7; Partition_3 at 3 range 0 .. 7; end record; for Boot_Devices'Size use 32; Invalid_Partition : constant Unsigned_8 := 16#ff#; ---------------------------------------------------------------------------- -- Memory information. -- These values are in KB ---------------------------------------------------------------------------- type Memory_Info is record Upper : Unsigned_32; Lower : Unsigned_32; end record; pragma Convention (C, Memory_Info); ---------------------------------------------------------------------------- -- Loadable module information. ---------------------------------------------------------------------------- type Modules is record First : System.Address; -- Address of module start .. end. Last : System.Address; Data : System.Address; -- NULL terminated C string. Reserved : Unsigned_32; -- Should be 0. end record; type Modules_Array is array (Natural range <>) of Modules; pragma Convention (C, Modules_Array); -- type Modules_Array_Access is access Modules_Array; -- pragma Convention (C, Modules_Array_Access); type Modules_Info is record Count : Unsigned_32; First : System.Address; end record; ---------------------------------------------------------------------------- -- Symbols information. ---------------------------------------------------------------------------- pragma Convention (C, Modules_Info); type Symbols_Variant is (Aout, ELF); function Get_Symbols_Variant return Symbols_Variant; ---------------------------------------------------------------------------- -- a.out symbols or ELF sections -- -- TODO: a.out only - This can be implemented by anyone who wants to use -- aout. -- -- From what I can tell from the spec, Addr points to a size followed by -- an array of a.out nlist structures. This is then followed by a size -- of a set of strings, then the sizeof (unsigned), then the strings -- (NULL terminated). -- -- Table_Size and String_Size are the same as the ones listed above. ---------------------------------------------------------------------------- type Symbols (Variant : Symbols_Variant := ELF) is record case Variant is when Aout => Table_Size : Unsigned_32; String_Size : Unsigned_32; Aout_Addr : System.Address; Reserved : Unsigned_32; -- Always 0. when ELF => Number : Unsigned_32; Size : Unsigned_32; ELF_Addr : System.Address; Shndx : Unsigned_32; end case; end record; pragma Convention (C, Symbols); pragma Unchecked_Union (Symbols); ---------------------------------------------------------------------------- -- Memory map information. ---------------------------------------------------------------------------- type Memory_Type is range Unsigned_32'First .. Unsigned_32'Last; for Memory_Type'Size use 32; Memory_Available : constant Memory_Type := 1; Memory_Reserved : constant Memory_Type := 2; type Memory_Map_Entry is record Size : Unsigned_32; Base_Address : Long_Long_Integer; Length_In_Bytes : Long_Long_Integer; Sort : Memory_Type; end record; type Memory_Map_Entry_Access is access Memory_Map_Entry; type Memory_Map_Info is record Length : Unsigned_32; Addr : Unsigned_32; end record; pragma Convention (C, Memory_Map_Info); ---------------------------------------------------------------------------- -- Returns null on failure or if the memory map doesn't exist. ---------------------------------------------------------------------------- function First_Memory_Map_Entry return Memory_Map_Entry_Access; ---------------------------------------------------------------------------- -- Returns null on failure or if we have seen all of the memory map. ---------------------------------------------------------------------------- function Next_Memory_Map_Entry (Current : Memory_Map_Entry_Access) return Memory_Map_Entry_Access; ---------------------------------------------------------------------------- -- Drives information. -- TODO: Complete ---------------------------------------------------------------------------- type Drives_Info is record Length : Unsigned_32; Addr : Unsigned_32; end record; pragma Convention (C, Drives_Info); ---------------------------------------------------------------------------- -- APM table. ---------------------------------------------------------------------------- type APM_Table is record Version : Unsigned_16; C_Seg : Unsigned_16; Offset : Unsigned_32; C_Seg_16 : Unsigned_16; D_Seg : Unsigned_16; Flags : Unsigned_16; C_Seg_Length : Unsigned_16; C_Seg_16_Length : Unsigned_16; D_Seg_Length : Unsigned_16; end record; pragma Convention (C, APM_Table); type APM_Table_Access is access APM_Table; function Get_APM_Table return APM_Table_Access; ---------------------------------------------------------------------------- -- Graphics information. ---------------------------------------------------------------------------- type VBE_Info is record Control_Info : Unsigned_32; Mode_Info : Unsigned_32; Mode : Unsigned_32; Interface_Seg : Unsigned_32; Interface_Off : Unsigned_32; Interface_Len : Unsigned_32; end record; pragma Convention (C, VBE_Info); type MB_Info is record Flags : Features; Memory : Memory_Info; Boot_Device : Boot_Devices; Cmd_Line : System.Address; -- NULL terminated C string. Modules : Modules_Info; Syms : Symbols; Memory_Map : Memory_Map_Info; Drives : Drives_Info; Config_Table : System.Address; -- TODO: Points to BIOS table. Boot_Loader_Name : System.Address; -- NULL terminated C string. APM : System.Address; VBE : VBE_Info; end record; pragma Convention (C, MB_Info); -- We need to import the "mbd" symbol... Info_Address : constant Unsigned_32; pragma Import (Assembly, Info_Address, "mbd"); Info : constant MB_Info; -- So we can use the address stored at that location. for Info'Address use System'To_Address (Info_Address); pragma Volatile (Info); pragma Import (C, Info); ---------------------------------------------------------------------------- -- Magic number. ---------------------------------------------------------------------------- Magic : constant Magic_Values; pragma Import (Assembly, Magic, "magic"); end Multiboot;
with Ada.Containers.Vectors; with Ada.IO_Exceptions; package body Memory is package IO is new Ada.Text_IO.Integer_IO(Value); function Read_Comma_Separated( From: File_Type := Standard_Input) return Block is package Vec is new Ada.Containers.Vectors( Index_type => Address, Element_Type => Value); V: Vec.Vector := Vec.Empty_Vector; Curr: Value; Comma: Character; begin loop IO.Get(From, Curr); V.Append(Curr); exit when Ada.Text_IO.End_Of_File(From); Ada.Text_IO.Get(From, Comma); if Comma /= ',' then raise Ada.IO_Exceptions.Data_Error; end if; end loop; declare Result: Block(V.First_Index .. V.Last_Index); begin for Addr in Result'Range loop Result(Addr) := V(Addr); end loop; return Result; end; end Read_Comma_Separated; end Memory;
----------------------------------------------------------------------- -- css-tools-messages -- CSS tools messages -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- 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.Unchecked_Deallocation; package body CSS.Tools.Messages is -- ------------------------------ -- Get the number of errors collected. -- ------------------------------ function Get_Error_Count (Handler : in Message_List) return Natural is begin return Handler.Error_Count; end Get_Error_Count; -- ------------------------------ -- Get the number of warnings collected. -- ------------------------------ function Get_Warning_Count (Handler : in Message_List) return Natural is begin return Handler.Warning_Count; end Get_Warning_Count; -- ------------------------------ -- Add a message for the given source location. -- ------------------------------ procedure Add (Handler : in out Message_List; Loc : in CSS.Core.Location; Message : in Message_Type_Access) is Pos : constant Message_Sets.Cursor := Handler.List.Find (Loc); begin if Message.Kind = MSG_ERROR then Handler.Error_Count := Handler.Error_Count + 1; elsif Message.Kind = MSG_WARNING then Handler.Warning_Count := Handler.Warning_Count + 1; end if; if Message_Sets.Has_Element (Pos) then Message_Sets.Element (Pos).Next := Message; else Handler.List.Insert (Loc, Message); end if; end Add; -- ------------------------------ -- Report an error message at the given CSS source position. -- ------------------------------ overriding procedure Error (Handler : in out Message_List; Loc : in CSS.Core.Location; Message : in String) is Msg : constant Message_Type_Access := new Message_Type '(Len => Message'Length, Kind => MSG_ERROR, Next => null, Message => Message); begin Handler.Add (Loc, Msg); end Error; -- ------------------------------ -- Report a warning message at the given CSS source position. -- ------------------------------ overriding procedure Warning (Handler : in out Message_List; Loc : in CSS.Core.Location; Message : in String) is Msg : constant Message_Type_Access := new Message_Type '(Len => Message'Length, Kind => MSG_WARNING, Next => null, Message => Message); begin Handler.Add (Loc, Msg); end Warning; -- ------------------------------ -- Iterate over the list of message in the line order. -- ------------------------------ procedure Iterate (List : in Message_List; Process : not null access procedure (Severity : in Severity_Type; Loc : in CSS.Core.Location; Message : in String)) is Iter : Message_Sets.Cursor := List.List.First; begin while Message_Sets.Has_Element (Iter) loop declare Loc : CSS.Core.Location := Message_Sets.Key (Iter); Msg : Message_Type_Access := Message_Sets.Element (Iter); begin while Msg /= null loop Process (Msg.Kind, Loc, Msg.Message); Msg := Msg.Next; end loop; end; Message_Sets.Next (Iter); end loop; end Iterate; -- ------------------------------ -- Release the list of messages. -- ------------------------------ overriding procedure Finalize (List : in out Message_List) is procedure Free is new Ada.Unchecked_Deallocation (Message_Type, Message_Type_Access); begin while not List.List.Is_Empty loop declare Iter : Message_Sets.Cursor := List.List.First; Msg : Message_Type_Access := Message_Sets.Element (Iter); Next : Message_Type_Access; begin while Msg /= null loop Next := Msg.Next; Free (Msg); Msg := Next; end loop; List.List.Delete (Iter); end; end loop; end Finalize; end CSS.Tools.Messages;
with Protypo.Api.Engine_Values.Engine_Value_Vectors; use Protypo.Api.Engine_Values.Engine_Value_Vectors; with Protypo.Api.Engine_Values.Parameter_Lists; use Protypo.Api.Engine_Values.Parameter_Lists; package Protypo.Api.Engine_Values.Handlers is type Array_Interface is interface; type Array_Interface_Access is access all Array_Interface'Class; function Get (X : Array_Interface; Index : Engine_Value_vectors.Vector) return Handler_Value is abstract with Post'Class => Get'Result.Class in Handler_Classes; function Create (Val : Array_Interface_Access) return Engine_Value with Post => Create'Result.Class = Array_Handler; Out_Of_Range : exception; type Record_Interface is interface; type Record_Interface_Access is access all Record_Interface'Class; function Is_Field (X : Record_Interface; Field : Id) return Boolean is abstract; function Get (X : Record_Interface; Field : Id) return Handler_Value is abstract with Post'Class => Get'Result.Class in Handler_Classes; Unknown_Field : exception; function Create (Val : Record_Interface_Access) return Engine_Value with Post => Create'Result.Class = Record_Handler; type Ambivalent_Interface is interface and Record_Interface and Array_Interface; type Ambivalent_Interface_Access is access all Ambivalent_Interface'Class; function Create (Val : Ambivalent_Interface_Access) return Engine_Value with Post => Create'Result.Class = Ambivalent_Handler; type Constant_Interface is interface; type Constant_Interface_Access is access all Constant_Interface'Class; function Read (X : Constant_Interface) return Engine_Value is abstract; function Create (Val : Constant_Interface_Access) return Engine_Value with Post => Create'Result.Class = Constant_Handler; type Reference_Interface is interface and Constant_Interface; type Reference_Interface_Access is access all Reference_Interface'Class; procedure Write (What : Reference_Interface; Value : Engine_Value) is abstract; function Create (Val : Reference_Interface_Access) return Engine_Value with Post => Create'Result.Class = Reference_Handler; type Iterator_Interface is limited interface; type Iterator_Interface_Access is access all Iterator_Interface'Class; procedure Reset (Iter : in out Iterator_Interface) is abstract; procedure Next (Iter : in out Iterator_Interface) is abstract with Pre'Class => not Iter.End_Of_Iteration; function End_Of_Iteration (Iter : Iterator_Interface) return Boolean is abstract; function Element (Iter : Iterator_Interface) return Handler_Value is abstract with Pre'Class => not Iter.End_Of_Iteration; function Create (Val : Iterator_Interface_Access) return Engine_Value with Post => Create'Result.Class = Iterator; type Function_Interface is interface; type Function_Interface_Access is access all Function_Interface'Class; function Process (Fun : Function_Interface; Parameter : Engine_Value_vectors.Vector) return Engine_Value_Vectors.Vector is abstract; function Signature (Fun : Function_Interface) return Parameter_Signature is abstract with Post'Class => Parameter_Lists.Is_Valid_Parameter_Signature (Signature'Result); function Create (Val : Function_Interface_Access) return Engine_Value with Post => Create'Result.Class = Function_Handler; type Callback_Function_Access is not null access function (Parameters : Engine_Value_vectors.Vector) return Engine_Value_Vectors.Vector; function Create (Val : Callback_Function_Access; Min_Parameters : Natural; Max_Parameters : Natural; With_Varargin : Boolean := False) return Engine_Value with Pre => Max_Parameters >= Min_Parameters, Post => Create'Result.Class = Function_Handler; function Create (Val : Callback_Function_Access; N_Parameters : Natural := 1) return Engine_Value with Post => Create'Result.Class = Function_Handler; function Get_Array (Val : Array_Value) return Array_Interface_Access; function Get_Record (Val : Record_Value) return Record_Interface_Access; function Get_Ambivalent (Val : Ambivalent_Value) return Ambivalent_Interface_Access; function Get_Iterator (Val : Iterator_Value) return Iterator_Interface_Access; function Get_Function (Val : Function_Value) return Function_Interface_Access; function Get_Reference (Val : Reference_Value) return Reference_Interface_Access; function Get_Constant (Val : Constant_Value) return Constant_Interface_Access; function Force_Handler (Item : Engine_Value) return Handler_Value with Pre => Item.Class /= Void and Item.Class /= Iterator; -- Take any Engine_Value (but Void and Iterator) and embed it -- (if necessary) into a Constant handler value. If Item is -- already a handler, just return Item. private type Callback_Based_Handler is new Function_Interface with record Callback : Callback_Function_Access; Min_Parameters : Natural; Max_Parameters : Natural; With_Varargin : Boolean; end record; function Process (Fun : Callback_Based_Handler; Parameter : Engine_Value_vectors.Vector) return Engine_Value_vectors.Vector is (Fun.Callback (Parameter)); function Signature (Fun : Callback_Based_Handler) return Parameter_Signature; -- is (Engine_Value_Array(2..Fun.N_Parameters+1)'(others => Void_Value)); end Protypo.Api.Engine_Values.Handlers;
-- MIT License -- -- Copyright (c) 2021 Glen Cornell <glen.m.cornell@gmail.com> -- -- 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 Interfaces.C; with Sockets.Can_Frame; with GNAT.OS_Lib; package Sockets.Can_Thin is pragma Preelaborate; use type Interfaces.C.Size_T; -- kernel socket address structure redefined here for CAN subtype data_array is Interfaces.C.char_array (0 .. 125); type kernel_sockaddr_storage is record ss_family : aliased Interfaces.C.unsigned_short; -- address family data : aliased data_array; -- implementation-specific field end record; -- transport protocol class address information (e.g. ISOTP) type Can_Addr_Type is record rx_id : aliased Can_Frame.Can_Id_Type; tx_id : aliased Can_Frame.Can_Id_Type; end record; -- the sockaddr structure for CAN sockets type sockaddr_can is record can_family : aliased Interfaces.C.Unsigned_Short; -- address family number AF_CAN. can_ifindex : aliased Interfaces.C.Unsigned; -- CAN network interface index. can_addr : aliased Can_Addr_Type; -- protocol specific address information end record; -- From /usr/include/net/if.h: IFNAMSIZ : constant := 16; subtype Ifr_Name_Array is Interfaces.C.char_array (0 .. IFNAMSIZ - 1); -- struct ifreq is much more complicated than presented below. It -- is a collection of unions used for various protocols. Since we -- are limiting use of this structure to CANbus interfaces, we -- have the liberty to declutter the unions and limit the -- representation of the structure to just the CAN-specfic data -- items. Also, we will be only using the structure for finding -- the interface by name. Use this at your own risk! type Ifreq is record Ifr_Name : Ifr_Name_Array; -- Interface name, e.g. "can0" Ifr_Index : Interfaces.C.Unsigned; -- Interface index Unused : Interfaces.C.Char_Array (1 .. 20); -- NOT USED end record; -- Use the POSIX.1 if_nametoindex() call to access the interface index: -- NOTE: OS limits ifname to IFNAMSIZ function If_Nametoindex (Ifname : Interfaces.C.Char_Array) return Interfaces.C.Unsigned; function Socket_Errno return Integer renames GNAT.OS_Lib.Errno; -- Returns last socket error number function Socket_Error_Message (Errno : Integer) return String; -- Returns the error message string for the error number Errno. If Errno is -- not known, returns "Unknown system error". private pragma Convention (C_Pass_By_Copy, Kernel_Sockaddr_Storage); pragma Convention (C_Pass_By_Copy, Can_Addr_Type); pragma Convention (C_Pass_By_Copy, Sockaddr_Can); pragma Convention (C_Pass_By_Copy, Ifreq); for Ifreq'Size use 320; for Ifreq use record Ifr_Name at 0 range 0 .. 127; Ifr_Index at 16 range 0 .. 31; Unused at 20 range 0 .. 159; end record; pragma Import (C, If_Nametoindex, "if_nametoindex"); end Sockets.Can_Thin;
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- with Configs; package Config_Tables is procedure Init; -- Allocate a new associative array. procedure Insert (Config : in Configs.Config_Access); -- Insert a new record into the array. Return TRUE if successful. -- Prior data with the same key is NOT overwritten. function Find (Config : in Configs.Config_Access) return Configs.Config_Access; -- Return a pointer to data assigned to the given key. Return NULL -- if no such key. procedure Clear; -- Remove all data from the table. Pass each data to the function "f" -- as it is removed. ("f" may be null to avoid this step.) end Config_Tables;
----------------------------------------------------------------------- -- package body Binary_Rank, routines for Marsaglia's Rank Test. -- Copyright (C) 1995-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. ------------------------------------------------------------------------------- package body Binary_Rank is -------------- -- Get_Rank -- -------------- procedure Get_Rank (r : in out Binary_Matrix; Max_Row : in Matrix_Index; Max_Col : in Matrix_Index; Rank : out Integer) is tmp : Vector; j : Matrix_Index := Max_Col; -- essential init. i : Matrix_Index := Matrix_Index'First; -- essential init. ----------------------------- -- Vector_has_a_1_at_Index -- ----------------------------- function Vector_has_a_1_at_Index (j : Matrix_Index; V : Vector) return Boolean is Result : Boolean := False; Segment_id : Segments; Bit_id : Matrix_Index; begin Segment_id := 1 + (j-1) / Bits_per_Segment; Bit_id := 1 + (j-1) - (Segment_id-1) * Bits_per_Segment; if (V(Segment_id) AND Bit_is_1_at(Bit_id)) > 0 then Result := True; end if; return Result; end; begin Rank := 0; <<Reduce_Matrix_Rank_by_1>> -- Start at row i, the current row. -- Find row ii = i, i+1, ... that has a 1 in column j. -- Then move this row to position i. (Swap ii with i.) -- Reduce rank of matrix by 1 (by xor'ing row(i) with succeeding rows). -- Increment i, Decrement j. -- Repeat until no more i's or j's left. Row_Finder: for ii in i .. Max_Row loop if Vector_has_a_1_at_Index (j, r(ii)) then Rank := Rank + 1; if i /= ii then tmp := r(ii); r(ii) := r(i); r(i) := tmp; end if; for k in i+1 .. Max_Row loop if Vector_has_a_1_at_Index (j, r(k)) then for Seg_id in Segments loop r(k)(Seg_id) := r(k)(Seg_id) XOR r(i)(Seg_id); end loop; end if; end loop; if i = Max_Row then return; end if; i := i + 1; if j = Matrix_Index'First then return; end if; j := j - 1; goto Reduce_Matrix_Rank_by_1; end if; end loop Row_Finder; -- ii loop if j = Matrix_Index'First then return; end if; j := j - 1; goto Reduce_Matrix_Rank_by_1; end Get_Rank; end Binary_Rank;
------------------------------------------------------------------------------ -- Copyright (c) 2014-2019, Natacha Porté -- -- -- -- Permission to use, copy, modify, and 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 Natools.S_Expressions.Atom_Ref_Constructors; with Natools.S_Expressions.Enumeration_IO; with Natools.S_Expressions.File_Readers; with Natools.S_Expressions.Interpreter_Loop; with Natools.S_Expressions.Templates.Dates; with Natools.Static_Maps.Web.Simple_Pages; with Natools.Web.Error_Pages; with Natools.Web.Exchanges; with Natools.Web.Fallback_Render; package body Natools.Web.Simple_Pages is package Template_Components is type Enum is (Unknown, Comment_List, Comment_Path_Prefix, Comment_Path_Suffix, Comments, Elements); package IO is new Natools.S_Expressions.Enumeration_IO.Typed_IO (Enum); end Template_Components; Expiration_Date_Key : constant S_Expressions.Atom := S_Expressions.To_Atom ("!expire"); Publication_Date_Key : constant S_Expressions.Atom := S_Expressions.To_Atom ("!publish"); procedure Append (Exchange : in out Sites.Exchange; Page : in Page_Data; Data : in S_Expressions.Atom); function Comment_Path_Override (Template : in Page_Template; Override : in S_Expressions.Lockable.Descriptor'Class) return S_Expressions.Atom_Refs.Immutable_Reference; procedure Execute (Data : in out Page_Data; Context : in Page_Template; Name : in S_Expressions.Atom; Arguments : in out S_Expressions.Lockable.Descriptor'Class); procedure Render (Exchange : in out Sites.Exchange; Page : in Page_Data; Name : in S_Expressions.Atom; Arguments : in out S_Expressions.Lockable.Descriptor'Class); procedure Set_Component (Object : in out Page_Template; Context : in Meaningless_Type; Name : in S_Expressions.Atom; Arguments : in out S_Expressions.Lockable.Descriptor'Class); procedure Read_Page is new S_Expressions.Interpreter_Loop (Page_Data, Page_Template, Execute); procedure Render_Page is new S_Expressions.Interpreter_Loop (Sites.Exchange, Page_Data, Render, Append); procedure Update_Template is new S_Expressions.Interpreter_Loop (Page_Template, Meaningless_Type, Set_Component); --------------------------- -- Page Data Constructor -- --------------------------- procedure Execute (Data : in out Page_Data; Context : in Page_Template; Name : in S_Expressions.Atom; Arguments : in out S_Expressions.Lockable.Descriptor'Class) is package Components renames Natools.Static_Maps.Web.Simple_Pages; begin case Components.To_Component (S_Expressions.To_String (Name)) is when Components.Error => Log (Severities.Error, "Unknown page component """ & S_Expressions.To_String (Name) & '"'); when Components.Comment_List => if Context.Comments.Is_Empty then Data.Comment_List.Set (Arguments); else declare Template : S_Expressions.Caches.Cursor := Context.Comments.Value; begin Data.Comment_List.Set (Template, Arguments, Comment_Path_Override (Context, Arguments)); end; end if; when Components.Dates => Containers.Set_Dates (Data.Dates, Arguments); when Components.Elements => Containers.Add_Expressions (Data.Elements, Arguments); when Components.Maps => Data.Maps := String_Tables.Create (Arguments); when Components.Tags => Tags.Append (Data.Tags, Arguments); end case; end Execute; ------------------- -- Page Renderer -- ------------------- procedure Append (Exchange : in out Sites.Exchange; Page : in Page_Data; Data : in S_Expressions.Atom) is pragma Unreferenced (Page); begin Exchange.Append (Data); end Append; procedure Render (Exchange : in out Sites.Exchange; Page : in Page_Data; Name : in S_Expressions.Atom; Arguments : in out S_Expressions.Lockable.Descriptor'Class) is use type S_Expressions.Events.Event; procedure Re_Enter (Exchange : in out Sites.Exchange; Expression : in out S_Expressions.Lockable.Descriptor'Class); procedure Render_Date (Log_Error : in Boolean); procedure Re_Enter (Exchange : in out Sites.Exchange; Expression : in out S_Expressions.Lockable.Descriptor'Class) is begin Render_Page (Expression, Exchange, Page); end Re_Enter; procedure Render_Date (Log_Error : in Boolean) is begin if Arguments.Current_Event = S_Expressions.Events.Add_Atom then declare Cursor : constant Containers.Date_Maps.Cursor := Page.Dates.Find (Arguments.Current_Atom); begin if not Containers.Date_Maps.Has_Element (Cursor) then if Log_Error then Log (Severities.Error, "Unable to find date """ & S_Expressions.To_String (Arguments.Current_Atom) & """ in page date map"); end if; return; end if; Arguments.Next; declare Item : constant Containers.Date := Containers.Date_Maps.Element (Cursor); begin S_Expressions.Templates.Dates.Render (Exchange, Arguments, Item.Time, Item.Offset); end; end; end if; end Render_Date; package Commands renames Natools.Static_Maps.Web.Simple_Pages; begin case Commands.To_Command (S_Expressions.To_String (Name)) is when Commands.Unknown_Command => Fallback_Render (Exchange, Name, Arguments, "simple page", Re_Enter'Access, Page.Elements); when Commands.Comment_List => Comments.Render (Exchange, Page.Comment_List, Arguments); when Commands.Date => Render_Date (True); when Commands.My_Tags => if Arguments.Current_Event = S_Expressions.Events.Add_Atom then declare Prefix : constant S_Expressions.Atom := Arguments.Current_Atom; begin Arguments.Next; Tags.Render (Exchange, Page.Tags, Exchange.Site.Get_Tags, Prefix, Arguments); end; end if; when Commands.If_No_Date => if Arguments.Current_Event = S_Expressions.Events.Add_Atom and then not Page.Dates.Contains (Arguments.Current_Atom) then Arguments.Next; Render_Page (Arguments, Exchange, Page); end if; when Commands.Maps => String_Tables.Render (Exchange, Page.Maps, Arguments); when Commands.Optional_Date => Render_Date (False); when Commands.Path => Exchange.Append (Page.Web_Path.Query); when Commands.Tags => Tags.Render (Exchange, Exchange.Site.Get_Tags, Arguments, Page.Tags); end case; end Render; ------------------------- -- Page_Data Interface -- ------------------------- not overriding procedure Get_Element (Data : in Page_Data; Name : in S_Expressions.Atom; Element : out S_Expressions.Caches.Cursor; Found : out Boolean) is Cursor : constant Containers.Expression_Maps.Cursor := Data.Elements.Find (Name); begin Found := Containers.Expression_Maps.Has_Element (Cursor); if Found then Element := Containers.Expression_Maps.Element (Cursor); end if; end Get_Element; ----------------------------- -- Page_Template Interface -- ----------------------------- function Comment_Path_Override (Template : in Page_Template; Override : in S_Expressions.Lockable.Descriptor'Class) return S_Expressions.Atom_Refs.Immutable_Reference is use type S_Expressions.Atom; use type S_Expressions.Events.Event; Name_Override : constant Boolean := Override.Current_Event = S_Expressions.Events.Add_Atom; Name : constant S_Expressions.Atom := (if Name_Override then Override.Current_Atom elsif not Template.Name.Is_Empty then Template.Name.Query else S_Expressions.Null_Atom); begin if Template.Comment_Path_Prefix.Is_Empty or else (not Name_Override and then Template.Name.Is_Empty) then return S_Expressions.Atom_Refs.Null_Immutable_Reference; else return S_Expressions.Atom_Ref_Constructors.Create (Template.Comment_Path_Prefix.Query & Name & (if Template.Comment_Path_Suffix.Is_Empty then S_Expressions.Null_Atom else Template.Comment_Path_Suffix.Query)); end if; end Comment_Path_Override; procedure Set_Comments (Object : in out Page_Template; Expression : in out S_Expressions.Lockable.Descriptor'Class) is begin Object.Comments := (Is_Empty => False, Value => S_Expressions.Caches.Conditional_Move (Expression)); end Set_Comments; procedure Set_Comment_Path_Prefix (Object : in out Page_Template; Prefix : in S_Expressions.Atom) is begin if Prefix'Length > 0 then Object.Comment_Path_Prefix := S_Expressions.Atom_Ref_Constructors.Create (Prefix); else Object.Comment_Path_Prefix.Reset; end if; end Set_Comment_Path_Prefix; procedure Set_Comment_Path_Suffix (Object : in out Page_Template; Suffix : in S_Expressions.Atom) is begin if Suffix'Length > 0 then Object.Comment_Path_Suffix := S_Expressions.Atom_Ref_Constructors.Create (Suffix); else Object.Comment_Path_Suffix.Reset; end if; end Set_Comment_Path_Suffix; procedure Set_Component (Object : in out Page_Template; Name : in S_Expressions.Atom; Arguments : in out S_Expressions.Lockable.Descriptor'Class; Known_Component : out Boolean) is use type S_Expressions.Events.Event; begin Known_Component := True; case Template_Components.IO.Value (Name, Template_Components.Unknown) is when Template_Components.Unknown => Known_Component := False; when Template_Components.Comment_List | Template_Components.Comments => Set_Comments (Object, Arguments); when Template_Components.Comment_Path_Prefix => Set_Comment_Path_Prefix (Object, (if Arguments.Current_Event = S_Expressions.Events.Add_Atom then Arguments.Current_Atom else S_Expressions.Null_Atom)); when Template_Components.Comment_Path_Suffix => Set_Comment_Path_Suffix (Object, (if Arguments.Current_Event = S_Expressions.Events.Add_Atom then Arguments.Current_Atom else S_Expressions.Null_Atom)); when Template_Components.Elements => Set_Elements (Object, Arguments); end case; end Set_Component; procedure Set_Component (Object : in out Page_Template; Context : in Meaningless_Type; Name : in S_Expressions.Atom; Arguments : in out S_Expressions.Lockable.Descriptor'Class) is pragma Unreferenced (Context); Known_Component : Boolean; begin Set_Component (Object, Name, Arguments, Known_Component); if not Known_Component then Log (Severities.Error, "Unknown simple page template component """ & S_Expressions.To_String (Name) & '"'); end if; end Set_Component; procedure Set_Elements (Object : in out Page_Template; Expression : in out S_Expressions.Lockable.Descriptor'Class) is begin Containers.Set_Expressions (Object.Elements, Expression); end Set_Elements; procedure Update (Object : in out Page_Template; Expression : in out S_Expressions.Lockable.Descriptor'Class) is begin Update_Template (Expression, Object, Meaningless_Value); end Update; ---------------------- -- Public Interface -- ---------------------- function Create (Expression : in out S_Expressions.Lockable.Descriptor'Class; Template : in Page_Template := Default_Template; Name : in S_Expressions.Atom := S_Expressions.Null_Atom) return Page_Ref is Page : constant Data_Refs.Data_Access := new Page_Data; Result : constant Page_Ref := (Ref => Data_Refs.Create (Page)); Actual_Template : Page_Template := Template; begin Actual_Template.Name := (if Name'Length > 0 then S_Expressions.Atom_Ref_Constructors.Create (Name) else S_Expressions.Atom_Refs.Null_Immutable_Reference); Page.Self := Tags.Visible_Access (Page); Page.Elements := Template.Elements; Read_Page (Expression, Page.all, Actual_Template); return Result; end Create; function Create (File_Path, Web_Path : in S_Expressions.Atom_Refs.Immutable_Reference; Template : in Page_Template := Default_Template; Name : in S_Expressions.Atom := S_Expressions.Null_Atom) return Page_Ref is Page : constant Data_Refs.Data_Access := new Page_Data' (File_Path => File_Path, Web_Path => Web_Path, Elements => Template.Elements, Tags => <>, Self => null, Comment_List | Dates | Maps => <>); Result : constant Page_Ref := (Ref => Data_Refs.Create (Page)); Actual_Template : Page_Template := Template; begin Page.Self := Tags.Visible_Access (Page); Actual_Template.Name := (if Name'Length > 0 then S_Expressions.Atom_Ref_Constructors.Create (Name) else S_Expressions.Atom_Refs.Null_Immutable_Reference); Create_Page : declare Reader : Natools.S_Expressions.File_Readers.S_Reader := Natools.S_Expressions.File_Readers.Reader (S_Expressions.To_String (File_Path.Query)); begin Read_Page (Reader, Page.all, Actual_Template); end Create_Page; return Result; end Create; procedure Get_Lifetime (Page : in Page_Ref; Publication : out Ada.Calendar.Time; Has_Publication : out Boolean; Expiration : out Ada.Calendar.Time; Has_Expiration : out Boolean) is Accessor : constant Data_Refs.Accessor := Page.Ref.Query; Cursor : Containers.Date_Maps.Cursor; begin Cursor := Accessor.Dates.Find (Expiration_Date_Key); if Containers.Date_Maps.Has_Element (Cursor) then Has_Expiration := True; Expiration := Containers.Date_Maps.Element (Cursor).Time; else Has_Expiration := False; end if; Cursor := Accessor.Dates.Find (Publication_Date_Key); if Containers.Date_Maps.Has_Element (Cursor) then Has_Publication := True; Publication := Containers.Date_Maps.Element (Cursor).Time; else Has_Publication := False; end if; end Get_Lifetime; procedure Register (Page : in Page_Ref; Builder : in out Sites.Site_Builder; Path : in S_Expressions.Atom) is begin Time_Check : declare use type Ada.Calendar.Time; Now : constant Ada.Calendar.Time := Ada.Calendar.Clock; Publication : Ada.Calendar.Time; Has_Publication : Boolean; Expiration : Ada.Calendar.Time; Has_Expiration : Boolean; begin Get_Lifetime (Page, Publication, Has_Publication, Expiration, Has_Expiration); if Has_Publication and then Publication >= Now then Sites.Expire_At (Builder, Publication); return; end if; if Has_Expiration then if Expiration < Now then return; else Sites.Expire_At (Builder, Expiration); end if; end if; end Time_Check; if Path'Length > 0 then Sites.Insert (Builder, Path, Page); end if; Sites.Insert (Builder, Page.Get_Tags, Page); Load_Comments : declare Mutator : constant Data_Refs.Mutator := Page.Ref.Update; begin Mutator.Comment_List.Load (Builder, Mutator.Self, Mutator.Web_Path); end Load_Comments; end Register; overriding procedure Render (Exchange : in out Sites.Exchange; Object : in Page_Ref; Expression : in out S_Expressions.Lockable.Descriptor'Class) is begin Render_Page (Expression, Exchange, Object.Ref.Query.Data.all); end Render; overriding procedure Render (Exchange : in out Sites.Exchange; Object : in Page_Data; Expression : in out S_Expressions.Lockable.Descriptor'Class) is begin Render_Page (Expression, Exchange, Object); end Render; overriding procedure Respond (Object : in out Page_Ref; Exchange : in out Sites.Exchange; Extra_Path : in S_Expressions.Atom) is use type S_Expressions.Offset; begin if Extra_Path'Length = 9 and then S_Expressions.To_String (Extra_Path) = "/comments" then Object.Ref.Update.Comment_List.Respond (Exchange, Extra_Path (Extra_Path'First + 9 .. Extra_Path'Last)); return; end if; if Extra_Path'Length > 0 then return; end if; declare Accessor : constant Data_Refs.Accessor := Object.Ref.Query; Expression : S_Expressions.Caches.Cursor; begin Check_Method : declare use Exchanges; Allowed : Boolean; begin Error_Pages.Check_Method (Exchange, (GET, HEAD), Allowed); if not Allowed then return; end if; end Check_Method; Expression := Exchange.Site.Get_Template (Accessor.Data.Elements, Expression, Exchange.Site.Default_Template, Lookup_Element => True, Lookup_Template => True, Lookup_Name => True); Render_Page (Expression, Exchange, Accessor.Data.all); end; end Respond; ----------------------- -- Page Constructors -- ----------------------- function Create (File : in S_Expressions.Atom) return Sites.Page_Loader'Class is begin return Loader'(File_Path => S_Expressions.Atom_Ref_Constructors.Create (File)); end Create; overriding procedure Load (Object : in out Loader; Builder : in out Sites.Site_Builder; Path : in S_Expressions.Atom) is Page : constant Page_Ref := Create (Object.File_Path, S_Expressions.Atom_Ref_Constructors.Create (Path)); begin Register (Page, Builder, Path); end Load; procedure Register_Loader (Site : in out Sites.Site) is begin Site.Register ("simple-page", Create'Access); end Register_Loader; end Natools.Web.Simple_Pages;
-- reader1.c -- -- section: xmlReader -- synopsis: Parse an XML file with an xmlReader -- purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file -- and dump the informations about the nodes found in the process. -- (Note that the XMLReader functions require libxml2 version later -- than 2.6.) -- usage: reader1 <filename> -- test: reader1 test2.xml > reader1.tmp ; -- diff reader1.tmp reader1.res ; -- rm reader1.tmp -- author: Daniel Veillard -- copy: see Copyright for the status of this software. -- -- reader2.c -- -- section: xmlReader -- synopsis: Parse and validate an XML file with an xmlReader -- purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file -- validating the content in the process and activating options -- like entities substitution, and DTD attributes defaulting. -- (Note that the XMLReader functions require libxml2 version later -- than 2.6.) -- usage: reader2 <valid_xml_filename> -- test: reader2 test2.xml > reader1.tmp ; -- diff reader1.tmp reader1.res ; -- rm reader1.tmp -- author: Daniel Veillard -- copy: see Copyright for the status of this software. -- -- reader3.c -- -- section: xmlReader -- synopsis: Show how to extract subdocuments with xmlReader -- purpose: Demonstrate the use of xmlTextReaderPreservePattern() -- to parse an XML file with the xmlReader while collecting -- only some subparts of the document. -- (Note that the XMLReader functions require libxml2 version later -- than 2.6.) -- usage: reader3 -- test: reader3 > reader3.tmp ; -- diff reader3.tmp reader3.res ; -- rm reader3.tmp -- author: Daniel Veillard -- copy: see Copyright for the status of this software. -- -- reader4.c -- -- section: xmlReader -- synopsis: Parse multiple XML files reusing an xmlReader -- purpose: Demonstrate the use of xmlReaderForFile() and -- xmlReaderNewFile to parse XML files while reusing the reader object -- and parser context. (Note that the XMLReader functions require -- libxml2 version later than 2.6.) -- usage: reader4 <filename> [ filename ... ] -- test: reader4 test1.xml test2.xml test3.xml > reader4.tmp ; -- diff reader4.tmp reader4.res ; -- rm reader4.tmp -- author: Graham Bennett -- copy: see Copyright for the status of this software. -- -- Ada version by yt -- with Ada.Text_IO; with Ada.Unchecked_Conversion; with C.stdio; with C.stdlib; with C.string; with C.libxml.xmlreader; with C.libxml.parser; with C.libxml.xmlmemory; with C.libxml.xmlstring; with C.libxml.tree; with C.libxml.xmlversion; --pragma Compile_Time_Error ( -- not C.libxml.xmlversion.LIBXML_READER_ENABLED -- or else not C.libxml.xmlversion.LIBXML_PATTERN_ENABLED -- or else not C.libxml.xmlversion.LIBXML_OUTPUT_ENABLED, -- "Reader, Pattern or output support not compiled in"); procedure test_reader is pragma Linker_Options ("-lxml2"); use type C.char; use type C.char_array; use type C.signed_int; use type C.size_t; use type C.unsigned_int; use type C.libxml.tree.xmlDocPtr; use type C.libxml.xmlreader.xmlTextReaderPtr; use type C.libxml.xmlstring.xmlChar_const_ptr; function To_char_const_ptr is new Ada.Unchecked_Conversion ( C.libxml.xmlstring.xmlChar_const_ptr, C.char_const_ptr); function To_xmlChar_const_ptr is new Ada.Unchecked_Conversion ( C.char_const_ptr, C.libxml.xmlstring.xmlChar_const_ptr); Write_Mode : constant C.char_array := "w" & C.char'Val (0); stdout : access C.stdio.FILE; procedure fwrite ( ptr : not null access constant C.char; size : in C.size_t; nitems : in C.size_t; stream : access C.stdio.FILE) is Dummy_size_t : C.size_t; begin Dummy_size_t := C.stdio.fwrite ( C.void_const_ptr (ptr.all'Address), size, nitems, stream); end fwrite; procedure fputs ( s : not null access constant C.char; stream : access C.stdio.FILE) is Dummy_signed_int : C.signed_int; begin Dummy_signed_int := C.stdio.fputs (s, stream); end fputs; procedure fputs ( s : in C.char_array; stream : access C.stdio.FILE) is begin fputs (s (s'First)'Access, stream); end fputs; procedure fputd ( d : in C.signed_int; stream : access C.stdio.FILE) is s : C.char_array (0 .. 10); i : C.size_t := s'Last; r : C.signed_int := d; begin if r < 0 then fputs (' ' & C.char'Val (0), stream); r := -r; end if; s (i) := C.char'Val (0); loop i := i - 1; s (i) := C.char'Val (C.char'Pos ('0') + r rem 10); r := r / 10; exit when r = 0; end loop; fputs (s (i)'Access, stream); end fputd; procedure processNode_For_1_and_2 ( reader : C.libxml.xmlreader.xmlTextReaderPtr) is name, value : C.libxml.xmlstring.xmlChar_const_ptr; S1 : constant C.char_array := "--" & C.char'Val (0); begin name := C.libxml.xmlreader.xmlTextReaderConstName (reader); if name = null then name := To_xmlChar_const_ptr (S1 (S1'First)'Unchecked_Access); end if; value := C.libxml.xmlreader.xmlTextReaderConstValue (reader); fputd (C.libxml.xmlreader.xmlTextReaderDepth (reader), stdout); fputs (' ' & C.char'Val (0), stdout); fputd (C.libxml.xmlreader.xmlTextReaderNodeType (reader), stdout); fputs (' ' & C.char'Val (0), stdout); fputs (To_char_const_ptr (name), stdout); fputs (' ' & C.char'Val (0), stdout); fputd (C.libxml.xmlreader.xmlTextReaderIsEmptyElement (reader), stdout); fputs (' ' & C.char'Val (0), stdout); fputd (C.libxml.xmlreader.xmlTextReaderHasValue (reader), stdout); if value = null then fputs (C.char'Val (10) & C.char'Val (0), stdout); else if C.libxml.xmlstring.xmlStrlen (value) > 40 then fputs (' ' & C.char'Val (0), stdout); fwrite (To_char_const_ptr (value), 1, 40, stdout); fputs ("..." & C.char'Val (10) & C.char'Val (0), stdout); else fputs (' ' & C.char'Val (0), stdout); fputs (To_char_const_ptr (value), stdout); fputs (C.char'Val (10) & C.char'Val (0), stdout); end if; end if; end processNode_For_1_and_2; -- do as reader1.c procedure reader1 (argv1, output : in C.char_array) is -- processNode: -- @reader: the xmlReader -- -- Dump information about the current node procedure processNode (reader : C.libxml.xmlreader.xmlTextReaderPtr) renames processNode_For_1_and_2; -- streamFile: -- @filename: the file name to parse -- -- Parse and print information about an XML file. procedure streamFile (filename : access constant C.char) is reader : C.libxml.xmlreader.xmlTextReaderPtr; ret : C.signed_int; begin reader := C.libxml.xmlreader.xmlReaderForFile (filename, null, 0); if reader /= null then ret := C.libxml.xmlreader.xmlTextReaderRead (reader); while ret = 1 loop processNode (reader); ret := C.libxml.xmlreader.xmlTextReaderRead (reader); end loop; C.libxml.xmlreader.xmlFreeTextReader (reader); if ret /= 0 then fputs (filename, C.stdio.stderr); fputs ( " : failed to parse" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); end if; else fputs ("Unable to open " & C.char'Val (0), C.stdio.stderr); fputs (filename, C.stdio.stderr); fputs (C.char'Val (10) & C.char'Val (0), C.stdio.stderr); end if; end streamFile; Dummy_signed_int : C.signed_int; begin stdout := C.stdio.fopen ( output (output'First)'Access, Write_Mode (Write_Mode'First)'Access); streamFile (argv1 (argv1'First)'Access); Dummy_signed_int := C.stdio.fclose (stdout); end reader1; -- do as reader2.c procedure reader2 (argv1, output : in C.char_array) is -- processNode: -- @reader: the xmlReader -- -- Dump information about the current node procedure processNode (reader : C.libxml.xmlreader.xmlTextReaderPtr) renames processNode_For_1_and_2; -- streamFile: -- @filename: the file name to parse -- -- Parse, validate and print information about an XML file. procedure streamFile (filename : access constant C.char) is reader : C.libxml.xmlreader.xmlTextReaderPtr; ret : C.signed_int; begin -- Pass some special parsing options to activate DTD attribute defaulting, -- entities substitution and DTD validation reader := C.libxml.xmlreader.xmlReaderForFile ( filename, null, C.signed_int ( C.unsigned_int'( C.libxml.parser.xmlParserOption'Enum_Rep ( C.libxml.parser.XML_PARSE_DTDATTR) -- default DTD attributes or C.libxml.parser.xmlParserOption'Enum_Rep ( C.libxml.parser.XML_PARSE_NOENT) -- substitute entities or C.libxml.parser.xmlParserOption'Enum_Rep ( C.libxml.parser.XML_PARSE_DTDVALID)))); -- validate with the DTD if reader /= null then ret := C.libxml.xmlreader.xmlTextReaderRead (reader); while ret = 1 loop processNode (reader); ret := C.libxml.xmlreader.xmlTextReaderRead (reader); end loop; -- Once the document has been fully parsed check the validation results if C.libxml.xmlreader.xmlTextReaderIsValid (reader) /= 1 then fputs ("Document " & C.char'Val (0), C.stdio.stderr); fputs (filename, C.stdio.stderr); fputs ( " does not validate" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); end if; C.libxml.xmlreader.xmlFreeTextReader (reader); if ret /= 0 then fputs (filename, C.stdio.stderr); fputs ( " : failed to parse" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); end if; else fputs ("Unable to open " & C.char'Val (0), C.stdio.stderr); fputs (filename, C.stdio.stderr); fputs (C.char'Val (10) & C.char'Val (0), C.stdio.stderr); end if; end streamFile; Dummy_signed_int : C.signed_int; begin stdout := C.stdio.fopen ( output (output'First)'Access, Write_Mode (Write_Mode'First)'Access); streamFile (argv1 (argv1'First)'Access); Dummy_signed_int := C.stdio.fclose (stdout); end reader2; -- do as reader3.c procedure reader3 (output : in C.char_array) is -- streamFile: -- @filename: the file name to parse -- -- Parse and print information about an XML file. -- -- Returns the resulting doc with just the elements preserved. function extractFile ( filename : access constant C.char; pattern : C.libxml.xmlstring.xmlChar_const_ptr) return C.libxml.tree.xmlDocPtr is doc : C.libxml.tree.xmlDocPtr; reader : C.libxml.xmlreader.xmlTextReaderPtr; ret : C.signed_int; begin -- build an xmlReader for that file reader := C.libxml.xmlreader.xmlReaderForFile (filename, null, 0); if reader /= null then -- add the pattern to preserve if C.libxml.xmlreader.xmlTextReaderPreservePattern ( reader, pattern, null) < 0 then fputs (filename, C.stdio.stderr); fputs ( " : failed add preserve pattern " & C.char'Val (0), C.stdio.stderr); fputs (To_char_const_ptr (pattern), C.stdio.stderr); fputs (C.char'Val (10) & C.char'Val (0), C.stdio.stderr); end if; -- Parse and traverse the tree, collecting the nodes in the process ret := C.libxml.xmlreader.xmlTextReaderRead (reader); while ret = 1 loop ret := C.libxml.xmlreader.xmlTextReaderRead (reader); end loop; if ret /= 0 then fputs (filename, C.stdio.stderr); fputs ( " : failed to parse" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); C.libxml.xmlreader.xmlFreeTextReader (reader); return null; end if; -- get the resulting nodes doc := C.libxml.xmlreader.xmlTextReaderCurrentDoc (reader); -- Free up the reader C.libxml.xmlreader.xmlFreeTextReader (reader); else fputs ("Unable to open " & C.char'Val (0), C.stdio.stderr); fputs (filename, C.stdio.stderr); fputs (C.char'Val (10) & C.char'Val (0), C.stdio.stderr); return null; end if; return doc; end extractFile; filename : constant C.char_array := "test3.xml" & C.char'Val (0); pattern : constant C.char_array := "preserved" & C.char'Val (0); doc : C.libxml.tree.xmlDocPtr; Dummy_signed_int : C.signed_int; begin stdout := C.stdio.fopen ( output (output'First)'Access, Write_Mode (Write_Mode'First)'Access); doc := extractFile ( filename (filename'First)'Access, To_xmlChar_const_ptr (pattern (pattern'First)'Unchecked_Access)); if doc /= null then -- ouptut the result. Dummy_signed_int := C.libxml.tree.xmlDocDump (stdout, doc); -- don't forget to free up the doc C.libxml.tree.xmlFreeDoc (doc); end if; Dummy_signed_int := C.stdio.fclose (stdout); end reader3; -- do as reader4.c procedure reader4 (argv1, argv2, argv3, output : in C.char_array) is procedure processDoc (readerPtr : C.libxml.xmlreader.xmlTextReaderPtr) is ret : C.signed_int; docPtr : C.libxml.tree.xmlDocPtr; URL : C.libxml.xmlstring.xmlChar_const_ptr; begin ret := C.libxml.xmlreader.xmlTextReaderRead (readerPtr); while ret = 1 loop ret := C.libxml.xmlreader.xmlTextReaderRead (readerPtr); end loop; -- One can obtain the document pointer to get insteresting -- information about the document like the URL, but one must also -- be sure to clean it up at the end (see below). docPtr := C.libxml.xmlreader.xmlTextReaderCurrentDoc (readerPtr); if null = docPtr then fputs ( "failed to obtain document" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); return; end if; URL := docPtr.URL; if null = URL then fputs (To_char_const_ptr (URL), C.stdio.stderr); fputs ( ": Failed to obtain URL" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); end if; if ret /= 0 then fputs (To_char_const_ptr (URL), C.stdio.stderr); fputs ( " : failed to parse" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); return; end if; fputs (To_char_const_ptr (URL), stdout); fputs (": Processed ok" & C.char'Val (10) & C.char'Val (0), stdout); end processDoc; readerPtr : C.libxml.xmlreader.xmlTextReaderPtr; docPtr : C.libxml.tree.xmlDocPtr; Dummy_signed_int : C.signed_int; begin stdout := C.stdio.fopen ( output (output'First)'Access, Write_Mode (Write_Mode'First)'Access); -- Create a new reader for the first file and process the document. readerPtr := C.libxml.xmlreader.xmlReaderForFile (argv1 (argv1'First)'Access, null, 0); if null = readerPtr then fputs (argv1, C.stdio.stderr); fputs ( ": failed to create reader" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); raise Program_Error; end if; processDoc (readerPtr); -- The reader can be reused for subsequent files. for i in 2 .. 3 loop declare argv_i : access constant C.char; begin case i is when 2 => argv_i := argv2 (argv2'First)'Access; when 3 => argv_i := argv3 (argv3'First)'Access; end case; if C.libxml.xmlreader.xmlReaderNewFile (readerPtr, argv_i, null, 0) < 0 then raise Program_Error; end if; if null = readerPtr then fputs (argv_i, C.stdio.stderr); fputs ( ": failed to create reader" & C.char'Val (10) & C.char'Val (0), C.stdio.stderr); raise Program_Error; end if; processDoc (readerPtr); end; end loop; -- Since we've called xmlTextReaderCurrentDoc, we now have to -- clean up after ourselves. We only have to do this the last -- time, because xmlReaderNewFile calls xmlCtxtReset which takes -- care of it. docPtr := C.libxml.xmlreader.xmlTextReaderCurrentDoc (readerPtr); if docPtr /= null then C.libxml.tree.xmlFreeDoc (docPtr); end if; -- Clean up the reader. C.libxml.xmlreader.xmlFreeTextReader (readerPtr); Dummy_signed_int := C.stdio.fclose (stdout); end reader4; begin -- this initialize the library and check potential ABI mismatches -- between the version it was compiled for and the actual shared -- library used. C.libxml.xmlversion.xmlCheckVersion (C.libxml.xmlversion.LIBXML_VERSION); Tests : declare Default_Temp : constant C.char_array (0 .. 4) := "/tmp" & C.char'Val (0); function Get_Temp return access constant C.char is TMPDIR : constant C.char_array (0 .. 6) := "TMPDIR" & C.char'Val (0); Temp : access constant C.char := C.stdlib.getenv (TMPDIR (0)'Access); begin if Temp = null or else Temp.all = C.char'Val (0) then Temp := Default_Temp (0)'Access; end if; return Temp; end Get_Temp; Temp : constant not null access constant C.char := Get_Temp; Dummy_char_ptr : C.char_ptr; begin declare argv1 : constant C.char_array := "test2.xml" & C.char'Val (0); output_Name : constant C.char_array := "/reader1.tmp" & C.char'Val (0); output : aliased C.char_array (0 .. C.string.strlen (Temp) + 256); begin Dummy_char_ptr := C.string.strcpy (output (0)'Access, Temp); Dummy_char_ptr := C.string.strcat (output (0)'Access, output_Name (0)'Access); reader1 (argv1, output); end; declare argv1 : constant C.char_array := "test2.xml" & C.char'Val (0); output_Name : constant C.char_array := "/reader2.tmp" & C.char'Val (0); output : aliased C.char_array (0 .. C.string.strlen (Temp) + 256); begin Dummy_char_ptr := C.string.strcpy (output (0)'Access, Temp); Dummy_char_ptr := C.string.strcat (output (0)'Access, output_Name (0)'Access); reader2 (argv1, output); end; declare output_Name : constant C.char_array := "/reader3.tmp" & C.char'Val (0); output : aliased C.char_array (0 .. C.string.strlen (Temp) + 256); begin Dummy_char_ptr := C.string.strcpy (output (0)'Access, Temp); Dummy_char_ptr := C.string.strcat (output (0)'Access, output_Name (0)'Access); reader3 (output); end; declare argv1 : constant C.char_array := "test1.xml" & C.char'Val (0); argv2 : constant C.char_array := "test2.xml" & C.char'Val (0); argv3 : constant C.char_array := "test3.xml" & C.char'Val (0); output_Name : constant C.char_array := "/reader4.tmp" & C.char'Val (0); output : aliased C.char_array (0 .. C.string.strlen (Temp) + 256); begin Dummy_char_ptr := C.string.strcpy (output (0)'Access, Temp); Dummy_char_ptr := C.string.strcat (output (0)'Access, output_Name (0)'Access); reader4 (argv1, argv2, argv3, output); end; end Tests; -- Cleanup function for the XML library. C.libxml.parser.xmlCleanupParser; -- this is to debug memory for regression tests C.libxml.xmlmemory.xmlMemoryDump; -- finish Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "ok"); end test_reader;
-- Copyright (c) 2018 RREE <rolf.ebert.gcc@gmx.de> -- -- 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 Ahven; use Ahven; with JSON.Parsers; with JSON.Streams; with JSON.Types; package body Test_Images is package Types is new JSON.Types (Long_Integer, Long_Float); package Parsers is new JSON.Parsers (Types); overriding procedure Initialize (T : in out Test) is begin T.Set_Name ("Images"); T.Add_Test_Routine (Test_True_Text'Access, "Image 'true'"); T.Add_Test_Routine (Test_False_Text'Access, "Image 'false'"); T.Add_Test_Routine (Test_Null_Text'Access, "Image 'null'"); T.Add_Test_Routine (Test_Escaped_Text'Access, "Image '""BS CR LF \ / HT""'"); T.Add_Test_Routine (Test_Empty_String_Text'Access, "Image '""""'"); T.Add_Test_Routine (Test_Non_Empty_String_Text'Access, "Image '""test""'"); T.Add_Test_Routine (Test_Number_String_Text'Access, "Image '""12.34""'"); T.Add_Test_Routine (Test_Integer_Number_Text'Access, "Image '42'"); T.Add_Test_Routine (Test_Empty_Array_Text'Access, "Image '[]'"); T.Add_Test_Routine (Test_One_Element_Array_Text'Access, "Image '[""test""]'"); T.Add_Test_Routine (Test_Multiple_Elements_Array_Text'Access, "Image '[3.14, true]'"); T.Add_Test_Routine (Test_Empty_Object_Text'Access, "Image '{}'"); T.Add_Test_Routine (Test_One_Member_Object_Text'Access, "Image '{""foo"":""bar""}'"); T.Add_Test_Routine (Test_Multiple_Members_Object_Text'Access, "Image '{""foo"":1,""bar"":2}'"); T.Add_Test_Routine (Test_Array_Object_Array'Access, "Image '[{""foo"":[true, 42]}]'"); T.Add_Test_Routine (Test_Object_Array_Object'Access, "Image '{""foo"":[null, {""bar"": 42}]}'"); end Initialize; use Types; procedure Test_True_Text is Text : aliased String := "true"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_True_Text; procedure Test_False_Text is Text : aliased String := "false"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_False_Text; procedure Test_Null_Text is Text : aliased String := "null"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Null_Text; procedure Test_Escaped_Text is Text : aliased String := """BS:\b LF:\n CR:\r \\ \/ HT:\t"""; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Escaped_Text; procedure Test_Empty_String_Text is Text : aliased String := """"""; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Empty_String_Text; procedure Test_Non_Empty_String_Text is Text : aliased String := """test"""; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Non_Empty_String_Text; procedure Test_Number_String_Text is Text : aliased String := """12.34"""; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Number_String_Text; procedure Test_Integer_Number_Text is Text : aliased String := "42"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Integer_Number_Text; procedure Test_Empty_Array_Text is Text : aliased String := "[]"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Empty_Array_Text; procedure Test_One_Element_Array_Text is Text : aliased String := "[""test""]"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_One_Element_Array_Text; procedure Test_Multiple_Elements_Array_Text is Text : aliased String := "[42,true]"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Multiple_Elements_Array_Text; procedure Test_Empty_Object_Text is Text : aliased String := "{}"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Empty_Object_Text; procedure Test_One_Member_Object_Text is Text : aliased String := "{""foo"":""bar""}"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_One_Member_Object_Text; procedure Test_Multiple_Members_Object_Text is Text : aliased String := "{""foo"":1,""bar"":2}"; Text2 : constant String := "{""bar"":2,""foo"":1}"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert ((Text = Image) or else (Text2 = Image), "Image '" & Image & "' is not '" & Text & "'"); end Test_Multiple_Members_Object_Text; procedure Test_Array_Object_Array is Text : aliased String := "[{""foo"":[true,42]}]"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Array_Object_Array; procedure Test_Object_Array_Object is Text : aliased String := "{""foo"":[null,{""bar"":42}]}"; Stream : JSON.Streams.Stream'Class := JSON.Streams.Create_Stream (Text'Access); Allocator : Types.Memory_Allocator; Value : constant JSON_Value := Parsers.Parse (Stream, Allocator); Image : constant String := Value.Image; begin Assert (Text = Image, "Image not '" & Text & "'"); end Test_Object_Array_Object; end Test_Images;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Numerics.Discrete_Random; procedure reversi is package Discrete_Random is new Ada.Numerics.Discrete_Random(Result_Subtype => Integer); use Discrete_Random; gen : Generator; etat : State; jeu : array (1..9) of Integer := (1, 2, 3, 4, 5, 6, 7, 8, 9); k, t : Integer; function est_trie return Boolean is begin for i in jeu'Range loop if jeu(i) /= i then return False; end if; end loop; return True; end est_trie; nb : Integer; essais : Integer; c : Character; begin Reset(gen); Save(gen, etat); loop Reset(gen, etat); for i in reverse jeu'Range loop k := (Random(gen) mod i) + 1; t := jeu(i); jeu(i) := jeu(k); jeu(k) := t; end loop; essais := 0; while not est_trie loop for i in jeu'Range loop Put(jeu(i), 2); end loop; New_Line; Put("> "); Get(nb); if nb not in jeu'Range then Put_Line("Le nombre doit être entre " & Integer'Image(jeu'First) & " et " & Integer'Image(jeu'Last)); else for i in 1..(nb / 2) loop t := jeu(i); jeu(i) := jeu(nb - i + 1); jeu(nb - i + 1) := t; end loop; end if; essais := essais + 1; end loop; Put_Line("Bravo ! Vous avez gagné en " & Integer'Image(essais) & " tours !"); Put("Voulez-vous réessayer sur la même configuration ? [O/N] "); Get(c); exit when c /= 'o' and c /= 'O'; end loop; end reversi;
----------------------------------------------------------------------- -- AWA.Counters.Models -- AWA.Counters.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- 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. ----------------------------------------------------------------------- pragma Warnings (Off); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with ADO.Queries; with ADO.Queries.Loaders; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Basic.Lists; with Util.Beans.Methods; pragma Warnings (On); package AWA.Counters.Models is pragma Style_Checks ("-mr"); type Counter_Ref is new ADO.Objects.Object_Ref with null record; type Counter_Definition_Ref is new ADO.Objects.Object_Ref with null record; type Visit_Ref is new ADO.Objects.Object_Ref with null record; -- Create an object key for Counter. function Counter_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Counter from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Counter_Key (Id : in String) return ADO.Objects.Object_Key; Null_Counter : constant Counter_Ref; function "=" (Left, Right : Counter_Ref'Class) return Boolean; -- Set the object associated with the counter. procedure Set_Object_Id (Object : in out Counter_Ref; Value : in ADO.Identifier); -- Get the object associated with the counter. function Get_Object_Id (Object : in Counter_Ref) return ADO.Identifier; -- Set the day associated with the counter. procedure Set_Date (Object : in out Counter_Ref; Value : in Ada.Calendar.Time); -- Get the day associated with the counter. function Get_Date (Object : in Counter_Ref) return Ada.Calendar.Time; -- Set the counter value. procedure Set_Counter (Object : in out Counter_Ref; Value : in Integer); -- Get the counter value. function Get_Counter (Object : in Counter_Ref) return Integer; -- Set the counter definition identifier. procedure Set_Definition_Id (Object : in out Counter_Ref; Value : in ADO.Identifier); -- Get the counter definition identifier. function Get_Definition_Id (Object : in Counter_Ref) return ADO.Identifier; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Counter_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Counter_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Counter_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Counter_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Counter_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Counter_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition COUNTER_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Counter_Ref); -- Copy of the object. procedure Copy (Object : in Counter_Ref; Into : in out Counter_Ref); -- -------------------- -- A counter definition defines what the counter represents. It uniquely identifies -- the counter for the Counter table. A counter may be associated with a database -- table. In that case, the counter definition has a relation to the corresponding Entity_Type. -- -------------------- -- Create an object key for Counter_Definition. function Counter_Definition_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Counter_Definition from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Counter_Definition_Key (Id : in String) return ADO.Objects.Object_Key; Null_Counter_Definition : constant Counter_Definition_Ref; function "=" (Left, Right : Counter_Definition_Ref'Class) return Boolean; -- Set the counter name. procedure Set_Name (Object : in out Counter_Definition_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Counter_Definition_Ref; Value : in String); -- Get the counter name. function Get_Name (Object : in Counter_Definition_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Counter_Definition_Ref) return String; -- Set the counter unique id. procedure Set_Id (Object : in out Counter_Definition_Ref; Value : in ADO.Identifier); -- Get the counter unique id. function Get_Id (Object : in Counter_Definition_Ref) return ADO.Identifier; -- Set the optional entity type that identifies the database table. procedure Set_Entity_Type (Object : in out Counter_Definition_Ref; Value : in ADO.Nullable_Entity_Type); -- Get the optional entity type that identifies the database table. function Get_Entity_Type (Object : in Counter_Definition_Ref) return ADO.Nullable_Entity_Type; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Counter_Definition_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Counter_Definition_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition COUNTER_DEFINITION_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Counter_Definition_Ref); -- Copy of the object. procedure Copy (Object : in Counter_Definition_Ref; Into : in out Counter_Definition_Ref); -- Create an object key for Visit. function Visit_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Visit from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Visit_Key (Id : in String) return ADO.Objects.Object_Key; Null_Visit : constant Visit_Ref; function "=" (Left, Right : Visit_Ref'Class) return Boolean; -- Set the entity identifier. procedure Set_Object_Id (Object : in out Visit_Ref; Value : in ADO.Identifier); -- Get the entity identifier. function Get_Object_Id (Object : in Visit_Ref) return ADO.Identifier; -- Set the number of times the entity was visited by the user. procedure Set_Counter (Object : in out Visit_Ref; Value : in Integer); -- Get the number of times the entity was visited by the user. function Get_Counter (Object : in Visit_Ref) return Integer; -- Set the date and time when the entity was last visited. procedure Set_Date (Object : in out Visit_Ref; Value : in Ada.Calendar.Time); -- Get the date and time when the entity was last visited. function Get_Date (Object : in Visit_Ref) return Ada.Calendar.Time; -- Set the user who visited the entity. procedure Set_User (Object : in out Visit_Ref; Value : in ADO.Identifier); -- Get the user who visited the entity. function Get_User (Object : in Visit_Ref) return ADO.Identifier; -- Set the counter definition identifier. procedure Set_Definition_Id (Object : in out Visit_Ref; Value : in ADO.Identifier); -- Get the counter definition identifier. function Get_Definition_Id (Object : in Visit_Ref) return ADO.Identifier; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Visit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Visit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Visit_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Visit_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Visit_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Visit_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition VISIT_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Visit_Ref); -- Copy of the object. procedure Copy (Object : in Visit_Ref; Into : in out Visit_Ref); package Visit_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Visit_Ref, "=" => "="); subtype Visit_Vector is Visit_Vectors.Vector; procedure List (Object : in out Visit_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class); -- -------------------- -- The month statistics. -- -------------------- type Stat_Info is new Util.Beans.Basic.Bean with record -- the counter date. Date : Ada.Calendar.Time; -- the counter value. Count : Natural; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Stat_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Stat_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Stat_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Stat_Info); package Stat_Info_Vectors renames Stat_Info_Beans.Vectors; subtype Stat_Info_List_Bean is Stat_Info_Beans.List_Bean; type Stat_Info_List_Bean_Access is access all Stat_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Stat_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Stat_Info_Vector is Stat_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Stat_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Counter_Update : constant ADO.Queries.Query_Definition_Access; Query_Counter_Update_Field : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The Stat_List_Bean is the bean that allows to retrieve the counter statistics -- for a given database entity and provide the values through a bean to the -- presentation layer.load the counters for the entity and the timeframe. -- -------------------- type Stat_List_Bean is abstract limited new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record -- the entity type name. Entity_Type : Ada.Strings.Unbounded.Unbounded_String; -- the first date. First_Date : Ada.Strings.Unbounded.Unbounded_String; -- the last date. Last_Date : Ada.Strings.Unbounded.Unbounded_String; -- the entity identifier. Entity_Id : ADO.Identifier; Counter_Name : Ada.Strings.Unbounded.Unbounded_String; Query_Name : Ada.Strings.Unbounded.Unbounded_String; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Stat_List_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Stat_List_Bean; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Stat_List_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Stat_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; private COUNTER_NAME : aliased constant String := "awa_counter"; COL_0_1_NAME : aliased constant String := "object_id"; COL_1_1_NAME : aliased constant String := "date"; COL_2_1_NAME : aliased constant String := "counter"; COL_3_1_NAME : aliased constant String := "definition_id"; COUNTER_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 4, Table => COUNTER_NAME'Access, Members => ( 1 => COL_0_1_NAME'Access, 2 => COL_1_1_NAME'Access, 3 => COL_2_1_NAME'Access, 4 => COL_3_1_NAME'Access) ); COUNTER_TABLE : constant ADO.Schemas.Class_Mapping_Access := COUNTER_DEF'Access; Null_Counter : constant Counter_Ref := Counter_Ref'(ADO.Objects.Object_Ref with null record); type Counter_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => COUNTER_DEF'Access) with record Object_Id : ADO.Identifier; Date : Ada.Calendar.Time; Counter : Integer; end record; type Counter_Access is access all Counter_Impl; overriding procedure Destroy (Object : access Counter_Impl); overriding procedure Find (Object : in out Counter_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Counter_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Counter_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Counter_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Counter_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Counter_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Counter_Ref'Class; Impl : out Counter_Access); COUNTER_DEFINITION_NAME : aliased constant String := "awa_counter_definition"; COL_0_2_NAME : aliased constant String := "name"; COL_1_2_NAME : aliased constant String := "id"; COL_2_2_NAME : aliased constant String := "entity_type"; COUNTER_DEFINITION_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 3, Table => COUNTER_DEFINITION_NAME'Access, Members => ( 1 => COL_0_2_NAME'Access, 2 => COL_1_2_NAME'Access, 3 => COL_2_2_NAME'Access) ); COUNTER_DEFINITION_TABLE : constant ADO.Schemas.Class_Mapping_Access := COUNTER_DEFINITION_DEF'Access; Null_Counter_Definition : constant Counter_Definition_Ref := Counter_Definition_Ref'(ADO.Objects.Object_Ref with null record); type Counter_Definition_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => COUNTER_DEFINITION_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; Entity_Type : ADO.Nullable_Entity_Type; end record; type Counter_Definition_Access is access all Counter_Definition_Impl; overriding procedure Destroy (Object : access Counter_Definition_Impl); overriding procedure Find (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Counter_Definition_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Counter_Definition_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Counter_Definition_Ref'Class; Impl : out Counter_Definition_Access); VISIT_NAME : aliased constant String := "awa_visit"; COL_0_3_NAME : aliased constant String := "object_id"; COL_1_3_NAME : aliased constant String := "counter"; COL_2_3_NAME : aliased constant String := "date"; COL_3_3_NAME : aliased constant String := "user"; COL_4_3_NAME : aliased constant String := "definition_id"; VISIT_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 5, Table => VISIT_NAME'Access, Members => ( 1 => COL_0_3_NAME'Access, 2 => COL_1_3_NAME'Access, 3 => COL_2_3_NAME'Access, 4 => COL_3_3_NAME'Access, 5 => COL_4_3_NAME'Access) ); VISIT_TABLE : constant ADO.Schemas.Class_Mapping_Access := VISIT_DEF'Access; Null_Visit : constant Visit_Ref := Visit_Ref'(ADO.Objects.Object_Ref with null record); type Visit_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => VISIT_DEF'Access) with record Object_Id : ADO.Identifier; Counter : Integer; Date : Ada.Calendar.Time; User : ADO.Identifier; end record; type Visit_Access is access all Visit_Impl; overriding procedure Destroy (Object : access Visit_Impl); overriding procedure Find (Object : in out Visit_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Visit_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Visit_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Visit_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Visit_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Visit_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Visit_Ref'Class; Impl : out Visit_Access); package File_1 is new ADO.Queries.Loaders.File (Path => "counter-update.xml", Sha1 => "6C157006E7A28699E1FE0E2CB571BACA2706E58D"); package Def_Statinfo_Counter_Update is new ADO.Queries.Loaders.Query (Name => "counter-update", File => File_1.File'Access); Query_Counter_Update : constant ADO.Queries.Query_Definition_Access := Def_Statinfo_Counter_Update.Query'Access; package Def_Statinfo_Counter_Update_Field is new ADO.Queries.Loaders.Query (Name => "counter-update-field", File => File_1.File'Access); Query_Counter_Update_Field : constant ADO.Queries.Query_Definition_Access := Def_Statinfo_Counter_Update_Field.Query'Access; end AWA.Counters.Models;
pragma Ada_2012; package body Line_Arrays.Classified is -------------- -- Classify -- -------------- function Classify (Classifier : Classifier_Type; Lines : Line_Array) return Classified_Line_Vectors.Vector is Result : Classified_Line_Vectors.Vector; begin Result.Clear; for Line of Lines loop declare C_Line : constant Classified_Line := Classify (Classifier, Line); begin if not Is_To_Be_Ignored (C_Line) then Result.Append (C_Line); end if; end; end loop; return Result; end Classify; end Line_Arrays.Classified;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P A R . P R A G -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001 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 2, 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 COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Generally the parser checks the basic syntax of pragmas, but does not -- do specialized syntax checks for individual pragmas, these are deferred -- to semantic analysis time (see unit Sem_Prag). There are some pragmas -- which require recognition and either partial or complete processing -- during parsing, and this unit performs this required processing. with Fname.UF; use Fname.UF; with Osint; use Osint; with Stringt; use Stringt; with Stylesw; use Stylesw; with Uintp; use Uintp; with Uname; use Uname; separate (Par) function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id is Pragma_Name : constant Name_Id := Chars (Pragma_Node); Pragma_Sloc : constant Source_Ptr := Sloc (Pragma_Node); Arg_Count : Nat; Arg_Node : Node_Id; ----------------------- -- Local Subprograms -- ----------------------- function Arg1 return Node_Id; function Arg2 return Node_Id; function Arg3 return Node_Id; function Arg4 return Node_Id; -- Obtain specified Pragma_Argument_Association. It is allowable to call -- the routine for the argument one past the last present argument, but -- that is the only case in which a non-present argument can be referenced. procedure Check_Arg_Count (Required : Int); -- Check argument count for pragma = Required. -- If not give error and raise Error_Resync. procedure Check_Arg_Is_String_Literal (Arg : Node_Id); -- Check the expression of the specified argument to make sure that it -- is a string literal. If not give error and raise Error_Resync. procedure Check_Arg_Is_On_Or_Off (Arg : Node_Id); -- Check the expression of the specified argument to make sure that it -- is an identifier which is either ON or OFF, and if not, then issue -- an error message and raise Error_Resync. procedure Check_No_Identifier (Arg : Node_Id); -- Checks that the given argument does not have an identifier. If an -- identifier is present, then an error message is issued, and -- Error_Resync is raised. procedure Check_Optional_Identifier (Arg : Node_Id; Id : Name_Id); -- Checks if the given argument has an identifier, and if so, requires -- it to match the given identifier name. If there is a non-matching -- identifier, then an error message is given and Error_Resync raised. procedure Check_Required_Identifier (Arg : Node_Id; Id : Name_Id); -- Same as Check_Optional_Identifier, except that the name is required -- to be present and to match the given Id value. ---------- -- Arg1 -- ---------- function Arg1 return Node_Id is begin return First (Pragma_Argument_Associations (Pragma_Node)); end Arg1; ---------- -- Arg2 -- ---------- function Arg2 return Node_Id is begin return Next (Arg1); end Arg2; ---------- -- Arg3 -- ---------- function Arg3 return Node_Id is begin return Next (Arg2); end Arg3; ---------- -- Arg4 -- ---------- function Arg4 return Node_Id is begin return Next (Arg3); end Arg4; --------------------- -- Check_Arg_Count -- --------------------- procedure Check_Arg_Count (Required : Int) is begin if Arg_Count /= Required then Error_Msg ("wrong number of arguments for pragma%", Pragma_Sloc); raise Error_Resync; end if; end Check_Arg_Count; ---------------------------- -- Check_Arg_Is_On_Or_Off -- ---------------------------- procedure Check_Arg_Is_On_Or_Off (Arg : Node_Id) is Argx : constant Node_Id := Expression (Arg); begin if Nkind (Expression (Arg)) /= N_Identifier or else (Chars (Argx) /= Name_On and then Chars (Argx) /= Name_Off) then Error_Msg_Name_2 := Name_On; Error_Msg_Name_3 := Name_Off; Error_Msg ("argument for pragma% must be% or%", Sloc (Argx)); raise Error_Resync; end if; end Check_Arg_Is_On_Or_Off; --------------------------------- -- Check_Arg_Is_String_Literal -- --------------------------------- procedure Check_Arg_Is_String_Literal (Arg : Node_Id) is begin if Nkind (Expression (Arg)) /= N_String_Literal then Error_Msg ("argument for pragma% must be string literal", Sloc (Expression (Arg))); raise Error_Resync; end if; end Check_Arg_Is_String_Literal; ------------------------- -- Check_No_Identifier -- ------------------------- procedure Check_No_Identifier (Arg : Node_Id) is begin if Chars (Arg) /= No_Name then Error_Msg_N ("pragma% does not permit named arguments", Arg); raise Error_Resync; end if; end Check_No_Identifier; ------------------------------- -- Check_Optional_Identifier -- ------------------------------- procedure Check_Optional_Identifier (Arg : Node_Id; Id : Name_Id) is begin if Present (Arg) and then Chars (Arg) /= No_Name then if Chars (Arg) /= Id then Error_Msg_Name_2 := Id; Error_Msg_N ("pragma% argument expects identifier%", Arg); end if; end if; end Check_Optional_Identifier; ------------------------------- -- Check_Required_Identifier -- ------------------------------- procedure Check_Required_Identifier (Arg : Node_Id; Id : Name_Id) is begin if Chars (Arg) /= Id then Error_Msg_Name_2 := Id; Error_Msg_N ("pragma% argument must have identifier%", Arg); end if; end Check_Required_Identifier; ---------- -- Prag -- ---------- begin Error_Msg_Name_1 := Pragma_Name; -- Count number of arguments. This loop also checks if any of the arguments -- are Error, indicating a syntax error as they were parsed. If so, we -- simply return, because we get into trouble with cascaded errors if we -- try to perform our error checks on junk arguments. Arg_Count := 0; if Present (Pragma_Argument_Associations (Pragma_Node)) then Arg_Node := Arg1; while Arg_Node /= Empty loop Arg_Count := Arg_Count + 1; if Expression (Arg_Node) = Error then return Error; end if; Next (Arg_Node); end loop; end if; -- Remaining processing is pragma dependent case Get_Pragma_Id (Pragma_Name) is ------------ -- Ada_83 -- ------------ -- This pragma must be processed at parse time, since we want to set -- the Ada 83 and Ada 95 switches properly at parse time to recognize -- Ada 83 syntax or Ada 95 syntax as appropriate. when Pragma_Ada_83 => Ada_83 := True; Ada_95 := False; ------------ -- Ada_95 -- ------------ -- This pragma must be processed at parse time, since we want to set -- the Ada 83 and Ada_95 switches properly at parse time to recognize -- Ada 83 syntax or Ada 95 syntax as appropriate. when Pragma_Ada_95 => Ada_83 := False; Ada_95 := True; ----------- -- Debug -- ----------- -- pragma Debug (PROCEDURE_CALL_STATEMENT); -- This has to be processed by the parser because of the very peculiar -- form of the second parameter, which is syntactically from a formal -- point of view a function call (since it must be an expression), but -- semantically we treat it as a procedure call (which has exactly the -- same syntactic form, so that's why we can get away with this!) when Pragma_Debug => Check_Arg_Count (1); Check_No_Identifier (Arg1); declare Expr : constant Node_Id := New_Copy (Expression (Arg1)); begin if Nkind (Expr) /= N_Indexed_Component and then Nkind (Expr) /= N_Function_Call and then Nkind (Expr) /= N_Identifier and then Nkind (Expr) /= N_Selected_Component then Error_Msg ("argument of pragma% is not procedure call", Sloc (Expr)); raise Error_Resync; else Set_Debug_Statement (Pragma_Node, P_Statement_Name (Expr)); end if; end; ------------------------------- -- Extensions_Allowed (GNAT) -- ------------------------------- -- pragma Extensions_Allowed (Off | On) -- The processing for pragma Extensions_Allowed must be done at -- parse time, since extensions mode may affect what is accepted. when Pragma_Extensions_Allowed => Check_Arg_Count (1); Check_No_Identifier (Arg1); Check_Arg_Is_On_Or_Off (Arg1); Opt.Extensions_Allowed := (Chars (Expression (Arg1)) = Name_On); ---------------- -- List (2.8) -- ---------------- -- pragma List (Off | On) -- The processing for pragma List must be done at parse time, -- since a listing can be generated in parse only mode. when Pragma_List => Check_Arg_Count (1); Check_No_Identifier (Arg1); Check_Arg_Is_On_Or_Off (Arg1); -- We unconditionally make a List_On entry for the pragma, so that -- in the List (Off) case, the pragma will print even in a region -- of code with listing turned off (this is required!) List_Pragmas.Increment_Last; List_Pragmas.Table (List_Pragmas.Last) := (Ptyp => List_On, Ploc => Sloc (Pragma_Node)); -- Now generate the list off entry for pragma List (Off) if Chars (Expression (Arg1)) = Name_Off then List_Pragmas.Increment_Last; List_Pragmas.Table (List_Pragmas.Last) := (Ptyp => List_Off, Ploc => Semi); end if; ---------------- -- Page (2.8) -- ---------------- -- pragma Page; -- Processing for this pragma must be done at parse time, since a -- listing can be generated in parse only mode with semantics off. when Pragma_Page => Check_Arg_Count (0); List_Pragmas.Increment_Last; List_Pragmas.Table (List_Pragmas.Last) := (Page, Semi); ----------------------------- -- Source_File_Name (GNAT) -- ----------------------------- -- There are five forms of this pragma: -- pragma Source_File_Name ( -- [UNIT_NAME =>] unit_NAME, -- BODY_FILE_NAME => STRING_LITERAL); -- pragma Source_File_Name ( -- [UNIT_NAME =>] unit_NAME, -- SPEC_FILE_NAME => STRING_LITERAL); -- pragma Source_File_Name ( -- BODY_FILE_NAME => STRING_LITERAL -- [, DOT_REPLACEMENT => STRING_LITERAL] -- [, CASING => CASING_SPEC]); -- pragma Source_File_Name ( -- SPEC_FILE_NAME => STRING_LITERAL -- [, DOT_REPLACEMENT => STRING_LITERAL] -- [, CASING => CASING_SPEC]); -- pragma Source_File_Name ( -- SUBUNIT_FILE_NAME => STRING_LITERAL -- [, DOT_REPLACEMENT => STRING_LITERAL] -- [, CASING => CASING_SPEC]); -- CASING_SPEC ::= Uppercase | Lowercase | Mixedcase -- Note: we process this during parsing, since we need to have the -- source file names set well before the semantic analysis starts, -- since we load the spec and with'ed packages before analysis. when Pragma_Source_File_Name => Source_File_Name : declare Unam : Unit_Name_Type; Expr1 : Node_Id; Pat : String_Ptr; Typ : Character; Dot : String_Ptr; Cas : Casing_Type; Nast : Nat; function Get_Fname (Arg : Node_Id) return Name_Id; -- Process file name from unit name form of pragma function Get_String_Argument (Arg : Node_Id) return String_Ptr; -- Process string literal value from argument procedure Process_Casing (Arg : Node_Id); -- Process Casing argument of pattern form of pragma procedure Process_Dot_Replacement (Arg : Node_Id); -- Process Dot_Replacement argument of patterm form of pragma --------------- -- Get_Fname -- --------------- function Get_Fname (Arg : Node_Id) return Name_Id is begin String_To_Name_Buffer (Strval (Expression (Arg))); for J in 1 .. Name_Len loop if Is_Directory_Separator (Name_Buffer (J)) then Error_Msg ("directory separator character not allowed", Sloc (Expression (Arg)) + Source_Ptr (J)); end if; end loop; return Name_Find; end Get_Fname; ------------------------- -- Get_String_Argument -- ------------------------- function Get_String_Argument (Arg : Node_Id) return String_Ptr is Str : String_Id; begin if Nkind (Expression (Arg)) /= N_String_Literal and then Nkind (Expression (Arg)) /= N_Operator_Symbol then Error_Msg_N ("argument for pragma% must be string literal", Arg); raise Error_Resync; end if; Str := Strval (Expression (Arg)); -- Check string has no wide chars for J in 1 .. String_Length (Str) loop if Get_String_Char (Str, J) > 255 then Error_Msg ("wide character not allowed in pattern for pragma%", Sloc (Expression (Arg2)) + Text_Ptr (J) - 1); end if; end loop; -- Acquire string String_To_Name_Buffer (Str); return new String'(Name_Buffer (1 .. Name_Len)); end Get_String_Argument; -------------------- -- Process_Casing -- -------------------- procedure Process_Casing (Arg : Node_Id) is Expr : constant Node_Id := Expression (Arg); begin Check_Required_Identifier (Arg, Name_Casing); if Nkind (Expr) = N_Identifier then if Chars (Expr) = Name_Lowercase then Cas := All_Lower_Case; return; elsif Chars (Expr) = Name_Uppercase then Cas := All_Upper_Case; return; elsif Chars (Expr) = Name_Mixedcase then Cas := Mixed_Case; return; end if; end if; Error_Msg_N ("Casing argument for pragma% must be " & "one of Mixedcase, Lowercase, Uppercase", Arg); end Process_Casing; ----------------------------- -- Process_Dot_Replacement -- ----------------------------- procedure Process_Dot_Replacement (Arg : Node_Id) is begin Check_Required_Identifier (Arg, Name_Dot_Replacement); Dot := Get_String_Argument (Arg); end Process_Dot_Replacement; -- Start of processing for Source_File_Name pragma begin -- We permit from 1 to 3 arguments if Arg_Count not in 1 .. 3 then Check_Arg_Count (1); end if; Expr1 := Expression (Arg1); -- If first argument is identifier or selected component, then -- we have the specific file case of the Source_File_Name pragma, -- and the first argument is a unit name. if Nkind (Expr1) = N_Identifier or else (Nkind (Expr1) = N_Selected_Component and then Nkind (Selector_Name (Expr1)) = N_Identifier) then Check_Arg_Count (2); Check_Optional_Identifier (Arg1, Name_Unit_Name); Unam := Get_Unit_Name (Expr1); Check_Arg_Is_String_Literal (Arg2); if Chars (Arg2) = Name_Spec_File_Name then Set_File_Name (Get_Spec_Name (Unam), Get_Fname (Arg2)); elsif Chars (Arg2) = Name_Body_File_Name then Set_File_Name (Unam, Get_Fname (Arg2)); else Error_Msg_N ("pragma% argument has incorrect identifier", Arg2); return Pragma_Node; end if; -- If the first argument is not an identifier, then we must have -- the pattern form of the pragma, and the first argument must be -- the pattern string with an appropriate name. else if Chars (Arg1) = Name_Spec_File_Name then Typ := 's'; elsif Chars (Arg1) = Name_Body_File_Name then Typ := 'b'; elsif Chars (Arg1) = Name_Subunit_File_Name then Typ := 'u'; elsif Chars (Arg1) = Name_Unit_Name then Error_Msg_N ("Unit_Name parameter for pragma% must be an identifier", Arg1); raise Error_Resync; else Error_Msg_N ("pragma% argument has incorrect identifier", Arg1); raise Error_Resync; end if; Pat := Get_String_Argument (Arg1); -- Check pattern has exactly one asterisk Nast := 0; for J in Pat'Range loop if Pat (J) = '*' then Nast := Nast + 1; end if; end loop; if Nast /= 1 then Error_Msg_N ("file name pattern must have exactly one * character", Arg2); return Pragma_Node; end if; -- Set defaults for Casing and Dot_Separator parameters Cas := All_Lower_Case; Dot := new String'("."); -- Process second and third arguments if present if Arg_Count > 1 then if Chars (Arg2) = Name_Casing then Process_Casing (Arg2); if Arg_Count = 3 then Process_Dot_Replacement (Arg3); end if; else Process_Dot_Replacement (Arg2); if Arg_Count = 3 then Process_Casing (Arg3); end if; end if; end if; Set_File_Name_Pattern (Pat, Typ, Dot, Cas); end if; end Source_File_Name; ----------------------------- -- Source_Reference (GNAT) -- ----------------------------- -- pragma Source_Reference -- (INTEGER_LITERAL [, STRING_LITERAL] ); -- Processing for this pragma must be done at parse time, since error -- messages needing the proper line numbers can be generated in parse -- only mode with semantic checking turned off, and indeed we usually -- turn off semantic checking anyway if any parse errors are found. when Pragma_Source_Reference => Source_Reference : declare Fname : Name_Id; begin if Arg_Count /= 1 then Check_Arg_Count (2); Check_No_Identifier (Arg2); end if; -- Check that this is first line of file. We skip this test if -- we are in syntax check only mode, since we may be dealing with -- multiple compilation units. if Get_Physical_Line_Number (Pragma_Sloc) /= 1 and then Num_SRef_Pragmas (Current_Source_File) = 0 and then Operating_Mode /= Check_Syntax then Error_Msg ("first % pragma must be first line of file", Pragma_Sloc); raise Error_Resync; end if; Check_No_Identifier (Arg1); if Arg_Count = 1 then if Num_SRef_Pragmas (Current_Source_File) = 0 then Error_Msg ("file name required for first % pragma in file", Pragma_Sloc); raise Error_Resync; else Fname := No_Name; end if; -- File name present else Check_Arg_Is_String_Literal (Arg2); String_To_Name_Buffer (Strval (Expression (Arg2))); Fname := Name_Find; if Num_SRef_Pragmas (Current_Source_File) > 0 then if Fname /= Full_Ref_Name (Current_Source_File) then Error_Msg ("file name must be same in all % pragmas", Pragma_Sloc); raise Error_Resync; end if; end if; end if; if Nkind (Expression (Arg1)) /= N_Integer_Literal then Error_Msg ("argument for pragma% must be integer literal", Sloc (Expression (Arg1))); raise Error_Resync; -- OK, this source reference pragma is effective, however, we -- ignore it if it is not in the first unit in the multiple unit -- case. This is because the only purpose in this case is to -- provide source pragmas for subsequent use by gnatchop. else if Num_Library_Units = 1 then Register_Source_Ref_Pragma (Fname, Strip_Directory (Fname), UI_To_Int (Intval (Expression (Arg1))), Get_Physical_Line_Number (Pragma_Sloc) + 1); end if; end if; end Source_Reference; ------------------------- -- Style_Checks (GNAT) -- ------------------------- -- pragma Style_Checks (On | Off | ALL_CHECKS | STRING_LITERAL); -- This is processed by the parser since some of the style -- checks take place during source scanning and parsing. when Pragma_Style_Checks => Style_Checks : declare A : Node_Id; S : String_Id; C : Char_Code; OK : Boolean := True; begin -- Two argument case is only for semantics if Arg_Count = 2 then null; else Check_Arg_Count (1); Check_No_Identifier (Arg1); A := Expression (Arg1); if Nkind (A) = N_String_Literal then S := Strval (A); declare Slen : Natural := Natural (String_Length (S)); Options : String (1 .. Slen); J : Natural; Ptr : Natural; begin J := 1; loop C := Get_String_Char (S, Int (J)); if not In_Character_Range (C) then OK := False; Ptr := J; exit; else Options (J) := Get_Character (C); end if; if J = Slen then Set_Style_Check_Options (Options, OK, Ptr); exit; else J := J + 1; end if; end loop; if not OK then Error_Msg ("invalid style check option", Sloc (Expression (Arg1)) + Source_Ptr (Ptr)); raise Error_Resync; end if; end; elsif Nkind (A) /= N_Identifier then OK := False; elsif Chars (A) = Name_All_Checks then Stylesw.Set_Default_Style_Check_Options; elsif Chars (A) = Name_On then Style_Check := True; elsif Chars (A) = Name_Off then Style_Check := False; else OK := False; end if; if not OK then Error_Msg ("incorrect argument for pragma%", Sloc (A)); raise Error_Resync; end if; end if; end Style_Checks; --------------------- -- Warnings (GNAT) -- --------------------- -- pragma Warnings (On | Off, [LOCAL_NAME]) -- The one argument case is processed by the parser, since it may -- control parser warnings as well as semantic warnings, and in any -- case we want to be absolutely sure that the range in the warnings -- table is set well before any semantic analysis is performed. when Pragma_Warnings => if Arg_Count = 1 then Check_No_Identifier (Arg1); Check_Arg_Is_On_Or_Off (Arg1); if Chars (Expression (Arg1)) = Name_On then Set_Warnings_Mode_On (Pragma_Sloc); else Set_Warnings_Mode_Off (Pragma_Sloc); end if; end if; ----------------------- -- All Other Pragmas -- ----------------------- -- For all other pragmas, checking and processing is handled -- entirely in Sem_Prag, and no further checking is done by Par. when Pragma_Abort_Defer | Pragma_AST_Entry | Pragma_All_Calls_Remote | Pragma_Annotate | Pragma_Assert | Pragma_Asynchronous | Pragma_Atomic | Pragma_Atomic_Components | Pragma_Attach_Handler | Pragma_CPP_Class | Pragma_CPP_Constructor | Pragma_CPP_Virtual | Pragma_CPP_Vtable | Pragma_C_Pass_By_Copy | Pragma_Comment | Pragma_Common_Object | Pragma_Complex_Representation | Pragma_Component_Alignment | Pragma_Controlled | Pragma_Convention | Pragma_Discard_Names | Pragma_Eliminate | Pragma_Elaborate | Pragma_Elaborate_All | Pragma_Elaborate_Body | Pragma_Elaboration_Checks | Pragma_Export | Pragma_Export_Exception | Pragma_Export_Function | Pragma_Export_Object | Pragma_Export_Procedure | Pragma_Export_Valued_Procedure | Pragma_Extend_System | Pragma_External | Pragma_External_Name_Casing | Pragma_Finalize_Storage_Only | Pragma_Float_Representation | Pragma_Ident | Pragma_Import | Pragma_Import_Exception | Pragma_Import_Function | Pragma_Import_Object | Pragma_Import_Procedure | Pragma_Import_Valued_Procedure | Pragma_Initialize_Scalars | Pragma_Inline | Pragma_Inline_Always | Pragma_Inline_Generic | Pragma_Inspection_Point | Pragma_Interface | Pragma_Interface_Name | Pragma_Interrupt_Handler | Pragma_Interrupt_Priority | Pragma_Java_Constructor | Pragma_Java_Interface | Pragma_License | Pragma_Link_With | Pragma_Linker_Alias | Pragma_Linker_Options | Pragma_Linker_Section | Pragma_Locking_Policy | Pragma_Long_Float | Pragma_Machine_Attribute | Pragma_Main | Pragma_Main_Storage | Pragma_Memory_Size | Pragma_No_Return | Pragma_No_Run_Time | Pragma_Normalize_Scalars | Pragma_Optimize | Pragma_Pack | Pragma_Passive | Pragma_Polling | Pragma_Preelaborate | Pragma_Priority | Pragma_Propagate_Exceptions | Pragma_Psect_Object | Pragma_Pure | Pragma_Pure_Function | Pragma_Queuing_Policy | Pragma_Remote_Call_Interface | Pragma_Remote_Types | Pragma_Restrictions | Pragma_Restricted_Run_Time | Pragma_Ravenscar | Pragma_Reviewable | Pragma_Share_Generic | Pragma_Shared | Pragma_Shared_Passive | Pragma_Storage_Size | Pragma_Storage_Unit | Pragma_Stream_Convert | Pragma_Subtitle | Pragma_Suppress | Pragma_Suppress_All | Pragma_Suppress_Debug_Info | Pragma_Suppress_Initialization | Pragma_System_Name | Pragma_Task_Dispatching_Policy | Pragma_Task_Info | Pragma_Task_Name | Pragma_Task_Storage | Pragma_Time_Slice | Pragma_Title | Pragma_Unchecked_Union | Pragma_Unimplemented_Unit | Pragma_Unreserve_All_Interrupts | Pragma_Unsuppress | Pragma_Use_VADS_Size | Pragma_Volatile | Pragma_Volatile_Components | Pragma_Weak_External | Pragma_Validity_Checks => null; end case; return Pragma_Node; -------------------- -- Error Handling -- -------------------- exception when Error_Resync => return Error; end Prag;
with USB; with USB.LibUSB1; with USB.Protocol; with Interfaces.C; with Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Text_IO; use Ada.Integer_Text_IO; use USB.LibUSB1; procedure List_Devices_C is Ctx: aliased Context_Access; R: Status; Ri: Integer; Cnt: ssize_t; Devs: aliased Device_Access_Lists.Pointer; begin R := Init_Lib(Ctx'Access); if R /= Success then Put(Status'Image(R)); Put_Line(""); return; end if; Cnt := Get_Device_List(Ctx, Devs'Access); if Cnt < 0 then --R := Status(Cnt); --Put(Status'Image(R)); Put_Line(""); --Exit_Lib(Ctx); --return; else declare Dev_Array: Device_Access_Array := Device_Access_Lists.Value(Devs, Interfaces.C.ptrdiff_t(Cnt)); Desc: aliased USB.Protocol.Device_Descriptor; Path: Port_Number_Array(0..7); begin Put(Integer(Cnt)); Put_Line(" devices listed"); for I in Dev_Array'Range loop Put(Integer(I-Dev_Array'First), 3); Put(Integer(Get_Bus_Number(Dev_Array(I))), 4); Put(Integer(Get_Device_Address(Dev_Array(I))), 4); R := Get_Device_Descriptor(Dev_Array(I), Desc); if R /= Success then Put("Failed to get device descriptor: " & Status'Image(R)); else Put(Integer(Desc.idVendor), 10, 16); Put(Integer(Desc.idProduct), 10, 16); Ri := Integer(Get_Port_Numbers(Dev_Array(I), Path(0)'Unrestricted_Access, -- do not know how to do right Path'Length)); if Ri > 0 then Put(" path: "); for I in 0 .. Ri-1 loop Put(Integer(Path(I)), 4); end loop; end if; end if; New_Line; end loop; end; Free_Device_List(Devs, 1); end if; Exit_Lib(Ctx); end;
F1, F2 : File_Type; begin Open (F1, In_File, "city.ppm"); Create (F2, Out_File, "city_median.ppm"); Put_PPM (F2, Median (Get_PPM (F1), 1)); -- Window 3x3 Close (F1); Close (F2);
with Ada.Strings.Unbounded; with Ada.Containers.Hashed_Maps; use Ada.Containers; package VM is type Instruction_Index is new Natural; type VM is private; VM_Exception : exception; function load_file(file : in String) return VM; procedure reset(v : in out VM); function acc(v : in VM) return Integer; function pc(v : in VM) return Instruction_Index; function eval(v : in out VM; max_steps : in Positive) return Boolean; function step(v : in out VM) return Boolean; function instructions(v : in VM) return Count_Type; procedure print(v : in VM); procedure swap_nop_jmp(idx : in Instruction_Index; v : in out VM); private type Op is (acc, jmp, nop, halt); type Op_Record (Ins : Op := nop) is record Index : Instruction_Index; case Ins is when acc | jmp | nop => Arg : Integer; when halt => null; end case; end record; function instruction_index_hash(key : in Instruction_Index) return Hash_Type; package Op_Hashed_Maps is new Ada.Containers.Hashed_Maps (Key_Type => Instruction_Index, Element_Type => Op_Record, Hash => instruction_index_hash, Equivalent_Keys => "="); use Op_Hashed_Maps; type VM is record Source : Ada.Strings.Unbounded.Unbounded_String; PC : Instruction_Index := 0; Acc : Integer := 0; Halted : Boolean := false; Instructions : Op_Hashed_Maps.Map := Empty_Map; end record; end VM;
with Trendy_Test; package Trendy_Test.Reports is -- Prints the results of a given test and sets a failure exit code. procedure Print_Basic_Report (Results : Trendy_Test.Test_Report_Vectors.Vector); end Trendy_Test.Reports;
-- { dg-do run } -- { dg-options "-gnatws" } procedure fixce is type D is delta 128.0 / (2 ** 15) range 0.0 .. 256.0; type R is range 0 .. 200; dd : D; RA : constant array (1 .. 3) of R := (127, 128, 200); begin dd := D (RA (2)); for i in RA'range loop dd := D (RA (i)); end loop; end fixce;
----------------------------------------------------------------------- -- html -- ASF HTML Components -- Copyright (C) 2009, 2010, 2011, 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- 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 EL.Objects; with ASF.Components.Base; package body ASF.Components.Html is use EL.Objects; procedure Render_Attributes (UI : in UIHtmlComponent; Context : in out Faces_Context'Class; Writer : in Response_Writer_Access) is Style : constant Object := UI.Get_Attribute (Context, "style"); Class : constant Object := UI.Get_Attribute (Context, "styleClass"); Title : constant Object := UI.Get_Attribute (Context, "title"); begin if not UI.Is_Generated_Id then Writer.Write_Attribute ("id", UI.Get_Client_Id); end if; if not Is_Null (Class) then Writer.Write_Attribute ("class", Class); end if; if not Is_Null (Style) then Writer.Write_Attribute ("style", Style); end if; if not Is_Null (Title) then Writer.Write_Attribute ("title", Title); end if; end Render_Attributes; -- ------------------------------ -- Render the attributes which are defined on the component and which are -- in the list specified by <b>names</b>. -- ------------------------------ procedure Render_Attributes (UI : in UIHtmlComponent; Context : in out Faces_Context'Class; Names : in Util.Strings.String_Set.Set; Writer : in Response_Writer_Access; Write_Id : in Boolean := True) is pragma Unreferenced (Context); procedure Process_Attribute (Name : in String; Attr : in UIAttribute); procedure Process_Attribute (Name : in String; Attr : in UIAttribute) is begin if Names.Contains (Name'Unrestricted_Access) then declare Value : constant Object := Base.Get_Value (Attr, UI); begin if Name = "styleClass" then Writer.Write_Attribute ("class", Value); else Writer.Write_Attribute (Name, Value); end if; end; end if; end Process_Attribute; procedure Write_Attributes is new Base.Iterate_Attributes (Process_Attribute); begin if Write_Id and then not UI.Is_Generated_Id then Writer.Write_Attribute ("id", UI.Get_Client_Id); end if; Write_Attributes (UI); end Render_Attributes; end ASF.Components.Html;
-- -- -- package Copyright (c) Dmitry A. Kazakov -- -- Strings_Edit.Base64 Luebeck -- -- Interface Autumn, 2014 -- -- -- -- Last revision : 18:40 01 Aug 2019 -- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU General Public License as -- -- published by the Free Software Foundation; either version 2 of -- -- the License, or (at your option) any later version. This library -- -- is distributed in the hope that it will be useful, but WITHOUT -- -- ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. You should have -- -- received a copy of the GNU General Public License along with -- -- this library; if not, write to the Free Software Foundation, -- -- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from -- -- this unit, or you link this unit with other files to produce an -- -- executable, this unit does not by itself cause the resulting -- -- executable to be covered by the GNU General Public License. This -- -- exception does not however invalidate any other reasons why the -- -- executable file might be covered by the GNU Public License. -- --____________________________________________________________________-- -- -- This package provides Base64 encoding and decoding as defined in -- RFC 4648. -- with Ada.Streams; use Ada.Streams; with Interfaces; use Interfaces; package Strings_Edit.Base64 is -- -- From_Base64 -- Decode Base64 to plain string -- -- Text - To convert -- -- Returns : -- -- Equivalent string -- -- Exceptions : -- -- Data_Error - Syntax error -- function From_Base64 (Text : String) return String; -- -- To_Base64 -- Encode plain string as Base64 -- -- Text - To convert -- -- Returns : -- -- Base64 string -- function To_Base64 (Text : String) return String; ------------------------------------------------------------------------ -- -- Base64_Encoder -- Base64 encoding stream -- -- Size - The stream buffer size -- -- The encoder stream when written encodes the input into Base64. The -- encoded content can be then read from the stream. -- type Base64_Encoder ( Size : Stream_Element_Count ) is new Root_Stream_Type with private; -- -- Flush -- The encoding -- -- Stream - The encoding stream -- -- This procedure is called at the end of encoding after the last stream -- element has been written. Status_Error is propagated when the stream -- presently has no space available. The operation can be repeated -- after reading from the stream. -- -- Exceptions : -- -- Status_Error - No space in the stream -- Use_Error - The stream is too small (fatal) -- procedure Flush (Stream : in out Base64_Encoder); -- -- Free -- Available space -- -- Stream - The encoding stream -- -- Returns : -- -- The number of elements that can be safely written -- function Free (Stream : Base64_Encoder) return Stream_Element_Count; -- -- Is_Empty -- Check if the stream is empty -- -- Stream - The encoding stream -- -- Returns : -- -- True of the stream can be read -- function Is_Empty (Stream : Base64_Encoder) return Boolean; -- -- Is_Full -- Check if the stream is full -- -- Stream - The encoding stream -- -- Returns : -- -- True if the stream cannot be written -- function Is_Full (Stream : Base64_Encoder) return Boolean; -- -- Reset -- The stream -- -- Stream - The encoding stream -- procedure Reset (Stream : in out Base64_Encoder); -- -- Size -- The maximum stream capacity -- -- Stream - The encoding stream -- -- Returns : -- -- How many elements can be written when the stream is empty -- function Size (Stream : Base64_Encoder) return Stream_Element_Count; -- -- Used -- The number of elements in the stream -- -- Stream - The encoding stream -- -- Returns : -- -- The number of elements available to read -- function Used (Stream : Base64_Encoder) return Stream_Element_Count; ------------------------------------------------------------------------ -- -- Base64_Decoder -- Base64 decoding stream -- -- Size - The stream buffer size -- -- The decoder stream when written decodes the input from Base64. The -- decoded content can be then read from the stream. -- type Base64_Decoder ( Size : Stream_Element_Count ) is new Root_Stream_Type with private; -- -- Reset -- The stream -- -- Stream - The encoding stream -- procedure Reset (Stream : in out Base64_Decoder); -- -- Free -- Available space -- -- Stream - The encoding stream -- -- Returns : -- -- The number of elements that can be safely written -- function Free (Stream : Base64_Decoder) return Stream_Element_Count; -- -- Is_Empty -- Check if the stream is empty -- -- Stream - The decoding stream -- -- Returns : -- -- True of the stream can be read -- function Is_Empty (Stream : Base64_Decoder) return Boolean; -- -- Is_Full -- Check if the stream is full -- -- Stream - The decoding stream -- -- Returns : -- -- True if the stream cannot be written -- function Is_Full (Stream : Base64_Decoder) return Boolean; -- -- Size -- The maximum stream capacity -- -- Stream - The decoding stream -- -- Returns : -- -- How many elements can be written when the stream is empty -- function Size (Stream : Base64_Decoder) return Stream_Element_Count; -- -- Used -- The number of elements in the stream -- -- Stream - The decoding stream -- -- Returns : -- -- The number of elements available to read -- function Used (Stream : Base64_Decoder) return Stream_Element_Count; private type Base64_Stream ( Size : Stream_Element_Count ) is abstract new Root_Stream_Type with record Item_In : Stream_Element_Count := 1; Item_Out : Stream_Element_Count := 1; Accum : Unsigned_16 := 0; Bits : Natural := 0; FIFO : Stream_Element_Array (1..Size); end record; function Free (Stream : Base64_Stream) return Stream_Element_Count is abstract; procedure Read ( Stream : in out Base64_Stream; Data : out Stream_Element_Array; Last : out Stream_Element_Offset ); function Size (Stream : Base64_Stream) return Stream_Element_Count is abstract; procedure Store ( Stream : in out Base64_Stream; Item : Stream_Element ); type Base64_Encoder ( Size : Stream_Element_Count ) is new Base64_Stream (Size) with null record; procedure Write ( Stream : in out Base64_Encoder; Data : Stream_Element_Array ); type Base64_Decoder ( Size : Stream_Element_Count ) is new Base64_Stream (Size) with record Equality : Boolean := False; end record; procedure Write ( Stream : in out Base64_Decoder; Data : Stream_Element_Array ); end Strings_Edit.Base64;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016-2017, 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 Last_Chance_Handler; pragma Unreferenced (Last_Chance_Handler); -- with Output_Utils; use Output_Utils; with Ada.Real_Time; use Ada.Real_Time; with HAL; use HAL; with HAL.SPI; use HAL.SPI; with HAL.UART; use HAL.UART; with HAL.I2C; use HAL.I2C; with STM32.Device; use STM32.Device; with STM32; use STM32; with STM32.GPIO; use STM32.GPIO; with STM32.SPI; use STM32.SPI; with STM32.I2C; use STM32.I2C; with STM32.USARTs; use STM32.USARTs; with STM32_SVD.I2C; with BMP280; use BMP280; with BMP280.SPI; with BMP280.I2C; with System.Machine_Code; procedure Demo_BMP280 is Clk_Pin : constant GPIO_Point := PB3; Miso_Pin : constant GPIO_Point := PB4; Mosi_Pin : constant GPIO_Point := PB5; SPI_Pins : constant GPIO_Points := (Clk_Pin, Miso_Pin, Mosi_Pin); Cs_Pin : GPIO_Point := PD7; Sca_Pin : GPIO_Point := PB10; Scl_Pin : GPIO_Point := PB11; --Sca_Pin : GPIO_Point := PC9; --Scl_Pin : GPIO_Point := PA8; I2C_Pins : constant GPIO_Points := (Sca_Pin, Scl_Pin); UART_Pins : constant GPIO_Points := (PA2, PA3); procedure Initialize_UART is begin Enable_Clock (UART_Pins); Enable_Clock (USART_2); Configure_IO(UART_Pins, (Mode => Mode_AF, AF => GPIO_AF_USART1_7, Resistors => Pull_Up, AF_Speed => Speed_50MHz, AF_Output_Type => Push_Pull)); Disable (USART_2); USART_2.Set_Baud_Rate(115200); USART_2.Set_Mode(Tx_Rx_Mode); USART_2.Set_Word_Length(Word_Length_9); USART_2.Set_Parity(No_Parity); USART_2.Set_Flow_Control(No_Flow_Control); Enable (USART_2); end Initialize_UART; procedure Initialize_I2C is begin Enable_Clock (I2C_Pins); Enable_Clock (I2C_2); Configure_IO(I2C_Pins, (Mode => Mode_AF, AF => GPIO_AF_I2C1_4, Resistors => Pull_Up, AF_Speed => Speed_50MHz, AF_Output_Type => Open_Drain)); Configure(I2C_2, ( Clock_Speed => 100_000, Mode => I2C_Mode, Duty_Cycle => DutyCycle_2, Addressing_Mode => Addressing_Mode_7bit, Own_Address => 0, others => <>)); I2C_2.Set_State (True); end Initialize_I2C; procedure Initialize_SPI is begin Enable_Clock (SPI_1); Enable_Clock (SPI_Pins); Enable_Clock (Cs_Pin); Configure_IO(SPI_Pins, (Mode => Mode_AF, AF => GPIO_AF_SPI1_5, Resistors => Pull_Up, AF_Speed => Speed_50MHz, AF_Output_Type => Push_Pull)); Configure_IO(Cs_Pin, (Mode => Mode_Out, Output_Type => Push_Pull, Speed => Speed_50MHz, Resistors => Floating)); Disable (SPI_1); Configure (SPI_1, ( Direction => D2Lines_FullDuplex, Mode => Master, Data_Size => Data_Size_8b, Clock_Polarity => Low, Clock_Phase => P1Edge, Slave_Management => Software_Managed, Baud_Rate_Prescaler => BRP_256, First_Bit => MSB, CRC_Poly => 0 )); Enable (SPI_1); end Initialize_SPI; procedure Await_Tx is begin while not USART_2.Tx_Ready loop null; end loop; end Await_Tx; procedure Put (s : String) is begin for I in s'First..s'Last loop Await_Tx; USART_2.Transmit(Uint9(Character'Pos(s(I)))); end loop; end Put; procedure New_Line is begin Await_Tx; USART_2.Transmit (UInt9(13)); Await_Tx; USART_2.Transmit (UInt9(10)); end New_Line; procedure Put_Line(s : String) is begin Put(s); New_Line; end Put_Line; function Height_From_Pressure(P : Float) return Float is begin return (101300.0 - P) / 11.7; end Height_From_Pressure; T : Time := Clock; Count : Integer := 0; package BMP280_SPI is new BMP280.SPI (BMP280_Device); Sensor1 : BMP280_SPI.SPI_BMP280_Device (SPI_1'Access, PD7'Access); package BMP280_I2C is new BMP280.I2C (BMP280_Device); Sensor2 : BMP280_I2C.I2C_BMP280_Device (I2C_2'Access, BMP280_I2C.Low); IData : SPI_Data_8b := (16#D0#, 0); begin Initialize_UART; T := T + Milliseconds (50); delay until T; Initialize_I2C; Initialize_SPI; Cs_Pin.Set; T := T + Milliseconds (50); delay until T; -- Configure the pressure sensor declare Conf : BMP280_Configuration := (Standby_Time => ms125, Temperature_Oversampling => x16, Pressure_Oversampling => x16, Filter_Coefficient => 0); begin Sensor1.Configure(Conf); Sensor2.Configure(Conf); null; end; loop declare Values : BMP280_Values_Float; begin Sensor1.Read_Values_Float(Values); Put_Line("Temp1: " & Values.Temperature'Img); Put_Line("Pres1: " & Values.Pressure'Img); Sensor2.Read_Values_Float(Values); Put_Line("Temp2: " & Values.Temperature'Img); Put_Line("Pres2: " & Values.Pressure'Img); --Put_Line("Height: " & Height_From_Pressure(Values.Pressure)'Img); null; end; Put_Line ("Hello " & Count'Img); Count := Count + 1; T := T + Milliseconds (200); delay until T; end loop; end Demo_BMP280;
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 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. -- -- -- -- 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 file provides register definitions for the STM32F4 (ARM Cortex M4F) -- microcontrollers from ST Microelectronics. package body STM32F4.SYSCONFIG_Control is -------------------------------- -- Connect_External_Interrupt -- -------------------------------- procedure Connect_External_Interrupt (Port : GPIO_Port; Pin : GPIO_Pin) is CR_Index : Integer range EXTI_Control_Registers'Range; EXTI_Index : Integer range EXTI_n_List'Range; Port_Name : constant GPIO_Port_Id := As_GPIO_Port_Id (Port); begin -- First we find the control register, of the four possible, that -- contains the EXTI_n value for pin 'n' specified by the Pin parameter. -- In effect, this is what we are doing for the EXTICR index: -- case GPIO_Pin'Pos (Pin) is -- when 0 .. 3 => CR_Index := 0; -- when 4 .. 7 => CR_Index := 1; -- when 8 .. 11 => CR_Index := 2; -- when 12 .. 15 => CR_Index := 3; -- end case; -- Note that that means we are dependent upon the order of the Pin -- declarations because we require GPIO_Pin'Pos(Pin_n) to be 'n', ie -- Pin_0 should be at position 0, Pin_1 at position 1, and so forth. CR_Index := GPIO_Pin'Pos (Pin) / 4; -- Now we must find which EXTI_n value to use, of the four possible, -- within the control register. We are depending on the GPIO_Port type -- being an enumeration and that the enumeral order is alphabetical on -- the Port letter, such that in effect GPIO_A'Pos = 0, GPIO_B'Pos = 1, -- and so on. EXTI_Index := GPIO_Port_Id'Pos (Port_Name) mod 4; -- ie 0 .. 3 -- Finally we assign the port 'number' to the EXTI_n value within the -- control register. We depend upon the Port enumerals' underlying -- numeric representation values matching what the hardware expects, -- that is, the values 0 .. n-1, which we get automatically unless -- overridden. SYSCFG.EXTICR (CR_Index).EXTI (EXTI_Index) := Port_Name; end Connect_External_Interrupt; -------------------------------- -- Connect_External_Interrupt -- -------------------------------- procedure Connect_External_Interrupt (Port : GPIO_Port; Pins : GPIO_Pins) is begin for Pin of Pins loop Connect_External_Interrupt (Port, Pin); end loop; end Connect_External_Interrupt; -------------------------- -- Set_External_Trigger -- -------------------------- procedure Set_External_Trigger (Pin : GPIO_Pin; Trigger : External_Triggers) is This_Pin : constant Integer range 0 .. 15 := GPIO_Pin'Pos (Pin); begin EXTI.IMR (This_Pin) := Trigger in Interrupt_Triggers; EXTI.EMR (This_Pin) := Trigger in Event_Triggers; end Set_External_Trigger; -------------------------- -- Set_External_Trigger -- -------------------------- procedure Set_External_Trigger (Pins : GPIO_Pins; Trigger : External_Triggers) is begin for Pin of Pins loop Set_External_Trigger (Pin, Trigger); end loop; end Set_External_Trigger; ------------------------- -- Select_Trigger_Edge -- ------------------------- procedure Select_Trigger_Edge (Pin : GPIO_Pin; Trigger : External_Triggers) is This_Pin : constant Integer range 0 .. 15 := GPIO_Pin'Pos (Pin); begin -- all those that are/include rising edge EXTI.RTSR (This_Pin) := Trigger in Interrupt_Rising_Edge | Interrupt_Rising_Falling_Edge | Event_Rising_Edge | Event_Rising_Falling_Edge; -- all those that are/include falling edge EXTI.FTSR (This_Pin) := Trigger in Interrupt_Falling_Edge | Interrupt_Rising_Falling_Edge | Event_Falling_Edge | Event_Rising_Falling_Edge; end Select_Trigger_Edge; ------------------------- -- Select_Trigger_Edge -- ------------------------- procedure Select_Trigger_Edge (Pins : GPIO_Pins; Trigger : External_Triggers) is begin for Pin of Pins loop Select_Trigger_Edge (Pin, Trigger); end loop; end Select_Trigger_Edge; ------------------------------ -- Clear_External_Interrupt -- ------------------------------ procedure Clear_External_Interrupt (Pin : GPIO_Pin) is begin EXTI.PR (GPIO_Pin'Pos (Pin)) := 1; -- yes, value is one to clear the interrupt end Clear_External_Interrupt; --------------------- -- As_GPIO_Port_Id -- --------------------- function As_GPIO_Port_Id (Port : GPIO_Port) return GPIO_Port_Id is use System; begin -- TODO: rather ugly to have this board-specific range here if Port'Address = System'To_Address (GPIOA_Base) then return GPIO_Port_A; elsif Port'Address = System'To_Address (GPIOB_Base) then return GPIO_Port_B; elsif Port'Address = System'To_Address (GPIOC_Base) then return GPIO_Port_C; elsif Port'Address = System'To_Address (GPIOD_Base) then return GPIO_Port_D; elsif Port'Address = System'To_Address (GPIOE_Base) then return GPIO_Port_E; elsif Port'Address = System'To_Address (GPIOF_Base) then return GPIO_Port_F; elsif Port'Address = System'To_Address (GPIOG_Base) then return GPIO_Port_G; elsif Port'Address = System'To_Address (GPIOH_Base) then return GPIO_Port_H; elsif Port'Address = System'To_Address (GPIOI_Base) then return GPIO_Port_I; elsif Port'Address = System'To_Address (GPIOJ_Base) then return GPIO_Port_J; elsif Port'Address = System'To_Address (GPIOK_Base) then return GPIO_Port_K; else raise Program_Error; end if; end As_GPIO_Port_Id; end STM32F4.SYSCONFIG_Control;
with OpenGL.Thin; with OpenGL.Vertex; package OpenGL.Vertex_Array is type Attribute_Index_t is new Thin.Unsigned_Integer_t; type Attribute_Count_t is new Thin.Size_t range 0 .. Thin.Size_t'Last; -- proc_map : glEnableVertexAttribArray procedure Enable_Attribute_Array (Index : in Attribute_Index_t); pragma Inline (Enable_Attribute_Array); -- proc_map : glDisableVertexAttribArray procedure Disable_Attribute_Array (Index : in Attribute_Index_t); pragma Inline (Disable_Attribute_Array); -- -- Array name management. -- type Array_Index_t is new Thin.Unsigned_Integer_t; type Array_Index_Array_t is array (Natural range <>) of aliased Array_Index_t; pragma Convention (C, Array_Index_Array_t); -- proc_map : glGenVertexArrays procedure Generate_Arrays (Arrays : in out Array_Index_Array_t); pragma Inline (Generate_Arrays); -- proc_map : glDeleteVertexArrays procedure Delete_Arrays (Arrays : in Array_Index_Array_t); pragma Inline (Delete_Arrays); -- -- Array binding. -- -- proc_map : glBindVertexArray procedure Bind_Array (Index : in Array_Index_t); pragma Inline (Bind_Array); -- -- Render arrays. -- -- proc_map : glDrawArrays procedure Draw_Arrays (Mode : in OpenGL.Vertex.Primitive_Type_t; First : in Attribute_Index_t; Count : in Attribute_Count_t); pragma Inline (Draw_Arrays); -- -- Pointer -- type Coords_Per_Vertex_t is range 2 .. 4; type Integer_Coordinate_Type_t is (Integer, Short); generic Vertex_Type : Integer_Coordinate_Type_t; type Vertex_Element_t is range <>; type Vertex_Array_Index_t is range <>; type Vertex_Array_t is array (Vertex_Array_Index_t range <>) of aliased Vertex_Element_t; -- proc_map : glVertexPointer procedure Pointer_Integer (Data : in Vertex_Array_t; Coords_Per_Vertex : in Coords_Per_Vertex_t; Stride : in Natural); type Float_Coordinate_Type_t is (Float, Double); generic Vertex_Type : Float_Coordinate_Type_t; type Vertex_Element_t is digits <>; type Vertex_Array_Index_t is range <>; type Vertex_Array_t is array (Vertex_Array_Index_t range <>) of aliased Vertex_Element_t; -- proc_map : glVertexPointer procedure Pointer_Float (Data : in Vertex_Array_t; Coords_Per_Vertex : in Coords_Per_Vertex_t; Stride : in Natural); end OpenGL.Vertex_Array;
with AUnit.Assertions; use AUnit.Assertions; with AUnit.Test_Cases; use AUnit.Test_Cases; package body Test.Test_Suite is use Quaternions; function Image (Q : Quaternion) return String is ("(" & Q.W'Image & "," & Q.X'Image & "," & Q.Y'Image & "," & Q.Y'Image & ")"); type Case_1 is new Test_Case with null record; overriding function Name (C : Case_1) return AUnit.Message_String is (new String'("quaternions")); overriding procedure Register_Tests (C : in out Case_1); function Suite return AUnit.Test_Suites.Access_Test_Suite is Result : constant AUnit.Test_Suites.Access_Test_Suite := new AUnit.Test_Suites.Test_Suite; begin pragma Warnings (Off, "use of an anonymous access type allocator"); AUnit.Test_Suites.Add_Test (Result, new Case_1); pragma Warnings (On, "use of an anonymous access type allocator"); return Result; end Suite; procedure Unary_Minus (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Addition (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Subtraction (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Multiplication (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Division (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Conjugate (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Norm (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Normalize (Dummy : in out AUnit.Test_Cases.Test_Case'Class); procedure Register_Tests (C : in out Case_1) is begin Registration.Register_Routine (C, Unary_Minus'Access, "unary minus"); Registration.Register_Routine (C, Addition'Access, "addition"); Registration.Register_Routine (C, Subtraction'Access, "subtraction"); Registration.Register_Routine (C, Multiplication'Access, "multiplication"); Registration.Register_Routine (C, Division'Access, "division"); Registration.Register_Routine (C, Conjugate'Access, "conjugate"); Registration.Register_Routine (C, Norm'Access, "norm"); Registration.Register_Routine (C, Normalize'Access, "normalize"); end Register_Tests; procedure Unary_Minus (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (1.0, 2.0, 3.0, 4.0); Q2 : Quaternion; begin Q2 := -Q1; Assert (Q2 = (-1.0, -2.0, -3.0, -4.0), "-q1"); end Unary_Minus; procedure Addition (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (1.0, 2.0, 3.0, 4.0); Q2 : constant Quaternion := (-1.0, 0.0, -1.0, 0.0); Q3 : Quaternion; begin Q3 := Q1 + Q2; Assert (Q3 = (0.0, 2.0, 2.0, 4.0), "q1+q2"); end Addition; procedure Subtraction (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (1.0, 2.0, 3.0, 4.0); Q2 : constant Quaternion := (-1.0, 0.0, -1.0, 0.0); Q3 : Quaternion; begin Q3 := Q1 - Q2; Assert (Q3 = (2.0, 2.0, 4.0, 4.0), "q1-q2"); end Subtraction; procedure Multiplication (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (1.0, 2.0, 3.0, 4.0); Q2 : Quaternion; Q3 : Quaternion; begin Q2 := Q1 * 2.0; Assert (Q2 = (2.0, 4.0, 6.0, 8.0), "q1*r"); Q3 := 3.0 * Q1; Assert (Q3 = (3.0, 6.0, 9.0, 12.0), "r*q1"); Q3 := Q1 * Q2; pragma Style_Checks (Off); -- line length > 79 -- From https://www.euclideanspace.com/maths/algebra/realNormedAlgebra/other/dualQuaternion/calculator/index.htm pragma Style_Checks (On); Assert (Q3 = (-56.0, 8.0, 12.0, 16.0), "q1*q2" & ", got " & Image (Q3)); end Multiplication; procedure Division (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (1.0, 2.0, 3.0, 4.0); Q2 : Quaternion; begin Q2 := Q1 / 2.0; Assert (Q2 = (0.5, 1.0, 1.5, 2.0), "q1/r"); end Division; procedure Conjugate (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (1.0, 2.0, 3.0, 4.0); Q2 : Quaternion; begin Q2 := Conjugate (Q1); Assert (Q2 = (1.0, -2.0, -3.0, -4.0), "conjugate(q1)"); end Conjugate; procedure Norm (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (3.0, 0.0, 0.0, 4.0); R : Float; begin R := Norm (Q1); Assert (R = 5.0, "norm(q1)"); end Norm; procedure Normalize (Dummy : in out AUnit.Test_Cases.Test_Case'Class) is Q1 : constant Quaternion := (3.0, 0.0, 0.0, 4.0); Q2 : Quaternion; begin Q2 := Normalize (Q1); Assert (Q2 = (0.6, 0.0, 0.0, 0.8), "normalize(q1)"); end Normalize; end Test.Test_Suite;
with GNAT.OS_Lib; package Support is type Real is digits 18; procedure halt (return_code : Integer := 0) renames GNAT.OS_Lib.OS_Exit; function max (a : in Real; b : in Real) return Real; function min (a : in Real; b : in Real) return Real; function max (a : in Integer; b : in Integer) return Integer; function min (a : in Integer; b : in Integer) return Integer; end Support;
with Messages; use Messages; with Ada.Streams.Stream_Io; use Ada.Streams.Stream_Io; with Ada.Calendar; use Ada.Calendar; with Ada.Text_Io; procedure Streams_Example is S1 : Sensor_Message; M1 : Message; C1 : Control_Message; Now : Time := Clock; The_File : Ada.Streams.Stream_Io.File_Type; The_Stream : Ada.Streams.Stream_IO.Stream_Access; begin S1 := (Now, 1234, 0.025); M1.Timestamp := Now; C1 := (Now, 15, 0.334); Display(S1); Display(M1); Display(C1); begin Open(File => The_File, Mode => Out_File, Name => "Messages.dat"); exception when others => Create(File => The_File, Name => "Messages.dat"); end; The_Stream := Stream(The_File); Sensor_Message'Class'Output(The_Stream, S1); Message'Class'Output(The_Stream, M1); Control_Message'Class'Output(The_Stream, C1); Close(The_File); Open(File => The_File, Mode => In_File, Name => "Messages.dat"); The_Stream := Stream(The_File); Ada.Text_Io.New_Line(2); while not End_Of_File(The_File) loop Display(Message'Class'Input(The_Stream)); end loop; Close(The_File); end Streams_Example;
-- -- Copyright (C) 2017 Nico Huber <nico.h@gmx.de> -- -- 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 2 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. -- package HW.File is -- -- Map a file's content into our address space -- -- If `Map_Copy` is `False`, `Len` bytes at `Offset` from the start -- of the file given by `Path` should be mapped into the application's -- address space using mmap(). -- -- If `Map_Copy` is `True`, anonymous memory should be mapped instead -- and be filled with a copy of the file's content using read(). -- -- If `Len` is zero, the whole file should be mapped. -- procedure Map (Addr : out Word64; Path : in String; Len : in Natural := 0; Offset : in Natural := 0; Readable : in Boolean := False; Writable : in Boolean := False; Map_Copy : in Boolean := False; Success : out Boolean) with Pre => (Readable or Writable) and (if Map_Copy then Readable and not Writable); -- Sets `Length` to the size of the file given by `Path` or 0 if an -- error occurs. procedure Size (Length : out Natural; Path : String); end HW.File;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure Check_Positive is N : Integer; F : Float; C : Character; B : Boolean; begin Put ("Enter an integer value: "); -- Put a String Get (N); -- Reads in an integer value Put_Line ("Value of Integer: " & N); -- Put an Integer end Check_Positive;
pragma License (Unrestricted); -- implementation unit for System.Initialization private with Ada.Tags; package System.Storage_Pools.Overlaps is pragma Preelaborate; type Overlay_Pool is limited new Root_Storage_Pool with null record with Disable_Controlled => True; -- Actually, an allocation address is stored in TLS. pragma Finalize_Storage_Only (Overlay_Pool); procedure Set_Address (Storage_Address : Address); pragma Inline (Set_Address); overriding procedure Allocate ( Pool : in out Overlay_Pool; Storage_Address : out Address; Size_In_Storage_Elements : Storage_Elements.Storage_Count; Alignment : Storage_Elements.Storage_Count); pragma Inline (Allocate); overriding procedure Deallocate ( Pool : in out Overlay_Pool; Storage_Address : Address; Size_In_Storage_Elements : Storage_Elements.Storage_Count; Alignment : Storage_Elements.Storage_Count); pragma Inline (Deallocate); overriding function Storage_Size (Pool : Overlay_Pool) return Storage_Elements.Storage_Count is (0); Pool : constant not null access Overlay_Pool; -- Note: If it is declared as a local pool, Any objects allocated from it -- will be finalized when the local pool is out of scope, -- because the objects also belongs to the same scope. -- Therefore it should be declared in library-level. private Dispatcher : aliased constant Ada.Tags.Tag := Overlay_Pool'Tag; Pool : constant not null access Overlay_Pool := Overlay_Pool'Deref (Dispatcher'Address)'Unrestricted_Access; end System.Storage_Pools.Overlaps;
with Ada.Command_Line; with Ada.Directories; with Ada.Environment_Variables; with Ada.Streams.Stream_IO; with Ada.Strings.Unbounded; with Ada.Text_IO; with Serialization.XML; with XML.Streams; procedure test_serialize is Verbose : Boolean := False; procedure Put (Item : in String) is begin if Verbose then Ada.Text_IO.Put (Item); end if; end Put; procedure New_Line is begin if Verbose then Ada.Text_IO.New_Line; end if; end New_Line; Test_File_Name : constant String := Ada.Directories.Compose ( Ada.Environment_Variables.Value ("TMPDIR", Default => "/tmp"), "test_serialize.xml"); type Nested_Map is record A : Integer; end record; procedure IO ( S : not null access Serialization.Serializer; Name : String; Var : in out Nested_Map) is procedure Process is begin Serialization.IO (S, "A", Var.A); end Process; begin Serialization.IO (S, Name, Process'Access); end IO; type T is record X : Ada.Strings.Unbounded.Unbounded_String; Y : Boolean; Z : Nested_Map; end record; procedure IO (S : not null access Serialization.Serializer; Var : in out T) is procedure Process is begin Serialization.IO (S, "X", Var.X); Serialization.IO (S, "Y", Var.Y); IO (S, "Z", Var.Z); end Process; begin Serialization.IO (S, Process'Access); end IO; Root_Tag : constant String := "ROOT-TAG"; Data : T := ( X => Ada.Strings.Unbounded.To_Unbounded_String ("XYZ"), Y => True, Z => (A => 100)); begin -- options for I in 1 .. Ada.Command_Line.Argument_Count loop declare A : constant String := Ada.Command_Line.Argument (I); begin if A = "--verbose" then Verbose := True; else Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "unknown option: " & A); Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); return; end if; end; end loop; -- writer declare W : aliased XML.Writer := XML.Create (Put'Access); begin IO (Serialization.XML.Writing (W'Access, Root_Tag).Serializer, Data); XML.Finish (W); end; declare File : Ada.Streams.Stream_IO.File_Type; begin Ada.Streams.Stream_IO.Create (File, Name => Test_File_Name); declare W : aliased XML.Writer := XML.Streams.Create (Ada.Streams.Stream_IO.Stream (File)); begin Put ("Writing..."); IO (Serialization.XML.Writing (W'Access, Root_Tag).Serializer, Data); XML.Finish (W); Put (" ok"); New_Line; end; Ada.Streams.Stream_IO.Close (File); end; -- reader declare File : Ada.Streams.Stream_IO.File_Type; Data2 : T := ( X => Ada.Strings.Unbounded.Null_Unbounded_String, Y => False, Z => (A => 0)); begin Ada.Streams.Stream_IO.Open (File, Ada.Streams.Stream_IO.In_File, Name => Test_File_Name); declare R : aliased XML.Reader := XML.Streams.Create (Ada.Streams.Stream_IO.Stream (File)); begin Put ("Reading..."); IO (Serialization.XML.Reading (R'Access, Root_Tag).Serializer, Data2); XML.Finish (R); Put (" ok"); New_Line; end; Ada.Streams.Stream_IO.Close (File); declare W : aliased XML.Writer := XML.Create (Put'Access); begin IO (Serialization.XML.Writing (W'Access, Root_Tag).Serializer, Data2); XML.Finish (W); end; if Data2 /= Data then raise Program_Error; end if; end; -- finish Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "ok"); end test_serialize;
package Benchmark.Heap is type Heap_Type is new Benchmark_Type with private; function Create_Heap return Benchmark_Pointer; overriding procedure Set_Argument(benchmark : in out Heap_Type; arg : in String); overriding procedure Run(benchmark : in Heap_Type); private type Heap_Type is new Benchmark_Type with record size : Positive := 1024; end record; end Benchmark.Heap;
pragma License (Unrestricted); -- Ada 2012, specialized for Darwin (or FreeBSD) package System.Multiprocessors is pragma Preelaborate; type CPU_Range is range 0 .. Integer'Last; Not_A_Specific_CPU : constant CPU_Range := 0; subtype CPU is CPU_Range range 1 .. CPU_Range'Last; function Number_Of_CPUs return CPU; end System.Multiprocessors;
with Sf.System.Time; package body Sf.System.Sleep is procedure sfDelay (Seconds : Duration) is begin sfSleep (Duration => Time.sfSeconds (Float (Seconds))); end sfDelay; end Sf.System.Sleep;
-- ----------------------------------------------------------------- -- -- -- -- This is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU General Public -- -- License as published by the Free Software Foundation; either -- -- version 2 of the License, or (at your option) any later version. -- -- -- -- This software 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 library; if not, write to the -- -- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- -- Boston, MA 02111-1307, USA. -- -- -- -- ----------------------------------------------------------------- -- -- ----------------------------------------------------------------- -- -- This is a translation, to the Ada programming language, of the -- -- original C test files written by Sam Lantinga - www.libsdl.org -- -- translation made by Antonio F. Vargas - www.adapower.net/~avargas -- -- ----------------------------------------------------------------- -- with Interfaces.C; with Ada.Command_Line; with Ada.Characters.Handling; with Ada.Text_IO; use Ada.Text_IO; with GNAT.OS_Lib; with SDL.Types; use SDL.Types; with SDL.Video; with SDL.Events; with SDL.Error; with SDL.Quit; with SDL_Framebuffer; with Picture_xbm; use Picture_xbm; procedure TestBitmap is package C renames Interfaces.C; use type C.int; package CL renames Ada.Command_Line; package CH renames Ada.Characters.Handling; package V renames SDL.Video; use type V.Surface_ptr; use type V.Surface_Flags; package Ev renames SDL.Events; package Er renames SDL.Error; package Fb renames SDL_Framebuffer; Screen_Width : constant := 640; Screen_Height : constant := 480; package Uint8_IO is new Modular_IO (Uint8); -- =============================================== function LoadXBM (screen : V.Surface_ptr; w, h : C.int; bits : Fb.Framebuffer_8bPointer) return V.Surface_ptr is ww : C.int := w; hh : C.int := h; The_Bits : Fb.Framebuffer_8bPointer := bits; bitmap : V.Surface_ptr; line : Fb.Framebuffer_8bPointer; begin -- Allocate the bitmap bitmap := V.CreateRGBSurface ( V.SWSURFACE, w, h, 1, 0, 0, 0, 0); if bitmap = null then Put_Line ("Couldn't allocate bitmap: " & Er.Get_Error); return null; end if; -- Copy the pixels line := Fb.Get_Framebuffer (bitmap); ww := (ww + 7) / 8; while hh > 0 loop hh := hh - 1; Copy_Array (The_Bits, line, Natural (ww)); -- X11 Bitmap images have the bits reversed declare i : C.int; buf : Fb.Framebuffer_8bPointer; byte : Uint8; use Interfaces; begin buf := line; i := 0; while i < ww loop byte := buf.all; buf.all := 0; for j in reverse 0 .. 7 loop buf.all := buf.all or Shift_Left ( byte and 16#01#, j); byte := Shift_Right (byte, 1); end loop; i := i + 1; buf := Increment (buf, 1); end loop; end; line := Fb.Next_Line_Unchecked (bitmap, line); The_Bits := Increment (The_Bits, Natural (ww)); end loop; return bitmap; end LoadXBM; -- =============================================== screen : V.Surface_ptr; bitmap : V.Surface_ptr; video_bpp : Uint8; videoflags : V.Surface_Flags; buffer : Fb.Framebuffer_8bPointer; done : Boolean; event : Ev.Event; argc : Integer := CL.Argument_Count; PollEvent_Result : C.int; begin -- Initialize SDL if SDL.Init (SDL.INIT_VIDEO) < 0 then Put_Line ("Couldn't initialize SDL: " & Er.Get_Error); GNAT.OS_Lib.OS_Exit (1); end if; SDL.Quit.atexit (SDL.SDL_Quit'Access); video_bpp := 0; videoflags := V.SWSURFACE; while argc > 0 loop if (argc > 1) and then (CL.Argument (argc - 1) = "-bpp") and then CH.Is_Digit (CL.Argument (argc) (1)) then declare last : Positive; begin Uint8_IO.Get (CL.Argument (argc), video_bpp, last); end; argc := argc - 2; elsif CL.Argument (argc) = "-hw" then videoflags := videoflags or V.HWSURFACE; argc := argc - 1; elsif CL.Argument (argc) = "-warp" then videoflags := videoflags or V.HWPALETTE; argc := argc -1; elsif CL.Argument (argc) = "-fullscreen" then videoflags := videoflags or V.FULLSCREEN; argc := argc - 1; else Put_Line ("Usage: " & CL.Command_Name & "[-bpp N] [-hw] [-warp] [-fullscreen]"); GNAT.OS_Lib.OS_Exit (1); end if; end loop; -- Set video mode screen := V.SetVideoMode (Screen_Width, Screen_Height, C.int (video_bpp), videoflags); if screen = null then Put_Line ("Couldn't set " & Integer'Image (Screen_Width) & "x" & Integer'Image (Screen_Height) & " video mode: " & Er.Get_Error); GNAT.OS_Lib.OS_Exit (2); end if; -- Set the surface pixels and refresh if V.LockSurface (screen) < 0 then Put_Line ("Couldn't lock the display surface: " & Er.Get_Error); GNAT.OS_Lib.OS_Exit (2); end if; buffer := Fb.Get_Framebuffer (screen); for i in 0 .. screen.h - 1 loop Fb.Paint_Line_Unchecked (screen, buffer, i * 255 / screen.h); buffer := Fb.Next_Line_Unchecked (screen, buffer); end loop; V.UnlockSurface (screen); V.UpdateRect (screen, 0, 0, 0, 0); -- Load the bitmap bitmap := LoadXBM (screen, picture_width, picture_height, Fb.Framebuffer_8bPointer'(picture_bits(0)'Access)); if bitmap = null then GNAT.OS_Lib.OS_Exit (1); end if; -- Wait for a keystroke done := False; while not done loop loop Ev.PollEventVP (PollEvent_Result, event); exit when PollEvent_Result = 0; case event.the_type is when Ev.MOUSEBUTTONDOWN => declare dst : V.Rect; begin dst.x := Sint16 (C.int (event.button.x) - bitmap.w / 2); dst.y := Sint16 (C.int (event.button.y) - bitmap.h / 2); dst.w := Uint16 (bitmap.w); dst.h := Uint16 (bitmap.h); V.BlitSurface (bitmap, null, screen, dst); V.Update_Rect (screen, dst); end; when Ev.KEYDOWN => done := True; when Ev.QUIT => done := True; when others => null; end case; end loop; end loop; V.FreeSurface (bitmap); GNAT.OS_Lib.OS_Exit (0); end TestBitmap;
with System.Machine_Code; with AVR.USART; with TEST; pragma Unreferenced (TEST); procedure Main is F_CPU : constant := 16_000_000; USART_BAUDRATE : constant := 9600; begin AVR.USART.Reg_USART1.UCSRB.RXEN := True; AVR.USART.Reg_USART1.UCSRB.TXEN := True; AVR.USART.Reg_USART1.UCSRB.RXCIE := True; AVR.USART.Reg_USART1.UCSRC.UCSZ0 := True; AVR.USART.Reg_USART1.UCSRC.UCSZ1 := True; AVR.USART.Reg_USART1.UBRR (0) := AVR.Byte_Type ((F_CPU / (USART_BAUDRATE * 16)) - 1); AVR.USART.Reg_USART1.UBRR (1) := 0; System.Machine_Code.Asm ("sei", Volatile => True); loop null; end loop; end Main;
function System.Environment_Block return C.char_ptr_ptr is environ : C.char_ptr_ptr with Import, Convention => C; begin return environ; end System.Environment_Block;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Command_Line; use Ada.Command_Line; with Arbitrary; use Arbitrary; with Arbitrary.Const; use Arbitrary.Const; procedure Golden_Ratio is precision : integer; begin if Argument_Count /= 1 then Put_Line("usage: " & Command_Name & " <digits>"); return; end if; precision := integer'value(Argument(1)); declare result : Arbitrary_Type(precision); begin result := Golden_Ratio(precision); Display(result); end; end Golden_Ratio;
pragma Ada_2012; package body GStreamer.Rtsp.Transport is -------------- -- Get_Type -- -------------- function Get_Type return GLIB.GType is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Get_Type unimplemented"); return raise Program_Error with "Unimplemented function Get_Type"; end Get_Type; ----------- -- Parse -- ----------- procedure Parse (Str : String; Transport : out GstRTSPTransport_Record) is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Parse unimplemented"); raise Program_Error with "Unimplemented procedure Parse"; end Parse; ------------- -- As_Text -- ------------- function As_Text (Transport : GstRTSPTransport) return String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "As_Text unimplemented"); return raise Program_Error with "Unimplemented function As_Text"; end As_Text; -------------- -- Get_Mime -- -------------- function Get_Mime (Trans : GstRTSPTransMode) return String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Get_Mime unimplemented"); return raise Program_Error with "Unimplemented function Get_Mime"; end Get_Mime; ----------------- -- Get_Manager -- ----------------- function Get_Manager (Trans : GstRTSPTransMode; Manager : System.Address; Option : GLIB.Guint) return GstRTSPResult is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Get_Manager unimplemented"); return raise Program_Error with "Unimplemented function Get_Manager"; end Get_Manager; ---------- -- Free -- ---------- function Free (Transport : access GstRTSPTransport) return GstRTSPResult is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Free unimplemented"); return raise Program_Error with "Unimplemented function Free"; end Free; ------------- -- Gst_New -- ------------- function Gst_New (Transport : System.Address) return GstRTSPResult is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Gst_New unimplemented"); return raise Program_Error with "Unimplemented function Gst_New"; end Gst_New; ---------- -- Init -- ---------- function Init (Transport : access GstRTSPTransport) return GstRTSPResult is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Init unimplemented"); return raise Program_Error with "Unimplemented function Init"; end Init; ---------------- -- Initialize -- ---------------- procedure Initialize (Object : in out GstRTSPTransport_Record) is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Initialize unimplemented"); raise Program_Error with "Unimplemented procedure Initialize"; end Initialize; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out GstRTSPTransport_Record) is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Finalize unimplemented"); raise Program_Error with "Unimplemented procedure Finalize"; end Finalize; end GStreamer.Rtsp.Transport;
-------------------------------------------------------------------------- -- package body Givens_QR, QR decomposition using Givens rotations -- 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; with Ada.Numerics.Generic_Elementary_Functions; package body Givens_QR is package math is new Ada.Numerics.Generic_Elementary_Functions (Real); use math; Zero : constant Real := +0.0; One : constant Real := +1.0; Two : constant Real := +2.0; Exp_Min : constant Integer := Real'Machine_Emin; Min_Allowed_Real : constant Real := Two**(Exp_Min - Exp_Min / 8); type Int64 is range -2**63+1 .. 2**63-1; -- Make these True: Scaling_Desired : constant Boolean := True; Pivoting_Desired : constant Boolean := True; -- Scaling Prevents overflow during pivoting. With pivoting and -- scaling enabled, the QR usually reveals the rank of matrix A. ------------------------------- -- Inverse_Rotate_Col_Vector -- ------------------------------- -- for getting Q*B procedure Inverse_Rotate_Col_Vector (B : in out Col_Vector; lower_right_id : in R_Index; -- low diagonal element (cos) of rot. matrix upper_left_id : in R_Index; -- top diagonal element (cos) of rot. matrix Rot : in Rotation; P_bigger_than_L : in Boolean) is B_pvt, B_Low : Real; c : real renames Rot.Cosine; s : real renames Rot.Sine; begin -- all you do is flip the sign of Sine. s in part 1, -- and in part 2, 1 + (s-1) becomes -1 - (s-1), where the s-1 is given as s. if P_bigger_than_L then if abs s > Zero then -- optimization uses fact that c is always positive. B_pvt := B(upper_left_id); B_Low := B(lower_right_id); B(upper_left_id) := B_pvt - s*(-c*B_pvt + B_Low); B(lower_right_id) := B_Low - s*( -B_pvt - c*B_Low); end if; else B_pvt := B(upper_left_id); B_Low := B(lower_right_id); B(upper_left_id) :=-B_Low + c*( B_Pvt - s*B_Low); B(lower_right_id) := B_Pvt + c*(+s*B_Pvt + B_Low); end if; end Inverse_Rotate_Col_Vector; pragma Inline (Inverse_Rotate_Col_Vector); ----------------------- -- Rotate_Col_Vector -- ----------------------- -- for getting Q'*B . Uses actual rotation stored in Q, which is the one -- used to create R .. (so Q really contains Q_transpose.) procedure Rotate_Col_Vector (B : in out Col_Vector; lower_right_id : in R_Index; -- low diagonal element (cos) of rot. matrix upper_left_id : in R_Index; -- top diagonal element (cos) of rot. matrix Rot : in Rotation; P_bigger_than_L : in Boolean) is B_pvt, B_Low : Real; c : real renames Rot.Cosine; s : real renames Rot.Sine; begin if P_bigger_than_L then if abs s > Zero then -- rot not identity: use fact c is always positive. B_pvt := B(upper_left_id); B_Low := B(lower_right_id); B(upper_left_id) := B_pvt + s*( c*B_pvt + B_Low); B(lower_right_id) := B_Low + s*( -B_pvt + c*B_Low); end if; else B_pvt := B(upper_left_id); B_Low := B(lower_right_id); B(upper_left_id) := B_Low + c*( B_Pvt + s*B_Low); B(lower_right_id) :=-B_Pvt + c*(-s*B_Pvt + B_Low); end if; end Rotate_Col_Vector; pragma Inline (Rotate_Col_Vector); ----------------------------------- -- Find_Id_Of_Max_Element_Of_Row -- ----------------------------------- procedure Get_Id_Of_Max_Element_Of_Row (The_Row : in Row_Vector; Starting_Col : in C_Index; Final_Col : in C_Index; Id_Of_Max_Element : out C_Index; Val_of_Max_Element : out Real) is Val : Real; begin Id_Of_Max_Element := Starting_Col; Val_of_Max_Element := Abs The_Row(Starting_Col); if Final_Col > Starting_Col then for k in Starting_Col+1 .. Final_Col loop Val := The_Row(k); if Abs Val > Val_of_Max_Element then Val_of_Max_Element := Val; Id_Of_Max_Element := k; end if; end loop; end if; end Get_Id_Of_Max_Element_Of_Row; ------------------ -- QR_Decompose -- ------------------ procedure QR_Decompose (A : in out A_Matrix; Q : out Q_Matrix; Row_Scalings : out Col_Vector; Col_Permutation : out Permutation; Final_Row : in R_Index := R_Index'Last; Final_Col : in C_Index := C_Index'Last; Starting_Row : in R_Index := R_Index'First; Starting_Col : in C_Index := C_Index'First) is No_of_Rows : constant Real := Real (Final_Row) - Real (Starting_Row) + One; No_of_Cols : constant Real := Real (Final_Col) - Real (Starting_Col) + One; Pivot_Row : R_Index := Starting_Row; -- essential init. Norm_Squ_of_Col_of_A : Row_Vector; ------------------------------------------------ -- Rotate_Rows_to_Zero_Out_Element_Lo_of_pCol -- ------------------------------------------------ -- cos = P/r, sin = L/r, r = sqrt(P*P + L*L) -- -- (P is for Pivot, L is for Low. -- -- clockwise rotation: notice all rotations are centered on the diagonal -- -- 1 0 0 0 0 0 0 -- 0 c s 0 0 P r -- 0 -s c 0 0 x L = 0 -- 0 0 0 1 0 0 0 -- 0 0 0 0 1 0 0 -- -- -- if |L| >= |P| then tn = P/L <= 1 -- if |P| > |L| then tn = L/P < 1 -- -- -- let t = smaller / larger -- -- let u = 1/sqrt(1+t*t) and w = sqrt(t*t/(1+t*t)) with -- -- use (1 - 1/sqrt(1+t*t)) * (1 + 1/sqrt(1+t*t)) = t*t / (1 + t*t) -- -- 1/sqrt(1+t*t) - 1 = - t*t/(sqrt(1+t*t) + 1+t*t) -- = -(t/(sqrt(1+t*t))*(t/(1 + Sqrt(1+t*t))) -- = - Abs (w) * Abs (t)/(1+ sqrt(1+t*t)) -- = u_lo -- -- u_hi = 1 => u_lo + u_hi = 1/sqrt(1+t*t) = u = Abs (cs) if a<b -- -- -- hypot = |L| * sqrt(1+t*t) = |L| * (1 + t*t/(1+sqrt(1+t*t)) = hi + lo if t<1 -- -- procedure Rotate_Rows_to_Zero_Out_Element_Lo_of_pCol (pCol : in C_Index; Hi_Row : in R_Index; Lo_Row : in R_Index) is Pivot_Col : C_Index renames pCol; Pivot_Row : R_Index renames Hi_Row; Low_Row : R_Index renames Lo_Row; tn, sq : real; sn, cn : Real; A_pvt, A_low : real; cn_minus_1_over_sn, sn_minus_1_over_cn : real; P : Real := A(Pivot_Row, Pivot_Col); -- P is for Pivot L : Real := A(Low_Row, Pivot_Col); Abs_P : constant Real := Abs (P); Abs_L : constant Real := Abs (L); P_bigger_than_L : Boolean := True; begin -- use Identity if no rotation is performed: Q.Rot(Low_Row, Pivot_Col).Cosine := Zero; Q.Rot(Low_Row, Pivot_Col).Sine := Zero; Q.P_bigger_than_L(Low_Row, Pivot_Col) := True; if (not L'Valid) or (not P'Valid) then return; -- having updated Q w. identity end if; if Abs_P > Abs_L then -- |s| < |c| if Abs_P > Zero then P_bigger_than_L := True; -- Make P>0 always, so if P<0 then flip signs of both P and L -- to ensure zero'd out element. if P < Zero then L := -L; P := Abs_P; end if; tn := L / P; -- P>0 so t has sign of L sq := Sqrt (One + tn*tn); sn := tn / sq; -- sn has sign of L cn_minus_1_over_sn :=-tn / (One + sq); -- factored out the sn from cn_minus_1 for Col in Pivot_Col .. Final_Col loop A_pvt := A(Pivot_Row, Col); A_low := A(Low_Row, Col); A(Pivot_Row, Col) := A_pvt + sn * (cn_minus_1_over_sn*A_pvt + A_low); A(Low_Row, Col) := A_low + sn * (-A_pvt + cn_minus_1_over_sn*A_low); end loop; Q.Rot(Low_Row, Pivot_Col).Cosine := cn_minus_1_over_sn; Q.Rot(Low_Row, Pivot_Col).Sine := sn; Q.P_bigger_than_L(Low_Row, Pivot_Col) := P_bigger_than_L; end if; else -- Abs_P <= Abs_L, so abs t := abs (P / L) <= 1 if Abs_L > Zero then P_bigger_than_L := False; -- Make L>0 always, so if L<0 then flip signs of both P and L -- to ensure zero'd out element. if L < Zero then L := Abs_L; P := -P; end if; tn := P / L; -- L>0 now so, t has sign of P. sq := Sqrt (One + tn*tn); cn := tn / sq; -- has sign of P sn_minus_1_over_cn :=-tn / (One + sq); -- factored out the cn from sn_minus_1 for Col in Pivot_Col .. Final_Col loop A_pvt := A(Pivot_Row, Col); A_low := A(Low_Row, Col); A(Pivot_Row, Col) := A_low + cn * (A_pvt + sn_minus_1_over_cn*A_low); A(Low_Row, Col) :=-A_pvt + cn * (-sn_minus_1_over_cn*A_pvt + A_low); end loop; Q.Rot(Low_Row, Pivot_Col).Cosine := cn; Q.Rot(Low_Row, Pivot_Col).Sine := sn_minus_1_over_cn; Q.P_bigger_than_L(Low_Row, Pivot_Col) := P_bigger_than_L; end if; -- Abs_L > Zero end if; end Rotate_Rows_to_Zero_Out_Element_Lo_of_pCol; procedure Scale_Rows (Row_Scalings : out Col_Vector; Starting_Col : in C_Index := C_Index'First; Final_Col : in C_Index := C_Index'Last; Starting_Row : in R_Index := R_Index'First; Final_Row : in R_Index := R_Index'Last) is Norm : Real; Scale_Factor, Abs_A : Real; begin Row_Scalings := (others => One); -- important init for Row in Starting_Row .. Final_Row loop --Norm := Zero; --Get_1_Norm: --for Col in Starting_Col .. Final_Col loop --if not A(Row, Col)'valid then raise constraint_error with "7"; end if; --Norm := Norm + abs A(Row, Col); --end loop Get_1_Norm; Norm := Zero; Get_Infinity_Norm: for Col in Starting_Col .. Final_Col loop Abs_A := Abs A(Row, Col); if Abs_A > Norm then Norm := Abs_A; end if; end loop Get_Infinity_Norm; if not Norm'Valid then raise Ada.Numerics.Argument_Error with "Elements of input matrix invalid."; end if; if Norm < Two ** (Real'Machine_Emin - Real'Machine_Emin/16) then Scale_Factor := Zero; else declare Norm_Exp : constant Integer := Real'Exponent (Norm); begin Scale_Factor := Two ** (-Norm_Exp); end; end if; Row_Scalings(Row) := Scale_Factor; end loop; for Row in Starting_Row .. Final_Row loop for Col in Starting_Col .. Final_Col loop A(Row, Col) := Row_Scalings(Row) * A(Row, Col); end loop; end loop; end Scale_Rows; -- Find sub Col_Vector with max norm, swap Columns if necessary. procedure Do_Column_Pivoting (Starting_Col : in C_Index; Final_Col : in C_Index; Starting_Row : in R_Index; Final_Row : in R_Index; Pivot_Col : in C_Index; Col_Permutation : in out Permutation; Col_Norm_Squared : in out Row_Vector) is Pivot_Row : constant R_Index := R_Index (Pivot_Col); tmp_index, New_Pivot_Col : C_Index; Pivot_Val, tmp : Real; begin if Pivot_Col >= Final_Col then return; end if; if (Pivot_Col = Starting_Col) or else ((Int64(Pivot_Col) - Int64(Starting_Col)) mod 6 = 0) then -- Without row scaling, we get overflows if matrix is too large. -- Get the right answer accurately every N steps: Col_Norm_Squared := (others => Zero); for r in Pivot_Row .. Final_Row loop for c in Pivot_Col .. Final_Col loop Col_Norm_Squared(c) := Col_Norm_Squared(c) + A(r, c)**2; end loop; end loop; -- fastest with Ada array convention rather than fortran. else -- Optimization: length of Col is invariant under rotations, so just -- subtract away the unwanted element in Col from the old sum for Norm_Squ: -- Norm_Squared (Col) := Norm_Squared (Col) - A(Pivot_Row-1, Col)**2; -- Has bad accuracy. for c in Pivot_Col .. Final_Col loop Col_Norm_Squared(c) := Col_Norm_Squared(c) - A(Pivot_Row-1, c)**2; end loop; end if; Get_Id_Of_Max_Element_Of_Row (The_Row => Col_Norm_Squared, Starting_Col => Pivot_Col, Final_Col => Final_Col, Id_Of_Max_Element => New_Pivot_Col, Val_of_Max_Element => Pivot_Val); if New_Pivot_Col > Pivot_Col then for r in Starting_Row .. Final_Row loop tmp := A(r, New_Pivot_Col); A(r, New_Pivot_Col) := A(r, Pivot_Col); A(r, Pivot_Col) := tmp; end loop; tmp := Col_Norm_Squared (New_Pivot_Col); Col_Norm_Squared(New_Pivot_Col) := Col_Norm_Squared (Pivot_Col); Col_Norm_Squared(Pivot_Col) := tmp; tmp_index := Col_Permutation(New_Pivot_Col); Col_Permutation(New_Pivot_Col) := Col_Permutation(Pivot_Col); Col_Permutation(Pivot_Col) := tmp_index; end if; end Do_Column_Pivoting; begin -- Important Inits. Q.Rot := (others => (others => Identity)); Q.P_bigger_than_L := (others => (others => True)); Q.Final_Row := Final_Row; Q.Final_Col := Final_Col; Q.Starting_Row := Starting_Row; Q.Starting_Col := Starting_Col; Row_Scalings := (others => One); -- important init for j in C_Index loop Col_Permutation(j) := j; end loop; if No_Of_Cols > No_of_Rows then raise Ada.Numerics.Argument_Error with "Can't have more columns than rows."; end if; if No_Of_Cols < 2.0 then raise Ada.Numerics.Argument_Error with "Need at least 2 columns in matrix."; end if; -- Step 1. Column Scaling. Scaling prevents overflow when 2-norms are calculated. if Scaling_Desired then Scale_Rows (Row_Scalings => Row_Scalings, Starting_Col => Starting_Col, Final_Col => Final_Col, Starting_Row => Starting_Row, Final_Row => Final_Row); end if; -- Start the QR decomposition Pivot_Row := Starting_Row; -- essential init. for Pivot_Col in Starting_Col .. Final_Col loop if Pivoting_Desired then Do_Column_Pivoting (Starting_Col => Starting_Col, Final_Col => Final_Col, Starting_Row => Starting_Row, Final_Row => Final_Row, Pivot_Col => Pivot_Col, Col_Permutation => Col_Permutation, Col_Norm_Squared => Norm_Squ_of_Col_of_A); end if; -- pivoting_desired if Pivot_Row < Final_Row then for Low_Row in Pivot_Row+1 .. Final_Row loop Rotate_Rows_to_Zero_Out_Element_Lo_of_pCol (pCol => Pivot_Col, -- Element to zero out is A(Lo_Row, pCol) Hi_Row => Pivot_Row, -- High to the eye; its id is lower than Lo_Row's. Lo_Row => Low_Row); A(Low_Row, Pivot_Col) := Zero; end loop; -- over Low_Row end if; -- Pivot_Row < Final_Row if Pivot_Row < Final_Row then Pivot_Row := Pivot_Row + 1; end if; -- We are always finished if Pivot_Row = Final_Row because have M rows >= N cols end loop; -- over Pivot_Col -- To unscale the R matrix (A) you scale the Cols of A=R w/ Inv_Row_Scalings(Col). -- Bad idea because the scaled R=A has diag elements in monotonic decreasing order. end QR_Decompose; -------------------- -- Q_x_Col_Vector -- -------------------- -- Get Product = Q*B -- -- Apply the inverses of all the 2x2 rotation matrices in the order opposite to the -- order in which they were created: Start w/ most recent and wrk backwards in time. function Q_x_Col_Vector (Q : in Q_Matrix; B : in Col_Vector) return Col_Vector is Product : Col_Vector; Final_Row : R_Index renames Q.Final_Row; Final_Col : C_Index renames Q.Final_Col; Starting_Row : R_Index renames Q.Starting_Row; Starting_Col : C_Index renames Q.Starting_Col; Pivot_Row : R_Index := Starting_Row; P_is_the_Bigger : Boolean; begin -- The loop bounds reflect the design of Q. Q is stored in -- matrix A, which was defined to be M x N via Starting_Row, -- Starting_Col, etc. Product := B; Pivot_Row := R_Index (Int64(Final_Col) + Int64(Starting_Row) - Int64(Starting_Col)); for Pivot_Col in reverse Starting_Col .. Final_Col loop if Pivot_Row < Final_Row then for Low_Row in reverse Pivot_Row+1 .. Final_Row loop P_is_the_bigger := Q.P_bigger_than_L (Low_Row, Pivot_Col); Inverse_Rotate_Col_Vector (Product, Low_Row, Pivot_Row, Q.Rot(Low_Row, Pivot_Col), P_is_the_bigger); end loop; end if; if Pivot_Row > Starting_Row then Pivot_Row := Pivot_Row - 1; end if; end loop; return Product; end Q_x_Col_Vector; ------------------------------ -- Q_transpose_x_Col_Vector -- ------------------------------ -- Get Product = Q'*B -- -- Apply the the 2x2 rotation matrices in the order in which they were created. -- Start w/ oldest and wrk forwards in time. function Q_transpose_x_Col_Vector (Q : in Q_Matrix; B : in Col_Vector) return Col_Vector is Product : Col_Vector; Final_Row : R_Index renames Q.Final_Row; Final_Col : C_Index renames Q.Final_Col; Starting_Row : R_Index renames Q.Starting_Row; Starting_Col : C_Index renames Q.Starting_Col; Pivot_Row : R_Index := Starting_Row; P_is_the_bigger : Boolean; begin -- The loop bounds reflect the design of Q. Q is stored in -- matrix A, which was defined to be M x N via Starting_Row, -- Starting_Col, etc. Product := B; Pivot_Row := Starting_Row; for Pivot_Col in Starting_Col .. Final_Col loop if Pivot_Row < Final_Row then for Low_Row in Pivot_Row+1 .. Final_Row loop P_is_the_bigger := Q.P_bigger_than_L (Low_Row, Pivot_Col); Rotate_Col_Vector (Product, Low_Row, Pivot_Row, Q.Rot(Low_Row, Pivot_Col), P_is_the_bigger); end loop; Pivot_Row := Pivot_Row + 1; end if; end loop; return Product; end Q_transpose_x_Col_Vector; -------------- -- QR_Solve -- -------------- -- A*X = B. -- S*A*P = Q*R where S is diagonal matrix of row scalings; P permutes cols. -- So X = P*R^(-1)*Q'*S*B where Q is orthogonal, so Q' = Q^(-1). procedure QR_Solve (X : out Row_Vector; B : in Col_Vector; R : in A_Matrix; -- We overwrote A with R, so input A here. Q : in Q_Matrix; Row_Scalings : in Col_Vector; Col_Permutation : in Permutation; Singularity_Cutoff : in Real := Default_Singularity_Cutoff) is Final_Row : R_Index renames Q.Final_Row; Final_Col : C_Index renames Q.Final_Col; Starting_Row : R_Index renames Q.Starting_Row; Starting_Col : C_Index renames Q.Starting_Col; Max_R_Diagonal_Val : constant Real := Abs R(Starting_Row, Starting_Col); R_Diagonal_Inv : Row_Vector; Sum : Real; B1, B2 : Col_Vector; B0, X0 : Row_Vector; Row : R_Index := Starting_Row; begin -- X = P * R_inverse * Q' * S * B where diagonal matrix S scaled the rows of A for i in R_Index loop B2(i) := Row_Scalings(i) * B(i); -- Row_Scalings was initialized to 1. end loop; -- X is out, so init: for j in C_Index loop X(j) := Zero; X0(j) := Zero; end loop; -- Get B1 = Q'*B2 B1 := Q_transpose_x_Col_Vector (Q, B2); -- put Column B1 into a row B0 of A (ie indexed by C_Index): for i in Starting_Col .. Final_Col loop Row := R_Index(Int64 (i-Starting_Col) + Int64(Starting_Row)); B0(i) := B1(Row); end loop; -- Now R*X0 = B0; solve for X0. -- No_of_Rows >= No_of_Cols. We stop at Final_Col, so -- effectively we are assuming that R is square (upper triangular actually). Row := Starting_Row; for Col in Starting_Col .. Final_Col loop if Abs R(Row,Col) < Abs (Singularity_Cutoff * Max_R_Diagonal_Val) or Abs R(Row,Col) < Min_Allowed_Real then R_Diagonal_Inv(Col) := Zero; else R_Diagonal_Inv(Col) := One / R(Row,Col); end if; if Row < Final_Row then Row := Row + 1; end if; end loop; X0(Final_Col) := B0(Final_Col) * R_Diagonal_Inv(Final_Col); if Final_Col > Starting_Col then for Col in reverse Starting_Col .. Final_Col-1 loop Row := R_Index (Int64 (Col-Starting_Col) + Int64 (Starting_Row)); Sum := Zero; for j in Col+1 .. Final_Col loop Sum := Sum + R(Row, j) * X0(j); end loop; X0(Col) := (B0(Col) - Sum) * R_Diagonal_Inv(Col); end loop; end if; for i in C_Index loop X(Col_Permutation(i)) := X0(i); end loop; -- x = S * P * R_inverse * Q' * B end QR_Solve; ------------------ -- Q_x_V_Matrix -- ------------------ -- Get Product = Q*V -- The columns of V are vectors indexed by R_index. -- Not Q' times Matrix V but Q*V, so -- apply the inverses of all the 2x2 rotation matrices in the order opposite to the -- order in which they were created: Start w/ most recent and wrk backwards in time. -- The columns of V must be same length as Columns of original matrix A, (hence Q). -- The number of these Cols is unimportant (set statically: V is a generic formal). -- Q is MxM: No_of_Rows x No_of_Rows, since Q*R = A, and R has shape of A. procedure Q_x_V_Matrix (Q : in Q_Matrix; V : in out V_Matrix) is Final_Row : R_Index renames Q.Final_Row; Final_Col : C_Index renames Q.Final_Col; Starting_Row : R_Index renames Q.Starting_Row; Starting_Col : C_Index renames Q.Starting_Col; s, c : Real; V_pvt, V_Low : Real; Pivot_Row : R_Index := Starting_Row; begin -- The loop bounds reflect the design of Q. Q is stored in -- matrix A, which was defined to be M x N via Starting_Row, -- Starting_Col, etc. Pivot_Row := R_Index (Integer(Final_Col) + Integer (Starting_Row) - Integer(Starting_Col)); -- The following 2 loops range over all the 2x2 rotation matrices in Q. -- Each 2x2 rotates 2 Row_Vectors of V. -- The columns of V must be same length as Columns of original matrix A, (hence Q). for Pivot_Col in reverse Starting_Col .. Final_Col loop if Pivot_Row < Final_Row then for Low_Row in reverse Pivot_Row+1 .. Final_Row loop s := Q.Rot(Low_Row, Pivot_Col).Sine; c := Q.Rot(Low_Row, Pivot_Col).Cosine; if Q.P_bigger_than_L(Low_Row, Pivot_Col) then --abs A(piv,piv )> abs A(low,piv) --if abs s > Zero then -- rot isn't identity: use fact c is always positive. for Col in V'Range(2) loop V_pvt := V(Pivot_Row, Col); V_Low := V(Low_Row, Col); V(Pivot_Row, Col) := V_pvt - s*(-c*V_pvt + V_Low); V(Low_Row, Col) := V_Low - s*( -V_pvt - c*V_Low); end loop; --end if; else for Col in V'Range(2) loop V_pvt := V(Pivot_Row, Col); V_Low := V(Low_Row, Col); V(Pivot_Row, Col) :=-V_Low + c*( V_Pvt - s*V_Low); V(Low_Row, Col) := V_Pvt + c*(+s*V_Pvt + V_Low); end loop; end if; end loop; -- Low_Row in Final_Row to Pivot_Row+1 end if; if Pivot_Row > Starting_Row then Pivot_Row := Pivot_Row - 1; end if; end loop; end Q_x_V_Matrix; ---------------------------- -- Q_transpose_x_V_Matrix -- ---------------------------- -- Get Product = Q'*V -- -- Apply the the 2x2 rotation matrices in the order in which they were created. -- Start w/ oldest and wrk forwards in time. Use the same rotation used to -- create R (ie the actual rotation stored on Q, not its inverse. -- Q really contains Q_transpose.) -- -- The columns of V are vectors indexed by R_index. -- The columns of V must be same length as Columns of original matrix A, (hence Q). -- The number of these Cols is unimportant (set statically: V is a generic formal). -- Q is MxM: No_of_Rows x No_of_Rows, (since Q*R = A, and R has shape of A). -- procedure Q_transpose_x_V_Matrix (Q : in Q_Matrix; V : in out V_Matrix) is Final_Row : R_Index renames Q.Final_Row; Final_Col : C_Index renames Q.Final_Col; Starting_Row : R_Index renames Q.Starting_Row; Starting_Col : C_Index renames Q.Starting_Col; s, c : Real; V_pvt, V_Low : Real; Pivot_Row : R_Index := Starting_Row; begin -- The loop bounds reflect the design of Q. Q is stored in -- matrix A, which was defined to be M x N via Starting_Row, -- Starting_Col, etc. -- The following 2 loops range over all the 2x2 rotation matrices in Q. -- Each 2x2 rotates 2 Row_Vectors of V. -- The columns of V must be same length as Columns of original matrix A, (hence Q). Pivot_Row := Starting_Row; for Pivot_Col in Starting_Col .. Final_Col loop if Pivot_Row < Final_Row then for Low_Row in Pivot_Row+1 .. Final_Row loop s := Q.Rot(Low_Row, Pivot_Col).Sine; c := Q.Rot(Low_Row, Pivot_Col).Cosine; if Q.P_bigger_than_L(Low_Row, Pivot_Col) then --abs A(piv,piv )> abs A(low,piv) --if abs s > Zero then -- rot not identity: use fact c is always positive. for Col in V'Range(2) loop V_pvt := V(Pivot_Row, Col); V_Low := V(Low_Row, Col); V(Pivot_Row, Col) := V_pvt + s*(c*V_pvt + V_Low); V(Low_Row, Col) := V_Low + s*( -V_pvt + c*V_Low); end loop; --end if; else for Col in V'Range(2) loop V_pvt := V(Pivot_Row, Col); V_Low := V(Low_Row, Col); V(Pivot_Row, Col) := V_Low + c*( V_Pvt + s*V_Low); V(Low_Row, Col) :=-V_Pvt + c*(-s*V_Pvt + V_Low); end loop; end if; end loop; Pivot_Row := Pivot_Row + 1; end if; end loop; end Q_transpose_x_V_Matrix; -------------------- -- Q_x_Matrix -- -------------------- -- Get Product = Q*A procedure Q_x_Matrix (Q : in Q_Matrix; A : in out A_Matrix) is B : Col_Vector := (others => Zero); C : Col_Vector; Final_Row : R_Index renames Q.Final_Row; Final_Col : C_Index renames Q.Final_Col; Starting_Row : R_Index renames Q.Starting_Row; Starting_Col : C_Index renames Q.Starting_Col; begin for Col in Starting_Col .. Final_Col loop for Row in Starting_Row .. Final_Row loop B(Row) := A(Row, Col); end loop; C := Q_x_Col_Vector (Q, B); for Row in Starting_Row .. Final_Row loop A(Row, Col) := C(Row); end loop; end loop; end Q_x_Matrix; end Givens_QR;
package Slots is procedure Xaa; procedure Xab; procedure Xac; procedure S1a(Value : in Integer); procedure S1b(Value : in Integer); procedure S1c(Value : in Integer); end Slots;
with AdaBase; with Connect; with CommonText; with Ada.Text_IO; with AdaBase.Results.Sets; procedure Spatial2 is package CON renames Connect; package TIO renames Ada.Text_IO; package ARS renames AdaBase.Results.Sets; package CT renames CommonText; begin CON.connect_database; declare sql : constant String := "SELECT" & " sp_point" & ", ST_AsText (sp_point) as tx_point" & ", sp_linestring" & ", ST_AsText (sp_linestring) as tx_linestring" & ", sp_multi_point" & ", ST_AsText (sp_multi_point) as tx_multi_point" & ", sp_multi_line_string" & ", ST_AsText (sp_multi_line_string) as tx_multi_line_string" & ", sp_polygon" & ", ST_AsText (sp_polygon) as tx_polygon" & ", sp_outer_ring" & ", ST_AsText (sp_outer_ring) as tx_outer_ring" & ", sp_multi_polygon" & ", ST_AsText (sp_multi_polygon) as tx_multi_polygon" & ", sp_geo_collection" & ", ST_AsText (sp_geo_collection) as tx_geo_collection" & ", sp_geometry" & ", ST_AsText (sp_geometry) as tx_geometry" & ", sp_coll2" & ", ST_AsText (sp_coll2) as tx_coll2" & ", sp_geometry2" & ", ST_AsText (sp_geometry2) as tx_geometry2" & " FROM spatial_plus"; stmt : CON.Stmt_Type := CON.DR.query (sql); row : ARS.Datarow; begin if not stmt.successful then TIO.Put_Line (stmt.last_driver_message); return; end if; loop row := stmt.fetch_next; exit when row.data_exhausted; for x in Natural range 1 .. row.count loop TIO.Put (" column : "); TIO.Put (stmt.column_name (x)); TIO.Put_Line (" : " & row.column (x).native_type'Img); TIO.Put_Line (row.column (x).as_string); end loop; end loop; end; CON.DR.disconnect; end Spatial2;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2013, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package body Matreshka.Internals.Calendars.Times is X_Open_Epoch : constant := 2_299_161; -- Julian day number of start of X/Open representation -- October, 15, 1582 Ticks_In_Day : constant := 24 * 60 * 60 * 10_000_000; Ticks_In_Hour : constant := 60 * 60 * 10_000_000; Ticks_In_Minute : constant := 60 * 10_000_000; Ticks_In_Second : constant := 10_000_000; type Leap_Second_Information is record Julian_Day : Julian_Day_Number; Stamp : Absolute_Time; Correction : Absolute_Time; end record; -- When adding new leap second check this: -- (Leaps(1).Julian_Day - Leaps(2).Julian_Day) * 24*60*60 + 1 leap second -- should be equal to (Leaps(1).Stamp - Leaps(2).Stamp)/10_000_000 Leaps : constant array (Positive range <>) of Leap_Second_Information := ((2457754, 137025216260000000, 270000000), -- 2016-12-31 (2457204, 136550016250000000, 260000000), -- 2015-06-30 (2456109, 135603936240000000, 250000000), -- 2012-06-30 (2454832, 134500608230000000, 240000000), -- 2008-12-31 (2453736, 133553664220000000, 230000000), -- 2005-12-31 (2451179, 131344416210000000, 220000000), -- 1998-12-31 (2450630, 130870080200000000, 210000000), -- 1997-06-30 (2450083, 130397472190000000, 200000000), -- 1995-12-31 (2449534, 129923136180000000, 190000000), -- 1994-06-30 (2449169, 129607776170000000, 180000000), -- 1993-06-30 (2448804, 129292416160000000, 170000000), -- 1992-06-30 (2448257, 128819808150000000, 160000000), -- 1990-12-31 (2447892, 128504448140000000, 150000000), -- 1989-12-31 (2447161, 127872864130000000, 140000000), -- 1987-12-31 (2446247, 127083168120000000, 130000000), -- 1985-06-30 (2445516, 126451584110000000, 120000000), -- 1983-06-30 (2445151, 126136224100000000, 110000000), -- 1982-06-30 (2444786, 125820864090000000, 100000000), -- 1981-06-30 (2444239, 125348256080000000, 90000000), -- 1979-12-31 (2443874, 125032896070000000, 80000000), -- 1978-12-31 (2443509, 124717536060000000, 70000000), -- 1977-12-31 (2443144, 124402176050000000, 60000000), -- 1976-12-31 (2442778, 124085952040000000, 50000000), -- 1975-12-31 (2442413, 123770592030000000, 40000000), -- 1974-12-31 (2442048, 123455232020000000, 30000000), -- 1973-12-31 (2441683, 123139872010000000, 20000000), -- 1972-12-31 (2441499, 122980896000000000, 10000000)); -- 1972-06-30 ------------ -- Create -- ------------ function Create (Zone : not null Time_Zone_Access; Julian_Day : Julian_Day_Number; Hour : Hour_Number; Minute : Minute_Number; Second : Second_Number; Nano_100 : Nano_Second_100_Number) return Absolute_Time is pragma Unreferenced (Zone); -- XXX Time zone is not supported yet. Stamp : Absolute_Time; Row : Natural := 0; -- Number of row in correction table to obtain nearset next leap second -- day. begin -- Construct absolute time from all components except second and its -- fraction. Resulted absolute time will never be inside nearest next -- leap second. Stamp := Absolute_Time (Julian_Day - X_Open_Epoch) * Ticks_In_Day + Absolute_Time (Hour) * Ticks_In_Hour + Absolute_Time (Minute) * Ticks_In_Minute; -- Looking for leap second correction and correct absolute time when -- necessary. for J in Leaps'Range loop if Stamp > Leaps (J).Stamp - Leaps (J).Correction + 10_000_000 then Stamp := Stamp + Leaps (J).Correction; Row := J - 1; exit; end if; end loop; -- Check whether leap second can be used. if Second = 60 and then (Row not in Leaps'Range or else Leaps (Row).Julian_Day /= Julian_Day) then raise Constraint_Error; end if; -- Add second and its fraction components. return Stamp + Absolute_Time (Second) * Ticks_In_Second + Absolute_Time (Nano_100); end Create; ---------- -- Hour -- ---------- function Hour (Stamp : Absolute_Time; Zone : not null Time_Zone_Access) return Hour_Number is Julian_Day : Julian_Day_Number; Time : Relative_Time; Leap : Relative_Time; begin Split (Zone, Stamp, Julian_Day, Time, Leap); return Hour_Number (Time / Ticks_In_Hour); end Hour; ---------- -- Hour -- ---------- function Hour (Time : Relative_Time) return Hour_Number is begin return Hour_Number (Time / Ticks_In_Hour); end Hour; ---------------- -- Julian_Day -- ---------------- function Julian_Day (Stamp : Absolute_Time; Zone : not null Time_Zone_Access) return Julian_Day_Number is Julian_Day : Julian_Day_Number; Time : Relative_Time; Leap : Relative_Time; begin Split (Zone, Stamp, Julian_Day, Time, Leap); return Julian_Day; end Julian_Day; ------------ -- Minute -- ------------ function Minute (Stamp : Absolute_Time; Zone : not null Time_Zone_Access) return Minute_Number is Julian_Day : Julian_Day_Number; Time : Relative_Time; Leap : Relative_Time; begin Split (Zone, Stamp, Julian_Day, Time, Leap); return Minute_Number ((Time mod Ticks_In_Hour) / Ticks_In_Minute); end Minute; ------------ -- Minute -- ------------ function Minute (Time : Relative_Time) return Minute_Number is begin return Minute_Number ((Time mod Ticks_In_Hour) / Ticks_In_Minute); end Minute; -------------------- -- Nanosecond_100 -- -------------------- function Nanosecond_100 (Stamp : Absolute_Time; Zone : not null Time_Zone_Access) return Nano_Second_100_Number is Julian_Day : Julian_Day_Number; Time : Relative_Time; Leap : Relative_Time; begin Split (Zone, Stamp, Julian_Day, Time, Leap); return Nano_Second_100_Number ((Time mod Ticks_In_Minute + Leap mod Ticks_In_Minute) mod Ticks_In_Second); end Nanosecond_100; -------------------- -- Nanosecond_100 -- -------------------- function Nanosecond_100 (Time : Relative_Time; Leap : Relative_Time) return Nano_Second_100_Number is begin return Nano_Second_100_Number ((Time mod Ticks_In_Minute + Leap mod Ticks_In_Minute) mod Ticks_In_Second); end Nanosecond_100; ------------ -- Second -- ------------ function Second (Stamp : Absolute_Time; Zone : not null Time_Zone_Access) return Second_Number is Julian_Day : Julian_Day_Number; Time : Relative_Time; Leap : Relative_Time; begin Split (Zone, Stamp, Julian_Day, Time, Leap); return Second_Number ((Time mod Ticks_In_Minute + Leap mod Ticks_In_Minute) / Ticks_In_Second); end Second; ------------ -- Second -- ------------ function Second (Time : Relative_Time; Leap : Relative_Time) return Second_Number is begin return Second_Number ((Time mod Ticks_In_Minute + Leap mod Ticks_In_Minute) / Ticks_In_Second); end Second; ----------- -- Split -- ----------- procedure Split (Zone : not null Time_Zone_Access; Stamp : Absolute_Time; Julian_Day : out Julian_Day_Number; Time : out Relative_Time; Leap : out Relative_Time) is pragma Unreferenced (Zone); -- XXX Timezone is not supported. Corrected_Stamp : Absolute_Time := Stamp; begin -- Compensate leap seconds and extract leap second duration when -- necessary. Leap := 0; -- Going through list of leap seconds. for J in Leaps'Range loop if Stamp >= Leaps (J).Stamp + 10_000_000 then -- Stamp is larger than current leap second and outside of leap -- second range. Corrected_Stamp := Stamp - Leaps (J).Correction; exit; elsif Stamp >= Leaps (J).Stamp then -- Stamp is inside leap second range. Corrected_Stamp := Leaps (J).Stamp - Leaps (J).Correction + 10_000_000 - 1; Leap := Relative_Time (Stamp - Leaps (J).Stamp + 1); exit; end if; end loop; -- Compute julian day number and relative time. Julian_Day := Julian_Day_Number (Corrected_Stamp / (Ticks_In_Day)) + X_Open_Epoch; Time := Relative_Time (Corrected_Stamp mod (Ticks_In_Day)); end Split; ----------- -- Split -- ----------- procedure Split (Zone : not null Time_Zone_Access; Stamp : Absolute_Time; Julian_Day : out Julian_Day_Number; Hour : out Hour_Number; Minute : out Minute_Number; Second : out Second_Number; Nanosecond_100 : out Nano_Second_100_Number) is Leap : Relative_Time; Time : Relative_Time; Corrected_Stamp : Absolute_Time := Stamp; begin -- Compensate leap seconds and extract leap second duration when -- necessary. Leap := 0; -- Going through list of leap seconds. for J in Leaps'Range loop if Stamp >= Leaps (J).Stamp + 10_000_000 then -- Stamp is larger than current leap second and outside of leap -- second range. Corrected_Stamp := Stamp - Leaps (J).Correction; exit; elsif Stamp >= Leaps (J).Stamp then -- Stamp is inside leap second range. Corrected_Stamp := Leaps (J).Stamp - Leaps (J).Correction + 10_000_000 - 1; Leap := Relative_Time (Stamp - Leaps (J).Stamp + 1); exit; end if; end loop; -- Apply timezone offset. for J in Zone.Data'Range loop if Corrected_Stamp >= Zone.Data (J).From then Corrected_Stamp := Corrected_Stamp + Absolute_Time (Zone.Data (J).Offset); exit; end if; end loop; -- Compute julian day number and relative time. Julian_Day := Julian_Day_Number (Corrected_Stamp / (Ticks_In_Day)) + X_Open_Epoch; Time := Relative_Time (Corrected_Stamp mod (Ticks_In_Day)); Hour := Hour_Number (Time / Ticks_In_Hour); Minute := Minute_Number ((Time mod Ticks_In_Hour) / Ticks_In_Minute); Second := Second_Number ((Time mod Ticks_In_Minute + Leap mod Ticks_In_Minute) / Ticks_In_Second); Nanosecond_100 := Nano_Second_100_Number ((Time mod Ticks_In_Minute + Leap mod Ticks_In_Minute) mod Ticks_In_Second); end Split; end Matreshka.Internals.Calendars.Times;
-- C35A05A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT FOR FIXED POINT TYPES THE FORE AND AFT ATTRIBUTES YIELD -- THE CORRECT VALUES. -- CASE A: BASIC TYPES THAT FIT THE CHARACTERISTICS OF DURATION'BASE. -- WRG 8/8/86 WITH REPORT; USE REPORT; PROCEDURE C35A05A IS -- THE NAME OF EACH TYPE OR SUBTYPE ENDS WITH THAT TYPE'S -- 'MANTISSA VALUE. TYPE LEFT_OUT_M1 IS DELTA 0.25 RANGE -0.5 .. 0.5; TYPE LEFT_EDGE_M1 IS DELTA 0.5 RANGE -1.0 .. 1.0; TYPE RIGHT_EDGE_M1 IS DELTA 1.0 RANGE -2.0 .. 2.0; TYPE RIGHT_OUT_M1 IS DELTA 2.0 RANGE -4.0 .. 4.0; TYPE MIDDLE_M2 IS DELTA 0.5 RANGE -2.0 .. 2.0; TYPE MIDDLE_M3 IS DELTA 0.5 RANGE 0.0 .. 2.5; TYPE MIDDLE_M15 IS DELTA 2.0 **(-6) RANGE -512.0 .. 512.0; TYPE MIDDLE_M16 IS DELTA 2.0 **(-6) RANGE -1024.0 .. 1024.0; TYPE LIKE_DURATION_M23 IS DELTA 0.020 RANGE -86_400.0 .. 86_400.0; TYPE DECIMAL_M18 IS DELTA 0.1 RANGE -10_000.0 .. 10_000.0; TYPE DECIMAL_M4 IS DELTA 100.0 RANGE -1000.0 .. 1000.0; TYPE DECIMAL_M11 IS DELTA 0.09999 RANGE -100.0 .. 100.0; TYPE DECIMAL2_M18 IS DELTA 0.1 RANGE -9999.0 .. 9999.0; ------------------------------------------------------------------- SUBTYPE ST_LEFT_EDGE_M6 IS MIDDLE_M15 DELTA 2.0 ** (-6) RANGE IDENT_INT (1) * (-1.0) .. 1.0; SUBTYPE ST_MIDDLE_M14 IS MIDDLE_M16 DELTA 2.0 ** (-5) RANGE -512.0 .. IDENT_INT (1) * 512.0; SUBTYPE ST_MIDDLE_M2 IS LIKE_DURATION_M23 DELTA 0.5 RANGE -2.0 .. 2.0; SUBTYPE ST_MIDDLE_M3 IS LIKE_DURATION_M23 DELTA 0.5 RANGE 0.0 .. 2.5; SUBTYPE ST_DECIMAL_M7 IS DECIMAL_M18 DELTA 10.0 RANGE -1000.0 .. 1000.0; SUBTYPE ST_DECIMAL_M3 IS DECIMAL_M4 DELTA 100.0 RANGE -500.0 .. 500.0; ------------------------------------------------------------------- PROCEDURE CHECK_FORE_AND_AFT (NAME : STRING; ACTUAL_FORE : INTEGER; CORRECT_FORE : POSITIVE; ACTUAL_AFT : INTEGER; CORRECT_AFT : POSITIVE) IS BEGIN IF ACTUAL_FORE /= IDENT_INT (CORRECT_FORE) THEN FAILED (NAME & "'FORE =" & INTEGER'IMAGE(ACTUAL_FORE) ); END IF; IF ACTUAL_AFT /= IDENT_INT (CORRECT_AFT) THEN FAILED (NAME & "'AFT =" & INTEGER'IMAGE(ACTUAL_AFT) ); END IF; END CHECK_FORE_AND_AFT; BEGIN TEST ("C35A05A", "CHECK THAT FOR FIXED POINT TYPES THE FORE AND " & "AFT ATTRIBUTES YIELD THE CORRECT VALUES - " & "BASIC TYPES"); CHECK_FORE_AND_AFT ("LEFT_OUT_M1", LEFT_OUT_M1'FORE, 2, LEFT_OUT_M1'AFT, 1); CHECK_FORE_AND_AFT ("LEFT_EDGE_M1", LEFT_EDGE_M1'FORE, 2, LEFT_EDGE_M1'AFT, 1); CHECK_FORE_AND_AFT ("RIGHT_EDGE_M1", RIGHT_EDGE_M1'FORE, 2, RIGHT_EDGE_M1'AFT, 1); CHECK_FORE_AND_AFT ("RIGHT_OUT_M1", RIGHT_OUT_M1'FORE, 2, RIGHT_OUT_M1'AFT, 1); CHECK_FORE_AND_AFT ("MIDDLE_M2", MIDDLE_M2'FORE, 2, MIDDLE_M2'AFT, 1); CHECK_FORE_AND_AFT ("MIDDLE_M3", MIDDLE_M3'FORE, 2, MIDDLE_M3'AFT, 1); CHECK_FORE_AND_AFT ("MIDDLE_M15", MIDDLE_M15'FORE, 4, MIDDLE_M15'AFT, 2); CHECK_FORE_AND_AFT ("MIDDLE_M16", MIDDLE_M16'FORE, 5, MIDDLE_M16'AFT, 2); CHECK_FORE_AND_AFT ("LIKE_DURATION_M23", LIKE_DURATION_M23'FORE, 6, LIKE_DURATION_M23'AFT, 2); CHECK_FORE_AND_AFT ("DECIMAL_M18", DECIMAL_M18'FORE, 6, DECIMAL_M18'AFT, 1); IF DECIMAL_M4'FORE /= 5 AND DECIMAL_M4'FORE /= 4 THEN FAILED ("DECIMAL_M4'FORE =" & INTEGER'IMAGE(DECIMAL_M4'FORE) ); END IF; IF DECIMAL_M4'AFT /= 1 THEN FAILED ("DECIMAL_M4'AFT =" & INTEGER'IMAGE(DECIMAL_M4'AFT) ); END IF; CHECK_FORE_AND_AFT ("DECIMAL_M11", DECIMAL_M11'FORE, 4, DECIMAL_M11'AFT, 2); CHECK_FORE_AND_AFT ("DECIMAL2_M18", DECIMAL2_M18'FORE, 5, DECIMAL2_M18'AFT, 1); CHECK_FORE_AND_AFT ("ST_LEFT_EDGE_M6", ST_LEFT_EDGE_M6'FORE, 2, ST_LEFT_EDGE_M6'AFT, 2); CHECK_FORE_AND_AFT ("ST_MIDDLE_M14", ST_MIDDLE_M14'FORE, 4, ST_MIDDLE_M14'AFT, 2); CHECK_FORE_AND_AFT ("ST_MIDDLE_M2", ST_MIDDLE_M2'FORE, 2, ST_MIDDLE_M2'AFT, 1); CHECK_FORE_AND_AFT ("ST_MIDDLE_M3", ST_MIDDLE_M3'FORE, 2, ST_MIDDLE_M3'AFT, 1); CHECK_FORE_AND_AFT ("ST_DECIMAL_M7", ST_DECIMAL_M7'FORE, 5, ST_DECIMAL_M7'AFT, 1); CHECK_FORE_AND_AFT ("ST_DECIMAL_M3", ST_DECIMAL_M3'FORE, 4, ST_DECIMAL_M3'AFT, 1); RESULT; END C35A05A;
-- PR ada/33788 -- Origin: Oliver Kellogg <oliver.kellogg@eads.com> -- { dg-do compile } package body Bit_Packed_Array1 is procedure Generate_Callforward is Compiler_Crash : String := Laser_Illuminator_Code_Group_T'Image (MADR.ISF.Laser_Illuminator_Code (0)); begin null; end Generate_Callforward; end Bit_Packed_Array1;
-- { dg-do run } with addr2_p; use addr2_p; procedure addr2 is begin Process (B1); Process (Blk => B1); Process (B2); Process (Blk => B2); end;
separate (Numerics.Sparse_Matrices) procedure Compress (Mat : in out Sparse_Matrix) is X : Real_Vector (1 .. Integer (Mat.X.Length)) := (others => 0.0); I : Int_Array (1 .. Integer (Mat.X.Length)) := (others => 0); Col, Count : Int_Array (1 .. Mat.N_Col + 1) := (others => 0); Index : Nat := 1; P : IVector renames Mat.P; begin Mat.Format := CSC; for K of P loop Count (K) := Count (K) + 1; end loop; Cumulative_Sum (Count); Col := Count; for K in 1 .. Pos (Mat.X.Length) loop Index := Col (P (K)); Col (P (K)) := Col (P (K)) + 1; I (Index) := Mat.I (K); X (Index) := Mat.X (K); end loop; Set (Mat.I, I); Set (Mat.X, X); Set (Mat.P, Count); Convert (Mat); Convert (Mat); Remove_Duplicates (Mat); end Compress;
pragma Style_Checks (Off); -- This spec has been automatically generated from STM32H743x.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.Flash is pragma Preelaborate; --------------- -- Registers -- --------------- subtype ACR_LATENCY_Field is HAL.UInt4; subtype ACR_WRHIGHFREQ_Field is HAL.UInt2; -- Access control register type ACR_Register is record -- Read latency LATENCY : ACR_LATENCY_Field := 16#0#; -- Flash signal delay WRHIGHFREQ : ACR_WRHIGHFREQ_Field := 16#0#; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#18#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ACR_Register use record LATENCY at 0 range 0 .. 3; WRHIGHFREQ at 0 range 4 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; subtype CR1_PSIZE1_Field is HAL.UInt2; subtype CR1_SNB1_Field is HAL.UInt3; -- FLASH control register for bank 1 type CR1_Register is record -- Bank 1 configuration lock bit LOCK1 : Boolean := False; -- Bank 1 program enable bit PG1 : Boolean := False; -- Bank 1 sector erase request SER1 : Boolean := False; -- Bank 1 erase request BER1 : Boolean := False; -- Bank 1 program size PSIZE1 : CR1_PSIZE1_Field := 16#0#; -- Bank 1 write forcing control bit FW1 : Boolean := False; -- Bank 1 bank or sector erase start control bit START1 : Boolean := False; -- Bank 1 sector erase selection number SNB1 : CR1_SNB1_Field := 16#0#; -- unspecified Reserved_11_14 : HAL.UInt4 := 16#0#; -- Bank 1 CRC control bit CRC_EN : Boolean := False; -- Bank 1 end-of-program interrupt control bit EOPIE1 : Boolean := False; -- Bank 1 write protection error interrupt enable bit WRPERRIE1 : Boolean := False; -- Bank 1 programming sequence error interrupt enable bit PGSERRIE1 : Boolean := False; -- Bank 1 strobe error interrupt enable bit STRBERRIE1 : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- Bank 1 inconsistency error interrupt enable bit INCERRIE1 : Boolean := False; -- Bank 1 write/erase error interrupt enable bit OPERRIE1 : Boolean := False; -- Bank 1 read protection error interrupt enable bit RDPERRIE1 : Boolean := False; -- Bank 1 secure error interrupt enable bit RDSERRIE1 : Boolean := False; -- Bank 1 ECC single correction error interrupt enable bit SNECCERRIE1 : Boolean := False; -- Bank 1 ECC double detection error interrupt enable bit DBECCERRIE1 : Boolean := False; -- Bank 1 end of CRC calculation interrupt enable bit CRCENDIE1 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register use record LOCK1 at 0 range 0 .. 0; PG1 at 0 range 1 .. 1; SER1 at 0 range 2 .. 2; BER1 at 0 range 3 .. 3; PSIZE1 at 0 range 4 .. 5; FW1 at 0 range 6 .. 6; START1 at 0 range 7 .. 7; SNB1 at 0 range 8 .. 10; Reserved_11_14 at 0 range 11 .. 14; CRC_EN at 0 range 15 .. 15; EOPIE1 at 0 range 16 .. 16; WRPERRIE1 at 0 range 17 .. 17; PGSERRIE1 at 0 range 18 .. 18; STRBERRIE1 at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; INCERRIE1 at 0 range 21 .. 21; OPERRIE1 at 0 range 22 .. 22; RDPERRIE1 at 0 range 23 .. 23; RDSERRIE1 at 0 range 24 .. 24; SNECCERRIE1 at 0 range 25 .. 25; DBECCERRIE1 at 0 range 26 .. 26; CRCENDIE1 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- FLASH status register for bank 1 type SR1_Register is record -- Bank 1 ongoing program flag BSY1 : Boolean := False; -- Bank 1 write buffer not empty flag WBNE1 : Boolean := False; -- Bank 1 wait queue flag QW1 : Boolean := False; -- Bank 1 CRC busy flag CRC_BUSY1 : Boolean := False; -- unspecified Reserved_4_15 : HAL.UInt12 := 16#0#; -- Bank 1 end-of-program flag EOP1 : Boolean := False; -- Bank 1 write protection error flag WRPERR1 : Boolean := False; -- Bank 1 programming sequence error flag PGSERR1 : Boolean := False; -- Bank 1 strobe error flag STRBERR1 : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- Bank 1 inconsistency error flag INCERR1 : Boolean := False; -- Bank 1 write/erase error flag OPERR1 : Boolean := False; -- Bank 1 read protection error flag RDPERR1 : Boolean := False; -- Bank 1 secure error flag RDSERR1 : Boolean := False; -- Bank 1 single correction error flag SNECCERR11 : Boolean := False; -- Bank 1 ECC double detection error flag DBECCERR1 : Boolean := False; -- Bank 1 CRC-complete flag CRCEND1 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SR1_Register use record BSY1 at 0 range 0 .. 0; WBNE1 at 0 range 1 .. 1; QW1 at 0 range 2 .. 2; CRC_BUSY1 at 0 range 3 .. 3; Reserved_4_15 at 0 range 4 .. 15; EOP1 at 0 range 16 .. 16; WRPERR1 at 0 range 17 .. 17; PGSERR1 at 0 range 18 .. 18; STRBERR1 at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; INCERR1 at 0 range 21 .. 21; OPERR1 at 0 range 22 .. 22; RDPERR1 at 0 range 23 .. 23; RDSERR1 at 0 range 24 .. 24; SNECCERR11 at 0 range 25 .. 25; DBECCERR1 at 0 range 26 .. 26; CRCEND1 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- FLASH clear control register for bank 1 type CCR1_Register is record -- unspecified Reserved_0_15 : HAL.UInt16 := 16#0#; -- Bank 1 EOP1 flag clear bit CLR_EOP1 : Boolean := False; -- Bank 1 WRPERR1 flag clear bit CLR_WRPERR1 : Boolean := False; -- Bank 1 PGSERR1 flag clear bi CLR_PGSERR1 : Boolean := False; -- Bank 1 STRBERR1 flag clear bit CLR_STRBERR1 : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- Bank 1 INCERR1 flag clear bit CLR_INCERR1 : Boolean := False; -- Bank 1 OPERR1 flag clear bit CLR_OPERR1 : Boolean := False; -- Bank 1 RDPERR1 flag clear bit CLR_RDPERR1 : Boolean := False; -- Bank 1 RDSERR1 flag clear bit CLR_RDSERR1 : Boolean := False; -- Bank 1 SNECCERR1 flag clear bit CLR_SNECCERR1 : Boolean := False; -- Bank 1 DBECCERR1 flag clear bit CLR_DBECCERR1 : Boolean := False; -- Bank 1 CRCEND1 flag clear bit CLR_CRCEND1 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CCR1_Register use record Reserved_0_15 at 0 range 0 .. 15; CLR_EOP1 at 0 range 16 .. 16; CLR_WRPERR1 at 0 range 17 .. 17; CLR_PGSERR1 at 0 range 18 .. 18; CLR_STRBERR1 at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; CLR_INCERR1 at 0 range 21 .. 21; CLR_OPERR1 at 0 range 22 .. 22; CLR_RDPERR1 at 0 range 23 .. 23; CLR_RDSERR1 at 0 range 24 .. 24; CLR_SNECCERR1 at 0 range 25 .. 25; CLR_DBECCERR1 at 0 range 26 .. 26; CLR_CRCEND1 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- FLASH option control register type OPTCR_Register is record -- FLASH_OPTCR lock option configuration bit OPTLOCK : Boolean := False; -- Option byte start change option configuration bit OPTSTART : Boolean := False; -- unspecified Reserved_2_3 : HAL.UInt2 := 16#0#; -- Flash mass erase enable bit MER : Boolean := False; -- unspecified Reserved_5_29 : HAL.UInt25 := 16#0#; -- Option byte change error interrupt enable bit OPTCHANGEERRIE : Boolean := False; -- Bank swapping configuration bit SWAP_BANK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPTCR_Register use record OPTLOCK at 0 range 0 .. 0; OPTSTART at 0 range 1 .. 1; Reserved_2_3 at 0 range 2 .. 3; MER at 0 range 4 .. 4; Reserved_5_29 at 0 range 5 .. 29; OPTCHANGEERRIE at 0 range 30 .. 30; SWAP_BANK at 0 range 31 .. 31; end record; subtype OPTSR_CUR_BOR_LEV_Field is HAL.UInt2; subtype OPTSR_CUR_RDP_Field is HAL.UInt8; subtype OPTSR_CUR_ST_RAM_SIZE_Field is HAL.UInt2; -- FLASH option status register type OPTSR_CUR_Register is record -- Option byte change ongoing flag OPT_BUSY : Boolean := False; -- unspecified Reserved_1_1 : HAL.Bit := 16#0#; -- Brownout level option status bit BOR_LEV : OPTSR_CUR_BOR_LEV_Field := 16#0#; -- IWDG1 control option status bit IWDG1_HW : Boolean := False; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- D1 DStop entry reset option status bit nRST_STOP_D1 : Boolean := False; -- D1 DStandby entry reset option status bit nRST_STBY_D1 : Boolean := False; -- Readout protection level option status byte RDP : OPTSR_CUR_RDP_Field := 16#0#; -- unspecified Reserved_16_16 : HAL.Bit := 16#0#; -- IWDG Stop mode freeze option status bit FZ_IWDG_STOP : Boolean := False; -- IWDG Standby mode freeze option status bit FZ_IWDG_SDBY : Boolean := False; -- DTCM RAM size option status ST_RAM_SIZE : OPTSR_CUR_ST_RAM_SIZE_Field := 16#0#; -- Security enable option status bit SECURITY : Boolean := False; -- unspecified Reserved_22_25 : HAL.UInt4 := 16#0#; -- User option bit 1 RSS1 : Boolean := False; -- unspecified Reserved_27_27 : HAL.Bit := 16#0#; -- Device personalization status bit PERSO_OK : Boolean := False; -- I/O high-speed at low-voltage status bit (PRODUCT_BELOW_25V) IO_HSLV : Boolean := False; -- Option byte change error flag OPTCHANGEERR : Boolean := False; -- Bank swapping option status bit SWAP_BANK_OPT : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPTSR_CUR_Register use record OPT_BUSY at 0 range 0 .. 0; Reserved_1_1 at 0 range 1 .. 1; BOR_LEV at 0 range 2 .. 3; IWDG1_HW at 0 range 4 .. 4; Reserved_5_5 at 0 range 5 .. 5; nRST_STOP_D1 at 0 range 6 .. 6; nRST_STBY_D1 at 0 range 7 .. 7; RDP at 0 range 8 .. 15; Reserved_16_16 at 0 range 16 .. 16; FZ_IWDG_STOP at 0 range 17 .. 17; FZ_IWDG_SDBY at 0 range 18 .. 18; ST_RAM_SIZE at 0 range 19 .. 20; SECURITY at 0 range 21 .. 21; Reserved_22_25 at 0 range 22 .. 25; RSS1 at 0 range 26 .. 26; Reserved_27_27 at 0 range 27 .. 27; PERSO_OK at 0 range 28 .. 28; IO_HSLV at 0 range 29 .. 29; OPTCHANGEERR at 0 range 30 .. 30; SWAP_BANK_OPT at 0 range 31 .. 31; end record; subtype OPTSR_PRG_BOR_LEV_Field is HAL.UInt2; subtype OPTSR_PRG_RDP_Field is HAL.UInt8; subtype OPTSR_PRG_ST_RAM_SIZE_Field is HAL.UInt2; -- OPTSR_PRG_RSS array type OPTSR_PRG_RSS_Field_Array is array (1 .. 2) of Boolean with Component_Size => 1, Size => 2; -- Type definition for OPTSR_PRG_RSS type OPTSR_PRG_RSS_Field (As_Array : Boolean := False) is record case As_Array is when False => -- RSS as a value Val : HAL.UInt2; when True => -- RSS as an array Arr : OPTSR_PRG_RSS_Field_Array; end case; end record with Unchecked_Union, Size => 2; for OPTSR_PRG_RSS_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- FLASH option status register type OPTSR_PRG_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- BOR reset level option configuration bits BOR_LEV : OPTSR_PRG_BOR_LEV_Field := 16#0#; -- IWDG1 option configuration bit IWDG1_HW : Boolean := False; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- Option byte erase after D1 DStop option configuration bit nRST_STOP_D1 : Boolean := False; -- Option byte erase after D1 DStandby option configuration bit nRST_STBY_D1 : Boolean := False; -- Readout protection level option configuration byte RDP : OPTSR_PRG_RDP_Field := 16#0#; -- unspecified Reserved_16_16 : HAL.Bit := 16#0#; -- IWDG Stop mode freeze option configuration bit FZ_IWDG_STOP : Boolean := False; -- IWDG Standby mode freeze option configuration bit FZ_IWDG_SDBY : Boolean := False; -- DTCM size select option configuration bits ST_RAM_SIZE : OPTSR_PRG_ST_RAM_SIZE_Field := 16#0#; -- Security option configuration bit SECURITY : Boolean := False; -- unspecified Reserved_22_25 : HAL.UInt4 := 16#0#; -- User option configuration bit 1 RSS : OPTSR_PRG_RSS_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_28_28 : HAL.Bit := 16#0#; -- I/O high-speed at low-voltage (PRODUCT_BELOW_25V) IO_HSLV : Boolean := False; -- unspecified Reserved_30_30 : HAL.Bit := 16#0#; -- Bank swapping option configuration bit SWAP_BANK_OPT : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPTSR_PRG_Register use record Reserved_0_1 at 0 range 0 .. 1; BOR_LEV at 0 range 2 .. 3; IWDG1_HW at 0 range 4 .. 4; Reserved_5_5 at 0 range 5 .. 5; nRST_STOP_D1 at 0 range 6 .. 6; nRST_STBY_D1 at 0 range 7 .. 7; RDP at 0 range 8 .. 15; Reserved_16_16 at 0 range 16 .. 16; FZ_IWDG_STOP at 0 range 17 .. 17; FZ_IWDG_SDBY at 0 range 18 .. 18; ST_RAM_SIZE at 0 range 19 .. 20; SECURITY at 0 range 21 .. 21; Reserved_22_25 at 0 range 22 .. 25; RSS at 0 range 26 .. 27; Reserved_28_28 at 0 range 28 .. 28; IO_HSLV at 0 range 29 .. 29; Reserved_30_30 at 0 range 30 .. 30; SWAP_BANK_OPT at 0 range 31 .. 31; end record; -- FLASH option clear control register type OPTCCR_Register is record -- unspecified Reserved_0_29 : HAL.UInt30 := 16#0#; -- Write-only. OPTCHANGEERR reset bit CLR_OPTCHANGEERR : Boolean := False; -- unspecified Reserved_31_31 : HAL.Bit := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPTCCR_Register use record Reserved_0_29 at 0 range 0 .. 29; CLR_OPTCHANGEERR at 0 range 30 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype PRAR_CUR1_PROT_AREA_START1_Field is HAL.UInt12; subtype PRAR_CUR1_PROT_AREA_END1_Field is HAL.UInt12; -- FLASH protection address for bank 1 type PRAR_CUR1_Register is record -- Read-only. Bank 1 lowest PCROP protected address PROT_AREA_START1 : PRAR_CUR1_PROT_AREA_START1_Field; -- unspecified Reserved_12_15 : HAL.UInt4; -- Read-only. Bank 1 highest PCROP protected address PROT_AREA_END1 : PRAR_CUR1_PROT_AREA_END1_Field; -- unspecified Reserved_28_30 : HAL.UInt3; -- Read-only. Bank 1 PCROP protected erase enable option status bit DMEP1 : Boolean; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PRAR_CUR1_Register use record PROT_AREA_START1 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; PROT_AREA_END1 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMEP1 at 0 range 31 .. 31; end record; subtype PRAR_PRG1_PROT_AREA_START1_Field is HAL.UInt12; subtype PRAR_PRG1_PROT_AREA_END1_Field is HAL.UInt12; -- FLASH protection address for bank 1 type PRAR_PRG1_Register is record -- Bank 1 lowest PCROP protected address configuration PROT_AREA_START1 : PRAR_PRG1_PROT_AREA_START1_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Bank 1 highest PCROP protected address configuration PROT_AREA_END1 : PRAR_PRG1_PROT_AREA_END1_Field := 16#0#; -- unspecified Reserved_28_30 : HAL.UInt3 := 16#0#; -- Bank 1 PCROP protected erase enable option configuration bit DMEP1 : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PRAR_PRG1_Register use record PROT_AREA_START1 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; PROT_AREA_END1 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMEP1 at 0 range 31 .. 31; end record; subtype PRAR_PRG2_PROT_AREA_START2_Field is HAL.UInt12; subtype PRAR_PRG2_PROT_AREA_END2_Field is HAL.UInt12; -- FLASH protection address for bank 2 type PRAR_PRG2_Register is record -- Bank 2 lowest PCROP protected address configuration PROT_AREA_START2 : PRAR_PRG2_PROT_AREA_START2_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Bank 2 highest PCROP protected address configuration PROT_AREA_END2 : PRAR_PRG2_PROT_AREA_END2_Field := 16#0#; -- unspecified Reserved_28_30 : HAL.UInt3 := 16#0#; -- Bank 2 PCROP protected erase enable option configuration bit DMEP2 : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PRAR_PRG2_Register use record PROT_AREA_START2 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; PROT_AREA_END2 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMEP2 at 0 range 31 .. 31; end record; subtype SCAR_CUR1_SEC_AREA_START1_Field is HAL.UInt12; subtype SCAR_CUR1_SEC_AREA_END1_Field is HAL.UInt12; -- FLASH secure address for bank 1 type SCAR_CUR1_Register is record -- Bank 1 lowest secure protected address SEC_AREA_START1 : SCAR_CUR1_SEC_AREA_START1_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Bank 1 highest secure protected address SEC_AREA_END1 : SCAR_CUR1_SEC_AREA_END1_Field := 16#0#; -- unspecified Reserved_28_30 : HAL.UInt3 := 16#0#; -- Bank 1 secure protected erase enable option status bit DMES1 : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SCAR_CUR1_Register use record SEC_AREA_START1 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; SEC_AREA_END1 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMES1 at 0 range 31 .. 31; end record; subtype SCAR_PRG1_SEC_AREA_START1_Field is HAL.UInt12; subtype SCAR_PRG1_SEC_AREA_END1_Field is HAL.UInt12; -- FLASH secure address for bank 1 type SCAR_PRG1_Register is record -- Bank 1 lowest secure protected address configuration SEC_AREA_START1 : SCAR_PRG1_SEC_AREA_START1_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Bank 1 highest secure protected address configuration SEC_AREA_END1 : SCAR_PRG1_SEC_AREA_END1_Field := 16#0#; -- unspecified Reserved_28_30 : HAL.UInt3 := 16#0#; -- Bank 1 secure protected erase enable option configuration bit DMES1 : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SCAR_PRG1_Register use record SEC_AREA_START1 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; SEC_AREA_END1 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMES1 at 0 range 31 .. 31; end record; subtype WPSN_CUR1R_WRPSn1_Field is HAL.UInt8; -- FLASH write sector protection for bank 1 type WPSN_CUR1R_Register is record -- Read-only. Bank 1 sector write protection option status byte WRPSn1 : WPSN_CUR1R_WRPSn1_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for WPSN_CUR1R_Register use record WRPSn1 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype WPSN_PRG1R_WRPSn1_Field is HAL.UInt8; -- FLASH write sector protection for bank 1 type WPSN_PRG1R_Register is record -- Bank 1 sector write protection configuration byte WRPSn1 : WPSN_PRG1R_WRPSn1_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for WPSN_PRG1R_Register use record WRPSn1 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- BOOT_CURR_BOOT_ADD array element subtype BOOT_CURR_BOOT_ADD_Element is HAL.UInt16; -- BOOT_CURR_BOOT_ADD array type BOOT_CURR_BOOT_ADD_Field_Array is array (0 .. 1) of BOOT_CURR_BOOT_ADD_Element with Component_Size => 16, Size => 32; -- FLASH register with boot address type BOOT_CURR_Register (As_Array : Boolean := False) is record case As_Array is when False => -- BOOT_ADD as a value Val : HAL.UInt32; when True => -- BOOT_ADD as an array Arr : BOOT_CURR_BOOT_ADD_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BOOT_CURR_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- BOOT_PRGR_BOOT_ADD array element subtype BOOT_PRGR_BOOT_ADD_Element is HAL.UInt16; -- BOOT_PRGR_BOOT_ADD array type BOOT_PRGR_BOOT_ADD_Field_Array is array (0 .. 1) of BOOT_PRGR_BOOT_ADD_Element with Component_Size => 16, Size => 32; -- FLASH register with boot address type BOOT_PRGR_Register (As_Array : Boolean := False) is record case As_Array is when False => -- BOOT_ADD as a value Val : HAL.UInt32; when True => -- BOOT_ADD as an array Arr : BOOT_PRGR_BOOT_ADD_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for BOOT_PRGR_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; subtype CRCCR_CRC_SECT_Field is HAL.UInt3; subtype CRCCR_CRC_BURST_Field is HAL.UInt2; -- FLASH CRC control register for bank 1 type CRCCR_Register is record -- Bank 1 CRC sector number CRC_SECT : CRCCR_CRC_SECT_Field := 16#0#; -- unspecified Reserved_3_6 : HAL.UInt4 := 16#0#; -- Bank 1 CRC select bit ALL_BANK : Boolean := False; -- Bank 1 CRC sector mode select bit CRC_BY_SECT : Boolean := False; -- Bank 1 CRC sector select bit ADD_SECT : Boolean := False; -- Bank 1 CRC sector list clear bit CLEAN_SECT : Boolean := False; -- unspecified Reserved_11_15 : HAL.UInt5 := 16#0#; -- Bank 1 CRC start bit START_CRC : Boolean := False; -- Bank 1 CRC clear bit CLEAN_CRC : Boolean := False; -- unspecified Reserved_18_19 : HAL.UInt2 := 16#0#; -- Bank 1 CRC burst size CRC_BURST : CRCCR_CRC_BURST_Field := 16#0#; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CRCCR_Register use record CRC_SECT at 0 range 0 .. 2; Reserved_3_6 at 0 range 3 .. 6; ALL_BANK at 0 range 7 .. 7; CRC_BY_SECT at 0 range 8 .. 8; ADD_SECT at 0 range 9 .. 9; CLEAN_SECT at 0 range 10 .. 10; Reserved_11_15 at 0 range 11 .. 15; START_CRC at 0 range 16 .. 16; CLEAN_CRC at 0 range 17 .. 17; Reserved_18_19 at 0 range 18 .. 19; CRC_BURST at 0 range 20 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; subtype ECC_FA1R_FAIL_ECC_ADDR1_Field is HAL.UInt15; -- FLASH ECC fail address for bank 1 type ECC_FA1R_Register is record -- Read-only. Bank 1 ECC error address FAIL_ECC_ADDR1 : ECC_FA1R_FAIL_ECC_ADDR1_Field; -- unspecified Reserved_15_31 : HAL.UInt17; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ECC_FA1R_Register use record FAIL_ECC_ADDR1 at 0 range 0 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; subtype CR2_PSIZE2_Field is HAL.UInt2; subtype CR2_SNB2_Field is HAL.UInt3; -- FLASH control register for bank 2 type CR2_Register is record -- Bank 2 configuration lock bit LOCK2 : Boolean := False; -- Bank 2 program enable bit PG2 : Boolean := False; -- Bank 2 sector erase request SER2 : Boolean := False; -- Bank 2 erase request BER2 : Boolean := False; -- Bank 2 program size PSIZE2 : CR2_PSIZE2_Field := 16#0#; -- Bank 2 write forcing control bit FW2 : Boolean := False; -- Bank 2 bank or sector erase start control bit START2 : Boolean := False; -- Bank 2 sector erase selection number SNB2 : CR2_SNB2_Field := 16#0#; -- unspecified Reserved_11_14 : HAL.UInt4 := 16#0#; -- Bank 2 CRC control bit CRC_EN : Boolean := False; -- Bank 2 end-of-program interrupt control bit EOPIE2 : Boolean := False; -- Bank 2 write protection error interrupt enable bit WRPERRIE2 : Boolean := False; -- Bank 2 programming sequence error interrupt enable bit PGSERRIE2 : Boolean := False; -- Bank 2 strobe error interrupt enable bit STRBERRIE2 : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- Bank 2 inconsistency error interrupt enable bit INCERRIE2 : Boolean := False; -- Bank 2 write/erase error interrupt enable bit OPERRIE2 : Boolean := False; -- Bank 2 read protection error interrupt enable bit RDPERRIE2 : Boolean := False; -- Bank 2 secure error interrupt enable bit RDSERRIE2 : Boolean := False; -- Bank 2 ECC single correction error interrupt enable bit SNECCERRIE2 : Boolean := False; -- Bank 2 ECC double detection error interrupt enable bit DBECCERRIE2 : Boolean := False; -- Bank 2 end of CRC calculation interrupt enable bit CRCENDIE2 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register use record LOCK2 at 0 range 0 .. 0; PG2 at 0 range 1 .. 1; SER2 at 0 range 2 .. 2; BER2 at 0 range 3 .. 3; PSIZE2 at 0 range 4 .. 5; FW2 at 0 range 6 .. 6; START2 at 0 range 7 .. 7; SNB2 at 0 range 8 .. 10; Reserved_11_14 at 0 range 11 .. 14; CRC_EN at 0 range 15 .. 15; EOPIE2 at 0 range 16 .. 16; WRPERRIE2 at 0 range 17 .. 17; PGSERRIE2 at 0 range 18 .. 18; STRBERRIE2 at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; INCERRIE2 at 0 range 21 .. 21; OPERRIE2 at 0 range 22 .. 22; RDPERRIE2 at 0 range 23 .. 23; RDSERRIE2 at 0 range 24 .. 24; SNECCERRIE2 at 0 range 25 .. 25; DBECCERRIE2 at 0 range 26 .. 26; CRCENDIE2 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- FLASH status register for bank 2 type SR2_Register is record -- Bank 2 ongoing program flag BSY2 : Boolean := False; -- Bank 2 write buffer not empty flag WBNE2 : Boolean := False; -- Bank 2 wait queue flag QW2 : Boolean := False; -- Bank 2 CRC busy flag CRC_BUSY2 : Boolean := False; -- unspecified Reserved_4_15 : HAL.UInt12 := 16#0#; -- Bank 2 end-of-program flag EOP2 : Boolean := False; -- Bank 2 write protection error flag WRPERR2 : Boolean := False; -- Bank 2 programming sequence error flag PGSERR2 : Boolean := False; -- Bank 2 strobe error flag STRBERR2 : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- Bank 2 inconsistency error flag INCERR2 : Boolean := False; -- Bank 2 write/erase error flag OPERR2 : Boolean := False; -- Bank 2 read protection error flag RDPERR2 : Boolean := False; -- Bank 2 secure error flag RDSERR2 : Boolean := False; -- Bank 2 single correction error flag SNECCERR2 : Boolean := False; -- Bank 2 ECC double detection error flag DBECCERR2 : Boolean := False; -- Bank 2 CRC-complete flag CRCEND2 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SR2_Register use record BSY2 at 0 range 0 .. 0; WBNE2 at 0 range 1 .. 1; QW2 at 0 range 2 .. 2; CRC_BUSY2 at 0 range 3 .. 3; Reserved_4_15 at 0 range 4 .. 15; EOP2 at 0 range 16 .. 16; WRPERR2 at 0 range 17 .. 17; PGSERR2 at 0 range 18 .. 18; STRBERR2 at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; INCERR2 at 0 range 21 .. 21; OPERR2 at 0 range 22 .. 22; RDPERR2 at 0 range 23 .. 23; RDSERR2 at 0 range 24 .. 24; SNECCERR2 at 0 range 25 .. 25; DBECCERR2 at 0 range 26 .. 26; CRCEND2 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- FLASH clear control register for bank 2 type CCR2_Register is record -- unspecified Reserved_0_15 : HAL.UInt16 := 16#0#; -- Bank 1 EOP1 flag clear bit CLR_EOP2 : Boolean := False; -- Bank 2 WRPERR1 flag clear bit CLR_WRPERR2 : Boolean := False; -- Bank 2 PGSERR1 flag clear bi CLR_PGSERR2 : Boolean := False; -- Bank 2 STRBERR1 flag clear bit CLR_STRBERR2 : Boolean := False; -- unspecified Reserved_20_20 : HAL.Bit := 16#0#; -- Bank 2 INCERR1 flag clear bit CLR_INCERR2 : Boolean := False; -- Bank 2 OPERR1 flag clear bit CLR_OPERR2 : Boolean := False; -- Bank 2 RDPERR1 flag clear bit CLR_RDPERR2 : Boolean := False; -- Bank 1 RDSERR1 flag clear bit CLR_RDSERR1 : Boolean := False; -- Bank 2 SNECCERR1 flag clear bit CLR_SNECCERR2 : Boolean := False; -- Bank 1 DBECCERR1 flag clear bit CLR_DBECCERR1 : Boolean := False; -- Bank 2 CRCEND1 flag clear bit CLR_CRCEND2 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CCR2_Register use record Reserved_0_15 at 0 range 0 .. 15; CLR_EOP2 at 0 range 16 .. 16; CLR_WRPERR2 at 0 range 17 .. 17; CLR_PGSERR2 at 0 range 18 .. 18; CLR_STRBERR2 at 0 range 19 .. 19; Reserved_20_20 at 0 range 20 .. 20; CLR_INCERR2 at 0 range 21 .. 21; CLR_OPERR2 at 0 range 22 .. 22; CLR_RDPERR2 at 0 range 23 .. 23; CLR_RDSERR1 at 0 range 24 .. 24; CLR_SNECCERR2 at 0 range 25 .. 25; CLR_DBECCERR1 at 0 range 26 .. 26; CLR_CRCEND2 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype PRAR_CUR2_PROT_AREA_START2_Field is HAL.UInt12; subtype PRAR_CUR2_PROT_AREA_END2_Field is HAL.UInt12; -- FLASH protection address for bank 1 type PRAR_CUR2_Register is record -- Read-only. Bank 2 lowest PCROP protected address PROT_AREA_START2 : PRAR_CUR2_PROT_AREA_START2_Field; -- unspecified Reserved_12_15 : HAL.UInt4; -- Read-only. Bank 2 highest PCROP protected address PROT_AREA_END2 : PRAR_CUR2_PROT_AREA_END2_Field; -- unspecified Reserved_28_30 : HAL.UInt3; -- Read-only. Bank 2 PCROP protected erase enable option status bit DMEP2 : Boolean; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PRAR_CUR2_Register use record PROT_AREA_START2 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; PROT_AREA_END2 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMEP2 at 0 range 31 .. 31; end record; subtype SCAR_CUR2_SEC_AREA_START2_Field is HAL.UInt12; subtype SCAR_CUR2_SEC_AREA_END2_Field is HAL.UInt12; -- FLASH secure address for bank 2 type SCAR_CUR2_Register is record -- Bank 2 lowest secure protected address SEC_AREA_START2 : SCAR_CUR2_SEC_AREA_START2_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Bank 2 highest secure protected address SEC_AREA_END2 : SCAR_CUR2_SEC_AREA_END2_Field := 16#0#; -- unspecified Reserved_28_30 : HAL.UInt3 := 16#0#; -- Bank 2 secure protected erase enable option status bit DMES2 : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SCAR_CUR2_Register use record SEC_AREA_START2 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; SEC_AREA_END2 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMES2 at 0 range 31 .. 31; end record; subtype SCAR_PRG2_SEC_AREA_START2_Field is HAL.UInt12; subtype SCAR_PRG2_SEC_AREA_END2_Field is HAL.UInt12; -- FLASH secure address for bank 2 type SCAR_PRG2_Register is record -- Bank 2 lowest secure protected address configuration SEC_AREA_START2 : SCAR_PRG2_SEC_AREA_START2_Field := 16#0#; -- unspecified Reserved_12_15 : HAL.UInt4 := 16#0#; -- Bank 2 highest secure protected address configuration SEC_AREA_END2 : SCAR_PRG2_SEC_AREA_END2_Field := 16#0#; -- unspecified Reserved_28_30 : HAL.UInt3 := 16#0#; -- Bank 2 secure protected erase enable option configuration bit DMES2 : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SCAR_PRG2_Register use record SEC_AREA_START2 at 0 range 0 .. 11; Reserved_12_15 at 0 range 12 .. 15; SEC_AREA_END2 at 0 range 16 .. 27; Reserved_28_30 at 0 range 28 .. 30; DMES2 at 0 range 31 .. 31; end record; subtype WPSN_CUR2R_WRPSn2_Field is HAL.UInt8; -- FLASH write sector protection for bank 2 type WPSN_CUR2R_Register is record -- Read-only. Bank 2 sector write protection option status byte WRPSn2 : WPSN_CUR2R_WRPSn2_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for WPSN_CUR2R_Register use record WRPSn2 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype WPSN_PRG2R_WRPSn2_Field is HAL.UInt8; -- FLASH write sector protection for bank 2 type WPSN_PRG2R_Register is record -- Bank 2 sector write protection configuration byte WRPSn2 : WPSN_PRG2R_WRPSn2_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for WPSN_PRG2R_Register use record WRPSn2 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype ECC_FA2R_FAIL_ECC_ADDR2_Field is HAL.UInt15; -- FLASH ECC fail address for bank 2 type ECC_FA2R_Register is record -- Read-only. Bank 2 ECC error address FAIL_ECC_ADDR2 : ECC_FA2R_FAIL_ECC_ADDR2_Field; -- unspecified Reserved_15_31 : HAL.UInt17; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ECC_FA2R_Register use record FAIL_ECC_ADDR2 at 0 range 0 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; ----------------- -- Peripherals -- ----------------- type Flash_Disc is (Val_1, Val_2); -- Flash type Flash_Peripheral (Discriminent : Flash_Disc := Val_1) is record -- Access control register ACR : aliased ACR_Register; -- FLASH key register for bank 1 KEYR1 : aliased HAL.UInt32; -- FLASH option key register OPTKEYR : aliased HAL.UInt32; -- FLASH control register for bank 1 CR1 : aliased CR1_Register; -- FLASH status register for bank 1 SR1 : aliased SR1_Register; -- FLASH clear control register for bank 1 CCR1 : aliased CCR1_Register; -- FLASH option control register OPTCR : aliased OPTCR_Register; -- FLASH option status register OPTSR_CUR : aliased OPTSR_CUR_Register; -- FLASH option status register OPTSR_PRG : aliased OPTSR_PRG_Register; -- FLASH option clear control register OPTCCR : aliased OPTCCR_Register; -- FLASH protection address for bank 1 PRAR_CUR1 : aliased PRAR_CUR1_Register; -- FLASH secure address for bank 1 SCAR_CUR1 : aliased SCAR_CUR1_Register; -- FLASH secure address for bank 1 SCAR_PRG1 : aliased SCAR_PRG1_Register; -- FLASH write sector protection for bank 1 WPSN_CUR1R : aliased WPSN_CUR1R_Register; -- FLASH write sector protection for bank 1 WPSN_PRG1R : aliased WPSN_PRG1R_Register; -- FLASH register with boot address BOOT_CURR : aliased BOOT_CURR_Register; -- FLASH register with boot address BOOT_PRGR : aliased BOOT_PRGR_Register; -- FLASH CRC control register for bank 1 CRCCR1 : aliased CRCCR_Register; -- FLASH CRC start address register for bank 1 CRCSADD1R : aliased HAL.UInt32; -- FLASH CRC end address register for bank 1 CRCEADD1R : aliased HAL.UInt32; -- FLASH CRC data register CRCDATAR : aliased HAL.UInt32; -- FLASH ECC fail address for bank 1 ECC_FA1R : aliased ECC_FA1R_Register; -- Access control register ACR_1 : aliased ACR_Register; -- FLASH key register for bank 2 KEYR2 : aliased HAL.UInt32; -- FLASH option key register OPTKEYR_1 : aliased HAL.UInt32; -- FLASH control register for bank 2 CR2 : aliased CR2_Register; -- FLASH status register for bank 2 SR2 : aliased SR2_Register; -- FLASH clear control register for bank 2 CCR2 : aliased CCR2_Register; -- FLASH option control register OPTCR_1 : aliased OPTCR_Register; -- FLASH option status register OPTSR_CUR_1 : aliased OPTSR_CUR_Register; -- FLASH option status register OPTSR_PRG_1 : aliased OPTSR_PRG_Register; -- FLASH option clear control register OPTCCR_1 : aliased OPTCCR_Register; -- FLASH protection address for bank 1 PRAR_CUR2 : aliased PRAR_CUR2_Register; -- FLASH secure address for bank 2 SCAR_CUR2 : aliased SCAR_CUR2_Register; -- FLASH secure address for bank 2 SCAR_PRG2 : aliased SCAR_PRG2_Register; -- FLASH write sector protection for bank 2 WPSN_CUR2R : aliased WPSN_CUR2R_Register; -- FLASH write sector protection for bank 2 WPSN_PRG2R : aliased WPSN_PRG2R_Register; -- FLASH CRC control register for bank 1 CRCCR2 : aliased CRCCR_Register; -- FLASH CRC start address register for bank 2 CRCSADD2R : aliased HAL.UInt32; -- FLASH CRC end address register for bank 2 CRCEADD2R : aliased HAL.UInt32; -- FLASH ECC fail address for bank 2 ECC_FA2R : aliased ECC_FA2R_Register; case Discriminent is when Val_1 => -- FLASH protection address for bank 1 PRAR_PRG1 : aliased PRAR_PRG1_Register; when Val_2 => -- FLASH protection address for bank 2 PRAR_PRG2 : aliased PRAR_PRG2_Register; end case; end record with Unchecked_Union, Volatile; for Flash_Peripheral use record ACR at 16#0# range 0 .. 31; KEYR1 at 16#4# range 0 .. 31; OPTKEYR at 16#8# range 0 .. 31; CR1 at 16#C# range 0 .. 31; SR1 at 16#10# range 0 .. 31; CCR1 at 16#14# range 0 .. 31; OPTCR at 16#18# range 0 .. 31; OPTSR_CUR at 16#1C# range 0 .. 31; OPTSR_PRG at 16#20# range 0 .. 31; OPTCCR at 16#24# range 0 .. 31; PRAR_CUR1 at 16#28# range 0 .. 31; SCAR_CUR1 at 16#30# range 0 .. 31; SCAR_PRG1 at 16#34# range 0 .. 31; WPSN_CUR1R at 16#38# range 0 .. 31; WPSN_PRG1R at 16#3C# range 0 .. 31; BOOT_CURR at 16#40# range 0 .. 31; BOOT_PRGR at 16#44# range 0 .. 31; CRCCR1 at 16#50# range 0 .. 31; CRCSADD1R at 16#54# range 0 .. 31; CRCEADD1R at 16#58# range 0 .. 31; CRCDATAR at 16#5C# range 0 .. 31; ECC_FA1R at 16#60# range 0 .. 31; ACR_1 at 16#100# range 0 .. 31; KEYR2 at 16#104# range 0 .. 31; OPTKEYR_1 at 16#108# range 0 .. 31; CR2 at 16#10C# range 0 .. 31; SR2 at 16#110# range 0 .. 31; CCR2 at 16#114# range 0 .. 31; OPTCR_1 at 16#118# range 0 .. 31; OPTSR_CUR_1 at 16#11C# range 0 .. 31; OPTSR_PRG_1 at 16#120# range 0 .. 31; OPTCCR_1 at 16#124# range 0 .. 31; PRAR_CUR2 at 16#128# range 0 .. 31; SCAR_CUR2 at 16#130# range 0 .. 31; SCAR_PRG2 at 16#134# range 0 .. 31; WPSN_CUR2R at 16#138# range 0 .. 31; WPSN_PRG2R at 16#13C# range 0 .. 31; CRCCR2 at 16#150# range 0 .. 31; CRCSADD2R at 16#154# range 0 .. 31; CRCEADD2R at 16#158# range 0 .. 31; ECC_FA2R at 16#160# range 0 .. 31; PRAR_PRG1 at 16#2C# range 0 .. 31; PRAR_PRG2 at 16#2C# range 0 .. 31; end record; -- Flash Flash_Periph : aliased Flash_Peripheral with Import, Address => Flash_Base; end STM32_SVD.Flash;
with Ada.Finalization; with Ada.IO_Exceptions; with Ada.Streams; private with C.zconf; private with C.zlib; package zlib is pragma Preelaborate; pragma Linker_Options ("-lz"); function Version return String; type Stream_Mode is (Deflating, Inflating); type Stream is limited private; -- subtype Open_Stream is Stream -- with -- Dynamic_Predicate => Is_Open (Open_Stream), -- Predicate_Failure => raise Status_Error; -- subtype Deflating_Stream is Open_Stream -- with -- Dynamic_Predicate => Mode (Deflating) = Deflating, -- Predicate_Failure => raise Mode_Error; -- subtype Inflating_Stream is Open_Stream -- with -- Dynamic_Predicate => Mode (Inflating_Stream) = Inflating, -- Predicate_Failure => raise Mode_Error; -- level type Compression_Level is range -1 .. 9; No_Compression : constant Compression_Level; Best_Speed : constant Compression_Level; Best_Compression : constant Compression_Level; Default_Compression : constant Compression_Level; -- method package Compression_Methods is type Compression_Method is (Deflated); private for Compression_Method'Size use C.signed_int'Size; for Compression_Method use (Deflated => C.zlib.Z_DEFLATED); end Compression_Methods; type Compression_Method is new Compression_Methods.Compression_Method; -- windowBits type Window_Bits is range 8 .. 15; Default_Window_Bits : constant Window_Bits := 15; type Inflation_Header is (None, Default, GZip, Auto); subtype Deflation_Header is Inflation_Header range None .. GZip; -- memLevel type Memory_Level is range 1 .. 9; Default_Memory_Level : constant Memory_Level := 8; -- stragegy package Strategies is type Strategy is ( Default_Strategy, Filtered, Huffman_Only, RLE, Fixed); private for Strategy'Size use C.signed_int'Size; for Strategy use ( Default_Strategy => C.zlib.Z_DEFAULT_STRATEGY, Filtered => C.zlib.Z_FILTERED, Huffman_Only => C.zlib.Z_HUFFMAN_ONLY, RLE => C.zlib.Z_RLE, Fixed => C.zlib.Z_FIXED); end Strategies; type Strategy is new Strategies.Strategy; function Deflate_Init ( Level : Compression_Level := Default_Compression; Method : Compression_Method := Deflated; Window_Bits : zlib.Window_Bits := Default_Window_Bits; Header : Deflation_Header := Default; Memory_Level : zlib.Memory_Level := Default_Memory_Level; Strategy : zlib.Strategy := Default_Strategy) return Stream; procedure Deflate ( Stream : in out zlib.Stream; -- Deflating_Stream In_Item : in Ada.Streams.Stream_Element_Array; In_Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : in Boolean; Finished : out Boolean); procedure Deflate ( Stream : in out zlib.Stream; -- Deflating_Stream In_Item : in Ada.Streams.Stream_Element_Array; In_Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset); procedure Deflate ( Stream : in out zlib.Stream; -- Deflating_Stream Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : in Boolean; Finished : out Boolean); function Inflate_Init ( Window_Bits : zlib.Window_Bits := Default_Window_Bits; Header : Inflation_Header := Auto) return Stream; procedure Inflate ( Stream : in out zlib.Stream; -- Inflating_Stream In_Item : in Ada.Streams.Stream_Element_Array; In_Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : in Boolean; Finished : out Boolean); procedure Inflate ( Stream : in out zlib.Stream; -- Inflating_Stream In_Item : in Ada.Streams.Stream_Element_Array; In_Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset); procedure Inflate ( Stream : in out zlib.Stream; -- Inflating_Stream Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : in Boolean; Finished : out Boolean); procedure Close (Stream : in out zlib.Stream); function Is_Open (Stream : zlib.Stream) return Boolean; function Mode ( Stream : zlib.Stream) -- Open_Stream return Stream_Mode; function Total_In ( Stream : zlib.Stream) -- Open_Stream return Ada.Streams.Stream_Element_Count; function Total_Out ( Stream : zlib.Stream) -- Open_Stream return Ada.Streams.Stream_Element_Count; Status_Error : exception renames Ada.IO_Exceptions.Status_Error; Mode_Error : exception renames Ada.IO_Exceptions.Mode_Error; Use_Error : exception renames Ada.IO_Exceptions.Use_Error; Data_Error : exception renames Ada.IO_Exceptions.Data_Error; -- compatibility with ZLib.Ada. subtype Count is Ada.Streams.Stream_Element_Count; subtype Filter_Type is Stream; subtype Header_Type is Inflation_Header; subtype Strategy_Type is Strategy; subtype Flush_Mode is Boolean; function No_Flush return Boolean renames False; function Finish return Boolean renames True; procedure Deflate_Init ( Filter : in out Filter_Type; Level : in Compression_Level := Default_Compression; Method : in Compression_Method := Deflated; Window_Bits : in zlib.Window_Bits := Default_Window_Bits; Header : in Deflation_Header := Default; Memory_Level : in zlib.Memory_Level := Default_Memory_Level; Strategy : in Strategy_Type := Default_Strategy); procedure Inflate_Init ( Filter : in out Filter_Type; Window_Bits : in zlib.Window_Bits := Default_Window_Bits; Header : in Header_Type := Auto); procedure Translate ( Filter : in out Filter_Type; In_Data : in Ada.Streams.Stream_Element_Array; In_Last : out Ada.Streams.Stream_Element_Offset; Out_Data : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Flush : in Flush_Mode); generic with procedure Data_In ( Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset); with procedure Data_Out ( Item : in Ada.Streams.Stream_Element_Array); procedure Generic_Translate (Filter : in out Filter_Type); generic with procedure Write (Item : in Ada.Streams.Stream_Element_Array); procedure Write ( Filter : in out Filter_Type; Item : in Ada.Streams.Stream_Element_Array; Flush : in Flush_Mode := No_Flush); generic with procedure Read ( Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset); Buffer : in out Ada.Streams.Stream_Element_Array; Rest_First, Rest_Last : in out Ada.Streams.Stream_Element_Offset; procedure Read ( Filter : in out Filter_Type; Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset; Flush : in Flush_Mode := No_Flush); private use type Ada.Streams.Stream_Element_Offset; pragma Compile_Time_Error ( Window_Bits'Last /= C.zconf.MAX_WBITS, "MAX_WBITS is mismatch"); pragma Compile_Time_Error ( Memory_Level'Last /= C.zconf.MAX_MEM_LEVEL, "MAX_MEM_LEVEL is mismatch"); type Finalize_Type is access function (strm : access C.zlib.z_stream) return C.signed_int with Convention => C; type Non_Controlled_Stream is record Z_Stream : aliased C.zlib.z_stream; Finalize : Finalize_Type; Is_Open : Boolean; Mode : Stream_Mode; Stream_End : Boolean; end record; pragma Suppress_Initialization (Non_Controlled_Stream); package Controlled is type Stream is limited private; function Constant_Reference (Object : zlib.Stream) return not null access constant Non_Controlled_Stream; function Reference (Object : in out zlib.Stream) return not null access Non_Controlled_Stream; pragma Inline (Constant_Reference); pragma Inline (Reference); private type Stream is limited new Ada.Finalization.Limited_Controlled with record Variable_View : not null access Stream := Stream'Unchecked_Access; Data : aliased Non_Controlled_Stream := (Is_Open => False, others => <>); end record; overriding procedure Finalize (Object : in out Stream); end Controlled; type Stream is new Controlled.Stream; No_Compression : constant Compression_Level := C.zlib.Z_NO_COMPRESSION; Best_Speed : constant Compression_Level := C.zlib.Z_BEST_SPEED; Best_Compression : constant Compression_Level := C.zlib.Z_BEST_COMPRESSION; Default_Compression : constant Compression_Level := C.zlib.Z_DEFAULT_COMPRESSION; procedure Deflate_Or_Inflate ( Stream : in out zlib.Stream; In_Item : in Ada.Streams.Stream_Element_Array; In_Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : in Boolean; Finished : out Boolean); end zlib;
generic type Element_Type is private; type Index_Type is (<>); type Collection is array(Index_Type range <>) of Element_Type; with function "<" (Left, right : element_type) return boolean is <>; procedure Generic_Heapsort(Item : in out Collection);
with Ada.Exceptions.Finally; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with System; package body Ada.Containers.Limited_Ordered_Maps is use type Binary_Trees.Node_Access; -- diff function Upcast is new Unchecked_Conversion (Cursor, Binary_Trees.Node_Access); function Downcast is new Unchecked_Conversion (Binary_Trees.Node_Access, Cursor); -- diff (Upcast) -- -- diff (Downcast) -- procedure Free is new Unchecked_Deallocation (Key_Type, Key_Access); procedure Free is new Unchecked_Deallocation (Element_Type, Element_Access); procedure Free is new Unchecked_Deallocation (Node, Cursor); function Compare_Keys (Left, Right : Key_Type) return Integer; function Compare_Keys (Left, Right : Key_Type) return Integer is begin if Left < Right then return -1; elsif Right < Left then return 1; else return 0; end if; end Compare_Keys; type Context_Type is limited record Left : not null access Key_Type; end record; pragma Suppress_Initialization (Context_Type); function Compare_Key ( Position : not null Binary_Trees.Node_Access; Params : System.Address) return Integer; function Compare_Key ( Position : not null Binary_Trees.Node_Access; Params : System.Address) return Integer is Context : Context_Type; for Context'Address use Params; begin return Compare_Keys (Context.Left.all, Downcast (Position).Key.all); end Compare_Key; -- diff (Allocate_Element) -- -- -- -- -- -- -- -- -- diff (Allocate_Node) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- diff (Copy_Node) -- -- -- -- -- -- -- -- -- -- -- -- procedure Free_Node (Object : in out Binary_Trees.Node_Access); procedure Free_Node (Object : in out Binary_Trees.Node_Access) is X : Cursor := Downcast (Object); begin Free (X.Key); Free (X.Element); Free (X); Object := null; end Free_Node; -- diff (Allocate_Data) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- diff (Copy_Data) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- diff (Free) procedure Free_Data (Data : in out Map); procedure Free_Data (Data : in out Map) is -- diff begin Binary_Trees.Free (Data.Root, Data.Length, Free => Free_Node'Access); -- diff -- diff end Free_Data; -- diff (Unique) -- -- -- -- -- -- -- -- -- -- -- -- -- implementation function Equivalent_Keys (Left, Right : Key_Type) return Boolean is begin return Compare_Keys (Left, Right) = 0; end Equivalent_Keys; function Empty_Map return Map is begin return (Finalization.Limited_Controlled with Root => null, Length => 0); end Empty_Map; function Has_Element (Position : Cursor) return Boolean is begin return Position /= No_Element; end Has_Element; -- diff ("=") -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function Length (Container : Map) return Count_Type is -- diff begin -- diff -- diff -- diff return Container.Length; -- diff end Length; function Is_Empty (Container : Map) return Boolean is -- diff begin return Container.Root = null; end Is_Empty; procedure Clear (Container : in out Map) is begin Free_Data (Container); end Clear; function Key (Position : Cursor) return Key_Reference_Type is begin return (Element => Position.Key.all'Access); end Key; -- diff (Element) -- -- -- -- diff (Replace_Element) -- -- -- -- -- -- -- -- procedure Query_Element ( Position : Cursor; Process : not null access procedure ( Key : Key_Type; Element : Element_Type)) is begin Process (Position.Key.all, Position.Element.all); end Query_Element; procedure Update_Element ( Container : in out Map'Class; Position : Cursor; Process : not null access procedure ( Key : Key_Type; Element : in out Element_Type)) is begin Process ( Position.Key.all, Reference (Map (Container), Position).Element.all); end Update_Element; function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type is pragma Unreferenced (Container); begin return (Element => Position.Element.all'Access); end Constant_Reference; function Reference (Container : aliased in out Map; Position : Cursor) return Reference_Type is pragma Unreferenced (Container); begin return (Element => Position.Element.all'Access); end Reference; function Constant_Reference (Container : aliased Map; Key : Key_Type) return Constant_Reference_Type is begin return Constant_Reference (Container, Find (Container, Key)); end Constant_Reference; function Reference (Container : aliased in out Map; Key : Key_Type) return Reference_Type is begin return Reference (Container, Find (Container, Key)); end Reference; -- diff (Assign) -- -- -- -- -- -- -- diff (Copy) -- -- -- -- -- -- -- -- -- procedure Move (Target : in out Map; Source : in out Map) is begin if Target.Root /= Source.Root then Clear (Target); Target.Root := Source.Root; Target.Length := Source.Length; Source.Root := null; Source.Length := 0; end if; end Move; procedure Insert ( Container : in out Map'Class; New_Key : not null access function return Key_Type; New_Item : not null access function return Element_Type; Position : out Cursor; Inserted : out Boolean) is type Pair is record Key : Key_Access; Node : Cursor; end record; pragma Suppress_Initialization (Pair); procedure Finally (X : in out Pair); procedure Finally (X : in out Pair) is begin Free (X.Key); Free (X.Node); end Finally; package Holder is new Exceptions.Finally.Scoped_Holder (Pair, Finally); New_Pair : aliased Pair := (new Key_Type'(New_Key.all), null); Before : constant Cursor := Ceiling (Map (Container), New_Pair.Key.all); begin Holder.Assign (New_Pair); Inserted := Before = null or else New_Pair.Key.all < Before.Key.all; if Inserted then New_Pair.Node := new Node; New_Pair.Node.Key := New_Pair.Key; New_Pair.Node.Element := new Element_Type'(New_Item.all); Holder.Clear; Position := New_Pair.Node; Base.Insert ( Container.Root, Container.Length, Upcast (Before), Upcast (Position)); -- diff else Position := Before; end if; end Insert; -- diff (Insert) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- procedure Insert ( Container : in out Map'Class; Key : not null access function return Key_Type; New_Item : not null access function return Element_Type) is Position : Cursor; Inserted : Boolean; begin Insert (Container, Key, New_Item, Position, Inserted); if not Inserted then raise Constraint_Error; end if; end Insert; -- diff (Include) -- -- -- -- -- -- -- -- -- -- -- -- -- diff (Replace) -- -- -- -- -- -- procedure Exclude (Container : in out Map; Key : Key_Type) is Position : Cursor := Find (Container, Key); begin if Position /= null then Delete (Container, Position); end if; end Exclude; procedure Delete (Container : in out Map; Key : Key_Type) is Position : Cursor := Find (Container, Key); begin Delete (Container, Position); end Delete; procedure Delete (Container : in out Map; Position : in out Cursor) is Position_2 : Binary_Trees.Node_Access := Upcast (Position); begin -- diff -- diff -- diff -- diff Base.Remove (Container.Root, Container.Length, Position_2); -- diff Free_Node (Position_2); Position := null; end Delete; procedure Delete_First (Container : in out Map'Class) is Position : Cursor := First (Map (Container)); begin Delete (Map (Container), Position); end Delete_First; procedure Delete_Last (Container : in out Map'Class) is Position : Cursor := Last (Map (Container)); begin Delete (Map (Container), Position); end Delete_Last; function First (Container : Map) return Cursor is begin -- diff -- diff -- diff -- diff return Downcast (Binary_Trees.First ( Container.Root)); -- diff end First; -- diff (First_Element) -- -- -- -- -- diff (First_Key) -- -- -- -- function Last (Container : Map) return Cursor is begin return Downcast (Binary_Trees.Last (Container.Root)); -- diff -- diff -- diff -- diff -- diff -- diff end Last; -- diff (Last_Element) -- -- -- -- -- diff (Last_Key) -- -- -- -- function Next (Position : Cursor) return Cursor is begin return Downcast (Binary_Trees.Next (Upcast (Position))); end Next; procedure Next (Position : in out Cursor) is begin Position := Downcast (Binary_Trees.Next (Upcast (Position))); end Next; function Previous (Position : Cursor) return Cursor is begin return Downcast (Binary_Trees.Previous (Upcast (Position))); end Previous; procedure Previous (Position : in out Cursor) is begin Position := Downcast (Binary_Trees.Previous (Upcast (Position))); end Previous; function Find (Container : Map; Key : Key_Type) return Cursor is begin -- diff -- diff -- diff -- diff declare Context : aliased Context_Type := (Left => Key'Unrestricted_Access); begin return Downcast (Binary_Trees.Find ( Container.Root, Binary_Trees.Just, Context'Address, Compare => Compare_Key'Access)); end; -- diff end Find; -- diff (Element) -- -- -- -- -- -- function Floor (Container : Map; Key : Key_Type) return Cursor is begin -- diff -- diff -- diff -- diff declare Context : aliased Context_Type := (Left => Key'Unrestricted_Access); begin return Downcast (Binary_Trees.Find ( Container.Root, Binary_Trees.Floor, Context'Address, Compare => Compare_Key'Access)); end; -- diff end Floor; function Ceiling (Container : Map; Key : Key_Type) return Cursor is begin -- diff -- diff -- diff -- diff declare Context : aliased Context_Type := (Left => Key'Unrestricted_Access); begin return Downcast (Binary_Trees.Find ( Container.Root, Binary_Trees.Ceiling, Context'Address, Compare => Compare_Key'Access)); end; -- diff end Ceiling; function Contains (Container : Map; Key : Key_Type) return Boolean is begin return Find (Container, Key) /= null; end Contains; function "<" (Left, Right : Cursor) return Boolean is begin return Left /= Right and then Left.Key.all < Right.Key.all; end "<"; function ">" (Left, Right : Cursor) return Boolean is begin return Right < Left; end ">"; function "<" (Left : Cursor; Right : Key_Type) return Boolean is begin return Left.Key.all < Right; end "<"; function ">" (Left : Cursor; Right : Key_Type) return Boolean is begin return Right < Left; end ">"; function "<" (Left : Key_Type; Right : Cursor) return Boolean is begin return Left < Right.Key.all; end "<"; function ">" (Left : Key_Type; Right : Cursor) return Boolean is begin return Right < Left; end ">"; procedure Iterate ( Container : Map'Class; Process : not null access procedure (Position : Cursor)) is type P1 is access procedure (Position : Cursor); type P2 is access procedure (Position : Binary_Trees.Node_Access); function Cast is new Unchecked_Conversion (P1, P2); begin -- diff -- diff Binary_Trees.Iterate ( Container.Root, Cast (Process)); -- diff end Iterate; procedure Reverse_Iterate ( Container : Map'Class; Process : not null access procedure (Position : Cursor)) is type P1 is access procedure (Position : Cursor); type P2 is access procedure (Position : Binary_Trees.Node_Access); function Cast is new Unchecked_Conversion (P1, P2); begin -- diff -- diff Binary_Trees.Reverse_Iterate ( Container.Root, Cast (Process)); -- diff end Reverse_Iterate; function Iterate (Container : Map'Class) return Map_Iterator_Interfaces.Reversible_Iterator'Class is begin return Map_Iterator'( First => First (Map (Container)), Last => Last (Map (Container))); end Iterate; function Iterate (Container : Map'Class; First, Last : Cursor) return Map_Iterator_Interfaces.Reversible_Iterator'Class is pragma Unreferenced (Container); Actual_First : Cursor := First; Actual_Last : Cursor := Last; begin if Actual_First = No_Element or else Actual_Last = No_Element or else Actual_Last < Actual_First then Actual_First := No_Element; Actual_Last := No_Element; end if; return Map_Iterator'(First => Actual_First, Last => Actual_Last); end Iterate; -- diff (Adjust) -- -- -- overriding function First (Object : Map_Iterator) return Cursor is begin return Object.First; end First; overriding function Next (Object : Map_Iterator; Position : Cursor) return Cursor is begin if Position = Object.Last then return No_Element; else return Next (Position); end if; end Next; overriding function Last (Object : Map_Iterator) return Cursor is begin return Object.Last; end Last; overriding function Previous (Object : Map_Iterator; Position : Cursor) return Cursor is begin if Position = Object.First then return No_Element; else return Previous (Position); end if; end Previous; package body Equivalents is function "=" (Left, Right : Map) return Boolean is function Equivalent (Left, Right : not null Binary_Trees.Node_Access) return Boolean; function Equivalent (Left, Right : not null Binary_Trees.Node_Access) return Boolean is begin return Equivalent_Keys ( Downcast (Left).Key.all, Downcast (Right).Key.all) and then Downcast (Left).Element.all = Downcast (Right).Element.all; end Equivalent; begin return Left.Length = Right.Length and then Binary_Trees.Equivalent ( Left.Root, Right.Root, Equivalent => Equivalent'Access); end "="; end Equivalents; end Ada.Containers.Limited_Ordered_Maps;
-- Copyright (c) 2021 Devin Hill -- zlib License -- see LICENSE for details. with GBA.Interrupts; use GBA.Interrupts; with GBA.Memory; use GBA.Memory; with GBA.BIOS.Generic_Interface; package GBA.BIOS.Raw.Thumb is IMPORT_PREFIX : constant String := "bios_thumb__"; procedure Soft_Reset with Import, External_Name => IMPORT_PREFIX & "soft_reset"; procedure Hard_Reset with Import, External_Name => IMPORT_PREFIX & "hard_reset"; procedure Register_RAM_Reset (Flags : Register_RAM_Reset_Flags) with Import, External_Name => IMPORT_PREFIX & "register_ram_reset"; procedure Halt with Import, External_Name => IMPORT_PREFIX & "halt"; procedure Stop with Import, External_Name => IMPORT_PREFIX & "stop"; procedure Wait_For_Interrupt ( New_Only : Boolean; Wait_For : Interrupt_Flags) with Import, External_Name => IMPORT_PREFIX & "wait_for_interrupt"; procedure Wait_For_VBlank with Import, External_Name => IMPORT_PREFIX & "wait_for_vblank"; function Div_Mod (Num, Denom : Integer) return Long_Long_Integer with Import, Pure_Function, External_Name => IMPORT_PREFIX & "div_mod"; function Div_Mod_Arm (Denom, Num : Integer) return Long_Long_Integer with Import, Pure_Function, External_Name => IMPORT_PREFIX & "div_mod_arm"; function Sqrt (Num : Unsigned_32) return Unsigned_16 with Import, Pure_Function, External_Name => IMPORT_PREFIX & "sqrt"; function Arc_Tan (X, Y : Fixed_2_14) return Radians_16 with Import, Pure_Function, External_Name => IMPORT_PREFIX & "arc_tan2"; procedure Cpu_Set (Src, Dest : Address; Config : Cpu_Set_Config) with Import, External_Name => IMPORT_PREFIX & "cpu_set"; procedure Cpu_Fast_Set (Src, Dest : Address; Config : Cpu_Set_Config) with Import, External_Name => IMPORT_PREFIX & "cpu_fast_set"; function Bios_Checksum return Unsigned_32 with Import, External_Name => IMPORT_PREFIX & "get_bios_checksum"; procedure Affine_Set_Ext (Parameters : Address; Transform : Address; Count : Integer) with Import, External_Name => IMPORT_PREFIX & "bg_affine_set"; procedure Affine_Set (Parameters : Address; Transform : Address; Count, Stride : Integer) with Import, External_Name => IMPORT_PREFIX & "obj_affine_set"; package Generic_Interface is new GBA.BIOS.Generic_Interface; end GBA.BIOS.Raw.Thumb;
with Ada.Containers.Hashed_Maps; with Ada.Containers.Ordered_Maps; with Ada.Streams.Unbounded_Storage_IO; with Ada.Strings.Maps.Constants; procedure mapstreaming is use type Ada.Containers.Count_Type; use type Ada.Streams.Stream_Element_Offset; use type Ada.Strings.Maps.Character_Mapping; Source : constant Ada.Strings.Maps.Character_Mapping := Ada.Strings.Maps.Constants.Case_Folding_Map; Source_Domain : constant Wide_Wide_String := Ada.Strings.Maps.Overloaded_To_Domain (Source); Source_Length : constant Ada.Containers.Count_Type := Source_Domain'Length; Buffer : Ada.Streams.Unbounded_Storage_IO.Buffer_Type; begin Ada.Strings.Maps.Character_Mapping'Write ( Ada.Streams.Unbounded_Storage_IO.Stream (Buffer), Source); -- Character_Mapping Ada.Streams.Unbounded_Storage_IO.Reset (Buffer); declare X : Ada.Strings.Maps.Character_Mapping; begin Ada.Strings.Maps.Character_Mapping'Read ( Ada.Streams.Unbounded_Storage_IO.Stream (Buffer), X); pragma Assert ( Ada.Streams.Index ( Ada.Streams.Seekable_Stream_Type'Class ( Ada.Streams.Unbounded_Storage_IO.Stream (Buffer).all)) = Ada.Streams.Unbounded_Storage_IO.Size (Buffer) + 1); pragma Assert (X = Source); end; -- Ordered_Maps Ada.Streams.Unbounded_Storage_IO.Reset (Buffer); declare package Maps is new Ada.Containers.Ordered_Maps ( Wide_Wide_Character, Wide_Wide_Character); X : Maps.Map; begin Maps.Map'Read ( Ada.Streams.Unbounded_Storage_IO.Stream (Buffer), X); pragma Assert ( Ada.Streams.Index ( Ada.Streams.Seekable_Stream_Type'Class ( Ada.Streams.Unbounded_Storage_IO.Stream (Buffer).all)) = Ada.Streams.Unbounded_Storage_IO.Size (Buffer) + 1); pragma Assert (X.Length = Source_Length); for I in X.Iterate loop pragma Assert ( Ada.Strings.Maps.Overloaded_Value (Source, Maps.Key (I)) = Maps.Element (I)); null; end loop; end; -- Hashed_Maps Ada.Streams.Unbounded_Storage_IO.Reset (Buffer); declare function Hash (Item : Wide_Wide_Character) return Ada.Containers.Hash_Type is begin return Wide_Wide_Character'Pos (Item); end Hash; package Maps is new Ada.Containers.Hashed_Maps ( Wide_Wide_Character, Wide_Wide_Character, Hash => Hash, Equivalent_Keys => "="); X : Maps.Map; begin Maps.Map'Read ( Ada.Streams.Unbounded_Storage_IO.Stream (Buffer), X); pragma Assert ( Ada.Streams.Index ( Ada.Streams.Seekable_Stream_Type'Class ( Ada.Streams.Unbounded_Storage_IO.Stream (Buffer).all)) = Ada.Streams.Unbounded_Storage_IO.Size (Buffer) + 1); pragma Assert (X.Length = Source_Length); for I in X.Iterate loop pragma Assert ( Ada.Strings.Maps.Overloaded_Value (Source, Maps.Key (I)) = Maps.Element (I)); null; end loop; end; pragma Debug (Ada.Debug.Put ("OK")); end mapstreaming;
------------------------------------------------------------------------------- -- package body Text_Utilities; for Random and Basic_Rand. -- Copyright (C) 1995-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. ------------------------------------------------------------------------------- package body Text_Utilities with Spark_Mode => On is subtype Integer_Digit is Parent_Random_Int range 0 .. 9; Digit_Image : constant array(Integer_Digit) of Character_Digit := ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); Digit_Value : constant array(Character_Digit) of Integer_Digit := (0, 1, 2, 3, 4, 5, 6, 7, 8, 9); subtype Log_Range is Natural range 0 .. 19; Ten_to_the : constant array(Log_Range) of Parent_Random_Int := (10**00, 10**01, 10**02, 10**03, 10**04, 10**05, 10**06, 10**07, 10**08, 10**09, 10**10, 10**11, 10**12, 10**13, 10**14, 10**15, 10**16, 10**17, 10**18, 10**19); ----------- -- Value -- ----------- -- Random_Int_String contains a 20 digit unsigned integer. -- Every Parent_Random_Int (0 .. 2**64-1) can be represented in 20 decimal digits. -- -- All state values satisfy State.X(i) < 2^64. -- -- The calculation uses the modular arithmetic of modular type Parent_Random_Int. -- If the image string encodes a number > 2^64-1, then of course the calculation -- won't return that value, but all State.X(i) values are in a range that -- is correctly evaluated by this function. -- -- For more general use, one may want to check if the string is out-of-range -- of Parent_Random_Int (i.e. > 2^64-1). To do that, sum the least significant 19 -- digits first. Then check if the most significant digit is '0', '1', or greater. -- If greater the string is out of range, if '1' it might be out of range, and if -- '0' then it's in range. function Value (Random_Int_Image : in Random_Int_String) return Parent_Random_Int is Val : Parent_Random_Int := 0; begin for j in Random_Int_String_Index loop Val := Val + Digit_Value (Random_Int_Image(j))*Ten_to_the(Random_Int_String_Index'Last - j); end loop; return Val; end Value; ----------- -- Image -- ----------- -- Every 64 bit Parent_Random_Int can be represented by a 20 decimal digit -- number. function Image (X : in Parent_Random_Int) return Random_Int_String is Ten : constant Parent_Random_Int := 10; Y : Parent_Random_Int := X; Result : Random_Int_String; begin for j in reverse Random_Int_String_Index loop Result(j) := Digit_Image (Y mod Ten); Y := Y / Ten; end loop; return Result; end Image; end Text_Utilities;
------------------------------------------------------------------------------ -- -- -- Hardware Abstraction Layer for STM32 Targets -- -- -- -- Copyright (C) 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. -- -- -- -- 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 file provides register definitions for the STM32F4 (ARM Cortex M4F) -- USART from ST Microelectronics. -- Note that there are board implementation assumptions represented by the -- private function APB_Clock. pragma Restrictions (No_Elaboration_Code); with System; package STM32F4.USARTs is type USART is limited private; procedure Enable (This : in out USART) with Post => Enabled (This), Inline; procedure Disable (This : in out USART) with Post => not Enabled (This), Inline; function Enabled (This : USART) return Boolean with Inline; procedure Receive (This : USART; Data : out Half_Word) with Inline; -- reads Device.DR into Data function Current_Input (This : USART) return Half_Word with Inline; -- returns Device.DR procedure Transmit (This : in out USART; Data : Half_Word) with Inline; function Tx_Ready (This : USART) return Boolean with Inline; function Rx_Ready (This : USART) return Boolean with Inline; type Stop_Bits is (Stopbits_1, Stopbits_2); for Stop_Bits use (Stopbits_1 => 0, Stopbits_2 => 16#2000#); for Stop_Bits'Size use Half_Word'Size; procedure Set_Stop_Bits (This : in out USART; To : Stop_Bits); type Word_Lengths is (Word_Length_8, Word_Length_9); for Word_Lengths use (Word_Length_8 => 0, Word_Length_9 => 16#1000#); for Word_Lengths'Size use Half_Word'Size; procedure Set_Word_Length (This : in out USART; To : Word_Lengths); type Parities is (No_Parity, Even_Parity, Odd_Parity); for Parities use (No_Parity => 0, Even_Parity => 16#0400#, Odd_Parity => 16#0600#); for Parities'Size use Half_Word'Size; procedure Set_Parity (This : in out USART; To : Parities); subtype Baud_Rates is Word range 110 .. 115_200 with Static_Predicate => Baud_Rates in 110 | 300 | 600 | 1200 | 2400 | 4800 | 9600 | 14_400 | 19_200 | 28_800 | 38_400 | 56_000 | 57_600 | 115_200; procedure Set_Baud_Rate (This : in out USART; To : Baud_Rates); type UART_Modes is (Rx_Mode, Tx_Mode, Tx_Rx_Mode); for UART_Modes use (Rx_Mode => 16#0004#, Tx_Mode => 16#0008#, Tx_Rx_Mode => 16#000C#); for UART_Modes'Size use Half_Word'Size; procedure Set_Mode (This : in out USART; To : UART_Modes); type Flow_Control is (No_Flow_Control, RTS_Flow_Control, CTS_Flow_Control, RTS_CTS_Flow_Control); for Flow_Control use (No_Flow_Control => 0, RTS_Flow_Control => 16#0100#, CTS_Flow_Control => 16#0200#, RTS_CTS_Flow_Control => 16#0300#); for Flow_Control'Size use Half_Word'Size; procedure Set_Flow_Control (This : in out USART; To : Flow_Control); type USART_Interrupt is (Parity_Error, Transmit_Data_Register_Empty, Transmission_Complete, Received_Data_Not_Empty, Idle_Line_Detection, Line_Break_Detection, Clear_To_Send, Error); procedure Enable_Interrupts (This : in out USART; Source : USART_Interrupt) with Post => Interrupt_Enabled (This, Source), Inline; procedure Disable_Interrupts (This : in out USART; Source : USART_Interrupt) with Post => not Interrupt_Enabled (This, Source), Inline; function Interrupt_Enabled (This : USART; Source : USART_Interrupt) return Boolean with Inline; type USART_Status_Flag is (Parity_Error_Indicated, Framing_Error_Indicated, USART_Noise_Error_Indicated, Overrun_Error_Indicated, Idle_Line_Detection_Indicated, Read_Data_Register_Not_Empty, Transmission_Complete_Indicated, Transmit_Data_Register_Empty, Line_Break_Detection_Indicated, Clear_To_Send_Indicated); function Status (This : USART; Flag : USART_Status_Flag) return Boolean with Inline; procedure Clear_Status (This : in out USART; Flag : USART_Status_Flag) with Inline; procedure Enable_DMA_Transmit_Requests (This : in out USART) with Inline, Post => DMA_Transmit_Requests_Enabled (This); procedure Disable_DMA_Transmit_Requests (This : in out USART) with Inline, Post => not DMA_Transmit_Requests_Enabled (This); function DMA_Transmit_Requests_Enabled (This : USART) return Boolean with Inline; procedure Enable_DMA_Receive_Requests (This : in out USART) with Inline, Post => DMA_Receive_Requests_Enabled (This); procedure Disable_DMA_Receive_Requests (This : in out USART) with Inline, Post => not DMA_Receive_Requests_Enabled (This); function DMA_Receive_Requests_Enabled (This : USART) return Boolean with Inline; procedure Pause_DMA_Transmission (This : in out USART) renames Disable_DMA_Transmit_Requests; procedure Resume_DMA_Transmission (This : in out USART) with Inline, Post => DMA_Transmit_Requests_Enabled (This) and Enabled (This); procedure Pause_DMA_Reception (This : in out USART) renames Disable_DMA_Receive_Requests; procedure Resume_DMA_Reception (This : in out USART) with Inline, Post => DMA_Receive_Requests_Enabled (This) and Enabled (This); ----------------------------- WARNING -------------------------------------- function Data_Register_Address (This : USART) return System.Address with Inline; -- Returns the address of the USART Data Register. This is exported -- STRICTLY for the sake of clients driving a USART via DMA. All other -- clients of this package should use the procedural interfaces Transmit -- and Receive instead of directly accessing the Data Register! -- Seriously, don't use this function otherwise. ----------------------------- WARNING -------------------------------------- private type Status_Register is record Reserved0 : Half_Word; Reserved1 : Bits_6; Clear_To_Send_Flag : Boolean; LIN_Break_Detected_Flag : Boolean; Transmit_Data_Register_Empty_Flag : Boolean; Transmission_Complete_Flag : Boolean; Read_Data_Register_Not_Empty_Flag : Boolean; IDLE_Line_Detected_Flag : Boolean; OverRun_Error_Flag : Boolean; Noise_Error_Flag : Boolean; Framing_Error_Flag : Boolean; Parity_Error_Flag : Boolean; end record with Atomic, Size => 32; for Status_Register use record Reserved0 at 0 range 16 .. 31; Reserved1 at 0 range 10 .. 15; Clear_To_Send_Flag at 0 range 9 .. 9; LIN_Break_Detected_Flag at 0 range 8 .. 8; Transmit_Data_Register_Empty_Flag at 0 range 7 .. 7; Transmission_Complete_Flag at 0 range 6 .. 6; Read_Data_Register_Not_Empty_Flag at 0 range 5 .. 5; IDLE_Line_Detected_Flag at 0 range 4 .. 4; OverRun_Error_Flag at 0 range 3 .. 3; Noise_Error_Flag at 0 range 2 .. 2; Framing_Error_Flag at 0 range 1 .. 1; Parity_Error_Flag at 0 range 0 .. 0; end record; for Status_Register'Bit_Order use System.Low_Order_First; type USART is limited record SR : Status_Register; DR : Half_Word; -- Data register Reserved_1 : Half_Word; BRR : Half_Word; -- Baud rate register Reserved_2 : Half_Word; CR1 : Half_Word; -- Control register 1 Reserved_3 : Half_Word; CR2 : Half_Word; -- Control register 2 Reserved_4 : Half_Word; CR3 : Half_Word; -- Control register 3 Reserved_5 : Half_Word; GTPR : Half_Word; -- Guard time and prescaler register Reserved_6 : Half_Word; end record with Volatile; for USART use record SR at 0 range 0 .. 31; DR at 4 range 0 .. 15; Reserved_1 at 6 range 0 .. 15; BRR at 8 range 0 .. 15; Reserved_2 at 10 range 0 .. 15; CR1 at 12 range 0 .. 15; Reserved_3 at 14 range 0 .. 15; CR2 at 16 range 0 .. 15; Reserved_4 at 18 range 0 .. 15; CR3 at 20 range 0 .. 15; Reserved_5 at 22 range 0 .. 15; GTPR at 24 range 0 .. 15; Reserved_6 at 26 range 0 .. 15; end record; function APB_Clock (This : USART) return Word with Inline; -- Returns either APB1 or APB2 clock rate, in Hertz, depending on the USART. -- For the sake of not making this package board-specific, we assume that -- we are given a valid USART object at a valid address, AND that the -- USART devices really are configured such that only 1 and 6 are on APB2. -- Therefore, if a board has additional USARTs beyond USART6, eg USART8 on -- the F429I Discovery board, they better conform to that assumption. USART_DR_MASK : constant Half_Word := 16#1FF#; -- TODO: consider replacing CRx with record types -- Bit definitions for USART CR1 register CR1_SBK : constant := 16#0001#; -- Send Break CR1_RWU : constant := 16#0002#; -- Receiver Wakeup CR1_RE : constant := 16#0004#; -- Receiver Enable CR1_TE : constant := 16#0008#; -- Transmitter Enable CR1_IDLEIE : constant := 16#0010#; -- IDLE Interrupt Enable CR1_RXNEIE : constant := 16#0020#; -- RXNE Interrupt Enable CR1_TCIE : constant := 16#0040#; -- Transmit Complete Interrupt Enable CR1_TXEIE : constant := 16#0080#; -- Transmit Data Register Empty Interrupt Enable CR1_PEIE : constant := 16#0100#; -- PE Interrupt Enable CR1_PS : constant := 16#0200#; -- Parity Selection CR1_PCE : constant := 16#0400#; -- Parity Control Enable CR1_WAKE : constant := 16#0800#; -- Wakeup Method CR1_M : constant := 16#1000#; -- Word Length CR1_UE : constant := 16#2000#; -- USART Enable CR1_OVER8 : constant := 16#8000#; -- Oversampling by 8 Enable -- Bit definitions for USART CR2 register CR2_ADD : constant := 16#000F#; -- Address of USART Node CR2_LBDL : constant := 16#0020#; -- LIN Brk Detection Length CR2_LBDIE : constant := 16#0040#; -- LIN Brk Detection Interrupt Enable CR2_LBCL : constant := 16#0100#; -- Last Bit Clock pulse CR2_CPHA : constant := 16#0200#; -- Clock Phase CR2_CPOL : constant := 16#0400#; -- Clock Polarity CR2_CLKEN : constant := 16#0800#; -- Clock Enable CR2_STOP : constant := 16#3000#; -- STOP bits CR2_STOP_0 : constant := 16#1000#; -- Bit 0 CR2_STOP_1 : constant := 16#2000#; -- Bit 1 CR2_LINEN : constant := 16#4000#; -- LIN mode enable -- Bit definitions for USART CR3 register CR3_EIE : constant := 16#0001#; -- Error Interrupt Enable CR3_IREN : constant := 16#0002#; -- IrDA mode Enable CR3_IRLP : constant := 16#0004#; -- IrDA Low-Power CR3_HDSEL : constant := 16#0008#; -- Half-Duplex Selection CR3_NACK : constant := 16#0010#; -- Smartcard NACK enable CR3_SCEN : constant := 16#0020#; -- Smartcard mode enable CR3_DMAR : constant := 16#0040#; -- DMA Enable Receiver CR3_DMAT : constant := 16#0080#; -- DMA Enable Transmitter CR3_RTSE : constant := 16#0100#; -- RTS Enable CR3_CTSE : constant := 16#0200#; -- CTS Enable CR3_CTSIE : constant := 16#0400#; -- CTS Interrupt Enable CR3_ONEBIT : constant := 16#0800#; -- One bit method enable end STM32F4.USARTs;
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" private with GL.API.Mac_OS_X; function GL.API.Subprogram_Reference (Function_Name : String) return System.Address is -- OSX-specific implementation uses CoreFoundation functions use GL.API.Mac_OS_X; package IFC renames Interfaces.C; Symbol_Name : constant CFStringRef := CFStringCreateWithCString (alloc => System.Null_Address, cStr => IFC.To_C (Function_Name), encoding => kCFStringEncodingASCII); Result : constant System.Address := CFBundleGetFunctionPointerForName (bundle => OpenGLFramework, functionName => Symbol_Name); begin CFRelease (Symbol_Name); return Result; end GL.API.Subprogram_Reference;
--- src/gprlib.adb.orig 2021-05-19 05:22:13 UTC +++ src/gprlib.adb @@ -745,9 +745,6 @@ procedure Gprlib is for Dir of Imported_Library_Directories loop Library_Switches_Table.Append ("-L" & Dir); - if Path_Option /= null then - Add_Rpath (Dir); - end if; end loop; for Libname of Imported_Library_Names loop @@ -941,12 +938,6 @@ procedure Gprlib is Shared_Lib_Suffix.all); end if; - if Path_Option /= null then - for Path of Library_Rpath_Options_Table loop - Add_Rpath (Path); - end loop; - end if; - if Path_Option /= null and then not Rpath.Is_Empty then if Separate_Run_Path_Options then for J in 1 .. Rpath.Last_Index loop @@ -1477,9 +1468,7 @@ procedure Gprlib is Object_Files.Append (Opt); else if Partial_Linker_Path = null then - Fail_Program - (null, - "unknown object file """ & Opt & """"); + Put_Line ("WARNING: unknown object '" & Opt & "'"); else Trailing_PL_Options.Append (Opt); end if; @@ -2130,10 +2119,10 @@ procedure Gprlib is Libgnat := new String' - ("-lgnat-" & Line (6 .. Last)); + ("-lgnat-" & Line (6 .. 7)); Libgnarl := new String' - ("-lgnarl-" & Line (6 .. Last)); + ("-lgnarl-" & Line (6 .. 7)); end if; else
package body Ant_Handler with SPARK_Mode => On is function Do_Something (Text : String) return String is begin return Text; end Do_Something; end Ant_Handler;
-- { dg-do compile } -- { dg-options "-O" } package body Opt11 is procedure Proc is R : Rec; begin R := (others => <>); end; end Opt11;
with Ada.Strings.Maps; with Ada.Containers.Indefinite_Vectors; with Ada.Containers.Indefinite_Ordered_Maps; generic type Token_Type is (<>); type State_Type is (<>); Start_State : State_Type; EOF_Token : Token_Type; package Finite_State_Scanners is type Automata_Table is private; procedure Add_Branch (Table : in out Automata_Table; From : State_Type; On : Ada.Strings.Maps.Character_Set; To : State_Type); procedure Add_Default (Table : in out Automata_Table; From : State_Type; To : State_Type); procedure Add_Final (Table : in out Automata_Table; From : State_Type; On : Ada.Strings.Maps.Character_Set; Result : Token_Type); procedure Add_Shortcut (Table : in out Automata_Table; From : State_Type; On : String; Result : Token_Type); procedure Add_Default (Table : in out Automata_Table; From : State_Type; Result : Token_Type); type Token_Descriptor (Length : Natural) is record Token : Token_Type; Image : String (1 .. Length); end record; package Token_Vectors is new Ada.Containers.Indefinite_Vectors (Index_Type => Positive, Element_Type => Token_Descriptor); type Token_List is tagged private; function Current (List : Token_List) return Token_Descriptor; function Current (List : Token_List) return Token_Type; function All_Tokens (List : Token_List) return Token_Vectors.Vector; function Scan (Input : String; Automa : Automata_Table; Skip : String := " ") return Token_List; private type Transition_Class is (To_Final, To_State, Empty); type Transition_Description (Class : Transition_Class := To_State) is record case Class is when To_Final => Result : Token_Type; when To_State => Destination : State_Type; when Empty => null; end case; end record; Empty_Transition : constant Transition_Description := (Class => Empty); type Transition_Map is array (State_Type, Character) of Transition_Description; Empty_Transition_Map : constant Transition_Map := (others => (others => Empty_Transition)); type Shortcut_Descriptor (Length : Natural) is record Shortcut : String (1 .. Length); Result : Token_Type; end record; package Shortcut_Vectors is new Ada.Containers.Indefinite_Vectors (Index_Type => Positive, Element_Type => Shortcut_Descriptor); use type Shortcut_Vectors.Vector; package Shortcut_Maps is new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => State_Type, Element_Type => Shortcut_Vectors.Vector); type Automata_Table is record Transitions : Transition_Map := Empty_Transition_Map; Shortcuts : Shortcut_Maps.Map := Shortcut_Maps.Empty_Map; end record; type Token_List is tagged record Position : Positive; L : Token_Vectors.Vector; end record; EOF_Descriptor : constant Token_Descriptor := (Length => 0, Token => EOF_Token, Image => ""); function All_Tokens (List : Token_List) return Token_Vectors.Vector is (List.L); function Current (List : Token_List) return Token_Descriptor is (if List.Position > List.L.Last_Index then EOF_Descriptor else List.L (List.Position)); function Current (List : Token_List) return Token_Type is (List.Current.Token); end Finite_State_Scanners;
with openGL.Geometry.textured, openGL.Primitive.indexed; package body openGL.Model.box.textured is type Geometry_view is access all Geometry.textured.item'Class; --------- --- Forge -- function new_Box (Size : in Vector_3; Faces : in textured.Faces; is_Skybox : in Boolean := False) return View is Self : constant View := new Item; begin Self.Faces := Faces; Self.is_Skybox := is_Skybox; Self.Size := Size; return Self; end new_Box; -------------- --- Attributes -- overriding function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; Fonts : in Font.font_id_Map_of_font) return Geometry.views is pragma unreferenced (Fonts); use Geometry.textured, Texture; the_Sites : constant box.Sites := Self.vertex_Sites; the_Indices : aliased Indices := (1, 2, 3, 4); function new_Face (Vertices : access Geometry.textured.Vertex_array) return Geometry_view is use Primitive; the_Geometry : constant Geometry_view := Geometry.textured.new_Geometry; the_Primitive : constant Primitive.view := Primitive.indexed.new_Primitive (triangle_Fan, the_Indices).all'Access; begin the_Geometry.Vertices_are (Vertices.all); the_Geometry.add (the_Primitive); return the_Geometry; end new_Face; front_Face : Geometry_view; rear_Face : Geometry_view; upper_Face : Geometry_view; lower_Face : Geometry_view; left_Face : Geometry_view; right_Face : Geometry_view; begin if Self.is_Skybox then the_Indices := (4, 3, 2, 1); end if; -- Front -- declare the_Vertices : aliased Geometry.textured.Vertex_array := (1 => (Site => the_Sites ( left_lower_front), Coords => (0.0, 0.0)), 2 => (Site => the_Sites (right_lower_front), Coords => (1.0, 0.0)), 3 => (Site => the_Sites (right_upper_front), Coords => (1.0, 1.0)), 4 => (Site => the_Sites ( left_upper_front), Coords => (0.0, 1.0))); begin front_Face := new_Face (Vertices => the_Vertices'Access); if Self.Faces (Front).texture_Name /= null_Asset then front_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name)); front_Face.is_Transparent (now => front_Face.Texture.is_Transparent); end if; end; -- Rear -- declare the_Vertices : aliased Geometry.textured.Vertex_array := (1 => (Site => the_Sites (Right_Lower_Rear), Coords => (0.0, 0.0)), 2 => (Site => the_Sites ( Left_Lower_Rear), Coords => (1.0, 0.0)), 3 => (Site => the_Sites ( Left_Upper_Rear), Coords => (1.0, 1.0)), 4 => (Site => the_Sites (Right_Upper_Rear), Coords => (0.0, 1.0))); begin rear_Face := new_Face (Vertices => the_Vertices'Access); if Self.Faces (Rear).texture_Name /= null_Asset then rear_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name)); rear_Face.is_Transparent (now => rear_Face.Texture.is_Transparent); end if; end; -- Upper -- declare the_Vertices : aliased Geometry.textured.Vertex_array := (1 => (Site => the_Sites ( Left_Upper_Front), Coords => (0.0, 0.0)), 2 => (Site => the_Sites (Right_Upper_Front), Coords => (1.0, 0.0)), 3 => (Site => the_Sites (Right_Upper_Rear), Coords => (1.0, 1.0)), 4 => (Site => the_Sites ( Left_Upper_Rear), Coords => (0.0, 1.0))); begin upper_Face := new_Face (Vertices => the_Vertices'Access); if Self.Faces (Upper).texture_Name /= null_Asset then upper_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name)); upper_Face.is_Transparent (now => upper_Face.Texture.is_Transparent); end if; end; -- Lower -- declare the_Vertices : aliased Geometry.textured.Vertex_array := (1 => (Site => the_Sites (Right_Lower_Front), Coords => (0.0, 0.0)), 2 => (Site => the_Sites ( Left_Lower_Front), Coords => (1.0, 0.0)), 3 => (Site => the_Sites ( Left_Lower_Rear), Coords => (1.0, 1.0)), 4 => (Site => the_Sites (Right_Lower_Rear), Coords => (0.0, 1.0))); begin lower_Face := new_Face (Vertices => the_Vertices'Access); if Self.Faces (Lower).texture_Name /= null_Asset then lower_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name)); lower_Face.is_Transparent (now => lower_Face.Texture.is_Transparent); end if; end; -- Left -- declare the_Vertices : aliased Geometry.textured.Vertex_array := (1 => (Site => the_Sites (Left_Lower_Rear), Coords => (0.0, 0.0)), 2 => (Site => the_Sites (Left_Lower_Front), Coords => (1.0, 0.0)), 3 => (Site => the_Sites (Left_Upper_Front), Coords => (1.0, 1.0)), 4 => (Site => the_Sites (Left_Upper_Rear), Coords => (0.0, 1.0))); begin left_Face := new_Face (Vertices => the_Vertices'Access); if Self.Faces (Left).texture_Name /= null_Asset then left_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name)); left_Face.is_Transparent (now => left_Face.Texture.is_Transparent); end if; end; -- Right -- declare the_Vertices : aliased Geometry.textured.Vertex_array := (1 => (Site => the_Sites (Right_Lower_Front), Coords => (0.0, 0.0)), 2 => (Site => the_Sites (Right_Lower_Rear), Coords => (1.0, 0.0)), 3 => (Site => the_Sites (Right_Upper_Rear), Coords => (1.0, 1.0)), 4 => (Site => the_Sites (Right_Upper_Front), Coords => (0.0, 1.0))); begin right_Face := new_Face (Vertices => the_Vertices'Access); if Self.Faces (Right).texture_Name /= null_Asset then right_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name)); right_Face.is_Transparent (now => right_Face.Texture.is_Transparent); end if; end; return (1 => front_Face.all'Access, 2 => rear_Face.all'Access, 3 => upper_Face.all'Access, 4 => lower_Face.all'Access, 5 => left_Face.all'Access, 6 => right_Face.all'Access); end to_GL_Geometries; end openGL.Model.box.textured;
pragma Ada_2012; pragma Assertion_Policy (disable); package body Fakedsp.Protected_Buffers is ------------------ -- State_Buffer -- ------------------ protected body State_Buffer is --------- -- Set -- --------- procedure Set (S : State_Type) is begin State := S; Changed := True; end Set; --------- -- Get -- --------- entry Get (S : out State_Type) when Changed is begin S := State; Changed := False; end Get; function Peek return State_Type is (State); end State_Buffer; ------------------- -- Sample_Buffer -- ------------------- protected body Sample_Buffer is --------- -- Put -- --------- procedure Put (Item : Float_Array) is begin Buffer := Item; end Put; function Length return Positive is (Size); function Get return Float_Array is begin return Buffer; end Get; end Sample_Buffer; end Fakedsp.Protected_Buffers;
with Ada.Strings.Fixed; with Ada.Integer_Text_IO; -- Copyright 2021 Melwyn Francis Carlo procedure A032 is use Ada.Strings.Fixed; use Ada.Integer_Text_IO; Temp_Str_1, Temp_Str_2 : String (1 .. 10); Temp_Str_3 : String (1 .. 20); Duplicate_Found : Boolean; Products_List : array (Integer range 1 .. 1000) of Integer := (others => 0); Sum_Val : Integer := 0; Count_Val : Integer := 1; Product_Val, Total_Length : Integer; Temp_Str_1_Len, Temp_Str_2_Len, Temp_Str_3_Len : Integer; begin for I in 1 .. 9999 loop Move (Source => Trim (Integer'Image (I), Ada.Strings.Both), Target => Temp_Str_1, Justify => Ada.Strings.Left); Temp_Str_1_Len := Trim (Integer'Image (I), Ada.Strings.Both)'Length; if Index (Temp_Str_1, "0") /= 0 then goto Continue_I; end if; Duplicate_Found := False; for J in 1 .. Temp_Str_1_Len loop for K in 1 .. Temp_Str_1_Len loop if J = K then goto Continue_K; end if; if Temp_Str_1 (J) = Temp_Str_1 (K) then Duplicate_Found := True; exit; end if; <<Continue_K>> end loop; if Duplicate_Found then exit; end if; end loop; if Duplicate_Found then goto Continue_I; end if; for J in 1 .. 9999 loop Move (Source => Trim (Integer'Image (J), Ada.Strings.Both), Target => Temp_Str_2, Justify => Ada.Strings.Left); Temp_Str_2_Len := Trim (Integer'Image (J), Ada.Strings.Both)'Length; if Index (Temp_Str_2, "0") /= 0 then goto Continue_J1; end if; Duplicate_Found := False; for K in 1 .. Temp_Str_2_Len loop for L in 1 .. Temp_Str_2_Len loop if K = L then goto Continue_L1; end if; if Temp_Str_2 (K) = Temp_Str_2 (L) then Duplicate_Found := True; exit; end if; <<Continue_L1>> end loop; if Duplicate_Found then exit; end if; end loop; if Duplicate_Found then goto Continue_J1; end if; Duplicate_Found := False; for K in 1 .. Temp_Str_2_Len loop if Index (Temp_Str_1, Temp_Str_2 (K .. K)) /= 0 then Duplicate_Found := True; exit; end if; end loop; if Duplicate_Found then goto Continue_J1; end if; Product_Val := I * J; Move (Source => Trim (Integer'Image (Product_Val), Ada.Strings.Both), Target => Temp_Str_3, Justify => Ada.Strings.Left); Temp_Str_3_Len := Trim (Integer'Image (Product_Val), Ada.Strings.Both)'Length; if Index (Temp_Str_3, "0") /= 0 then goto Continue_J1; end if; Total_Length := Temp_Str_1_Len + Temp_Str_2_Len + Temp_Str_3_Len; if Total_Length > 9 then exit; end if; if Total_Length /= 9 then goto Continue_J1; end if; Duplicate_Found := False; for K in 1 .. Temp_Str_3_Len loop for L in 1 .. Temp_Str_3_Len loop if K = L then goto Continue_L2; end if; if Temp_Str_3 (K) = Temp_Str_3 (L) then Duplicate_Found := True; exit; end if; <<Continue_L2>> end loop; if Duplicate_Found then exit; end if; end loop; if Duplicate_Found then goto Continue_J1; end if; Duplicate_Found := False; for K in 1 .. Temp_Str_3_Len loop if Index (Temp_Str_1, Temp_Str_3 (K .. K)) /= 0 or Index (Temp_Str_2, Temp_Str_3 (K .. K)) /= 0 then Duplicate_Found := True; exit; end if; end loop; if Duplicate_Found then goto Continue_J1; end if; Products_List (Count_Val) := Product_Val; Count_Val := Count_Val + 1; <<Continue_J1>> end loop; <<Continue_I>> end loop; for I in 1 .. Count_Val loop for J in 1 .. Count_Val loop if I = J then goto Continue_J2; end if; if Products_List (I) = Products_List (J) then Products_List (J) := 0; end if; <<Continue_J2>> end loop; end loop; for I in 1 .. Count_Val loop Sum_Val := Sum_Val + Products_List (I); end loop; Put (Sum_Val, Width => 0); end A032;
pragma Style_Checks (Off); -- This spec has been automatically generated from STM32G474xx.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.OPAMP is pragma Preelaborate; --------------- -- Registers -- --------------- subtype OPAMP1_CSR_VP_SEL_Field is HAL.UInt2; subtype OPAMP1_CSR_VM_SEL_Field is HAL.UInt2; subtype OPAMP1_CSR_CALSEL_Field is HAL.UInt2; subtype OPAMP1_CSR_PGA_GAIN_Field is HAL.UInt5; subtype OPAMP1_CSR_TRIMOFFSETP_Field is HAL.UInt5; subtype OPAMP1_CSR_TRIMOFFSETN_Field is HAL.UInt5; -- OPAMP1 control/status register type OPAMP1_CSR_Register is record -- Operational amplifier Enable OPAEN : Boolean := False; -- FORCE_VP FORCE_VP : Boolean := False; -- VP_SEL VP_SEL : OPAMP1_CSR_VP_SEL_Field := 16#0#; -- USERTRIM USERTRIM : Boolean := False; -- VM_SEL VM_SEL : OPAMP1_CSR_VM_SEL_Field := 16#0#; -- OPAHSM OPAHSM : Boolean := False; -- OPAINTOEN OPAINTOEN : Boolean := False; -- unspecified Reserved_9_10 : HAL.UInt2 := 16#0#; -- CALON CALON : Boolean := False; -- CALSEL CALSEL : OPAMP1_CSR_CALSEL_Field := 16#0#; -- PGA_GAIN PGA_GAIN : OPAMP1_CSR_PGA_GAIN_Field := 16#0#; -- TRIMOFFSETP TRIMOFFSETP : OPAMP1_CSR_TRIMOFFSETP_Field := 16#0#; -- TRIMOFFSETN TRIMOFFSETN : OPAMP1_CSR_TRIMOFFSETN_Field := 16#0#; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- CALOUT CALOUT : Boolean := False; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP1_CSR_Register use record OPAEN at 0 range 0 .. 0; FORCE_VP at 0 range 1 .. 1; VP_SEL at 0 range 2 .. 3; USERTRIM at 0 range 4 .. 4; VM_SEL at 0 range 5 .. 6; OPAHSM at 0 range 7 .. 7; OPAINTOEN at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; CALON at 0 range 11 .. 11; CALSEL at 0 range 12 .. 13; PGA_GAIN at 0 range 14 .. 18; TRIMOFFSETP at 0 range 19 .. 23; TRIMOFFSETN at 0 range 24 .. 28; Reserved_29_29 at 0 range 29 .. 29; CALOUT at 0 range 30 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP2_CSR_VP_SEL_Field is HAL.UInt2; subtype OPAMP2_CSR_VM_SEL_Field is HAL.UInt2; subtype OPAMP2_CSR_CALSEL_Field is HAL.UInt2; subtype OPAMP2_CSR_PGA_GAIN_Field is HAL.UInt5; subtype OPAMP2_CSR_TRIMOFFSETP_Field is HAL.UInt5; subtype OPAMP2_CSR_TRIMOFFSETN_Field is HAL.UInt5; -- OPAMP2 control/status register type OPAMP2_CSR_Register is record -- Operational amplifier Enable OPAEN : Boolean := False; -- FORCE_VP FORCE_VP : Boolean := False; -- VP_SEL VP_SEL : OPAMP2_CSR_VP_SEL_Field := 16#0#; -- USERTRIM USERTRIM : Boolean := False; -- VM_SEL VM_SEL : OPAMP2_CSR_VM_SEL_Field := 16#0#; -- OPAHSM OPAHSM : Boolean := False; -- OPAINTOEN OPAINTOEN : Boolean := False; -- unspecified Reserved_9_10 : HAL.UInt2 := 16#0#; -- CALON CALON : Boolean := False; -- CALSEL CALSEL : OPAMP2_CSR_CALSEL_Field := 16#0#; -- PGA_GAIN PGA_GAIN : OPAMP2_CSR_PGA_GAIN_Field := 16#0#; -- TRIMOFFSETP TRIMOFFSETP : OPAMP2_CSR_TRIMOFFSETP_Field := 16#0#; -- TRIMOFFSETN TRIMOFFSETN : OPAMP2_CSR_TRIMOFFSETN_Field := 16#0#; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- CALOUT CALOUT : Boolean := False; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP2_CSR_Register use record OPAEN at 0 range 0 .. 0; FORCE_VP at 0 range 1 .. 1; VP_SEL at 0 range 2 .. 3; USERTRIM at 0 range 4 .. 4; VM_SEL at 0 range 5 .. 6; OPAHSM at 0 range 7 .. 7; OPAINTOEN at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; CALON at 0 range 11 .. 11; CALSEL at 0 range 12 .. 13; PGA_GAIN at 0 range 14 .. 18; TRIMOFFSETP at 0 range 19 .. 23; TRIMOFFSETN at 0 range 24 .. 28; Reserved_29_29 at 0 range 29 .. 29; CALOUT at 0 range 30 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP3_CSR_VP_SEL_Field is HAL.UInt2; subtype OPAMP3_CSR_VM_SEL_Field is HAL.UInt2; subtype OPAMP3_CSR_CALSEL_Field is HAL.UInt2; subtype OPAMP3_CSR_PGA_GAIN_Field is HAL.UInt5; subtype OPAMP3_CSR_TRIMOFFSETP_Field is HAL.UInt5; subtype OPAMP3_CSR_TRIMOFFSETN_Field is HAL.UInt5; -- OPAMP3 control/status register type OPAMP3_CSR_Register is record -- Operational amplifier Enable OPAEN : Boolean := False; -- FORCE_VP FORCE_VP : Boolean := False; -- VP_SEL VP_SEL : OPAMP3_CSR_VP_SEL_Field := 16#0#; -- USERTRIM USERTRIM : Boolean := False; -- VM_SEL VM_SEL : OPAMP3_CSR_VM_SEL_Field := 16#0#; -- OPAHSM OPAHSM : Boolean := False; -- OPAINTOEN OPAINTOEN : Boolean := False; -- unspecified Reserved_9_10 : HAL.UInt2 := 16#0#; -- CALON CALON : Boolean := False; -- CALSEL CALSEL : OPAMP3_CSR_CALSEL_Field := 16#0#; -- PGA_GAIN PGA_GAIN : OPAMP3_CSR_PGA_GAIN_Field := 16#0#; -- TRIMOFFSETP TRIMOFFSETP : OPAMP3_CSR_TRIMOFFSETP_Field := 16#0#; -- TRIMOFFSETN TRIMOFFSETN : OPAMP3_CSR_TRIMOFFSETN_Field := 16#0#; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- CALOUT CALOUT : Boolean := False; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP3_CSR_Register use record OPAEN at 0 range 0 .. 0; FORCE_VP at 0 range 1 .. 1; VP_SEL at 0 range 2 .. 3; USERTRIM at 0 range 4 .. 4; VM_SEL at 0 range 5 .. 6; OPAHSM at 0 range 7 .. 7; OPAINTOEN at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; CALON at 0 range 11 .. 11; CALSEL at 0 range 12 .. 13; PGA_GAIN at 0 range 14 .. 18; TRIMOFFSETP at 0 range 19 .. 23; TRIMOFFSETN at 0 range 24 .. 28; Reserved_29_29 at 0 range 29 .. 29; CALOUT at 0 range 30 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP4_CSR_VP_SEL_Field is HAL.UInt2; subtype OPAMP4_CSR_VM_SEL_Field is HAL.UInt2; subtype OPAMP4_CSR_CALSEL_Field is HAL.UInt2; subtype OPAMP4_CSR_PGA_GAIN_Field is HAL.UInt5; subtype OPAMP4_CSR_TRIMOFFSETP_Field is HAL.UInt5; subtype OPAMP4_CSR_TRIMOFFSETN_Field is HAL.UInt5; -- OPAMP4 control/status register type OPAMP4_CSR_Register is record -- Operational amplifier Enable OPAEN : Boolean := False; -- FORCE_VP FORCE_VP : Boolean := False; -- VP_SEL VP_SEL : OPAMP4_CSR_VP_SEL_Field := 16#0#; -- USERTRIM USERTRIM : Boolean := False; -- VM_SEL VM_SEL : OPAMP4_CSR_VM_SEL_Field := 16#0#; -- OPAHSM OPAHSM : Boolean := False; -- OPAINTOEN OPAINTOEN : Boolean := False; -- unspecified Reserved_9_10 : HAL.UInt2 := 16#0#; -- CALON CALON : Boolean := False; -- CALSEL CALSEL : OPAMP4_CSR_CALSEL_Field := 16#0#; -- PGA_GAIN PGA_GAIN : OPAMP4_CSR_PGA_GAIN_Field := 16#0#; -- TRIMOFFSETP TRIMOFFSETP : OPAMP4_CSR_TRIMOFFSETP_Field := 16#0#; -- TRIMOFFSETN TRIMOFFSETN : OPAMP4_CSR_TRIMOFFSETN_Field := 16#0#; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- CALOUT CALOUT : Boolean := False; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP4_CSR_Register use record OPAEN at 0 range 0 .. 0; FORCE_VP at 0 range 1 .. 1; VP_SEL at 0 range 2 .. 3; USERTRIM at 0 range 4 .. 4; VM_SEL at 0 range 5 .. 6; OPAHSM at 0 range 7 .. 7; OPAINTOEN at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; CALON at 0 range 11 .. 11; CALSEL at 0 range 12 .. 13; PGA_GAIN at 0 range 14 .. 18; TRIMOFFSETP at 0 range 19 .. 23; TRIMOFFSETN at 0 range 24 .. 28; Reserved_29_29 at 0 range 29 .. 29; CALOUT at 0 range 30 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP5_CSR_VP_SEL_Field is HAL.UInt2; subtype OPAMP5_CSR_VM_SEL_Field is HAL.UInt2; subtype OPAMP5_CSR_CALSEL_Field is HAL.UInt2; subtype OPAMP5_CSR_PGA_GAIN_Field is HAL.UInt5; subtype OPAMP5_CSR_TRIMOFFSETP_Field is HAL.UInt5; subtype OPAMP5_CSR_TRIMOFFSETN_Field is HAL.UInt5; -- OPAMP5 control/status register type OPAMP5_CSR_Register is record -- Operational amplifier Enable OPAEN : Boolean := False; -- FORCE_VP FORCE_VP : Boolean := False; -- VP_SEL VP_SEL : OPAMP5_CSR_VP_SEL_Field := 16#0#; -- USERTRIM USERTRIM : Boolean := False; -- VM_SEL VM_SEL : OPAMP5_CSR_VM_SEL_Field := 16#0#; -- OPAHSM OPAHSM : Boolean := False; -- OPAINTOEN OPAINTOEN : Boolean := False; -- unspecified Reserved_9_10 : HAL.UInt2 := 16#0#; -- CALON CALON : Boolean := False; -- CALSEL CALSEL : OPAMP5_CSR_CALSEL_Field := 16#0#; -- PGA_GAIN PGA_GAIN : OPAMP5_CSR_PGA_GAIN_Field := 16#0#; -- TRIMOFFSETP TRIMOFFSETP : OPAMP5_CSR_TRIMOFFSETP_Field := 16#0#; -- TRIMOFFSETN TRIMOFFSETN : OPAMP5_CSR_TRIMOFFSETN_Field := 16#0#; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- CALOUT CALOUT : Boolean := False; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP5_CSR_Register use record OPAEN at 0 range 0 .. 0; FORCE_VP at 0 range 1 .. 1; VP_SEL at 0 range 2 .. 3; USERTRIM at 0 range 4 .. 4; VM_SEL at 0 range 5 .. 6; OPAHSM at 0 range 7 .. 7; OPAINTOEN at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; CALON at 0 range 11 .. 11; CALSEL at 0 range 12 .. 13; PGA_GAIN at 0 range 14 .. 18; TRIMOFFSETP at 0 range 19 .. 23; TRIMOFFSETN at 0 range 24 .. 28; Reserved_29_29 at 0 range 29 .. 29; CALOUT at 0 range 30 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP6_CSR_VP_SEL_Field is HAL.UInt2; subtype OPAMP6_CSR_VM_SEL_Field is HAL.UInt2; subtype OPAMP6_CSR_CALSEL_Field is HAL.UInt2; subtype OPAMP6_CSR_PGA_GAIN_Field is HAL.UInt5; subtype OPAMP6_CSR_TRIMOFFSETP_Field is HAL.UInt5; subtype OPAMP6_CSR_TRIMOFFSETN_Field is HAL.UInt5; -- OPAMP6 control/status register type OPAMP6_CSR_Register is record -- Operational amplifier Enable OPAEN : Boolean := False; -- FORCE_VP FORCE_VP : Boolean := False; -- VP_SEL VP_SEL : OPAMP6_CSR_VP_SEL_Field := 16#0#; -- USERTRIM USERTRIM : Boolean := False; -- VM_SEL VM_SEL : OPAMP6_CSR_VM_SEL_Field := 16#0#; -- OPAHSM OPAHSM : Boolean := False; -- OPAINTOEN OPAINTOEN : Boolean := False; -- unspecified Reserved_9_10 : HAL.UInt2 := 16#0#; -- CALON CALON : Boolean := False; -- CALSEL CALSEL : OPAMP6_CSR_CALSEL_Field := 16#0#; -- PGA_GAIN PGA_GAIN : OPAMP6_CSR_PGA_GAIN_Field := 16#0#; -- TRIMOFFSETP TRIMOFFSETP : OPAMP6_CSR_TRIMOFFSETP_Field := 16#0#; -- TRIMOFFSETN TRIMOFFSETN : OPAMP6_CSR_TRIMOFFSETN_Field := 16#0#; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- CALOUT CALOUT : Boolean := False; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP6_CSR_Register use record OPAEN at 0 range 0 .. 0; FORCE_VP at 0 range 1 .. 1; VP_SEL at 0 range 2 .. 3; USERTRIM at 0 range 4 .. 4; VM_SEL at 0 range 5 .. 6; OPAHSM at 0 range 7 .. 7; OPAINTOEN at 0 range 8 .. 8; Reserved_9_10 at 0 range 9 .. 10; CALON at 0 range 11 .. 11; CALSEL at 0 range 12 .. 13; PGA_GAIN at 0 range 14 .. 18; TRIMOFFSETP at 0 range 19 .. 23; TRIMOFFSETN at 0 range 24 .. 28; Reserved_29_29 at 0 range 29 .. 29; CALOUT at 0 range 30 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP1_TCMR_VPS_SEL_Field is HAL.UInt2; -- OPAMP1 control/status register type OPAMP1_TCMR_Register is record -- VMS_SEL VMS_SEL : Boolean := False; -- VPS_SEL VPS_SEL : OPAMP1_TCMR_VPS_SEL_Field := 16#0#; -- T1CM_EN T1CM_EN : Boolean := False; -- T8CM_EN T8CM_EN : Boolean := False; -- T20CM_EN T20CM_EN : Boolean := False; -- unspecified Reserved_6_30 : HAL.UInt25 := 16#0#; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP1_TCMR_Register use record VMS_SEL at 0 range 0 .. 0; VPS_SEL at 0 range 1 .. 2; T1CM_EN at 0 range 3 .. 3; T8CM_EN at 0 range 4 .. 4; T20CM_EN at 0 range 5 .. 5; Reserved_6_30 at 0 range 6 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP2_TCMR_VPS_SEL_Field is HAL.UInt2; -- OPAMP2 control/status register type OPAMP2_TCMR_Register is record -- VMS_SEL VMS_SEL : Boolean := False; -- VPS_SEL VPS_SEL : OPAMP2_TCMR_VPS_SEL_Field := 16#0#; -- T1CM_EN T1CM_EN : Boolean := False; -- T8CM_EN T8CM_EN : Boolean := False; -- T20CM_EN T20CM_EN : Boolean := False; -- unspecified Reserved_6_30 : HAL.UInt25 := 16#0#; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP2_TCMR_Register use record VMS_SEL at 0 range 0 .. 0; VPS_SEL at 0 range 1 .. 2; T1CM_EN at 0 range 3 .. 3; T8CM_EN at 0 range 4 .. 4; T20CM_EN at 0 range 5 .. 5; Reserved_6_30 at 0 range 6 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP3_TCMR_VPS_SEL_Field is HAL.UInt2; -- OPAMP3 control/status register type OPAMP3_TCMR_Register is record -- VMS_SEL VMS_SEL : Boolean := False; -- VPS_SEL VPS_SEL : OPAMP3_TCMR_VPS_SEL_Field := 16#0#; -- T1CM_EN T1CM_EN : Boolean := False; -- T8CM_EN T8CM_EN : Boolean := False; -- T20CM_EN T20CM_EN : Boolean := False; -- unspecified Reserved_6_30 : HAL.UInt25 := 16#0#; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP3_TCMR_Register use record VMS_SEL at 0 range 0 .. 0; VPS_SEL at 0 range 1 .. 2; T1CM_EN at 0 range 3 .. 3; T8CM_EN at 0 range 4 .. 4; T20CM_EN at 0 range 5 .. 5; Reserved_6_30 at 0 range 6 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP4_TCMR_VPS_SEL_Field is HAL.UInt2; -- OPAMP4 control/status register type OPAMP4_TCMR_Register is record -- VMS_SEL VMS_SEL : Boolean := False; -- VPS_SEL VPS_SEL : OPAMP4_TCMR_VPS_SEL_Field := 16#0#; -- T1CM_EN T1CM_EN : Boolean := False; -- T8CM_EN T8CM_EN : Boolean := False; -- T20CM_EN T20CM_EN : Boolean := False; -- unspecified Reserved_6_30 : HAL.UInt25 := 16#0#; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP4_TCMR_Register use record VMS_SEL at 0 range 0 .. 0; VPS_SEL at 0 range 1 .. 2; T1CM_EN at 0 range 3 .. 3; T8CM_EN at 0 range 4 .. 4; T20CM_EN at 0 range 5 .. 5; Reserved_6_30 at 0 range 6 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP5_TCMR_VPS_SEL_Field is HAL.UInt2; -- OPAMP5 control/status register type OPAMP5_TCMR_Register is record -- VMS_SEL VMS_SEL : Boolean := False; -- VPS_SEL VPS_SEL : OPAMP5_TCMR_VPS_SEL_Field := 16#0#; -- T1CM_EN T1CM_EN : Boolean := False; -- T8CM_EN T8CM_EN : Boolean := False; -- T20CM_EN T20CM_EN : Boolean := False; -- unspecified Reserved_6_30 : HAL.UInt25 := 16#0#; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP5_TCMR_Register use record VMS_SEL at 0 range 0 .. 0; VPS_SEL at 0 range 1 .. 2; T1CM_EN at 0 range 3 .. 3; T8CM_EN at 0 range 4 .. 4; T20CM_EN at 0 range 5 .. 5; Reserved_6_30 at 0 range 6 .. 30; LOCK at 0 range 31 .. 31; end record; subtype OPAMP6_TCMR_VPS_SEL_Field is HAL.UInt2; -- OPAMP6 control/status register type OPAMP6_TCMR_Register is record -- VMS_SEL VMS_SEL : Boolean := False; -- VPS_SEL VPS_SEL : OPAMP6_TCMR_VPS_SEL_Field := 16#0#; -- T1CM_EN T1CM_EN : Boolean := False; -- T8CM_EN T8CM_EN : Boolean := False; -- T20CM_EN T20CM_EN : Boolean := False; -- unspecified Reserved_6_30 : HAL.UInt25 := 16#0#; -- LOCK LOCK : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPAMP6_TCMR_Register use record VMS_SEL at 0 range 0 .. 0; VPS_SEL at 0 range 1 .. 2; T1CM_EN at 0 range 3 .. 3; T8CM_EN at 0 range 4 .. 4; T20CM_EN at 0 range 5 .. 5; Reserved_6_30 at 0 range 6 .. 30; LOCK at 0 range 31 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Operational amplifiers type OPAMP_Peripheral is record -- OPAMP1 control/status register OPAMP1_CSR : aliased OPAMP1_CSR_Register; -- OPAMP2 control/status register OPAMP2_CSR : aliased OPAMP2_CSR_Register; -- OPAMP3 control/status register OPAMP3_CSR : aliased OPAMP3_CSR_Register; -- OPAMP4 control/status register OPAMP4_CSR : aliased OPAMP4_CSR_Register; -- OPAMP5 control/status register OPAMP5_CSR : aliased OPAMP5_CSR_Register; -- OPAMP6 control/status register OPAMP6_CSR : aliased OPAMP6_CSR_Register; -- OPAMP1 control/status register OPAMP1_TCMR : aliased OPAMP1_TCMR_Register; -- OPAMP2 control/status register OPAMP2_TCMR : aliased OPAMP2_TCMR_Register; -- OPAMP3 control/status register OPAMP3_TCMR : aliased OPAMP3_TCMR_Register; -- OPAMP4 control/status register OPAMP4_TCMR : aliased OPAMP4_TCMR_Register; -- OPAMP5 control/status register OPAMP5_TCMR : aliased OPAMP5_TCMR_Register; -- OPAMP6 control/status register OPAMP6_TCMR : aliased OPAMP6_TCMR_Register; end record with Volatile; for OPAMP_Peripheral use record OPAMP1_CSR at 16#0# range 0 .. 31; OPAMP2_CSR at 16#4# range 0 .. 31; OPAMP3_CSR at 16#8# range 0 .. 31; OPAMP4_CSR at 16#C# range 0 .. 31; OPAMP5_CSR at 16#10# range 0 .. 31; OPAMP6_CSR at 16#14# range 0 .. 31; OPAMP1_TCMR at 16#18# range 0 .. 31; OPAMP2_TCMR at 16#1C# range 0 .. 31; OPAMP3_TCMR at 16#20# range 0 .. 31; OPAMP4_TCMR at 16#24# range 0 .. 31; OPAMP5_TCMR at 16#28# range 0 .. 31; OPAMP6_TCMR at 16#2C# range 0 .. 31; end record; -- Operational amplifiers OPAMP_Periph : aliased OPAMP_Peripheral with Import, Address => OPAMP_Base; end STM32_SVD.OPAMP;
package body Multiply_Proof with SPARK_Mode is ---------------------- -- Array_Diff_Lemma -- ---------------------- procedure Array_Diff_Lemma (Previous, Conversion : Big_Integer; X, Y : Integer_255; J, K : Index_Type) is begin Partial_Product_Def (X, Y, J, K); if K = 9 then Diff_Step_J_Def (X, Y, J, K); pragma Assert (Partial_Product (X, Y, J, 9) = (if J mod 2 = 1 then 2 else 1) * X (J) * Y (9)); -- Stop case of Partial_Product (K = 9) pragma Assert (To_Big_Integer (Array_Step_J (X, Y, J) (J + 9)) = (+(if J mod 2 = 1 and then 9 mod 2 = 1 then 2 else 1)) * (+X (J) * Y (9))); pragma Assert (Diff_Step_J (X, Y, J, 9) = Diff_Step_J (X, Y, J, 8) + (+(if J mod 2 = 1 and then 9 mod 2 = 1 then 2 else 1)) * (+X (J) * Y (9)) * Conversion_Array (J + 9)); -- Definition of Diff_Step_J pragma Assert (Conversion = Partial_Conversion (Array_Step_J (X, Y, J - 1), J + 8) + Diff_Step_J (X, Y, J, 9)); -- Proved thanks to the two assertions above else Diff_Step_J_Def (X, Y, J, K); pragma Assert (X (J) in Min_Multiply .. Max_Multiply and then Y (K) in Min_Multiply .. Max_Multiply); pragma Assert (Array_Step_J (X, Y, J - 1) (J + K) in (-2) * Long_Long_Integer (J) * (2**27 - 1)**2 .. 2 * Long_Long_Integer (J) * (2**27 - 1)**2); -- Two assertions necessary to prove overflow checks in the -- next assertion. pragma Assert (Array_Step_J (X, Y, J) (J + K) = Array_Step_J (X, Y, J - 1) (J + K) + (if J mod 2 = 1 and then K mod 2 = 1 then 2 else 1) * X (J) * Y (K)); -- Definition of Partial_Product pragma Assert ((+Array_Step_J (X, Y, J) (J + K)) * Conversion_Array (J + K) = (+Array_Step_J (X, Y, J - 1) (J + K) + (+(if J mod 2 = 1 and then K mod 2 = 1 then 2 else 1)) * (+X (J)) * (+Y (K))) * Conversion_Array (J + K)); pragma Assert (Diff_Step_J (X, Y, J, K) = (if K = 0 then Zero else Diff_Step_J (X, Y, J, K - 1)) + (+(if J mod 2 = 1 and then K mod 2 = 1 then 2 else 1)) * (+X (J)) * (+Y (K)) * Conversion_Array (J + K)); -- Definition of Diff_Step_J end if; end Array_Diff_Lemma; ------------------ -- Array_Step_J -- ------------------ -- Construction of the array is very simple, it matches the postcondition function Array_Step_J (X, Y : Integer_255; J : Index_Type) return Integer_Curve25519 is Result : Integer_Curve25519 (0 .. J + 9) := (others => 0); begin for K in 0 .. J loop Result (K) := Partial_Product (X, Y, K); pragma Loop_Invariant (for all L in 0 .. K => Result (L) = Partial_Product (X, Y, L)); end loop; for K in J + 1 .. J + 9 loop Result (K) := Partial_Product (X, Y, J, K - J); pragma Loop_Invariant (for all L in J + 1 .. K => Result (L) = Partial_Product (X, Y, J, L - J)); end loop; return Result; end Array_Step_J; -------------------------- -- Array_Step_J_To_Next -- -------------------------- procedure Array_Step_J_To_Next (Product_Conversion : Big_Integer; X, Y : Integer_255; J : Index_Type) is Conversion, Previous : Big_Integer := (if J = 0 then Zero else Partial_Conversion (Array_Step_J (X, Y, J), J - 1)); begin if J > 0 then Equal_To_Conversion (Array_Step_J (X, Y, J), Array_Step_J (X, Y, J - 1), J - 1); pragma Assert (Partial_Conversion (Array_Step_J (X, Y, J), J - 1) = Partial_Conversion (Array_Step_J (X, Y, J - 1), J - 1)); -- By definition, Array_Step_J (X, Y, J) (0 .. J - 1) -- = Array_Step_J (X, Y, J - 1) (0 .. J - 1), -- so Equal_To_Conversion is applied to prove that their -- partial conversions until J - 1 are equal. end if; for K in Index_Type loop Previous := Conversion; Conversion := Conversion + (+Array_Step_J (X, Y, J) (J + K)) * Conversion_Array (J + K); if J = 0 then Diff_Step_J_Def (X, Y, 0, K); Partial_Product_Def (X, Y, 0, K); -- Instantiating the definitions if K = 0 then pragma Assert (Conversion = Partial_Conversion (Array_Step_J (X, Y, J), J + K)); -- The assertion is needed, otherwise the solvers cannot -- prove first loop invariant in first iteration. else pragma Assert (Diff_Step_J (X, Y, J, K) = Diff_Step_J (X, Y, J, K - 1) + (+X (0)) * (+Y (K)) * Conversion_Array (K)); -- Definition of Diff_Step_J pragma Assert (Conversion = Diff_Step_J (X, Y, J, K)); -- Discharges the provers to prove it afterwards end if; else Array_Diff_Lemma (Previous, Conversion, X, Y, J, K); -- To prove third and fourth loop invariants end if; pragma Loop_Invariant (Conversion = Partial_Conversion (Array_Step_J (X, Y, J), J + K)); -- Conversion is increasingly equal to Partial_Conversion (Array_Step_J) pragma Loop_Invariant (if J = 0 then Conversion = Diff_Step_J (X, Y, J, K)); pragma Loop_Invariant (if J > 0 and then K < 9 then Conversion = Partial_Conversion (Array_Step_J (X, Y, J - 1), J + K) + Diff_Step_J (X, Y, J, K)); pragma Loop_Invariant (if J > 0 and then K = 9 then Conversion = Partial_Conversion (Array_Step_J (X, Y, J - 1), J + 8) + Diff_Step_J (X, Y, J, 9)); -- The three loop invariants above are the same loop invariant, -- split for different cases. It states that Conversion is equal -- to something + Diff_Step_J (X, Y, J, K). end loop; end Array_Step_J_To_Next; -------------------- -- Prove_Multiply -- -------------------- procedure Prove_Multiply (X, Y : Integer_255; Product : Product_Integer) is X_Conversion, Product_Conversion : Big_Integer := Zero; Old_X, Old_Product : Big_Integer; begin for J in Index_Type loop Old_X := X_Conversion; X_Conversion := X_Conversion + (+X (J)) * Conversion_Array (J); -- X_Conversion = Partial_Conversion (X, J) -- is partially increased to To_Big_Integer (X). for K in Index_Type loop Old_Product := Product_Conversion; pragma Assert (Old_Product = Old_X * (+Y) + (if K = 0 then Zero else (+X (J)) * Conversion_Array (J) * Partial_Conversion (Y, K - 1))); -- Asserting loop invariants on Old_Product Product_Conversion := Add_Factor (Product_Conversion, X, Y, J, K); -- Using the function is necessary to provr precondition -- of Split_Product. Split_Product (Old_Product, Old_X, Product_Conversion, X, Y, J, K); -- To prove second loop invariant Diff_Step_J_Def (X, Y, J, K); -- To prove first loop invariant pragma Loop_Invariant (Product_Conversion = Product_Conversion'Loop_Entry + Diff_Step_J (X, Y, J, K)); -- This loop invariant is used to prove that Product_Conversion -- will be equal to Partial_Conversion (Array_Step_J (...)) -- at the end of the loop. pragma Loop_Invariant (Product_Conversion = Old_X * (+Y) + (+X (J)) * Conversion_Array (J) * Partial_Conversion (Y, K)); -- Product_Conversion is equal to the product of the partial -- conversion of X until J, and the partial conversion of Y -- until K. end loop; Array_Step_J_To_Next (Product_Conversion, X, Y, J); -- To prove first loop invariant pragma Assert (Product_Conversion = Old_X * (+Y) + (+X (J)) * Conversion_Array (J) * Partial_Conversion (Y, 9)); pragma Assert (Partial_Conversion (Y, 9) = (+Y)); pragma Assert (Product_Conversion = Old_X * (+Y) + (+X (J)) * Conversion_Array (J) * (+Y)); -- To prove third loop invariant pragma Loop_Invariant (Product_Conversion = Partial_Conversion (Array_Step_J (X, Y, J), J + 9)); -- At the end of this loop, will prove that Product_Conversion is -- equal to (+Final_Array). pragma Loop_Invariant (X_Conversion = Partial_Conversion (X, J)); pragma Loop_Invariant (Product_Conversion = X_Conversion * (+Y)); -- Distributivity of multiplication over addition. end loop; pragma Assert ((+X) = Partial_Conversion (X, 9)); Equal_To_Conversion (Array_Step_J (X, Y, 9), Product, 18); end Prove_Multiply; ------------------- -- Split_Product -- ------------------- procedure Split_Product (Old_Product, Old_X, Product_Conversion : Big_Integer; X, Y : Integer_255; J, K : Index_Type) is begin if J mod 2 = 1 and then K mod 2 = 1 then pragma Assert (Product_Conversion = Old_Product + (+X (J)) * (+Y (K)) * Conversion_Array (J + K) * (+2)); pragma Assert ((+2) * Conversion_Array (J + K) = Conversion_Array (J) * Conversion_Array (K)); -- Case where Conversion_Array (J + K) * 2 -- = Conversion_Array (J) * Conversion_Array (K). else pragma Assert (Conversion_Array (J + K) = Conversion_Array (J) * Conversion_Array (K)); -- Other case end if; if K > 0 then pragma Assert (Product_Conversion = Old_X * (+Y) + (+X (J)) * Conversion_Array (J) * Partial_Conversion (Y, K - 1) + (+X (J)) * (+Y (K)) * (+(if J mod 2 = 1 and then K mod 2 = 1 then 2 else 1)) * Conversion_Array (J + K)); -- Preconditions pragma Assert ((+(if J mod 2 = 1 and then K mod 2 = 1 then 2 else 1)) * Conversion_Array (J + K) = Conversion_Array (J) * Conversion_Array (K)); -- What was proved previously with case disjunction pragma Assert (Partial_Conversion (Y, K) = Partial_Conversion (Y, K - 1) + (+Y (K)) * Conversion_Array (K)); -- Definition of Partial_Conversion, needed for proof pragma Assert ((+X (J)) * Conversion_Array (J) * Partial_Conversion (Y, K - 1) + (+X (J)) * (+Y (K)) * Conversion_Array (J) * Conversion_Array (K) = (+X (J)) * Conversion_Array (J) * Partial_Conversion (Y, K)); -- Rearranging the expression using definition of Partial_Conversion pragma Assert (Product_Conversion = Old_X * (+Y) + (+X (J)) * Conversion_Array (J) * Partial_Conversion (Y, K)); -- Proving the postcondition end if; end Split_Product; end Multiply_Proof;
pragma License (Unrestricted); -- separated and auto-loaded by compiler private generic type Num is delta <> digits <>; package Ada.Wide_Wide_Text_IO.Decimal_IO is Default_Fore : Field := Num'Fore; Default_Aft : Field := Num'Aft; Default_Exp : Field := 0; -- procedure Get ( -- File : File_Type; -- Input_File_Type -- Item : out Num; -- Width : Field := 0); -- procedure Get ( -- Item : out Num; -- Width : Field := 0); -- procedure Put ( -- File : File_Type; -- Output_File_Type -- Item : Num; -- Fore : Field := Default_Fore; -- Aft : Field := Default_Aft; -- Exp : Field := Default_Exp); -- procedure Put ( -- Item : Num; -- Fore : Field := Default_Fore; -- Aft : Field := Default_Aft; -- Exp : Field := Default_Exp); -- procedure Get ( -- From : String; -- Item : out Num; -- Last : out Positive); -- procedure Put ( -- To : out String; -- Item : Num; -- Aft : Field := Default_Aft; -- Exp : Field := Default_Exp); end Ada.Wide_Wide_Text_IO.Decimal_IO;
package body Player is function Build (Race : String; Good_Ability : Good_Type; Bad_Ability : Bad_Type; Victory_Condition : Victory; Homeworld : Planet.Object) return Object is player : Object; begin player.Race := SU.To_Unbounded_String (Race); player.Good_Ability := Good_Ability; player.Bad_Ability := Bad_Ability; player.Victory_Condition := Victory_Condition; player.Homeworld := Homeworld; player.Owner_Planets.Append(Homeworld); return player; end Build; end Player;
with Ada; procedure protected_lf is protected prot is pragma Lock_Free; procedure w (arg : Integer); function r return Integer; private value : Integer := 0; end prot; protected body prot is procedure w (arg: Integer) is begin value := arg; end w; function r return Integer is begin return value; end r; end prot; V : Integer; begin prot.w (100); V := prot.r; pragma Assert (V = 100); pragma Debug (Ada.Debug.Put ("OK")); end protected_lf;
with AUnit.Test_Suites; package Test_Suite is function Create_Test_Suite return AUnit.Test_Suites.Access_Test_Suite; end Test_Suite;
-- Copyright 2015,2017 Steven Stewart-Gallus -- -- 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 Libc.Stdint; with XCB; with System; with Interfaces.C.Strings; package XCB.XProto with Spark_Mode => Off is pragma Preelaborate; XCB_KEY_PRESS : constant := 2; XCB_KEY_RELEASE : constant := 3; XCB_BUTTON_PRESS : constant := 4; XCB_BUTTON_RELEASE : constant := 5; XCB_MOTION_NOTIFY : constant := 6; XCB_ENTER_NOTIFY : constant := 7; XCB_LEAVE_NOTIFY : constant := 8; XCB_FOCUS_IN : constant := 9; XCB_FOCUS_OUT : constant := 10; XCB_KEYMAP_NOTIFY : constant := 11; XCB_EXPOSE : constant := 12; XCB_GRAPHICS_EXPOSURE : constant := 13; XCB_NO_EXPOSURE : constant := 14; XCB_VISIBILITY_NOTIFY : constant := 15; XCB_CREATE_NOTIFY : constant := 16; XCB_DESTROY_NOTIFY : constant := 17; XCB_UNMAP_NOTIFY : constant := 18; XCB_MAP_NOTIFY : constant := 19; XCB_MAP_REQUEST : constant := 20; XCB_REPARENT_NOTIFY : constant := 21; XCB_CONFIGURE_NOTIFY : constant := 22; XCB_CONFIGURE_REQUEST : constant := 23; XCB_GRAVITY_NOTIFY : constant := 24; XCB_RESIZE_REQUEST : constant := 25; XCB_CIRCULATE_NOTIFY : constant := 26; XCB_CIRCULATE_REQUEST : constant := 27; XCB_PROPERTY_NOTIFY : constant := 28; XCB_SELECTION_CLEAR : constant := 29; XCB_SELECTION_REQUEST : constant := 30; XCB_SELECTION_NOTIFY : constant := 31; XCB_COLORMAP_NOTIFY : constant := 32; XCB_CLIENT_MESSAGE : constant := 33; XCB_MAPPING_NOTIFY : constant := 34; XCB_GE_GENERIC : constant := 35; XCB_REQUEST : constant := 1; XCB_VALUE : constant := 2; XCB_WINDOW : constant := 3; XCB_PIXMAP : constant := 4; XCB_ATOM : constant := 5; XCB_CURSOR : constant := 6; XCB_FONT : constant := 7; XCB_MATCH : constant := 8; XCB_DRAWABLE : constant := 9; XCB_ACCESS : constant := 10; XCB_ALLOC : constant := 11; XCB_COLORMAP : constant := 12; XCB_G_CONTEXT : constant := 13; XCB_ID_CHOICE : constant := 14; XCB_NAME : constant := 15; XCB_LENGTH : constant := 16; XCB_IMPLEMENTATION : constant := 17; -- XCB_CREATE_WINDOW : constant := 1; -- XCB_CHANGE_WINDOW_ATTRIBUTES : constant := 2; -- XCB_GET_WINDOW_ATTRIBUTES : constant := 3; -- XCB_DESTROY_WINDOW : constant := 4; -- XCB_DESTROY_SUBWINDOWS : constant := 5; -- XCB_CHANGE_SAVE_SET : constant := 6; -- XCB_REPARENT_WINDOW : constant := 7; -- XCB_MAP_WINDOW : constant := 8; -- XCB_MAP_SUBWINDOWS : constant := 9; -- XCB_UNMAP_WINDOW : constant := 10; -- XCB_UNMAP_SUBWINDOWS : constant := 11; -- XCB_CONFIGURE_WINDOW : constant := 12; -- XCB_CIRCULATE_WINDOW : constant := 13; -- XCB_GET_GEOMETRY : constant := 14; -- XCB_QUERY_TREE : constant := 15; -- XCB_INTERN_ATOM : constant := 16; -- XCB_GET_ATOM_NAME : constant := 17; -- XCB_CHANGE_PROPERTY : constant := 18; -- XCB_DELETE_PROPERTY : constant := 19; -- XCB_GET_PROPERTY : constant := 20; -- XCB_LIST_PROPERTIES : constant := 21; -- XCB_SET_SELECTION_OWNER : constant := 22; -- XCB_GET_SELECTION_OWNER : constant := 23; -- XCB_CONVERT_SELECTION : constant := 24; -- XCB_SEND_EVENT : constant := 25; -- XCB_GRAB_POINTER : constant := 26; -- XCB_UNGRAB_POINTER : constant := 27; -- XCB_GRAB_BUTTON : constant := 28; -- XCB_UNGRAB_BUTTON : constant := 29; -- XCB_CHANGE_ACTIVE_POINTER_GRAB : constant := 30; -- XCB_GRAB_KEYBOARD : constant := 31; -- XCB_UNGRAB_KEYBOARD : constant := 32; -- XCB_GRAB_KEY : constant := 33; -- XCB_UNGRAB_KEY : constant := 34; -- XCB_ALLOW_EVENTS : constant := 35; -- XCB_GRAB_SERVER : constant := 36; -- XCB_UNGRAB_SERVER : constant := 37; -- XCB_QUERY_POINTER : constant := 38; -- XCB_GET_MOTION_EVENTS : constant := 39; -- XCB_TRANSLATE_COORDINATES : constant := 40; -- XCB_WARP_POINTER : constant := 41; -- XCB_SET_INPUT_FOCUS : constant := 42; -- XCB_GET_INPUT_FOCUS : constant := 43; -- XCB_QUERY_KEYMAP : constant := 44; -- XCB_OPEN_FONT : constant := 45; -- XCB_CLOSE_FONT : constant := 46; -- XCB_QUERY_FONT : constant := 47; -- XCB_QUERY_TEXT_EXTENTS : constant := 48; -- XCB_LIST_FONTS : constant := 49; -- XCB_LIST_FONTS_WITH_INFO : constant := 50; -- XCB_SET_FONT_PATH : constant := 51; -- XCB_GET_FONT_PATH : constant := 52; -- XCB_CREATE_PIXMAP : constant := 53; -- XCB_FREE_PIXMAP : constant := 54; -- XCB_CREATE_GC : constant := 55; -- XCB_CHANGE_GC : constant := 56; -- XCB_COPY_GC : constant := 57; -- XCB_SET_DASHES : constant := 58; -- XCB_SET_CLIP_RECTANGLES : constant := 59; -- XCB_FREE_GC : constant := 60; -- XCB_CLEAR_AREA : constant := 61; -- XCB_COPY_AREA : constant := 62; -- XCB_COPY_PLANE : constant := 63; -- XCB_POLY_POINT : constant := 64; -- XCB_POLY_LINE : constant := 65; -- XCB_POLY_SEGMENT : constant := 66; -- XCB_POLY_RECTANGLE : constant := 67; -- XCB_POLY_ARC : constant := 68; -- XCB_FILL_POLY : constant := 69; -- XCB_POLY_FILL_RECTANGLE : constant := 70; -- XCB_POLY_FILL_ARC : constant := 71; -- XCB_PUT_IMAGE : constant := 72; -- XCB_GET_IMAGE : constant := 73; -- XCB_POLY_TEXT_8 : constant := 74; -- XCB_POLY_TEXT_16 : constant := 75; -- XCB_IMAGE_TEXT_8 : constant := 76; -- XCB_IMAGE_TEXT_16 : constant := 77; -- XCB_CREATE_COLORMAP : constant := 78; -- XCB_FREE_COLORMAP : constant := 79; -- XCB_COPY_COLORMAP_AND_FREE : constant := 80; -- XCB_INSTALL_COLORMAP : constant := 81; -- XCB_UNINSTALL_COLORMAP : constant := 82; -- XCB_LIST_INSTALLED_COLORMAPS : constant := 83; -- XCB_ALLOC_COLOR : constant := 84; -- XCB_ALLOC_NAMED_COLOR : constant := 85; -- XCB_ALLOC_COLOR_CELLS : constant := 86; -- XCB_ALLOC_COLOR_PLANES : constant := 87; -- XCB_FREE_COLORS : constant := 88; -- XCB_STORE_COLORS : constant := 89; -- XCB_STORE_NAMED_COLOR : constant := 90; -- XCB_QUERY_COLORS : constant := 91; -- XCB_LOOKUP_COLOR : constant := 92; -- XCB_CREATE_CURSOR : constant := 93; -- XCB_CREATE_GLYPH_CURSOR : constant := 94; -- XCB_FREE_CURSOR : constant := 95; -- XCB_RECOLOR_CURSOR : constant := 96; -- XCB_QUERY_BEST_SIZE : constant := 97; -- XCB_QUERY_EXTENSION : constant := 98; -- XCB_LIST_EXTENSIONS : constant := 99; -- XCB_CHANGE_KEYBOARD_MAPPING : constant := 100; -- XCB_GET_KEYBOARD_MAPPING : constant := 101; -- XCB_CHANGE_KEYBOARD_CONTROL : constant := 102; -- XCB_GET_KEYBOARD_CONTROL : constant := 103; -- XCB_BELL : constant := 104; -- XCB_CHANGE_POINTER_CONTROL : constant := 105; -- XCB_GET_POINTER_CONTROL : constant := 106; -- XCB_SET_SCREEN_SAVER : constant := 107; -- XCB_GET_SCREEN_SAVER : constant := 108; -- XCB_CHANGE_HOSTS : constant := 109; -- XCB_LIST_HOSTS : constant := 110; -- XCB_SET_ACCESS_CONTROL : constant := 111; -- XCB_SET_CLOSE_DOWN_MODE : constant := 112; -- XCB_KILL_CLIENT : constant := 113; -- XCB_ROTATE_PROPERTIES : constant := 114; -- XCB_FORCE_SCREEN_SAVER : constant := 115; -- XCB_SET_POINTER_MAPPING : constant := 116; -- XCB_GET_POINTER_MAPPING : constant := 117; -- XCB_SET_MODIFIER_MAPPING : constant := 118; -- XCB_GET_MODIFIER_MAPPING : constant := 119; -- XCB_NO_OPERATION : constant := 127; type xcb_char2b_t is record byte1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:25 byte2 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:26 end record; pragma Convention (C_Pass_By_Copy, xcb_char2b_t); -- /usr/include/xcb/xproto.h:24 type xcb_char2b_iterator_t is record data : access xcb_char2b_t; -- /usr/include/xcb/xproto.h:33 c_rem : aliased int; -- /usr/include/xcb/xproto.h:34 index : aliased int; -- /usr/include/xcb/xproto.h:35 end record; pragma Convention (C_Pass_By_Copy, xcb_char2b_iterator_t); -- /usr/include/xcb/xproto.h:32 subtype xcb_window_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:38 type xcb_window_iterator_t is record data : access xcb_window_t; -- /usr/include/xcb/xproto.h:44 c_rem : aliased int; -- /usr/include/xcb/xproto.h:45 index : aliased int; -- /usr/include/xcb/xproto.h:46 end record; pragma Convention (C_Pass_By_Copy, xcb_window_iterator_t); -- /usr/include/xcb/xproto.h:43 subtype xcb_pixmap_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:49 type xcb_pixmap_iterator_t is record data : access xcb_pixmap_t; -- /usr/include/xcb/xproto.h:55 c_rem : aliased int; -- /usr/include/xcb/xproto.h:56 index : aliased int; -- /usr/include/xcb/xproto.h:57 end record; pragma Convention (C_Pass_By_Copy, xcb_pixmap_iterator_t); -- /usr/include/xcb/xproto.h:54 subtype xcb_cursor_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:60 type xcb_cursor_iterator_t is record data : access xcb_cursor_t; -- /usr/include/xcb/xproto.h:66 c_rem : aliased int; -- /usr/include/xcb/xproto.h:67 index : aliased int; -- /usr/include/xcb/xproto.h:68 end record; pragma Convention (C_Pass_By_Copy, xcb_cursor_iterator_t); -- /usr/include/xcb/xproto.h:65 subtype xcb_font_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:71 type xcb_font_iterator_t is record data : access xcb_font_t; -- /usr/include/xcb/xproto.h:77 c_rem : aliased int; -- /usr/include/xcb/xproto.h:78 index : aliased int; -- /usr/include/xcb/xproto.h:79 end record; pragma Convention (C_Pass_By_Copy, xcb_font_iterator_t); -- /usr/include/xcb/xproto.h:76 subtype xcb_gcontext_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:82 type xcb_gcontext_iterator_t is record data : access xcb_gcontext_t; -- /usr/include/xcb/xproto.h:88 c_rem : aliased int; -- /usr/include/xcb/xproto.h:89 index : aliased int; -- /usr/include/xcb/xproto.h:90 end record; pragma Convention (C_Pass_By_Copy, xcb_gcontext_iterator_t); -- /usr/include/xcb/xproto.h:87 subtype xcb_colormap_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:93 type xcb_colormap_iterator_t is record data : access xcb_colormap_t; -- /usr/include/xcb/xproto.h:99 c_rem : aliased int; -- /usr/include/xcb/xproto.h:100 index : aliased int; -- /usr/include/xcb/xproto.h:101 end record; pragma Convention (C_Pass_By_Copy, xcb_colormap_iterator_t); -- /usr/include/xcb/xproto.h:98 subtype xcb_atom_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:104 type xcb_atom_iterator_t is record data : access xcb_atom_t; -- /usr/include/xcb/xproto.h:110 c_rem : aliased int; -- /usr/include/xcb/xproto.h:111 index : aliased int; -- /usr/include/xcb/xproto.h:112 end record; pragma Convention (C_Pass_By_Copy, xcb_atom_iterator_t); -- /usr/include/xcb/xproto.h:109 subtype xcb_drawable_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:115 type xcb_drawable_iterator_t is record data : access xcb_drawable_t; -- /usr/include/xcb/xproto.h:121 c_rem : aliased int; -- /usr/include/xcb/xproto.h:122 index : aliased int; -- /usr/include/xcb/xproto.h:123 end record; pragma Convention (C_Pass_By_Copy, xcb_drawable_iterator_t); -- /usr/include/xcb/xproto.h:120 subtype xcb_fontable_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:126 type xcb_fontable_iterator_t is record data : access xcb_fontable_t; -- /usr/include/xcb/xproto.h:132 c_rem : aliased int; -- /usr/include/xcb/xproto.h:133 index : aliased int; -- /usr/include/xcb/xproto.h:134 end record; pragma Convention (C_Pass_By_Copy, xcb_fontable_iterator_t); -- /usr/include/xcb/xproto.h:131 subtype xcb_visualid_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:137 type xcb_visualid_iterator_t is record data : access xcb_visualid_t; -- /usr/include/xcb/xproto.h:143 c_rem : aliased int; -- /usr/include/xcb/xproto.h:144 index : aliased int; -- /usr/include/xcb/xproto.h:145 end record; pragma Convention (C_Pass_By_Copy, xcb_visualid_iterator_t); -- /usr/include/xcb/xproto.h:142 subtype xcb_timestamp_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:148 type xcb_timestamp_iterator_t is record data : access xcb_timestamp_t; -- /usr/include/xcb/xproto.h:154 c_rem : aliased int; -- /usr/include/xcb/xproto.h:155 index : aliased int; -- /usr/include/xcb/xproto.h:156 end record; pragma Convention (C_Pass_By_Copy, xcb_timestamp_iterator_t); -- /usr/include/xcb/xproto.h:153 subtype xcb_keysym_t is Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:159 type xcb_keysym_iterator_t is record data : access xcb_keysym_t; -- /usr/include/xcb/xproto.h:165 c_rem : aliased int; -- /usr/include/xcb/xproto.h:166 index : aliased int; -- /usr/include/xcb/xproto.h:167 end record; pragma Convention (C_Pass_By_Copy, xcb_keysym_iterator_t); -- /usr/include/xcb/xproto.h:164 subtype xcb_keycode_t is Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:170 type xcb_keycode_iterator_t is record data : access xcb_keycode_t; -- /usr/include/xcb/xproto.h:176 c_rem : aliased int; -- /usr/include/xcb/xproto.h:177 index : aliased int; -- /usr/include/xcb/xproto.h:178 end record; pragma Convention (C_Pass_By_Copy, xcb_keycode_iterator_t); -- /usr/include/xcb/xproto.h:175 subtype xcb_button_t is Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:181 type xcb_button_iterator_t is record data : access xcb_button_t; -- /usr/include/xcb/xproto.h:187 c_rem : aliased int; -- /usr/include/xcb/xproto.h:188 index : aliased int; -- /usr/include/xcb/xproto.h:189 end record; pragma Convention (C_Pass_By_Copy, xcb_button_iterator_t); -- /usr/include/xcb/xproto.h:186 type xcb_point_t is record x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:196 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:197 end record; pragma Convention (C_Pass_By_Copy, xcb_point_t); -- /usr/include/xcb/xproto.h:195 type xcb_point_iterator_t is record data : access xcb_point_t; -- /usr/include/xcb/xproto.h:204 c_rem : aliased int; -- /usr/include/xcb/xproto.h:205 index : aliased int; -- /usr/include/xcb/xproto.h:206 end record; pragma Convention (C_Pass_By_Copy, xcb_point_iterator_t); -- /usr/include/xcb/xproto.h:203 type xcb_rectangle_t is record x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:213 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:214 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:215 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:216 end record; pragma Convention (C_Pass_By_Copy, xcb_rectangle_t); -- /usr/include/xcb/xproto.h:212 type xcb_rectangle_iterator_t is record data : access xcb_rectangle_t; -- /usr/include/xcb/xproto.h:223 c_rem : aliased int; -- /usr/include/xcb/xproto.h:224 index : aliased int; -- /usr/include/xcb/xproto.h:225 end record; pragma Convention (C_Pass_By_Copy, xcb_rectangle_iterator_t); -- /usr/include/xcb/xproto.h:222 type xcb_arc_t is record x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:232 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:233 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:234 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:235 angle1 : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:236 angle2 : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:237 end record; pragma Convention (C_Pass_By_Copy, xcb_arc_t); -- /usr/include/xcb/xproto.h:231 type xcb_arc_iterator_t is record data : access xcb_arc_t; -- /usr/include/xcb/xproto.h:244 c_rem : aliased int; -- /usr/include/xcb/xproto.h:245 index : aliased int; -- /usr/include/xcb/xproto.h:246 end record; pragma Convention (C_Pass_By_Copy, xcb_arc_iterator_t); -- /usr/include/xcb/xproto.h:243 type xcb_format_t_pad0_array is array (0 .. 4) of aliased Libc.Stdint.uint8_t; type xcb_format_t is record depth : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:253 bits_per_pixel : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:254 scanline_pad : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:255 pad0 : aliased xcb_format_t_pad0_array; -- /usr/include/xcb/xproto.h:256 end record; pragma Convention (C_Pass_By_Copy, xcb_format_t); -- /usr/include/xcb/xproto.h:252 type xcb_format_iterator_t is record data : access xcb_format_t; -- /usr/include/xcb/xproto.h:263 c_rem : aliased int; -- /usr/include/xcb/xproto.h:264 index : aliased int; -- /usr/include/xcb/xproto.h:265 end record; pragma Convention (C_Pass_By_Copy, xcb_format_iterator_t); -- /usr/include/xcb/xproto.h:262 type xcb_visual_class_t is (XCB_VISUAL_CLASS_STATIC_GRAY, XCB_VISUAL_CLASS_GRAY_SCALE, XCB_VISUAL_CLASS_STATIC_COLOR, XCB_VISUAL_CLASS_PSEUDO_COLOR, XCB_VISUAL_CLASS_TRUE_COLOR, XCB_VISUAL_CLASS_DIRECT_COLOR); pragma Convention (C, xcb_visual_class_t); -- /usr/include/xcb/xproto.h:268 type xcb_visualtype_t_pad0_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_visualtype_t is record visual_id : aliased xcb_visualid_t; -- /usr/include/xcb/xproto.h:281 u_class : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:282 bits_per_rgb_value : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:283 colormap_entries : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:284 red_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:285 green_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:286 blue_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:287 pad0 : aliased xcb_visualtype_t_pad0_array; -- /usr/include/xcb/xproto.h:288 end record; pragma Convention (C_Pass_By_Copy, xcb_visualtype_t); -- /usr/include/xcb/xproto.h:280 type xcb_visualtype_iterator_t is record data : access xcb_visualtype_t; -- /usr/include/xcb/xproto.h:295 c_rem : aliased int; -- /usr/include/xcb/xproto.h:296 index : aliased int; -- /usr/include/xcb/xproto.h:297 end record; pragma Convention (C_Pass_By_Copy, xcb_visualtype_iterator_t); -- /usr/include/xcb/xproto.h:294 type xcb_depth_t_pad1_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_depth_t is record depth : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:304 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:305 visuals_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:306 pad1 : aliased xcb_depth_t_pad1_array; -- /usr/include/xcb/xproto.h:307 end record; pragma Convention (C_Pass_By_Copy, xcb_depth_t); -- /usr/include/xcb/xproto.h:303 type xcb_depth_iterator_t is record data : access xcb_depth_t; -- /usr/include/xcb/xproto.h:314 c_rem : aliased int; -- /usr/include/xcb/xproto.h:315 index : aliased int; -- /usr/include/xcb/xproto.h:316 end record; pragma Convention (C_Pass_By_Copy, xcb_depth_iterator_t); -- /usr/include/xcb/xproto.h:313 subtype xcb_event_mask_t is unsigned; XCB_EVENT_MASK_NO_EVENT : constant xcb_event_mask_t := 0; XCB_EVENT_MASK_KEY_PRESS : constant xcb_event_mask_t := 1; XCB_EVENT_MASK_KEY_RELEASE : constant xcb_event_mask_t := 2; XCB_EVENT_MASK_BUTTON_PRESS : constant xcb_event_mask_t := 4; XCB_EVENT_MASK_BUTTON_RELEASE : constant xcb_event_mask_t := 8; XCB_EVENT_MASK_ENTER_WINDOW : constant xcb_event_mask_t := 16; XCB_EVENT_MASK_LEAVE_WINDOW : constant xcb_event_mask_t := 32; XCB_EVENT_MASK_POINTER_MOTION : constant xcb_event_mask_t := 64; XCB_EVENT_MASK_POINTER_MOTION_HINT : constant xcb_event_mask_t := 128; XCB_EVENT_MASK_BUTTON_1_MOTION : constant xcb_event_mask_t := 256; XCB_EVENT_MASK_BUTTON_2_MOTION : constant xcb_event_mask_t := 512; XCB_EVENT_MASK_BUTTON_3_MOTION : constant xcb_event_mask_t := 1024; XCB_EVENT_MASK_BUTTON_4_MOTION : constant xcb_event_mask_t := 2048; XCB_EVENT_MASK_BUTTON_5_MOTION : constant xcb_event_mask_t := 4096; XCB_EVENT_MASK_BUTTON_MOTION : constant xcb_event_mask_t := 8192; XCB_EVENT_MASK_KEYMAP_STATE : constant xcb_event_mask_t := 16384; XCB_EVENT_MASK_EXPOSURE : constant xcb_event_mask_t := 32768; XCB_EVENT_MASK_VISIBILITY_CHANGE : constant xcb_event_mask_t := 65536; XCB_EVENT_MASK_STRUCTURE_NOTIFY : constant xcb_event_mask_t := 131072; XCB_EVENT_MASK_RESIZE_REDIRECT : constant xcb_event_mask_t := 262144; XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY : constant xcb_event_mask_t := 524288; XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT : constant xcb_event_mask_t := 1048576; XCB_EVENT_MASK_FOCUS_CHANGE : constant xcb_event_mask_t := 2097152; XCB_EVENT_MASK_PROPERTY_CHANGE : constant xcb_event_mask_t := 4194304; XCB_EVENT_MASK_COLOR_MAP_CHANGE : constant xcb_event_mask_t := 8388608; XCB_EVENT_MASK_OWNER_GRAB_BUTTON : constant xcb_event_mask_t := 16777216; -- /usr/include/xcb/xproto.h:319 type xcb_backing_store_t is (XCB_BACKING_STORE_NOT_USEFUL, XCB_BACKING_STORE_WHEN_MAPPED, XCB_BACKING_STORE_ALWAYS); pragma Convention (C, xcb_backing_store_t); -- /usr/include/xcb/xproto.h:348 type xcb_screen_t is record root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:358 default_colormap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:359 white_pixel : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:360 black_pixel : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:361 current_input_masks : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:362 width_in_pixels : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:363 height_in_pixels : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:364 width_in_millimeters : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:365 height_in_millimeters : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:366 min_installed_maps : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:367 max_installed_maps : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:368 root_visual : aliased xcb_visualid_t; -- /usr/include/xcb/xproto.h:369 backing_stores : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:370 save_unders : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:371 root_depth : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:372 allowed_depths_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:373 end record; pragma Convention (C_Pass_By_Copy, xcb_screen_t); -- /usr/include/xcb/xproto.h:357 type xcb_screen_iterator_t is record data : access xcb_screen_t; -- /usr/include/xcb/xproto.h:380 c_rem : aliased int; -- /usr/include/xcb/xproto.h:381 index : aliased int; -- /usr/include/xcb/xproto.h:382 end record; pragma Convention (C_Pass_By_Copy, xcb_screen_iterator_t); -- /usr/include/xcb/xproto.h:379 type xcb_setup_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_setup_request_t is record byte_order : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:389 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:390 protocol_major_version : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:391 protocol_minor_version : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:392 authorization_protocol_name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:393 authorization_protocol_data_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:394 pad1 : aliased xcb_setup_request_t_pad1_array; -- /usr/include/xcb/xproto.h:395 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_request_t); -- /usr/include/xcb/xproto.h:388 type xcb_setup_request_iterator_t is record data : access xcb_setup_request_t; -- /usr/include/xcb/xproto.h:402 c_rem : aliased int; -- /usr/include/xcb/xproto.h:403 index : aliased int; -- /usr/include/xcb/xproto.h:404 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_request_iterator_t); -- /usr/include/xcb/xproto.h:401 type xcb_setup_failed_t is record status : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:411 reason_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:412 protocol_major_version : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:413 protocol_minor_version : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:414 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:415 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_failed_t); -- /usr/include/xcb/xproto.h:410 type xcb_setup_failed_iterator_t is record data : access xcb_setup_failed_t; -- /usr/include/xcb/xproto.h:422 c_rem : aliased int; -- /usr/include/xcb/xproto.h:423 index : aliased int; -- /usr/include/xcb/xproto.h:424 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_failed_iterator_t); -- /usr/include/xcb/xproto.h:421 type xcb_setup_authenticate_t_pad0_array is array (0 .. 4) of aliased Libc.Stdint.uint8_t; type xcb_setup_authenticate_t is record status : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:431 pad0 : aliased xcb_setup_authenticate_t_pad0_array; -- /usr/include/xcb/xproto.h:432 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:433 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_authenticate_t); -- /usr/include/xcb/xproto.h:430 type xcb_setup_authenticate_iterator_t is record data : access xcb_setup_authenticate_t; -- /usr/include/xcb/xproto.h:440 c_rem : aliased int; -- /usr/include/xcb/xproto.h:441 index : aliased int; -- /usr/include/xcb/xproto.h:442 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_authenticate_iterator_t); -- /usr/include/xcb/xproto.h:439 type xcb_image_order_t is (XCB_IMAGE_ORDER_LSB_FIRST, XCB_IMAGE_ORDER_MSB_FIRST); pragma Convention (C, xcb_image_order_t); -- /usr/include/xcb/xproto.h:445 type xcb_setup_t_pad1_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_setup_t is record status : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:454 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:455 protocol_major_version : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:456 protocol_minor_version : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:457 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:458 release_number : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:459 resource_id_base : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:460 resource_id_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:461 motion_buffer_size : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:462 vendor_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:463 maximum_request_length : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:464 roots_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:465 pixmap_formats_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:466 image_byte_order : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:467 bitmap_format_bit_order : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:468 bitmap_format_scanline_unit : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:469 bitmap_format_scanline_pad : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:470 min_keycode : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:471 max_keycode : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:472 pad1 : aliased xcb_setup_t_pad1_array; -- /usr/include/xcb/xproto.h:473 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_t); -- /usr/include/xcb/xproto.h:453 type xcb_setup_iterator_t is record data : access xcb_setup_t; -- /usr/include/xcb/xproto.h:480 c_rem : aliased int; -- /usr/include/xcb/xproto.h:481 index : aliased int; -- /usr/include/xcb/xproto.h:482 end record; pragma Convention (C_Pass_By_Copy, xcb_setup_iterator_t); -- /usr/include/xcb/xproto.h:479 subtype xcb_mod_mask_t is unsigned; XCB_MOD_MASK_SHIFT : constant xcb_mod_mask_t := 1; XCB_MOD_MASK_LOCK : constant xcb_mod_mask_t := 2; XCB_MOD_MASK_CONTROL : constant xcb_mod_mask_t := 4; XCB_MOD_MASK_1 : constant xcb_mod_mask_t := 8; XCB_MOD_MASK_2 : constant xcb_mod_mask_t := 16; XCB_MOD_MASK_3 : constant xcb_mod_mask_t := 32; XCB_MOD_MASK_4 : constant xcb_mod_mask_t := 64; XCB_MOD_MASK_5 : constant xcb_mod_mask_t := 128; XCB_MOD_MASK_ANY : constant xcb_mod_mask_t := 32768; -- /usr/include/xcb/xproto.h:485 subtype xcb_key_but_mask_t is unsigned; XCB_KEY_BUT_MASK_SHIFT : constant xcb_key_but_mask_t := 1; XCB_KEY_BUT_MASK_LOCK : constant xcb_key_but_mask_t := 2; XCB_KEY_BUT_MASK_CONTROL : constant xcb_key_but_mask_t := 4; XCB_KEY_BUT_MASK_MOD_1 : constant xcb_key_but_mask_t := 8; XCB_KEY_BUT_MASK_MOD_2 : constant xcb_key_but_mask_t := 16; XCB_KEY_BUT_MASK_MOD_3 : constant xcb_key_but_mask_t := 32; XCB_KEY_BUT_MASK_MOD_4 : constant xcb_key_but_mask_t := 64; XCB_KEY_BUT_MASK_MOD_5 : constant xcb_key_but_mask_t := 128; XCB_KEY_BUT_MASK_BUTTON_1 : constant xcb_key_but_mask_t := 256; XCB_KEY_BUT_MASK_BUTTON_2 : constant xcb_key_but_mask_t := 512; XCB_KEY_BUT_MASK_BUTTON_3 : constant xcb_key_but_mask_t := 1024; XCB_KEY_BUT_MASK_BUTTON_4 : constant xcb_key_but_mask_t := 2048; XCB_KEY_BUT_MASK_BUTTON_5 : constant xcb_key_but_mask_t := 4096; -- /usr/include/xcb/xproto.h:497 type xcb_window_enum_t is (XCB_WINDOW_NONE); pragma Convention (C, xcb_window_enum_t); -- /usr/include/xcb/xproto.h:513 type xcb_key_press_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:524 detail : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:525 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:526 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:527 root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:528 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:529 child : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:530 root_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:531 root_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:532 event_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:533 event_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:534 state : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:535 same_screen : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:536 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:537 end record; pragma Convention (C_Pass_By_Copy, xcb_key_press_event_t); -- /usr/include/xcb/xproto.h:523 subtype xcb_key_release_event_t is xcb_key_press_event_t; subtype xcb_button_mask_t is unsigned; XCB_BUTTON_MASK_1 : constant xcb_button_mask_t := 256; XCB_BUTTON_MASK_2 : constant xcb_button_mask_t := 512; XCB_BUTTON_MASK_3 : constant xcb_button_mask_t := 1024; XCB_BUTTON_MASK_4 : constant xcb_button_mask_t := 2048; XCB_BUTTON_MASK_5 : constant xcb_button_mask_t := 4096; XCB_BUTTON_MASK_ANY : constant xcb_button_mask_t := 32768; -- /usr/include/xcb/xproto.h:545 type xcb_button_press_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:561 detail : aliased xcb_button_t; -- /usr/include/xcb/xproto.h:562 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:563 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:564 root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:565 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:566 child : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:567 root_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:568 root_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:569 event_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:570 event_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:571 state : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:572 same_screen : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:573 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:574 end record; pragma Convention (C_Pass_By_Copy, xcb_button_press_event_t); -- /usr/include/xcb/xproto.h:560 subtype xcb_button_release_event_t is xcb_button_press_event_t; type xcb_motion_t is (XCB_MOTION_NORMAL, XCB_MOTION_HINT); pragma Convention (C, xcb_motion_t); -- /usr/include/xcb/xproto.h:582 type xcb_motion_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:594 detail : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:595 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:596 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:597 root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:598 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:599 child : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:600 root_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:601 root_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:602 event_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:603 event_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:604 state : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:605 same_screen : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:606 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:607 end record; pragma Convention (C_Pass_By_Copy, xcb_motion_notify_event_t); -- /usr/include/xcb/xproto.h:593 type xcb_notify_detail_t is (XCB_NOTIFY_DETAIL_ANCESTOR, XCB_NOTIFY_DETAIL_VIRTUAL, XCB_NOTIFY_DETAIL_INFERIOR, XCB_NOTIFY_DETAIL_NONLINEAR, XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL, XCB_NOTIFY_DETAIL_POINTER, XCB_NOTIFY_DETAIL_POINTER_ROOT, XCB_NOTIFY_DETAIL_NONE); pragma Convention (C, xcb_notify_detail_t); -- /usr/include/xcb/xproto.h:610 type xcb_notify_mode_t is (XCB_NOTIFY_MODE_NORMAL, XCB_NOTIFY_MODE_GRAB, XCB_NOTIFY_MODE_UNGRAB, XCB_NOTIFY_MODE_WHILE_GRABBED); pragma Convention (C, xcb_notify_mode_t); -- /usr/include/xcb/xproto.h:621 type xcb_enter_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:635 detail : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:636 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:637 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:638 root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:639 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:640 child : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:641 root_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:642 root_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:643 event_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:644 event_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:645 state : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:646 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:647 same_screen_focus : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:648 end record; pragma Convention (C_Pass_By_Copy, xcb_enter_notify_event_t); -- /usr/include/xcb/xproto.h:634 subtype xcb_leave_notify_event_t is xcb_enter_notify_event_t; type xcb_focus_in_event_t_pad0_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_focus_in_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:663 detail : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:664 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:665 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:666 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:667 pad0 : aliased xcb_focus_in_event_t_pad0_array; -- /usr/include/xcb/xproto.h:668 end record; pragma Convention (C_Pass_By_Copy, xcb_focus_in_event_t); -- /usr/include/xcb/xproto.h:662 subtype xcb_focus_out_event_t is xcb_focus_in_event_t; type xcb_keymap_notify_event_t_keys_array is array (0 .. 30) of aliased Libc.Stdint.uint8_t; type xcb_keymap_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:683 keys : aliased xcb_keymap_notify_event_t_keys_array; -- /usr/include/xcb/xproto.h:684 end record; pragma Convention (C_Pass_By_Copy, xcb_keymap_notify_event_t); -- /usr/include/xcb/xproto.h:682 type xcb_expose_event_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_expose_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:694 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:695 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:696 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:697 x : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:698 y : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:699 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:700 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:701 count : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:702 pad1 : aliased xcb_expose_event_t_pad1_array; -- /usr/include/xcb/xproto.h:703 end record; pragma Convention (C_Pass_By_Copy, xcb_expose_event_t); -- /usr/include/xcb/xproto.h:693 type xcb_graphics_exposure_event_t_pad1_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_graphics_exposure_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:713 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:714 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:715 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:716 x : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:717 y : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:718 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:719 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:720 minor_opcode : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:721 count : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:722 major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:723 pad1 : aliased xcb_graphics_exposure_event_t_pad1_array; -- /usr/include/xcb/xproto.h:724 end record; pragma Convention (C_Pass_By_Copy, xcb_graphics_exposure_event_t); -- /usr/include/xcb/xproto.h:712 type xcb_no_exposure_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:734 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:735 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:736 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:737 minor_opcode : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:738 major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:739 pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:740 end record; pragma Convention (C_Pass_By_Copy, xcb_no_exposure_event_t); -- /usr/include/xcb/xproto.h:733 type xcb_visibility_t is (XCB_VISIBILITY_UNOBSCURED, XCB_VISIBILITY_PARTIALLY_OBSCURED, XCB_VISIBILITY_FULLY_OBSCURED); pragma Convention (C, xcb_visibility_t); -- /usr/include/xcb/xproto.h:743 type xcb_visibility_notify_event_t_pad1_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_visibility_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:756 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:757 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:758 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:759 state : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:760 pad1 : aliased xcb_visibility_notify_event_t_pad1_array; -- /usr/include/xcb/xproto.h:761 end record; pragma Convention (C_Pass_By_Copy, xcb_visibility_notify_event_t); -- /usr/include/xcb/xproto.h:755 type xcb_create_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:771 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:772 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:773 parent : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:774 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:775 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:776 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:777 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:778 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:779 border_width : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:780 override_redirect : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:781 pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:782 end record; pragma Convention (C_Pass_By_Copy, xcb_create_notify_event_t); -- /usr/include/xcb/xproto.h:770 type xcb_destroy_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:792 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:793 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:794 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:795 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:796 end record; pragma Convention (C_Pass_By_Copy, xcb_destroy_notify_event_t); -- /usr/include/xcb/xproto.h:791 type xcb_unmap_notify_event_t_pad1_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_unmap_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:806 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:807 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:808 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:809 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:810 from_configure : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:811 pad1 : aliased xcb_unmap_notify_event_t_pad1_array; -- /usr/include/xcb/xproto.h:812 end record; pragma Convention (C_Pass_By_Copy, xcb_unmap_notify_event_t); -- /usr/include/xcb/xproto.h:805 type xcb_map_notify_event_t_pad1_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_map_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:822 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:823 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:824 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:825 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:826 override_redirect : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:827 pad1 : aliased xcb_map_notify_event_t_pad1_array; -- /usr/include/xcb/xproto.h:828 end record; pragma Convention (C_Pass_By_Copy, xcb_map_notify_event_t); -- /usr/include/xcb/xproto.h:821 type xcb_map_request_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:838 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:839 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:840 parent : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:841 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:842 end record; pragma Convention (C_Pass_By_Copy, xcb_map_request_event_t); -- /usr/include/xcb/xproto.h:837 type xcb_reparent_notify_event_t_pad1_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_reparent_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:852 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:853 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:854 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:855 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:856 parent : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:857 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:858 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:859 override_redirect : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:860 pad1 : aliased xcb_reparent_notify_event_t_pad1_array; -- /usr/include/xcb/xproto.h:861 end record; pragma Convention (C_Pass_By_Copy, xcb_reparent_notify_event_t); -- /usr/include/xcb/xproto.h:851 type xcb_configure_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:871 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:872 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:873 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:874 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:875 above_sibling : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:876 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:877 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:878 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:879 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:880 border_width : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:881 override_redirect : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:882 pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:883 end record; pragma Convention (C_Pass_By_Copy, xcb_configure_notify_event_t); -- /usr/include/xcb/xproto.h:870 type xcb_configure_request_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:893 stack_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:894 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:895 parent : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:896 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:897 sibling : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:898 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:899 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:900 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:901 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:902 border_width : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:903 value_mask : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:904 end record; pragma Convention (C_Pass_By_Copy, xcb_configure_request_event_t); -- /usr/include/xcb/xproto.h:892 type xcb_gravity_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:914 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:915 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:916 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:917 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:918 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:919 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:920 end record; pragma Convention (C_Pass_By_Copy, xcb_gravity_notify_event_t); -- /usr/include/xcb/xproto.h:913 type xcb_resize_request_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:930 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:931 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:932 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:933 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:934 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:935 end record; pragma Convention (C_Pass_By_Copy, xcb_resize_request_event_t); -- /usr/include/xcb/xproto.h:929 type xcb_place_t is (XCB_PLACE_ON_TOP, XCB_PLACE_ON_BOTTOM); pragma Convention (C, xcb_place_t); -- /usr/include/xcb/xproto.h:938 type xcb_circulate_notify_event_t_pad1_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_circulate_notify_event_t_pad2_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_circulate_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:954 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:955 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:956 event : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:957 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:958 pad1 : aliased xcb_circulate_notify_event_t_pad1_array; -- /usr/include/xcb/xproto.h:959 place : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:960 pad2 : aliased xcb_circulate_notify_event_t_pad2_array; -- /usr/include/xcb/xproto.h:961 end record; pragma Convention (C_Pass_By_Copy, xcb_circulate_notify_event_t); -- /usr/include/xcb/xproto.h:953 subtype xcb_circulate_request_event_t is xcb_circulate_notify_event_t; type xcb_property_t is (XCB_PROPERTY_NEW_VALUE, XCB_PROPERTY_DELETE); pragma Convention (C, xcb_property_t); -- /usr/include/xcb/xproto.h:969 type xcb_property_notify_event_t_pad1_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_property_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:981 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:982 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:983 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:984 atom : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:985 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:986 state : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:987 pad1 : aliased xcb_property_notify_event_t_pad1_array; -- /usr/include/xcb/xproto.h:988 end record; pragma Convention (C_Pass_By_Copy, xcb_property_notify_event_t); -- /usr/include/xcb/xproto.h:980 type xcb_selection_clear_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:998 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:999 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1000 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:1001 owner : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1002 selection : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1003 end record; pragma Convention (C_Pass_By_Copy, xcb_selection_clear_event_t); -- /usr/include/xcb/xproto.h:997 type xcb_time_t is (XCB_TIME_CURRENT_TIME); pragma Convention (C, xcb_time_t); -- /usr/include/xcb/xproto.h:1006 subtype xcb_atom_enum_t is unsigned; XCB_ATOM_NONE : constant xcb_atom_enum_t := 0; XCB_ATOM_ANY : constant xcb_atom_enum_t := 0; XCB_ATOM_PRIMARY : constant xcb_atom_enum_t := 1; XCB_ATOM_SECONDARY : constant xcb_atom_enum_t := 2; XCB_ATOM_ARC : constant xcb_atom_enum_t := 3; XCB_ATOM_ATOM : constant xcb_atom_enum_t := 4; XCB_ATOM_BITMAP : constant xcb_atom_enum_t := 5; XCB_ATOM_CARDINAL : constant xcb_atom_enum_t := 6; XCB_ATOM_COLORMAP : constant xcb_atom_enum_t := 7; XCB_ATOM_CURSOR : constant xcb_atom_enum_t := 8; XCB_ATOM_CUT_BUFFER0 : constant xcb_atom_enum_t := 9; XCB_ATOM_CUT_BUFFER1 : constant xcb_atom_enum_t := 10; XCB_ATOM_CUT_BUFFER2 : constant xcb_atom_enum_t := 11; XCB_ATOM_CUT_BUFFER3 : constant xcb_atom_enum_t := 12; XCB_ATOM_CUT_BUFFER4 : constant xcb_atom_enum_t := 13; XCB_ATOM_CUT_BUFFER5 : constant xcb_atom_enum_t := 14; XCB_ATOM_CUT_BUFFER6 : constant xcb_atom_enum_t := 15; XCB_ATOM_CUT_BUFFER7 : constant xcb_atom_enum_t := 16; XCB_ATOM_DRAWABLE : constant xcb_atom_enum_t := 17; XCB_ATOM_FONT : constant xcb_atom_enum_t := 18; XCB_ATOM_INTEGER : constant xcb_atom_enum_t := 19; XCB_ATOM_PIXMAP : constant xcb_atom_enum_t := 20; XCB_ATOM_POINT : constant xcb_atom_enum_t := 21; XCB_ATOM_RECTANGLE : constant xcb_atom_enum_t := 22; XCB_ATOM_RESOURCE_MANAGER : constant xcb_atom_enum_t := 23; XCB_ATOM_RGB_COLOR_MAP : constant xcb_atom_enum_t := 24; XCB_ATOM_RGB_BEST_MAP : constant xcb_atom_enum_t := 25; XCB_ATOM_RGB_BLUE_MAP : constant xcb_atom_enum_t := 26; XCB_ATOM_RGB_DEFAULT_MAP : constant xcb_atom_enum_t := 27; XCB_ATOM_RGB_GRAY_MAP : constant xcb_atom_enum_t := 28; XCB_ATOM_RGB_GREEN_MAP : constant xcb_atom_enum_t := 29; XCB_ATOM_RGB_RED_MAP : constant xcb_atom_enum_t := 30; XCB_ATOM_STRING : constant xcb_atom_enum_t := 31; XCB_ATOM_VISUALID : constant xcb_atom_enum_t := 32; XCB_ATOM_WINDOW : constant xcb_atom_enum_t := 33; XCB_ATOM_WM_COMMAND : constant xcb_atom_enum_t := 34; XCB_ATOM_WM_HINTS : constant xcb_atom_enum_t := 35; XCB_ATOM_WM_CLIENT_MACHINE : constant xcb_atom_enum_t := 36; XCB_ATOM_WM_ICON_NAME : constant xcb_atom_enum_t := 37; XCB_ATOM_WM_ICON_SIZE : constant xcb_atom_enum_t := 38; XCB_ATOM_WM_NAME : constant xcb_atom_enum_t := 39; XCB_ATOM_WM_NORMAL_HINTS : constant xcb_atom_enum_t := 40; XCB_ATOM_WM_SIZE_HINTS : constant xcb_atom_enum_t := 41; XCB_ATOM_WM_ZOOM_HINTS : constant xcb_atom_enum_t := 42; XCB_ATOM_MIN_SPACE : constant xcb_atom_enum_t := 43; XCB_ATOM_NORM_SPACE : constant xcb_atom_enum_t := 44; XCB_ATOM_MAX_SPACE : constant xcb_atom_enum_t := 45; XCB_ATOM_END_SPACE : constant xcb_atom_enum_t := 46; XCB_ATOM_SUPERSCRIPT_X : constant xcb_atom_enum_t := 47; XCB_ATOM_SUPERSCRIPT_Y : constant xcb_atom_enum_t := 48; XCB_ATOM_SUBSCRIPT_X : constant xcb_atom_enum_t := 49; XCB_ATOM_SUBSCRIPT_Y : constant xcb_atom_enum_t := 50; XCB_ATOM_UNDERLINE_POSITION : constant xcb_atom_enum_t := 51; XCB_ATOM_UNDERLINE_THICKNESS : constant xcb_atom_enum_t := 52; XCB_ATOM_STRIKEOUT_ASCENT : constant xcb_atom_enum_t := 53; XCB_ATOM_STRIKEOUT_DESCENT : constant xcb_atom_enum_t := 54; XCB_ATOM_ITALIC_ANGLE : constant xcb_atom_enum_t := 55; XCB_ATOM_X_HEIGHT : constant xcb_atom_enum_t := 56; XCB_ATOM_QUAD_WIDTH : constant xcb_atom_enum_t := 57; XCB_ATOM_WEIGHT : constant xcb_atom_enum_t := 58; XCB_ATOM_POINT_SIZE : constant xcb_atom_enum_t := 59; XCB_ATOM_RESOLUTION : constant xcb_atom_enum_t := 60; XCB_ATOM_COPYRIGHT : constant xcb_atom_enum_t := 61; XCB_ATOM_NOTICE : constant xcb_atom_enum_t := 62; XCB_ATOM_FONT_NAME : constant xcb_atom_enum_t := 63; XCB_ATOM_FAMILY_NAME : constant xcb_atom_enum_t := 64; XCB_ATOM_FULL_NAME : constant xcb_atom_enum_t := 65; XCB_ATOM_CAP_HEIGHT : constant xcb_atom_enum_t := 66; XCB_ATOM_WM_CLASS : constant xcb_atom_enum_t := 67; XCB_ATOM_WM_TRANSIENT_FOR : constant xcb_atom_enum_t := 68; -- /usr/include/xcb/xproto.h:1010 type xcb_selection_request_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1090 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1091 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1092 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:1093 owner : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1094 requestor : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1095 selection : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1096 target : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1097 property : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1098 end record; pragma Convention (C_Pass_By_Copy, xcb_selection_request_event_t); -- /usr/include/xcb/xproto.h:1089 type xcb_selection_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1108 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1109 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1110 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:1111 requestor : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1112 selection : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1113 target : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1114 property : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1115 end record; pragma Convention (C_Pass_By_Copy, xcb_selection_notify_event_t); -- /usr/include/xcb/xproto.h:1107 type xcb_colormap_state_t is (XCB_COLORMAP_STATE_UNINSTALLED, XCB_COLORMAP_STATE_INSTALLED); pragma Convention (C, xcb_colormap_state_t); -- /usr/include/xcb/xproto.h:1118 type xcb_colormap_enum_t is (XCB_COLORMAP_NONE); pragma Convention (C, xcb_colormap_enum_t); -- /usr/include/xcb/xproto.h:1127 type xcb_colormap_notify_event_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_colormap_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1138 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1139 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1140 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1141 colormap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:1142 u_new : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1143 state : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1144 pad1 : aliased xcb_colormap_notify_event_t_pad1_array; -- /usr/include/xcb/xproto.h:1145 end record; pragma Convention (C_Pass_By_Copy, xcb_colormap_notify_event_t); -- /usr/include/xcb/xproto.h:1137 type xcb_client_message_data_t_data8_array is array (0 .. 19) of aliased Libc.Stdint.uint8_t; type xcb_client_message_data_t_data16_array is array (0 .. 9) of aliased Libc.Stdint.uint16_t; type xcb_client_message_data_t_data32_array is array (0 .. 4) of aliased Libc.Stdint.uint32_t; type xcb_client_message_data_t (discr : unsigned := 0) is record case discr is when 0 => data8 : aliased xcb_client_message_data_t_data8_array; -- /usr/include/xcb/xproto.h:1152 when 1 => data16 : aliased xcb_client_message_data_t_data16_array; -- /usr/include/xcb/xproto.h:1153 when others => data32 : aliased xcb_client_message_data_t_data32_array; -- /usr/include/xcb/xproto.h:1154 end case; end record; pragma Convention (C_Pass_By_Copy, xcb_client_message_data_t); pragma Unchecked_Union (xcb_client_message_data_t); -- /usr/include/xcb/xproto.h:1151 type xcb_client_message_data_iterator_t is record data : access xcb_client_message_data_t; -- /usr/include/xcb/xproto.h:1161 c_rem : aliased int; -- /usr/include/xcb/xproto.h:1162 index : aliased int; -- /usr/include/xcb/xproto.h:1163 end record; pragma Convention (C_Pass_By_Copy, xcb_client_message_data_iterator_t); -- /usr/include/xcb/xproto.h:1160 type xcb_client_message_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1173 format : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1174 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1175 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1176 c_type : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1177 data : xcb_client_message_data_t; -- /usr/include/xcb/xproto.h:1178 end record; pragma Convention (C_Pass_By_Copy, xcb_client_message_event_t); -- /usr/include/xcb/xproto.h:1172 type xcb_mapping_t is (XCB_MAPPING_MODIFIER, XCB_MAPPING_KEYBOARD, XCB_MAPPING_POINTER); pragma Convention (C, xcb_mapping_t); -- /usr/include/xcb/xproto.h:1181 type xcb_mapping_notify_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1194 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1195 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1196 request : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1197 first_keycode : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:1198 count : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1199 pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1200 end record; pragma Convention (C_Pass_By_Copy, xcb_mapping_notify_event_t); -- /usr/include/xcb/xproto.h:1193 type xcb_ge_generic_event_t_pad0_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_ge_generic_event_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1210 extension : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1211 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1212 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1213 event_type : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1214 pad0 : aliased xcb_ge_generic_event_t_pad0_array; -- /usr/include/xcb/xproto.h:1215 full_sequence : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1216 end record; pragma Convention (C_Pass_By_Copy, xcb_ge_generic_event_t); -- /usr/include/xcb/xproto.h:1209 type xcb_request_error_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1226 error_code : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1227 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1228 bad_value : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1229 minor_opcode : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1230 major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1231 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1232 end record; pragma Convention (C_Pass_By_Copy, xcb_request_error_t); -- /usr/include/xcb/xproto.h:1225 type xcb_value_error_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1242 error_code : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1243 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1244 bad_value : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1245 minor_opcode : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1246 major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1247 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1248 end record; pragma Convention (C_Pass_By_Copy, xcb_value_error_t); -- /usr/include/xcb/xproto.h:1241 subtype xcb_window_error_t is xcb_value_error_t; subtype xcb_pixmap_error_t is xcb_value_error_t; subtype xcb_atom_error_t is xcb_value_error_t; subtype xcb_cursor_error_t is xcb_value_error_t; subtype xcb_font_error_t is xcb_value_error_t; subtype xcb_match_error_t is xcb_request_error_t; subtype xcb_drawable_error_t is xcb_value_error_t; subtype xcb_access_error_t is xcb_request_error_t; subtype xcb_alloc_error_t is xcb_request_error_t; subtype xcb_colormap_error_t is xcb_value_error_t; subtype xcb_g_context_error_t is xcb_value_error_t; subtype xcb_id_choice_error_t is xcb_value_error_t; subtype xcb_name_error_t is xcb_request_error_t; subtype xcb_length_error_t is xcb_request_error_t; subtype xcb_implementation_error_t is xcb_request_error_t; type xcb_window_class_t is (XCB_WINDOW_CLASS_COPY_FROM_PARENT, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCB_WINDOW_CLASS_INPUT_ONLY); pragma Convention (C, xcb_window_class_t); -- /usr/include/xcb/xproto.h:1326 subtype xcb_cw_t is unsigned; XCB_CW_BACK_PIXMAP : constant xcb_cw_t := 1; XCB_CW_BACK_PIXEL : constant xcb_cw_t := 2; XCB_CW_BORDER_PIXMAP : constant xcb_cw_t := 4; XCB_CW_BORDER_PIXEL : constant xcb_cw_t := 8; XCB_CW_BIT_GRAVITY : constant xcb_cw_t := 16; XCB_CW_WIN_GRAVITY : constant xcb_cw_t := 32; XCB_CW_BACKING_STORE : constant xcb_cw_t := 64; XCB_CW_BACKING_PLANES : constant xcb_cw_t := 128; XCB_CW_BACKING_PIXEL : constant xcb_cw_t := 256; XCB_CW_OVERRIDE_REDIRECT : constant xcb_cw_t := 512; XCB_CW_SAVE_UNDER : constant xcb_cw_t := 1024; XCB_CW_EVENT_MASK : constant xcb_cw_t := 2048; XCB_CW_DONT_PROPAGATE : constant xcb_cw_t := 4096; XCB_CW_COLORMAP : constant xcb_cw_t := 8192; XCB_CW_CURSOR : constant xcb_cw_t := 16384; -- /usr/include/xcb/xproto.h:1332 type xcb_back_pixmap_t is (XCB_BACK_PIXMAP_NONE, XCB_BACK_PIXMAP_PARENT_RELATIVE); pragma Convention (C, xcb_back_pixmap_t); -- /usr/include/xcb/xproto.h:1433 subtype xcb_gravity_t is unsigned; XCB_GRAVITY_BIT_FORGET : constant xcb_gravity_t := 0; XCB_GRAVITY_WIN_UNMAP : constant xcb_gravity_t := 0; XCB_GRAVITY_NORTH_WEST : constant xcb_gravity_t := 1; XCB_GRAVITY_NORTH : constant xcb_gravity_t := 2; XCB_GRAVITY_NORTH_EAST : constant xcb_gravity_t := 3; XCB_GRAVITY_WEST : constant xcb_gravity_t := 4; XCB_GRAVITY_CENTER : constant xcb_gravity_t := 5; XCB_GRAVITY_EAST : constant xcb_gravity_t := 6; XCB_GRAVITY_SOUTH_WEST : constant xcb_gravity_t := 7; XCB_GRAVITY_SOUTH : constant xcb_gravity_t := 8; XCB_GRAVITY_SOUTH_EAST : constant xcb_gravity_t := 9; XCB_GRAVITY_STATIC : constant xcb_gravity_t := 10; -- /usr/include/xcb/xproto.h:1438 type xcb_create_window_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1460 depth : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1461 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1462 wid : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1463 parent : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1464 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:1465 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:1466 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1467 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1468 border_width : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1469 u_class : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1470 visual : aliased xcb_visualid_t; -- /usr/include/xcb/xproto.h:1471 value_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1472 end record; pragma Convention (C_Pass_By_Copy, xcb_create_window_request_t); -- /usr/include/xcb/xproto.h:1459 type xcb_change_window_attributes_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1482 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1483 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1484 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1485 value_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1486 end record; pragma Convention (C_Pass_By_Copy, xcb_change_window_attributes_request_t); -- /usr/include/xcb/xproto.h:1481 type xcb_map_state_t is (XCB_MAP_STATE_UNMAPPED, XCB_MAP_STATE_UNVIEWABLE, XCB_MAP_STATE_VIEWABLE); pragma Convention (C, xcb_map_state_t); -- /usr/include/xcb/xproto.h:1489 type xcb_get_window_attributes_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1499 end record; pragma Convention (C_Pass_By_Copy, xcb_get_window_attributes_cookie_t); -- /usr/include/xcb/xproto.h:1498 type xcb_get_window_attributes_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1509 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1510 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1511 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1512 end record; pragma Convention (C_Pass_By_Copy, xcb_get_window_attributes_request_t); -- /usr/include/xcb/xproto.h:1508 type xcb_get_window_attributes_reply_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_get_window_attributes_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1519 backing_store : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1520 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1521 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1522 visual : aliased xcb_visualid_t; -- /usr/include/xcb/xproto.h:1523 u_class : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1524 bit_gravity : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1525 win_gravity : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1526 backing_planes : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1527 backing_pixel : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1528 save_under : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1529 map_is_installed : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1530 map_state : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1531 override_redirect : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1532 colormap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:1533 all_event_masks : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1534 your_event_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1535 do_not_propagate_mask : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1536 pad0 : aliased xcb_get_window_attributes_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:1537 end record; pragma Convention (C_Pass_By_Copy, xcb_get_window_attributes_reply_t); -- /usr/include/xcb/xproto.h:1518 type xcb_destroy_window_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1547 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1548 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1549 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1550 end record; pragma Convention (C_Pass_By_Copy, xcb_destroy_window_request_t); -- /usr/include/xcb/xproto.h:1546 type xcb_destroy_subwindows_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1560 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1561 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1562 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1563 end record; pragma Convention (C_Pass_By_Copy, xcb_destroy_subwindows_request_t); -- /usr/include/xcb/xproto.h:1559 type xcb_set_mode_t is (XCB_SET_MODE_INSERT, XCB_SET_MODE_DELETE); pragma Convention (C, xcb_set_mode_t); -- /usr/include/xcb/xproto.h:1566 type xcb_change_save_set_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1578 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1579 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1580 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1581 end record; pragma Convention (C_Pass_By_Copy, xcb_change_save_set_request_t); -- /usr/include/xcb/xproto.h:1577 type xcb_reparent_window_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1591 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1592 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1593 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1594 parent : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1595 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:1596 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:1597 end record; pragma Convention (C_Pass_By_Copy, xcb_reparent_window_request_t); -- /usr/include/xcb/xproto.h:1590 type xcb_map_window_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1607 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1608 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1609 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1610 end record; pragma Convention (C_Pass_By_Copy, xcb_map_window_request_t); -- /usr/include/xcb/xproto.h:1606 type xcb_map_subwindows_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1620 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1621 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1622 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1623 end record; pragma Convention (C_Pass_By_Copy, xcb_map_subwindows_request_t); -- /usr/include/xcb/xproto.h:1619 type xcb_unmap_window_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1633 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1634 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1635 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1636 end record; pragma Convention (C_Pass_By_Copy, xcb_unmap_window_request_t); -- /usr/include/xcb/xproto.h:1632 type xcb_unmap_subwindows_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1646 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1647 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1648 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1649 end record; pragma Convention (C_Pass_By_Copy, xcb_unmap_subwindows_request_t); -- /usr/include/xcb/xproto.h:1645 subtype xcb_config_window_t is unsigned; XCB_CONFIG_WINDOW_X : constant xcb_config_window_t := 1; XCB_CONFIG_WINDOW_Y : constant xcb_config_window_t := 2; XCB_CONFIG_WINDOW_WIDTH : constant xcb_config_window_t := 4; XCB_CONFIG_WINDOW_HEIGHT : constant xcb_config_window_t := 8; XCB_CONFIG_WINDOW_BORDER_WIDTH : constant xcb_config_window_t := 16; XCB_CONFIG_WINDOW_SIBLING : constant xcb_config_window_t := 32; XCB_CONFIG_WINDOW_STACK_MODE : constant xcb_config_window_t := 64; -- /usr/include/xcb/xproto.h:1652 type xcb_stack_mode_t is (XCB_STACK_MODE_ABOVE, XCB_STACK_MODE_BELOW, XCB_STACK_MODE_TOP_IF, XCB_STACK_MODE_BOTTOM_IF, XCB_STACK_MODE_OPPOSITE); pragma Convention (C, xcb_stack_mode_t); -- /usr/include/xcb/xproto.h:1662 type xcb_configure_window_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_configure_window_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1677 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1678 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1679 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1680 value_mask : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1681 pad1 : aliased xcb_configure_window_request_t_pad1_array; -- /usr/include/xcb/xproto.h:1682 end record; pragma Convention (C_Pass_By_Copy, xcb_configure_window_request_t); -- /usr/include/xcb/xproto.h:1676 type xcb_circulate_t is (XCB_CIRCULATE_RAISE_LOWEST, XCB_CIRCULATE_LOWER_HIGHEST); pragma Convention (C, xcb_circulate_t); -- /usr/include/xcb/xproto.h:1685 type xcb_circulate_window_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1697 direction : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1698 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1699 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1700 end record; pragma Convention (C_Pass_By_Copy, xcb_circulate_window_request_t); -- /usr/include/xcb/xproto.h:1696 type xcb_get_geometry_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1707 end record; pragma Convention (C_Pass_By_Copy, xcb_get_geometry_cookie_t); -- /usr/include/xcb/xproto.h:1706 type xcb_get_geometry_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1717 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1718 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1719 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:1720 end record; pragma Convention (C_Pass_By_Copy, xcb_get_geometry_request_t); -- /usr/include/xcb/xproto.h:1716 type xcb_get_geometry_reply_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_get_geometry_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1727 depth : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1728 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1729 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1730 root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1731 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:1732 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:1733 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1734 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1735 border_width : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1736 pad0 : aliased xcb_get_geometry_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:1737 end record; pragma Convention (C_Pass_By_Copy, xcb_get_geometry_reply_t); -- /usr/include/xcb/xproto.h:1726 type xcb_query_tree_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1744 end record; pragma Convention (C_Pass_By_Copy, xcb_query_tree_cookie_t); -- /usr/include/xcb/xproto.h:1743 type xcb_query_tree_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1754 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1755 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1756 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1757 end record; pragma Convention (C_Pass_By_Copy, xcb_query_tree_request_t); -- /usr/include/xcb/xproto.h:1753 type xcb_query_tree_reply_t_pad1_array is array (0 .. 13) of aliased Libc.Stdint.uint8_t; type xcb_query_tree_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1764 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1765 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1766 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1767 root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1768 parent : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1769 children_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1770 pad1 : aliased xcb_query_tree_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:1771 end record; pragma Convention (C_Pass_By_Copy, xcb_query_tree_reply_t); -- /usr/include/xcb/xproto.h:1763 type xcb_intern_atom_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1778 end record; pragma Convention (C_Pass_By_Copy, xcb_intern_atom_cookie_t); -- /usr/include/xcb/xproto.h:1777 type xcb_intern_atom_request_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_intern_atom_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1788 only_if_exists : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1789 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1790 name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1791 pad0 : aliased xcb_intern_atom_request_t_pad0_array; -- /usr/include/xcb/xproto.h:1792 end record; pragma Convention (C_Pass_By_Copy, xcb_intern_atom_request_t); -- /usr/include/xcb/xproto.h:1787 type xcb_intern_atom_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1799 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1800 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1801 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1802 atom : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1803 end record; pragma Convention (C_Pass_By_Copy, xcb_intern_atom_reply_t); -- /usr/include/xcb/xproto.h:1798 type xcb_get_atom_name_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1810 end record; pragma Convention (C_Pass_By_Copy, xcb_get_atom_name_cookie_t); -- /usr/include/xcb/xproto.h:1809 type xcb_get_atom_name_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1820 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1821 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1822 atom : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1823 end record; pragma Convention (C_Pass_By_Copy, xcb_get_atom_name_request_t); -- /usr/include/xcb/xproto.h:1819 type xcb_get_atom_name_reply_t_pad1_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_get_atom_name_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1830 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1831 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1832 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1833 name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1834 pad1 : aliased xcb_get_atom_name_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:1835 end record; pragma Convention (C_Pass_By_Copy, xcb_get_atom_name_reply_t); -- /usr/include/xcb/xproto.h:1829 type xcb_prop_mode_t is (XCB_PROP_MODE_REPLACE, XCB_PROP_MODE_PREPEND, XCB_PROP_MODE_APPEND); pragma Convention (C, xcb_prop_mode_t); -- /usr/include/xcb/xproto.h:1838 type xcb_change_property_request_t_pad0_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_change_property_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1861 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1862 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1863 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1864 property : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1865 c_type : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1866 format : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1867 pad0 : aliased xcb_change_property_request_t_pad0_array; -- /usr/include/xcb/xproto.h:1868 data_len : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1869 end record; pragma Convention (C_Pass_By_Copy, xcb_change_property_request_t); -- /usr/include/xcb/xproto.h:1860 type xcb_delete_property_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1879 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1880 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1881 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1882 property : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1883 end record; pragma Convention (C_Pass_By_Copy, xcb_delete_property_request_t); -- /usr/include/xcb/xproto.h:1878 type xcb_get_property_type_t is (XCB_GET_PROPERTY_TYPE_ANY); pragma Convention (C, xcb_get_property_type_t); -- /usr/include/xcb/xproto.h:1886 type xcb_get_property_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1894 end record; pragma Convention (C_Pass_By_Copy, xcb_get_property_cookie_t); -- /usr/include/xcb/xproto.h:1893 type xcb_get_property_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1904 u_delete : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1905 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1906 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1907 property : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1908 c_type : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1909 long_offset : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1910 long_length : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1911 end record; pragma Convention (C_Pass_By_Copy, xcb_get_property_request_t); -- /usr/include/xcb/xproto.h:1903 type xcb_get_property_reply_t_pad0_array is array (0 .. 11) of aliased Libc.Stdint.uint8_t; type xcb_get_property_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1918 format : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1919 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1920 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1921 c_type : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1922 bytes_after : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1923 value_len : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:1924 pad0 : aliased xcb_get_property_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:1925 end record; pragma Convention (C_Pass_By_Copy, xcb_get_property_reply_t); -- /usr/include/xcb/xproto.h:1917 type xcb_list_properties_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1932 end record; pragma Convention (C_Pass_By_Copy, xcb_list_properties_cookie_t); -- /usr/include/xcb/xproto.h:1931 type xcb_list_properties_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1942 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1943 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1944 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1945 end record; pragma Convention (C_Pass_By_Copy, xcb_list_properties_request_t); -- /usr/include/xcb/xproto.h:1941 type xcb_list_properties_reply_t_pad1_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_list_properties_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1952 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1953 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1954 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:1955 atoms_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:1956 pad1 : aliased xcb_list_properties_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:1957 end record; pragma Convention (C_Pass_By_Copy, xcb_list_properties_reply_t); -- /usr/include/xcb/xproto.h:1951 type xcb_set_selection_owner_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1967 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1968 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1969 owner : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:1970 selection : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1971 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:1972 end record; pragma Convention (C_Pass_By_Copy, xcb_set_selection_owner_request_t); -- /usr/include/xcb/xproto.h:1966 type xcb_get_selection_owner_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:1979 end record; pragma Convention (C_Pass_By_Copy, xcb_get_selection_owner_cookie_t); -- /usr/include/xcb/xproto.h:1978 type xcb_get_selection_owner_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1989 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:1990 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:1991 selection : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:1992 end record; pragma Convention (C_Pass_By_Copy, xcb_get_selection_owner_request_t); -- /usr/include/xcb/xproto.h:1988 type xcb_get_selection_owner_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:1999 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2000 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2001 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2002 owner : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2003 end record; pragma Convention (C_Pass_By_Copy, xcb_get_selection_owner_reply_t); -- /usr/include/xcb/xproto.h:1998 type xcb_convert_selection_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2013 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2014 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2015 requestor : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2016 selection : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:2017 target : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:2018 property : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:2019 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2020 end record; pragma Convention (C_Pass_By_Copy, xcb_convert_selection_request_t); -- /usr/include/xcb/xproto.h:2012 type xcb_send_event_dest_t is (XCB_SEND_EVENT_DEST_POINTER_WINDOW, XCB_SEND_EVENT_DEST_ITEM_FOCUS); pragma Convention (C, xcb_send_event_dest_t); -- /usr/include/xcb/xproto.h:2023 subtype xcb_send_event_request_t_event_array is Interfaces.C.char_array (0 .. 31); type xcb_send_event_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2035 propagate : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2036 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2037 destination : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2038 event_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:2039 event : aliased xcb_send_event_request_t_event_array; -- /usr/include/xcb/xproto.h:2040 end record; pragma Convention (C_Pass_By_Copy, xcb_send_event_request_t); -- /usr/include/xcb/xproto.h:2034 type xcb_grab_mode_t is (XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC); pragma Convention (C, xcb_grab_mode_t); -- /usr/include/xcb/xproto.h:2043 type xcb_grab_status_t is (XCB_GRAB_STATUS_SUCCESS, XCB_GRAB_STATUS_ALREADY_GRABBED, XCB_GRAB_STATUS_INVALID_TIME, XCB_GRAB_STATUS_NOT_VIEWABLE, XCB_GRAB_STATUS_FROZEN); pragma Convention (C, xcb_grab_status_t); -- /usr/include/xcb/xproto.h:2054 type xcb_cursor_enum_t is (XCB_CURSOR_NONE); pragma Convention (C, xcb_cursor_enum_t); -- /usr/include/xcb/xproto.h:2062 type xcb_grab_pointer_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2070 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_pointer_cookie_t); -- /usr/include/xcb/xproto.h:2069 type xcb_grab_pointer_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2080 owner_events : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2081 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2082 grab_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2083 event_mask : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2084 pointer_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2085 keyboard_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2086 confine_to : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2087 cursor : aliased xcb_cursor_t; -- /usr/include/xcb/xproto.h:2088 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2089 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_pointer_request_t); -- /usr/include/xcb/xproto.h:2079 type xcb_grab_pointer_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2096 status : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2097 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2098 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2099 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_pointer_reply_t); -- /usr/include/xcb/xproto.h:2095 type xcb_ungrab_pointer_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2109 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2110 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2111 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2112 end record; pragma Convention (C_Pass_By_Copy, xcb_ungrab_pointer_request_t); -- /usr/include/xcb/xproto.h:2108 type xcb_button_index_t is (XCB_BUTTON_INDEX_ANY, XCB_BUTTON_INDEX_1, XCB_BUTTON_INDEX_2, XCB_BUTTON_INDEX_3, XCB_BUTTON_INDEX_4, XCB_BUTTON_INDEX_5); pragma Convention (C, xcb_button_index_t); -- /usr/include/xcb/xproto.h:2115 type xcb_grab_button_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2143 owner_events : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2144 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2145 grab_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2146 event_mask : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2147 pointer_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2148 keyboard_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2149 confine_to : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2150 cursor : aliased xcb_cursor_t; -- /usr/include/xcb/xproto.h:2151 button : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2152 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2153 modifiers : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2154 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_button_request_t); -- /usr/include/xcb/xproto.h:2142 type xcb_ungrab_button_request_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_ungrab_button_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2164 button : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2165 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2166 grab_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2167 modifiers : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2168 pad0 : aliased xcb_ungrab_button_request_t_pad0_array; -- /usr/include/xcb/xproto.h:2169 end record; pragma Convention (C_Pass_By_Copy, xcb_ungrab_button_request_t); -- /usr/include/xcb/xproto.h:2163 type xcb_change_active_pointer_grab_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_change_active_pointer_grab_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2179 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2180 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2181 cursor : aliased xcb_cursor_t; -- /usr/include/xcb/xproto.h:2182 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2183 event_mask : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2184 pad1 : aliased xcb_change_active_pointer_grab_request_t_pad1_array; -- /usr/include/xcb/xproto.h:2185 end record; pragma Convention (C_Pass_By_Copy, xcb_change_active_pointer_grab_request_t); -- /usr/include/xcb/xproto.h:2178 type xcb_grab_keyboard_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2192 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_keyboard_cookie_t); -- /usr/include/xcb/xproto.h:2191 type xcb_grab_keyboard_request_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_grab_keyboard_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2202 owner_events : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2203 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2204 grab_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2205 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2206 pointer_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2207 keyboard_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2208 pad0 : aliased xcb_grab_keyboard_request_t_pad0_array; -- /usr/include/xcb/xproto.h:2209 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_keyboard_request_t); -- /usr/include/xcb/xproto.h:2201 type xcb_grab_keyboard_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2216 status : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2217 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2218 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2219 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_keyboard_reply_t); -- /usr/include/xcb/xproto.h:2215 type xcb_ungrab_keyboard_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2229 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2230 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2231 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2232 end record; pragma Convention (C_Pass_By_Copy, xcb_ungrab_keyboard_request_t); -- /usr/include/xcb/xproto.h:2228 type xcb_grab_t is (XCB_GRAB_ANY); pragma Convention (C, xcb_grab_t); -- /usr/include/xcb/xproto.h:2235 type xcb_grab_key_request_t_pad0_array is array (0 .. 2) of aliased Libc.Stdint.uint8_t; type xcb_grab_key_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2246 owner_events : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2247 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2248 grab_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2249 modifiers : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2250 key : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:2251 pointer_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2252 keyboard_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2253 pad0 : aliased xcb_grab_key_request_t_pad0_array; -- /usr/include/xcb/xproto.h:2254 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_key_request_t); -- /usr/include/xcb/xproto.h:2245 type xcb_ungrab_key_request_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_ungrab_key_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2264 key : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:2265 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2266 grab_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2267 modifiers : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2268 pad0 : aliased xcb_ungrab_key_request_t_pad0_array; -- /usr/include/xcb/xproto.h:2269 end record; pragma Convention (C_Pass_By_Copy, xcb_ungrab_key_request_t); -- /usr/include/xcb/xproto.h:2263 type xcb_allow_t is (XCB_ALLOW_ASYNC_POINTER, XCB_ALLOW_SYNC_POINTER, XCB_ALLOW_REPLAY_POINTER, XCB_ALLOW_ASYNC_KEYBOARD, XCB_ALLOW_SYNC_KEYBOARD, XCB_ALLOW_REPLAY_KEYBOARD, XCB_ALLOW_ASYNC_BOTH, XCB_ALLOW_SYNC_BOTH); pragma Convention (C, xcb_allow_t); -- /usr/include/xcb/xproto.h:2272 type xcb_allow_events_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2355 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2356 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2357 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2358 end record; pragma Convention (C_Pass_By_Copy, xcb_allow_events_request_t); -- /usr/include/xcb/xproto.h:2354 type xcb_grab_server_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2368 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2369 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2370 end record; pragma Convention (C_Pass_By_Copy, xcb_grab_server_request_t); -- /usr/include/xcb/xproto.h:2367 type xcb_ungrab_server_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2380 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2381 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2382 end record; pragma Convention (C_Pass_By_Copy, xcb_ungrab_server_request_t); -- /usr/include/xcb/xproto.h:2379 type xcb_query_pointer_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2389 end record; pragma Convention (C_Pass_By_Copy, xcb_query_pointer_cookie_t); -- /usr/include/xcb/xproto.h:2388 type xcb_query_pointer_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2399 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2400 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2401 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2402 end record; pragma Convention (C_Pass_By_Copy, xcb_query_pointer_request_t); -- /usr/include/xcb/xproto.h:2398 type xcb_query_pointer_reply_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_query_pointer_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2409 same_screen : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2410 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2411 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2412 root : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2413 child : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2414 root_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2415 root_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2416 win_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2417 win_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2418 mask : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2419 pad0 : aliased xcb_query_pointer_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:2420 end record; pragma Convention (C_Pass_By_Copy, xcb_query_pointer_reply_t); -- /usr/include/xcb/xproto.h:2408 type xcb_timecoord_t is record time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2427 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2428 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2429 end record; pragma Convention (C_Pass_By_Copy, xcb_timecoord_t); -- /usr/include/xcb/xproto.h:2426 type xcb_timecoord_iterator_t is record data : access xcb_timecoord_t; -- /usr/include/xcb/xproto.h:2436 c_rem : aliased int; -- /usr/include/xcb/xproto.h:2437 index : aliased int; -- /usr/include/xcb/xproto.h:2438 end record; pragma Convention (C_Pass_By_Copy, xcb_timecoord_iterator_t); -- /usr/include/xcb/xproto.h:2435 type xcb_get_motion_events_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2445 end record; pragma Convention (C_Pass_By_Copy, xcb_get_motion_events_cookie_t); -- /usr/include/xcb/xproto.h:2444 type xcb_get_motion_events_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2455 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2456 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2457 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2458 start : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2459 stop : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2460 end record; pragma Convention (C_Pass_By_Copy, xcb_get_motion_events_request_t); -- /usr/include/xcb/xproto.h:2454 type xcb_get_motion_events_reply_t_pad1_array is array (0 .. 19) of aliased Libc.Stdint.uint8_t; type xcb_get_motion_events_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2467 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2468 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2469 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2470 events_len : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:2471 pad1 : aliased xcb_get_motion_events_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:2472 end record; pragma Convention (C_Pass_By_Copy, xcb_get_motion_events_reply_t); -- /usr/include/xcb/xproto.h:2466 type xcb_translate_coordinates_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2479 end record; pragma Convention (C_Pass_By_Copy, xcb_translate_coordinates_cookie_t); -- /usr/include/xcb/xproto.h:2478 type xcb_translate_coordinates_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2489 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2490 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2491 src_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2492 dst_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2493 src_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2494 src_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2495 end record; pragma Convention (C_Pass_By_Copy, xcb_translate_coordinates_request_t); -- /usr/include/xcb/xproto.h:2488 type xcb_translate_coordinates_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2502 same_screen : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2503 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2504 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2505 child : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2506 dst_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2507 dst_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2508 end record; pragma Convention (C_Pass_By_Copy, xcb_translate_coordinates_reply_t); -- /usr/include/xcb/xproto.h:2501 type xcb_warp_pointer_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2518 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2519 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2520 src_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2521 dst_window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2522 src_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2523 src_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2524 src_width : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2525 src_height : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2526 dst_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2527 dst_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2528 end record; pragma Convention (C_Pass_By_Copy, xcb_warp_pointer_request_t); -- /usr/include/xcb/xproto.h:2517 type xcb_input_focus_t is (XCB_INPUT_FOCUS_NONE, XCB_INPUT_FOCUS_POINTER_ROOT, XCB_INPUT_FOCUS_PARENT, XCB_INPUT_FOCUS_FOLLOW_KEYBOARD); pragma Convention (C, xcb_input_focus_t); -- /usr/include/xcb/xproto.h:2531 type xcb_set_input_focus_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2556 revert_to : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2557 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2558 focus : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2559 time : aliased xcb_timestamp_t; -- /usr/include/xcb/xproto.h:2560 end record; pragma Convention (C_Pass_By_Copy, xcb_set_input_focus_request_t); -- /usr/include/xcb/xproto.h:2555 type xcb_get_input_focus_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2567 end record; pragma Convention (C_Pass_By_Copy, xcb_get_input_focus_cookie_t); -- /usr/include/xcb/xproto.h:2566 type xcb_get_input_focus_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2577 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2578 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2579 end record; pragma Convention (C_Pass_By_Copy, xcb_get_input_focus_request_t); -- /usr/include/xcb/xproto.h:2576 type xcb_get_input_focus_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2586 revert_to : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2587 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2588 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2589 focus : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:2590 end record; pragma Convention (C_Pass_By_Copy, xcb_get_input_focus_reply_t); -- /usr/include/xcb/xproto.h:2585 type xcb_query_keymap_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2597 end record; pragma Convention (C_Pass_By_Copy, xcb_query_keymap_cookie_t); -- /usr/include/xcb/xproto.h:2596 type xcb_query_keymap_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2607 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2608 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2609 end record; pragma Convention (C_Pass_By_Copy, xcb_query_keymap_request_t); -- /usr/include/xcb/xproto.h:2606 type xcb_query_keymap_reply_t_keys_array is array (0 .. 31) of aliased Libc.Stdint.uint8_t; type xcb_query_keymap_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2616 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2617 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2618 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2619 keys : aliased xcb_query_keymap_reply_t_keys_array; -- /usr/include/xcb/xproto.h:2620 end record; pragma Convention (C_Pass_By_Copy, xcb_query_keymap_reply_t); -- /usr/include/xcb/xproto.h:2615 type xcb_open_font_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_open_font_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2630 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2631 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2632 fid : aliased xcb_font_t; -- /usr/include/xcb/xproto.h:2633 name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2634 pad1 : aliased xcb_open_font_request_t_pad1_array; -- /usr/include/xcb/xproto.h:2635 end record; pragma Convention (C_Pass_By_Copy, xcb_open_font_request_t); -- /usr/include/xcb/xproto.h:2629 type xcb_close_font_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2645 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2646 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2647 font : aliased xcb_font_t; -- /usr/include/xcb/xproto.h:2648 end record; pragma Convention (C_Pass_By_Copy, xcb_close_font_request_t); -- /usr/include/xcb/xproto.h:2644 type xcb_font_draw_t is (XCB_FONT_DRAW_LEFT_TO_RIGHT, XCB_FONT_DRAW_RIGHT_TO_LEFT); pragma Convention (C, xcb_font_draw_t); -- /usr/include/xcb/xproto.h:2651 type xcb_fontprop_t is record name : aliased xcb_atom_t; -- /usr/include/xcb/xproto.h:2660 value : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2661 end record; pragma Convention (C_Pass_By_Copy, xcb_fontprop_t); -- /usr/include/xcb/xproto.h:2659 type xcb_fontprop_iterator_t is record data : access xcb_fontprop_t; -- /usr/include/xcb/xproto.h:2668 c_rem : aliased int; -- /usr/include/xcb/xproto.h:2669 index : aliased int; -- /usr/include/xcb/xproto.h:2670 end record; pragma Convention (C_Pass_By_Copy, xcb_fontprop_iterator_t); -- /usr/include/xcb/xproto.h:2667 type xcb_charinfo_t is record left_side_bearing : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2677 right_side_bearing : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2678 character_width : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2679 ascent : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2680 descent : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:2681 attributes : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2682 end record; pragma Convention (C_Pass_By_Copy, xcb_charinfo_t); -- /usr/include/xcb/xproto.h:2676 type xcb_charinfo_iterator_t is record data : access xcb_charinfo_t; -- /usr/include/xcb/xproto.h:2689 c_rem : aliased int; -- /usr/include/xcb/xproto.h:2690 index : aliased int; -- /usr/include/xcb/xproto.h:2691 end record; pragma Convention (C_Pass_By_Copy, xcb_charinfo_iterator_t); -- /usr/include/xcb/xproto.h:2688 type xcb_query_font_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2698 end record; pragma Convention (C_Pass_By_Copy, xcb_query_font_cookie_t); -- /usr/include/xcb/xproto.h:2697 type xcb_query_font_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2708 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2709 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2710 font : aliased xcb_fontable_t; -- /usr/include/xcb/xproto.h:2711 end record; pragma Convention (C_Pass_By_Copy, xcb_query_font_request_t); -- /usr/include/xcb/xproto.h:2707 type xcb_query_font_reply_t_pad1_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_query_font_reply_t_pad2_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_query_font_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2718 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2719 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2720 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2721 min_bounds : aliased xcb_charinfo_t; -- /usr/include/xcb/xproto.h:2722 pad1 : aliased xcb_query_font_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:2723 max_bounds : aliased xcb_charinfo_t; -- /usr/include/xcb/xproto.h:2724 pad2 : aliased xcb_query_font_reply_t_pad2_array; -- /usr/include/xcb/xproto.h:2725 min_char_or_byte2 : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2726 max_char_or_byte2 : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2727 default_char : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2728 properties_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2729 draw_direction : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2730 min_byte1 : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2731 max_byte1 : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2732 all_chars_exist : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2733 font_ascent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2734 font_descent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2735 char_infos_len : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:2736 end record; pragma Convention (C_Pass_By_Copy, xcb_query_font_reply_t); -- /usr/include/xcb/xproto.h:2717 type xcb_query_text_extents_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2743 end record; pragma Convention (C_Pass_By_Copy, xcb_query_text_extents_cookie_t); -- /usr/include/xcb/xproto.h:2742 type xcb_query_text_extents_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2753 odd_length : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2754 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2755 font : aliased xcb_fontable_t; -- /usr/include/xcb/xproto.h:2756 end record; pragma Convention (C_Pass_By_Copy, xcb_query_text_extents_request_t); -- /usr/include/xcb/xproto.h:2752 type xcb_query_text_extents_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2763 draw_direction : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2764 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2765 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2766 font_ascent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2767 font_descent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2768 overall_ascent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2769 overall_descent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2770 overall_width : aliased Libc.Stdint .int32_t; -- /usr/include/xcb/xproto.h:2771 overall_left : aliased Libc.Stdint .int32_t; -- /usr/include/xcb/xproto.h:2772 overall_right : aliased Libc.Stdint .int32_t; -- /usr/include/xcb/xproto.h:2773 end record; pragma Convention (C_Pass_By_Copy, xcb_query_text_extents_reply_t); -- /usr/include/xcb/xproto.h:2762 type xcb_str_t is record name_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2780 end record; pragma Convention (C_Pass_By_Copy, xcb_str_t); -- /usr/include/xcb/xproto.h:2779 type xcb_str_iterator_t is record data : access xcb_str_t; -- /usr/include/xcb/xproto.h:2787 c_rem : aliased int; -- /usr/include/xcb/xproto.h:2788 index : aliased int; -- /usr/include/xcb/xproto.h:2789 end record; pragma Convention (C_Pass_By_Copy, xcb_str_iterator_t); -- /usr/include/xcb/xproto.h:2786 type xcb_list_fonts_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2796 end record; pragma Convention (C_Pass_By_Copy, xcb_list_fonts_cookie_t); -- /usr/include/xcb/xproto.h:2795 type xcb_list_fonts_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2806 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2807 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2808 max_names : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2809 pattern_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2810 end record; pragma Convention (C_Pass_By_Copy, xcb_list_fonts_request_t); -- /usr/include/xcb/xproto.h:2805 type xcb_list_fonts_reply_t_pad1_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_list_fonts_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2817 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2818 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2819 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2820 names_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2821 pad1 : aliased xcb_list_fonts_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:2822 end record; pragma Convention (C_Pass_By_Copy, xcb_list_fonts_reply_t); -- /usr/include/xcb/xproto.h:2816 type xcb_list_fonts_with_info_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2829 end record; pragma Convention (C_Pass_By_Copy, xcb_list_fonts_with_info_cookie_t); -- /usr/include/xcb/xproto.h:2828 type xcb_list_fonts_with_info_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2839 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2840 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2841 max_names : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2842 pattern_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2843 end record; pragma Convention (C_Pass_By_Copy, xcb_list_fonts_with_info_request_t); -- /usr/include/xcb/xproto.h:2838 type xcb_list_fonts_with_info_reply_t_pad0_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_list_fonts_with_info_reply_t_pad1_array is array (0 .. 3) of aliased Libc.Stdint.uint8_t; type xcb_list_fonts_with_info_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2850 name_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2851 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2852 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2853 min_bounds : aliased xcb_charinfo_t; -- /usr/include/xcb/xproto.h:2854 pad0 : aliased xcb_list_fonts_with_info_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:2855 max_bounds : aliased xcb_charinfo_t; -- /usr/include/xcb/xproto.h:2856 pad1 : aliased xcb_list_fonts_with_info_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:2857 min_char_or_byte2 : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2858 max_char_or_byte2 : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2859 default_char : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2860 properties_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2861 draw_direction : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2862 min_byte1 : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2863 max_byte1 : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2864 all_chars_exist : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2865 font_ascent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2866 font_descent : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:2867 replies_hint : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:2868 end record; pragma Convention (C_Pass_By_Copy, xcb_list_fonts_with_info_reply_t); -- /usr/include/xcb/xproto.h:2849 type xcb_set_font_path_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_set_font_path_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2878 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2879 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2880 font_qty : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2881 pad1 : aliased xcb_set_font_path_request_t_pad1_array; -- /usr/include/xcb/xproto.h:2882 end record; pragma Convention (C_Pass_By_Copy, xcb_set_font_path_request_t); -- /usr/include/xcb/xproto.h:2877 type xcb_get_font_path_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:2889 end record; pragma Convention (C_Pass_By_Copy, xcb_get_font_path_cookie_t); -- /usr/include/xcb/xproto.h:2888 type xcb_get_font_path_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2899 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2900 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2901 end record; pragma Convention (C_Pass_By_Copy, xcb_get_font_path_request_t); -- /usr/include/xcb/xproto.h:2898 type xcb_get_font_path_reply_t_pad1_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_get_font_path_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2908 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2909 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2910 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:2911 path_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:2912 pad1 : aliased xcb_get_font_path_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:2913 end record; pragma Convention (C_Pass_By_Copy, xcb_get_font_path_reply_t); -- /usr/include/xcb/xproto.h:2907 type xcb_create_pixmap_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2923 depth : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2924 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2925 pid : aliased xcb_pixmap_t; -- /usr/include/xcb/xproto.h:2926 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:2927 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2928 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2929 end record; pragma Convention (C_Pass_By_Copy, xcb_create_pixmap_request_t); -- /usr/include/xcb/xproto.h:2922 type xcb_free_pixmap_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:2939 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:2940 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:2941 pixmap : aliased xcb_pixmap_t; -- /usr/include/xcb/xproto.h:2942 end record; pragma Convention (C_Pass_By_Copy, xcb_free_pixmap_request_t); -- /usr/include/xcb/xproto.h:2938 subtype xcb_gc_t is unsigned; XCB_GC_FUNCTION : constant xcb_gc_t := 1; XCB_GC_PLANE_MASK : constant xcb_gc_t := 2; XCB_GC_FOREGROUND : constant xcb_gc_t := 4; XCB_GC_BACKGROUND : constant xcb_gc_t := 8; XCB_GC_LINE_WIDTH : constant xcb_gc_t := 16; XCB_GC_LINE_STYLE : constant xcb_gc_t := 32; XCB_GC_CAP_STYLE : constant xcb_gc_t := 64; XCB_GC_JOIN_STYLE : constant xcb_gc_t := 128; XCB_GC_FILL_STYLE : constant xcb_gc_t := 256; XCB_GC_FILL_RULE : constant xcb_gc_t := 512; XCB_GC_TILE : constant xcb_gc_t := 1024; XCB_GC_STIPPLE : constant xcb_gc_t := 2048; XCB_GC_TILE_STIPPLE_ORIGIN_X : constant xcb_gc_t := 4096; XCB_GC_TILE_STIPPLE_ORIGIN_Y : constant xcb_gc_t := 8192; XCB_GC_FONT : constant xcb_gc_t := 16384; XCB_GC_SUBWINDOW_MODE : constant xcb_gc_t := 32768; XCB_GC_GRAPHICS_EXPOSURES : constant xcb_gc_t := 65536; XCB_GC_CLIP_ORIGIN_X : constant xcb_gc_t := 131072; XCB_GC_CLIP_ORIGIN_Y : constant xcb_gc_t := 262144; XCB_GC_CLIP_MASK : constant xcb_gc_t := 524288; XCB_GC_DASH_OFFSET : constant xcb_gc_t := 1048576; XCB_GC_DASH_LIST : constant xcb_gc_t := 2097152; XCB_GC_ARC_MODE : constant xcb_gc_t := 4194304; -- /usr/include/xcb/xproto.h:2945 type xcb_gx_t is (XCB_GX_CLEAR, XCB_GX_AND, XCB_GX_AND_REVERSE, XCB_GX_COPY, XCB_GX_AND_INVERTED, XCB_GX_NOOP, XCB_GX_XOR, XCB_GX_OR, XCB_GX_NOR, XCB_GX_EQUIV, XCB_GX_INVERT, XCB_GX_OR_REVERSE, XCB_GX_COPY_INVERTED, XCB_GX_OR_INVERTED, XCB_GX_NAND, XCB_GX_SET); pragma Convention (C, xcb_gx_t); -- /usr/include/xcb/xproto.h:3094 type xcb_line_style_t is (XCB_LINE_STYLE_SOLID, XCB_LINE_STYLE_ON_OFF_DASH, XCB_LINE_STYLE_DOUBLE_DASH); pragma Convention (C, xcb_line_style_t); -- /usr/include/xcb/xproto.h:3113 type xcb_cap_style_t is (XCB_CAP_STYLE_NOT_LAST, XCB_CAP_STYLE_BUTT, XCB_CAP_STYLE_ROUND, XCB_CAP_STYLE_PROJECTING); pragma Convention (C, xcb_cap_style_t); -- /usr/include/xcb/xproto.h:3119 type xcb_join_style_t is (XCB_JOIN_STYLE_MITER, XCB_JOIN_STYLE_ROUND, XCB_JOIN_STYLE_BEVEL); pragma Convention (C, xcb_join_style_t); -- /usr/include/xcb/xproto.h:3126 type xcb_fill_style_t is (XCB_FILL_STYLE_SOLID, XCB_FILL_STYLE_TILED, XCB_FILL_STYLE_STIPPLED, XCB_FILL_STYLE_OPAQUE_STIPPLED); pragma Convention (C, xcb_fill_style_t); -- /usr/include/xcb/xproto.h:3132 type xcb_fill_rule_t is (XCB_FILL_RULE_EVEN_ODD, XCB_FILL_RULE_WINDING); pragma Convention (C, xcb_fill_rule_t); -- /usr/include/xcb/xproto.h:3139 type xcb_subwindow_mode_t is (XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN, XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS); pragma Convention (C, xcb_subwindow_mode_t); -- /usr/include/xcb/xproto.h:3144 type xcb_arc_mode_t is (XCB_ARC_MODE_CHORD, XCB_ARC_MODE_PIE_SLICE); pragma Convention (C, xcb_arc_mode_t); -- /usr/include/xcb/xproto.h:3149 type xcb_create_gc_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3161 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3162 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3163 cid : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3164 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3165 value_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3166 end record; pragma Convention (C_Pass_By_Copy, xcb_create_gc_request_t); -- /usr/include/xcb/xproto.h:3160 type xcb_change_gc_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3176 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3177 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3178 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3179 value_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3180 end record; pragma Convention (C_Pass_By_Copy, xcb_change_gc_request_t); -- /usr/include/xcb/xproto.h:3175 type xcb_copy_gc_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3190 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3191 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3192 src_gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3193 dst_gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3194 value_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3195 end record; pragma Convention (C_Pass_By_Copy, xcb_copy_gc_request_t); -- /usr/include/xcb/xproto.h:3189 type xcb_set_dashes_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3205 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3206 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3207 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3208 dash_offset : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3209 dashes_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3210 end record; pragma Convention (C_Pass_By_Copy, xcb_set_dashes_request_t); -- /usr/include/xcb/xproto.h:3204 type xcb_clip_ordering_t is (XCB_CLIP_ORDERING_UNSORTED, XCB_CLIP_ORDERING_Y_SORTED, XCB_CLIP_ORDERING_YX_SORTED, XCB_CLIP_ORDERING_YX_BANDED); pragma Convention (C, xcb_clip_ordering_t); -- /usr/include/xcb/xproto.h:3213 type xcb_set_clip_rectangles_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3227 ordering : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3228 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3229 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3230 clip_x_origin : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:3231 clip_y_origin : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:3232 end record; pragma Convention (C_Pass_By_Copy, xcb_set_clip_rectangles_request_t); -- /usr/include/xcb/xproto.h:3226 type xcb_free_gc_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3242 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3243 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3244 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3245 end record; pragma Convention (C_Pass_By_Copy, xcb_free_gc_request_t); -- /usr/include/xcb/xproto.h:3241 type xcb_clear_area_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3255 exposures : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3256 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3257 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:3258 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3259 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3260 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3261 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3262 end record; pragma Convention (C_Pass_By_Copy, xcb_clear_area_request_t); -- /usr/include/xcb/xproto.h:3254 type xcb_copy_area_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3272 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3273 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3274 src_drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3275 dst_drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3276 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3277 src_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3278 src_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3279 dst_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3280 dst_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3281 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3282 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3283 end record; pragma Convention (C_Pass_By_Copy, xcb_copy_area_request_t); -- /usr/include/xcb/xproto.h:3271 type xcb_copy_plane_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3293 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3294 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3295 src_drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3296 dst_drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3297 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3298 src_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3299 src_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3300 dst_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3301 dst_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3302 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3303 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3304 bit_plane : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3305 end record; pragma Convention (C_Pass_By_Copy, xcb_copy_plane_request_t); -- /usr/include/xcb/xproto.h:3292 type xcb_coord_mode_t is (XCB_COORD_MODE_ORIGIN, XCB_COORD_MODE_PREVIOUS); pragma Convention (C, xcb_coord_mode_t); -- /usr/include/xcb/xproto.h:3308 type xcb_poly_point_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3324 coordinate_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3325 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3326 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3327 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3328 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_point_request_t); -- /usr/include/xcb/xproto.h:3323 type xcb_poly_line_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3338 coordinate_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3339 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3340 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3341 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3342 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_line_request_t); -- /usr/include/xcb/xproto.h:3337 type xcb_segment_t is record x1 : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3349 y1 : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3350 x2 : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3351 y2 : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3352 end record; pragma Convention (C_Pass_By_Copy, xcb_segment_t); -- /usr/include/xcb/xproto.h:3348 type xcb_segment_iterator_t is record data : access xcb_segment_t; -- /usr/include/xcb/xproto.h:3359 c_rem : aliased int; -- /usr/include/xcb/xproto.h:3360 index : aliased int; -- /usr/include/xcb/xproto.h:3361 end record; pragma Convention (C_Pass_By_Copy, xcb_segment_iterator_t); -- /usr/include/xcb/xproto.h:3358 type xcb_poly_segment_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3371 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3372 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3373 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3374 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3375 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_segment_request_t); -- /usr/include/xcb/xproto.h:3370 type xcb_poly_rectangle_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3385 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3386 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3387 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3388 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3389 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_rectangle_request_t); -- /usr/include/xcb/xproto.h:3384 type xcb_poly_arc_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3399 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3400 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3401 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3402 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3403 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_arc_request_t); -- /usr/include/xcb/xproto.h:3398 type xcb_poly_shape_t is (XCB_POLY_SHAPE_COMPLEX, XCB_POLY_SHAPE_NONCONVEX, XCB_POLY_SHAPE_CONVEX); pragma Convention (C, xcb_poly_shape_t); -- /usr/include/xcb/xproto.h:3406 type xcb_fill_poly_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_fill_poly_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3419 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3420 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3421 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3422 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3423 shape : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3424 coordinate_mode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3425 pad1 : aliased xcb_fill_poly_request_t_pad1_array; -- /usr/include/xcb/xproto.h:3426 end record; pragma Convention (C_Pass_By_Copy, xcb_fill_poly_request_t); -- /usr/include/xcb/xproto.h:3418 type xcb_poly_fill_rectangle_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3436 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3437 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3438 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3439 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3440 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_fill_rectangle_request_t); -- /usr/include/xcb/xproto.h:3435 type xcb_poly_fill_arc_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3450 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3451 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3452 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3453 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3454 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_fill_arc_request_t); -- /usr/include/xcb/xproto.h:3449 type xcb_image_format_t is (XCB_IMAGE_FORMAT_XY_BITMAP, XCB_IMAGE_FORMAT_XY_PIXMAP, XCB_IMAGE_FORMAT_Z_PIXMAP); pragma Convention (C, xcb_image_format_t); -- /usr/include/xcb/xproto.h:3457 type xcb_put_image_request_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_put_image_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3470 format : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3471 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3472 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3473 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3474 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3475 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3476 dst_x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3477 dst_y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3478 left_pad : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3479 depth : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3480 pad0 : aliased xcb_put_image_request_t_pad0_array; -- /usr/include/xcb/xproto.h:3481 end record; pragma Convention (C_Pass_By_Copy, xcb_put_image_request_t); -- /usr/include/xcb/xproto.h:3469 type xcb_get_image_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3488 end record; pragma Convention (C_Pass_By_Copy, xcb_get_image_cookie_t); -- /usr/include/xcb/xproto.h:3487 type xcb_get_image_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3498 format : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3499 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3500 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3501 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3502 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3503 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3504 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3505 plane_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3506 end record; pragma Convention (C_Pass_By_Copy, xcb_get_image_request_t); -- /usr/include/xcb/xproto.h:3497 type xcb_get_image_reply_t_pad0_array is array (0 .. 19) of aliased Libc.Stdint.uint8_t; type xcb_get_image_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3513 depth : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3514 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3515 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3516 visual : aliased xcb_visualid_t; -- /usr/include/xcb/xproto.h:3517 pad0 : aliased xcb_get_image_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:3518 end record; pragma Convention (C_Pass_By_Copy, xcb_get_image_reply_t); -- /usr/include/xcb/xproto.h:3512 type xcb_poly_text_8_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3528 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3529 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3530 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3531 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3532 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3533 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3534 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_text_8_request_t); -- /usr/include/xcb/xproto.h:3527 type xcb_poly_text_16_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3544 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3545 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3546 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3547 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3548 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3549 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3550 end record; pragma Convention (C_Pass_By_Copy, xcb_poly_text_16_request_t); -- /usr/include/xcb/xproto.h:3543 type xcb_image_text_8_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3560 string_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3561 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3562 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3563 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3564 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3565 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3566 end record; pragma Convention (C_Pass_By_Copy, xcb_image_text_8_request_t); -- /usr/include/xcb/xproto.h:3559 type xcb_image_text_16_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3576 string_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3577 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3578 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:3579 gc : aliased xcb_gcontext_t; -- /usr/include/xcb/xproto.h:3580 x : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3581 y : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:3582 end record; pragma Convention (C_Pass_By_Copy, xcb_image_text_16_request_t); -- /usr/include/xcb/xproto.h:3575 type xcb_colormap_alloc_t is (XCB_COLORMAP_ALLOC_NONE, XCB_COLORMAP_ALLOC_ALL); pragma Convention (C, xcb_colormap_alloc_t); -- /usr/include/xcb/xproto.h:3585 type xcb_create_colormap_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3597 alloc : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3598 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3599 mid : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3600 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:3601 visual : aliased xcb_visualid_t; -- /usr/include/xcb/xproto.h:3602 end record; pragma Convention (C_Pass_By_Copy, xcb_create_colormap_request_t); -- /usr/include/xcb/xproto.h:3596 type xcb_free_colormap_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3612 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3613 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3614 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3615 end record; pragma Convention (C_Pass_By_Copy, xcb_free_colormap_request_t); -- /usr/include/xcb/xproto.h:3611 type xcb_copy_colormap_and_free_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3625 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3626 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3627 mid : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3628 src_cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3629 end record; pragma Convention (C_Pass_By_Copy, xcb_copy_colormap_and_free_request_t); -- /usr/include/xcb/xproto.h:3624 type xcb_install_colormap_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3639 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3640 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3641 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3642 end record; pragma Convention (C_Pass_By_Copy, xcb_install_colormap_request_t); -- /usr/include/xcb/xproto.h:3638 type xcb_uninstall_colormap_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3652 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3653 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3654 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3655 end record; pragma Convention (C_Pass_By_Copy, xcb_uninstall_colormap_request_t); -- /usr/include/xcb/xproto.h:3651 type xcb_list_installed_colormaps_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3662 end record; pragma Convention (C_Pass_By_Copy, xcb_list_installed_colormaps_cookie_t); -- /usr/include/xcb/xproto.h:3661 type xcb_list_installed_colormaps_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3672 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3673 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3674 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:3675 end record; pragma Convention (C_Pass_By_Copy, xcb_list_installed_colormaps_request_t); -- /usr/include/xcb/xproto.h:3671 type xcb_list_installed_colormaps_reply_t_pad1_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_list_installed_colormaps_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3682 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3683 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3684 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3685 cmaps_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3686 pad1 : aliased xcb_list_installed_colormaps_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:3687 end record; pragma Convention (C_Pass_By_Copy, xcb_list_installed_colormaps_reply_t); -- /usr/include/xcb/xproto.h:3681 type xcb_alloc_color_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3694 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_cookie_t); -- /usr/include/xcb/xproto.h:3693 type xcb_alloc_color_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_alloc_color_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3704 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3705 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3706 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3707 red : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3708 green : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3709 blue : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3710 pad1 : aliased xcb_alloc_color_request_t_pad1_array; -- /usr/include/xcb/xproto.h:3711 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_request_t); -- /usr/include/xcb/xproto.h:3703 type xcb_alloc_color_reply_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_alloc_color_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3718 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3719 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3720 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3721 red : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3722 green : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3723 blue : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3724 pad1 : aliased xcb_alloc_color_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:3725 pixel : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3726 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_reply_t); -- /usr/include/xcb/xproto.h:3717 type xcb_alloc_named_color_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3733 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_named_color_cookie_t); -- /usr/include/xcb/xproto.h:3732 type xcb_alloc_named_color_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_alloc_named_color_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3743 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3744 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3745 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3746 name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3747 pad1 : aliased xcb_alloc_named_color_request_t_pad1_array; -- /usr/include/xcb/xproto.h:3748 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_named_color_request_t); -- /usr/include/xcb/xproto.h:3742 type xcb_alloc_named_color_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3755 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3756 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3757 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3758 pixel : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3759 exact_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3760 exact_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3761 exact_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3762 visual_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3763 visual_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3764 visual_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3765 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_named_color_reply_t); -- /usr/include/xcb/xproto.h:3754 type xcb_alloc_color_cells_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3772 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_cells_cookie_t); -- /usr/include/xcb/xproto.h:3771 type xcb_alloc_color_cells_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3782 contiguous : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3783 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3784 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3785 colors : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3786 planes : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3787 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_cells_request_t); -- /usr/include/xcb/xproto.h:3781 type xcb_alloc_color_cells_reply_t_pad1_array is array (0 .. 19) of aliased Libc.Stdint.uint8_t; type xcb_alloc_color_cells_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3794 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3795 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3796 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3797 pixels_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3798 masks_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3799 pad1 : aliased xcb_alloc_color_cells_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:3800 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_cells_reply_t); -- /usr/include/xcb/xproto.h:3793 type xcb_alloc_color_planes_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3807 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_planes_cookie_t); -- /usr/include/xcb/xproto.h:3806 type xcb_alloc_color_planes_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3817 contiguous : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3818 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3819 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3820 colors : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3821 reds : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3822 greens : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3823 blues : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3824 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_planes_request_t); -- /usr/include/xcb/xproto.h:3816 type xcb_alloc_color_planes_reply_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_alloc_color_planes_reply_t_pad2_array is array (0 .. 7) of aliased Libc.Stdint.uint8_t; type xcb_alloc_color_planes_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3831 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3832 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3833 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3834 pixels_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3835 pad1 : aliased xcb_alloc_color_planes_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:3836 red_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3837 green_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3838 blue_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3839 pad2 : aliased xcb_alloc_color_planes_reply_t_pad2_array; -- /usr/include/xcb/xproto.h:3840 end record; pragma Convention (C_Pass_By_Copy, xcb_alloc_color_planes_reply_t); -- /usr/include/xcb/xproto.h:3830 type xcb_free_colors_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3850 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3851 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3852 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3853 plane_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:3854 end record; pragma Convention (C_Pass_By_Copy, xcb_free_colors_request_t); -- /usr/include/xcb/xproto.h:3849 subtype xcb_color_flag_t is unsigned; XCB_COLOR_FLAG_RED : constant xcb_color_flag_t := 1; XCB_COLOR_FLAG_GREEN : constant xcb_color_flag_t := 2; XCB_COLOR_FLAG_BLUE : constant xcb_color_flag_t := 4; -- /usr/include/xcb/xproto.h:3857 type xcb_coloritem_t is record pixel : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3867 red : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3868 green : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3869 blue : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3870 flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3871 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3872 end record; pragma Convention (C_Pass_By_Copy, xcb_coloritem_t); -- /usr/include/xcb/xproto.h:3866 type xcb_coloritem_iterator_t is record data : access xcb_coloritem_t; -- /usr/include/xcb/xproto.h:3879 c_rem : aliased int; -- /usr/include/xcb/xproto.h:3880 index : aliased int; -- /usr/include/xcb/xproto.h:3881 end record; pragma Convention (C_Pass_By_Copy, xcb_coloritem_iterator_t); -- /usr/include/xcb/xproto.h:3878 type xcb_store_colors_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3891 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3892 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3893 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3894 end record; pragma Convention (C_Pass_By_Copy, xcb_store_colors_request_t); -- /usr/include/xcb/xproto.h:3890 type xcb_store_named_color_request_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_store_named_color_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3904 flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3905 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3906 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3907 pixel : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3908 name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3909 pad0 : aliased xcb_store_named_color_request_t_pad0_array; -- /usr/include/xcb/xproto.h:3910 end record; pragma Convention (C_Pass_By_Copy, xcb_store_named_color_request_t); -- /usr/include/xcb/xproto.h:3903 type xcb_rgb_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_rgb_t is record red : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3917 green : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3918 blue : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3919 pad0 : aliased xcb_rgb_t_pad0_array; -- /usr/include/xcb/xproto.h:3920 end record; pragma Convention (C_Pass_By_Copy, xcb_rgb_t); -- /usr/include/xcb/xproto.h:3916 type xcb_rgb_iterator_t is record data : access xcb_rgb_t; -- /usr/include/xcb/xproto.h:3927 c_rem : aliased int; -- /usr/include/xcb/xproto.h:3928 index : aliased int; -- /usr/include/xcb/xproto.h:3929 end record; pragma Convention (C_Pass_By_Copy, xcb_rgb_iterator_t); -- /usr/include/xcb/xproto.h:3926 type xcb_query_colors_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3936 end record; pragma Convention (C_Pass_By_Copy, xcb_query_colors_cookie_t); -- /usr/include/xcb/xproto.h:3935 type xcb_query_colors_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3946 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3947 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3948 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3949 end record; pragma Convention (C_Pass_By_Copy, xcb_query_colors_request_t); -- /usr/include/xcb/xproto.h:3945 type xcb_query_colors_reply_t_pad1_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_query_colors_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3956 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3957 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3958 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3959 colors_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3960 pad1 : aliased xcb_query_colors_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:3961 end record; pragma Convention (C_Pass_By_Copy, xcb_query_colors_reply_t); -- /usr/include/xcb/xproto.h:3955 type xcb_lookup_color_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:3968 end record; pragma Convention (C_Pass_By_Copy, xcb_lookup_color_cookie_t); -- /usr/include/xcb/xproto.h:3967 type xcb_lookup_color_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_lookup_color_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3978 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3979 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:3980 cmap : aliased xcb_colormap_t; -- /usr/include/xcb/xproto.h:3981 name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3982 pad1 : aliased xcb_lookup_color_request_t_pad1_array; -- /usr/include/xcb/xproto.h:3983 end record; pragma Convention (C_Pass_By_Copy, xcb_lookup_color_request_t); -- /usr/include/xcb/xproto.h:3977 type xcb_lookup_color_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:3990 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:3991 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3992 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:3993 exact_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3994 exact_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3995 exact_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3996 visual_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3997 visual_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3998 visual_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:3999 end record; pragma Convention (C_Pass_By_Copy, xcb_lookup_color_reply_t); -- /usr/include/xcb/xproto.h:3989 type xcb_pixmap_enum_t is (XCB_PIXMAP_NONE); pragma Convention (C, xcb_pixmap_enum_t); -- /usr/include/xcb/xproto.h:4002 type xcb_create_cursor_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4013 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4014 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4015 cid : aliased xcb_cursor_t; -- /usr/include/xcb/xproto.h:4016 source : aliased xcb_pixmap_t; -- /usr/include/xcb/xproto.h:4017 mask : aliased xcb_pixmap_t; -- /usr/include/xcb/xproto.h:4018 fore_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4019 fore_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4020 fore_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4021 back_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4022 back_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4023 back_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4024 x : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4025 y : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4026 end record; pragma Convention (C_Pass_By_Copy, xcb_create_cursor_request_t); -- /usr/include/xcb/xproto.h:4012 type xcb_font_enum_t is (XCB_FONT_NONE); pragma Convention (C, xcb_font_enum_t); -- /usr/include/xcb/xproto.h:4029 type xcb_create_glyph_cursor_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4040 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4041 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4042 cid : aliased xcb_cursor_t; -- /usr/include/xcb/xproto.h:4043 source_font : aliased xcb_font_t; -- /usr/include/xcb/xproto.h:4044 mask_font : aliased xcb_font_t; -- /usr/include/xcb/xproto.h:4045 source_char : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4046 mask_char : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4047 fore_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4048 fore_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4049 fore_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4050 back_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4051 back_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4052 back_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4053 end record; pragma Convention (C_Pass_By_Copy, xcb_create_glyph_cursor_request_t); -- /usr/include/xcb/xproto.h:4039 type xcb_free_cursor_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4063 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4064 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4065 cursor : aliased xcb_cursor_t; -- /usr/include/xcb/xproto.h:4066 end record; pragma Convention (C_Pass_By_Copy, xcb_free_cursor_request_t); -- /usr/include/xcb/xproto.h:4062 type xcb_recolor_cursor_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4076 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4077 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4078 cursor : aliased xcb_cursor_t; -- /usr/include/xcb/xproto.h:4079 fore_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4080 fore_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4081 fore_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4082 back_red : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4083 back_green : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4084 back_blue : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4085 end record; pragma Convention (C_Pass_By_Copy, xcb_recolor_cursor_request_t); -- /usr/include/xcb/xproto.h:4075 type xcb_query_shape_of_t is (XCB_QUERY_SHAPE_OF_LARGEST_CURSOR, XCB_QUERY_SHAPE_OF_FASTEST_TILE, XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE); pragma Convention (C, xcb_query_shape_of_t); -- /usr/include/xcb/xproto.h:4088 type xcb_query_best_size_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4098 end record; pragma Convention (C_Pass_By_Copy, xcb_query_best_size_cookie_t); -- /usr/include/xcb/xproto.h:4097 type xcb_query_best_size_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4108 u_class : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4109 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4110 drawable : aliased xcb_drawable_t; -- /usr/include/xcb/xproto.h:4111 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4112 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4113 end record; pragma Convention (C_Pass_By_Copy, xcb_query_best_size_request_t); -- /usr/include/xcb/xproto.h:4107 type xcb_query_best_size_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4120 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4121 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4122 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4123 width : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4124 height : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4125 end record; pragma Convention (C_Pass_By_Copy, xcb_query_best_size_reply_t); -- /usr/include/xcb/xproto.h:4119 type xcb_query_extension_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4132 end record; pragma Convention (C_Pass_By_Copy, xcb_query_extension_cookie_t); -- /usr/include/xcb/xproto.h:4131 type xcb_query_extension_request_t_pad1_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_query_extension_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4142 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4143 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4144 name_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4145 pad1 : aliased xcb_query_extension_request_t_pad1_array; -- /usr/include/xcb/xproto.h:4146 end record; pragma Convention (C_Pass_By_Copy, xcb_query_extension_request_t); -- /usr/include/xcb/xproto.h:4141 type xcb_query_extension_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4153 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4154 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4155 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4156 present : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4157 major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4158 first_event : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4159 first_error : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4160 end record; pragma Convention (C_Pass_By_Copy, xcb_query_extension_reply_t); -- /usr/include/xcb/xproto.h:4152 type xcb_list_extensions_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4167 end record; pragma Convention (C_Pass_By_Copy, xcb_list_extensions_cookie_t); -- /usr/include/xcb/xproto.h:4166 type xcb_list_extensions_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4177 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4178 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4179 end record; pragma Convention (C_Pass_By_Copy, xcb_list_extensions_request_t); -- /usr/include/xcb/xproto.h:4176 type xcb_list_extensions_reply_t_pad0_array is array (0 .. 23) of aliased Libc.Stdint.uint8_t; type xcb_list_extensions_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4186 names_len : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4187 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4188 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4189 pad0 : aliased xcb_list_extensions_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:4190 end record; pragma Convention (C_Pass_By_Copy, xcb_list_extensions_reply_t); -- /usr/include/xcb/xproto.h:4185 type xcb_change_keyboard_mapping_request_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_change_keyboard_mapping_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4200 keycode_count : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4201 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4202 first_keycode : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:4203 keysyms_per_keycode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4204 pad0 : aliased xcb_change_keyboard_mapping_request_t_pad0_array; -- /usr/include/xcb/xproto.h:4205 end record; pragma Convention (C_Pass_By_Copy, xcb_change_keyboard_mapping_request_t); -- /usr/include/xcb/xproto.h:4199 type xcb_get_keyboard_mapping_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4212 end record; pragma Convention (C_Pass_By_Copy, xcb_get_keyboard_mapping_cookie_t); -- /usr/include/xcb/xproto.h:4211 type xcb_get_keyboard_mapping_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4222 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4223 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4224 first_keycode : aliased xcb_keycode_t; -- /usr/include/xcb/xproto.h:4225 count : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4226 end record; pragma Convention (C_Pass_By_Copy, xcb_get_keyboard_mapping_request_t); -- /usr/include/xcb/xproto.h:4221 type xcb_get_keyboard_mapping_reply_t_pad0_array is array (0 .. 23) of aliased Libc.Stdint.uint8_t; type xcb_get_keyboard_mapping_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4233 keysyms_per_keycode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4234 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4235 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4236 pad0 : aliased xcb_get_keyboard_mapping_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:4237 end record; pragma Convention (C_Pass_By_Copy, xcb_get_keyboard_mapping_reply_t); -- /usr/include/xcb/xproto.h:4232 subtype xcb_kb_t is unsigned; XCB_KB_KEY_CLICK_PERCENT : constant xcb_kb_t := 1; XCB_KB_BELL_PERCENT : constant xcb_kb_t := 2; XCB_KB_BELL_PITCH : constant xcb_kb_t := 4; XCB_KB_BELL_DURATION : constant xcb_kb_t := 8; XCB_KB_LED : constant xcb_kb_t := 16; XCB_KB_LED_MODE : constant xcb_kb_t := 32; XCB_KB_KEY : constant xcb_kb_t := 64; XCB_KB_AUTO_REPEAT_MODE : constant xcb_kb_t := 128; -- /usr/include/xcb/xproto.h:4240 type xcb_led_mode_t is (XCB_LED_MODE_OFF, XCB_LED_MODE_ON); pragma Convention (C, xcb_led_mode_t); -- /usr/include/xcb/xproto.h:4251 type xcb_auto_repeat_mode_t is (XCB_AUTO_REPEAT_MODE_OFF, XCB_AUTO_REPEAT_MODE_ON, XCB_AUTO_REPEAT_MODE_DEFAULT); pragma Convention (C, xcb_auto_repeat_mode_t); -- /usr/include/xcb/xproto.h:4256 type xcb_change_keyboard_control_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4269 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4270 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4271 value_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:4272 end record; pragma Convention (C_Pass_By_Copy, xcb_change_keyboard_control_request_t); -- /usr/include/xcb/xproto.h:4268 type xcb_get_keyboard_control_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4279 end record; pragma Convention (C_Pass_By_Copy, xcb_get_keyboard_control_cookie_t); -- /usr/include/xcb/xproto.h:4278 type xcb_get_keyboard_control_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4289 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4290 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4291 end record; pragma Convention (C_Pass_By_Copy, xcb_get_keyboard_control_request_t); -- /usr/include/xcb/xproto.h:4288 type xcb_get_keyboard_control_reply_t_pad0_array is array (0 .. 1) of aliased Libc.Stdint.uint8_t; type xcb_get_keyboard_control_reply_t_auto_repeats_array is array (0 .. 31) of aliased Libc.Stdint.uint8_t; type xcb_get_keyboard_control_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4298 global_auto_repeat : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4299 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4300 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4301 led_mask : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:4302 key_click_percent : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4303 bell_percent : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4304 bell_pitch : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4305 bell_duration : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4306 pad0 : aliased xcb_get_keyboard_control_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:4307 auto_repeats : aliased xcb_get_keyboard_control_reply_t_auto_repeats_array; -- /usr/include/xcb/xproto.h:4308 end record; pragma Convention (C_Pass_By_Copy, xcb_get_keyboard_control_reply_t); -- /usr/include/xcb/xproto.h:4297 type xcb_bell_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4318 percent : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xproto.h:4319 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4320 end record; pragma Convention (C_Pass_By_Copy, xcb_bell_request_t); -- /usr/include/xcb/xproto.h:4317 type xcb_change_pointer_control_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4330 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4331 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4332 acceleration_numerator : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:4333 acceleration_denominator : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:4334 threshold : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:4335 do_acceleration : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4336 do_threshold : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4337 end record; pragma Convention (C_Pass_By_Copy, xcb_change_pointer_control_request_t); -- /usr/include/xcb/xproto.h:4329 type xcb_get_pointer_control_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4344 end record; pragma Convention (C_Pass_By_Copy, xcb_get_pointer_control_cookie_t); -- /usr/include/xcb/xproto.h:4343 type xcb_get_pointer_control_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4354 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4355 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4356 end record; pragma Convention (C_Pass_By_Copy, xcb_get_pointer_control_request_t); -- /usr/include/xcb/xproto.h:4353 type xcb_get_pointer_control_reply_t_pad1_array is array (0 .. 17) of aliased Libc.Stdint.uint8_t; type xcb_get_pointer_control_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4363 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4364 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4365 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4366 acceleration_numerator : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4367 acceleration_denominator : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4368 threshold : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4369 pad1 : aliased xcb_get_pointer_control_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:4370 end record; pragma Convention (C_Pass_By_Copy, xcb_get_pointer_control_reply_t); -- /usr/include/xcb/xproto.h:4362 type xcb_blanking_t is (XCB_BLANKING_NOT_PREFERRED, XCB_BLANKING_PREFERRED, XCB_BLANKING_DEFAULT); pragma Convention (C, xcb_blanking_t); -- /usr/include/xcb/xproto.h:4373 type xcb_exposures_t is (XCB_EXPOSURES_NOT_ALLOWED, XCB_EXPOSURES_ALLOWED, XCB_EXPOSURES_DEFAULT); pragma Convention (C, xcb_exposures_t); -- /usr/include/xcb/xproto.h:4379 type xcb_set_screen_saver_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4392 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4393 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4394 timeout : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:4395 interval : aliased Libc.Stdint .int16_t; -- /usr/include/xcb/xproto.h:4396 prefer_blanking : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4397 allow_exposures : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4398 end record; pragma Convention (C_Pass_By_Copy, xcb_set_screen_saver_request_t); -- /usr/include/xcb/xproto.h:4391 type xcb_get_screen_saver_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4405 end record; pragma Convention (C_Pass_By_Copy, xcb_get_screen_saver_cookie_t); -- /usr/include/xcb/xproto.h:4404 type xcb_get_screen_saver_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4415 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4416 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4417 end record; pragma Convention (C_Pass_By_Copy, xcb_get_screen_saver_request_t); -- /usr/include/xcb/xproto.h:4414 type xcb_get_screen_saver_reply_t_pad1_array is array (0 .. 17) of aliased Libc.Stdint.uint8_t; type xcb_get_screen_saver_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4424 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4425 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4426 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4427 timeout : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4428 interval : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4429 prefer_blanking : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4430 allow_exposures : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4431 pad1 : aliased xcb_get_screen_saver_reply_t_pad1_array; -- /usr/include/xcb/xproto.h:4432 end record; pragma Convention (C_Pass_By_Copy, xcb_get_screen_saver_reply_t); -- /usr/include/xcb/xproto.h:4423 type xcb_host_mode_t is (XCB_HOST_MODE_INSERT, XCB_HOST_MODE_DELETE); pragma Convention (C, xcb_host_mode_t); -- /usr/include/xcb/xproto.h:4435 subtype xcb_family_t is unsigned; XCB_FAMILY_INTERNET : constant xcb_family_t := 0; XCB_FAMILY_DECNET : constant xcb_family_t := 1; XCB_FAMILY_CHAOS : constant xcb_family_t := 2; XCB_FAMILY_SERVER_INTERPRETED : constant xcb_family_t := 5; XCB_FAMILY_INTERNET_6 : constant xcb_family_t := 6; -- /usr/include/xcb/xproto.h:4440 type xcb_change_hosts_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4455 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4456 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4457 family : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4458 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4459 address_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4460 end record; pragma Convention (C_Pass_By_Copy, xcb_change_hosts_request_t); -- /usr/include/xcb/xproto.h:4454 type xcb_host_t is record family : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4467 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4468 address_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4469 end record; pragma Convention (C_Pass_By_Copy, xcb_host_t); -- /usr/include/xcb/xproto.h:4466 type xcb_host_iterator_t is record data : access xcb_host_t; -- /usr/include/xcb/xproto.h:4476 c_rem : aliased int; -- /usr/include/xcb/xproto.h:4477 index : aliased int; -- /usr/include/xcb/xproto.h:4478 end record; pragma Convention (C_Pass_By_Copy, xcb_host_iterator_t); -- /usr/include/xcb/xproto.h:4475 type xcb_list_hosts_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4485 end record; pragma Convention (C_Pass_By_Copy, xcb_list_hosts_cookie_t); -- /usr/include/xcb/xproto.h:4484 type xcb_list_hosts_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4495 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4496 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4497 end record; pragma Convention (C_Pass_By_Copy, xcb_list_hosts_request_t); -- /usr/include/xcb/xproto.h:4494 type xcb_list_hosts_reply_t_pad0_array is array (0 .. 21) of aliased Libc.Stdint.uint8_t; type xcb_list_hosts_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4504 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4505 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4506 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4507 hosts_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4508 pad0 : aliased xcb_list_hosts_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:4509 end record; pragma Convention (C_Pass_By_Copy, xcb_list_hosts_reply_t); -- /usr/include/xcb/xproto.h:4503 type xcb_access_control_t is (XCB_ACCESS_CONTROL_DISABLE, XCB_ACCESS_CONTROL_ENABLE); pragma Convention (C, xcb_access_control_t); -- /usr/include/xcb/xproto.h:4512 type xcb_set_access_control_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4524 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4525 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4526 end record; pragma Convention (C_Pass_By_Copy, xcb_set_access_control_request_t); -- /usr/include/xcb/xproto.h:4523 type xcb_close_down_t is (XCB_CLOSE_DOWN_DESTROY_ALL, XCB_CLOSE_DOWN_RETAIN_PERMANENT, XCB_CLOSE_DOWN_RETAIN_TEMPORARY); pragma Convention (C, xcb_close_down_t); -- /usr/include/xcb/xproto.h:4529 type xcb_set_close_down_mode_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4542 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4543 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4544 end record; pragma Convention (C_Pass_By_Copy, xcb_set_close_down_mode_request_t); -- /usr/include/xcb/xproto.h:4541 type xcb_kill_t is (XCB_KILL_ALL_TEMPORARY); pragma Convention (C, xcb_kill_t); -- /usr/include/xcb/xproto.h:4547 type xcb_kill_client_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4558 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4559 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4560 resource : aliased Libc.Stdint .uint32_t; -- /usr/include/xcb/xproto.h:4561 end record; pragma Convention (C_Pass_By_Copy, xcb_kill_client_request_t); -- /usr/include/xcb/xproto.h:4557 type xcb_rotate_properties_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4571 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4572 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4573 window : aliased xcb_window_t; -- /usr/include/xcb/xproto.h:4574 atoms_len : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4575 c_delta : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xproto.h:4576 end record; pragma Convention (C_Pass_By_Copy, xcb_rotate_properties_request_t); -- /usr/include/xcb/xproto.h:4570 type xcb_screen_saver_t is (XCB_SCREEN_SAVER_RESET, XCB_SCREEN_SAVER_ACTIVE); pragma Convention (C, xcb_screen_saver_t); -- /usr/include/xcb/xproto.h:4579 type xcb_force_screen_saver_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4591 mode : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4592 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4593 end record; pragma Convention (C_Pass_By_Copy, xcb_force_screen_saver_request_t); -- /usr/include/xcb/xproto.h:4590 type xcb_mapping_status_t is (XCB_MAPPING_STATUS_SUCCESS, XCB_MAPPING_STATUS_BUSY, XCB_MAPPING_STATUS_FAILURE); pragma Convention (C, xcb_mapping_status_t); -- /usr/include/xcb/xproto.h:4596 type xcb_set_pointer_mapping_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4606 end record; pragma Convention (C_Pass_By_Copy, xcb_set_pointer_mapping_cookie_t); -- /usr/include/xcb/xproto.h:4605 type xcb_set_pointer_mapping_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4616 map_len : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4617 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4618 end record; pragma Convention (C_Pass_By_Copy, xcb_set_pointer_mapping_request_t); -- /usr/include/xcb/xproto.h:4615 type xcb_set_pointer_mapping_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4625 status : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4626 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4627 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4628 end record; pragma Convention (C_Pass_By_Copy, xcb_set_pointer_mapping_reply_t); -- /usr/include/xcb/xproto.h:4624 type xcb_get_pointer_mapping_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4635 end record; pragma Convention (C_Pass_By_Copy, xcb_get_pointer_mapping_cookie_t); -- /usr/include/xcb/xproto.h:4634 type xcb_get_pointer_mapping_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4645 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4646 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4647 end record; pragma Convention (C_Pass_By_Copy, xcb_get_pointer_mapping_request_t); -- /usr/include/xcb/xproto.h:4644 type xcb_get_pointer_mapping_reply_t_pad0_array is array (0 .. 23) of aliased Libc.Stdint.uint8_t; type xcb_get_pointer_mapping_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4654 map_len : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4655 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4656 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4657 pad0 : aliased xcb_get_pointer_mapping_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:4658 end record; pragma Convention (C_Pass_By_Copy, xcb_get_pointer_mapping_reply_t); -- /usr/include/xcb/xproto.h:4653 type xcb_map_index_t is (XCB_MAP_INDEX_SHIFT, XCB_MAP_INDEX_LOCK, XCB_MAP_INDEX_CONTROL, XCB_MAP_INDEX_1, XCB_MAP_INDEX_2, XCB_MAP_INDEX_3, XCB_MAP_INDEX_4, XCB_MAP_INDEX_5); pragma Convention (C, xcb_map_index_t); -- /usr/include/xcb/xproto.h:4661 type xcb_set_modifier_mapping_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4676 end record; pragma Convention (C_Pass_By_Copy, xcb_set_modifier_mapping_cookie_t); -- /usr/include/xcb/xproto.h:4675 type xcb_set_modifier_mapping_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4686 keycodes_per_modifier : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4687 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4688 end record; pragma Convention (C_Pass_By_Copy, xcb_set_modifier_mapping_request_t); -- /usr/include/xcb/xproto.h:4685 type xcb_set_modifier_mapping_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4695 status : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4696 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4697 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4698 end record; pragma Convention (C_Pass_By_Copy, xcb_set_modifier_mapping_reply_t); -- /usr/include/xcb/xproto.h:4694 type xcb_get_modifier_mapping_cookie_t is record sequence : aliased unsigned; -- /usr/include/xcb/xproto.h:4705 end record; pragma Convention (C_Pass_By_Copy, xcb_get_modifier_mapping_cookie_t); -- /usr/include/xcb/xproto.h:4704 type xcb_get_modifier_mapping_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4715 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4716 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4717 end record; pragma Convention (C_Pass_By_Copy, xcb_get_modifier_mapping_request_t); -- /usr/include/xcb/xproto.h:4714 type xcb_get_modifier_mapping_reply_t_pad0_array is array (0 .. 23) of aliased Libc.Stdint.uint8_t; type xcb_get_modifier_mapping_reply_t is record response_type : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4724 keycodes_per_modifier : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4725 sequence : aliased Libc.Stdint .uint16_t; -- /usr/include/xcb/xproto.h:4726 length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:4727 pad0 : aliased xcb_get_modifier_mapping_reply_t_pad0_array; -- /usr/include/xcb/xproto.h:4728 end record; pragma Convention (C_Pass_By_Copy, xcb_get_modifier_mapping_reply_t); -- /usr/include/xcb/xproto.h:4723 type xcb_no_operation_request_t is record major_opcode : aliased Libc.Stdint .uint8_t; -- /usr/include/xcb/xproto.h:4738 pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:4739 length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xproto.h:4740 end record; pragma Convention (C_Pass_By_Copy, xcb_no_operation_request_t); -- /usr/include/xcb/xproto.h:4737 procedure xcb_char2b_next (i : access xcb_char2b_iterator_t); -- /usr/include/xcb/xproto.h:4762 pragma Import (C, xcb_char2b_next, "xcb_char2b_next"); function xcb_char2b_end (i : xcb_char2b_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:4784 pragma Import (C, xcb_char2b_end, "xcb_char2b_end"); procedure xcb_window_next (i : access xcb_window_iterator_t); -- /usr/include/xcb/xproto.h:4805 pragma Import (C, xcb_window_next, "xcb_window_next"); function xcb_window_end (i : xcb_window_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:4827 pragma Import (C, xcb_window_end, "xcb_window_end"); procedure xcb_pixmap_next (i : access xcb_pixmap_iterator_t); -- /usr/include/xcb/xproto.h:4848 pragma Import (C, xcb_pixmap_next, "xcb_pixmap_next"); function xcb_pixmap_end (i : xcb_pixmap_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:4870 pragma Import (C, xcb_pixmap_end, "xcb_pixmap_end"); procedure xcb_cursor_next (i : access xcb_cursor_iterator_t); -- /usr/include/xcb/xproto.h:4891 pragma Import (C, xcb_cursor_next, "xcb_cursor_next"); function xcb_cursor_end (i : xcb_cursor_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:4913 pragma Import (C, xcb_cursor_end, "xcb_cursor_end"); procedure xcb_font_next (i : access xcb_font_iterator_t); -- /usr/include/xcb/xproto.h:4934 pragma Import (C, xcb_font_next, "xcb_font_next"); function xcb_font_end (i : xcb_font_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:4956 pragma Import (C, xcb_font_end, "xcb_font_end"); procedure xcb_gcontext_next (i : access xcb_gcontext_iterator_t); -- /usr/include/xcb/xproto.h:4977 pragma Import (C, xcb_gcontext_next, "xcb_gcontext_next"); function xcb_gcontext_end (i : xcb_gcontext_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:4999 pragma Import (C, xcb_gcontext_end, "xcb_gcontext_end"); procedure xcb_colormap_next (i : access xcb_colormap_iterator_t); -- /usr/include/xcb/xproto.h:5020 pragma Import (C, xcb_colormap_next, "xcb_colormap_next"); function xcb_colormap_end (i : xcb_colormap_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5042 pragma Import (C, xcb_colormap_end, "xcb_colormap_end"); procedure xcb_atom_next (i : access xcb_atom_iterator_t); -- /usr/include/xcb/xproto.h:5063 pragma Import (C, xcb_atom_next, "xcb_atom_next"); function xcb_atom_end (i : xcb_atom_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5085 pragma Import (C, xcb_atom_end, "xcb_atom_end"); procedure xcb_drawable_next (i : access xcb_drawable_iterator_t); -- /usr/include/xcb/xproto.h:5106 pragma Import (C, xcb_drawable_next, "xcb_drawable_next"); function xcb_drawable_end (i : xcb_drawable_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5128 pragma Import (C, xcb_drawable_end, "xcb_drawable_end"); procedure xcb_fontable_next (i : access xcb_fontable_iterator_t); -- /usr/include/xcb/xproto.h:5149 pragma Import (C, xcb_fontable_next, "xcb_fontable_next"); function xcb_fontable_end (i : xcb_fontable_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5171 pragma Import (C, xcb_fontable_end, "xcb_fontable_end"); procedure xcb_visualid_next (i : access xcb_visualid_iterator_t); -- /usr/include/xcb/xproto.h:5192 pragma Import (C, xcb_visualid_next, "xcb_visualid_next"); function xcb_visualid_end (i : xcb_visualid_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5214 pragma Import (C, xcb_visualid_end, "xcb_visualid_end"); procedure xcb_timestamp_next (i : access xcb_timestamp_iterator_t); -- /usr/include/xcb/xproto.h:5235 pragma Import (C, xcb_timestamp_next, "xcb_timestamp_next"); function xcb_timestamp_end (i : xcb_timestamp_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5257 pragma Import (C, xcb_timestamp_end, "xcb_timestamp_end"); procedure xcb_keysym_next (i : access xcb_keysym_iterator_t); -- /usr/include/xcb/xproto.h:5278 pragma Import (C, xcb_keysym_next, "xcb_keysym_next"); function xcb_keysym_end (i : xcb_keysym_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5300 pragma Import (C, xcb_keysym_end, "xcb_keysym_end"); procedure xcb_keycode_next (i : access xcb_keycode_iterator_t); -- /usr/include/xcb/xproto.h:5321 pragma Import (C, xcb_keycode_next, "xcb_keycode_next"); function xcb_keycode_end (i : xcb_keycode_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5343 pragma Import (C, xcb_keycode_end, "xcb_keycode_end"); procedure xcb_button_next (i : access xcb_button_iterator_t); -- /usr/include/xcb/xproto.h:5364 pragma Import (C, xcb_button_next, "xcb_button_next"); function xcb_button_end (i : xcb_button_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5386 pragma Import (C, xcb_button_end, "xcb_button_end"); procedure xcb_point_next (i : access xcb_point_iterator_t); -- /usr/include/xcb/xproto.h:5407 pragma Import (C, xcb_point_next, "xcb_point_next"); function xcb_point_end (i : xcb_point_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5429 pragma Import (C, xcb_point_end, "xcb_point_end"); procedure xcb_rectangle_next (i : access xcb_rectangle_iterator_t); -- /usr/include/xcb/xproto.h:5450 pragma Import (C, xcb_rectangle_next, "xcb_rectangle_next"); function xcb_rectangle_end (i : xcb_rectangle_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5472 pragma Import (C, xcb_rectangle_end, "xcb_rectangle_end"); procedure xcb_arc_next (i : access xcb_arc_iterator_t); -- /usr/include/xcb/xproto.h:5493 pragma Import (C, xcb_arc_next, "xcb_arc_next"); function xcb_arc_end (i : xcb_arc_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5515 pragma Import (C, xcb_arc_end, "xcb_arc_end"); procedure xcb_format_next (i : access xcb_format_iterator_t); -- /usr/include/xcb/xproto.h:5536 pragma Import (C, xcb_format_next, "xcb_format_next"); function xcb_format_end (i : xcb_format_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5558 pragma Import (C, xcb_format_end, "xcb_format_end"); procedure xcb_visualtype_next (i : access xcb_visualtype_iterator_t); -- /usr/include/xcb/xproto.h:5579 pragma Import (C, xcb_visualtype_next, "xcb_visualtype_next"); function xcb_visualtype_end (i : xcb_visualtype_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5601 pragma Import (C, xcb_visualtype_end, "xcb_visualtype_end"); function xcb_depth_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:5604 pragma Import (C, xcb_depth_sizeof, "xcb_depth_sizeof"); function xcb_depth_visuals (R : access xcb_depth_t) return access xcb_visualtype_t; -- /usr/include/xcb/xproto.h:5617 pragma Import (C, xcb_depth_visuals, "xcb_depth_visuals"); function xcb_depth_visuals_length (R : access xcb_depth_t) return int; -- /usr/include/xcb/xproto.h:5630 pragma Import (C, xcb_depth_visuals_length, "xcb_depth_visuals_length"); function xcb_depth_visuals_iterator (R : access xcb_depth_t) return xcb_visualtype_iterator_t; -- /usr/include/xcb/xproto.h:5643 pragma Import (C, xcb_depth_visuals_iterator, "xcb_depth_visuals_iterator"); procedure xcb_depth_next (i : access xcb_depth_iterator_t); -- /usr/include/xcb/xproto.h:5664 pragma Import (C, xcb_depth_next, "xcb_depth_next"); function xcb_depth_end (i : xcb_depth_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5686 pragma Import (C, xcb_depth_end, "xcb_depth_end"); function xcb_screen_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:5689 pragma Import (C, xcb_screen_sizeof, "xcb_screen_sizeof"); function xcb_screen_allowed_depths_length (R : access xcb_screen_t) return int; -- /usr/include/xcb/xproto.h:5702 pragma Import (C, xcb_screen_allowed_depths_length, "xcb_screen_allowed_depths_length"); function xcb_screen_allowed_depths_iterator (R : access xcb_screen_t) return xcb_depth_iterator_t; -- /usr/include/xcb/xproto.h:5715 pragma Import (C, xcb_screen_allowed_depths_iterator, "xcb_screen_allowed_depths_iterator"); procedure xcb_screen_next (i : access xcb_screen_iterator_t); -- /usr/include/xcb/xproto.h:5736 pragma Import (C, xcb_screen_next, "xcb_screen_next"); function xcb_screen_end (i : xcb_screen_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5758 pragma Import (C, xcb_screen_end, "xcb_screen_end"); function xcb_setup_request_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:5761 pragma Import (C, xcb_setup_request_sizeof, "xcb_setup_request_sizeof"); function xcb_setup_request_authorization_protocol_name (R : access xcb_setup_request_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xproto.h:5774 pragma Import (C, xcb_setup_request_authorization_protocol_name, "xcb_setup_request_authorization_protocol_name"); function xcb_setup_request_authorization_protocol_name_length (R : access xcb_setup_request_t) return int; -- /usr/include/xcb/xproto.h:5787 pragma Import (C, xcb_setup_request_authorization_protocol_name_length, "xcb_setup_request_authorization_protocol_name_length"); function xcb_setup_request_authorization_protocol_name_end (R : access xcb_setup_request_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5800 pragma Import (C, xcb_setup_request_authorization_protocol_name_end, "xcb_setup_request_authorization_protocol_name_end"); function xcb_setup_request_authorization_protocol_data (R : access xcb_setup_request_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xproto.h:5813 pragma Import (C, xcb_setup_request_authorization_protocol_data, "xcb_setup_request_authorization_protocol_data"); function xcb_setup_request_authorization_protocol_data_length (R : access xcb_setup_request_t) return int; -- /usr/include/xcb/xproto.h:5826 pragma Import (C, xcb_setup_request_authorization_protocol_data_length, "xcb_setup_request_authorization_protocol_data_length"); function xcb_setup_request_authorization_protocol_data_end (R : access xcb_setup_request_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5839 pragma Import (C, xcb_setup_request_authorization_protocol_data_end, "xcb_setup_request_authorization_protocol_data_end"); procedure xcb_setup_request_next (i : access xcb_setup_request_iterator_t); -- /usr/include/xcb/xproto.h:5860 pragma Import (C, xcb_setup_request_next, "xcb_setup_request_next"); function xcb_setup_request_end (i : xcb_setup_request_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5882 pragma Import (C, xcb_setup_request_end, "xcb_setup_request_end"); function xcb_setup_failed_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:5885 pragma Import (C, xcb_setup_failed_sizeof, "xcb_setup_failed_sizeof"); function xcb_setup_failed_reason (R : access xcb_setup_failed_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xproto.h:5898 pragma Import (C, xcb_setup_failed_reason, "xcb_setup_failed_reason"); function xcb_setup_failed_reason_length (R : access xcb_setup_failed_t) return int; -- /usr/include/xcb/xproto.h:5911 pragma Import (C, xcb_setup_failed_reason_length, "xcb_setup_failed_reason_length"); function xcb_setup_failed_reason_end (R : access xcb_setup_failed_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5924 pragma Import (C, xcb_setup_failed_reason_end, "xcb_setup_failed_reason_end"); procedure xcb_setup_failed_next (i : access xcb_setup_failed_iterator_t); -- /usr/include/xcb/xproto.h:5945 pragma Import (C, xcb_setup_failed_next, "xcb_setup_failed_next"); function xcb_setup_failed_end (i : xcb_setup_failed_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:5967 pragma Import (C, xcb_setup_failed_end, "xcb_setup_failed_end"); function xcb_setup_authenticate_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:5970 pragma Import (C, xcb_setup_authenticate_sizeof, "xcb_setup_authenticate_sizeof"); function xcb_setup_authenticate_reason (R : access xcb_setup_authenticate_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xproto.h:5983 pragma Import (C, xcb_setup_authenticate_reason, "xcb_setup_authenticate_reason"); function xcb_setup_authenticate_reason_length (R : access xcb_setup_authenticate_t) return int; -- /usr/include/xcb/xproto.h:5996 pragma Import (C, xcb_setup_authenticate_reason_length, "xcb_setup_authenticate_reason_length"); function xcb_setup_authenticate_reason_end (R : access xcb_setup_authenticate_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:6009 pragma Import (C, xcb_setup_authenticate_reason_end, "xcb_setup_authenticate_reason_end"); procedure xcb_setup_authenticate_next (i : access xcb_setup_authenticate_iterator_t); -- /usr/include/xcb/xproto.h:6030 pragma Import (C, xcb_setup_authenticate_next, "xcb_setup_authenticate_next"); function xcb_setup_authenticate_end (i : xcb_setup_authenticate_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:6052 pragma Import (C, xcb_setup_authenticate_end, "xcb_setup_authenticate_end"); function xcb_setup_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:6055 pragma Import (C, xcb_setup_sizeof, "xcb_setup_sizeof"); function xcb_setup_vendor (R : access xcb_setup_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xproto.h:6068 pragma Import (C, xcb_setup_vendor, "xcb_setup_vendor"); function xcb_setup_vendor_length (R : access xcb_setup_t) return int; -- /usr/include/xcb/xproto.h:6081 pragma Import (C, xcb_setup_vendor_length, "xcb_setup_vendor_length"); function xcb_setup_vendor_end (R : access xcb_setup_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:6094 pragma Import (C, xcb_setup_vendor_end, "xcb_setup_vendor_end"); function xcb_setup_pixmap_formats (R : access xcb_setup_t) return access xcb_format_t; -- /usr/include/xcb/xproto.h:6107 pragma Import (C, xcb_setup_pixmap_formats, "xcb_setup_pixmap_formats"); function xcb_setup_pixmap_formats_length (R : access xcb_setup_t) return int; -- /usr/include/xcb/xproto.h:6120 pragma Import (C, xcb_setup_pixmap_formats_length, "xcb_setup_pixmap_formats_length"); function xcb_setup_pixmap_formats_iterator (R : access xcb_setup_t) return xcb_format_iterator_t; -- /usr/include/xcb/xproto.h:6133 pragma Import (C, xcb_setup_pixmap_formats_iterator, "xcb_setup_pixmap_formats_iterator"); function xcb_setup_roots_length (R : access xcb_setup_t) return int; -- /usr/include/xcb/xproto.h:6146 pragma Import (C, xcb_setup_roots_length, "xcb_setup_roots_length"); function xcb_setup_roots_iterator (R : access xcb_setup_t) return xcb_screen_iterator_t; -- /usr/include/xcb/xproto.h:6159 pragma Import (C, xcb_setup_roots_iterator, "xcb_setup_roots_iterator"); procedure xcb_setup_next (i : access xcb_setup_iterator_t); -- /usr/include/xcb/xproto.h:6180 pragma Import (C, xcb_setup_next, "xcb_setup_next"); function xcb_setup_end (i : xcb_setup_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:6202 pragma Import (C, xcb_setup_end, "xcb_setup_end"); procedure xcb_client_message_data_next (i : access xcb_client_message_data_iterator_t); -- /usr/include/xcb/xproto.h:6223 pragma Import (C, xcb_client_message_data_next, "xcb_client_message_data_next"); function xcb_client_message_data_end (i : xcb_client_message_data_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:6245 pragma Import (C, xcb_client_message_data_end, "xcb_client_message_data_end"); function xcb_create_window_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:6248 pragma Import (C, xcb_create_window_sizeof, "xcb_create_window_sizeof"); function xcb_create_window_checked (c : xcb_connection_t_access; depth : Libc.Stdint.uint8_t; wid : xcb_window_t; parent : xcb_window_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; border_width : Libc.Stdint.uint16_t; u_class : Libc.Stdint.uint16_t; visual : xcb_visualid_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6319 pragma Import (C, xcb_create_window_checked, "xcb_create_window_checked"); function xcb_create_window (c : xcb_connection_t_access; depth : Libc.Stdint.uint8_t; wid : xcb_window_t; parent : xcb_window_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; border_width : Libc.Stdint.uint16_t; u_class : Libc.Stdint.uint16_t; visual : xcb_visualid_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6399 pragma Import (C, xcb_create_window, "xcb_create_window"); function xcb_change_window_attributes_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:6414 pragma Import (C, xcb_change_window_attributes_sizeof, "xcb_change_window_attributes_sizeof"); function xcb_change_window_attributes_checked (c : xcb_connection_t_access; window : xcb_window_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6448 pragma Import (C, xcb_change_window_attributes_checked, "xcb_change_window_attributes_checked"); function xcb_change_window_attributes (c : xcb_connection_t_access; window : xcb_window_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6482 pragma Import (C, xcb_change_window_attributes, "xcb_change_window_attributes"); function xcb_get_window_attributes (c : xcb_connection_t_access; window : xcb_window_t) return xcb_get_window_attributes_cookie_t; -- /usr/include/xcb/xproto.h:6509 pragma Import (C, xcb_get_window_attributes, "xcb_get_window_attributes"); function xcb_get_window_attributes_unchecked (c : xcb_connection_t_access; window : xcb_window_t) return xcb_get_window_attributes_cookie_t; -- /usr/include/xcb/xproto.h:6537 pragma Import (C, xcb_get_window_attributes_unchecked, "xcb_get_window_attributes_unchecked"); function xcb_get_window_attributes_reply (c : xcb_connection_t_access; cookie : xcb_get_window_attributes_cookie_t; e : access xcb_generic_error_t_access) return access xcb_get_window_attributes_reply_t; -- /usr/include/xcb/xproto.h:6567 pragma Import (C, xcb_get_window_attributes_reply, "xcb_get_window_attributes_reply"); function xcb_destroy_window_checked (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6601 pragma Import (C, xcb_destroy_window_checked, "xcb_destroy_window_checked"); function xcb_destroy_window (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6631 pragma Import (C, xcb_destroy_window, "xcb_destroy_window"); function xcb_destroy_subwindows_checked (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6657 pragma Import (C, xcb_destroy_subwindows_checked, "xcb_destroy_subwindows_checked"); function xcb_destroy_subwindows (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6680 pragma Import (C, xcb_destroy_subwindows, "xcb_destroy_subwindows"); function xcb_change_save_set_checked (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6714 pragma Import (C, xcb_change_save_set_checked, "xcb_change_save_set_checked"); function xcb_change_save_set (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6746 pragma Import (C, xcb_change_save_set, "xcb_change_save_set"); function xcb_reparent_window_checked (c : xcb_connection_t_access; window : xcb_window_t; parent : xcb_window_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6786 pragma Import (C, xcb_reparent_window_checked, "xcb_reparent_window_checked"); function xcb_reparent_window (c : xcb_connection_t_access; window : xcb_window_t; parent : xcb_window_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6825 pragma Import (C, xcb_reparent_window, "xcb_reparent_window"); function xcb_map_window_checked (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6874 pragma Import (C, xcb_map_window_checked, "xcb_map_window_checked"); function xcb_map_window (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6917 pragma Import (C, xcb_map_window, "xcb_map_window"); function xcb_map_subwindows_checked (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6943 pragma Import (C, xcb_map_subwindows_checked, "xcb_map_subwindows_checked"); function xcb_map_subwindows (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6966 pragma Import (C, xcb_map_subwindows, "xcb_map_subwindows"); function xcb_unmap_window_checked (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:6998 pragma Import (C, xcb_unmap_window_checked, "xcb_unmap_window_checked"); function xcb_unmap_window (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7027 pragma Import (C, xcb_unmap_window, "xcb_unmap_window"); function xcb_unmap_subwindows_checked (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7053 pragma Import (C, xcb_unmap_subwindows_checked, "xcb_unmap_subwindows_checked"); function xcb_unmap_subwindows (c : xcb_connection_t_access; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7076 pragma Import (C, xcb_unmap_subwindows, "xcb_unmap_subwindows"); function xcb_configure_window_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:7080 pragma Import (C, xcb_configure_window_sizeof, "xcb_configure_window_sizeof"); function xcb_configure_window_checked (c : xcb_connection_t_access; window : xcb_window_t; value_mask : Libc.Stdint.uint16_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7112 pragma Import (C, xcb_configure_window_checked, "xcb_configure_window_checked"); function xcb_configure_window (c : xcb_connection_t_access; window : xcb_window_t; value_mask : Libc.Stdint.uint16_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7144 pragma Import (C, xcb_configure_window, "xcb_configure_window"); function xcb_circulate_window_checked (c : xcb_connection_t_access; direction : Libc.Stdint.uint8_t; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7181 pragma Import (C, xcb_circulate_window_checked, "xcb_circulate_window_checked"); function xcb_circulate_window (c : xcb_connection_t_access; direction : Libc.Stdint.uint8_t; window : xcb_window_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7214 pragma Import (C, xcb_circulate_window, "xcb_circulate_window"); function xcb_get_geometry (c : xcb_connection_t_access; drawable : xcb_drawable_t) return xcb_get_geometry_cookie_t; -- /usr/include/xcb/xproto.h:7240 pragma Import (C, xcb_get_geometry, "xcb_get_geometry"); function xcb_get_geometry_unchecked (c : xcb_connection_t_access; drawable : xcb_drawable_t) return xcb_get_geometry_cookie_t; -- /usr/include/xcb/xproto.h:7268 pragma Import (C, xcb_get_geometry_unchecked, "xcb_get_geometry_unchecked"); function xcb_get_geometry_reply (c : xcb_connection_t_access; cookie : xcb_get_geometry_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_geometry_reply_t; -- /usr/include/xcb/xproto.h:7298 pragma Import (C, xcb_get_geometry_reply, "xcb_get_geometry_reply"); function xcb_query_tree_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:7303 pragma Import (C, xcb_query_tree_sizeof, "xcb_query_tree_sizeof"); function xcb_query_tree (c : xcb_connection_t_access; window : xcb_window_t) return xcb_query_tree_cookie_t; -- /usr/include/xcb/xproto.h:7328 pragma Import (C, xcb_query_tree, "xcb_query_tree"); function xcb_query_tree_unchecked (c : xcb_connection_t_access; window : xcb_window_t) return xcb_query_tree_cookie_t; -- /usr/include/xcb/xproto.h:7357 pragma Import (C, xcb_query_tree_unchecked, "xcb_query_tree_unchecked"); function xcb_query_tree_children (R : access xcb_query_tree_reply_t) return access xcb_window_t; -- /usr/include/xcb/xproto.h:7371 pragma Import (C, xcb_query_tree_children, "xcb_query_tree_children"); function xcb_query_tree_children_length (R : access xcb_query_tree_reply_t) return int; -- /usr/include/xcb/xproto.h:7384 pragma Import (C, xcb_query_tree_children_length, "xcb_query_tree_children_length"); function xcb_query_tree_children_end (R : access xcb_query_tree_reply_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:7397 pragma Import (C, xcb_query_tree_children_end, "xcb_query_tree_children_end"); function xcb_query_tree_reply (c : xcb_connection_t_access; cookie : xcb_query_tree_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_tree_reply_t; -- /usr/include/xcb/xproto.h:7426 pragma Import (C, xcb_query_tree_reply, "xcb_query_tree_reply"); function xcb_intern_atom_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:7431 pragma Import (C, xcb_intern_atom_sizeof, "xcb_intern_atom_sizeof"); function xcb_intern_atom (c : xcb_connection_t_access; only_if_exists : Libc.Stdint.uint8_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_intern_atom_cookie_t; -- /usr/include/xcb/xproto.h:7465 pragma Import (C, xcb_intern_atom, "xcb_intern_atom"); function xcb_intern_atom_unchecked (c : xcb_connection_t_access; only_if_exists : Libc.Stdint.uint8_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_intern_atom_cookie_t; -- /usr/include/xcb/xproto.h:7505 pragma Import (C, xcb_intern_atom_unchecked, "xcb_intern_atom_unchecked"); function xcb_intern_atom_reply (c : xcb_connection_t_access; cookie : xcb_intern_atom_cookie_t; e : out xcb_generic_error_t_access) return access xcb_intern_atom_reply_t; -- /usr/include/xcb/xproto.h:7537 pragma Import (C, xcb_intern_atom_reply, "xcb_intern_atom_reply"); function xcb_get_atom_name_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:7542 pragma Import (C, xcb_get_atom_name_sizeof, "xcb_get_atom_name_sizeof"); function xcb_get_atom_name (c : xcb_connection_t_access; atom : xcb_atom_t) return xcb_get_atom_name_cookie_t; -- /usr/include/xcb/xproto.h:7564 pragma Import (C, xcb_get_atom_name, "xcb_get_atom_name"); function xcb_get_atom_name_unchecked (c : xcb_connection_t_access; atom : xcb_atom_t) return xcb_get_atom_name_cookie_t; -- /usr/include/xcb/xproto.h:7590 pragma Import (C, xcb_get_atom_name_unchecked, "xcb_get_atom_name_unchecked"); function xcb_get_atom_name_name (R : access xcb_get_atom_name_reply_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xproto.h:7604 pragma Import (C, xcb_get_atom_name_name, "xcb_get_atom_name_name"); function xcb_get_atom_name_name_length (R : access xcb_get_atom_name_reply_t) return int; -- /usr/include/xcb/xproto.h:7617 pragma Import (C, xcb_get_atom_name_name_length, "xcb_get_atom_name_name_length"); function xcb_get_atom_name_name_end (R : access xcb_get_atom_name_reply_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:7630 pragma Import (C, xcb_get_atom_name_name_end, "xcb_get_atom_name_name_end"); function xcb_get_atom_name_reply (c : xcb_connection_t_access; cookie : xcb_get_atom_name_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_atom_name_reply_t; -- /usr/include/xcb/xproto.h:7659 pragma Import (C, xcb_get_atom_name_reply, "xcb_get_atom_name_reply"); function xcb_change_property_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:7664 pragma Import (C, xcb_change_property_sizeof, "xcb_change_property_sizeof"); function xcb_change_property_checked (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; window : xcb_window_t; property : xcb_atom_t; c_type : xcb_atom_t; format : Libc.Stdint.uint8_t; data_len : Libc.Stdint.uint32_t; data : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7709 pragma Import (C, xcb_change_property_checked, "xcb_change_property_checked"); function xcb_change_property (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; window : xcb_window_t; property : xcb_atom_t; c_type : xcb_atom_t; format : Libc.Stdint.uint8_t; data_len : Libc.Stdint.uint32_t; data : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7758 pragma Import (C, xcb_change_property, "xcb_change_property"); function xcb_delete_property_checked (c : xcb_connection_t_access; window : xcb_window_t; property : xcb_atom_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7791 pragma Import (C, xcb_delete_property_checked, "xcb_delete_property_checked"); function xcb_delete_property (c : xcb_connection_t_access; window : xcb_window_t; property : xcb_atom_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:7816 pragma Import (C, xcb_delete_property, "xcb_delete_property"); function xcb_get_property_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:7821 pragma Import (C, xcb_get_property_sizeof, "xcb_get_property_sizeof"); function xcb_get_property (c : xcb_connection_t_access; u_delete : Libc.Stdint.uint8_t; window : xcb_window_t; property : xcb_atom_t; c_type : xcb_atom_t; long_offset : Libc.Stdint.uint32_t; long_length : Libc.Stdint.uint32_t) return xcb_get_property_cookie_t; -- /usr/include/xcb/xproto.h:7867 pragma Import (C, xcb_get_property, "xcb_get_property"); function xcb_get_property_unchecked (c : xcb_connection_t_access; u_delete : Libc.Stdint.uint8_t; window : xcb_window_t; property : xcb_atom_t; c_type : xcb_atom_t; long_offset : Libc.Stdint.uint32_t; long_length : Libc.Stdint.uint32_t) return xcb_get_property_cookie_t; -- /usr/include/xcb/xproto.h:7922 pragma Import (C, xcb_get_property_unchecked, "xcb_get_property_unchecked"); function xcb_get_property_value (R : access xcb_get_property_reply_t) return System.Address; -- /usr/include/xcb/xproto.h:7941 pragma Import (C, xcb_get_property_value, "xcb_get_property_value"); function xcb_get_property_value_length (R : access xcb_get_property_reply_t) return int; -- /usr/include/xcb/xproto.h:7954 pragma Import (C, xcb_get_property_value_length, "xcb_get_property_value_length"); function xcb_get_property_value_end (R : access xcb_get_property_reply_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:7967 pragma Import (C, xcb_get_property_value_end, "xcb_get_property_value_end"); function xcb_get_property_reply (c : xcb_connection_t_access; cookie : xcb_get_property_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_property_reply_t; -- /usr/include/xcb/xproto.h:7996 pragma Import (C, xcb_get_property_reply, "xcb_get_property_reply"); function xcb_list_properties_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:8001 pragma Import (C, xcb_list_properties_sizeof, "xcb_list_properties_sizeof"); function xcb_list_properties (c : xcb_connection_t_access; window : xcb_window_t) return xcb_list_properties_cookie_t; -- /usr/include/xcb/xproto.h:8023 pragma Import (C, xcb_list_properties, "xcb_list_properties"); function xcb_list_properties_unchecked (c : xcb_connection_t_access; window : xcb_window_t) return xcb_list_properties_cookie_t; -- /usr/include/xcb/xproto.h:8049 pragma Import (C, xcb_list_properties_unchecked, "xcb_list_properties_unchecked"); function xcb_list_properties_atoms (R : System.Address) return access xcb_atom_t; -- /usr/include/xcb/xproto.h:8063 pragma Import (C, xcb_list_properties_atoms, "xcb_list_properties_atoms"); function xcb_list_properties_atoms_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:8076 pragma Import (C, xcb_list_properties_atoms_length, "xcb_list_properties_atoms_length"); function xcb_list_properties_atoms_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:8089 pragma Import (C, xcb_list_properties_atoms_end, "xcb_list_properties_atoms_end"); function xcb_list_properties_reply (c : xcb_connection_t_access; cookie : xcb_list_properties_cookie_t; e : out xcb_generic_error_t_access) return access xcb_list_properties_reply_t; -- /usr/include/xcb/xproto.h:8118 pragma Import (C, xcb_list_properties_reply, "xcb_list_properties_reply"); function xcb_set_selection_owner_checked (c : xcb_connection_t_access; owner : xcb_window_t; selection : xcb_atom_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8163 pragma Import (C, xcb_set_selection_owner_checked, "xcb_set_selection_owner_checked"); function xcb_set_selection_owner (c : xcb_connection_t_access; owner : xcb_window_t; selection : xcb_atom_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8206 pragma Import (C, xcb_set_selection_owner, "xcb_set_selection_owner"); function xcb_get_selection_owner (c : xcb_connection_t_access; selection : xcb_atom_t) return xcb_get_selection_owner_cookie_t; -- /usr/include/xcb/xproto.h:8235 pragma Import (C, xcb_get_selection_owner, "xcb_get_selection_owner"); function xcb_get_selection_owner_unchecked (c : xcb_connection_t_access; selection : xcb_atom_t) return xcb_get_selection_owner_cookie_t; -- /usr/include/xcb/xproto.h:8265 pragma Import (C, xcb_get_selection_owner_unchecked, "xcb_get_selection_owner_unchecked"); function xcb_get_selection_owner_reply (c : xcb_connection_t_access; cookie : xcb_get_selection_owner_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_selection_owner_reply_t; -- /usr/include/xcb/xproto.h:8295 pragma Import (C, xcb_get_selection_owner_reply, "xcb_get_selection_owner_reply"); function xcb_convert_selection_checked (c : xcb_connection_t_access; requestor : xcb_window_t; selection : xcb_atom_t; target : xcb_atom_t; property : xcb_atom_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8326 pragma Import (C, xcb_convert_selection_checked, "xcb_convert_selection_checked"); function xcb_convert_selection (c : xcb_connection_t_access; requestor : xcb_window_t; selection : xcb_atom_t; target : xcb_atom_t; property : xcb_atom_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8357 pragma Import (C, xcb_convert_selection, "xcb_convert_selection"); function xcb_send_event_checked (c : xcb_connection_t_access; propagate : Libc.Stdint.uint8_t; destination : xcb_window_t; event_mask : Libc.Stdint.uint32_t; event : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8416 pragma Import (C, xcb_send_event_checked, "xcb_send_event_checked"); function xcb_send_event (c : xcb_connection_t_access; propagate : Libc.Stdint.uint8_t; destination : xcb_window_t; event_mask : Libc.Stdint.uint32_t; event : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8471 pragma Import (C, xcb_send_event, "xcb_send_event"); function xcb_grab_pointer (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; event_mask : Libc.Stdint.uint16_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t; confine_to : xcb_window_t; cursor : xcb_cursor_t; time : xcb_timestamp_t) return xcb_grab_pointer_cookie_t; -- /usr/include/xcb/xproto.h:8532 pragma Import (C, xcb_grab_pointer, "xcb_grab_pointer"); function xcb_grab_pointer_unchecked (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; event_mask : Libc.Stdint.uint16_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t; confine_to : xcb_window_t; cursor : xcb_cursor_t; time : xcb_timestamp_t) return xcb_grab_pointer_cookie_t; -- /usr/include/xcb/xproto.h:8600 pragma Import (C, xcb_grab_pointer_unchecked, "xcb_grab_pointer_unchecked"); function xcb_grab_pointer_reply (c : xcb_connection_t_access; cookie : xcb_grab_pointer_cookie_t; e : out xcb_generic_error_t_access) return access xcb_grab_pointer_reply_t; -- /usr/include/xcb/xproto.h:8637 pragma Import (C, xcb_grab_pointer_reply, "xcb_grab_pointer_reply"); function xcb_ungrab_pointer_checked (c : xcb_connection_t_access; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8673 pragma Import (C, xcb_ungrab_pointer_checked, "xcb_ungrab_pointer_checked"); function xcb_ungrab_pointer (c : xcb_connection_t_access; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8705 pragma Import (C, xcb_ungrab_pointer, "xcb_ungrab_pointer"); function xcb_grab_button_checked (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; event_mask : Libc.Stdint.uint16_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t; confine_to : xcb_window_t; cursor : xcb_cursor_t; button : Libc.Stdint.uint8_t; modifiers : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8796 pragma Import (C, xcb_grab_button_checked, "xcb_grab_button_checked"); function xcb_grab_button (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; event_mask : Libc.Stdint.uint16_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t; confine_to : xcb_window_t; cursor : xcb_cursor_t; button : Libc.Stdint.uint8_t; modifiers : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8892 pragma Import (C, xcb_grab_button, "xcb_grab_button"); function xcb_ungrab_button_checked (c : xcb_connection_t_access; button : Libc.Stdint.uint8_t; grab_window : xcb_window_t; modifiers : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8928 pragma Import (C, xcb_ungrab_button_checked, "xcb_ungrab_button_checked"); function xcb_ungrab_button (c : xcb_connection_t_access; button : Libc.Stdint.uint8_t; grab_window : xcb_window_t; modifiers : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8955 pragma Import (C, xcb_ungrab_button, "xcb_ungrab_button"); function xcb_change_active_pointer_grab_checked (c : xcb_connection_t_access; cursor : xcb_cursor_t; time : xcb_timestamp_t; event_mask : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:8985 pragma Import (C, xcb_change_active_pointer_grab_checked, "xcb_change_active_pointer_grab_checked"); function xcb_change_active_pointer_grab (c : xcb_connection_t_access; cursor : xcb_cursor_t; time : xcb_timestamp_t; event_mask : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9012 pragma Import (C, xcb_change_active_pointer_grab, "xcb_change_active_pointer_grab"); function xcb_grab_keyboard (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; time : xcb_timestamp_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t) return xcb_grab_keyboard_cookie_t; -- /usr/include/xcb/xproto.h:9062 pragma Import (C, xcb_grab_keyboard, "xcb_grab_keyboard"); function xcb_grab_keyboard_unchecked (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; time : xcb_timestamp_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t) return xcb_grab_keyboard_cookie_t; -- /usr/include/xcb/xproto.h:9117 pragma Import (C, xcb_grab_keyboard_unchecked, "xcb_grab_keyboard_unchecked"); function xcb_grab_keyboard_reply (c : xcb_connection_t_access; cookie : xcb_grab_keyboard_cookie_t; e : out xcb_generic_error_t_access) return access xcb_grab_keyboard_reply_t; -- /usr/include/xcb/xproto.h:9151 pragma Import (C, xcb_grab_keyboard_reply, "xcb_grab_keyboard_reply"); function xcb_ungrab_keyboard_checked (c : xcb_connection_t_access; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9178 pragma Import (C, xcb_ungrab_keyboard_checked, "xcb_ungrab_keyboard_checked"); function xcb_ungrab_keyboard (c : xcb_connection_t_access; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9201 pragma Import (C, xcb_ungrab_keyboard, "xcb_ungrab_keyboard"); function xcb_grab_key_checked (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; modifiers : Libc.Stdint.uint16_t; key : xcb_keycode_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9276 pragma Import (C, xcb_grab_key_checked, "xcb_grab_key_checked"); function xcb_grab_key (c : xcb_connection_t_access; owner_events : Libc.Stdint.uint8_t; grab_window : xcb_window_t; modifiers : Libc.Stdint.uint16_t; key : xcb_keycode_t; pointer_mode : Libc.Stdint.uint8_t; keyboard_mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9353 pragma Import (C, xcb_grab_key, "xcb_grab_key"); function xcb_ungrab_key_checked (c : xcb_connection_t_access; key : xcb_keycode_t; grab_window : xcb_window_t; modifiers : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9396 pragma Import (C, xcb_ungrab_key_checked, "xcb_ungrab_key_checked"); function xcb_ungrab_key (c : xcb_connection_t_access; key : xcb_keycode_t; grab_window : xcb_window_t; modifiers : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9433 pragma Import (C, xcb_ungrab_key, "xcb_ungrab_key"); function xcb_allow_events_checked (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9472 pragma Import (C, xcb_allow_events_checked, "xcb_allow_events_checked"); function xcb_allow_events (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9507 pragma Import (C, xcb_allow_events, "xcb_allow_events"); function xcb_grab_server_checked (c : xcb_connection_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9533 pragma Import (C, xcb_grab_server_checked, "xcb_grab_server_checked"); function xcb_grab_server (c : xcb_connection_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9554 pragma Import (C, xcb_grab_server, "xcb_grab_server"); function xcb_ungrab_server_checked (c : xcb_connection_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9578 pragma Import (C, xcb_ungrab_server_checked, "xcb_ungrab_server_checked"); function xcb_ungrab_server (c : xcb_connection_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:9599 pragma Import (C, xcb_ungrab_server, "xcb_ungrab_server"); function xcb_query_pointer (c : xcb_connection_t_access; window : xcb_window_t) return xcb_query_pointer_cookie_t; -- /usr/include/xcb/xproto.h:9625 pragma Import (C, xcb_query_pointer, "xcb_query_pointer"); function xcb_query_pointer_unchecked (c : xcb_connection_t_access; window : xcb_window_t) return xcb_query_pointer_cookie_t; -- /usr/include/xcb/xproto.h:9655 pragma Import (C, xcb_query_pointer_unchecked, "xcb_query_pointer_unchecked"); function xcb_query_pointer_reply (c : xcb_connection_t_access; cookie : xcb_query_pointer_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_pointer_reply_t; -- /usr/include/xcb/xproto.h:9685 pragma Import (C, xcb_query_pointer_reply, "xcb_query_pointer_reply"); procedure xcb_timecoord_next (i : access xcb_timecoord_iterator_t); -- /usr/include/xcb/xproto.h:9708 pragma Import (C, xcb_timecoord_next, "xcb_timecoord_next"); function xcb_timecoord_end (i : xcb_timecoord_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:9730 pragma Import (C, xcb_timecoord_end, "xcb_timecoord_end"); function xcb_get_motion_events_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:9733 pragma Import (C, xcb_get_motion_events_sizeof, "xcb_get_motion_events_sizeof"); function xcb_get_motion_events (c : xcb_connection_t_access; window : xcb_window_t; start : xcb_timestamp_t; stop : xcb_timestamp_t) return xcb_get_motion_events_cookie_t; -- /usr/include/xcb/xproto.h:9757 pragma Import (C, xcb_get_motion_events, "xcb_get_motion_events"); function xcb_get_motion_events_unchecked (c : xcb_connection_t_access; window : xcb_window_t; start : xcb_timestamp_t; stop : xcb_timestamp_t) return xcb_get_motion_events_cookie_t; -- /usr/include/xcb/xproto.h:9787 pragma Import (C, xcb_get_motion_events_unchecked, "xcb_get_motion_events_unchecked"); function xcb_get_motion_events_events (R : access xcb_get_motion_events_reply_t) return access xcb_timecoord_t; -- /usr/include/xcb/xproto.h:9803 pragma Import (C, xcb_get_motion_events_events, "xcb_get_motion_events_events"); function xcb_get_motion_events_events_length (R : access xcb_get_motion_events_reply_t) return int; -- /usr/include/xcb/xproto.h:9816 pragma Import (C, xcb_get_motion_events_events_length, "xcb_get_motion_events_events_length"); function xcb_get_motion_events_events_iterator (R : access xcb_get_motion_events_reply_t) return xcb_timecoord_iterator_t; -- /usr/include/xcb/xproto.h:9829 pragma Import (C, xcb_get_motion_events_events_iterator, "xcb_get_motion_events_events_iterator"); function xcb_get_motion_events_reply (c : xcb_connection_t_access; cookie : xcb_get_motion_events_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_motion_events_reply_t; -- /usr/include/xcb/xproto.h:9858 pragma Import (C, xcb_get_motion_events_reply, "xcb_get_motion_events_reply"); function xcb_translate_coordinates (c : xcb_connection_t_access; src_window : xcb_window_t; dst_window : xcb_window_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t) return xcb_translate_coordinates_cookie_t; -- /usr/include/xcb/xproto.h:9885 pragma Import (C, xcb_translate_coordinates, "xcb_translate_coordinates"); function xcb_translate_coordinates_unchecked (c : xcb_connection_t_access; src_window : xcb_window_t; dst_window : xcb_window_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t) return xcb_translate_coordinates_cookie_t; -- /usr/include/xcb/xproto.h:9917 pragma Import (C, xcb_translate_coordinates_unchecked, "xcb_translate_coordinates_unchecked"); function xcb_translate_coordinates_reply (c : xcb_connection_t_access; cookie : xcb_translate_coordinates_cookie_t; e : out xcb_generic_error_t_access) return access xcb_translate_coordinates_reply_t; -- /usr/include/xcb/xproto.h:9950 pragma Import (C, xcb_translate_coordinates_reply, "xcb_translate_coordinates_reply"); function xcb_warp_pointer_checked (c : xcb_connection_t_access; src_window : xcb_window_t; dst_window : xcb_window_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t; src_width : Libc.Stdint.uint16_t; src_height : Libc.Stdint.uint16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10003 pragma Import (C, xcb_warp_pointer_checked, "xcb_warp_pointer_checked"); function xcb_warp_pointer (c : xcb_connection_t_access; src_window : xcb_window_t; dst_window : xcb_window_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t; src_width : Libc.Stdint.uint16_t; src_height : Libc.Stdint.uint16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10059 pragma Import (C, xcb_warp_pointer, "xcb_warp_pointer"); function xcb_set_input_focus_checked (c : xcb_connection_t_access; revert_to : Libc.Stdint.uint8_t; focus : xcb_window_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10114 pragma Import (C, xcb_set_input_focus_checked, "xcb_set_input_focus_checked"); function xcb_set_input_focus (c : xcb_connection_t_access; revert_to : Libc.Stdint.uint8_t; focus : xcb_window_t; time : xcb_timestamp_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10161 pragma Import (C, xcb_set_input_focus, "xcb_set_input_focus"); function xcb_get_input_focus (c : xcb_connection_t) return xcb_get_input_focus_cookie_t; -- /usr/include/xcb/xproto.h:10185 pragma Import (C, xcb_get_input_focus, "xcb_get_input_focus"); function xcb_get_input_focus_unchecked (c : xcb_connection_t) return xcb_get_input_focus_cookie_t; -- /usr/include/xcb/xproto.h:10209 pragma Import (C, xcb_get_input_focus_unchecked, "xcb_get_input_focus_unchecked"); function xcb_get_input_focus_reply (c : xcb_connection_t_access; cookie : xcb_get_input_focus_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_input_focus_reply_t; -- /usr/include/xcb/xproto.h:10238 pragma Import (C, xcb_get_input_focus_reply, "xcb_get_input_focus_reply"); function xcb_query_keymap (c : xcb_connection_t) return xcb_query_keymap_cookie_t; -- /usr/include/xcb/xproto.h:10261 pragma Import (C, xcb_query_keymap, "xcb_query_keymap"); function xcb_query_keymap_unchecked (c : xcb_connection_t) return xcb_query_keymap_cookie_t; -- /usr/include/xcb/xproto.h:10285 pragma Import (C, xcb_query_keymap_unchecked, "xcb_query_keymap_unchecked"); function xcb_query_keymap_reply (c : xcb_connection_t_access; cookie : xcb_query_keymap_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_keymap_reply_t; -- /usr/include/xcb/xproto.h:10314 pragma Import (C, xcb_query_keymap_reply, "xcb_query_keymap_reply"); function xcb_open_font_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:10319 pragma Import (C, xcb_open_font_sizeof, "xcb_open_font_sizeof"); function xcb_open_font_checked (c : xcb_connection_t_access; fid : xcb_font_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10353 pragma Import (C, xcb_open_font_checked, "xcb_open_font_checked"); function xcb_open_font (c : xcb_connection_t_access; fid : xcb_font_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10387 pragma Import (C, xcb_open_font, "xcb_open_font"); function xcb_close_font_checked (c : xcb_connection_t_access; font : xcb_font_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10415 pragma Import (C, xcb_close_font_checked, "xcb_close_font_checked"); function xcb_close_font (c : xcb_connection_t_access; font : xcb_font_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:10438 pragma Import (C, xcb_close_font, "xcb_close_font"); procedure xcb_fontprop_next (i : access xcb_fontprop_iterator_t); -- /usr/include/xcb/xproto.h:10460 pragma Import (C, xcb_fontprop_next, "xcb_fontprop_next"); function xcb_fontprop_end (i : xcb_fontprop_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:10482 pragma Import (C, xcb_fontprop_end, "xcb_fontprop_end"); procedure xcb_charinfo_next (i : access xcb_charinfo_iterator_t); -- /usr/include/xcb/xproto.h:10503 pragma Import (C, xcb_charinfo_next, "xcb_charinfo_next"); function xcb_charinfo_end (i : xcb_charinfo_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:10525 pragma Import (C, xcb_charinfo_end, "xcb_charinfo_end"); function xcb_query_font_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:10528 pragma Import (C, xcb_query_font_sizeof, "xcb_query_font_sizeof"); function xcb_query_font (c : xcb_connection_t_access; font : xcb_fontable_t) return xcb_query_font_cookie_t; -- /usr/include/xcb/xproto.h:10552 pragma Import (C, xcb_query_font, "xcb_query_font"); function xcb_query_font_unchecked (c : xcb_connection_t_access; font : xcb_fontable_t) return xcb_query_font_cookie_t; -- /usr/include/xcb/xproto.h:10580 pragma Import (C, xcb_query_font_unchecked, "xcb_query_font_unchecked"); function xcb_query_font_properties (R : access xcb_query_font_reply_t) return access xcb_fontprop_t; -- /usr/include/xcb/xproto.h:10594 pragma Import (C, xcb_query_font_properties, "xcb_query_font_properties"); function xcb_query_font_properties_length (R : access xcb_query_font_reply_t) return int; -- /usr/include/xcb/xproto.h:10607 pragma Import (C, xcb_query_font_properties_length, "xcb_query_font_properties_length"); function xcb_query_font_properties_iterator (R : access xcb_query_font_reply_t) return xcb_fontprop_iterator_t; -- /usr/include/xcb/xproto.h:10620 pragma Import (C, xcb_query_font_properties_iterator, "xcb_query_font_properties_iterator"); function xcb_query_font_char_infos (R : access xcb_query_font_reply_t) return access xcb_charinfo_t; -- /usr/include/xcb/xproto.h:10633 pragma Import (C, xcb_query_font_char_infos, "xcb_query_font_char_infos"); function xcb_query_font_char_infos_length (R : access xcb_query_font_reply_t) return int; -- /usr/include/xcb/xproto.h:10646 pragma Import (C, xcb_query_font_char_infos_length, "xcb_query_font_char_infos_length"); function xcb_query_font_char_infos_iterator (R : access xcb_query_font_reply_t) return xcb_charinfo_iterator_t; -- /usr/include/xcb/xproto.h:10659 pragma Import (C, xcb_query_font_char_infos_iterator, "xcb_query_font_char_infos_iterator"); function xcb_query_font_reply (c : xcb_connection_t_access; cookie : xcb_query_font_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_font_reply_t; -- /usr/include/xcb/xproto.h:10688 pragma Import (C, xcb_query_font_reply, "xcb_query_font_reply"); function xcb_query_text_extents_sizeof (u_buffer : System.Address; string_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:10693 pragma Import (C, xcb_query_text_extents_sizeof, "xcb_query_text_extents_sizeof"); function xcb_query_text_extents (c : xcb_connection_t_access; font : xcb_fontable_t; string_len : Libc.Stdint.uint32_t; string : System.Address) return xcb_query_text_extents_cookie_t; -- /usr/include/xcb/xproto.h:10742 pragma Import (C, xcb_query_text_extents, "xcb_query_text_extents"); function xcb_query_text_extents_unchecked (c : xcb_connection_t_access; font : xcb_fontable_t; string_len : Libc.Stdint.uint32_t; string : System.Address) return xcb_query_text_extents_cookie_t; -- /usr/include/xcb/xproto.h:10796 pragma Import (C, xcb_query_text_extents_unchecked, "xcb_query_text_extents_unchecked"); function xcb_query_text_extents_reply (c : xcb_connection_t_access; cookie : xcb_query_text_extents_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_text_extents_reply_t; -- /usr/include/xcb/xproto.h:10828 pragma Import (C, xcb_query_text_extents_reply, "xcb_query_text_extents_reply"); function xcb_str_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:10833 pragma Import (C, xcb_str_sizeof, "xcb_str_sizeof"); function xcb_str_name (R : access xcb_str_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xproto.h:10846 pragma Import (C, xcb_str_name, "xcb_str_name"); function xcb_str_name_length (R : access xcb_str_t) return int; -- /usr/include/xcb/xproto.h:10859 pragma Import (C, xcb_str_name_length, "xcb_str_name_length"); function xcb_str_name_end (R : access xcb_str_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:10872 pragma Import (C, xcb_str_name_end, "xcb_str_name_end"); procedure xcb_str_next (i : access xcb_str_iterator_t); -- /usr/include/xcb/xproto.h:10893 pragma Import (C, xcb_str_next, "xcb_str_next"); function xcb_str_end (i : xcb_str_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:10915 pragma Import (C, xcb_str_end, "xcb_str_end"); function xcb_list_fonts_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:10918 pragma Import (C, xcb_list_fonts_sizeof, "xcb_list_fonts_sizeof"); function xcb_list_fonts (c : xcb_connection_t_access; max_names : Libc.Stdint.uint16_t; pattern_len : Libc.Stdint.uint16_t; pattern : Interfaces.C.Strings.chars_ptr) return xcb_list_fonts_cookie_t; -- /usr/include/xcb/xproto.h:10950 pragma Import (C, xcb_list_fonts, "xcb_list_fonts"); function xcb_list_fonts_unchecked (c : xcb_connection_t_access; max_names : Libc.Stdint.uint16_t; pattern_len : Libc.Stdint.uint16_t; pattern : Interfaces.C.Strings.chars_ptr) return xcb_list_fonts_cookie_t; -- /usr/include/xcb/xproto.h:10988 pragma Import (C, xcb_list_fonts_unchecked, "xcb_list_fonts_unchecked"); function xcb_list_fonts_names_length (R : access xcb_list_fonts_reply_t) return int; -- /usr/include/xcb/xproto.h:11004 pragma Import (C, xcb_list_fonts_names_length, "xcb_list_fonts_names_length"); function xcb_list_fonts_names_iterator (R : access xcb_list_fonts_reply_t) return xcb_str_iterator_t; -- /usr/include/xcb/xproto.h:11017 pragma Import (C, xcb_list_fonts_names_iterator, "xcb_list_fonts_names_iterator"); function xcb_list_fonts_reply (c : xcb_connection_t_access; cookie : xcb_list_fonts_cookie_t; e : out xcb_generic_error_t_access) return access xcb_list_fonts_reply_t; -- /usr/include/xcb/xproto.h:11046 pragma Import (C, xcb_list_fonts_reply, "xcb_list_fonts_reply"); function xcb_list_fonts_with_info_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:11051 pragma Import (C, xcb_list_fonts_with_info_sizeof, "xcb_list_fonts_with_info_sizeof"); function xcb_list_fonts_with_info (c : xcb_connection_t_access; max_names : Libc.Stdint.uint16_t; pattern_len : Libc.Stdint.uint16_t; pattern : Interfaces.C.Strings.chars_ptr) return xcb_list_fonts_with_info_cookie_t; -- /usr/include/xcb/xproto.h:11083 pragma Import (C, xcb_list_fonts_with_info, "xcb_list_fonts_with_info"); function xcb_list_fonts_with_info_unchecked (c : xcb_connection_t_access; max_names : Libc.Stdint.uint16_t; pattern_len : Libc.Stdint.uint16_t; pattern : Interfaces.C.Strings.chars_ptr) return xcb_list_fonts_with_info_cookie_t; -- /usr/include/xcb/xproto.h:11121 pragma Import (C, xcb_list_fonts_with_info_unchecked, "xcb_list_fonts_with_info_unchecked"); function xcb_list_fonts_with_info_properties (R : access xcb_list_fonts_with_info_reply_t) return access xcb_fontprop_t; -- /usr/include/xcb/xproto.h:11137 pragma Import (C, xcb_list_fonts_with_info_properties, "xcb_list_fonts_with_info_properties"); function xcb_list_fonts_with_info_properties_length (R : access xcb_list_fonts_with_info_reply_t) return int; -- /usr/include/xcb/xproto.h:11150 pragma Import (C, xcb_list_fonts_with_info_properties_length, "xcb_list_fonts_with_info_properties_length"); function xcb_list_fonts_with_info_properties_iterator (R : access xcb_list_fonts_with_info_reply_t) return xcb_fontprop_iterator_t; -- /usr/include/xcb/xproto.h:11163 pragma Import (C, xcb_list_fonts_with_info_properties_iterator, "xcb_list_fonts_with_info_properties_iterator"); function xcb_list_fonts_with_info_name (R : access xcb_list_fonts_with_info_reply_t) return Interfaces.C.Strings .chars_ptr; -- /usr/include/xcb/xproto.h:11176 pragma Import (C, xcb_list_fonts_with_info_name, "xcb_list_fonts_with_info_name"); function xcb_list_fonts_with_info_name_length (R : access xcb_list_fonts_with_info_reply_t) return int; -- /usr/include/xcb/xproto.h:11189 pragma Import (C, xcb_list_fonts_with_info_name_length, "xcb_list_fonts_with_info_name_length"); function xcb_list_fonts_with_info_name_end (R : access xcb_list_fonts_with_info_reply_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:11202 pragma Import (C, xcb_list_fonts_with_info_name_end, "xcb_list_fonts_with_info_name_end"); function xcb_list_fonts_with_info_reply (c : xcb_connection_t_access; cookie : xcb_list_fonts_with_info_cookie_t; e : out xcb_generic_error_t_access) return access xcb_list_fonts_with_info_reply_t; -- /usr/include/xcb/xproto.h:11231 pragma Import (C, xcb_list_fonts_with_info_reply, "xcb_list_fonts_with_info_reply"); function xcb_set_font_path_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:11236 pragma Import (C, xcb_set_font_path_sizeof, "xcb_set_font_path_sizeof"); function xcb_set_font_path_checked (c : xcb_connection_t_access; font_qty : Libc.Stdint.uint16_t; font : access xcb_str_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11262 pragma Import (C, xcb_set_font_path_checked, "xcb_set_font_path_checked"); function xcb_set_font_path (c : xcb_connection_t_access; font_qty : Libc.Stdint.uint16_t; font : access xcb_str_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11287 pragma Import (C, xcb_set_font_path, "xcb_set_font_path"); function xcb_get_font_path_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:11292 pragma Import (C, xcb_get_font_path_sizeof, "xcb_get_font_path_sizeof"); function xcb_get_font_path (c : xcb_connection_t) return xcb_get_font_path_cookie_t; -- /usr/include/xcb/xproto.h:11313 pragma Import (C, xcb_get_font_path, "xcb_get_font_path"); function xcb_get_font_path_unchecked (c : xcb_connection_t) return xcb_get_font_path_cookie_t; -- /usr/include/xcb/xproto.h:11337 pragma Import (C, xcb_get_font_path_unchecked, "xcb_get_font_path_unchecked"); function xcb_get_font_path_path_length (R : access xcb_get_font_path_reply_t) return int; -- /usr/include/xcb/xproto.h:11350 pragma Import (C, xcb_get_font_path_path_length, "xcb_get_font_path_path_length"); function xcb_get_font_path_path_iterator (R : access xcb_get_font_path_reply_t) return xcb_str_iterator_t; -- /usr/include/xcb/xproto.h:11363 pragma Import (C, xcb_get_font_path_path_iterator, "xcb_get_font_path_path_iterator"); function xcb_get_font_path_reply (c : xcb_connection_t_access; cookie : xcb_get_font_path_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_font_path_reply_t; -- /usr/include/xcb/xproto.h:11392 pragma Import (C, xcb_get_font_path_reply, "xcb_get_font_path_reply"); function xcb_create_pixmap_checked (c : xcb_connection_t_access; depth : Libc.Stdint.uint8_t; pid : xcb_pixmap_t; drawable : xcb_drawable_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11431 pragma Import (C, xcb_create_pixmap_checked, "xcb_create_pixmap_checked"); function xcb_create_pixmap (c : xcb_connection_t_access; depth : Libc.Stdint.uint8_t; pid : xcb_pixmap_t; drawable : xcb_drawable_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11470 pragma Import (C, xcb_create_pixmap, "xcb_create_pixmap"); function xcb_free_pixmap_checked (c : xcb_connection_t_access; pixmap : xcb_pixmap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11503 pragma Import (C, xcb_free_pixmap_checked, "xcb_free_pixmap_checked"); function xcb_free_pixmap (c : xcb_connection_t_access; pixmap : xcb_pixmap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11529 pragma Import (C, xcb_free_pixmap, "xcb_free_pixmap"); function xcb_create_gc_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:11533 pragma Import (C, xcb_create_gc_sizeof, "xcb_create_gc_sizeof"); function xcb_create_gc_checked (c : xcb_connection_t_access; cid : xcb_gcontext_t; drawable : xcb_drawable_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11566 pragma Import (C, xcb_create_gc_checked, "xcb_create_gc_checked"); function xcb_create_gc (c : xcb_connection_t_access; cid : xcb_gcontext_t; drawable : xcb_drawable_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11600 pragma Import (C, xcb_create_gc, "xcb_create_gc"); function xcb_change_gc_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:11607 pragma Import (C, xcb_change_gc_sizeof, "xcb_change_gc_sizeof"); function xcb_change_gc_checked (c : xcb_connection_t_access; gc : xcb_gcontext_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11641 pragma Import (C, xcb_change_gc_checked, "xcb_change_gc_checked"); function xcb_change_gc (c : xcb_connection_t_access; gc : xcb_gcontext_t; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11675 pragma Import (C, xcb_change_gc, "xcb_change_gc"); function xcb_copy_gc_checked (c : xcb_connection_t_access; src_gc : xcb_gcontext_t; dst_gc : xcb_gcontext_t; value_mask : Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11705 pragma Import (C, xcb_copy_gc_checked, "xcb_copy_gc_checked"); function xcb_copy_gc (c : xcb_connection_t_access; src_gc : xcb_gcontext_t; dst_gc : xcb_gcontext_t; value_mask : Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11732 pragma Import (C, xcb_copy_gc, "xcb_copy_gc"); function xcb_set_dashes_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:11738 pragma Import (C, xcb_set_dashes_sizeof, "xcb_set_dashes_sizeof"); function xcb_set_dashes_checked (c : xcb_connection_t_access; gc : xcb_gcontext_t; dash_offset : Libc.Stdint.uint16_t; dashes_len : Libc.Stdint.uint16_t; dashes : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11766 pragma Import (C, xcb_set_dashes_checked, "xcb_set_dashes_checked"); function xcb_set_dashes (c : xcb_connection_t_access; gc : xcb_gcontext_t; dash_offset : Libc.Stdint.uint16_t; dashes_len : Libc.Stdint.uint16_t; dashes : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11795 pragma Import (C, xcb_set_dashes, "xcb_set_dashes"); function xcb_set_clip_rectangles_sizeof (u_buffer : System.Address; rectangles_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:11802 pragma Import (C, xcb_set_clip_rectangles_sizeof, "xcb_set_clip_rectangles_sizeof"); function xcb_set_clip_rectangles_checked (c : xcb_connection_t_access; ordering : Libc.Stdint.uint8_t; gc : xcb_gcontext_t; clip_x_origin : Libc.Stdint.int16_t; clip_y_origin : Libc.Stdint.int16_t; rectangles_len : Libc.Stdint.uint32_t; rectangles : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11833 pragma Import (C, xcb_set_clip_rectangles_checked, "xcb_set_clip_rectangles_checked"); function xcb_set_clip_rectangles (c : xcb_connection_t_access; ordering : Libc.Stdint.uint8_t; gc : xcb_gcontext_t; clip_x_origin : Libc.Stdint.int16_t; clip_y_origin : Libc.Stdint.int16_t; rectangles_len : Libc.Stdint.uint32_t; rectangles : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11866 pragma Import (C, xcb_set_clip_rectangles, "xcb_set_clip_rectangles"); function xcb_free_gc_checked (c : xcb_connection_t_access; gc : xcb_gcontext_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11899 pragma Import (C, xcb_free_gc_checked, "xcb_free_gc_checked"); function xcb_free_gc (c : xcb_connection_t_access; gc : xcb_gcontext_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11924 pragma Import (C, xcb_free_gc, "xcb_free_gc"); function xcb_clear_area_checked (c : xcb_connection_t_access; exposures : Libc.Stdint.uint8_t; window : xcb_window_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11955 pragma Import (C, xcb_clear_area_checked, "xcb_clear_area_checked"); function xcb_clear_area (c : xcb_connection_t_access; exposures : Libc.Stdint.uint8_t; window : xcb_window_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:11988 pragma Import (C, xcb_clear_area, "xcb_clear_area"); function xcb_copy_area_checked (c : xcb_connection_t_access; src_drawable : xcb_drawable_t; dst_drawable : xcb_drawable_t; gc : xcb_gcontext_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12037 pragma Import (C, xcb_copy_area_checked, "xcb_copy_area_checked"); function xcb_copy_area (c : xcb_connection_t_access; src_drawable : xcb_drawable_t; dst_drawable : xcb_drawable_t; gc : xcb_gcontext_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12086 pragma Import (C, xcb_copy_area, "xcb_copy_area"); function xcb_copy_plane_checked (c : xcb_connection_t_access; src_drawable : xcb_drawable_t; dst_drawable : xcb_drawable_t; gc : xcb_gcontext_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; bit_plane : Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12129 pragma Import (C, xcb_copy_plane_checked, "xcb_copy_plane_checked"); function xcb_copy_plane (c : xcb_connection_t_access; src_drawable : xcb_drawable_t; dst_drawable : xcb_drawable_t; gc : xcb_gcontext_t; src_x : Libc.Stdint.int16_t; src_y : Libc.Stdint.int16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; bit_plane : Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12170 pragma Import (C, xcb_copy_plane, "xcb_copy_plane"); function xcb_poly_point_sizeof (u_buffer : System.Address; points_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12183 pragma Import (C, xcb_poly_point_sizeof, "xcb_poly_point_sizeof"); function xcb_poly_point_checked (c : xcb_connection_t_access; coordinate_mode : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; points_len : Libc.Stdint.uint32_t; points : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12213 pragma Import (C, xcb_poly_point_checked, "xcb_poly_point_checked"); function xcb_poly_point (c : xcb_connection_t_access; coordinate_mode : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; points_len : Libc.Stdint.uint32_t; points : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12244 pragma Import (C, xcb_poly_point, "xcb_poly_point"); function xcb_poly_line_sizeof (u_buffer : System.Address; points_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12252 pragma Import (C, xcb_poly_line_sizeof, "xcb_poly_line_sizeof"); function xcb_poly_line_checked (c : xcb_connection_t_access; coordinate_mode : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; points_len : Libc.Stdint.uint32_t; points : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12296 pragma Import (C, xcb_poly_line_checked, "xcb_poly_line_checked"); function xcb_poly_line (c : xcb_connection_t_access; coordinate_mode : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; points_len : Libc.Stdint.uint32_t; points : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12341 pragma Import (C, xcb_poly_line, "xcb_poly_line"); procedure xcb_segment_next (i : access xcb_segment_iterator_t); -- /usr/include/xcb/xproto.h:12367 pragma Import (C, xcb_segment_next, "xcb_segment_next"); function xcb_segment_end (i : xcb_segment_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:12389 pragma Import (C, xcb_segment_end, "xcb_segment_end"); function xcb_poly_segment_sizeof (u_buffer : System.Address; segments_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12392 pragma Import (C, xcb_poly_segment_sizeof, "xcb_poly_segment_sizeof"); function xcb_poly_segment_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; segments_len : Libc.Stdint.uint32_t; segments : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12436 pragma Import (C, xcb_poly_segment_checked, "xcb_poly_segment_checked"); function xcb_poly_segment (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; segments_len : Libc.Stdint.uint32_t; segments : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12480 pragma Import (C, xcb_poly_segment, "xcb_poly_segment"); function xcb_poly_rectangle_sizeof (u_buffer : System.Address; rectangles_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12487 pragma Import (C, xcb_poly_rectangle_sizeof, "xcb_poly_rectangle_sizeof"); function xcb_poly_rectangle_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; rectangles_len : Libc.Stdint.uint32_t; rectangles : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12516 pragma Import (C, xcb_poly_rectangle_checked, "xcb_poly_rectangle_checked"); function xcb_poly_rectangle (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; rectangles_len : Libc.Stdint.uint32_t; rectangles : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12545 pragma Import (C, xcb_poly_rectangle, "xcb_poly_rectangle"); function xcb_poly_arc_sizeof (u_buffer : System.Address; arcs_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12552 pragma Import (C, xcb_poly_arc_sizeof, "xcb_poly_arc_sizeof"); function xcb_poly_arc_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; arcs_len : Libc.Stdint.uint32_t; arcs : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12581 pragma Import (C, xcb_poly_arc_checked, "xcb_poly_arc_checked"); function xcb_poly_arc (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; arcs_len : Libc.Stdint.uint32_t; arcs : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12610 pragma Import (C, xcb_poly_arc, "xcb_poly_arc"); function xcb_fill_poly_sizeof (u_buffer : System.Address; points_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12617 pragma Import (C, xcb_fill_poly_sizeof, "xcb_fill_poly_sizeof"); function xcb_fill_poly_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; shape : Libc.Stdint.uint8_t; coordinate_mode : Libc.Stdint.uint8_t; points_len : Libc.Stdint.uint32_t; points : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12648 pragma Import (C, xcb_fill_poly_checked, "xcb_fill_poly_checked"); function xcb_fill_poly (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; shape : Libc.Stdint.uint8_t; coordinate_mode : Libc.Stdint.uint8_t; points_len : Libc.Stdint.uint32_t; points : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12681 pragma Import (C, xcb_fill_poly, "xcb_fill_poly"); function xcb_poly_fill_rectangle_sizeof (u_buffer : System.Address; rectangles_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12690 pragma Import (C, xcb_poly_fill_rectangle_sizeof, "xcb_poly_fill_rectangle_sizeof"); function xcb_poly_fill_rectangle_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; rectangles_len : Libc.Stdint.uint32_t; rectangles : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12733 pragma Import (C, xcb_poly_fill_rectangle_checked, "xcb_poly_fill_rectangle_checked"); function xcb_poly_fill_rectangle (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; rectangles_len : Libc.Stdint.uint32_t; rectangles : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12776 pragma Import (C, xcb_poly_fill_rectangle, "xcb_poly_fill_rectangle"); function xcb_poly_fill_arc_sizeof (u_buffer : System.Address; arcs_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12783 pragma Import (C, xcb_poly_fill_arc_sizeof, "xcb_poly_fill_arc_sizeof"); function xcb_poly_fill_arc_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; arcs_len : Libc.Stdint.uint32_t; arcs : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12812 pragma Import (C, xcb_poly_fill_arc_checked, "xcb_poly_fill_arc_checked"); function xcb_poly_fill_arc (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; arcs_len : Libc.Stdint.uint32_t; arcs : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12841 pragma Import (C, xcb_poly_fill_arc, "xcb_poly_fill_arc"); function xcb_put_image_sizeof (u_buffer : System.Address; data_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:12848 pragma Import (C, xcb_put_image_sizeof, "xcb_put_image_sizeof"); function xcb_put_image_checked (c : xcb_connection_t_access; format : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t; left_pad : Libc.Stdint.uint8_t; depth : Libc.Stdint.uint8_t; data_len : Libc.Stdint.uint32_t; data : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12884 pragma Import (C, xcb_put_image_checked, "xcb_put_image_checked"); function xcb_put_image (c : xcb_connection_t_access; format : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; dst_x : Libc.Stdint.int16_t; dst_y : Libc.Stdint.int16_t; left_pad : Libc.Stdint.uint8_t; depth : Libc.Stdint.uint8_t; data_len : Libc.Stdint.uint32_t; data : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:12927 pragma Import (C, xcb_put_image, "xcb_put_image"); function xcb_get_image_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:12941 pragma Import (C, xcb_get_image_sizeof, "xcb_get_image_sizeof"); function xcb_get_image (c : xcb_connection_t_access; format : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; plane_mask : Libc.Stdint.uint32_t) return xcb_get_image_cookie_t; -- /usr/include/xcb/xproto.h:12969 pragma Import (C, xcb_get_image, "xcb_get_image"); function xcb_get_image_unchecked (c : xcb_connection_t_access; format : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t; plane_mask : Libc.Stdint.uint32_t) return xcb_get_image_cookie_t; -- /usr/include/xcb/xproto.h:13007 pragma Import (C, xcb_get_image_unchecked, "xcb_get_image_unchecked"); function xcb_get_image_data (R : System.Address) return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:13027 pragma Import (C, xcb_get_image_data, "xcb_get_image_data"); function xcb_get_image_data_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:13040 pragma Import (C, xcb_get_image_data_length, "xcb_get_image_data_length"); function xcb_get_image_data_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:13053 pragma Import (C, xcb_get_image_data_end, "xcb_get_image_data_end"); function xcb_get_image_reply (c : xcb_connection_t_access; cookie : xcb_get_image_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_image_reply_t; -- /usr/include/xcb/xproto.h:13082 pragma Import (C, xcb_get_image_reply, "xcb_get_image_reply"); function xcb_poly_text_8_sizeof (u_buffer : System.Address; items_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:13087 pragma Import (C, xcb_poly_text_8_sizeof, "xcb_poly_text_8_sizeof"); function xcb_poly_text_8_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; items_len : Libc.Stdint.uint32_t; items : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13118 pragma Import (C, xcb_poly_text_8_checked, "xcb_poly_text_8_checked"); function xcb_poly_text_8 (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; items_len : Libc.Stdint.uint32_t; items : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13151 pragma Import (C, xcb_poly_text_8, "xcb_poly_text_8"); function xcb_poly_text_16_sizeof (u_buffer : System.Address; items_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:13160 pragma Import (C, xcb_poly_text_16_sizeof, "xcb_poly_text_16_sizeof"); function xcb_poly_text_16_checked (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; items_len : Libc.Stdint.uint32_t; items : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13191 pragma Import (C, xcb_poly_text_16_checked, "xcb_poly_text_16_checked"); function xcb_poly_text_16 (c : xcb_connection_t_access; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; items_len : Libc.Stdint.uint32_t; items : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13224 pragma Import (C, xcb_poly_text_16, "xcb_poly_text_16"); function xcb_image_text_8_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:13233 pragma Import (C, xcb_image_text_8_sizeof, "xcb_image_text_8_sizeof"); function xcb_image_text_8_checked (c : xcb_connection_t_access; string_len : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; string : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13282 pragma Import (C, xcb_image_text_8_checked, "xcb_image_text_8_checked"); function xcb_image_text_8 (c : xcb_connection_t_access; string_len : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; string : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13334 pragma Import (C, xcb_image_text_8, "xcb_image_text_8"); function xcb_image_text_16_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:13343 pragma Import (C, xcb_image_text_16_sizeof, "xcb_image_text_16_sizeof"); function xcb_image_text_16_checked (c : xcb_connection_t_access; string_len : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; string : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13393 pragma Import (C, xcb_image_text_16_checked, "xcb_image_text_16_checked"); function xcb_image_text_16 (c : xcb_connection_t_access; string_len : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; gc : xcb_gcontext_t; x : Libc.Stdint.int16_t; y : Libc.Stdint.int16_t; string : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13446 pragma Import (C, xcb_image_text_16, "xcb_image_text_16"); function xcb_create_colormap_checked (c : xcb_connection_t_access; alloc : Libc.Stdint.uint8_t; mid : xcb_colormap_t; window : xcb_window_t; visual : xcb_visualid_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13480 pragma Import (C, xcb_create_colormap_checked, "xcb_create_colormap_checked"); function xcb_create_colormap (c : xcb_connection_t_access; alloc : Libc.Stdint.uint8_t; mid : xcb_colormap_t; window : xcb_window_t; visual : xcb_visualid_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13509 pragma Import (C, xcb_create_colormap, "xcb_create_colormap"); function xcb_free_colormap_checked (c : xcb_connection_t_access; cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13538 pragma Import (C, xcb_free_colormap_checked, "xcb_free_colormap_checked"); function xcb_free_colormap (c : xcb_connection_t_access; cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13561 pragma Import (C, xcb_free_colormap, "xcb_free_colormap"); function xcb_copy_colormap_and_free_checked (c : xcb_connection_t_access; mid : xcb_colormap_t; src_cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13588 pragma Import (C, xcb_copy_colormap_and_free_checked, "xcb_copy_colormap_and_free_checked"); function xcb_copy_colormap_and_free (c : xcb_connection_t_access; mid : xcb_colormap_t; src_cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13613 pragma Import (C, xcb_copy_colormap_and_free, "xcb_copy_colormap_and_free"); function xcb_install_colormap_checked (c : xcb_connection_t_access; cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13640 pragma Import (C, xcb_install_colormap_checked, "xcb_install_colormap_checked"); function xcb_install_colormap (c : xcb_connection_t_access; cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13663 pragma Import (C, xcb_install_colormap, "xcb_install_colormap"); function xcb_uninstall_colormap_checked (c : xcb_connection_t_access; cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13689 pragma Import (C, xcb_uninstall_colormap_checked, "xcb_uninstall_colormap_checked"); function xcb_uninstall_colormap (c : xcb_connection_t_access; cmap : xcb_colormap_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:13712 pragma Import (C, xcb_uninstall_colormap, "xcb_uninstall_colormap"); function xcb_list_installed_colormaps_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:13716 pragma Import (C, xcb_list_installed_colormaps_sizeof, "xcb_list_installed_colormaps_sizeof"); function xcb_list_installed_colormaps (c : xcb_connection_t_access; window : xcb_window_t) return xcb_list_installed_colormaps_cookie_t; -- /usr/include/xcb/xproto.h:13738 pragma Import (C, xcb_list_installed_colormaps, "xcb_list_installed_colormaps"); function xcb_list_installed_colormaps_unchecked (c : xcb_connection_t_access; window : xcb_window_t) return xcb_list_installed_colormaps_cookie_t; -- /usr/include/xcb/xproto.h:13764 pragma Import (C, xcb_list_installed_colormaps_unchecked, "xcb_list_installed_colormaps_unchecked"); function xcb_list_installed_colormaps_cmaps (R : System.Address) return access xcb_colormap_t; -- /usr/include/xcb/xproto.h:13778 pragma Import (C, xcb_list_installed_colormaps_cmaps, "xcb_list_installed_colormaps_cmaps"); function xcb_list_installed_colormaps_cmaps_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:13791 pragma Import (C, xcb_list_installed_colormaps_cmaps_length, "xcb_list_installed_colormaps_cmaps_length"); function xcb_list_installed_colormaps_cmaps_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:13804 pragma Import (C, xcb_list_installed_colormaps_cmaps_end, "xcb_list_installed_colormaps_cmaps_end"); function xcb_list_installed_colormaps_reply (c : xcb_connection_t_access; cookie : xcb_list_installed_colormaps_cookie_t; e : out xcb_generic_error_t_access) return access xcb_list_installed_colormaps_reply_t; -- /usr/include/xcb/xproto.h:13833 pragma Import (C, xcb_list_installed_colormaps_reply, "xcb_list_installed_colormaps_reply"); function xcb_alloc_color (c : xcb_connection_t_access; cmap : xcb_colormap_t; red : Libc.Stdint.uint16_t; green : Libc.Stdint.uint16_t; blue : Libc.Stdint.uint16_t) return xcb_alloc_color_cookie_t; -- /usr/include/xcb/xproto.h:13869 pragma Import (C, xcb_alloc_color, "xcb_alloc_color"); function xcb_alloc_color_unchecked (c : xcb_connection_t_access; cmap : xcb_colormap_t; red : Libc.Stdint.uint16_t; green : Libc.Stdint.uint16_t; blue : Libc.Stdint.uint16_t) return xcb_alloc_color_cookie_t; -- /usr/include/xcb/xproto.h:13910 pragma Import (C, xcb_alloc_color_unchecked, "xcb_alloc_color_unchecked"); function xcb_alloc_color_reply (c : xcb_connection_t_access; cookie : xcb_alloc_color_cookie_t; e : out xcb_generic_error_t_access) return access xcb_alloc_color_reply_t; -- /usr/include/xcb/xproto.h:13943 pragma Import (C, xcb_alloc_color_reply, "xcb_alloc_color_reply"); function xcb_alloc_named_color_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:13948 pragma Import (C, xcb_alloc_named_color_sizeof, "xcb_alloc_named_color_sizeof"); function xcb_alloc_named_color (c : xcb_connection_t_access; cmap : xcb_colormap_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_alloc_named_color_cookie_t; -- /usr/include/xcb/xproto.h:13972 pragma Import (C, xcb_alloc_named_color, "xcb_alloc_named_color"); function xcb_alloc_named_color_unchecked (c : xcb_connection_t_access; cmap : xcb_colormap_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_alloc_named_color_cookie_t; -- /usr/include/xcb/xproto.h:14002 pragma Import (C, xcb_alloc_named_color_unchecked, "xcb_alloc_named_color_unchecked"); function xcb_alloc_named_color_reply (c : xcb_connection_t_access; cookie : xcb_alloc_named_color_cookie_t; e : out xcb_generic_error_t_access) return access xcb_alloc_named_color_reply_t; -- /usr/include/xcb/xproto.h:14034 pragma Import (C, xcb_alloc_named_color_reply, "xcb_alloc_named_color_reply"); function xcb_alloc_color_cells_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:14039 pragma Import (C, xcb_alloc_color_cells_sizeof, "xcb_alloc_color_cells_sizeof"); function xcb_alloc_color_cells (c : xcb_connection_t_access; contiguous : Libc.Stdint.uint8_t; cmap : xcb_colormap_t; colors : Libc.Stdint.uint16_t; planes : Libc.Stdint.uint16_t) return xcb_alloc_color_cells_cookie_t; -- /usr/include/xcb/xproto.h:14064 pragma Import (C, xcb_alloc_color_cells, "xcb_alloc_color_cells"); function xcb_alloc_color_cells_unchecked (c : xcb_connection_t_access; contiguous : Libc.Stdint.uint8_t; cmap : xcb_colormap_t; colors : Libc.Stdint.uint16_t; planes : Libc.Stdint.uint16_t) return xcb_alloc_color_cells_cookie_t; -- /usr/include/xcb/xproto.h:14096 pragma Import (C, xcb_alloc_color_cells_unchecked, "xcb_alloc_color_cells_unchecked"); function xcb_alloc_color_cells_pixels (R : System.Address) return access Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:14113 pragma Import (C, xcb_alloc_color_cells_pixels, "xcb_alloc_color_cells_pixels"); function xcb_alloc_color_cells_pixels_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:14126 pragma Import (C, xcb_alloc_color_cells_pixels_length, "xcb_alloc_color_cells_pixels_length"); function xcb_alloc_color_cells_pixels_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:14139 pragma Import (C, xcb_alloc_color_cells_pixels_end, "xcb_alloc_color_cells_pixels_end"); function xcb_alloc_color_cells_masks (R : System.Address) return access Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:14152 pragma Import (C, xcb_alloc_color_cells_masks, "xcb_alloc_color_cells_masks"); function xcb_alloc_color_cells_masks_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:14165 pragma Import (C, xcb_alloc_color_cells_masks_length, "xcb_alloc_color_cells_masks_length"); function xcb_alloc_color_cells_masks_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:14178 pragma Import (C, xcb_alloc_color_cells_masks_end, "xcb_alloc_color_cells_masks_end"); function xcb_alloc_color_cells_reply (c : xcb_connection_t_access; cookie : xcb_alloc_color_cells_cookie_t; e : out xcb_generic_error_t_access) return access xcb_alloc_color_cells_reply_t; -- /usr/include/xcb/xproto.h:14207 pragma Import (C, xcb_alloc_color_cells_reply, "xcb_alloc_color_cells_reply"); function xcb_alloc_color_planes_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:14212 pragma Import (C, xcb_alloc_color_planes_sizeof, "xcb_alloc_color_planes_sizeof"); function xcb_alloc_color_planes (c : xcb_connection_t_access; contiguous : Libc.Stdint.uint8_t; cmap : xcb_colormap_t; colors : Libc.Stdint.uint16_t; reds : Libc.Stdint.uint16_t; greens : Libc.Stdint.uint16_t; blues : Libc.Stdint.uint16_t) return xcb_alloc_color_planes_cookie_t; -- /usr/include/xcb/xproto.h:14239 pragma Import (C, xcb_alloc_color_planes, "xcb_alloc_color_planes"); function xcb_alloc_color_planes_unchecked (c : xcb_connection_t_access; contiguous : Libc.Stdint.uint8_t; cmap : xcb_colormap_t; colors : Libc.Stdint.uint16_t; reds : Libc.Stdint.uint16_t; greens : Libc.Stdint.uint16_t; blues : Libc.Stdint.uint16_t) return xcb_alloc_color_planes_cookie_t; -- /usr/include/xcb/xproto.h:14275 pragma Import (C, xcb_alloc_color_planes_unchecked, "xcb_alloc_color_planes_unchecked"); function xcb_alloc_color_planes_pixels (R : System.Address) return access Libc.Stdint.uint32_t; -- /usr/include/xcb/xproto.h:14294 pragma Import (C, xcb_alloc_color_planes_pixels, "xcb_alloc_color_planes_pixels"); function xcb_alloc_color_planes_pixels_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:14307 pragma Import (C, xcb_alloc_color_planes_pixels_length, "xcb_alloc_color_planes_pixels_length"); function xcb_alloc_color_planes_pixels_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:14320 pragma Import (C, xcb_alloc_color_planes_pixels_end, "xcb_alloc_color_planes_pixels_end"); function xcb_alloc_color_planes_reply (c : xcb_connection_t_access; cookie : xcb_alloc_color_planes_cookie_t; e : out xcb_generic_error_t_access) return access xcb_alloc_color_planes_reply_t; -- /usr/include/xcb/xproto.h:14349 pragma Import (C, xcb_alloc_color_planes_reply, "xcb_alloc_color_planes_reply"); function xcb_free_colors_sizeof (u_buffer : System.Address; pixels_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:14354 pragma Import (C, xcb_free_colors_sizeof, "xcb_free_colors_sizeof"); function xcb_free_colors_checked (c : xcb_connection_t_access; cmap : xcb_colormap_t; plane_mask : Libc.Stdint.uint32_t; pixels_len : Libc.Stdint.uint32_t; pixels : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14383 pragma Import (C, xcb_free_colors_checked, "xcb_free_colors_checked"); function xcb_free_colors (c : xcb_connection_t_access; cmap : xcb_colormap_t; plane_mask : Libc.Stdint.uint32_t; pixels_len : Libc.Stdint.uint32_t; pixels : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14412 pragma Import (C, xcb_free_colors, "xcb_free_colors"); procedure xcb_coloritem_next (i : access xcb_coloritem_iterator_t); -- /usr/include/xcb/xproto.h:14437 pragma Import (C, xcb_coloritem_next, "xcb_coloritem_next"); function xcb_coloritem_end (i : xcb_coloritem_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:14459 pragma Import (C, xcb_coloritem_end, "xcb_coloritem_end"); function xcb_store_colors_sizeof (u_buffer : System.Address; items_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:14462 pragma Import (C, xcb_store_colors_sizeof, "xcb_store_colors_sizeof"); function xcb_store_colors_checked (c : xcb_connection_t_access; cmap : xcb_colormap_t; items_len : Libc.Stdint.uint32_t; items : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14490 pragma Import (C, xcb_store_colors_checked, "xcb_store_colors_checked"); function xcb_store_colors (c : xcb_connection_t_access; cmap : xcb_colormap_t; items_len : Libc.Stdint.uint32_t; items : System.Address) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14517 pragma Import (C, xcb_store_colors, "xcb_store_colors"); function xcb_store_named_color_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:14523 pragma Import (C, xcb_store_named_color_sizeof, "xcb_store_named_color_sizeof"); function xcb_store_named_color_checked (c : xcb_connection_t_access; flags : Libc.Stdint.uint8_t; cmap : xcb_colormap_t; pixel : Libc.Stdint.uint32_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14552 pragma Import (C, xcb_store_named_color_checked, "xcb_store_named_color_checked"); function xcb_store_named_color (c : xcb_connection_t_access; flags : Libc.Stdint.uint8_t; cmap : xcb_colormap_t; pixel : Libc.Stdint.uint32_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14583 pragma Import (C, xcb_store_named_color, "xcb_store_named_color"); procedure xcb_rgb_next (i : access xcb_rgb_iterator_t); -- /usr/include/xcb/xproto.h:14609 pragma Import (C, xcb_rgb_next, "xcb_rgb_next"); function xcb_rgb_end (i : xcb_rgb_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:14631 pragma Import (C, xcb_rgb_end, "xcb_rgb_end"); function xcb_query_colors_sizeof (u_buffer : System.Address; pixels_len : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xproto.h:14634 pragma Import (C, xcb_query_colors_sizeof, "xcb_query_colors_sizeof"); function xcb_query_colors (c : xcb_connection_t_access; cmap : xcb_colormap_t; pixels_len : Libc.Stdint.uint32_t; pixels : access Libc.Stdint.uint32_t) return xcb_query_colors_cookie_t; -- /usr/include/xcb/xproto.h:14659 pragma Import (C, xcb_query_colors, "xcb_query_colors"); function xcb_query_colors_unchecked (c : xcb_connection_t_access; cmap : xcb_colormap_t; pixels_len : Libc.Stdint.uint32_t; pixels : access Libc.Stdint.uint32_t) return xcb_query_colors_cookie_t; -- /usr/include/xcb/xproto.h:14689 pragma Import (C, xcb_query_colors_unchecked, "xcb_query_colors_unchecked"); function xcb_query_colors_colors (R : System.Address) return access xcb_rgb_t; -- /usr/include/xcb/xproto.h:14705 pragma Import (C, xcb_query_colors_colors, "xcb_query_colors_colors"); function xcb_query_colors_colors_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:14718 pragma Import (C, xcb_query_colors_colors_length, "xcb_query_colors_colors_length"); function xcb_query_colors_colors_iterator (R : System.Address) return xcb_rgb_iterator_t; -- /usr/include/xcb/xproto.h:14731 pragma Import (C, xcb_query_colors_colors_iterator, "xcb_query_colors_colors_iterator"); function xcb_query_colors_reply (c : xcb_connection_t_access; cookie : xcb_query_colors_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_colors_reply_t; -- /usr/include/xcb/xproto.h:14760 pragma Import (C, xcb_query_colors_reply, "xcb_query_colors_reply"); function xcb_lookup_color_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:14765 pragma Import (C, xcb_lookup_color_sizeof, "xcb_lookup_color_sizeof"); function xcb_lookup_color (c : xcb_connection_t_access; cmap : xcb_colormap_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_lookup_color_cookie_t; -- /usr/include/xcb/xproto.h:14789 pragma Import (C, xcb_lookup_color, "xcb_lookup_color"); function xcb_lookup_color_unchecked (c : xcb_connection_t_access; cmap : xcb_colormap_t; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_lookup_color_cookie_t; -- /usr/include/xcb/xproto.h:14819 pragma Import (C, xcb_lookup_color_unchecked, "xcb_lookup_color_unchecked"); function xcb_lookup_color_reply (c : xcb_connection_t_access; cookie : xcb_lookup_color_cookie_t; e : out xcb_generic_error_t_access) return access xcb_lookup_color_reply_t; -- /usr/include/xcb/xproto.h:14851 pragma Import (C, xcb_lookup_color_reply, "xcb_lookup_color_reply"); function xcb_create_cursor_checked (c : xcb_connection_t_access; cid : xcb_cursor_t; source : xcb_pixmap_t; mask : xcb_pixmap_t; fore_red : Libc.Stdint.uint16_t; fore_green : Libc.Stdint.uint16_t; fore_blue : Libc.Stdint.uint16_t; back_red : Libc.Stdint.uint16_t; back_green : Libc.Stdint.uint16_t; back_blue : Libc.Stdint.uint16_t; x : Libc.Stdint.uint16_t; y : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14888 pragma Import (C, xcb_create_cursor_checked, "xcb_create_cursor_checked"); function xcb_create_cursor (c : xcb_connection_t_access; cid : xcb_cursor_t; source : xcb_pixmap_t; mask : xcb_pixmap_t; fore_red : Libc.Stdint.uint16_t; fore_green : Libc.Stdint.uint16_t; fore_blue : Libc.Stdint.uint16_t; back_red : Libc.Stdint.uint16_t; back_green : Libc.Stdint.uint16_t; back_blue : Libc.Stdint.uint16_t; x : Libc.Stdint.uint16_t; y : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14931 pragma Import (C, xcb_create_cursor, "xcb_create_cursor"); function xcb_create_glyph_cursor_checked (c : xcb_connection_t_access; cid : xcb_cursor_t; source_font : xcb_font_t; mask_font : xcb_font_t; source_char : Libc.Stdint.uint16_t; mask_char : Libc.Stdint.uint16_t; fore_red : Libc.Stdint.uint16_t; fore_green : Libc.Stdint.uint16_t; fore_blue : Libc.Stdint.uint16_t; back_red : Libc.Stdint.uint16_t; back_green : Libc.Stdint.uint16_t; back_blue : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:14999 pragma Import (C, xcb_create_glyph_cursor_checked, "xcb_create_glyph_cursor_checked"); function xcb_create_glyph_cursor (c : xcb_connection_t_access; cid : xcb_cursor_t; source_font : xcb_font_t; mask_font : xcb_font_t; source_char : Libc.Stdint.uint16_t; mask_char : Libc.Stdint.uint16_t; fore_red : Libc.Stdint.uint16_t; fore_green : Libc.Stdint.uint16_t; fore_blue : Libc.Stdint.uint16_t; back_red : Libc.Stdint.uint16_t; back_green : Libc.Stdint.uint16_t; back_blue : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15064 pragma Import (C, xcb_create_glyph_cursor, "xcb_create_glyph_cursor"); function xcb_free_cursor_checked (c : xcb_connection_t_access; cursor : xcb_cursor_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15103 pragma Import (C, xcb_free_cursor_checked, "xcb_free_cursor_checked"); function xcb_free_cursor (c : xcb_connection_t_access; cursor : xcb_cursor_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15129 pragma Import (C, xcb_free_cursor, "xcb_free_cursor"); function xcb_recolor_cursor_checked (c : xcb_connection_t_access; cursor : xcb_cursor_t; fore_red : Libc.Stdint.uint16_t; fore_green : Libc.Stdint.uint16_t; fore_blue : Libc.Stdint.uint16_t; back_red : Libc.Stdint.uint16_t; back_green : Libc.Stdint.uint16_t; back_blue : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15161 pragma Import (C, xcb_recolor_cursor_checked, "xcb_recolor_cursor_checked"); function xcb_recolor_cursor (c : xcb_connection_t_access; cursor : xcb_cursor_t; fore_red : Libc.Stdint.uint16_t; fore_green : Libc.Stdint.uint16_t; fore_blue : Libc.Stdint.uint16_t; back_red : Libc.Stdint.uint16_t; back_green : Libc.Stdint.uint16_t; back_blue : Libc.Stdint.uint16_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15196 pragma Import (C, xcb_recolor_cursor, "xcb_recolor_cursor"); function xcb_query_best_size (c : xcb_connection_t_access; u_class : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return xcb_query_best_size_cookie_t; -- /usr/include/xcb/xproto.h:15228 pragma Import (C, xcb_query_best_size, "xcb_query_best_size"); function xcb_query_best_size_unchecked (c : xcb_connection_t_access; u_class : Libc.Stdint.uint8_t; drawable : xcb_drawable_t; width : Libc.Stdint.uint16_t; height : Libc.Stdint.uint16_t) return xcb_query_best_size_cookie_t; -- /usr/include/xcb/xproto.h:15260 pragma Import (C, xcb_query_best_size_unchecked, "xcb_query_best_size_unchecked"); function xcb_query_best_size_reply (c : xcb_connection_t_access; cookie : xcb_query_best_size_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_best_size_reply_t; -- /usr/include/xcb/xproto.h:15293 pragma Import (C, xcb_query_best_size_reply, "xcb_query_best_size_reply"); function xcb_query_extension_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:15298 pragma Import (C, xcb_query_extension_sizeof, "xcb_query_extension_sizeof"); function xcb_query_extension (c : xcb_connection_t_access; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_query_extension_cookie_t; -- /usr/include/xcb/xproto.h:15333 pragma Import (C, xcb_query_extension, "xcb_query_extension"); function xcb_query_extension_unchecked (c : xcb_connection_t_access; name_len : Libc.Stdint.uint16_t; name : Interfaces.C.Strings.chars_ptr) return xcb_query_extension_cookie_t; -- /usr/include/xcb/xproto.h:15373 pragma Import (C, xcb_query_extension_unchecked, "xcb_query_extension_unchecked"); function xcb_query_extension_reply (c : xcb_connection_t_access; cookie : xcb_query_extension_cookie_t; e : out xcb_generic_error_t_access) return access xcb_query_extension_reply_t; -- /usr/include/xcb/xproto.h:15404 pragma Import (C, xcb_query_extension_reply, "xcb_query_extension_reply"); function xcb_list_extensions_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:15409 pragma Import (C, xcb_list_extensions_sizeof, "xcb_list_extensions_sizeof"); function xcb_list_extensions (c : xcb_connection_t) return xcb_list_extensions_cookie_t; -- /usr/include/xcb/xproto.h:15430 pragma Import (C, xcb_list_extensions, "xcb_list_extensions"); function xcb_list_extensions_unchecked (c : xcb_connection_t) return xcb_list_extensions_cookie_t; -- /usr/include/xcb/xproto.h:15454 pragma Import (C, xcb_list_extensions_unchecked, "xcb_list_extensions_unchecked"); function xcb_list_extensions_names_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:15467 pragma Import (C, xcb_list_extensions_names_length, "xcb_list_extensions_names_length"); function xcb_list_extensions_names_iterator (R : System.Address) return xcb_str_iterator_t; -- /usr/include/xcb/xproto.h:15480 pragma Import (C, xcb_list_extensions_names_iterator, "xcb_list_extensions_names_iterator"); function xcb_list_extensions_reply (c : xcb_connection_t_access; cookie : xcb_list_extensions_cookie_t; e : out xcb_generic_error_t_access) return access xcb_list_extensions_reply_t; -- /usr/include/xcb/xproto.h:15509 pragma Import (C, xcb_list_extensions_reply, "xcb_list_extensions_reply"); function xcb_change_keyboard_mapping_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:15514 pragma Import (C, xcb_change_keyboard_mapping_sizeof, "xcb_change_keyboard_mapping_sizeof"); function xcb_change_keyboard_mapping_checked (c : xcb_connection_t_access; keycode_count : Libc.Stdint.uint8_t; first_keycode : xcb_keycode_t; keysyms_per_keycode : Libc.Stdint.uint8_t; keysyms : access xcb_keysym_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15542 pragma Import (C, xcb_change_keyboard_mapping_checked, "xcb_change_keyboard_mapping_checked"); function xcb_change_keyboard_mapping (c : xcb_connection_t_access; keycode_count : Libc.Stdint.uint8_t; first_keycode : xcb_keycode_t; keysyms_per_keycode : Libc.Stdint.uint8_t; keysyms : access xcb_keysym_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15571 pragma Import (C, xcb_change_keyboard_mapping, "xcb_change_keyboard_mapping"); function xcb_get_keyboard_mapping_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:15578 pragma Import (C, xcb_get_keyboard_mapping_sizeof, "xcb_get_keyboard_mapping_sizeof"); function xcb_get_keyboard_mapping (c : xcb_connection_t_access; first_keycode : xcb_keycode_t; count : Libc.Stdint.uint8_t) return xcb_get_keyboard_mapping_cookie_t; -- /usr/include/xcb/xproto.h:15601 pragma Import (C, xcb_get_keyboard_mapping, "xcb_get_keyboard_mapping"); function xcb_get_keyboard_mapping_unchecked (c : xcb_connection_t_access; first_keycode : xcb_keycode_t; count : Libc.Stdint.uint8_t) return xcb_get_keyboard_mapping_cookie_t; -- /usr/include/xcb/xproto.h:15629 pragma Import (C, xcb_get_keyboard_mapping_unchecked, "xcb_get_keyboard_mapping_unchecked"); function xcb_get_keyboard_mapping_keysyms (R : System.Address) return access xcb_keysym_t; -- /usr/include/xcb/xproto.h:15644 pragma Import (C, xcb_get_keyboard_mapping_keysyms, "xcb_get_keyboard_mapping_keysyms"); function xcb_get_keyboard_mapping_keysyms_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:15657 pragma Import (C, xcb_get_keyboard_mapping_keysyms_length, "xcb_get_keyboard_mapping_keysyms_length"); function xcb_get_keyboard_mapping_keysyms_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:15670 pragma Import (C, xcb_get_keyboard_mapping_keysyms_end, "xcb_get_keyboard_mapping_keysyms_end"); function xcb_get_keyboard_mapping_reply (c : xcb_connection_t_access; cookie : xcb_get_keyboard_mapping_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_keyboard_mapping_reply_t; -- /usr/include/xcb/xproto.h:15699 pragma Import (C, xcb_get_keyboard_mapping_reply, "xcb_get_keyboard_mapping_reply"); function xcb_change_keyboard_control_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:15704 pragma Import (C, xcb_change_keyboard_control_sizeof, "xcb_change_keyboard_control_sizeof"); function xcb_change_keyboard_control_checked (c : xcb_connection_t_access; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15730 pragma Import (C, xcb_change_keyboard_control_checked, "xcb_change_keyboard_control_checked"); function xcb_change_keyboard_control (c : xcb_connection_t_access; value_mask : Libc.Stdint.uint32_t; value_list : access Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15755 pragma Import (C, xcb_change_keyboard_control, "xcb_change_keyboard_control"); function xcb_get_keyboard_control (c : xcb_connection_t) return xcb_get_keyboard_control_cookie_t; -- /usr/include/xcb/xproto.h:15778 pragma Import (C, xcb_get_keyboard_control, "xcb_get_keyboard_control"); function xcb_get_keyboard_control_unchecked (c : xcb_connection_t) return xcb_get_keyboard_control_cookie_t; -- /usr/include/xcb/xproto.h:15802 pragma Import (C, xcb_get_keyboard_control_unchecked, "xcb_get_keyboard_control_unchecked"); function xcb_get_keyboard_control_reply (c : xcb_connection_t_access; cookie : xcb_get_keyboard_control_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_keyboard_control_reply_t; -- /usr/include/xcb/xproto.h:15831 pragma Import (C, xcb_get_keyboard_control_reply, "xcb_get_keyboard_control_reply"); function xcb_bell_checked (c : xcb_connection_t_access; percent : Libc.Stdint.int8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15858 pragma Import (C, xcb_bell_checked, "xcb_bell_checked"); function xcb_bell (c : xcb_connection_t_access; percent : Libc.Stdint.int8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15881 pragma Import (C, xcb_bell, "xcb_bell"); function xcb_change_pointer_control_checked (c : xcb_connection_t_access; acceleration_numerator : Libc.Stdint.int16_t; acceleration_denominator : Libc.Stdint.int16_t; threshold : Libc.Stdint.int16_t; do_acceleration : Libc.Stdint.uint8_t; do_threshold : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15911 pragma Import (C, xcb_change_pointer_control_checked, "xcb_change_pointer_control_checked"); function xcb_change_pointer_control (c : xcb_connection_t_access; acceleration_numerator : Libc.Stdint.int16_t; acceleration_denominator : Libc.Stdint.int16_t; threshold : Libc.Stdint.int16_t; do_acceleration : Libc.Stdint.uint8_t; do_threshold : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:15942 pragma Import (C, xcb_change_pointer_control, "xcb_change_pointer_control"); function xcb_get_pointer_control (c : xcb_connection_t) return xcb_get_pointer_control_cookie_t; -- /usr/include/xcb/xproto.h:15968 pragma Import (C, xcb_get_pointer_control, "xcb_get_pointer_control"); function xcb_get_pointer_control_unchecked (c : xcb_connection_t) return xcb_get_pointer_control_cookie_t; -- /usr/include/xcb/xproto.h:15992 pragma Import (C, xcb_get_pointer_control_unchecked, "xcb_get_pointer_control_unchecked"); function xcb_get_pointer_control_reply (c : xcb_connection_t_access; cookie : xcb_get_pointer_control_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_pointer_control_reply_t; -- /usr/include/xcb/xproto.h:16021 pragma Import (C, xcb_get_pointer_control_reply, "xcb_get_pointer_control_reply"); function xcb_set_screen_saver_checked (c : xcb_connection_t_access; timeout : Libc.Stdint.int16_t; interval : Libc.Stdint.int16_t; prefer_blanking : Libc.Stdint.uint8_t; allow_exposures : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16051 pragma Import (C, xcb_set_screen_saver_checked, "xcb_set_screen_saver_checked"); function xcb_set_screen_saver (c : xcb_connection_t_access; timeout : Libc.Stdint.int16_t; interval : Libc.Stdint.int16_t; prefer_blanking : Libc.Stdint.uint8_t; allow_exposures : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16080 pragma Import (C, xcb_set_screen_saver, "xcb_set_screen_saver"); function xcb_get_screen_saver (c : xcb_connection_t) return xcb_get_screen_saver_cookie_t; -- /usr/include/xcb/xproto.h:16105 pragma Import (C, xcb_get_screen_saver, "xcb_get_screen_saver"); function xcb_get_screen_saver_unchecked (c : xcb_connection_t) return xcb_get_screen_saver_cookie_t; -- /usr/include/xcb/xproto.h:16129 pragma Import (C, xcb_get_screen_saver_unchecked, "xcb_get_screen_saver_unchecked"); function xcb_get_screen_saver_reply (c : xcb_connection_t_access; cookie : xcb_get_screen_saver_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_screen_saver_reply_t; -- /usr/include/xcb/xproto.h:16158 pragma Import (C, xcb_get_screen_saver_reply, "xcb_get_screen_saver_reply"); function xcb_change_hosts_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16163 pragma Import (C, xcb_change_hosts_sizeof, "xcb_change_hosts_sizeof"); function xcb_change_hosts_checked (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; family : Libc.Stdint.uint8_t; address_len : Libc.Stdint.uint16_t; address : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16191 pragma Import (C, xcb_change_hosts_checked, "xcb_change_hosts_checked"); function xcb_change_hosts (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t; family : Libc.Stdint.uint8_t; address_len : Libc.Stdint.uint16_t; address : access Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16220 pragma Import (C, xcb_change_hosts, "xcb_change_hosts"); function xcb_host_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16227 pragma Import (C, xcb_host_sizeof, "xcb_host_sizeof"); function xcb_host_address (R : System.Address) return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:16240 pragma Import (C, xcb_host_address, "xcb_host_address"); function xcb_host_address_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:16253 pragma Import (C, xcb_host_address_length, "xcb_host_address_length"); function xcb_host_address_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:16266 pragma Import (C, xcb_host_address_end, "xcb_host_address_end"); procedure xcb_host_next (i : access xcb_host_iterator_t); -- /usr/include/xcb/xproto.h:16287 pragma Import (C, xcb_host_next, "xcb_host_next"); function xcb_host_end (i : xcb_host_iterator_t) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:16309 pragma Import (C, xcb_host_end, "xcb_host_end"); function xcb_list_hosts_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16312 pragma Import (C, xcb_list_hosts_sizeof, "xcb_list_hosts_sizeof"); function xcb_list_hosts (c : xcb_connection_t) return xcb_list_hosts_cookie_t; -- /usr/include/xcb/xproto.h:16333 pragma Import (C, xcb_list_hosts, "xcb_list_hosts"); function xcb_list_hosts_unchecked (c : xcb_connection_t) return xcb_list_hosts_cookie_t; -- /usr/include/xcb/xproto.h:16357 pragma Import (C, xcb_list_hosts_unchecked, "xcb_list_hosts_unchecked"); function xcb_list_hosts_hosts_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:16370 pragma Import (C, xcb_list_hosts_hosts_length, "xcb_list_hosts_hosts_length"); function xcb_list_hosts_hosts_iterator (R : System.Address) return xcb_host_iterator_t; -- /usr/include/xcb/xproto.h:16383 pragma Import (C, xcb_list_hosts_hosts_iterator, "xcb_list_hosts_hosts_iterator"); function xcb_list_hosts_reply (c : xcb_connection_t_access; cookie : xcb_list_hosts_cookie_t; e : out xcb_generic_error_t_access) return access xcb_list_hosts_reply_t; -- /usr/include/xcb/xproto.h:16412 pragma Import (C, xcb_list_hosts_reply, "xcb_list_hosts_reply"); function xcb_set_access_control_checked (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16439 pragma Import (C, xcb_set_access_control_checked, "xcb_set_access_control_checked"); function xcb_set_access_control (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16462 pragma Import (C, xcb_set_access_control, "xcb_set_access_control"); function xcb_set_close_down_mode_checked (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16488 pragma Import (C, xcb_set_close_down_mode_checked, "xcb_set_close_down_mode_checked"); function xcb_set_close_down_mode (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16511 pragma Import (C, xcb_set_close_down_mode, "xcb_set_close_down_mode"); function xcb_kill_client_checked (c : xcb_connection_t_access; resource : Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16543 pragma Import (C, xcb_kill_client_checked, "xcb_kill_client_checked"); function xcb_kill_client (c : xcb_connection_t_access; resource : Libc.Stdint.uint32_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16572 pragma Import (C, xcb_kill_client, "xcb_kill_client"); function xcb_rotate_properties_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16576 pragma Import (C, xcb_rotate_properties_sizeof, "xcb_rotate_properties_sizeof"); function xcb_rotate_properties_checked (c : xcb_connection_t_access; window : xcb_window_t; atoms_len : Libc.Stdint.uint16_t; c_delta : Libc.Stdint.int16_t; atoms : access xcb_atom_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16604 pragma Import (C, xcb_rotate_properties_checked, "xcb_rotate_properties_checked"); function xcb_rotate_properties (c : xcb_connection_t_access; window : xcb_window_t; atoms_len : Libc.Stdint.uint16_t; c_delta : Libc.Stdint.int16_t; atoms : access xcb_atom_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16633 pragma Import (C, xcb_rotate_properties, "xcb_rotate_properties"); function xcb_force_screen_saver_checked (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16662 pragma Import (C, xcb_force_screen_saver_checked, "xcb_force_screen_saver_checked"); function xcb_force_screen_saver (c : xcb_connection_t_access; mode : Libc.Stdint.uint8_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:16685 pragma Import (C, xcb_force_screen_saver, "xcb_force_screen_saver"); function xcb_set_pointer_mapping_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16689 pragma Import (C, xcb_set_pointer_mapping_sizeof, "xcb_set_pointer_mapping_sizeof"); function xcb_set_pointer_mapping (c : xcb_connection_t_access; map_len : Libc.Stdint.uint8_t; map : access Libc.Stdint.uint8_t) return xcb_set_pointer_mapping_cookie_t; -- /usr/include/xcb/xproto.h:16712 pragma Import (C, xcb_set_pointer_mapping, "xcb_set_pointer_mapping"); function xcb_set_pointer_mapping_unchecked (c : xcb_connection_t_access; map_len : Libc.Stdint.uint8_t; map : access Libc.Stdint.uint8_t) return xcb_set_pointer_mapping_cookie_t; -- /usr/include/xcb/xproto.h:16740 pragma Import (C, xcb_set_pointer_mapping_unchecked, "xcb_set_pointer_mapping_unchecked"); function xcb_set_pointer_mapping_reply (c : xcb_connection_t_access; cookie : xcb_set_pointer_mapping_cookie_t; e : out xcb_generic_error_t_access) return access xcb_set_pointer_mapping_reply_t; -- /usr/include/xcb/xproto.h:16771 pragma Import (C, xcb_set_pointer_mapping_reply, "xcb_set_pointer_mapping_reply"); function xcb_get_pointer_mapping_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16776 pragma Import (C, xcb_get_pointer_mapping_sizeof, "xcb_get_pointer_mapping_sizeof"); function xcb_get_pointer_mapping (c : xcb_connection_t) return xcb_get_pointer_mapping_cookie_t; -- /usr/include/xcb/xproto.h:16797 pragma Import (C, xcb_get_pointer_mapping, "xcb_get_pointer_mapping"); function xcb_get_pointer_mapping_unchecked (c : xcb_connection_t) return xcb_get_pointer_mapping_cookie_t; -- /usr/include/xcb/xproto.h:16821 pragma Import (C, xcb_get_pointer_mapping_unchecked, "xcb_get_pointer_mapping_unchecked"); function xcb_get_pointer_mapping_map (R : System.Address) return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xproto.h:16834 pragma Import (C, xcb_get_pointer_mapping_map, "xcb_get_pointer_mapping_map"); function xcb_get_pointer_mapping_map_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:16847 pragma Import (C, xcb_get_pointer_mapping_map_length, "xcb_get_pointer_mapping_map_length"); function xcb_get_pointer_mapping_map_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:16860 pragma Import (C, xcb_get_pointer_mapping_map_end, "xcb_get_pointer_mapping_map_end"); function xcb_get_pointer_mapping_reply (c : xcb_connection_t_access; cookie : xcb_get_pointer_mapping_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_pointer_mapping_reply_t; -- /usr/include/xcb/xproto.h:16889 pragma Import (C, xcb_get_pointer_mapping_reply, "xcb_get_pointer_mapping_reply"); function xcb_set_modifier_mapping_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16894 pragma Import (C, xcb_set_modifier_mapping_sizeof, "xcb_set_modifier_mapping_sizeof"); function xcb_set_modifier_mapping (c : xcb_connection_t_access; keycodes_per_modifier : Libc.Stdint.uint8_t; keycodes : access xcb_keycode_t) return xcb_set_modifier_mapping_cookie_t; -- /usr/include/xcb/xproto.h:16917 pragma Import (C, xcb_set_modifier_mapping, "xcb_set_modifier_mapping"); function xcb_set_modifier_mapping_unchecked (c : xcb_connection_t_access; keycodes_per_modifier : Libc.Stdint.uint8_t; keycodes : access xcb_keycode_t) return xcb_set_modifier_mapping_cookie_t; -- /usr/include/xcb/xproto.h:16945 pragma Import (C, xcb_set_modifier_mapping_unchecked, "xcb_set_modifier_mapping_unchecked"); function xcb_set_modifier_mapping_reply (c : xcb_connection_t_access; cookie : xcb_set_modifier_mapping_cookie_t; e : out xcb_generic_error_t_access) return access xcb_set_modifier_mapping_reply_t; -- /usr/include/xcb/xproto.h:16976 pragma Import (C, xcb_set_modifier_mapping_reply, "xcb_set_modifier_mapping_reply"); function xcb_get_modifier_mapping_sizeof (u_buffer : System.Address) return int; -- /usr/include/xcb/xproto.h:16981 pragma Import (C, xcb_get_modifier_mapping_sizeof, "xcb_get_modifier_mapping_sizeof"); function xcb_get_modifier_mapping (c : xcb_connection_t) return xcb_get_modifier_mapping_cookie_t; -- /usr/include/xcb/xproto.h:17002 pragma Import (C, xcb_get_modifier_mapping, "xcb_get_modifier_mapping"); function xcb_get_modifier_mapping_unchecked (c : xcb_connection_t) return xcb_get_modifier_mapping_cookie_t; -- /usr/include/xcb/xproto.h:17026 pragma Import (C, xcb_get_modifier_mapping_unchecked, "xcb_get_modifier_mapping_unchecked"); function xcb_get_modifier_mapping_keycodes (R : System.Address) return access xcb_keycode_t; -- /usr/include/xcb/xproto.h:17039 pragma Import (C, xcb_get_modifier_mapping_keycodes, "xcb_get_modifier_mapping_keycodes"); function xcb_get_modifier_mapping_keycodes_length (R : System.Address) return int; -- /usr/include/xcb/xproto.h:17052 pragma Import (C, xcb_get_modifier_mapping_keycodes_length, "xcb_get_modifier_mapping_keycodes_length"); function xcb_get_modifier_mapping_keycodes_end (R : System.Address) return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xproto.h:17065 pragma Import (C, xcb_get_modifier_mapping_keycodes_end, "xcb_get_modifier_mapping_keycodes_end"); function xcb_get_modifier_mapping_reply (c : xcb_connection_t_access; cookie : xcb_get_modifier_mapping_cookie_t; e : out xcb_generic_error_t_access) return access xcb_get_modifier_mapping_reply_t; -- /usr/include/xcb/xproto.h:17094 pragma Import (C, xcb_get_modifier_mapping_reply, "xcb_get_modifier_mapping_reply"); function xcb_no_operation_checked (c : xcb_connection_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:17120 pragma Import (C, xcb_no_operation_checked, "xcb_no_operation_checked"); function xcb_no_operation (c : xcb_connection_t) return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xproto.h:17141 pragma Import (C, xcb_no_operation, "xcb_no_operation"); end XCB.XProto;
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. (gh+spat@heisenbug.eu) -- -- 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); ------------------------------------------------------------------------------ -- -- SPARK Proof Analysis Tool -- -- S.P.A.T. - Main program -- ------------------------------------------------------------------------------ with Ada.Command_Line; with Ada.Containers.Vectors; with Ada.Directories; with GNAT.Regexp; with GNATCOLL.JSON; with GNATCOLL.Projects; with GNATCOLL.VFS; with SPAT.Command_Line; with SPAT.GPR_Support; with SPAT.Log; with SPAT.Spark_Files; with SPAT.Spark_Info; with SPAT.Stop_Watch; with SPAT.Strings; with SPAT.Version; with System; ------------------------------------------------------------------------------ -- Run_SPAT ------------------------------------------------------------------------------ procedure Run_SPAT is package Reg_Exp_List is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => GNAT.Regexp.Regexp, "=" => GNAT.Regexp."="); --------------------------------------------------------------------------- -- Print_Entities --------------------------------------------------------------------------- procedure Print_Entities (Info : in SPAT.Spark_Info.T; Sort_By : in SPAT.Spark_Info.Sorting_Criterion; Cut_Off : in Duration; Entity_Filter : in Reg_Exp_List.Vector); --------------------------------------------------------------------------- -- Print_Suggestion --------------------------------------------------------------------------- procedure Print_Suggestion (Info : in SPAT.Spark_Info.T; File_Map : in SPAT.GPR_Support.SPARK_Source_Maps.Map); --------------------------------------------------------------------------- -- Print_Summary --------------------------------------------------------------------------- procedure Print_Summary (Info : in SPAT.Spark_Info.T; Sort_By : in SPAT.Spark_Info.Sorting_Criterion; Cut_Off : in Duration); --------------------------------------------------------------------------- -- Print_Entities --------------------------------------------------------------------------- procedure Print_Entities (Info : in SPAT.Spark_Info.T; Sort_By : in SPAT.Spark_Info.Sorting_Criterion; Cut_Off : in Duration; Entity_Filter : in Reg_Exp_List.Vector) is separate; --------------------------------------------------------------------------- -- Print_Suggestion --------------------------------------------------------------------------- procedure Print_Suggestion (Info : in SPAT.Spark_Info.T; File_Map : in SPAT.GPR_Support.SPARK_Source_Maps.Map) is separate; --------------------------------------------------------------------------- -- Print_Summary --------------------------------------------------------------------------- procedure Print_Summary (Info : in SPAT.Spark_Info.T; Sort_By : in SPAT.Spark_Info.Sorting_Criterion; Cut_Off : in Duration) is separate; use type SPAT.Subject_Name; Entity_Filter : Reg_Exp_List.Vector; begin if not SPAT.Command_Line.Parser.Parse then SPAT.Spark_Files.Shutdown; Ada.Command_Line.Set_Exit_Status (Code => Ada.Command_Line.Failure); return; end if; if SPAT.Command_Line.Version.Get then SPAT.Log.Message (Message => "run_spat V" & SPAT.Version.Number & " (compiled by " & System.System_Name'Image & " " & SPAT.Version.Compiler & ")"); SPAT.Spark_Files.Shutdown; Ada.Command_Line.Set_Exit_Status (Code => Ada.Command_Line.Success); return; end if; if SPAT.Command_Line.Project.Get = SPAT.Null_Name then -- The project file option is mandatory (AFAICS there is no way to -- require an option argument). SPAT.Log.Message (Message => "Argument parsing failed: Missing project file argument"); SPAT.Log.Message (Message => SPAT.Command_Line.Parser.Help); SPAT.Spark_Files.Shutdown; Ada.Command_Line.Set_Exit_Status (Code => Ada.Command_Line.Failure); return; end if; -- If there were entity filter options given, try compiling the reg exps. -- -- for Expression of SPAT.Command_Line.Entity_Filter.Get loop -- The above triggers a GNAT bug box with GNAT CE 2020. -- declare Filter : constant SPAT.Command_Line.Entity_Filter.Result_Array := SPAT.Command_Line.Entity_Filter.Get; begin for Expression of Filter loop begin Entity_Filter.Append (New_Item => GNAT.Regexp.Compile (Pattern => SPAT.To_String (Expression), Glob => False, Case_Sensitive => False)); null; exception when GNAT.Regexp.Error_In_Regexp => SPAT.Log.Message (Message => "Argument parsing failed: """ & SPAT.To_String (Source => Expression) & """ is not a valid regular expression."); SPAT.Spark_Files.Shutdown; Ada.Command_Line.Set_Exit_Status (Code => Ada.Command_Line.Failure); return; end; end loop; end; Do_Run_SPAT : declare SPARK_Files : SPAT.Spark_Files.T; Timer : SPAT.Stop_Watch.T := SPAT.Stop_Watch.Create; Sort_By : constant SPAT.Spark_Info.Sorting_Criterion := SPAT.Command_Line.Sort_By.Get; Cut_Off : constant Duration := SPAT.Command_Line.Cut_Off.Get; Report_Mode : constant SPAT.Command_Line.Report_Mode := SPAT.Command_Line.Report.Get; Project_File : constant GNATCOLL.VFS.Filesystem_String := GNATCOLL.VFS."+" (S => SPAT.To_String (SPAT.Command_Line.Project.Get)); File_List : constant SPAT.GPR_Support.SPARK_Source_Maps.Map := SPAT.GPR_Support.Get_SPARK_Files (GPR_File => Project_File); use type SPAT.Command_Line.Report_Mode; begin Collect_And_Parse : begin -- Step 2: Parse the files into JSON values. if not File_List.Is_Empty then SPAT.Log.Debug (Message => "Using up to" & SPAT.Spark_Files.Num_Workers'Image & " parsing threads."); Timer.Start; declare File_Names : SPAT.Strings.SPARK_File_Names (Capacity => File_List.Length); begin for X in File_List.Iterate loop File_Names.Append (SPAT.GPR_Support.SPARK_Source_Maps.Key (X)); end loop; SPARK_Files.Read (Names => File_Names); end; SPAT.Log.Debug (Message => "Parsing completed in " & Timer.Elapsed & "."); end if; end Collect_And_Parse; Process_And_Output : declare Info : SPAT.Spark_Info.T; begin -- Step 3: Process the JSON data. if not SPARK_Files.Is_Empty then Timer.Start; for C in SPARK_Files.Iterate loop Parse_JSON_File : declare Read_Result : constant GNATCOLL.JSON.Read_Result := SPARK_Files (C); File : constant SPAT.SPARK_File_Name := SPAT.Spark_Files.Key (C); begin if Read_Result.Success then Info.Map_Spark_File (Root => Read_Result.Value, File => File); else SPAT.Log.Warning (Message => SPAT.To_String (Source => File) & ": " & GNATCOLL.JSON.Format_Parsing_Error (Error => Read_Result.Error)); end if; end Parse_JSON_File; end loop; SPAT.Log.Debug (Message => "Reading completed in " & Timer.Elapsed & "."); end if; SPAT.Log.Debug (Message => "Collecting files completed in " & Timer.Elapsed_Total & "."); SPAT.Log.Debug (Message => "Cut off point set to " & SPAT.Image (Cut_Off) & "."); -- Step 4: Output the JSON data. if SPAT.Command_Line.Summary.Get then Print_Summary (Info => Info, Sort_By => Sort_By, Cut_Off => Cut_Off); end if; if Report_Mode /= SPAT.Command_Line.None then Print_Entities (Info => Info, Sort_By => Sort_By, Cut_Off => Cut_Off, Entity_Filter => Entity_Filter); end if; if SPAT.Command_Line.Suggest.Get then Print_Suggestion (Info => Info, File_Map => File_List); end if; exception when E : others => SPAT.Log.Dump_Exception (E => E, Message => "Internal error encountered when processing data!"); end Process_And_Output; end Do_Run_SPAT; SPAT.Spark_Files.Shutdown; Ada.Command_Line.Set_Exit_Status (Code => Ada.Command_Line.Success); exception when E : others => SPAT.Spark_Files.Shutdown; -- This shouldn't happen, other exception handlers should have caught -- such earlier. SPAT.Log.Dump_Exception (E => E, Message => "Fatal error encountered in SPAT!"); Ada.Command_Line.Set_Exit_Status (Code => Ada.Command_Line.Failure); end Run_SPAT;
with Ada.Containers.Doubly_Linked_Lists; with Ada.Text_Io; use Ada.Text_Io; procedure Traversal_Example is package Int_List is new Ada.Containers.Doubly_Linked_Lists(Integer); use Int_List; procedure Print(Position : Cursor) is begin Put_Line(Integer'Image(Element(Position))); end Print; The_List : List; begin for I in 1..10 loop The_List.Append(I); end loop; -- Traverse the list, calling Print for each value The_List.Iterate(Print'access); end traversal_example;
-- { dg-do compile } -- { dg-options "-gnatwr" } procedure Slice5 is type Item_Type is record I : Integer; end record; type Index_Type is (A, B); type table is array (integer range <>) of integer; subtype Small is Integer range 1 .. 10; T1 : constant Table (Small) := (Small => 0); T2 : constant Table (Small) := T1 (Small); -- { dg-warning "redundant slice denotes whole array" } Item_Array : constant array (Index_Type) of Item_Type := (A => (I => 10), B => (I => 22)); Item : Item_Type; for Item'Address use Item_Array(Index_Type)'Address; -- { dg-warning "redundant slice denotes whole array" } begin null; end;
-- This package defines the instructions for the VM package Instruction with SPARK_Mode is -- instruction opcodes, where NOP represents e.g. blank lines type OpCode is (NOP,ADD,SUB,MUL,DIV,RET,LDR,STR,MOV,JMP,JZ); -- number of registers in the VM NUM_REGS : constant Integer := 32; -- the type of register names: register Rn is represented by the -- number n, so e.g. R3 we represent as the number 3 type Reg is range 0 .. (NUM_REGS - 1); -- the size of the memory MEMORY_SIZE : constant Integer := 65536; -- the type of memory addresses. Note we constrain it so that we can -- never represent an out-of-bounds memory address type Addr is range 0 .. (MEMORY_SIZE - 1); -- valid offsets are in the range -M to M where M is the maximum address type Offset is range -Addr'Last .. Addr'Last; -- the type that represents individual instructions type Instr(Op : OpCode := NOP) is record case Op is when NOP => null; -- no-op; has no other data when ADD => AddRd : Reg; AddRs1 : Reg; AddRs2 : Reg; when SUB => SubRd : Reg; SubRs1 : Reg; SubRs2 : Reg; when MUL => MulRd : Reg; MulRs1 : Reg; MulRs2 : Reg; when DIV => DivRd : Reg; DivRs1 : Reg; DivRs2 : Reg; when RET => RetRs : Reg; when LDR => LdrRd : Reg; LdrRs : Reg; LdrOffs : Offset; when STR => StrRa : Reg; StrOffs : Offset; StrRb : Reg; when MOV => MovRd : Reg; MovOffs : Offset; when JMP => JmpOffs : Offset; when JZ => JzRa : Reg; JzOffs : Offset; when others => null; end case; end record; -- call this to initialise the random number generators -- if you don't call this you will get predicatable output procedure Init with Global => null; -- generate a random instruction procedure GenerateRandomInstr(Inst : out Instr) with Global => null; -- for debugging to print out instructions procedure DebugPrintInstr(Inst : in Instr) with Global => null; end Instruction;
with Leds; use Leds; procedure Main is begin Led_Init; loop Blink(LED0, Blue); Blink(LED1, Green); Blink(LED0, Cyan); Blink(LED1, Red); Blink(LED0, Magenta); Blink(LED1, Yellow); Blink(LED0, White); Blink(LED1, Blue); Blink(LED0, Green); Blink(LED1, Cyan); Blink(LED0, Red); Blink(LED1, Magenta); Blink(LED0, Yellow); Blink(LED1, White); end loop; end Main;
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. (gh+flacada@heisenbug.eu) -- -- 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); with Ada.Streams.Stream_IO; with Flac.Debug; with Flac.Frames; with Flac.Headers.Meta_Data; with Flac.Headers.Stream_Info; with Flac.Types; with SPARK_Stream_IO; package body Flac.Reader with SPARK_Mode => On is --------------------------------------------------------------------------- -- Local helper subroutines. --------------------------------------------------------------------------- --------------------------------------------------------------------------- -- Validate_Header -- -- Tries reading the first block of data from the file stream and checks -- if a valid flac file signature could be found. --------------------------------------------------------------------------- procedure Validate_Header (Flac_File : in out File_Handle) with Pre => (Is_Open (Handle => Flac_File) and then Flac_File.Error = No_Error), Post => (case Flac_File.Error.Main is when None => Is_Open (Handle => Flac_File), when others => not Is_Open (Handle => Flac_File)), Depends => (Flac_File => Flac_File); --------------------------------------------------------------------------- -- Read_Metadata_Block --------------------------------------------------------------------------- procedure Read_Metadata_Block (Flac_File : in out File_Handle; Meta_Data : out Headers.Meta_Data.T) with Relaxed_Initialization => Meta_Data, Pre => (Is_Open (Handle => Flac_File) and then Flac_File.Error = No_Error), Post => (case Flac_File.Error.Main is when None => Is_Open (Handle => Flac_File) and then Meta_Data'Initialized, when others => not Is_Open (Handle => Flac_File)), Depends => (Flac_File => Flac_File, Meta_Data => Flac_File); --------------------------------------------------------------------------- -- Read_Stream_Info -- -- Reads basic stream info from current position. -- Requires to have read a meta data block with Info = Stream_Info before. --------------------------------------------------------------------------- procedure Read_Stream_Info (Flac_File : in out File_Handle; Meta_Data : out Headers.Meta_Data.T) with Relaxed_Initialization => Meta_Data, Pre => (Is_Open (Handle => Flac_File) and then Flac_File.Error = No_Error), Post => (case Flac_File.Error.Main is when None => Is_Open (Handle => Flac_File) and then Meta_Data'Initialized, when others => not Is_Open (Handle => Flac_File)), Depends => (Flac_File => Flac_File, Meta_Data => Flac_File); --------------------------------------------------------------------------- -- Read_Metadata_Block --------------------------------------------------------------------------- procedure Read_Metadata_Block (Flac_File : in out File_Handle; Meta_Data : out Headers.Meta_Data.T) is Error : Boolean; begin Headers.Meta_Data.Read (File => Flac_File.File, Item => Meta_Data, Error => Error); if Error then Close (Flac_File => Flac_File); Flac_File.Error := Error_Type'(Main => Not_A_Flac_File, Sub => Corrupt_Meta_Data); return; end if; end Read_Metadata_Block; --------------------------------------------------------------------------- -- Read_Stream_Info --------------------------------------------------------------------------- procedure Read_Stream_Info (Flac_File : in out File_Handle; Meta_Data : out Headers.Meta_Data.T) is Stream_Info : Headers.Stream_Info.T; Error : Boolean; use type Types.Block_Type; use type Types.Length_24; begin Read_Metadata_Block (Flac_File => Flac_File, Meta_Data => Meta_Data); if Flac_File.Error.Main /= None then return; end if; if Meta_Data.Block_Type /= Types.Stream_Info or else Meta_Data.Length /= Headers.Stream_Info.Stream_Info_Length then Close (Flac_File => Flac_File); Flac_File.Error := Error_Type'(Main => Not_A_Flac_File, Sub => Corrupt_Stream_Info); return; end if; Headers.Stream_Info.Read (File => Flac_File.File, Item => Stream_Info, Error => Error); if Error then Close (Flac_File => Flac_File); Flac_File.Error := Error_Type'(Main => Not_A_Flac_File, Sub => Invalid_Stream_Info); return; end if; Flac_File.Properties := Stream_Properties'(Num_Channels => Stream_Info.Num_Channels, Bits_Per_Sample => Stream_Info.Bits_Per_Sample, Sample_Rate => Stream_Info.Sample_Rate, Num_Samples => Stream_Info.Total_Samples); end Read_Stream_Info; --------------------------------------------------------------------------- -- Validate_Header --------------------------------------------------------------------------- procedure Validate_Header (Flac_File : in out File_Handle) is Header : Headers.Four_CC; Error : Boolean; use type Ada.Streams.Stream_Element_Array; begin SPARK_Stream_IO.Read (File => Flac_File.File, Item => Header, Error => Error); -- Check header. if Error or else Header /= Headers.Stream then Close (Flac_File => Flac_File); Flac_File.Error := Error_Type'(Main => Not_A_Flac_File, Sub => Header_Not_Found); end if; end Validate_Header; --------------------------------------------------------------------------- -- Close --------------------------------------------------------------------------- procedure Close (Flac_File : in out File_Handle) is begin SPARK_Stream_IO.Close (Flac_File.File); Flac_File.Open := False; end Close; --------------------------------------------------------------------------- -- Open --------------------------------------------------------------------------- procedure Open (File : in String; Flac_File : in out File_Handle) is Meta_Data : Headers.Meta_Data.T; Error : Boolean; begin -- Try opening the actual file. SPARK_Stream_IO.Open (File => Flac_File.File, Name => File, Error => Error); if Error then Flac_File.Error := Error_Type'(Main => Open_Error, Sub => None); return; end if; Flac_File.Open := True; -- For precondition of "Close" below. Flac_File.Error := No_Error; Validate_Header (Flac_File => Flac_File); if Flac_File.Error /= No_Error then return; end if; -- Header check went fine, now we should go for the first Stream_Info -- meta data block. This is mandatory according to the spec. Read_Stream_Info (Flac_File => Flac_File, Meta_Data => Meta_Data); if Flac_File.Error /= No_Error then return; end if; -- There may be more meta data blocks. For now, we just skip them. Skip_All_Meta_Data : declare use type Ada.Streams.Stream_IO.Count; use type Types.Block_Type; begin while not Meta_Data.Last loop pragma Loop_Invariant (Get_Error (Handle => Flac_File) = No_Error and then Is_Open (Handle => Flac_File)); Read_Metadata_Block (Flac_File => Flac_File, Meta_Data => Meta_Data); if Flac_File.Error /= No_Error then return; end if; if Meta_Data.Block_Type = Types.Invalid then Close (Flac_File => Flac_File); Flac_File.Error := Error_Type'(Main => Not_A_Flac_File, Sub => Invalid_Meta_Data); return; end if; SPARK_Stream_IO.Skip (File => Flac_File.File, Num_Elements => Ada.Streams.Stream_IO.Count (Meta_Data.Length), Error => Error); if Error then Close (Flac_File => Flac_File); Flac_File.Error := Error_Type'(Main => Not_A_Flac_File, Sub => Corrupt_Meta_Data); return; end if; end loop; end Skip_All_Meta_Data; -- Now the file should be positioned at the first frame. declare Frame : Frames.T; begin Frames.Read (File => Flac_File.File, Sample_Rate => Sample_Rate (Handle => Flac_File), Sample_Size => Bits_Per_Sample (Handle => Flac_File), Item => Frame, Error => Error); if Error then Flac.Debug.Print_Frame_Info (Frame => Frame); else Flac.Debug.Print_Frame_Info (Frame => Frame); end if; end; end Open; end Flac.Reader;
pragma Check_Policy (Validate => Disable); -- with Ada.Strings.Naked_Maps.Debug; with Ada.UCD.General_Category; with System.Once; with System.Reference_Counting; package body Ada.Strings.Naked_Maps.General_Category is use type UCD.Difference_Base; procedure Fill ( To : out Character_Ranges; Table : UCD.UCS_2_Array; Offset : UCD.Difference_Base); procedure Fill ( To : out Character_Ranges; Table : UCD.UCS_2_Array; Offset : UCD.Difference_Base) is Length : constant Natural := Table'Length; begin pragma Assert (Length = To'Length); for I in 0 .. Length - 1 loop declare T : Character_Range renames To (To'First + I); C : constant Wide_Wide_Character := Wide_Wide_Character'Val ( UCD.Difference_Base (Table (Table'First + I)) + Offset); begin T.Low := C; T.High := C; end; end loop; end Fill; procedure Fill ( To : out Character_Ranges; Table : UCD.UCS_4_Array); procedure Fill ( To : out Character_Ranges; Table : UCD.UCS_4_Array) is Length : constant Natural := Table'Length; begin pragma Assert (Length = To'Length); for I in 0 .. Length - 1 loop declare T : Character_Range renames To (To'First + I); C : constant Wide_Wide_Character := Wide_Wide_Character'Val (Table (Table'First + I)); begin T.Low := C; T.High := C; end; end loop; end Fill; procedure Fill ( To : out Character_Ranges; Table : UCD.Set_16_Type; Offset : UCD.Difference_Base); procedure Fill ( To : out Character_Ranges; Table : UCD.Set_16_Type; Offset : UCD.Difference_Base) is Length : constant Natural := Table'Length; begin pragma Assert (Length = To'Length); for I in 0 .. Length - 1 loop declare T : Character_Range renames To (To'First + I); Item : UCD.Set_16_Item_Type renames Table (Table'First + I); begin T.Low := Wide_Wide_Character'Val ( UCD.Difference_Base (Item.Low) + Offset); T.High := Wide_Wide_Character'Val ( UCD.Difference_Base (Item.High) + Offset); end; end loop; end Fill; procedure Fill ( To : out Character_Ranges; Table : UCD.Set_32_Type); procedure Fill ( To : out Character_Ranges; Table : UCD.Set_32_Type) is Length : constant Natural := Table'Length; begin pragma Assert (Length = To'Length); for I in 0 .. Length - 1 loop declare T : Character_Range renames To (To'First + I); Item : UCD.Set_32_Item_Type renames Table (Table'First + I); begin T.Low := Wide_Wide_Character'Val (Item.Low); T.High := Wide_Wide_Character'Val (Item.High); end; end loop; end Fill; procedure Fill ( To : in out Character_Ranges; Table_16x1 : UCD.UCS_2_Array; Table_16x2 : UCD.Set_16_Type; Table_17x1 : UCD.UCS_2_Array; Table_17x2 : UCD.Set_16_Type; Table_32x1 : UCD.UCS_4_Array; Table_32x2 : UCD.Set_32_Type); procedure Fill ( To : in out Character_Ranges; Table_16x1 : UCD.UCS_2_Array; Table_16x2 : UCD.Set_16_Type; Table_17x1 : UCD.UCS_2_Array; Table_17x2 : UCD.Set_16_Type; Table_32x1 : UCD.UCS_4_Array; Table_32x2 : UCD.Set_32_Type) is T_16x1 : Character_Ranges (Table_16x1'Range); T_16x2 : Character_Ranges (Table_16x2'Range); T_17x1 : Character_Ranges (Table_17x1'Range); T_17x2 : Character_Ranges (Table_17x2'Range); T_32x1 : Character_Ranges (Table_32x1'Range); T_32x2 : Character_Ranges (Table_32x2'Range); R_16_First : constant Positive := To'First; R_17_First : constant Positive := R_16_First + Table_16x1'Length + Table_16x2'Length; R_32_First : constant Positive := R_17_First + Table_17x1'Length + Table_17x2'Length; R_32_Last : constant Natural := R_32_First + Table_32x1'Length + Table_32x2'Length - 1; Last : Natural; begin Fill (T_16x1, Table_16x1, Offset => 0); Fill (T_16x2, Table_16x2, Offset => 0); Union (To (R_16_First .. R_17_First - 1), Last, T_16x1, T_16x2); pragma Assert (Last = R_17_First - 1); Fill (T_17x1, Table_17x1, Offset => 16#10000#); Fill (T_17x2, Table_17x2, Offset => 16#10000#); Union (To (R_17_First .. R_32_First - 1), Last, T_17x1, T_17x2); pragma Assert (Last = R_32_First - 1); Fill (T_32x1, Table_32x1); Fill (T_32x2, Table_32x2); Union (To (R_32_First .. R_32_Last), Last, T_32x1, T_32x2); pragma Assert (Last = R_32_Last); pragma Assert (Last = To'Last); end Fill; type Character_Set_Access_With_Pool is access Character_Set_Data; -- General_Category=Unassigned (Cn) Unassigned_Set : Character_Set_Access_With_Pool; Unassigned_Flag : aliased System.Once.Flag := 0; procedure Unassigned_Init; procedure Unassigned_Init is begin Unassigned_Set := new Character_Set_Data'( Length => UCD.General_Category.Cn_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Unassigned_Set.Items, UCD.General_Category.Cn_Table_XXXXx1, UCD.General_Category.Cn_Table_XXXXx2, UCD.General_Category.Cn_Table_1XXXXx1, UCD.General_Category.Cn_Table_1XXXXx2, UCD.General_Category.Cn_Table_XXXXXXXXx1, UCD.General_Category.Cn_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Unassigned_Set.all)); end Unassigned_Init; function Unassigned return not null Character_Set_Access is begin System.Once.Initialize ( Unassigned_Flag'Access, Unassigned_Init'Access); return Character_Set_Access (Unassigned_Set); end Unassigned; All_Unassigned_Set : Character_Set_Access_With_Pool; All_Unassigned_Flag : aliased System.Once.Flag := 0; procedure All_Unassigned_Init; procedure All_Unassigned_Init is begin declare UA : constant not null Character_Set_Access := Unassigned; begin All_Unassigned_Set := new Character_Set_Data'( Length => UA.Length, Reference_Count => System.Reference_Counting.Static, Items => UA.Items); end; pragma Assert ( All_Unassigned_Set.Items (All_Unassigned_Set.Items'Last).High = Character_Type'Val (16#10FFFF#)); All_Unassigned_Set.Items (All_Unassigned_Set.Items'Last).High := Character_Type'Last; pragma Check (Validate, Debug.Valid (All_Unassigned_Set.all)); end All_Unassigned_Init; function All_Unassigned return not null Character_Set_Access is begin System.Once.Initialize ( All_Unassigned_Flag'Access, All_Unassigned_Init'Access); return Character_Set_Access (All_Unassigned_Set); end All_Unassigned; -- General_Category=Uppercase_Letter (Lu) Uppercase_Letter_Set : Character_Set_Access_With_Pool; Uppercase_Letter_Flag : aliased System.Once.Flag := 0; procedure Uppercase_Letter_Init; procedure Uppercase_Letter_Init is begin Uppercase_Letter_Set := new Character_Set_Data'( Length => UCD.General_Category.Lu_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Uppercase_Letter_Set.Items, UCD.General_Category.Lu_Table_XXXXx1, UCD.General_Category.Lu_Table_XXXXx2, UCD.General_Category.Lu_Table_1XXXXx1, UCD.General_Category.Lu_Table_1XXXXx2, UCD.General_Category.Lu_Table_XXXXXXXXx1, UCD.General_Category.Lu_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Uppercase_Letter_Set.all)); end Uppercase_Letter_Init; function Uppercase_Letter return not null Character_Set_Access is begin System.Once.Initialize ( Uppercase_Letter_Flag'Access, Uppercase_Letter_Init'Access); return Character_Set_Access (Uppercase_Letter_Set); end Uppercase_Letter; -- General_Category=Lowercase_Letter (Ll) Lowercase_Letter_Set : Character_Set_Access_With_Pool; Lowercase_Letter_Flag : aliased System.Once.Flag := 0; procedure Lowercase_Letter_Init; procedure Lowercase_Letter_Init is begin Lowercase_Letter_Set := new Character_Set_Data'( Length => UCD.General_Category.Ll_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Lowercase_Letter_Set.Items, UCD.General_Category.Ll_Table_XXXXx1, UCD.General_Category.Ll_Table_XXXXx2, UCD.General_Category.Ll_Table_1XXXXx1, UCD.General_Category.Ll_Table_1XXXXx2, UCD.General_Category.Ll_Table_XXXXXXXXx1, UCD.General_Category.Ll_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Lowercase_Letter_Set.all)); end Lowercase_Letter_Init; function Lowercase_Letter return not null Character_Set_Access is begin System.Once.Initialize ( Lowercase_Letter_Flag'Access, Lowercase_Letter_Init'Access); return Character_Set_Access (Lowercase_Letter_Set); end Lowercase_Letter; -- General_Category=Titlecase_Letter (Lt) Titlecase_Letter_Set : Character_Set_Access_With_Pool; Titlecase_Letter_Flag : aliased System.Once.Flag := 0; procedure Titlecase_Letter_Init; procedure Titlecase_Letter_Init is begin Titlecase_Letter_Set := new Character_Set_Data'( Length => UCD.General_Category.Lt_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Titlecase_Letter_Set.Items, UCD.General_Category.Lt_Table_XXXXx1, UCD.General_Category.Lt_Table_XXXXx2, UCD.General_Category.Lt_Table_1XXXXx1, UCD.General_Category.Lt_Table_1XXXXx2, UCD.General_Category.Lt_Table_XXXXXXXXx1, UCD.General_Category.Lt_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Titlecase_Letter_Set.all)); end Titlecase_Letter_Init; function Titlecase_Letter return not null Character_Set_Access is begin System.Once.Initialize ( Titlecase_Letter_Flag'Access, Titlecase_Letter_Init'Access); return Character_Set_Access (Titlecase_Letter_Set); end Titlecase_Letter; -- General_Category=Modifier_Letter (Lm) Modifier_Letter_Set : Character_Set_Access_With_Pool; Modifier_Letter_Flag : aliased System.Once.Flag := 0; procedure Modifier_Letter_Init; procedure Modifier_Letter_Init is begin Modifier_Letter_Set := new Character_Set_Data'( Length => UCD.General_Category.Lm_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Modifier_Letter_Set.Items, UCD.General_Category.Lm_Table_XXXXx1, UCD.General_Category.Lm_Table_XXXXx2, UCD.General_Category.Lm_Table_1XXXXx1, UCD.General_Category.Lm_Table_1XXXXx2, UCD.General_Category.Lm_Table_XXXXXXXXx1, UCD.General_Category.Lm_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Modifier_Letter_Set.all)); end Modifier_Letter_Init; function Modifier_Letter return not null Character_Set_Access is begin System.Once.Initialize ( Modifier_Letter_Flag'Access, Modifier_Letter_Init'Access); return Character_Set_Access (Modifier_Letter_Set); end Modifier_Letter; -- General_Category=Other_Letter (Lo) Other_Letter_Set : Character_Set_Access_With_Pool; Other_Letter_Flag : aliased System.Once.Flag := 0; procedure Other_Letter_Init; procedure Other_Letter_Init is begin Other_Letter_Set := new Character_Set_Data'( Length => UCD.General_Category.Lo_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Other_Letter_Set.Items, UCD.General_Category.Lo_Table_XXXXx1, UCD.General_Category.Lo_Table_XXXXx2, UCD.General_Category.Lo_Table_1XXXXx1, UCD.General_Category.Lo_Table_1XXXXx2, UCD.General_Category.Lo_Table_XXXXXXXXx1, UCD.General_Category.Lo_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Other_Letter_Set.all)); end Other_Letter_Init; function Other_Letter return not null Character_Set_Access is begin System.Once.Initialize ( Other_Letter_Flag'Access, Other_Letter_Init'Access); return Character_Set_Access (Other_Letter_Set); end Other_Letter; -- General_Category=Nonspacing_Mark (Mn) Nonspacing_Mark_Set : Character_Set_Access_With_Pool; Nonspacing_Mark_Flag : aliased System.Once.Flag := 0; procedure Nonspacing_Mark_Init; procedure Nonspacing_Mark_Init is begin Nonspacing_Mark_Set := new Character_Set_Data'( Length => UCD.General_Category.Mn_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Nonspacing_Mark_Set.Items, UCD.General_Category.Mn_Table_XXXXx1, UCD.General_Category.Mn_Table_XXXXx2, UCD.General_Category.Mn_Table_1XXXXx1, UCD.General_Category.Mn_Table_1XXXXx2, UCD.General_Category.Mn_Table_XXXXXXXXx1, UCD.General_Category.Mn_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Nonspacing_Mark_Set.all)); end Nonspacing_Mark_Init; function Nonspacing_Mark return not null Character_Set_Access is begin System.Once.Initialize ( Nonspacing_Mark_Flag'Access, Nonspacing_Mark_Init'Access); return Character_Set_Access (Nonspacing_Mark_Set); end Nonspacing_Mark; -- General_Category=Enclosing_Mark (Me) Enclosing_Mark_Set : Character_Set_Access_With_Pool; Enclosing_Mark_Flag : aliased System.Once.Flag := 0; procedure Enclosing_Mark_Init; procedure Enclosing_Mark_Init is begin Enclosing_Mark_Set := new Character_Set_Data'( Length => UCD.General_Category.Me_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Enclosing_Mark_Set.Items, UCD.General_Category.Me_Table_XXXXx1, UCD.General_Category.Me_Table_XXXXx2, UCD.General_Category.Me_Table_1XXXXx1, UCD.General_Category.Me_Table_1XXXXx2, UCD.General_Category.Me_Table_XXXXXXXXx1, UCD.General_Category.Me_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Enclosing_Mark_Set.all)); end Enclosing_Mark_Init; function Enclosing_Mark return not null Character_Set_Access is begin System.Once.Initialize ( Enclosing_Mark_Flag'Access, Enclosing_Mark_Init'Access); return Character_Set_Access (Enclosing_Mark_Set); end Enclosing_Mark; -- General_Category=Spacing_Mark (Mc) Spacing_Mark_Set : Character_Set_Access_With_Pool; Spacing_Mark_Flag : aliased System.Once.Flag := 0; procedure Spacing_Mark_Init; procedure Spacing_Mark_Init is begin Spacing_Mark_Set := new Character_Set_Data'( Length => UCD.General_Category.Mc_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Spacing_Mark_Set.Items, UCD.General_Category.Mc_Table_XXXXx1, UCD.General_Category.Mc_Table_XXXXx2, UCD.General_Category.Mc_Table_1XXXXx1, UCD.General_Category.Mc_Table_1XXXXx2, UCD.General_Category.Mc_Table_XXXXXXXXx1, UCD.General_Category.Mc_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Spacing_Mark_Set.all)); end Spacing_Mark_Init; function Spacing_Mark return not null Character_Set_Access is begin System.Once.Initialize ( Spacing_Mark_Flag'Access, Spacing_Mark_Init'Access); return Character_Set_Access (Spacing_Mark_Set); end Spacing_Mark; -- General_Category=Decimal_Number (Nd) Decimal_Number_Set : Character_Set_Access_With_Pool; Decimal_Number_Flag : aliased System.Once.Flag := 0; procedure Decimal_Number_Init; procedure Decimal_Number_Init is begin Decimal_Number_Set := new Character_Set_Data'( Length => UCD.General_Category.Nd_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Decimal_Number_Set.Items, UCD.General_Category.Nd_Table_XXXXx1, UCD.General_Category.Nd_Table_XXXXx2, UCD.General_Category.Nd_Table_1XXXXx1, UCD.General_Category.Nd_Table_1XXXXx2, UCD.General_Category.Nd_Table_XXXXXXXXx1, UCD.General_Category.Nd_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Decimal_Number_Set.all)); end Decimal_Number_Init; function Decimal_Number return not null Character_Set_Access is begin System.Once.Initialize ( Decimal_Number_Flag'Access, Decimal_Number_Init'Access); return Character_Set_Access (Decimal_Number_Set); end Decimal_Number; -- General_Category=Letter_Number (Nl) Letter_Number_Set : Character_Set_Access_With_Pool; Letter_Number_Flag : aliased System.Once.Flag := 0; procedure Letter_Number_Init; procedure Letter_Number_Init is begin Letter_Number_Set := new Character_Set_Data'( Length => UCD.General_Category.Nl_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Letter_Number_Set.Items, UCD.General_Category.Nl_Table_XXXXx1, UCD.General_Category.Nl_Table_XXXXx2, UCD.General_Category.Nl_Table_1XXXXx1, UCD.General_Category.Nl_Table_1XXXXx2, UCD.General_Category.Nl_Table_XXXXXXXXx1, UCD.General_Category.Nl_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Letter_Number_Set.all)); end Letter_Number_Init; function Letter_Number return not null Character_Set_Access is begin System.Once.Initialize ( Letter_Number_Flag'Access, Letter_Number_Init'Access); return Character_Set_Access (Letter_Number_Set); end Letter_Number; -- General_Category=Other_Number (No) Other_Number_Set : Character_Set_Access_With_Pool; Other_Number_Flag : aliased System.Once.Flag := 0; procedure Other_Number_Init; procedure Other_Number_Init is begin Other_Number_Set := new Character_Set_Data'( Length => UCD.General_Category.No_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Other_Number_Set.Items, UCD.General_Category.No_Table_XXXXx1, UCD.General_Category.No_Table_XXXXx2, UCD.General_Category.No_Table_1XXXXx1, UCD.General_Category.No_Table_1XXXXx2, UCD.General_Category.No_Table_XXXXXXXXx1, UCD.General_Category.No_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Other_Number_Set.all)); end Other_Number_Init; function Other_Number return not null Character_Set_Access is begin System.Once.Initialize ( Other_Number_Flag'Access, Other_Number_Init'Access); return Character_Set_Access (Other_Number_Set); end Other_Number; -- General_Category=Space_Separator (Zs) Space_Separator_Set : Character_Set_Access_With_Pool; Space_Separator_Flag : aliased System.Once.Flag := 0; procedure Space_Separator_Init; procedure Space_Separator_Init is begin Space_Separator_Set := new Character_Set_Data'( Length => UCD.General_Category.Zs_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Space_Separator_Set.Items, UCD.General_Category.Zs_Table_XXXXx1, UCD.General_Category.Zs_Table_XXXXx2, UCD.General_Category.Zs_Table_1XXXXx1, UCD.General_Category.Zs_Table_1XXXXx2, UCD.General_Category.Zs_Table_XXXXXXXXx1, UCD.General_Category.Zs_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Space_Separator_Set.all)); end Space_Separator_Init; function Space_Separator return not null Character_Set_Access is begin System.Once.Initialize ( Space_Separator_Flag'Access, Space_Separator_Init'Access); return Character_Set_Access (Space_Separator_Set); end Space_Separator; -- General_Category=Line_Separator (Zl) Line_Separator_Set : Character_Set_Access_With_Pool; Line_Separator_Flag : aliased System.Once.Flag := 0; procedure Line_Separator_Init; procedure Line_Separator_Init is begin Line_Separator_Set := new Character_Set_Data'( Length => UCD.General_Category.Zl_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Line_Separator_Set.Items, UCD.General_Category.Zl_Table_XXXXx1, UCD.General_Category.Zl_Table_XXXXx2, UCD.General_Category.Zl_Table_1XXXXx1, UCD.General_Category.Zl_Table_1XXXXx2, UCD.General_Category.Zl_Table_XXXXXXXXx1, UCD.General_Category.Zl_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Line_Separator_Set.all)); end Line_Separator_Init; function Line_Separator return not null Character_Set_Access is begin System.Once.Initialize ( Line_Separator_Flag'Access, Line_Separator_Init'Access); return Character_Set_Access (Line_Separator_Set); end Line_Separator; -- General_Category=Paragraph_Separator (Zp) Paragraph_Separator_Set : Character_Set_Access_With_Pool; Paragraph_Separator_Flag : aliased System.Once.Flag := 0; procedure Paragraph_Separator_Init; procedure Paragraph_Separator_Init is begin Paragraph_Separator_Set := new Character_Set_Data'( Length => UCD.General_Category.Zp_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Paragraph_Separator_Set.Items, UCD.General_Category.Zp_Table_XXXXx1, UCD.General_Category.Zp_Table_XXXXx2, UCD.General_Category.Zp_Table_1XXXXx1, UCD.General_Category.Zp_Table_1XXXXx2, UCD.General_Category.Zp_Table_XXXXXXXXx1, UCD.General_Category.Zp_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Paragraph_Separator_Set.all)); end Paragraph_Separator_Init; function Paragraph_Separator return not null Character_Set_Access is begin System.Once.Initialize ( Paragraph_Separator_Flag'Access, Paragraph_Separator_Init'Access); return Character_Set_Access (Paragraph_Separator_Set); end Paragraph_Separator; -- General_Category=Control (Cc) Control_Set : Character_Set_Access_With_Pool; Control_Flag : aliased System.Once.Flag := 0; procedure Control_Init; procedure Control_Init is begin Control_Set := new Character_Set_Data'( Length => UCD.General_Category.Cc_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Control_Set.Items, UCD.General_Category.Cc_Table_XXXXx1, UCD.General_Category.Cc_Table_XXXXx2, UCD.General_Category.Cc_Table_1XXXXx1, UCD.General_Category.Cc_Table_1XXXXx2, UCD.General_Category.Cc_Table_XXXXXXXXx1, UCD.General_Category.Cc_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Control_Set.all)); end Control_Init; function Control return not null Character_Set_Access is begin System.Once.Initialize ( Control_Flag'Access, Control_Init'Access); return Character_Set_Access (Control_Set); end Control; -- General_Category=Format (Cf) Format_Set : Character_Set_Access_With_Pool; Format_Flag : aliased System.Once.Flag := 0; procedure Format_Init; procedure Format_Init is begin Format_Set := new Character_Set_Data'( Length => UCD.General_Category.Cf_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Format_Set.Items, UCD.General_Category.Cf_Table_XXXXx1, UCD.General_Category.Cf_Table_XXXXx2, UCD.General_Category.Cf_Table_1XXXXx1, UCD.General_Category.Cf_Table_1XXXXx2, UCD.General_Category.Cf_Table_XXXXXXXXx1, UCD.General_Category.Cf_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Format_Set.all)); end Format_Init; function Format return not null Character_Set_Access is begin System.Once.Initialize ( Format_Flag'Access, Format_Init'Access); return Character_Set_Access (Format_Set); end Format; -- General_Category=Private_Use (Co) Private_Use_Set : Character_Set_Access_With_Pool; Private_Use_Flag : aliased System.Once.Flag := 0; procedure Private_Use_Init; procedure Private_Use_Init is begin Private_Use_Set := new Character_Set_Data'( Length => UCD.General_Category.Co_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Private_Use_Set.Items, UCD.General_Category.Co_Table_XXXXx1, UCD.General_Category.Co_Table_XXXXx2, UCD.General_Category.Co_Table_1XXXXx1, UCD.General_Category.Co_Table_1XXXXx2, UCD.General_Category.Co_Table_XXXXXXXXx1, UCD.General_Category.Co_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Private_Use_Set.all)); end Private_Use_Init; function Private_Use return not null Character_Set_Access is begin System.Once.Initialize ( Private_Use_Flag'Access, Private_Use_Init'Access); return Character_Set_Access (Private_Use_Set); end Private_Use; -- General_Category=Surrogate (Cs) Surrogate_Set : Character_Set_Access_With_Pool; Surrogate_Flag : aliased System.Once.Flag := 0; procedure Surrogate_Init; procedure Surrogate_Init is begin Surrogate_Set := new Character_Set_Data'( Length => UCD.General_Category.Cs_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Surrogate_Set.Items, UCD.General_Category.Cs_Table_XXXXx1, UCD.General_Category.Cs_Table_XXXXx2, UCD.General_Category.Cs_Table_1XXXXx1, UCD.General_Category.Cs_Table_1XXXXx2, UCD.General_Category.Cs_Table_XXXXXXXXx1, UCD.General_Category.Cs_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Surrogate_Set.all)); end Surrogate_Init; function Surrogate return not null Character_Set_Access is begin System.Once.Initialize ( Surrogate_Flag'Access, Surrogate_Init'Access); return Character_Set_Access (Surrogate_Set); end Surrogate; -- General_Category=Dash_Punctuation (Pd) Dash_Punctuation_Set : Character_Set_Access_With_Pool; Dash_Punctuation_Flag : aliased System.Once.Flag := 0; procedure Dash_Punctuation_Init; procedure Dash_Punctuation_Init is begin Dash_Punctuation_Set := new Character_Set_Data'( Length => UCD.General_Category.Pd_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Dash_Punctuation_Set.Items, UCD.General_Category.Pd_Table_XXXXx1, UCD.General_Category.Pd_Table_XXXXx2, UCD.General_Category.Pd_Table_1XXXXx1, UCD.General_Category.Pd_Table_1XXXXx2, UCD.General_Category.Pd_Table_XXXXXXXXx1, UCD.General_Category.Pd_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Dash_Punctuation_Set.all)); end Dash_Punctuation_Init; function Dash_Punctuation return not null Character_Set_Access is begin System.Once.Initialize ( Dash_Punctuation_Flag'Access, Dash_Punctuation_Init'Access); return Character_Set_Access (Dash_Punctuation_Set); end Dash_Punctuation; -- General_Category=Open_Punctuation (Ps) Open_Punctuation_Set : Character_Set_Access_With_Pool; Open_Punctuation_Flag : aliased System.Once.Flag := 0; procedure Open_Punctuation_Init; procedure Open_Punctuation_Init is begin Open_Punctuation_Set := new Character_Set_Data'( Length => UCD.General_Category.Ps_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Open_Punctuation_Set.Items, UCD.General_Category.Ps_Table_XXXXx1, UCD.General_Category.Ps_Table_XXXXx2, UCD.General_Category.Ps_Table_1XXXXx1, UCD.General_Category.Ps_Table_1XXXXx2, UCD.General_Category.Ps_Table_XXXXXXXXx1, UCD.General_Category.Ps_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Open_Punctuation_Set.all)); end Open_Punctuation_Init; function Open_Punctuation return not null Character_Set_Access is begin System.Once.Initialize ( Open_Punctuation_Flag'Access, Open_Punctuation_Init'Access); return Character_Set_Access (Open_Punctuation_Set); end Open_Punctuation; -- General_Category=Close_Punctuation (Pe) Close_Punctuation_Set : Character_Set_Access_With_Pool; Close_Punctuation_Flag : aliased System.Once.Flag := 0; procedure Close_Punctuation_Init; procedure Close_Punctuation_Init is begin Close_Punctuation_Set := new Character_Set_Data'( Length => UCD.General_Category.Pe_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Close_Punctuation_Set.Items, UCD.General_Category.Pe_Table_XXXXx1, UCD.General_Category.Pe_Table_XXXXx2, UCD.General_Category.Pe_Table_1XXXXx1, UCD.General_Category.Pe_Table_1XXXXx2, UCD.General_Category.Pe_Table_XXXXXXXXx1, UCD.General_Category.Pe_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Close_Punctuation_Set.all)); end Close_Punctuation_Init; function Close_Punctuation return not null Character_Set_Access is begin System.Once.Initialize ( Close_Punctuation_Flag'Access, Close_Punctuation_Init'Access); return Character_Set_Access (Close_Punctuation_Set); end Close_Punctuation; -- General_Category=Connector_Punctuation (Pc) Connector_Punctuation_Set : Character_Set_Access_With_Pool; Connector_Punctuation_Flag : aliased System.Once.Flag := 0; procedure Connector_Punctuation_Init; procedure Connector_Punctuation_Init is begin Connector_Punctuation_Set := new Character_Set_Data'( Length => UCD.General_Category.Pc_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Connector_Punctuation_Set.Items, UCD.General_Category.Pc_Table_XXXXx1, UCD.General_Category.Pc_Table_XXXXx2, UCD.General_Category.Pc_Table_1XXXXx1, UCD.General_Category.Pc_Table_1XXXXx2, UCD.General_Category.Pc_Table_XXXXXXXXx1, UCD.General_Category.Pc_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Connector_Punctuation_Set.all)); end Connector_Punctuation_Init; function Connector_Punctuation return not null Character_Set_Access is begin System.Once.Initialize ( Connector_Punctuation_Flag'Access, Connector_Punctuation_Init'Access); return Character_Set_Access (Connector_Punctuation_Set); end Connector_Punctuation; -- General_Category=Other_Punctuation (Po) Other_Punctuation_Set : Character_Set_Access_With_Pool; Other_Punctuation_Flag : aliased System.Once.Flag := 0; procedure Other_Punctuation_Init; procedure Other_Punctuation_Init is begin Other_Punctuation_Set := new Character_Set_Data'( Length => UCD.General_Category.Po_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Other_Punctuation_Set.Items, UCD.General_Category.Po_Table_XXXXx1, UCD.General_Category.Po_Table_XXXXx2, UCD.General_Category.Po_Table_1XXXXx1, UCD.General_Category.Po_Table_1XXXXx2, UCD.General_Category.Po_Table_XXXXXXXXx1, UCD.General_Category.Po_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Other_Punctuation_Set.all)); end Other_Punctuation_Init; function Other_Punctuation return not null Character_Set_Access is begin System.Once.Initialize ( Other_Punctuation_Flag'Access, Other_Punctuation_Init'Access); return Character_Set_Access (Other_Punctuation_Set); end Other_Punctuation; -- General_Category=Math_Symbol (Sm) Math_Symbol_Set : Character_Set_Access_With_Pool; Math_Symbol_Flag : aliased System.Once.Flag := 0; procedure Math_Symbol_Init; procedure Math_Symbol_Init is begin Math_Symbol_Set := new Character_Set_Data'( Length => UCD.General_Category.Sm_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Math_Symbol_Set.Items, UCD.General_Category.Sm_Table_XXXXx1, UCD.General_Category.Sm_Table_XXXXx2, UCD.General_Category.Sm_Table_1XXXXx1, UCD.General_Category.Sm_Table_1XXXXx2, UCD.General_Category.Sm_Table_XXXXXXXXx1, UCD.General_Category.Sm_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Math_Symbol_Set.all)); end Math_Symbol_Init; function Math_Symbol return not null Character_Set_Access is begin System.Once.Initialize ( Math_Symbol_Flag'Access, Math_Symbol_Init'Access); return Character_Set_Access (Math_Symbol_Set); end Math_Symbol; -- General_Category=Currency_Symbol (Sc) Currency_Symbol_Set : Character_Set_Access_With_Pool; Currency_Symbol_Flag : aliased System.Once.Flag := 0; procedure Currency_Symbol_Init; procedure Currency_Symbol_Init is begin Currency_Symbol_Set := new Character_Set_Data'( Length => UCD.General_Category.Sc_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Currency_Symbol_Set.Items, UCD.General_Category.Sc_Table_XXXXx1, UCD.General_Category.Sc_Table_XXXXx2, UCD.General_Category.Sc_Table_1XXXXx1, UCD.General_Category.Sc_Table_1XXXXx2, UCD.General_Category.Sc_Table_XXXXXXXXx1, UCD.General_Category.Sc_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Currency_Symbol_Set.all)); end Currency_Symbol_Init; function Currency_Symbol return not null Character_Set_Access is begin System.Once.Initialize ( Currency_Symbol_Flag'Access, Currency_Symbol_Init'Access); return Character_Set_Access (Currency_Symbol_Set); end Currency_Symbol; -- General_Category=Modifier_Symbol (Sk) Modifier_Symbol_Set : Character_Set_Access_With_Pool; Modifier_Symbol_Flag : aliased System.Once.Flag := 0; procedure Modifier_Symbol_Init; procedure Modifier_Symbol_Init is begin Modifier_Symbol_Set := new Character_Set_Data'( Length => UCD.General_Category.Sk_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Modifier_Symbol_Set.Items, UCD.General_Category.Sk_Table_XXXXx1, UCD.General_Category.Sk_Table_XXXXx2, UCD.General_Category.Sk_Table_1XXXXx1, UCD.General_Category.Sk_Table_1XXXXx2, UCD.General_Category.Sk_Table_XXXXXXXXx1, UCD.General_Category.Sk_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Modifier_Symbol_Set.all)); end Modifier_Symbol_Init; function Modifier_Symbol return not null Character_Set_Access is begin System.Once.Initialize ( Modifier_Symbol_Flag'Access, Modifier_Symbol_Init'Access); return Character_Set_Access (Modifier_Symbol_Set); end Modifier_Symbol; -- General_Category=Other_Symbol (So) Other_Symbol_Set : Character_Set_Access_With_Pool; Other_Symbol_Flag : aliased System.Once.Flag := 0; procedure Other_Symbol_Init; procedure Other_Symbol_Init is begin Other_Symbol_Set := new Character_Set_Data'( Length => UCD.General_Category.So_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Other_Symbol_Set.Items, UCD.General_Category.So_Table_XXXXx1, UCD.General_Category.So_Table_XXXXx2, UCD.General_Category.So_Table_1XXXXx1, UCD.General_Category.So_Table_1XXXXx2, UCD.General_Category.So_Table_XXXXXXXXx1, UCD.General_Category.So_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Other_Symbol_Set.all)); end Other_Symbol_Init; function Other_Symbol return not null Character_Set_Access is begin System.Once.Initialize ( Other_Symbol_Flag'Access, Other_Symbol_Init'Access); return Character_Set_Access (Other_Symbol_Set); end Other_Symbol; -- General_Category=Initial_Punctuation (Pi) Initial_Punctuation_Set : Character_Set_Access_With_Pool; Initial_Punctuation_Flag : aliased System.Once.Flag := 0; procedure Initial_Punctuation_Init; procedure Initial_Punctuation_Init is begin Initial_Punctuation_Set := new Character_Set_Data'( Length => UCD.General_Category.Pi_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Initial_Punctuation_Set.Items, UCD.General_Category.Pi_Table_XXXXx1, UCD.General_Category.Pi_Table_XXXXx2, UCD.General_Category.Pi_Table_1XXXXx1, UCD.General_Category.Pi_Table_1XXXXx2, UCD.General_Category.Pi_Table_XXXXXXXXx1, UCD.General_Category.Pi_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Initial_Punctuation_Set.all)); end Initial_Punctuation_Init; function Initial_Punctuation return not null Character_Set_Access is begin System.Once.Initialize ( Initial_Punctuation_Flag'Access, Initial_Punctuation_Init'Access); return Character_Set_Access (Initial_Punctuation_Set); end Initial_Punctuation; -- General_Category=Final_Punctuation (Pf) Final_Punctuation_Set : Character_Set_Access_With_Pool; Final_Punctuation_Flag : aliased System.Once.Flag := 0; procedure Final_Punctuation_Init; procedure Final_Punctuation_Init is begin Final_Punctuation_Set := new Character_Set_Data'( Length => UCD.General_Category.Pf_Range_Length, Reference_Count => System.Reference_Counting.Static, Items => <>); Fill ( Final_Punctuation_Set.Items, UCD.General_Category.Pf_Table_XXXXx1, UCD.General_Category.Pf_Table_XXXXx2, UCD.General_Category.Pf_Table_1XXXXx1, UCD.General_Category.Pf_Table_1XXXXx2, UCD.General_Category.Pf_Table_XXXXXXXXx1, UCD.General_Category.Pf_Table_XXXXXXXXx2); pragma Check (Validate, Debug.Valid (Final_Punctuation_Set.all)); end Final_Punctuation_Init; function Final_Punctuation return not null Character_Set_Access is begin System.Once.Initialize ( Final_Punctuation_Flag'Access, Final_Punctuation_Init'Access); return Character_Set_Access (Final_Punctuation_Set); end Final_Punctuation; end Ada.Strings.Naked_Maps.General_Category;
with Ada.Text_IO; with PrimeInstances; package body Problem_58 is -- 1 3 5 7 9 13 17 21 25 31 37 43 49 ... -- 2 2 2 2 4 4 4 4 6 6 6 6 8... package IO renames Ada.Text_IO; package Positive_Primes renames PrimeInstances.Positive_Primes; procedure Solve is increment : Positive := 2; last : Positive := 1; primes : Natural := 0; count : Positive := 1; gen : Positive_Primes.Prime_Generator := Positive_Primes.Make_Generator; next_prime : Positive; function Is_Prime(num : Positive) return Boolean is begin while num > next_prime loop Positive_Primes.Next_Prime(gen, next_prime); end loop; if next_prime = 1 then raise Constraint_Error; end if; return num = next_prime; end Is_Prime; begin Positive_Primes.Next_Prime(gen, next_prime); loop for count in 1 .. 4 loop last := last + increment; if Is_Prime(last) then primes := primes + 1; end if; end loop; count := count + 4; increment := increment + 2; exit when 10*primes < count; end loop; IO.Put_Line(Positive'Image(increment / 2)); end Solve; end Problem_58;
-- { dg-do run } -- { dg-options "-gnatp" } with Renaming8_Pkg1; use Renaming8_Pkg1; procedure Renaming8 is begin if not B then raise Program_Error; end if; end;
------------------------------------------------------------------------------- -- This file is part of libsparkcrypto. -- -- Copyright (C) 2018, Componolit GmbH -- 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 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 LSC_Test_AES; with LSC_Test_AES_CBC; with LSC_Test_SHA2; with LSC_Test_HMAC_SHA2; with LSC_Test_SHA1; with LSC_Test_HMAC_SHA1; with LSC_Test_RIPEMD160; with LSC_Test_HMAC_RIPEMD160; package body LSC_Suite is use AUnit.Test_Suites; -- Statically allocate test suite: Result : aliased Test_Suite; -- Statically allocate test cases: Test_AES : aliased LSC_Test_AES.Test_Case; Test_AES_CBC : aliased LSC_Test_AES_CBC.Test_Case; Test_SHA2 : aliased LSC_Test_SHA2.Test_Case; Test_HMAC_SHA2 : aliased LSC_Test_HMAC_SHA2.Test_Case; Test_SHA1 : aliased LSC_Test_SHA1.Test_Case; Test_HMAC_SHA1 : aliased LSC_Test_HMAC_SHA1.Test_Case; Test_RIPEMD160 : aliased LSC_Test_RIPEMD160.Test_Case; Test_HMAC_RIPEMD160 : aliased LSC_Test_HMAC_RIPEMD160.Test_Case; function Suite return Access_Test_Suite is begin Add_Test (Result'Access, Test_AES'Access); Add_Test (Result'Access, Test_AES_CBC'Access); Add_Test (Result'Access, Test_SHA2'Access); Add_Test (Result'Access, Test_HMAC_SHA2'Access); Add_Test (Result'Access, Test_SHA1'Access); Add_Test (Result'Access, Test_HMAC_SHA1'Access); Add_Test (Result'Access, Test_RIPEMD160'Access); Add_Test (Result'Access, Test_HMAC_RIPEMD160'Access); return Result'Access; end Suite; end LSC_Suite;