CombinedText
stringlengths 4
3.42M
|
|---|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . E X P I N T --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
package body System.Exp_Int is
-----------------
-- Exp_Integer --
-----------------
-- Note that negative exponents get a constraint error because the
-- subtype of the Right argument (the exponent) is Natural.
function Exp_Integer
(Left : Integer;
Right : Natural)
return Integer
is
Result : Integer := 1;
Factor : Integer := Left;
Exp : Natural := Right;
begin
-- We use the standard logarithmic approach, Exp gets shifted right
-- testing successive low order bits and Factor is the value of the
-- base raised to the next power of 2.
-- Note: it is not worth special casing base values -1, 0, +1 since
-- the expander does this when the base is a literal, and other cases
-- will be extremely rare.
if Exp /= 0 then
loop
if Exp rem 2 /= 0 then
declare
pragma Unsuppress (All_Checks);
begin
Result := Result * Factor;
end;
end if;
Exp := Exp / 2;
exit when Exp = 0;
declare
pragma Unsuppress (All_Checks);
begin
Factor := Factor * Factor;
end;
end loop;
end if;
return Result;
end Exp_Integer;
end System.Exp_Int;
|
-- Copyright 2018-2020 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with System;
package Pck is
procedure Do_Nothing (A : System.Address);
function Ident (S : String) return String;
end Pck;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 1 5 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_15 is
subtype Bit_Order is System.Bit_Order;
Reverse_Bit_Order : constant Bit_Order :=
Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order));
subtype Ofs is System.Storage_Elements.Storage_Offset;
subtype Uns is System.Unsigned_Types.Unsigned;
subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7;
use type System.Storage_Elements.Storage_Offset;
use type System.Unsigned_Types.Unsigned;
type Cluster is record
E0, E1, E2, E3, E4, E5, E6, E7 : Bits_15;
end record;
for Cluster use record
E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1;
E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1;
E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1;
E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1;
E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1;
E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1;
E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1;
E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1;
end record;
for Cluster'Size use Bits * 8;
for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment,
1 +
1 * Boolean'Pos (Bits mod 2 = 0) +
2 * Boolean'Pos (Bits mod 4 = 0));
-- Use maximum possible alignment, given the bit field size, since this
-- will result in the most efficient code possible for the field.
type Cluster_Ref is access Cluster;
type Rev_Cluster is new Cluster
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_Cluster_Ref is access Rev_Cluster;
------------
-- Get_15 --
------------
function Get_15
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_15
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end Get_15;
------------
-- Set_15 --
------------
procedure Set_15
(Arr : System.Address;
N : Natural;
E : Bits_15;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end Set_15;
end System.Pack_15;
|
-- C34007F.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.
--*
-- FOR DERIVED ACCESS TYPES WHOSE DESIGNATED TYPE IS A ONE-DIMENSIONAL
-- ARRAY TYPE:
-- CHECK THAT ALL VALUES OF THE PARENT (BASE) TYPE ARE PRESENT FOR THE
-- DERIVED (BASE) TYPE WHEN THE DERIVED TYPE DEFINITION IS
-- CONSTRAINED.
-- CHECK THAT ANY CONSTRAINT IMPOSED ON THE PARENT SUBTYPE IS ALSO
-- IMPOSED ON THE DERIVED SUBTYPE.
-- JRK 9/25/86
WITH REPORT; USE REPORT;
PROCEDURE C34007F IS
SUBTYPE COMPONENT IS INTEGER;
TYPE DESIGNATED IS ARRAY (NATURAL RANGE <>) OF COMPONENT;
SUBTYPE SUBDESIGNATED IS DESIGNATED (5 .. 7);
PACKAGE PKG IS
TYPE PARENT IS ACCESS DESIGNATED;
FUNCTION CREATE ( F, L : NATURAL;
C : COMPONENT;
DUMMY : PARENT -- TO RESOLVE OVERLOADING.
) RETURN PARENT;
END PKG;
USE PKG;
TYPE T IS NEW PARENT (IDENT_INT (5) .. IDENT_INT (7));
SUBTYPE SUBPARENT IS PARENT (5 .. 7);
TYPE S IS NEW SUBPARENT;
X : T := NEW SUBDESIGNATED'(OTHERS => 2);
Y : S := NEW SUBDESIGNATED'(OTHERS => 2);
PACKAGE BODY PKG IS
FUNCTION CREATE
( F, L : NATURAL;
C : COMPONENT;
DUMMY : PARENT
) RETURN PARENT
IS
A : PARENT := NEW DESIGNATED (F .. L);
B : COMPONENT := C;
BEGIN
FOR I IN F .. L LOOP
A (I) := B;
B := B + 1;
END LOOP;
RETURN A;
END CREATE;
END PKG;
BEGIN
TEST ("C34007F", "CHECK THAT ALL VALUES OF THE PARENT (BASE) " &
"TYPE ARE PRESENT FOR THE DERIVED (BASE) TYPE " &
"WHEN THE DERIVED TYPE DEFINITION IS " &
"CONSTRAINED. ALSO CHECK THAT ANY CONSTRAINT " &
"IMPOSED ON THE PARENT SUBTYPE IS ALSO IMPOSED " &
"ON THE DERIVED SUBTYPE. CHECK FOR DERIVED " &
"ACCESS TYPES WHOSE DESIGNATED TYPE IS A " &
"ONE-DIMENSIONAL ARRAY TYPE");
-- CHECK THAT BASE TYPE VALUES NOT IN THE SUBTYPE ARE PRESENT.
IF CREATE (2, 3, 4, X) . ALL /= (4, 5) OR
CREATE (2, 3, 4, Y) . ALL /= (4, 5) THEN
FAILED ("CAN'T CREATE BASE TYPE VALUES OUTSIDE THE SUBTYPE");
END IF;
IF CREATE (2, 3, 4, X) IN T OR
CREATE (2, 3, 4, Y) IN S THEN
FAILED ("INCORRECT ""IN""");
END IF;
-- CHECK THE DERIVED SUBTYPE CONSTRAINT.
IF X'FIRST /= 5 OR X'LAST /= 7 OR
Y'FIRST /= 5 OR Y'LAST /= 7 THEN
FAILED ("INCORRECT 'FIRST OR 'LAST");
END IF;
BEGIN
X := NEW SUBDESIGNATED'(1, 2, 3);
Y := NEW SUBDESIGNATED'(1, 2, 3);
IF PARENT (X) = PARENT (Y) OR -- USE X AND Y.
X.ALL /= Y.ALL THEN
FAILED ("INCORRECT ALLOCATOR OR CONVERSION TO PARENT");
END IF;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED BY OK ASSIGNMENT");
END;
BEGIN
X := NEW DESIGNATED'(6 .. 8 => 0);
FAILED ("CONSTRAINT_ERROR NOT RAISED -- " &
"X := NEW DESIGNATED'(6 .. 8 => 0)");
IF X = NULL OR ELSE X.ALL = (0, 0, 0) THEN -- USE X.
COMMENT ("X ALTERED -- " &
"X := NEW DESIGNATED'(6 .. 8 => 0)");
END IF;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -- " &
"X := NEW DESIGNATED'(6 .. 8 => 0)");
END;
BEGIN
Y := NEW DESIGNATED'(6 .. 8 => 0);
FAILED ("CONSTRAINT_ERROR NOT RAISED -- " &
"Y := NEW DESIGNATED'(6 .. 8 => 0)");
IF Y = NULL OR ELSE Y.ALL = (0, 0, 0) THEN -- USE Y.
COMMENT ("Y ALTERED -- " &
"Y := NEW DESIGNATED'(6 .. 8 => 0)");
END IF;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -- " &
"Y := NEW DESIGNATED'(6 .. 8 => 0)");
END;
RESULT;
END C34007F;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . C O M M U N I C A T I O N --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2020, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package body System.Communication is
subtype SEO is Ada.Streams.Stream_Element_Offset;
----------------
-- Last_Index --
----------------
function Last_Index
(First : Ada.Streams.Stream_Element_Offset;
Count : CRTL.size_t) return Ada.Streams.Stream_Element_Offset
is
use type Ada.Streams.Stream_Element_Offset;
use type System.CRTL.size_t;
begin
if First = SEO'First and then Count = 0 then
raise Constraint_Error with
"last index out of range (no element transferred)";
else
return First + SEO (Count) - 1;
end if;
end Last_Index;
end System.Communication;
|
-----------------------------------------------------------------------
-- keystore-logs -- Log support for the keystore
-- Copyright (C) 2019, 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 Util.Log.Loggers;
with Keystore.IO;
private package Keystore.Logs is
procedure Dump (Log : in Util.Log.Loggers.Logger;
Content : in Ada.Streams.Stream_Element_Array);
procedure Error (Log : in Util.Log.Loggers.Logger;
Message : in String;
Block : in IO.Storage_Block);
procedure Warn (Log : in Util.Log.Loggers.Logger;
Message : in String;
Block : in IO.Storage_Block);
procedure Info (Log : in Util.Log.Loggers.Logger;
Message : in String;
Block : in IO.Storage_Block);
procedure Debug (Log : in Util.Log.Loggers.Logger;
Message : in String;
Block : in IO.Storage_Block);
procedure Debug (Log : in Util.Log.Loggers.Logger;
Message : in String;
Block1 : in IO.Storage_Block;
Block2 : in IO.Storage_Block);
end Keystore.Logs;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . W C H _ J I S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-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. --
-- --
------------------------------------------------------------------------------
pragma Compiler_Unit_Warning;
package body System.WCh_JIS is
type Byte is mod 256;
EUC_Hankaku_Kana : constant Byte := 16#8E#;
-- Prefix byte in EUC for Hankaku Kana (small Katakana). Such characters
-- in EUC are represented by a prefix byte followed by the code, which
-- is in the upper half (the corresponding JIS internal code is in the
-- range 16#0080# - 16#00FF#).
function EUC_To_JIS (EUC1, EUC2 : Character) return Wide_Character is
EUC1B : constant Byte := Character'Pos (EUC1);
EUC2B : constant Byte := Character'Pos (EUC2);
begin
if EUC2B not in 16#A0# .. 16#FE# then
raise Constraint_Error;
end if;
if EUC1B = EUC_Hankaku_Kana then
return Wide_Character'Val (EUC2B);
else
if EUC1B not in 16#A0# .. 16#FE# then
raise Constraint_Error;
else
return Wide_Character'Val
(256 * Natural (EUC1B and 16#7F#) + Natural (EUC2B and 16#7F#));
end if;
end if;
end EUC_To_JIS;
----------------
-- JIS_To_EUC --
----------------
procedure JIS_To_EUC
(J : Wide_Character;
EUC1 : out Character;
EUC2 : out Character)
is
JIS1 : constant Natural := Wide_Character'Pos (J) / 256;
JIS2 : constant Natural := Wide_Character'Pos (J) rem 256;
begin
-- Special case of small Katakana
if JIS1 = 0 then
-- The value must be in the range 16#80# to 16#FF# so that the upper
-- bit is set in both bytes.
if JIS2 < 16#80# then
raise Constraint_Error;
end if;
EUC1 := Character'Val (EUC_Hankaku_Kana);
EUC2 := Character'Val (JIS2);
-- The upper bit of both characters must be clear, or this is not
-- a valid character for representation in EUC form.
elsif JIS1 > 16#7F# or else JIS2 > 16#7F# then
raise Constraint_Error;
-- Result is just the two characters with upper bits set
else
EUC1 := Character'Val (JIS1 + 16#80#);
EUC2 := Character'Val (JIS2 + 16#80#);
end if;
end JIS_To_EUC;
----------------------
-- JIS_To_Shift_JIS --
----------------------
procedure JIS_To_Shift_JIS
(J : Wide_Character;
SJ1 : out Character;
SJ2 : out Character)
is
JIS1 : Byte;
JIS2 : Byte;
begin
-- The following is the required algorithm, it's hard to make any
-- more intelligent comments. This was copied from a public domain
-- C program called etos.c (author unknown).
JIS1 := Byte (Natural (Wide_Character'Pos (J) / 256));
JIS2 := Byte (Natural (Wide_Character'Pos (J) rem 256));
if JIS1 > 16#5F# then
JIS1 := JIS1 + 16#80#;
end if;
if (JIS1 mod 2) = 0 then
SJ1 := Character'Val ((JIS1 - 16#30#) / 2 + 16#88#);
SJ2 := Character'Val (JIS2 + 16#7E#);
else
if JIS2 >= 16#60# then
JIS2 := JIS2 + 16#01#;
end if;
SJ1 := Character'Val ((JIS1 - 16#31#) / 2 + 16#89#);
SJ2 := Character'Val (JIS2 + 16#1F#);
end if;
end JIS_To_Shift_JIS;
----------------------
-- Shift_JIS_To_JIS --
----------------------
function Shift_JIS_To_JIS (SJ1, SJ2 : Character) return Wide_Character is
SJIS1 : Byte;
SJIS2 : Byte;
JIS1 : Byte;
JIS2 : Byte;
begin
-- The following is the required algorithm, it's hard to make any
-- more intelligent comments. This was copied from a public domain
-- C program called stoj.c written by shige@csk.JUNET.
SJIS1 := Character'Pos (SJ1);
SJIS2 := Character'Pos (SJ2);
if SJIS1 >= 16#E0# then
SJIS1 := SJIS1 - 16#40#;
end if;
if SJIS2 >= 16#9F# then
JIS1 := (SJIS1 - 16#88#) * 2 + 16#30#;
JIS2 := SJIS2 - 16#7E#;
else
if SJIS2 >= 16#7F# then
SJIS2 := SJIS2 - 16#01#;
end if;
JIS1 := (SJIS1 - 16#89#) * 2 + 16#31#;
JIS2 := SJIS2 - 16#1F#;
end if;
if JIS1 not in 16#20# .. 16#7E#
or else JIS2 not in 16#20# .. 16#7E#
then
raise Constraint_Error;
else
return Wide_Character'Val (256 * Natural (JIS1) + Natural (JIS2));
end if;
end Shift_JIS_To_JIS;
end System.WCh_JIS;
|
-- C87B07D.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 OVERLOADING RESOLUTION USES THE RULE THAT:
--
-- THE ATTRIBUTES OF THE FORM T'SUCC (X) AND T'PRED (X) TAKE AN
-- OPERAND X OF TYPE T AND RETURN A VALUE OF TYPE T.
-- TRH 15 SEPT 82
WITH REPORT; USE REPORT;
PROCEDURE C87B07D IS
TYPE NEW_INT IS NEW INTEGER;
TYPE WHOLE IS NEW INTEGER RANGE 0 .. INTEGER'LAST;
FUNCTION "+" (X, Y : WHOLE) RETURN WHOLE
RENAMES "*";
FUNCTION "+" (X, Y : NEW_INT) RETURN NEW_INT
RENAMES "-";
BEGIN
TEST ("C87B07D","OVERLOADED OPERANDS TO THE ATTRIBUTES " &
"'PRED' AND 'SUCC'");
IF INTEGER'SUCC (1 + 1) /= 3 OR INTEGER'SUCC (3 + 3) + 1 /= 8 OR
NEW_INT'SUCC (1 + 1) /= 1 OR NEW_INT'SUCC (3 + 3) + 1 /= 0 OR
WHOLE'SUCC (1 + 1) /= 2 OR WHOLE'SUCC (3 + 3) + 1 /= 10 OR
INTEGER'PRED (1 + 1) /= 1 OR INTEGER'PRED (3 + 3) + 1 /= 6 OR
NEW_INT'PRED (1 + 1) /= -1 OR NEW_INT'PRED (3 + 3) + 1 /= -2 OR
WHOLE'PRED (1 + 1) /= 0 OR WHOLE'PRED (3 + 3) + 1 /= 8
THEN FAILED ("RESOLUTION INCORRECT FOR OPERAND OR RESULT OF" &
" THE 'PRED' OR 'SUCC' ATTRIBUTE");
END IF;
RESULT;
END C87B07D;
|
-- This package is intended to set up and tear down the test environment.
-- Once created by GNATtest, this package will never be overwritten
-- automatically. Contents of this package can be modified in any way
-- except for sections surrounded by a 'read only' marker.
package body Tcl.Strings.Test_Data is
procedure Set_Up(Gnattest_T: in out Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end Set_Up;
procedure Tear_Down(Gnattest_T: in out Test) is
pragma Unreferenced(Gnattest_T);
begin
null;
end Tear_Down;
end Tcl.Strings.Test_Data;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>call</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>in_stream_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>in_stream.V.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>out_stream_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>out_stream.V.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>288</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>slice_stream_V_value</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>172</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</first>
<second class_id="11" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="12" tracking_level="0" version="0">
<first class_id="13" tracking_level="0" version="0">
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>172</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>slice_stream.V.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>96</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</oprand_edges>
<opcode>alloca</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>19</item>
<item>20</item>
<item>21</item>
</oprand_edges>
<opcode>call</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>5</count>
<item_version>0</item_version>
<item>23</item>
<item>24</item>
<item>25</item>
<item>135</item>
<item>136</item>
</oprand_edges>
<opcode>call</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>219</lineNumber>
<contextFuncName>call</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>219</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_7">
<Value>
<Obj>
<type>2</type>
<id>16</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_8">
<Value>
<Obj>
<type>2</type>
<id>18</id>
<name>call_Loop_LB2D_buf_p</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:call_Loop_LB2D_buf_p></content>
</item>
<item class_id_reference="16" object_id="_9">
<Value>
<Obj>
<type>2</type>
<id>22</id>
<name>call_Loop_LB2D_shift</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:call_Loop_LB2D_shift></content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_10">
<Obj>
<type>3</type>
<id>15</id>
<name>call</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>8</item>
<item>12</item>
<item>13</item>
<item>14</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_11">
<id>17</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_12">
<id>19</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_13">
<id>20</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_14">
<id>21</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_15">
<id>23</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_16">
<id>24</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_17">
<id>25</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_18">
<id>135</id>
<edge_type>4</edge_type>
<source_obj>12</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_19">
<id>136</id>
<edge_type>4</edge_type>
<source_obj>12</source_obj>
<sink_obj>13</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_20">
<mId>1</mId>
<mTag>call</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>2077921</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>1</mIsDfPipe>
<mDfPipe class_id="23" tracking_level="1" version="0" object_id="_21">
<port_list class_id="24" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port_list>
<process_list class_id="25" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_22">
<type>0</type>
<name>call_Loop_LB2D_buf_p_U0</name>
<ssdmobj_id>12</ssdmobj_id>
<pins class_id="27" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_23">
<port class_id="29" tracking_level="1" version="0" object_id="_24">
<name>in_stream_V_value_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id="30" tracking_level="1" version="0" object_id="_25">
<type>0</type>
<name>call_Loop_LB2D_buf_p_U0</name>
<ssdmobj_id>12</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_26">
<port class_id_reference="29" object_id="_27">
<name>slice_stream_V_value_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_25"></inst>
</item>
</pins>
</item>
<item class_id_reference="26" object_id="_28">
<type>0</type>
<name>call_Loop_LB2D_shift_U0</name>
<ssdmobj_id>13</ssdmobj_id>
<pins>
<count>2</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_29">
<port class_id_reference="29" object_id="_30">
<name>slice_stream_V_value_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id="_31">
<type>0</type>
<name>call_Loop_LB2D_shift_U0</name>
<ssdmobj_id>13</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_32">
<port class_id_reference="29" object_id="_33">
<name>out_stream_V_value_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_31"></inst>
</item>
</pins>
</item>
</process_list>
<channel_list class_id="31" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="32" tracking_level="1" version="0" object_id="_34">
<type>1</type>
<name>slice_stream_V_value</name>
<ssdmobj_id>8</ssdmobj_id>
<ctype>0</ctype>
<depth>1</depth>
<bitwidth>96</bitwidth>
<source class_id_reference="28" object_id="_35">
<port class_id_reference="29" object_id="_36">
<name>in</name>
<dir>3</dir>
<type>0</type>
</port>
<inst class_id_reference="30" object_id_reference="_25"></inst>
</source>
<sink class_id_reference="28" object_id="_37">
<port class_id_reference="29" object_id="_38">
<name>out</name>
<dir>3</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_31"></inst>
</sink>
</item>
</channel_list>
<net_list class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</net_list>
</mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="-1"></fsm>
<res class_id="-1"></res>
<node_label_latency class_id="36" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="37" tracking_level="0" version="0">
<first>8</first>
<second class_id="38" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="39" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>15</first>
<second class_id="41" tracking_level="0" version="0">
<first>0</first>
<second>3</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="42" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="43" tracking_level="1" version="0" object_id="_39">
<region_name>call</region_name>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</basic_blocks>
<nodes>
<count>12</count>
<item_version>0</item_version>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>16</region_type>
<interval>0</interval>
<pipe_depth>0</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="44" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="45" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="46" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_reg_nodes>
<dp_regname_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="47" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_port_io_nodes>
<port2core class_id="48" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Interfaces; use Interfaces;
package body Simple_Synthesizer is
------------------------
-- Set_Note_Frequency --
------------------------
procedure Set_Note_Frequency
(This : in out Synthesizer;
Note : Float)
is
begin
This.Note := Note;
end Set_Note_Frequency;
-------------------
-- Set_Frequency --
-------------------
overriding procedure Set_Frequency
(This : in out Synthesizer;
Frequency : Audio_Frequency)
is
begin
This.Frequency := Frequency;
end Set_Frequency;
--------------
-- Transmit --
--------------
overriding procedure Transmit
(This : in out Synthesizer;
Data : Audio_Buffer)
is
begin
raise Program_Error with "This Synthesizer doesn't take input";
end Transmit;
-------------
-- Receive --
-------------
overriding procedure Receive
(This : in out Synthesizer;
Data : out Audio_Buffer)
is
function Next_Sample return Integer_16;
Rate : constant Float :=
Float (Audio_Frequency'Enum_Rep (This.Frequency));
Note : constant Float := This.Note;
Amplitude : constant Float := Float (This.Amplitude);
Delt : constant Float := 2.0 / (Rate * (1.0 / Note));
-----------------
-- Next_Sample --
-----------------
function Next_Sample return Integer_16 is
begin
This.Last_Sample := This.Last_Sample + Delt;
if This.Last_Sample > 1.0 then
This.Last_Sample := -1.0;
end if;
return Integer_16 (This.Last_Sample * Amplitude);
end Next_Sample;
Tmp : Integer_16;
begin
if This.Stereo then
if Data'Length mod 2 /= 0 then
raise Program_Error with
"Audio buffer for stereo output should have even length";
end if;
for Index in 0 .. (Data'Length / 2) - 1 loop
Tmp := Next_Sample;
Data ((Index * 2) + Data'First) := Tmp;
Data ((Index * 2) + Data'First + 1) := Tmp;
end loop;
else
for Elt of Data loop
Elt := Next_Sample;
end loop;
end if;
end Receive;
end Simple_Synthesizer;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with system;
package soc.flash
with spark_mode => off
is
-----------------------------------------------
-- Flash access control register (FLASH_ACR) --
-- for STM32F42xxx and STM32F43xxx --
-----------------------------------------------
type t_FLASH_ACR is record
LATENCY : bits_4;
-- reserved_04_07
PRFTEN : boolean; -- Prefetch enable
ICEN : boolean; -- Instruction cache enable
DCEN : boolean; -- Data cache enable
ICRST : boolean; -- Instruction cache reset
DCRST : boolean; -- Data cache reset
-- reserved_13_31
end record
with volatile_full_access, size => 32;
for t_FLASH_ACR use record
LATENCY at 0 range 0 .. 3;
-- reserved_04_07
PRFTEN at 0 range 8 .. 8;
ICEN at 0 range 9 .. 9;
DCEN at 0 range 10 .. 10;
ICRST at 0 range 11 .. 11;
DCRST at 0 range 12 .. 12;
-- reserved_13_31
end record;
----------------------
-- FLASH peripheral --
----------------------
type t_FLASH_peripheral is record
ACR : t_FLASH_ACR;
end record
with volatile;
for t_FLASH_peripheral use record
ACR at 16#00# range 0 .. 31;
end record;
FLASH : t_FLASH_peripheral
with
import,
volatile,
address => system'to_address(16#4002_3C00#);
end soc.flash;
|
-- Copyright 2006-2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure P is
Small : Data_Small;
Large : Data_Large;
Vector : Small_Float_Vector;
begin
Small := Create_Small;
Large := Create_Large;
Vector := Create_Small_Float_Vector;
Small (1) := Large (1);
Small (2) := Integer (Vector (1));
end P;
|
------------------------------------------------------------------------------
-- philosophers.ads
--
-- This package supplies a task type for the Philosophers in the Enhanced
-- Dining Philosophers simulation. It also defines an array of philosophers.
--
-- Entries:
--
-- Here_Is_Your_Name (Name) assigns the name Name to the philosopher.
-- Here_Is_Your_Food gives the philosopher what she ordered.
--
-- Behavior:
--
-- First the philosopher waits for a name, then enters a life cycle of com-
-- ing into the restaurant, thinking, ordering, then ((eating and paying) or
-- (getting a coupon) or (complaining)), then leaving.
--
-- Termination:
--
-- A philosopher "dies" be running out of money and just reaching the end of
-- its task body.
--
-- Note:
--
-- To keep the simulation from running too long, philosophers start with $30
-- and coupons are worth $5.
------------------------------------------------------------------------------
with Names, Orders;
use Names, Orders;
package Philosophers is
task type Philosopher is
entry Here_Is_Your_Name (Name: Philosopher_Name);
entry Here_Is_Your_Food;
end Philosopher;
Philosopher_Array : array (Philosopher_Name) of Philosopher;
end Philosophers;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . S O F T _ L I N K S . T A S K I N G --
-- --
-- S p e c --
-- --
-- Copyright (C) 2009-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 package contains the tasking versions soft links that are common
-- to the full and the restricted run times. The rest of the required soft
-- links are set by System.Tasking.Initialization and System.Tasking.Stages
-- (full run time) or System.Tasking.Restricted.Stages (restricted run time).
package System.Soft_Links.Tasking is
procedure Init_Tasking_Soft_Links;
-- Set the tasking soft links that are common to the full and the
-- restricted run times. Clients need to make sure the body of
-- System.Secondary_Stack is elaborated before calling this.
end System.Soft_Links.Tasking;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E L I S T S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides facilities for manipulating lists of nodes (see
-- package Atree for format and implementation of tree nodes). Separate list
-- elements are allocated to represent elements of these lists, so it is
-- possible for a given node to be on more than one element list at a time.
-- See also package Nlists, which provides another form that is threaded
-- through the nodes themselves (using the Link field), which is more time
-- and space efficient, but a node can be only one such list.
with Types; use Types;
with System;
package Elists is
-- An element list is represented by a header that is allocated in the
-- Elist header table. This header contains pointers to the first and
-- last elements in the list, or to No_Elmt if the list is empty.
-- The elements in the list each contain a pointer to the next element
-- and a pointer to the referenced node. Putting a node into an element
-- list causes no change at all to the node itself, so a node may be
-- included in multiple element lists, and the nodes thus included may
-- or may not be elements of node lists (see package Nlists).
procedure Initialize;
-- Initialize allocation of element list tables. Called at the start of
-- compiling each new main source file. Note that Initialize must not be
-- called if Tree_Read is used.
procedure Lock;
-- Lock tables used for element lists before calling backend
procedure Unlock;
-- Unlock list tables, in cases where the back end needs to modify them
procedure Tree_Read;
-- Initializes internal tables from current tree file using the relevant
-- Table.Tree_Read routines. Note that Initialize should not be called if
-- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
-- Writes out internal tables to current tree file using the relevant
-- Table.Tree_Write routines.
function Last_Elist_Id return Elist_Id;
-- Returns Id of last allocated element list header
function Elists_Address return System.Address;
-- Return address of Elists table (used in Back_End for Gigi call)
function Num_Elists return Nat;
-- Number of currently allocated element lists
function Last_Elmt_Id return Elmt_Id;
-- Returns Id of last allocated list element
function Elmts_Address return System.Address;
-- Return address of Elmts table (used in Back_End for Gigi call)
function Node (Elmt : Elmt_Id) return Node_Or_Entity_Id;
pragma Inline (Node);
-- Returns the value of a given list element. Returns Empty if Elmt
-- is set to No_Elmt.
function New_Elmt_List return Elist_Id;
-- Creates a new empty element list. Typically this is used to initialize
-- a field in some other node which points to an element list where the
-- list is then subsequently filled in using Append calls.
function First_Elmt (List : Elist_Id) return Elmt_Id;
pragma Inline (First_Elmt);
-- Obtains the first element of the given element list or, if the list has
-- no items, then No_Elmt is returned.
function Last_Elmt (List : Elist_Id) return Elmt_Id;
pragma Inline (Last_Elmt);
-- Obtains the last element of the given element list or, if the list has
-- no items, then No_Elmt is returned.
function Next_Elmt (Elmt : Elmt_Id) return Elmt_Id;
pragma Inline (Next_Elmt);
-- This function returns the next element on an element list. The argument
-- must be a list element other than No_Elmt. Returns No_Elmt if the given
-- element is the last element of the list.
procedure Next_Elmt (Elmt : in out Elmt_Id);
pragma Inline (Next_Elmt);
-- Next_Elmt (Elmt) is equivalent to Elmt := Next_Elmt (Elmt)
function Is_Empty_Elmt_List (List : Elist_Id) return Boolean;
pragma Inline (Is_Empty_Elmt_List);
-- This function determines if a given tree id references an element list
-- that contains no items.
procedure Append_Elmt (N : Node_Or_Entity_Id; To : Elist_Id);
-- Appends N at the end of To, allocating a new element. N must be a
-- non-empty node or entity Id, and To must be an Elist (not No_Elist).
procedure Append_Unique_Elmt (N : Node_Or_Entity_Id; To : Elist_Id);
-- Like Append_Elmt, except that a check is made to see if To already
-- contains N and if so the call has no effect.
procedure Prepend_Elmt (N : Node_Or_Entity_Id; To : Elist_Id);
-- Appends N at the beginning of To, allocating a new element
procedure Insert_Elmt_After (N : Node_Or_Entity_Id; Elmt : Elmt_Id);
-- Add a new element (N) right after the pre-existing element Elmt
-- It is invalid to call this subprogram with Elmt = No_Elmt.
procedure Replace_Elmt (Elmt : Elmt_Id; New_Node : Node_Or_Entity_Id);
pragma Inline (Replace_Elmt);
-- Causes the given element of the list to refer to New_Node, the node
-- which was previously referred to by Elmt is effectively removed from
-- the list and replaced by New_Node.
procedure Remove_Elmt (List : Elist_Id; Elmt : Elmt_Id);
-- Removes Elmt from the given list. The node itself is not affected,
-- but the space used by the list element may be (but is not required
-- to be) freed for reuse in a subsequent Append_Elmt call.
procedure Remove_Last_Elmt (List : Elist_Id);
-- Removes the last element of the given list. The node itself is not
-- affected, but the space used by the list element may be (but is not
-- required to be) freed for reuse in a subsequent Append_Elmt call.
function No (List : Elist_Id) return Boolean;
pragma Inline (No);
-- Tests given Id for equality with No_Elist. This allows notations like
-- "if No (Statements)" as opposed to "if Statements = No_Elist".
function Present (List : Elist_Id) return Boolean;
pragma Inline (Present);
-- Tests given Id for inequality with No_Elist. This allows notations like
-- "if Present (Statements)" as opposed to "if Statements /= No_Elist".
function No (Elmt : Elmt_Id) return Boolean;
pragma Inline (No);
-- Tests given Id for equality with No_Elmt. This allows notations like
-- "if No (Operation)" as opposed to "if Operation = No_Elmt".
function Present (Elmt : Elmt_Id) return Boolean;
pragma Inline (Present);
-- Tests given Id for inequality with No_Elmt. This allows notations like
-- "if Present (Operation)" as opposed to "if Operation /= No_Elmt".
end Elists;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, 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$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A type is a named element that is used as the type for a typed element. A
-- type can be contained in a package.
--
-- A type constrains the values represented by a typed element.
------------------------------------------------------------------------------
with AMF.UML.Packageable_Elements;
limited with AMF.UML.Packages;
package AMF.UML.Types is
pragma Preelaborate;
type UML_Type is limited interface
and AMF.UML.Packageable_Elements.UML_Packageable_Element;
type UML_Type_Access is
access all UML_Type'Class;
for UML_Type_Access'Storage_Size use 0;
not overriding function Get_Package
(Self : not null access constant UML_Type)
return AMF.UML.Packages.UML_Package_Access is abstract;
-- Getter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
not overriding procedure Set_Package
(Self : not null access UML_Type;
To : AMF.UML.Packages.UML_Package_Access) is abstract;
-- Setter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
not overriding function Conforms_To
(Self : not null access constant UML_Type;
Other : AMF.UML.Types.UML_Type_Access)
return Boolean is abstract;
-- Operation Type::conformsTo.
--
-- The query conformsTo() gives true for a type that conforms to another.
-- By default, two types do not conform to each other. This query is
-- intended to be redefined for specific conformance situations.
end AMF.UML.Types;
|
-----------------------------------------------------------------------
-- Util.Concurrent.Pools -- Concurrent Pools
-- Copyright (C) 2011, 2014 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 Util.Concurrent.Pools is
-- ------------------------------
-- Get an element instance from the pool.
-- Wait until one instance gets available.
-- ------------------------------
procedure Get_Instance (From : in out Pool;
Item : out Element_Type) is
begin
From.List.Get_Instance (Item);
end Get_Instance;
-- ------------------------------
-- Put the element back to the pool.
-- ------------------------------
procedure Release (Into : in out Pool;
Item : in Element_Type) is
begin
Into.List.Release (Item);
end Release;
-- ------------------------------
-- Set the pool size.
-- ------------------------------
procedure Set_Size (Into : in out Pool;
Capacity : in Positive) is
begin
Into.List.Set_Size (Capacity);
end Set_Size;
-- ------------------------------
-- Release the pool elements.
-- ------------------------------
overriding
procedure Finalize (Object : in out Pool) is
begin
Object.List.Set_Size (0);
end Finalize;
-- Pool of objects
protected body Protected_Pool is
-- ------------------------------
-- Get an element instance from the pool.
-- Wait until one instance gets available.
-- ------------------------------
entry Get_Instance (Item : out Element_Type) when Available > 0 is
begin
Item := Elements (Available);
Available := Available - 1;
end Get_Instance;
-- ------------------------------
-- Put the element back to the pool.
-- ------------------------------
procedure Release (Item : in Element_Type) is
begin
Available := Available + 1;
Elements (Available) := Item;
end Release;
-- ------------------------------
-- Set the pool size.
-- ------------------------------
procedure Set_Size (Capacity : in Natural) is
procedure Free is new Ada.Unchecked_Deallocation (Element_Array, Element_Array_Access);
begin
if Capacity = 0 then
Free (Elements);
elsif Elements = null then
Elements := new Element_Array (1 .. Capacity);
else
declare
New_Array : constant Element_Array_Access := new Element_Array (1 .. Capacity);
begin
if Capacity > Elements'Size then
New_Array (1 .. Elements'Last) := Elements (1 .. Elements'Last);
else
New_Array (1 .. Capacity) := Elements (1 .. Capacity);
end if;
Free (Elements);
Elements := New_Array;
end;
end if;
end Set_Size;
end Protected_Pool;
end Util.Concurrent.Pools;
|
package Memory.Container is
type Container_Type is abstract new Memory_Type with private;
type Container_Pointer is access all Container_Type'Class;
function Get_Memory(mem : Container_Type'Class) return Memory_Pointer;
procedure Set_Memory(mem : in out Container_Type'Class;
other : access Memory_Type'Class);
overriding
function Done(mem : Container_Type) return Boolean;
overriding
procedure Reset(mem : in out Container_Type;
context : in Natural);
overriding
procedure Set_Port(mem : in out Container_Type;
port : in Natural;
ready : out Boolean);
overriding
procedure Read(mem : in out Container_Type;
address : in Address_Type;
size : in Positive);
overriding
procedure Write(mem : in out Container_Type;
address : in Address_Type;
size : in Positive);
overriding
procedure Idle(mem : in out Container_Type;
cycles : in Time_Type);
procedure Start(mem : in out Container_Type'Class);
procedure Commit(mem : in out Container_Type'Class;
cycles : out Time_Type);
procedure Do_Read(mem : in out Container_Type'Class;
address : in Address_Type;
size : in Positive);
procedure Do_Write(mem : in out Container_Type'Class;
address : in Address_Type;
size : in Positive);
procedure Do_Idle(mem : in out Container_Type'Class;
cycles : in Time_Type);
overriding
function Get_Path_Length(mem : Container_Type) return Natural;
overriding
procedure Show_Access_Stats(mem : in out Container_Type);
overriding
function To_String(mem : Container_Type) return Unbounded_String;
overriding
function Get_Cost(mem : Container_Type) return Cost_Type;
overriding
function Get_Writes(mem : Container_Type) return Long_Integer;
overriding
function Get_Word_Size(mem : Container_Type) return Positive;
overriding
function Get_Ports(mem : Container_Type) return Port_Vector_Type;
overriding
procedure Adjust(mem : in out Container_Type);
overriding
procedure Finalize(mem : in out Container_Type);
private
type Container_Type is abstract new Memory_Type with record
mem : access Memory_Type'Class := null;
start_time : Time_Type := 0;
end record;
end Memory.Container;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . C R C 3 2 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2021, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides routines for computing a commonly used checksum
-- called CRC-32. This is a checksum based on treating the binary data
-- as a polynomial over a binary field, and the exact specifications of
-- the CRC-32 algorithm are as follows:
-- Name : "CRC-32"
-- Width : 32
-- Poly : 04C11DB7
-- Init : FFFFFFFF
-- RefIn : True
-- RefOut : True
-- XorOut : FFFFFFFF
-- Check : CBF43926
-- Note that this is the algorithm used by PKZip, Ethernet and FDDI
-- For more information about this algorithm see:
-- ftp://ftp.rocksoft.com/papers/crc_v3.txt
-- "A Painless Guide to CRC Error Detection Algorithms", Ross N. Williams
-- "Computation of Cyclic Redundancy Checks via Table Look-Up", Communications
-- of the ACM, Vol. 31 No. 8, pp.1008-1013 Aug. 1988. Sarwate, D.V.
with Ada.Streams;
with Interfaces;
with System.CRC32;
package GNAT.CRC32 is
subtype CRC32 is System.CRC32.CRC32;
-- Used to represent CRC32 values, which are 32 bit bit-strings
procedure Initialize (C : out CRC32)
renames System.CRC32.Initialize;
-- Initialize CRC value by assigning the standard Init value (16#FFFF_FFFF)
procedure Update
(C : in out CRC32;
Value : Character)
renames System.CRC32.Update;
-- Evolve CRC by including the contribution from Character'Pos (Value)
procedure Update
(C : in out CRC32;
Value : String);
-- For each character in the Value string call above routine
procedure Wide_Update
(C : in out CRC32;
Value : Wide_Character);
-- Evolve CRC by including the contribution from Wide_Character'Pos (Value)
-- with the bytes being included in the natural memory order.
procedure Wide_Update
(C : in out CRC32;
Value : Wide_String);
-- For each character in the Value string call above routine
procedure Update
(C : in out CRC32;
Value : Ada.Streams.Stream_Element);
-- Evolve CRC by including the contribution from Value
procedure Update
(C : in out CRC32;
Value : Ada.Streams.Stream_Element_Array);
-- For each element in the Value array call above routine
function Get_Value (C : CRC32) return Interfaces.Unsigned_32
renames System.CRC32.Get_Value;
-- Get_Value computes the CRC32 value by performing an XOR with the
-- standard XorOut value (16#FFFF_FFFF). Note that this does not
-- change the value of C, so it may be used to retrieve intermediate
-- values of the CRC32 value during a sequence of Update calls.
pragma Inline (Update);
pragma Inline (Wide_Update);
end GNAT.CRC32;
|
with Ada.Text_IO;
procedure Missing_Permutations is
subtype Permutation_Character is Character range 'A' .. 'D';
Character_Count : constant :=
1 + Permutation_Character'Pos (Permutation_Character'Last)
- Permutation_Character'Pos (Permutation_Character'First);
type Permutation_String is
array (1 .. Character_Count) of Permutation_Character;
procedure Put (Item : Permutation_String) is
begin
for I in Item'Range loop
Ada.Text_IO.Put (Item (I));
end loop;
end Put;
Given_Permutations : array (Positive range <>) of Permutation_String :=
("ABCD", "CABD", "ACDB", "DACB", "BCDA", "ACBD",
"ADCB", "CDAB", "DABC", "BCAD", "CADB", "CDBA",
"CBAD", "ABDC", "ADBC", "BDCA", "DCBA", "BACD",
"BADC", "BDAC", "CBDA", "DBCA", "DCAB");
Count : array (Permutation_Character, 1 .. Character_Count) of Natural
:= (others => (others => 0));
Max_Count : Positive := 1;
Missing_Permutation : Permutation_String;
begin
for I in Given_Permutations'Range loop
for Pos in 1 .. Character_Count loop
Count (Given_Permutations (I) (Pos), Pos) :=
Count (Given_Permutations (I) (Pos), Pos) + 1;
if Count (Given_Permutations (I) (Pos), Pos) > Max_Count then
Max_Count := Count (Given_Permutations (I) (Pos), Pos);
end if;
end loop;
end loop;
for Char in Permutation_Character loop
for Pos in 1 .. Character_Count loop
if Count (Char, Pos) < Max_Count then
Missing_Permutation (Pos) := Char;
end if;
end loop;
end loop;
Ada.Text_IO.Put_Line ("Missing Permutation:");
Put (Missing_Permutation);
end Missing_Permutations;
|
-----------------------------------------------------------------------
-- awa-events-dispatchers -- AWA Event Dispatchers
-- Copyright (C) 2012, 2017, 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 AWA.Events.Services;
package body AWA.Events.Dispatchers is
-- ------------------------------
-- Add the queue to the dispatcher.
-- ------------------------------
procedure Add_Queue (Manager : in out Dispatcher;
Queue : in AWA.Events.Queues.Queue_Ref;
Added : out Boolean) is
pragma Unreferenced (Manager, Queue);
begin
Added := False;
end Add_Queue;
-- ------------------------------
-- Dispatch the events from the queue.
-- Increment the `Count` parameter to indicate the number of events
-- that were dispatched.
-- ------------------------------
procedure Dispatch (Manager : in Dispatcher;
Queue : in AWA.Events.Queues.Queue_Ref;
Count : in out Natural) is
procedure Process (Event : in Module_Event'Class);
procedure Process (Event : in Module_Event'Class) is
begin
Count := Count + 1;
Manager.Manager.Dispatch (Queue, Event);
end Process;
begin
Queue.Dequeue (Process'Access);
end Dispatch;
end AWA.Events.Dispatchers;
|
-----------------------------------------------------------------------
-- jason-tickets-beans -- Beans for module tickets
-- Copyright (C) 2016, 2017, 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.
-----------------------------------------------------------------------
with Ada.Strings.Unbounded;
with Ada.Containers.Vectors;
with Ada.Containers.Ordered_Maps;
with ADO;
with Util.Beans.Basic;
with Util.Beans.Objects;
with AWA.Tags.Beans;
with Jason.Tickets.Modules;
with Jason.Tickets.Models;
with Jason.Projects.Beans;
package Jason.Tickets.Beans is
type Ticket_Bean is new Jason.Tickets.Models.Ticket_Bean with record
Module : Jason.Tickets.Modules.Ticket_Module_Access := null;
Ticket_Id : ADO.Identifier := ADO.NO_IDENTIFIER;
Project : Jason.Projects.Beans.Project_Bean_Access;
-- List of tags associated with the wiki page.
Tags : aliased AWA.Tags.Beans.Tag_List_Bean;
Tags_Bean : Util.Beans.Basic.Readonly_Bean_Access;
end record;
type Ticket_Bean_Access is access all Ticket_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Ticket_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Ticket_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Create ticket action.
overriding
procedure Create (Bean : in out Ticket_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Save ticket action.
overriding
procedure Save (Bean : in out Ticket_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Save ticket action.
overriding
procedure Save_Status (Bean : in out Ticket_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Load ticket action.
overriding
procedure Load (Bean : in out Ticket_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Tickets_Bean bean instance.
function Create_Ticket_Bean (Module : in Jason.Tickets.Modules.Ticket_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- ------------------------------
-- Bean that collects the list of tickets filtered by tag, priority and project.
-- ------------------------------
type Ticket_List_Bean is new Jason.Tickets.Models.Ticket_List_Bean with record
Module : Jason.Tickets.Modules.Ticket_Module_Access := null;
Project : Jason.Projects.Beans.Project_Bean_Access;
-- List of tickets.
Tickets : aliased Jason.Tickets.Models.List_Info_List_Bean;
Tickets_Bean : Jason.Tickets.Models.List_Info_List_Bean_Access;
-- List of tags associated with the tickets.
Tags : AWA.Tags.Beans.Entity_Tag_Map;
-- Whether the ticket type filter is enabled.
Type_Filter : Boolean := False;
Status_Filter : Ada.Strings.Unbounded.Unbounded_String;
Priority_Filter : Ada.Strings.Unbounded.Unbounded_String;
end record;
type Ticket_List_Bean_Access is access all Ticket_List_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Ticket_List_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Ticket_List_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Load list of tickets.
overriding
procedure Load (Bean : in out Ticket_List_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Tickets_List_Bean bean instance.
function Create_Ticket_List_Bean (Module : in Jason.Tickets.Modules.Ticket_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- Get a select item list which contains a list of ticket status.
function Create_Status_List (Module : in Jason.Tickets.Modules.Ticket_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
-- Get a select item list which contains a list of ticket types.
function Create_Type_List (Module : in Jason.Tickets.Modules.Ticket_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
use type Jason.Tickets.Models.Ticket_Type;
type Ticket_Stat_Bean is new Models.Stat_Bean with record
Low : aliased Models.Stat_Bean;
High : aliased Models.Stat_Bean;
Medium : aliased Models.Stat_Bean;
Closed : aliased Models.Stat_Bean;
Progress : Natural := 0;
end record;
package Ticket_Stat_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Ticket_Stat_Bean);
package Ticket_Stat_Map is
new Ada.Containers.Ordered_Maps (Key_Type => Models.Ticket_Type,
Element_Type => Ticket_Stat_Bean,
"<" => Models."<",
"=" => "=");
type Ticket_Raw_Stat_Bean is new Ticket_Stat_Bean with record
Low_Bean : Util.Beans.Objects.Object;
High_Bean : Util.Beans.Objects.Object;
Medium_Bean : Util.Beans.Objects.Object;
Closed_Bean : Util.Beans.Objects.Object;
end record;
procedure Initialize (Object : in out Ticket_Raw_Stat_Bean);
-- Get the value identified by the name.
overriding
function Get_Value (From : in Ticket_Raw_Stat_Bean;
Name : in String) return Util.Beans.Objects.Object;
type Ticket_Report_Bean is new Jason.Tickets.Models.Report_Bean
and Util.Beans.Basic.List_Bean with record
Module : Jason.Tickets.Modules.Ticket_Module_Access := null;
Project : Jason.Projects.Beans.Project_Bean_Access;
Row : Util.Beans.Objects.Object;
Current : Ticket_Stat_Vectors.Cursor;
Current_Pos : Natural := 0;
Element : aliased Ticket_Raw_Stat_Bean;
Total : aliased Ticket_Raw_Stat_Bean;
Total_Bean : Util.Beans.Objects.Object;
List : Ticket_Stat_Map.Map;
Report : Ticket_Stat_Vectors.Vector;
end record;
type Ticket_Report_Bean_Access is access all Ticket_Report_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Ticket_Report_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Ticket_Report_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
-- Get the number of elements in the list.
function Get_Count (From : Ticket_Report_Bean) return Natural;
-- Set the current row index. Valid row indexes start at 1.
overriding
procedure Set_Row_Index (From : in out Ticket_Report_Bean;
Index : in Natural);
-- Get the element at the current row index.
overriding
function Get_Row (From : in Ticket_Report_Bean) return Util.Beans.Objects.Object;
-- Load the information for the tickets.
overriding
procedure Load (Bean : in out Ticket_Report_Bean;
Outcome : in out Ada.Strings.Unbounded.Unbounded_String);
-- Create the Tickets_Report_Bean bean instance.
function Create_Ticket_Report_Bean (Module : in Jason.Tickets.Modules.Ticket_Module_Access)
return Util.Beans.Basic.Readonly_Bean_Access;
end Jason.Tickets.Beans;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, 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 STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
-- This file is based on: --
-- --
-- @file stm32f4xx_hal_spi.c --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief SPI HAL module driver. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
with STM32_SVD.SPI; use STM32_SVD.SPI;
package body STM32.SPI is
use type HAL.SPI.SPI_Data_Size;
Baud_Rate_Value : constant array (SPI_Baud_Rate_Prescaler) of UInt3 :=
(BRP_2 => 2#000#,
BRP_4 => 2#001#,
BRP_8 => 2#010#,
BRP_16 => 2#011#,
BRP_32 => 2#100#,
BRP_64 => 2#101#,
BRP_128 => 2#110#,
BRP_256 => 2#111#);
type Half_Word_Pointer is access all UInt16
with Storage_Size => 0;
function As_Half_Word_Pointer is new Ada.Unchecked_Conversion
(Source => System.Address, Target => Half_Word_Pointer);
-- So that we can treat the address of a UInt8 as a pointer to a two-UInt8
-- sequence representing a Half_Word quantity
---------------
-- Configure --
---------------
procedure Configure (This : in out SPI_Port; Conf : SPI_Configuration) is
begin
case Conf.Mode is
when Master =>
This.Periph.CR1.MSTR := True;
This.Periph.CR1.SSI := True;
when Slave =>
This.Periph.CR1.MSTR := False;
This.Periph.CR1.SSI := False;
end case;
case Conf.Direction is
when D2Lines_FullDuplex =>
This.Periph.CR1.BIDIMODE := False;
This.Periph.CR1.BIDIOE := False;
This.Periph.CR1.RXONLY := False;
when D2Lines_RxOnly =>
This.Periph.CR1.BIDIMODE := False;
This.Periph.CR1.BIDIOE := False;
This.Periph.CR1.RXONLY := True;
when D1Line_Rx =>
This.Periph.CR1.BIDIMODE := True;
This.Periph.CR1.BIDIOE := False;
This.Periph.CR1.RXONLY := False;
when D1Line_Tx =>
This.Periph.CR1.BIDIMODE := True;
This.Periph.CR1.BIDIOE := True;
This.Periph.CR1.RXONLY := False;
end case;
This.Periph.CR2.DS :=
(if Conf.Data_Size = HAL.SPI.Data_Size_16b
then SPI_Data_Size'Enum_Rep (Bits_16)
else SPI_Data_Size'Enum_Rep (Bits_8));
This.Periph.CR1.CPOL := Conf.Clock_Polarity = High;
This.Periph.CR1.CPHA := Conf.Clock_Phase = P2Edge;
This.Periph.CR1.SSM := Conf.Slave_Management = Software_Managed;
This.Periph.CR1.BR := Baud_Rate_Value (Conf.Baud_Rate_Prescaler);
This.Periph.CR1.LSBFIRST := Conf.First_Bit = LSB;
-- Activate the SPI mode (Reset I2SMOD bit in I2SCFGR register)
This.Periph.I2SCFGR.I2SMOD := False;
This.Periph.CRCPR.CRCPOLY := Conf.CRC_Poly;
end Configure;
------------
-- Enable --
------------
procedure Enable (This : in out SPI_Port) is
begin
This.Periph.CR1.SPE := True;
end Enable;
-------------
-- Disable --
-------------
procedure Disable (This : in out SPI_Port) is
begin
This.Periph.CR1.SPE := False;
end Disable;
-------------
-- Enabled --
-------------
function Enabled (This : SPI_Port) return Boolean is
begin
return This.Periph.CR1.SPE;
end Enabled;
----------
-- Send --
----------
procedure Send (This : in out SPI_Port; Data : UInt16) is
begin
This.Periph.DR.DR := Data;
end Send;
----------
-- Data --
----------
function Data (This : SPI_Port) return UInt16 is
begin
return This.Periph.DR.DR;
end Data;
----------
-- Send --
----------
procedure Send (This : in out SPI_Port; Data : UInt8) is
begin
Send (This, UInt16 (Data));
end Send;
----------
-- Data --
----------
function Data (This : SPI_Port) return UInt8 is
begin
return UInt8 (UInt16'(Data (This)));
end Data;
-------------
-- Is_Busy --
-------------
function Is_Busy (This : SPI_Port) return Boolean is
begin
return (Rx_Is_Empty (This)
and then not Tx_Is_Empty (This))
or else Busy (This);
end Is_Busy;
-----------------
-- Tx_Is_Empty --
-----------------
function Tx_Is_Empty (This : SPI_Port) return Boolean is
begin
return This.Periph.SR.TXE;
end Tx_Is_Empty;
-----------------
-- Rx_Is_Empty --
-----------------
function Rx_Is_Empty (This : SPI_Port) return Boolean is
begin
return not This.Periph.SR.RXNE;
end Rx_Is_Empty;
----------
-- Busy --
----------
function Busy (This : SPI_Port) return Boolean is
begin
return This.Periph.SR.BSY;
end Busy;
------------------
-- Current_Mode --
------------------
function Current_Mode (This : SPI_Port) return SPI_Mode is
begin
if This.Periph.CR1.MSTR and This.Periph.CR1.SSI then
return Master;
else
return Slave;
end if;
end Current_Mode;
----------------------------
-- Current_Data_Direction --
----------------------------
function Current_Data_Direction (This : SPI_Port) return SPI_Data_Direction
is
begin
if not This.Periph.CR1.BIDIMODE then
if not This.Periph.CR1.RXONLY then
return D2Lines_FullDuplex;
else
return D2Lines_RxOnly;
end if;
else
if not This.Periph.CR1.BIDIOE then
return D1Line_Rx;
else
return D1Line_Tx;
end if;
end if;
end Current_Data_Direction;
-----------------
-- CRC_Enabled --
-----------------
function CRC_Enabled (This : SPI_Port) return Boolean is
(This.Periph.CR1.CRCEN);
------------------------
-- Underrun_Indicated --
------------------------
function Underrun_Indicated (This : SPI_Port) return Boolean is
(This.Periph.SR.UDR);
-------------------------
-- CRC_Error_Indicated --
-------------------------
function CRC_Error_Indicated (This : SPI_Port) return Boolean is
(This.Periph.SR.CRCERR);
--------------------------
-- Mode_Fault_Indicated --
--------------------------
function Mode_Fault_Indicated (This : SPI_Port) return Boolean is
(This.Periph.SR.MODF);
-----------------------
-- Overrun_Indicated --
-----------------------
function Overrun_Indicated (This : SPI_Port) return Boolean is
(This.Periph.SR.OVR);
-------------------------------
-- Frame_Fmt_Error_Indicated --
-------------------------------
function Frame_Fmt_Error_Indicated (This : SPI_Port) return Boolean is
begin
return This.Periph.SR.TIFRFE;
end Frame_Fmt_Error_Indicated;
-------------------
-- Clear_Overrun --
-------------------
procedure Clear_Overrun (This : SPI_Port) is
Dummy1 : UInt16;
Dummy2 : SR_Register;
begin
Dummy1 := This.Periph.DR.DR;
Dummy2 := This.Periph.SR;
end Clear_Overrun;
---------------
-- Reset_CRC --
---------------
procedure Reset_CRC (This : in out SPI_Port) is
begin
This.Periph.CR1.CRCEN := False;
This.Periph.CR1.CRCEN := True;
end Reset_CRC;
-------------------------
-- Is_Data_Frame_16bit --
-------------------------
function Is_Data_Frame_16bit (This : SPI_Port) return Boolean is
(This.Periph.CR2.DS = SPI_Data_Size'Enum_Rep (Bits_16));
---------------
-- Data_Size --
---------------
overriding
function Data_Size (This : SPI_Port) return HAL.SPI.SPI_Data_Size is
begin
if This.Periph.CR2.DS = SPI_Data_Size'Enum_Rep (Bits_16) then
return HAL.SPI.Data_Size_16b;
else
return HAL.SPI.Data_Size_8b;
end if;
end Data_Size;
--------------
-- Transmit --
--------------
overriding
procedure Transmit
(This : in out SPI_Port;
Data : HAL.SPI.SPI_Data_8b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
pragma Unreferenced (Timeout);
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
-- ??? right value to compare???
if Current_Data_Direction (This) = D1Line_Tx then
This.Periph.CR1.BIDIOE := True;
end if;
Clear_Overrun (This);
if not Enabled (This) then
Enable (This);
end if;
Send_8bit_Mode (This, Data);
-- Wait until TXE flag is set to send data
while not Tx_Is_Empty (This) loop
null;
end loop;
-- Wait until Busy flag is reset before disabling SPI
while Busy (This) loop
null;
end loop;
-- Clear OVERUN flag in 2-Line communication mode because received UInt8
-- is not read.
if Current_Data_Direction (This) in D2Lines_RxOnly | D2Lines_FullDuplex
then -- right comparison ???
Clear_Overrun (This);
end if;
Status := HAL.SPI.Ok;
end Transmit;
--------------
-- Transmit --
--------------
overriding
procedure Transmit
(This : in out SPI_Port;
Data : HAL.SPI.SPI_Data_16b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
pragma Unreferenced (Timeout);
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
-- ??? right value to compare???
if Current_Data_Direction (This) = D1Line_Tx then
This.Periph.CR1.BIDIOE := True;
end if;
Clear_Overrun (This);
if not Enabled (This) then
Enable (This);
end if;
Send_16bit_Mode (This, Data);
-- Wait until TXE flag is set to send data
while not Tx_Is_Empty (This) loop
null;
end loop;
-- Wait until Busy flag is reset before disabling SPI
while Busy (This) loop
null;
end loop;
-- Clear OVERUN flag in 2-Line communication mode because received UInt8
-- is not read.
if Current_Data_Direction (This) in D2Lines_RxOnly | D2Lines_FullDuplex
then -- right comparison ???
Clear_Overrun (This);
Status := HAL.SPI.Err_Error;
end if;
Status := HAL.SPI.Ok;
end Transmit;
--------------
-- Transmit --
--------------
procedure Transmit
(This : in out SPI_Port;
Outgoing : UInt8)
is
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
-- ??? right value to compare???
if Current_Data_Direction (This) = D1Line_Tx then
This.Periph.CR1.BIDIOE := True;
end if;
if not Enabled (This) then
Enable (This);
end if;
This.Periph.DR.DR := UInt16 (Outgoing);
while not Tx_Is_Empty (This) loop
null;
end loop;
while Busy (This) loop
null;
end loop;
-- Clear OVERUN flag in 2-Line communication mode because received UInt8
-- is not read.
if Current_Data_Direction (This) in D2Lines_RxOnly | D2Lines_FullDuplex
then -- right comparison ???
Clear_Overrun (This);
end if;
end Transmit;
-------------
-- Receive --
-------------
overriding
procedure Receive
(This : in out SPI_Port;
Data : out HAL.SPI.SPI_Data_8b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
pragma Unreferenced (Timeout);
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
if not Enabled (This) then
Enable (This);
end if;
Receive_8bit_Mode (This, Data);
while Busy (This) loop
null;
end loop;
if CRC_Enabled (This) and CRC_Error_Indicated (This) then
Reset_CRC (This);
Status := HAL.SPI.Err_Error;
end if;
Status := HAL.SPI.Ok;
end Receive;
-------------
-- Receive --
-------------
overriding
procedure Receive
(This : in out SPI_Port;
Data : out HAL.SPI.SPI_Data_16b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
pragma Unreferenced (Timeout);
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
if not Enabled (This) then
Enable (This);
end if;
Receive_16bit_Mode (This, Data);
while Busy (This) loop
null;
end loop;
if CRC_Enabled (This) and CRC_Error_Indicated (This) then
Reset_CRC (This);
Status := HAL.SPI.Err_Error;
end if;
Status := HAL.SPI.Ok;
end Receive;
-------------
-- Receive --
-------------
procedure Receive
(This : in out SPI_Port;
Incoming : out UInt8)
is
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
if not Enabled (This) then
Enable (This);
end if;
This.Periph.DR.DR := 0; -- generate clock
while Rx_Is_Empty (This) loop
null;
end loop;
Incoming := UInt8 (This.Periph.DR.DR);
if CRC_Enabled (This) then
while Rx_Is_Empty (This) loop
null;
end loop;
Read_CRC : declare
Dummy : UInt16;
begin
Dummy := This.Periph.DR.DR;
end Read_CRC;
end if;
while Busy (This) loop
null;
end loop;
if CRC_Enabled (This) and CRC_Error_Indicated (This) then
Reset_CRC (This);
end if;
end Receive;
----------------------
-- Transmit_Receive --
----------------------
procedure Transmit_Receive
(This : in out SPI_Port;
Outgoing : UInt8_Buffer;
Incoming : out UInt8_Buffer;
Size : Positive)
is
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
if not Enabled (This) then
Enable (This);
end if;
if Is_Data_Frame_16bit (This) then
Send_Receive_16bit_Mode (This, Outgoing, Incoming, Size);
else
Send_Receive_8bit_Mode (This, Outgoing, Incoming, Size);
end if;
-- Read CRC to close CRC calculation process
if CRC_Enabled (This) then
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
Read_CRC : declare
Dummy : UInt16;
begin
Dummy := This.Periph.DR.DR;
end Read_CRC;
end if;
while Busy (This) loop
null;
end loop;
if CRC_Enabled (This) and CRC_Error_Indicated (This) then
Reset_CRC (This);
end if;
end Transmit_Receive;
----------------------
-- Transmit_Receive --
----------------------
procedure Transmit_Receive
(This : in out SPI_Port;
Outgoing : UInt8;
Incoming : out UInt8)
is
begin
if CRC_Enabled (This) then
Reset_CRC (This);
end if;
if not Enabled (This) then
Enable (This);
end if;
if Is_Data_Frame_16bit (This) then
raise Program_Error;
end if;
This.Periph.DR.DR := UInt16 (Outgoing);
-- enable CRC transmission
if CRC_Enabled (This) then
This.Periph.CR1.CRCNEXT := True;
end if;
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
Incoming := UInt8 (This.Periph.DR.DR);
-- Read CRC UInt8 to close CRC calculation
if CRC_Enabled (This) then
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
Read_CRC : declare
Dummy : UInt16;
begin
Dummy := This.Periph.DR.DR;
end Read_CRC;
end if;
while Busy (This) loop
null;
end loop;
if CRC_Enabled (This) and CRC_Error_Indicated (This) then
Reset_CRC (This);
end if;
end Transmit_Receive;
---------------------------
-- Data_Register_Address --
---------------------------
function Data_Register_Address
(This : SPI_Port)
return System.Address
is
begin
return This.Periph.DR'Address;
end Data_Register_Address;
-----------------------------
-- Send_Receive_16bit_Mode --
-----------------------------
procedure Send_Receive_16bit_Mode
(This : in out SPI_Port;
Outgoing : UInt8_Buffer;
Incoming : out UInt8_Buffer;
Size : Positive)
is
Tx_Count : Natural := Size;
Outgoing_Index : Natural := Outgoing'First;
Incoming_Index : Natural := Incoming'First;
begin
if Current_Mode (This) = Slave or else Tx_Count = 1 then
This.Periph.DR.DR :=
As_Half_Word_Pointer (Outgoing (Outgoing_Index)'Address).all;
Outgoing_Index := Outgoing_Index + 2;
Tx_Count := Tx_Count - 1;
end if;
if Tx_Count = 0 then
-- enable CRC transmission
if CRC_Enabled (This) then
This.Periph.CR1.CRCNEXT := True;
end if;
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
As_Half_Word_Pointer (Incoming (Incoming_Index)'Address).all :=
This.Periph.DR.DR;
return;
end if;
while Tx_Count > 0 loop
-- wait until we can send data
while not Tx_Is_Empty (This) loop
null;
end loop;
This.Periph.DR.DR :=
As_Half_Word_Pointer (Outgoing (Outgoing_Index)'Address).all;
Outgoing_Index := Outgoing_Index + 2;
Tx_Count := Tx_Count - 1;
-- enable CRC transmission
if Tx_Count = 0 and CRC_Enabled (This) then
This.Periph.CR1.CRCNEXT := True;
end if;
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
As_Half_Word_Pointer (Incoming (Incoming_Index)'Address).all :=
This.Periph.DR.DR;
Incoming_Index := Incoming_Index + 2;
end loop;
-- receive the last UInt8
if Current_Mode (This) = Slave then
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
As_Half_Word_Pointer (Incoming (Incoming_Index)'Address).all :=
This.Periph.DR.DR;
end if;
end Send_Receive_16bit_Mode;
----------------------------
-- Send_Receive_8bit_Mode --
----------------------------
procedure Send_Receive_8bit_Mode
(This : in out SPI_Port;
Outgoing : UInt8_Buffer;
Incoming : out UInt8_Buffer;
Size : Positive)
is
Tx_Count : Natural := Size;
Outgoing_Index : Natural := Outgoing'First;
Incoming_Index : Natural := Incoming'First;
begin
if Current_Mode (This) = Slave or else Tx_Count = 1 then
This.Periph.DR.DR := UInt16 (Outgoing (Outgoing_Index));
Outgoing_Index := Outgoing_Index + 1;
Tx_Count := Tx_Count - 1;
end if;
if Tx_Count = 0 then
-- enable CRC transmission
if CRC_Enabled (This) then
This.Periph.CR1.CRCNEXT := True;
end if;
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
Incoming (Incoming_Index) := UInt8 (This.Periph.DR.DR);
return;
end if;
while Tx_Count > 0 loop
-- wait until we can send data
while not Tx_Is_Empty (This) loop
null;
end loop;
This.Periph.DR.DR := UInt16 (Outgoing (Outgoing_Index));
Outgoing_Index := Outgoing_Index + 1;
Tx_Count := Tx_Count - 1;
-- enable CRC transmission
if Tx_Count = 0 and CRC_Enabled (This) then
This.Periph.CR1.CRCNEXT := True;
end if;
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
Incoming (Incoming_Index) := UInt8 (This.Periph.DR.DR);
Incoming_Index := Incoming_Index + 1;
end loop;
if Current_Mode (This) = Slave then
-- wait until data is received
while Rx_Is_Empty (This) loop
null;
end loop;
Incoming (Incoming_Index) := Data (This);
end if;
end Send_Receive_8bit_Mode;
---------------------
-- Send_16bit_Mode --
---------------------
procedure Send_16bit_Mode
(This : in out SPI_Port;
Outgoing : HAL.SPI.SPI_Data_16b)
is
Tx_Count : Natural := Outgoing'Length;
Index : Natural := Outgoing'First;
begin
if Current_Mode (This) = Slave or else Tx_Count = 1 then
This.Periph.DR.DR :=
As_Half_Word_Pointer (Outgoing (Index)'Address).all;
Index := Index + 2;
Tx_Count := Tx_Count - 1;
end if;
while Tx_Count > 0 loop
-- wait until we can send data
while not Tx_Is_Empty (This) loop
null;
end loop;
This.Periph.DR.DR :=
As_Half_Word_Pointer (Outgoing (Index)'Address).all;
Index := Index + 2;
Tx_Count := Tx_Count - 1;
end loop;
if CRC_Enabled (This) then
This.Periph.CR1.CRCNEXT := True;
end if;
end Send_16bit_Mode;
--------------------
-- Send_8bit_Mode --
--------------------
procedure Send_8bit_Mode
(This : in out SPI_Port;
Outgoing : HAL.SPI.SPI_Data_8b)
is
Tx_Count : Natural := Outgoing'Length;
Index : Natural := Outgoing'First;
begin
if Current_Mode (This) = Slave or else Tx_Count = 1 then
This.Periph.DR.DR := UInt16 (Outgoing (Index));
Index := Index + 1;
Tx_Count := Tx_Count - 1;
end if;
while Tx_Count > 0 loop
-- wait until we can send data
while not Tx_Is_Empty (This) loop
null;
end loop;
This.Periph.DR.DR := UInt16 (Outgoing (Index));
Index := Index + 1;
Tx_Count := Tx_Count - 1;
end loop;
if CRC_Enabled (This) then
This.Periph.CR1.CRCNEXT := True;
end if;
end Send_8bit_Mode;
------------------------
-- Receive_16bit_Mode --
------------------------
procedure Receive_16bit_Mode
(This : in out SPI_Port;
Incoming : out HAL.SPI.SPI_Data_16b)
is
Generate_Clock : constant Boolean := Current_Mode (This) = Master;
begin
for K of Incoming loop
if Generate_Clock then
This.Periph.DR.DR := 0;
end if;
while Rx_Is_Empty (This) loop
null;
end loop;
K := This.Periph.DR.DR;
end loop;
end Receive_16bit_Mode;
-----------------------
-- Receive_8bit_Mode --
-----------------------
procedure Receive_8bit_Mode
(This : in out SPI_Port;
Incoming : out HAL.SPI.SPI_Data_8b)
is
Generate_Clock : constant Boolean := Current_Mode (This) = Master;
begin
for K of Incoming loop
if Generate_Clock then
This.Periph.DR.DR := 0;
end if;
while Rx_Is_Empty (This) loop
null;
end loop;
K := UInt8 (This.Periph.DR.DR);
end loop;
end Receive_8bit_Mode;
end STM32.SPI;
|
-- Copyright 2006-2016 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure P is
Small : Data_Small;
Large : Data_Large;
Vector : Small_Float_Vector;
begin
Small := Create_Small;
Large := Create_Large;
Vector := Create_Small_Float_Vector;
Small (1) := Large (1);
Small (2) := Integer (Vector (1));
end P;
|
with Ada.Containers.Indefinite_Hashed_Maps;
with Ada.Strings.Hash;
with Ada.Environment_Variables;
with Ada.Text_IO;
with Ada.Strings.Unbounded;
package Globals is
pragma Elaborate_Body;
use Ada.Strings.Unbounded;
Blueprint_Folder_Name : constant String := "blueprints";
Blueprint_Default : constant String := "simple";
HTML_Filetype : constant String := "html";
Front_Matter_Prefix : constant String := "--";
Front_Matter_Separator : constant String := ":";
Posts_Source_Folder_Name : constant String := "_posts";
Pages_Folder_Name : constant String := "pages";
Layout_Folder_Name : constant String := "_layouts";
Dist_Folder_Name : constant String := "_site";
Blog_Target_Folder_Name : constant String := "blog";
Feed_filename : constant String := "rssfeed.xml";
Sitemap_filename : constant String := "sitemap.xml";
Site_Configuration_Name : constant String := "_site.cfg";
Excerpt_Separator : constant String := "<!--more-->";
type OS is (Unix, Windows);
Current_OS : OS := Unix;
Current_Lineending : Unbounded_String;
end Globals;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>in_structure</name>
<ret_bitwidth>1</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>x</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>x</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>y</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>scenario_nr_struct</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>scenario_structure_c</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>80</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>37</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>5</id>
<name>y_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>y</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>52</item>
<item>53</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>6</id>
<name>x_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>x</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>54</item>
<item>55</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name>scenario_nr_struct_l</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/dorin</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name>i</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>31</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>59</item>
<item>60</item>
<item>61</item>
<item>62</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>i_cast</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>tmp</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>64</item>
<item>65</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>i_8</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>i</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>31</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>66</item>
<item>68</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>69</item>
<item>70</item>
<item>71</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>tmp_s</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>73</item>
<item>74</item>
<item>76</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name>tmp_283</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name>scenario_structure_c</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>78</item>
<item>80</item>
<item>81</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>tmp_284</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>82</item>
<item>84</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp_285</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>86</item>
<item>88</item>
<item>89</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>scenario_structure_c_34</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>90</item>
<item>91</item>
<item>92</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>tmp_286</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>93</item>
<item>95</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>tmp_287</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>96</item>
<item>97</item>
<item>98</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>scenario_structure_c_35</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>99</item>
<item>100</item>
<item>101</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>tmp_288</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>102</item>
<item>104</item>
</oprand_edges>
<opcode>or</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>tmp_289</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>105</item>
<item>106</item>
<item>107</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>scenario_structure_c_36</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>108</item>
<item>109</item>
<item>110</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>scenario_structure_c_37</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>tmp_160</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>112</item>
<item>113</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>114</item>
<item>115</item>
<item>116</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>scenario_structure_c_38</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>117</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name>tmp_161</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>118</item>
<item>119</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>74</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>74</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>120</item>
<item>121</item>
<item>122</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>scenario_structure_c_39</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>123</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>tmp_162</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>124</item>
<item>125</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>126</item>
<item>127</item>
<item>128</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>scenario_structure_c_40</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>129</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>tmp_163</name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>130</item>
<item>131</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>75</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>132</item>
<item>133</item>
<item>134</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>76</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>76</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>135</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>72</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>72</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>136</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>p_0</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>138</item>
<item>139</item>
<item>141</item>
<item>142</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name></name>
<fileName>wave2/.apc/main.c</fileName>
<fileDirectory>/home/dorin</fileDirectory>
<lineNumber>79</lineNumber>
<contextFuncName>in_structure</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dorin</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>wave2/.apc/main.c</first>
<second>in_structure</second>
</first>
<second>79</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>143</item>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>10</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_42">
<Value>
<Obj>
<type>2</type>
<id>58</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>31</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_43">
<Value>
<Obj>
<type>2</type>
<id>67</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>31</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_44">
<Value>
<Obj>
<type>2</type>
<id>75</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_45">
<Value>
<Obj>
<type>2</type>
<id>79</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_46">
<Value>
<Obj>
<type>2</type>
<id>83</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>6</content>
</item>
<item class_id_reference="16" object_id="_47">
<Value>
<Obj>
<type>2</type>
<id>87</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>30</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_48">
<Value>
<Obj>
<type>2</type>
<id>94</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_49">
<Value>
<Obj>
<type>2</type>
<id>103</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>34</bitwidth>
</Value>
<const_type>0</const_type>
<content>3</content>
</item>
<item class_id_reference="16" object_id="_50">
<Value>
<Obj>
<type>2</type>
<id>137</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_51">
<Value>
<Obj>
<type>2</type>
<id>140</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_52">
<Obj>
<type>3</type>
<id>9</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_53">
<Obj>
<type>3</type>
<id>15</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>5</count>
<item_version>0</item_version>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_54">
<Obj>
<type>3</type>
<id>31</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>15</count>
<item_version>0</item_version>
<item>16</item>
<item>17</item>
<item>18</item>
<item>19</item>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_55">
<Obj>
<type>3</type>
<id>35</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>32</item>
<item>33</item>
<item>34</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_56">
<Obj>
<type>3</type>
<id>39</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>36</item>
<item>37</item>
<item>38</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_57">
<Obj>
<type>3</type>
<id>43</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>3</count>
<item_version>0</item_version>
<item>40</item>
<item>41</item>
<item>42</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_58">
<Obj>
<type>3</type>
<id>45</id>
<name>._crit_edge3</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_59">
<Obj>
<type>3</type>
<id>47</id>
<name>._crit_edge1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_60">
<Obj>
<type>3</type>
<id>50</id>
<name>._crit_edge</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>48</item>
<item>49</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>87</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_61">
<id>53</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>5</sink_obj>
</item>
<item class_id_reference="20" object_id="_62">
<id>55</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>6</sink_obj>
</item>
<item class_id_reference="20" object_id="_63">
<id>56</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>7</sink_obj>
</item>
<item class_id_reference="20" object_id="_64">
<id>57</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_65">
<id>59</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_66">
<id>60</id>
<edge_type>2</edge_type>
<source_obj>9</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_67">
<id>61</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_68">
<id>62</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>10</sink_obj>
</item>
<item class_id_reference="20" object_id="_69">
<id>63</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_70">
<id>64</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_71">
<id>65</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_72">
<id>66</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_73">
<id>68</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_74">
<id>69</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_75">
<id>70</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_76">
<id>71</id>
<edge_type>2</edge_type>
<source_obj>31</source_obj>
<sink_obj>14</sink_obj>
</item>
<item class_id_reference="20" object_id="_77">
<id>74</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_78">
<id>76</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_79">
<id>77</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_80">
<id>78</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_81">
<id>80</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_82">
<id>81</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>18</sink_obj>
</item>
<item class_id_reference="20" object_id="_83">
<id>82</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_84">
<id>84</id>
<edge_type>1</edge_type>
<source_obj>83</source_obj>
<sink_obj>19</sink_obj>
</item>
<item class_id_reference="20" object_id="_85">
<id>88</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_86">
<id>89</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_87">
<id>90</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_88">
<id>91</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_89">
<id>92</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_90">
<id>93</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_91">
<id>95</id>
<edge_type>1</edge_type>
<source_obj>94</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_92">
<id>97</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_93">
<id>98</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_94">
<id>99</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_95">
<id>100</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_96">
<id>101</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_97">
<id>102</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_98">
<id>104</id>
<edge_type>1</edge_type>
<source_obj>103</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_99">
<id>106</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_100">
<id>107</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_101">
<id>108</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_102">
<id>109</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_103">
<id>110</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_104">
<id>111</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_105">
<id>112</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_106">
<id>113</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_107">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_108">
<id>115</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_109">
<id>116</id>
<edge_type>2</edge_type>
<source_obj>35</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_110">
<id>117</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_111">
<id>118</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_112">
<id>119</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_113">
<id>120</id>
<edge_type>1</edge_type>
<source_obj>33</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_114">
<id>121</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_115">
<id>122</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_116">
<id>123</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_117">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_118">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_119">
<id>126</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_120">
<id>127</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_121">
<id>128</id>
<edge_type>2</edge_type>
<source_obj>43</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_122">
<id>129</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_123">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_124">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_125">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_126">
<id>133</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_127">
<id>134</id>
<edge_type>2</edge_type>
<source_obj>50</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_128">
<id>135</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_129">
<id>136</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_130">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>137</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_131">
<id>139</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_132">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>140</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_133">
<id>142</id>
<edge_type>2</edge_type>
<source_obj>43</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_134">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_135">
<id>144</id>
<edge_type>2</edge_type>
<source_obj>9</source_obj>
<sink_obj>15</sink_obj>
</item>
<item class_id_reference="20" object_id="_136">
<id>145</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_137">
<id>146</id>
<edge_type>2</edge_type>
<source_obj>15</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>147</id>
<edge_type>2</edge_type>
<source_obj>31</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>148</id>
<edge_type>2</edge_type>
<source_obj>31</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>149</id>
<edge_type>2</edge_type>
<source_obj>35</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>150</id>
<edge_type>2</edge_type>
<source_obj>35</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>151</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>152</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>153</id>
<edge_type>2</edge_type>
<source_obj>43</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>154</id>
<edge_type>2</edge_type>
<source_obj>43</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>155</id>
<edge_type>2</edge_type>
<source_obj>45</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>156</id>
<edge_type>2</edge_type>
<source_obj>47</source_obj>
<sink_obj>15</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_148">
<mId>1</mId>
<mTag>in_structure</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>-1</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_149">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>9</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_150">
<mId>3</mId>
<mTag>Loop 1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>7</count>
<item_version>0</item_version>
<item>15</item>
<item>31</item>
<item>35</item>
<item>39</item>
<item>43</item>
<item>45</item>
<item>47</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>-1</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_151">
<mId>4</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_152">
<states class_id="25" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_153">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_154">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_155">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_156">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_157">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_158">
<id>2</id>
<operations>
<count>18</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_159">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_160">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_161">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_162">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_163">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_164">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_165">
<id>17</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_166">
<id>18</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_167">
<id>19</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_168">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_169">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_170">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_171">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_172">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_173">
<id>25</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_174">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_175">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_176">
<id>28</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_177">
<id>3</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_178">
<id>28</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_179">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_180">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_181">
<id>32</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_182">
<id>4</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_183">
<id>32</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_184">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_185">
<id>34</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_186">
<id>36</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_187">
<id>5</id>
<operations>
<count>4</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_188">
<id>36</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_189">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_190">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_191">
<id>40</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_192">
<id>6</id>
<operations>
<count>7</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_193">
<id>40</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_194">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_195">
<id>42</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_196">
<id>44</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_197">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_198">
<id>48</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_199">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_200">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>25</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_201">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>26</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item class_id="34" tracking_level="0" version="0">
<first class_id="35" tracking_level="0" version="0">
<first>12</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_202">
<inState>2</inState>
<outState>6</outState>
<condition>
<id>27</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>12</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_203">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>29</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>29</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_204">
<inState>3</inState>
<outState>6</outState>
<condition>
<id>30</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>29</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_205">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>32</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>33</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_206">
<inState>4</inState>
<outState>6</outState>
<condition>
<id>33</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>33</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_207">
<inState>5</inState>
<outState>6</outState>
<condition>
<id>35</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_208">
<inState>6</inState>
<outState>2</outState>
<condition>
<id>38</id>
<sop>
<count>4</count>
<item_version>0</item_version>
<item>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>12</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>29</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>12</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>33</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>12</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>37</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
<item>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>12</first>
<second>0</second>
</first>
<second>0</second>
</item>
<item>
<first>
<first>41</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="-1"></res>
<node_label_latency class_id="37" tracking_level="0" version="0">
<count>37</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>5</first>
<second class_id="39" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>6</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>7</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>3</first>
<second>1</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>4</first>
<second>1</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>9</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>1</first>
<second>2</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>2</first>
<second>3</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>3</first>
<second>4</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>4</first>
<second>5</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>5</first>
<second>5</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>5</first>
<second>5</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>5</first>
<second>5</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="43" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</regions>
<dp_fu_nodes class_id="44" tracking_level="0" version="0">
<count>25</count>
<item_version>0</item_version>
<item class_id="45" tracking_level="0" version="0">
<first>34</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>40</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>53</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>60</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>74</first>
<second>
<count>8</count>
<item_version>0</item_version>
<item>28</item>
<item>28</item>
<item>32</item>
<item>32</item>
<item>36</item>
<item>36</item>
<item>40</item>
<item>40</item>
</second>
</item>
<item>
<first>83</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>102</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>106</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>110</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>115</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>121</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
<item>
<first>129</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>134</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>149</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>155</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>164</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>170</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>179</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>184</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>189</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>194</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="47" tracking_level="0" version="0">
<count>21</count>
<item_version>0</item_version>
<item class_id="48" tracking_level="0" version="0">
<first>i_8_fu_115</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>i_cast_fu_106</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>i_phi_fu_83</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_0_phi_fu_94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>scenario_structure_c_34_gep_fu_53</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>scenario_structure_c_35_gep_fu_60</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>scenario_structure_c_36_gep_fu_67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>scenario_structure_c_gep_fu_46</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>tmp_160_fu_179</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>tmp_161_fu_184</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>tmp_162_fu_189</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>tmp_163_fu_194</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>41</item>
</second>
</item>
<item>
<first>tmp_283_fu_129</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</second>
</item>
<item>
<first>tmp_284_fu_134</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>19</item>
</second>
</item>
<item>
<first>tmp_285_fu_140</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_286_fu_149</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_287_fu_155</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>tmp_288_fu_164</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>tmp_289_fu_170</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>tmp_fu_110</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>tmp_s_fu_121</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>16</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>3</count>
<item_version>0</item_version>
<item>
<first>scenario_nr_struct_l_load_fu_102</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>x_read_read_fu_40</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>y_read_read_fu_34</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="49" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="50" tracking_level="0" version="0">
<first class_id="51" tracking_level="0" version="0">
<first>scenario_structure_c</first>
<second>0</second>
</first>
<second>
<count>8</count>
<item_version>0</item_version>
<item>28</item>
<item>28</item>
<item>32</item>
<item>32</item>
<item>36</item>
<item>36</item>
<item>40</item>
<item>40</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>14</count>
<item_version>0</item_version>
<item>
<first>79</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>199</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
<item>
<first>205</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>211</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>216</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>220</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>235</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>240</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>245</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>249</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>253</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>14</count>
<item_version>0</item_version>
<item>
<first>i_8_reg_220</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>i_reg_79</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_0_reg_90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>scenario_nr_struct_l_reg_211</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>7</item>
</second>
</item>
<item>
<first>scenario_structure_c_34_reg_230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>scenario_structure_c_35_reg_235</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>scenario_structure_c_36_reg_240</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>scenario_structure_c_reg_225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>18</item>
</second>
</item>
<item>
<first>tmp_160_reg_245</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>tmp_161_reg_249</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>33</item>
</second>
</item>
<item>
<first>tmp_162_reg_253</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>tmp_reg_216</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>x_read_reg_205</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
<item>
<first>y_read_reg_199</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>2</count>
<item_version>0</item_version>
<item>
<first>79</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>2</count>
<item_version>0</item_version>
<item>
<first>i_reg_79</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>10</item>
</second>
</item>
<item>
<first>p_0_reg_90</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="52" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="53" tracking_level="0" version="0">
<first>scenario_nr_struct</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
<item>
<first>scenario_structure_c(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>8</count>
<item_version>0</item_version>
<item>28</item>
<item>28</item>
<item>32</item>
<item>32</item>
<item>36</item>
<item>36</item>
<item>40</item>
<item>40</item>
</second>
</item>
</second>
</item>
<item>
<first>x</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</second>
</item>
</second>
</item>
<item>
<first>y</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="54" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>4</first>
<second>RAM</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ C H 5 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, 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, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Types; use Types;
package Sem_Ch5 is
procedure Analyze_Assignment (N : Node_Id);
procedure Analyze_Block_Statement (N : Node_Id);
procedure Analyze_Case_Statement (N : Node_Id);
procedure Analyze_Exit_Statement (N : Node_Id);
procedure Analyze_Goto_Statement (N : Node_Id);
procedure Analyze_If_Statement (N : Node_Id);
procedure Analyze_Implicit_Label_Declaration (N : Node_Id);
procedure Analyze_Label (N : Node_Id);
procedure Analyze_Loop_Statement (N : Node_Id);
procedure Analyze_Null_Statement (N : Node_Id);
procedure Analyze_Statements (L : List_Id);
procedure Analyze_Label_Entity (E : Entity_Id);
-- This procedure performs direct analysis of the label entity E. It
-- is used when a label is created by the expander without bothering
-- to insert an N_Implicit_Label_Declaration in the tree. It also takes
-- care of setting Reachable, since labels defined by the expander can
-- be assumed to be reachable.
procedure Check_Possible_Current_Value_Condition (Cnode : Node_Id);
-- Cnode is N_If_Statement, N_Elsif_Part, or N_Iteration_Scheme
-- (the latter when a WHILE condition is present). This call checks
-- if Condition (Cnode) is of the form ([NOT] var op val), where var
-- is a simple object, val is known at compile time, and op is one
-- of the six relational operators. If this is the case, and the
-- Current_Value field of "var" is not set, then it is set to Cnode.
-- See Exp_Util.Set_Current_Value_Condition for further details.
procedure Check_Unreachable_Code (N : Node_Id);
-- This procedure is called with N being the node for a statement that
-- is an unconditional transfer of control. It checks to see if the
-- statement is followed by some other statement, and if so generates
-- an appropriate warning for unreachable code.
end Sem_Ch5;
|
-- Copyright 2017 Jeff Foley. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local json = require("json")
name = "Spyse"
type = "api"
function start()
setratelimit(2)
end
function check()
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c ~= nil and c.key ~= nil and c.key ~= "") then
return true
end
return false
end
function vertical(ctx, domain)
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c == nil or c.key == nil or c.key == "") then
return
end
local resp
local vurl = buildurl(domain)
-- Check if the response data is in the graph database
if (cfg.ttl ~= nil and cfg.ttl > 0) then
resp = obtain_response(domain, cfg.ttl)
end
if (resp == nil or resp == "") then
local err
resp, err = request({
url=vurl,
headers={['Authorization']="Bearer " .. c.key},
})
if (err ~= nil and err ~= "") then
return
end
if (cfg.ttl ~= nil and cfg.ttl > 0) then
cache_response(domain, resp)
end
end
local d = json.decode(resp)
if (d == nil or #(d['data'].items) == 0) then
return
end
for i, item in pairs(d['data'].items) do
sendnames(ctx, item.name)
end
end
function buildurl(domain)
return "https://api.spyse.com/v3/data/domain/subdomain?limit=100&domain=" .. domain
end
function sendnames(ctx, content)
local names = find(content, subdomainre)
if names == nil then
return
end
for i, v in pairs(names) do
newname(ctx, v)
end
end
|
------------------------------------------------------------------------------
-- A d a r u n - t i m e s p e c i f i c a t i o n --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of ada.ads file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
with Ada.Real_Time;
with Ada.Task_Identification;
package Ada.Dispatching.EDF is
subtype Deadline is Ada.Real_Time.Time;
Default_Deadline : constant Deadline := Ada.Real_Time.Time_Last;
procedure Set_Deadline (D : in Deadline;
T : in Ada.Task_Identification.Task_Id
:= Ada.Task_Identification.Current_Task);
procedure Delay_Until_And_Set_Deadline
(Delay_Until_Time : in Ada.Real_Time.Time;
Deadline_Offset : in Ada.Real_Time.Time_Span);
function Get_Deadline (T : Ada.Task_Identification.Task_Id
:= Ada.Task_Identification.Current_Task)
return Deadline;
end Ada.Dispatching.EDF;
|
with Ada.Text_IO;
procedure Test_For_Primes is
type Pascal_Triangle_Type is array (Natural range <>) of Long_Long_Integer;
function Calculate_Pascal_Triangle (N : in Natural) return Pascal_Triangle_Type is
Pascal_Triangle : Pascal_Triangle_Type (0 .. N);
begin
Pascal_Triangle (0) := 1;
for I in Pascal_Triangle'First .. Pascal_Triangle'Last - 1 loop
Pascal_Triangle (1 + I) := 1;
for J in reverse 1 .. I loop
Pascal_Triangle (J) := Pascal_Triangle (J - 1) - Pascal_Triangle (J);
end loop;
Pascal_Triangle (0) := -Pascal_Triangle (0);
end loop;
return Pascal_Triangle;
end Calculate_Pascal_Triangle;
function Is_Prime (N : Integer) return Boolean is
I : Integer;
Result : Boolean := True;
Pascal_Triangle : constant Pascal_Triangle_Type := Calculate_Pascal_Triangle (N);
begin
I := N / 2;
while Result and I > 1 loop
Result := Result and Pascal_Triangle (I) mod Long_Long_Integer (N) = 0;
I := I - 1;
end loop;
return Result;
end Is_Prime;
function Image (N : in Long_Long_Integer;
Sign : in Boolean := False) return String is
Image : constant String := N'Image;
begin
if N < 0 then
return Image;
else
if Sign then
return "+" & Image (Image'First + 1 .. Image'Last);
else
return Image (Image'First + 1 .. Image'Last);
end if;
end if;
end Image;
procedure Show (Triangle : in Pascal_Triangle_Type) is
use Ada.Text_IO;
Begin
for I in reverse Triangle'Range loop
Put (Image (Triangle (I), Sign => True));
Put ("x^");
Put (Image (Long_Long_Integer (I)));
Put (" ");
end loop;
end Show;
procedure Show_Pascal_Triangles is
use Ada.Text_IO;
begin
for N in 0 .. 9 loop
declare
Pascal_Triangle : constant Pascal_Triangle_Type := Calculate_Pascal_Triangle (N);
begin
Put ("(x-1)^" & Image (Long_Long_Integer (N)) & " = ");
Show (Pascal_Triangle);
New_Line;
end;
end loop;
end Show_Pascal_Triangles;
procedure Show_Primes is
use Ada.Text_IO;
begin
for N in 2 .. 63 loop
if Is_Prime (N) then
Put (N'Image);
end if;
end loop;
New_Line;
end Show_Primes;
begin
Show_Pascal_Triangles;
Show_Primes;
end Test_For_Primes;
|
-- Copyright 2016 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.
package Linted.Drawer is
pragma Elaborate_Body;
end Linted.Drawer;
|
-- Copyright 2015 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 Interfaces.C; use Interfaces.C;
with Libc.Stdint;
with XCB.XProto;
with System;
with Interfaces.C.Strings;
package XCB.XKB with
Spark_Mode => Off is
pragma Preelaborate;
pragma Link_With ("-lxcb -lxcb-xkb");
XCB_XKB_MAJOR_VERSION : constant := 1;
XCB_XKB_MINOR_VERSION : constant := 0;
XCB_XKB_KEYBOARD : constant := 0;
-- XCB_XKB_USE_EXTENSION : constant := 0;
-- XCB_XKB_SELECT_EVENTS : constant := 1;
-- XCB_XKB_BELL : constant := 3;
-- XCB_XKB_GET_STATE : constant := 4;
-- XCB_XKB_LATCH_LOCK_STATE : constant := 5;
-- XCB_XKB_GET_CONTROLS : constant := 6;
-- XCB_XKB_SET_CONTROLS : constant := 7;
-- XCB_XKB_GET_MAP : constant := 8;
-- XCB_XKB_SET_MAP : constant := 9;
-- XCB_XKB_GET_COMPAT_MAP : constant := 10;
-- XCB_XKB_SET_COMPAT_MAP : constant := 11;
-- XCB_XKB_GET_INDICATOR_STATE : constant := 12;
-- XCB_XKB_GET_INDICATOR_MAP : constant := 13;
-- XCB_XKB_SET_INDICATOR_MAP : constant := 14;
-- XCB_XKB_GET_NAMED_INDICATOR : constant := 15;
-- XCB_XKB_SET_NAMED_INDICATOR : constant := 16;
-- XCB_XKB_GET_NAMES : constant := 17;
-- XCB_XKB_SET_NAMES : constant := 18;
-- XCB_XKB_PER_CLIENT_FLAGS : constant := 21;
-- XCB_XKB_LIST_COMPONENTS : constant := 22;
-- XCB_XKB_GET_KBD_BY_NAME : constant := 23;
-- XCB_XKB_GET_DEVICE_INFO : constant := 24;
-- XCB_XKB_SET_DEVICE_INFO : constant := 25;
-- XCB_XKB_SET_DEBUGGING_FLAGS : constant := 101;
XCB_XKB_NEW_KEYBOARD_NOTIFY : constant := 0;
XCB_XKB_MAP_NOTIFY : constant := 1;
XCB_XKB_STATE_NOTIFY : constant := 2;
XCB_XKB_CONTROLS_NOTIFY : constant := 3;
XCB_XKB_INDICATOR_STATE_NOTIFY : constant := 4;
XCB_XKB_INDICATOR_MAP_NOTIFY : constant := 5;
XCB_XKB_NAMES_NOTIFY : constant := 6;
XCB_XKB_COMPAT_MAP_NOTIFY : constant := 7;
XCB_XKB_BELL_NOTIFY : constant := 8;
XCB_XKB_ACTION_MESSAGE : constant := 9;
XCB_XKB_ACCESS_X_NOTIFY : constant := 10;
XCB_XKB_EXTENSION_DEVICE_NOTIFY : constant := 11;
xcb_xkb_id : aliased XCB
.xcb_extension_t_access; -- /usr/include/xcb/xkb.h:25
pragma Import (C, xcb_xkb_id, "xcb_xkb_id");
subtype xcb_xkb_const_t is unsigned;
XCB_XKB_CONST_MAX_LEGAL_KEY_CODE : constant xcb_xkb_const_t := 255;
XCB_XKB_CONST_PER_KEY_BIT_ARRAY_SIZE : constant xcb_xkb_const_t := 32;
XCB_XKB_CONST_KEY_NAME_LENGTH : constant xcb_xkb_const_t :=
4; -- /usr/include/xcb/xkb.h:27
subtype xcb_xkb_event_type_t is unsigned;
XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY : constant xcb_xkb_event_type_t := 1;
XCB_XKB_EVENT_TYPE_MAP_NOTIFY : constant xcb_xkb_event_type_t := 2;
XCB_XKB_EVENT_TYPE_STATE_NOTIFY : constant xcb_xkb_event_type_t := 4;
XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY : constant xcb_xkb_event_type_t := 8;
XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY : constant xcb_xkb_event_type_t :=
16;
XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY : constant xcb_xkb_event_type_t :=
32;
XCB_XKB_EVENT_TYPE_NAMES_NOTIFY : constant xcb_xkb_event_type_t := 64;
XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY : constant xcb_xkb_event_type_t := 128;
XCB_XKB_EVENT_TYPE_BELL_NOTIFY : constant xcb_xkb_event_type_t := 256;
XCB_XKB_EVENT_TYPE_ACTION_MESSAGE : constant xcb_xkb_event_type_t := 512;
XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY : constant xcb_xkb_event_type_t := 1024;
XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY : constant xcb_xkb_event_type_t :=
2048; -- /usr/include/xcb/xkb.h:33
subtype xcb_xkb_nkn_detail_t is unsigned;
XCB_XKB_NKN_DETAIL_KEYCODES : constant xcb_xkb_nkn_detail_t := 1;
XCB_XKB_NKN_DETAIL_GEOMETRY : constant xcb_xkb_nkn_detail_t := 2;
XCB_XKB_NKN_DETAIL_DEVICE_ID : constant xcb_xkb_nkn_detail_t :=
4; -- /usr/include/xcb/xkb.h:48
subtype xcb_xkb_axn_detail_t is unsigned;
XCB_XKB_AXN_DETAIL_SK_PRESS : constant xcb_xkb_axn_detail_t := 1;
XCB_XKB_AXN_DETAIL_SK_ACCEPT : constant xcb_xkb_axn_detail_t := 2;
XCB_XKB_AXN_DETAIL_SK_REJECT : constant xcb_xkb_axn_detail_t := 4;
XCB_XKB_AXN_DETAIL_SK_RELEASE : constant xcb_xkb_axn_detail_t := 8;
XCB_XKB_AXN_DETAIL_BK_ACCEPT : constant xcb_xkb_axn_detail_t := 16;
XCB_XKB_AXN_DETAIL_BK_REJECT : constant xcb_xkb_axn_detail_t := 32;
XCB_XKB_AXN_DETAIL_AXK_WARNING : constant xcb_xkb_axn_detail_t :=
64; -- /usr/include/xcb/xkb.h:54
subtype xcb_xkb_map_part_t is unsigned;
XCB_XKB_MAP_PART_KEY_TYPES : constant xcb_xkb_map_part_t := 1;
XCB_XKB_MAP_PART_KEY_SYMS : constant xcb_xkb_map_part_t := 2;
XCB_XKB_MAP_PART_MODIFIER_MAP : constant xcb_xkb_map_part_t := 4;
XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS : constant xcb_xkb_map_part_t := 8;
XCB_XKB_MAP_PART_KEY_ACTIONS : constant xcb_xkb_map_part_t := 16;
XCB_XKB_MAP_PART_KEY_BEHAVIORS : constant xcb_xkb_map_part_t := 32;
XCB_XKB_MAP_PART_VIRTUAL_MODS : constant xcb_xkb_map_part_t := 64;
XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP : constant xcb_xkb_map_part_t :=
128; -- /usr/include/xcb/xkb.h:64
subtype xcb_xkb_set_map_flags_t is unsigned;
XCB_XKB_SET_MAP_FLAGS_RESIZE_TYPES : constant xcb_xkb_set_map_flags_t := 1;
XCB_XKB_SET_MAP_FLAGS_RECOMPUTE_ACTIONS : constant xcb_xkb_set_map_flags_t :=
2; -- /usr/include/xcb/xkb.h:75
subtype xcb_xkb_state_part_t is unsigned;
XCB_XKB_STATE_PART_MODIFIER_STATE : constant xcb_xkb_state_part_t := 1;
XCB_XKB_STATE_PART_MODIFIER_BASE : constant xcb_xkb_state_part_t := 2;
XCB_XKB_STATE_PART_MODIFIER_LATCH : constant xcb_xkb_state_part_t := 4;
XCB_XKB_STATE_PART_MODIFIER_LOCK : constant xcb_xkb_state_part_t := 8;
XCB_XKB_STATE_PART_GROUP_STATE : constant xcb_xkb_state_part_t := 16;
XCB_XKB_STATE_PART_GROUP_BASE : constant xcb_xkb_state_part_t := 32;
XCB_XKB_STATE_PART_GROUP_LATCH : constant xcb_xkb_state_part_t := 64;
XCB_XKB_STATE_PART_GROUP_LOCK : constant xcb_xkb_state_part_t := 128;
XCB_XKB_STATE_PART_COMPAT_STATE : constant xcb_xkb_state_part_t := 256;
XCB_XKB_STATE_PART_GRAB_MODS : constant xcb_xkb_state_part_t := 512;
XCB_XKB_STATE_PART_COMPAT_GRAB_MODS : constant xcb_xkb_state_part_t := 1024;
XCB_XKB_STATE_PART_LOOKUP_MODS : constant xcb_xkb_state_part_t := 2048;
XCB_XKB_STATE_PART_COMPAT_LOOKUP_MODS : constant xcb_xkb_state_part_t :=
4096;
XCB_XKB_STATE_PART_POINTER_BUTTONS : constant xcb_xkb_state_part_t :=
8192; -- /usr/include/xcb/xkb.h:80
subtype xcb_xkb_bool_ctrl_t is unsigned;
XCB_XKB_BOOL_CTRL_REPEAT_KEYS : constant xcb_xkb_bool_ctrl_t := 1;
XCB_XKB_BOOL_CTRL_SLOW_KEYS : constant xcb_xkb_bool_ctrl_t := 2;
XCB_XKB_BOOL_CTRL_BOUNCE_KEYS : constant xcb_xkb_bool_ctrl_t := 4;
XCB_XKB_BOOL_CTRL_STICKY_KEYS : constant xcb_xkb_bool_ctrl_t := 8;
XCB_XKB_BOOL_CTRL_MOUSE_KEYS : constant xcb_xkb_bool_ctrl_t := 16;
XCB_XKB_BOOL_CTRL_MOUSE_KEYS_ACCEL : constant xcb_xkb_bool_ctrl_t := 32;
XCB_XKB_BOOL_CTRL_ACCESS_X_KEYS : constant xcb_xkb_bool_ctrl_t := 64;
XCB_XKB_BOOL_CTRL_ACCESS_X_TIMEOUT_MASK : constant xcb_xkb_bool_ctrl_t :=
128;
XCB_XKB_BOOL_CTRL_ACCESS_X_FEEDBACK_MASK : constant xcb_xkb_bool_ctrl_t :=
256;
XCB_XKB_BOOL_CTRL_AUDIBLE_BELL_MASK : constant xcb_xkb_bool_ctrl_t := 512;
XCB_XKB_BOOL_CTRL_OVERLAY_1_MASK : constant xcb_xkb_bool_ctrl_t := 1024;
XCB_XKB_BOOL_CTRL_OVERLAY_2_MASK : constant xcb_xkb_bool_ctrl_t := 2048;
XCB_XKB_BOOL_CTRL_IGNORE_GROUP_LOCK_MASK : constant xcb_xkb_bool_ctrl_t :=
4096; -- /usr/include/xcb/xkb.h:97
subtype xcb_xkb_control_t is unsigned;
XCB_XKB_CONTROL_GROUPS_WRAP : constant xcb_xkb_control_t := 134217728;
XCB_XKB_CONTROL_INTERNAL_MODS : constant xcb_xkb_control_t := 268435456;
XCB_XKB_CONTROL_IGNORE_LOCK_MODS : constant xcb_xkb_control_t := 536870912;
XCB_XKB_CONTROL_PER_KEY_REPEAT : constant xcb_xkb_control_t := 1073741824;
XCB_XKB_CONTROL_CONTROLS_ENABLED : constant xcb_xkb_control_t :=
2147483648; -- /usr/include/xcb/xkb.h:113
subtype xcb_xkb_ax_option_t is unsigned;
XCB_XKB_AX_OPTION_SK_PRESS_FB : constant xcb_xkb_ax_option_t := 1;
XCB_XKB_AX_OPTION_SK_ACCEPT_FB : constant xcb_xkb_ax_option_t := 2;
XCB_XKB_AX_OPTION_FEATURE_FB : constant xcb_xkb_ax_option_t := 4;
XCB_XKB_AX_OPTION_SLOW_WARN_FB : constant xcb_xkb_ax_option_t := 8;
XCB_XKB_AX_OPTION_INDICATOR_FB : constant xcb_xkb_ax_option_t := 16;
XCB_XKB_AX_OPTION_STICKY_KEYS_FB : constant xcb_xkb_ax_option_t := 32;
XCB_XKB_AX_OPTION_TWO_KEYS : constant xcb_xkb_ax_option_t := 64;
XCB_XKB_AX_OPTION_LATCH_TO_LOCK : constant xcb_xkb_ax_option_t := 128;
XCB_XKB_AX_OPTION_SK_RELEASE_FB : constant xcb_xkb_ax_option_t := 256;
XCB_XKB_AX_OPTION_SK_REJECT_FB : constant xcb_xkb_ax_option_t := 512;
XCB_XKB_AX_OPTION_BK_REJECT_FB : constant xcb_xkb_ax_option_t := 1024;
XCB_XKB_AX_OPTION_DUMB_BELL : constant xcb_xkb_ax_option_t :=
2048; -- /usr/include/xcb/xkb.h:121
subtype xcb_xkb_device_spec_t is
Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:136
type xcb_xkb_device_spec_iterator_t is record
data : access xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:142
c_rem : aliased int; -- /usr/include/xcb/xkb.h:143
index : aliased int; -- /usr/include/xcb/xkb.h:144
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_device_spec_iterator_t); -- /usr/include/xcb/xkb.h:141
subtype xcb_xkb_led_class_result_t is unsigned;
XCB_XKB_LED_CLASS_RESULT_KBD_FEEDBACK_CLASS : constant xcb_xkb_led_class_result_t :=
0;
XCB_XKB_LED_CLASS_RESULT_LED_FEEDBACK_CLASS : constant xcb_xkb_led_class_result_t :=
4; -- /usr/include/xcb/xkb.h:147
subtype xcb_xkb_led_class_t is unsigned;
XCB_XKB_LED_CLASS_KBD_FEEDBACK_CLASS : constant xcb_xkb_led_class_t := 0;
XCB_XKB_LED_CLASS_LED_FEEDBACK_CLASS : constant xcb_xkb_led_class_t := 4;
XCB_XKB_LED_CLASS_DFLT_XI_CLASS : constant xcb_xkb_led_class_t := 768;
XCB_XKB_LED_CLASS_ALL_XI_CLASSES : constant xcb_xkb_led_class_t :=
1280; -- /usr/include/xcb/xkb.h:152
subtype xcb_xkb_led_class_spec_t is
Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:159
type xcb_xkb_led_class_spec_iterator_t is record
data : access xcb_xkb_led_class_spec_t; -- /usr/include/xcb/xkb.h:165
c_rem : aliased int; -- /usr/include/xcb/xkb.h:166
index : aliased int; -- /usr/include/xcb/xkb.h:167
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_led_class_spec_iterator_t); -- /usr/include/xcb/xkb.h:164
subtype xcb_xkb_bell_class_result_t is unsigned;
XCB_XKB_BELL_CLASS_RESULT_KBD_FEEDBACK_CLASS : constant xcb_xkb_bell_class_result_t :=
0;
XCB_XKB_BELL_CLASS_RESULT_BELL_FEEDBACK_CLASS : constant xcb_xkb_bell_class_result_t :=
5; -- /usr/include/xcb/xkb.h:170
subtype xcb_xkb_bell_class_t is unsigned;
XCB_XKB_BELL_CLASS_KBD_FEEDBACK_CLASS : constant xcb_xkb_bell_class_t := 0;
XCB_XKB_BELL_CLASS_BELL_FEEDBACK_CLASS : constant xcb_xkb_bell_class_t := 5;
XCB_XKB_BELL_CLASS_DFLT_XI_CLASS : constant xcb_xkb_bell_class_t :=
768; -- /usr/include/xcb/xkb.h:175
subtype xcb_xkb_bell_class_spec_t is
Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:181
type xcb_xkb_bell_class_spec_iterator_t is record
data : access xcb_xkb_bell_class_spec_t; -- /usr/include/xcb/xkb.h:187
c_rem : aliased int; -- /usr/include/xcb/xkb.h:188
index : aliased int; -- /usr/include/xcb/xkb.h:189
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_bell_class_spec_iterator_t); -- /usr/include/xcb/xkb.h:186
subtype xcb_xkb_id_t is unsigned;
XCB_XKB_ID_USE_CORE_KBD : constant xcb_xkb_id_t := 256;
XCB_XKB_ID_USE_CORE_PTR : constant xcb_xkb_id_t := 512;
XCB_XKB_ID_DFLT_XI_CLASS : constant xcb_xkb_id_t := 768;
XCB_XKB_ID_DFLT_XI_ID : constant xcb_xkb_id_t := 1024;
XCB_XKB_ID_ALL_XI_CLASS : constant xcb_xkb_id_t := 1280;
XCB_XKB_ID_ALL_XI_ID : constant xcb_xkb_id_t := 1536;
XCB_XKB_ID_XI_NONE : constant xcb_xkb_id_t :=
65280; -- /usr/include/xcb/xkb.h:192
subtype xcb_xkb_id_spec_t is
Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:202
type xcb_xkb_id_spec_iterator_t is record
data : access xcb_xkb_id_spec_t; -- /usr/include/xcb/xkb.h:208
c_rem : aliased int; -- /usr/include/xcb/xkb.h:209
index : aliased int; -- /usr/include/xcb/xkb.h:210
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_id_spec_iterator_t); -- /usr/include/xcb/xkb.h:207
type xcb_xkb_group_t is
(XCB_XKB_GROUP_1, XCB_XKB_GROUP_2, XCB_XKB_GROUP_3, XCB_XKB_GROUP_4);
pragma Convention (C, xcb_xkb_group_t); -- /usr/include/xcb/xkb.h:213
subtype xcb_xkb_groups_t is unsigned;
XCB_XKB_GROUPS_ANY : constant xcb_xkb_groups_t := 254;
XCB_XKB_GROUPS_ALL : constant xcb_xkb_groups_t :=
255; -- /usr/include/xcb/xkb.h:220
subtype xcb_xkb_set_of_group_t is unsigned;
XCB_XKB_SET_OF_GROUP_GROUP_1 : constant xcb_xkb_set_of_group_t := 1;
XCB_XKB_SET_OF_GROUP_GROUP_2 : constant xcb_xkb_set_of_group_t := 2;
XCB_XKB_SET_OF_GROUP_GROUP_3 : constant xcb_xkb_set_of_group_t := 4;
XCB_XKB_SET_OF_GROUP_GROUP_4 : constant xcb_xkb_set_of_group_t :=
8; -- /usr/include/xcb/xkb.h:225
subtype xcb_xkb_set_of_groups_t is unsigned;
XCB_XKB_SET_OF_GROUPS_ANY : constant xcb_xkb_set_of_groups_t :=
128; -- /usr/include/xcb/xkb.h:232
subtype xcb_xkb_groups_wrap_t is unsigned;
XCB_XKB_GROUPS_WRAP_WRAP_INTO_RANGE : constant xcb_xkb_groups_wrap_t := 0;
XCB_XKB_GROUPS_WRAP_CLAMP_INTO_RANGE : constant xcb_xkb_groups_wrap_t := 64;
XCB_XKB_GROUPS_WRAP_REDIRECT_INTO_RANGE : constant xcb_xkb_groups_wrap_t :=
128; -- /usr/include/xcb/xkb.h:236
subtype xcb_xkb_v_mods_high_t is unsigned;
XCB_XKB_V_MODS_HIGH_15 : constant xcb_xkb_v_mods_high_t := 128;
XCB_XKB_V_MODS_HIGH_14 : constant xcb_xkb_v_mods_high_t := 64;
XCB_XKB_V_MODS_HIGH_13 : constant xcb_xkb_v_mods_high_t := 32;
XCB_XKB_V_MODS_HIGH_12 : constant xcb_xkb_v_mods_high_t := 16;
XCB_XKB_V_MODS_HIGH_11 : constant xcb_xkb_v_mods_high_t := 8;
XCB_XKB_V_MODS_HIGH_10 : constant xcb_xkb_v_mods_high_t := 4;
XCB_XKB_V_MODS_HIGH_9 : constant xcb_xkb_v_mods_high_t := 2;
XCB_XKB_V_MODS_HIGH_8 : constant xcb_xkb_v_mods_high_t :=
1; -- /usr/include/xcb/xkb.h:242
subtype xcb_xkb_v_mods_low_t is unsigned;
XCB_XKB_V_MODS_LOW_7 : constant xcb_xkb_v_mods_low_t := 128;
XCB_XKB_V_MODS_LOW_6 : constant xcb_xkb_v_mods_low_t := 64;
XCB_XKB_V_MODS_LOW_5 : constant xcb_xkb_v_mods_low_t := 32;
XCB_XKB_V_MODS_LOW_4 : constant xcb_xkb_v_mods_low_t := 16;
XCB_XKB_V_MODS_LOW_3 : constant xcb_xkb_v_mods_low_t := 8;
XCB_XKB_V_MODS_LOW_2 : constant xcb_xkb_v_mods_low_t := 4;
XCB_XKB_V_MODS_LOW_1 : constant xcb_xkb_v_mods_low_t := 2;
XCB_XKB_V_MODS_LOW_0 : constant xcb_xkb_v_mods_low_t :=
1; -- /usr/include/xcb/xkb.h:253
subtype xcb_xkb_v_mod_t is unsigned;
XCB_XKB_V_MOD_15 : constant xcb_xkb_v_mod_t := 32768;
XCB_XKB_V_MOD_14 : constant xcb_xkb_v_mod_t := 16384;
XCB_XKB_V_MOD_13 : constant xcb_xkb_v_mod_t := 8192;
XCB_XKB_V_MOD_12 : constant xcb_xkb_v_mod_t := 4096;
XCB_XKB_V_MOD_11 : constant xcb_xkb_v_mod_t := 2048;
XCB_XKB_V_MOD_10 : constant xcb_xkb_v_mod_t := 1024;
XCB_XKB_V_MOD_9 : constant xcb_xkb_v_mod_t := 512;
XCB_XKB_V_MOD_8 : constant xcb_xkb_v_mod_t := 256;
XCB_XKB_V_MOD_7 : constant xcb_xkb_v_mod_t := 128;
XCB_XKB_V_MOD_6 : constant xcb_xkb_v_mod_t := 64;
XCB_XKB_V_MOD_5 : constant xcb_xkb_v_mod_t := 32;
XCB_XKB_V_MOD_4 : constant xcb_xkb_v_mod_t := 16;
XCB_XKB_V_MOD_3 : constant xcb_xkb_v_mod_t := 8;
XCB_XKB_V_MOD_2 : constant xcb_xkb_v_mod_t := 4;
XCB_XKB_V_MOD_1 : constant xcb_xkb_v_mod_t := 2;
XCB_XKB_V_MOD_0 : constant xcb_xkb_v_mod_t :=
1; -- /usr/include/xcb/xkb.h:264
subtype xcb_xkb_explicit_t is unsigned;
XCB_XKB_EXPLICIT_V_MOD_MAP : constant xcb_xkb_explicit_t := 128;
XCB_XKB_EXPLICIT_BEHAVIOR : constant xcb_xkb_explicit_t := 64;
XCB_XKB_EXPLICIT_AUTO_REPEAT : constant xcb_xkb_explicit_t := 32;
XCB_XKB_EXPLICIT_INTERPRET : constant xcb_xkb_explicit_t := 16;
XCB_XKB_EXPLICIT_KEY_TYPE_4 : constant xcb_xkb_explicit_t := 8;
XCB_XKB_EXPLICIT_KEY_TYPE_3 : constant xcb_xkb_explicit_t := 4;
XCB_XKB_EXPLICIT_KEY_TYPE_2 : constant xcb_xkb_explicit_t := 2;
XCB_XKB_EXPLICIT_KEY_TYPE_1 : constant xcb_xkb_explicit_t :=
1; -- /usr/include/xcb/xkb.h:283
type xcb_xkb_sym_interpret_match_t is
(XCB_XKB_SYM_INTERPRET_MATCH_NONE_OF,
XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF_OR_NONE,
XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF,
XCB_XKB_SYM_INTERPRET_MATCH_ALL_OF,
XCB_XKB_SYM_INTERPRET_MATCH_EXACTLY);
pragma Convention
(C,
xcb_xkb_sym_interpret_match_t); -- /usr/include/xcb/xkb.h:294
subtype xcb_xkb_sym_interp_match_t is unsigned;
XCB_XKB_SYM_INTERP_MATCH_LEVEL_ONE_ONLY : constant xcb_xkb_sym_interp_match_t :=
128;
XCB_XKB_SYM_INTERP_MATCH_OP_MASK : constant xcb_xkb_sym_interp_match_t :=
127; -- /usr/include/xcb/xkb.h:302
subtype xcb_xkb_im_flag_t is unsigned;
XCB_XKB_IM_FLAG_NO_EXPLICIT : constant xcb_xkb_im_flag_t := 128;
XCB_XKB_IM_FLAG_NO_AUTOMATIC : constant xcb_xkb_im_flag_t := 64;
XCB_XKB_IM_FLAG_LED_DRIVES_KB : constant xcb_xkb_im_flag_t :=
32; -- /usr/include/xcb/xkb.h:307
subtype xcb_xkb_im_mods_which_t is unsigned;
XCB_XKB_IM_MODS_WHICH_USE_COMPAT : constant xcb_xkb_im_mods_which_t := 16;
XCB_XKB_IM_MODS_WHICH_USE_EFFECTIVE : constant xcb_xkb_im_mods_which_t := 8;
XCB_XKB_IM_MODS_WHICH_USE_LOCKED : constant xcb_xkb_im_mods_which_t := 4;
XCB_XKB_IM_MODS_WHICH_USE_LATCHED : constant xcb_xkb_im_mods_which_t := 2;
XCB_XKB_IM_MODS_WHICH_USE_BASE : constant xcb_xkb_im_mods_which_t :=
1; -- /usr/include/xcb/xkb.h:313
subtype xcb_xkb_im_groups_which_t is unsigned;
XCB_XKB_IM_GROUPS_WHICH_USE_COMPAT : constant xcb_xkb_im_groups_which_t :=
16;
XCB_XKB_IM_GROUPS_WHICH_USE_EFFECTIVE : constant xcb_xkb_im_groups_which_t :=
8;
XCB_XKB_IM_GROUPS_WHICH_USE_LOCKED : constant xcb_xkb_im_groups_which_t :=
4;
XCB_XKB_IM_GROUPS_WHICH_USE_LATCHED : constant xcb_xkb_im_groups_which_t :=
2;
XCB_XKB_IM_GROUPS_WHICH_USE_BASE : constant xcb_xkb_im_groups_which_t :=
1; -- /usr/include/xcb/xkb.h:321
type xcb_xkb_indicator_map_t is record
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:333
whichGroups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:334
groups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:335
whichMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:336
mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:337
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:338
vmods : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:339
ctrls : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:340
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_indicator_map_t); -- /usr/include/xcb/xkb.h:332
type xcb_xkb_indicator_map_iterator_t is record
data : access xcb_xkb_indicator_map_t; -- /usr/include/xcb/xkb.h:347
c_rem : aliased int; -- /usr/include/xcb/xkb.h:348
index : aliased int; -- /usr/include/xcb/xkb.h:349
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_indicator_map_iterator_t); -- /usr/include/xcb/xkb.h:346
subtype xcb_xkb_cm_detail_t is unsigned;
XCB_XKB_CM_DETAIL_SYM_INTERP : constant xcb_xkb_cm_detail_t := 1;
XCB_XKB_CM_DETAIL_GROUP_COMPAT : constant xcb_xkb_cm_detail_t :=
2; -- /usr/include/xcb/xkb.h:352
subtype xcb_xkb_name_detail_t is unsigned;
XCB_XKB_NAME_DETAIL_KEYCODES : constant xcb_xkb_name_detail_t := 1;
XCB_XKB_NAME_DETAIL_GEOMETRY : constant xcb_xkb_name_detail_t := 2;
XCB_XKB_NAME_DETAIL_SYMBOLS : constant xcb_xkb_name_detail_t := 4;
XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS : constant xcb_xkb_name_detail_t := 8;
XCB_XKB_NAME_DETAIL_TYPES : constant xcb_xkb_name_detail_t := 16;
XCB_XKB_NAME_DETAIL_COMPAT : constant xcb_xkb_name_detail_t := 32;
XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES : constant xcb_xkb_name_detail_t := 64;
XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES : constant xcb_xkb_name_detail_t := 128;
XCB_XKB_NAME_DETAIL_INDICATOR_NAMES : constant xcb_xkb_name_detail_t := 256;
XCB_XKB_NAME_DETAIL_KEY_NAMES : constant xcb_xkb_name_detail_t := 512;
XCB_XKB_NAME_DETAIL_KEY_ALIASES : constant xcb_xkb_name_detail_t := 1024;
XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES : constant xcb_xkb_name_detail_t :=
2048;
XCB_XKB_NAME_DETAIL_GROUP_NAMES : constant xcb_xkb_name_detail_t := 4096;
XCB_XKB_NAME_DETAIL_RG_NAMES : constant xcb_xkb_name_detail_t :=
8192; -- /usr/include/xcb/xkb.h:357
subtype xcb_xkb_gbn_detail_t is unsigned;
XCB_XKB_GBN_DETAIL_TYPES : constant xcb_xkb_gbn_detail_t := 1;
XCB_XKB_GBN_DETAIL_COMPAT_MAP : constant xcb_xkb_gbn_detail_t := 2;
XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS : constant xcb_xkb_gbn_detail_t := 4;
XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS : constant xcb_xkb_gbn_detail_t := 8;
XCB_XKB_GBN_DETAIL_INDICATOR_MAPS : constant xcb_xkb_gbn_detail_t := 16;
XCB_XKB_GBN_DETAIL_KEY_NAMES : constant xcb_xkb_gbn_detail_t := 32;
XCB_XKB_GBN_DETAIL_GEOMETRY : constant xcb_xkb_gbn_detail_t := 64;
XCB_XKB_GBN_DETAIL_OTHER_NAMES : constant xcb_xkb_gbn_detail_t :=
128; -- /usr/include/xcb/xkb.h:374
subtype xcb_xkb_xi_feature_t is unsigned;
XCB_XKB_XI_FEATURE_KEYBOARDS : constant xcb_xkb_xi_feature_t := 1;
XCB_XKB_XI_FEATURE_BUTTON_ACTIONS : constant xcb_xkb_xi_feature_t := 2;
XCB_XKB_XI_FEATURE_INDICATOR_NAMES : constant xcb_xkb_xi_feature_t := 4;
XCB_XKB_XI_FEATURE_INDICATOR_MAPS : constant xcb_xkb_xi_feature_t := 8;
XCB_XKB_XI_FEATURE_INDICATOR_STATE : constant xcb_xkb_xi_feature_t :=
16; -- /usr/include/xcb/xkb.h:385
subtype xcb_xkb_per_client_flag_t is unsigned;
XCB_XKB_PER_CLIENT_FLAG_DETECTABLE_AUTO_REPEAT : constant xcb_xkb_per_client_flag_t :=
1;
XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE : constant xcb_xkb_per_client_flag_t :=
2;
XCB_XKB_PER_CLIENT_FLAG_AUTO_RESET_CONTROLS : constant xcb_xkb_per_client_flag_t :=
4;
XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED : constant xcb_xkb_per_client_flag_t :=
8;
XCB_XKB_PER_CLIENT_FLAG_SEND_EVENT_USES_XKB_STATE : constant xcb_xkb_per_client_flag_t :=
16; -- /usr/include/xcb/xkb.h:393
type xcb_xkb_mod_def_t is record
mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:405
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:406
vmods : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:407
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_mod_def_t); -- /usr/include/xcb/xkb.h:404
type xcb_xkb_mod_def_iterator_t is record
data : access xcb_xkb_mod_def_t; -- /usr/include/xcb/xkb.h:414
c_rem : aliased int; -- /usr/include/xcb/xkb.h:415
index : aliased int; -- /usr/include/xcb/xkb.h:416
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_mod_def_iterator_t); -- /usr/include/xcb/xkb.h:413
subtype xcb_xkb_key_name_t_name_array is Interfaces.C.char_array (0 .. 3);
type xcb_xkb_key_name_t is record
name : aliased xcb_xkb_key_name_t_name_array; -- /usr/include/xcb/xkb.h:423
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_name_t); -- /usr/include/xcb/xkb.h:422
type xcb_xkb_key_name_iterator_t is record
data : access xcb_xkb_key_name_t; -- /usr/include/xcb/xkb.h:430
c_rem : aliased int; -- /usr/include/xcb/xkb.h:431
index : aliased int; -- /usr/include/xcb/xkb.h:432
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_name_iterator_t); -- /usr/include/xcb/xkb.h:429
subtype xcb_xkb_key_alias_t_real_array is Interfaces.C.char_array (0 .. 3);
subtype xcb_xkb_key_alias_t_alias_array is Interfaces.C.char_array (0 .. 3);
type xcb_xkb_key_alias_t is record
real : aliased xcb_xkb_key_alias_t_real_array; -- /usr/include/xcb/xkb.h:439
alias : aliased xcb_xkb_key_alias_t_alias_array; -- /usr/include/xcb/xkb.h:440
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_alias_t); -- /usr/include/xcb/xkb.h:438
type xcb_xkb_key_alias_iterator_t is record
data : access xcb_xkb_key_alias_t; -- /usr/include/xcb/xkb.h:447
c_rem : aliased int; -- /usr/include/xcb/xkb.h:448
index : aliased int; -- /usr/include/xcb/xkb.h:449
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_alias_iterator_t); -- /usr/include/xcb/xkb.h:446
type xcb_xkb_counted_string_16_t is record
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:456
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_counted_string_16_t); -- /usr/include/xcb/xkb.h:455
type xcb_xkb_counted_string_16_iterator_t is record
data : access xcb_xkb_counted_string_16_t; -- /usr/include/xcb/xkb.h:463
c_rem : aliased int; -- /usr/include/xcb/xkb.h:464
index : aliased int; -- /usr/include/xcb/xkb.h:465
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_counted_string_16_iterator_t); -- /usr/include/xcb/xkb.h:462
type xcb_xkb_kt_map_entry_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_kt_map_entry_t is record
active : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:472
mods_mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:473
level : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:474
mods_mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:475
mods_vmods : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:476
pad0 : aliased xcb_xkb_kt_map_entry_t_pad0_array; -- /usr/include/xcb/xkb.h:477
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_kt_map_entry_t); -- /usr/include/xcb/xkb.h:471
type xcb_xkb_kt_map_entry_iterator_t is record
data : access xcb_xkb_kt_map_entry_t; -- /usr/include/xcb/xkb.h:484
c_rem : aliased int; -- /usr/include/xcb/xkb.h:485
index : aliased int; -- /usr/include/xcb/xkb.h:486
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_kt_map_entry_iterator_t); -- /usr/include/xcb/xkb.h:483
type xcb_xkb_key_type_t is record
mods_mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:493
mods_mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:494
mods_vmods : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:495
numLevels : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:496
nMapEntries : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:497
hasPreserve : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:498
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:499
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_type_t); -- /usr/include/xcb/xkb.h:492
type xcb_xkb_key_type_iterator_t is record
data : access xcb_xkb_key_type_t; -- /usr/include/xcb/xkb.h:506
c_rem : aliased int; -- /usr/include/xcb/xkb.h:507
index : aliased int; -- /usr/include/xcb/xkb.h:508
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_type_iterator_t); -- /usr/include/xcb/xkb.h:505
type xcb_xkb_key_sym_map_t_kt_index_array is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_key_sym_map_t is record
kt_index : aliased xcb_xkb_key_sym_map_t_kt_index_array; -- /usr/include/xcb/xkb.h:515
groupInfo : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:516
width : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:517
nSyms : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:518
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_sym_map_t); -- /usr/include/xcb/xkb.h:514
type xcb_xkb_key_sym_map_iterator_t is record
data : access xcb_xkb_key_sym_map_t; -- /usr/include/xcb/xkb.h:525
c_rem : aliased int; -- /usr/include/xcb/xkb.h:526
index : aliased int; -- /usr/include/xcb/xkb.h:527
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_sym_map_iterator_t); -- /usr/include/xcb/xkb.h:524
type xcb_xkb_common_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:534
data : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:535
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_common_behavior_t); -- /usr/include/xcb/xkb.h:533
type xcb_xkb_common_behavior_iterator_t is record
data : access xcb_xkb_common_behavior_t; -- /usr/include/xcb/xkb.h:542
c_rem : aliased int; -- /usr/include/xcb/xkb.h:543
index : aliased int; -- /usr/include/xcb/xkb.h:544
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_common_behavior_iterator_t); -- /usr/include/xcb/xkb.h:541
type xcb_xkb_default_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:551
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:552
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_default_behavior_t); -- /usr/include/xcb/xkb.h:550
type xcb_xkb_default_behavior_iterator_t is record
data : access xcb_xkb_default_behavior_t; -- /usr/include/xcb/xkb.h:559
c_rem : aliased int; -- /usr/include/xcb/xkb.h:560
index : aliased int; -- /usr/include/xcb/xkb.h:561
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_default_behavior_iterator_t); -- /usr/include/xcb/xkb.h:558
type xcb_xkb_lock_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:568
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:569
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_lock_behavior_t); -- /usr/include/xcb/xkb.h:567
type xcb_xkb_lock_behavior_iterator_t is record
data : access xcb_xkb_lock_behavior_t; -- /usr/include/xcb/xkb.h:576
c_rem : aliased int; -- /usr/include/xcb/xkb.h:577
index : aliased int; -- /usr/include/xcb/xkb.h:578
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_lock_behavior_iterator_t); -- /usr/include/xcb/xkb.h:575
type xcb_xkb_radio_group_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:585
group : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:586
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_radio_group_behavior_t); -- /usr/include/xcb/xkb.h:584
type xcb_xkb_radio_group_behavior_iterator_t is record
data : access xcb_xkb_radio_group_behavior_t; -- /usr/include/xcb/xkb.h:593
c_rem : aliased int; -- /usr/include/xcb/xkb.h:594
index : aliased int; -- /usr/include/xcb/xkb.h:595
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_radio_group_behavior_iterator_t); -- /usr/include/xcb/xkb.h:592
type xcb_xkb_overlay_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:602
key : aliased XCB.XProto.xcb_keycode_t; -- /usr/include/xcb/xkb.h:603
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_behavior_t); -- /usr/include/xcb/xkb.h:601
type xcb_xkb_overlay_behavior_iterator_t is record
data : access xcb_xkb_overlay_behavior_t; -- /usr/include/xcb/xkb.h:610
c_rem : aliased int; -- /usr/include/xcb/xkb.h:611
index : aliased int; -- /usr/include/xcb/xkb.h:612
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_behavior_iterator_t); -- /usr/include/xcb/xkb.h:609
type xcb_xkb_permament_lock_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:619
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:620
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_permament_lock_behavior_t); -- /usr/include/xcb/xkb.h:618
type xcb_xkb_permament_lock_behavior_iterator_t is record
data : access xcb_xkb_permament_lock_behavior_t; -- /usr/include/xcb/xkb.h:627
c_rem : aliased int; -- /usr/include/xcb/xkb.h:628
index : aliased int; -- /usr/include/xcb/xkb.h:629
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_permament_lock_behavior_iterator_t); -- /usr/include/xcb/xkb.h:626
type xcb_xkb_permament_radio_group_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:636
group : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:637
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_permament_radio_group_behavior_t); -- /usr/include/xcb/xkb.h:635
type xcb_xkb_permament_radio_group_behavior_iterator_t is record
data : access xcb_xkb_permament_radio_group_behavior_t; -- /usr/include/xcb/xkb.h:644
c_rem : aliased int; -- /usr/include/xcb/xkb.h:645
index : aliased int; -- /usr/include/xcb/xkb.h:646
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_permament_radio_group_behavior_iterator_t); -- /usr/include/xcb/xkb.h:643
type xcb_xkb_permament_overlay_behavior_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:653
key : aliased XCB.XProto.xcb_keycode_t; -- /usr/include/xcb/xkb.h:654
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_permament_overlay_behavior_t); -- /usr/include/xcb/xkb.h:652
type xcb_xkb_permament_overlay_behavior_iterator_t is record
data : access xcb_xkb_permament_overlay_behavior_t; -- /usr/include/xcb/xkb.h:661
c_rem : aliased int; -- /usr/include/xcb/xkb.h:662
index : aliased int; -- /usr/include/xcb/xkb.h:663
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_permament_overlay_behavior_iterator_t); -- /usr/include/xcb/xkb.h:660
type xcb_xkb_behavior_t (discr : unsigned := 0) is record
case discr is
when 0 =>
common : aliased xcb_xkb_common_behavior_t; -- /usr/include/xcb/xkb.h:670
when 1 =>
u_default : aliased xcb_xkb_default_behavior_t; -- /usr/include/xcb/xkb.h:671
when 2 =>
lock : aliased xcb_xkb_lock_behavior_t; -- /usr/include/xcb/xkb.h:672
when 3 =>
radioGroup : aliased xcb_xkb_radio_group_behavior_t; -- /usr/include/xcb/xkb.h:673
when 4 =>
overlay1 : aliased xcb_xkb_overlay_behavior_t; -- /usr/include/xcb/xkb.h:674
when 5 =>
overlay2 : aliased xcb_xkb_overlay_behavior_t; -- /usr/include/xcb/xkb.h:675
when 6 =>
permamentLock : aliased xcb_xkb_permament_lock_behavior_t; -- /usr/include/xcb/xkb.h:676
when 7 =>
permamentRadioGroup : aliased xcb_xkb_permament_radio_group_behavior_t; -- /usr/include/xcb/xkb.h:677
when 8 =>
permamentOverlay1 : aliased xcb_xkb_permament_overlay_behavior_t; -- /usr/include/xcb/xkb.h:678
when 9 =>
permamentOverlay2 : aliased xcb_xkb_permament_overlay_behavior_t; -- /usr/include/xcb/xkb.h:679
when others =>
c_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:680
end case;
end record;
pragma Convention (C_Pass_By_Copy, xcb_xkb_behavior_t);
pragma Unchecked_Union (xcb_xkb_behavior_t); -- /usr/include/xcb/xkb.h:669
type xcb_xkb_behavior_iterator_t is record
data : access xcb_xkb_behavior_t; -- /usr/include/xcb/xkb.h:687
c_rem : aliased int; -- /usr/include/xcb/xkb.h:688
index : aliased int; -- /usr/include/xcb/xkb.h:689
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_behavior_iterator_t); -- /usr/include/xcb/xkb.h:686
subtype xcb_xkb_behavior_type_t is unsigned;
XCB_XKB_BEHAVIOR_TYPE_DEFAULT : constant xcb_xkb_behavior_type_t := 0;
XCB_XKB_BEHAVIOR_TYPE_LOCK : constant xcb_xkb_behavior_type_t := 1;
XCB_XKB_BEHAVIOR_TYPE_RADIO_GROUP : constant xcb_xkb_behavior_type_t := 2;
XCB_XKB_BEHAVIOR_TYPE_OVERLAY_1 : constant xcb_xkb_behavior_type_t := 3;
XCB_XKB_BEHAVIOR_TYPE_OVERLAY_2 : constant xcb_xkb_behavior_type_t := 4;
XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_LOCK : constant xcb_xkb_behavior_type_t :=
129;
XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_RADIO_GROUP : constant xcb_xkb_behavior_type_t :=
130;
XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_1 : constant xcb_xkb_behavior_type_t :=
131;
XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_2 : constant xcb_xkb_behavior_type_t :=
132; -- /usr/include/xcb/xkb.h:692
type xcb_xkb_set_behavior_t is record
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:708
behavior : xcb_xkb_behavior_t; -- /usr/include/xcb/xkb.h:709
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:710
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_behavior_t); -- /usr/include/xcb/xkb.h:707
type xcb_xkb_set_behavior_iterator_t is record
data : access xcb_xkb_set_behavior_t; -- /usr/include/xcb/xkb.h:717
c_rem : aliased int; -- /usr/include/xcb/xkb.h:718
index : aliased int; -- /usr/include/xcb/xkb.h:719
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_behavior_iterator_t); -- /usr/include/xcb/xkb.h:716
type xcb_xkb_set_explicit_t is record
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:726
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_explicit_t); -- /usr/include/xcb/xkb.h:725
type xcb_xkb_set_explicit_iterator_t is record
data : access xcb_xkb_set_explicit_t; -- /usr/include/xcb/xkb.h:734
c_rem : aliased int; -- /usr/include/xcb/xkb.h:735
index : aliased int; -- /usr/include/xcb/xkb.h:736
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_explicit_iterator_t); -- /usr/include/xcb/xkb.h:733
type xcb_xkb_key_mod_map_t is record
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:743
mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:744
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_mod_map_t); -- /usr/include/xcb/xkb.h:742
type xcb_xkb_key_mod_map_iterator_t is record
data : access xcb_xkb_key_mod_map_t; -- /usr/include/xcb/xkb.h:751
c_rem : aliased int; -- /usr/include/xcb/xkb.h:752
index : aliased int; -- /usr/include/xcb/xkb.h:753
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_mod_map_iterator_t); -- /usr/include/xcb/xkb.h:750
type xcb_xkb_key_v_mod_map_t is record
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:760
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:761
vmods : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:762
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_v_mod_map_t); -- /usr/include/xcb/xkb.h:759
type xcb_xkb_key_v_mod_map_iterator_t is record
data : access xcb_xkb_key_v_mod_map_t; -- /usr/include/xcb/xkb.h:769
c_rem : aliased int; -- /usr/include/xcb/xkb.h:770
index : aliased int; -- /usr/include/xcb/xkb.h:771
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_v_mod_map_iterator_t); -- /usr/include/xcb/xkb.h:768
type xcb_xkb_kt_set_map_entry_t is record
level : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:778
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:779
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:780
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_kt_set_map_entry_t); -- /usr/include/xcb/xkb.h:777
type xcb_xkb_kt_set_map_entry_iterator_t is record
data : access xcb_xkb_kt_set_map_entry_t; -- /usr/include/xcb/xkb.h:787
c_rem : aliased int; -- /usr/include/xcb/xkb.h:788
index : aliased int; -- /usr/include/xcb/xkb.h:789
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_kt_set_map_entry_iterator_t); -- /usr/include/xcb/xkb.h:786
type xcb_xkb_set_key_type_t is record
mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:796
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:797
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:798
numLevels : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:799
nMapEntries : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:800
preserve : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:801
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:802
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_key_type_t); -- /usr/include/xcb/xkb.h:795
type xcb_xkb_set_key_type_iterator_t is record
data : access xcb_xkb_set_key_type_t; -- /usr/include/xcb/xkb.h:809
c_rem : aliased int; -- /usr/include/xcb/xkb.h:810
index : aliased int; -- /usr/include/xcb/xkb.h:811
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_key_type_iterator_t); -- /usr/include/xcb/xkb.h:808
subtype xcb_xkb_string8_t is char; -- /usr/include/xcb/xkb.h:814
type xcb_xkb_string8_iterator_t is record
data : access xcb_xkb_string8_t; -- /usr/include/xcb/xkb.h:820
c_rem : aliased int; -- /usr/include/xcb/xkb.h:821
index : aliased int; -- /usr/include/xcb/xkb.h:822
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_string8_iterator_t); -- /usr/include/xcb/xkb.h:819
type xcb_xkb_outline_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_outline_t is record
nPoints : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:829
cornerRadius : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:830
pad0 : aliased xcb_xkb_outline_t_pad0_array; -- /usr/include/xcb/xkb.h:831
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_outline_t); -- /usr/include/xcb/xkb.h:828
type xcb_xkb_outline_iterator_t is record
data : access xcb_xkb_outline_t; -- /usr/include/xcb/xkb.h:838
c_rem : aliased int; -- /usr/include/xcb/xkb.h:839
index : aliased int; -- /usr/include/xcb/xkb.h:840
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_outline_iterator_t); -- /usr/include/xcb/xkb.h:837
type xcb_xkb_shape_t is record
name : aliased XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:847
nOutlines : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:848
primaryNdx : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:849
approxNdx : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:850
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:851
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_shape_t); -- /usr/include/xcb/xkb.h:846
type xcb_xkb_shape_iterator_t is record
data : access xcb_xkb_shape_t; -- /usr/include/xcb/xkb.h:858
c_rem : aliased int; -- /usr/include/xcb/xkb.h:859
index : aliased int; -- /usr/include/xcb/xkb.h:860
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_shape_iterator_t); -- /usr/include/xcb/xkb.h:857
type xcb_xkb_key_t_name_array is
array (0 .. 3) of aliased xcb_xkb_string8_t;
type xcb_xkb_key_t is record
name : aliased xcb_xkb_key_t_name_array; -- /usr/include/xcb/xkb.h:867
gap : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xkb.h:868
shapeNdx : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:869
colorNdx : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:870
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_t); -- /usr/include/xcb/xkb.h:866
type xcb_xkb_key_iterator_t is record
data : access xcb_xkb_key_t; -- /usr/include/xcb/xkb.h:877
c_rem : aliased int; -- /usr/include/xcb/xkb.h:878
index : aliased int; -- /usr/include/xcb/xkb.h:879
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_key_iterator_t); -- /usr/include/xcb/xkb.h:876
type xcb_xkb_overlay_key_t_over_array is
array (0 .. 3) of aliased xcb_xkb_string8_t;
type xcb_xkb_overlay_key_t_under_array is
array (0 .. 3) of aliased xcb_xkb_string8_t;
type xcb_xkb_overlay_key_t is record
over : aliased xcb_xkb_overlay_key_t_over_array; -- /usr/include/xcb/xkb.h:886
under : aliased xcb_xkb_overlay_key_t_under_array; -- /usr/include/xcb/xkb.h:887
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_key_t); -- /usr/include/xcb/xkb.h:885
type xcb_xkb_overlay_key_iterator_t is record
data : access xcb_xkb_overlay_key_t; -- /usr/include/xcb/xkb.h:894
c_rem : aliased int; -- /usr/include/xcb/xkb.h:895
index : aliased int; -- /usr/include/xcb/xkb.h:896
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_key_iterator_t); -- /usr/include/xcb/xkb.h:893
type xcb_xkb_overlay_row_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_overlay_row_t is record
rowUnder : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:903
nKeys : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:904
pad0 : aliased xcb_xkb_overlay_row_t_pad0_array; -- /usr/include/xcb/xkb.h:905
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_row_t); -- /usr/include/xcb/xkb.h:902
type xcb_xkb_overlay_row_iterator_t is record
data : access xcb_xkb_overlay_row_t; -- /usr/include/xcb/xkb.h:912
c_rem : aliased int; -- /usr/include/xcb/xkb.h:913
index : aliased int; -- /usr/include/xcb/xkb.h:914
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_row_iterator_t); -- /usr/include/xcb/xkb.h:911
type xcb_xkb_overlay_t_pad0_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_overlay_t is record
name : aliased XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:921
nRows : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:922
pad0 : aliased xcb_xkb_overlay_t_pad0_array; -- /usr/include/xcb/xkb.h:923
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_t); -- /usr/include/xcb/xkb.h:920
type xcb_xkb_overlay_iterator_t is record
data : access xcb_xkb_overlay_t; -- /usr/include/xcb/xkb.h:930
c_rem : aliased int; -- /usr/include/xcb/xkb.h:931
index : aliased int; -- /usr/include/xcb/xkb.h:932
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_overlay_iterator_t); -- /usr/include/xcb/xkb.h:929
type xcb_xkb_row_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_row_t is record
top : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xkb.h:939
left : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xkb.h:940
nKeys : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:941
vertical : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:942
pad0 : aliased xcb_xkb_row_t_pad0_array; -- /usr/include/xcb/xkb.h:943
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_row_t); -- /usr/include/xcb/xkb.h:938
type xcb_xkb_row_iterator_t is record
data : access xcb_xkb_row_t; -- /usr/include/xcb/xkb.h:950
c_rem : aliased int; -- /usr/include/xcb/xkb.h:951
index : aliased int; -- /usr/include/xcb/xkb.h:952
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_row_iterator_t); -- /usr/include/xcb/xkb.h:949
subtype xcb_xkb_doodad_type_t is unsigned;
XCB_XKB_DOODAD_TYPE_OUTLINE : constant xcb_xkb_doodad_type_t := 1;
XCB_XKB_DOODAD_TYPE_SOLID : constant xcb_xkb_doodad_type_t := 2;
XCB_XKB_DOODAD_TYPE_TEXT : constant xcb_xkb_doodad_type_t := 3;
XCB_XKB_DOODAD_TYPE_INDICATOR : constant xcb_xkb_doodad_type_t := 4;
XCB_XKB_DOODAD_TYPE_LOGO : constant xcb_xkb_doodad_type_t :=
5; -- /usr/include/xcb/xkb.h:955
type xcb_xkb_listing_t is record
flags : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:967
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:968
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_listing_t); -- /usr/include/xcb/xkb.h:966
type xcb_xkb_listing_iterator_t is record
data : access xcb_xkb_listing_t; -- /usr/include/xcb/xkb.h:975
c_rem : aliased int; -- /usr/include/xcb/xkb.h:976
index : aliased int; -- /usr/include/xcb/xkb.h:977
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_listing_iterator_t); -- /usr/include/xcb/xkb.h:974
type xcb_xkb_device_led_info_t is record
ledClass : aliased xcb_xkb_led_class_spec_t; -- /usr/include/xcb/xkb.h:984
ledID : aliased xcb_xkb_id_spec_t; -- /usr/include/xcb/xkb.h:985
namesPresent : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:986
mapsPresent : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:987
physIndicators : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:988
state : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:989
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_device_led_info_t); -- /usr/include/xcb/xkb.h:983
type xcb_xkb_device_led_info_iterator_t is record
data : access xcb_xkb_device_led_info_t; -- /usr/include/xcb/xkb.h:996
c_rem : aliased int; -- /usr/include/xcb/xkb.h:997
index : aliased int; -- /usr/include/xcb/xkb.h:998
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_device_led_info_iterator_t); -- /usr/include/xcb/xkb.h:995
subtype xcb_xkb_error_t is unsigned;
XCB_XKB_ERROR_BAD_DEVICE : constant xcb_xkb_error_t := 255;
XCB_XKB_ERROR_BAD_CLASS : constant xcb_xkb_error_t := 254;
XCB_XKB_ERROR_BAD_ID : constant xcb_xkb_error_t :=
253; -- /usr/include/xcb/xkb.h:1001
type xcb_xkb_keyboard_error_t_pad0_array is
array (0 .. 20) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_keyboard_error_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1014
error_code : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1015
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1016
value : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:1017
minorOpcode : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1018
majorOpcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1019
pad0 : aliased xcb_xkb_keyboard_error_t_pad0_array; -- /usr/include/xcb/xkb.h:1020
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_keyboard_error_t); -- /usr/include/xcb/xkb.h:1013
subtype xcb_xkb_sa_t is unsigned;
XCB_XKB_SA_CLEAR_LOCKS : constant xcb_xkb_sa_t := 1;
XCB_XKB_SA_LATCH_TO_LOCK : constant xcb_xkb_sa_t := 2;
XCB_XKB_SA_USE_MOD_MAP_MODS : constant xcb_xkb_sa_t := 4;
XCB_XKB_SA_GROUP_ABSOLUTE : constant xcb_xkb_sa_t :=
4; -- /usr/include/xcb/xkb.h:1023
type xcb_xkb_sa_type_t is
(XCB_XKB_SA_TYPE_NO_ACTION,
XCB_XKB_SA_TYPE_SET_MODS,
XCB_XKB_SA_TYPE_LATCH_MODS,
XCB_XKB_SA_TYPE_LOCK_MODS,
XCB_XKB_SA_TYPE_SET_GROUP,
XCB_XKB_SA_TYPE_LATCH_GROUP,
XCB_XKB_SA_TYPE_LOCK_GROUP,
XCB_XKB_SA_TYPE_MOVE_PTR,
XCB_XKB_SA_TYPE_PTR_BTN,
XCB_XKB_SA_TYPE_LOCK_PTR_BTN,
XCB_XKB_SA_TYPE_SET_PTR_DFLT,
XCB_XKB_SA_TYPE_ISO_LOCK,
XCB_XKB_SA_TYPE_TERMINATE,
XCB_XKB_SA_TYPE_SWITCH_SCREEN,
XCB_XKB_SA_TYPE_SET_CONTROLS,
XCB_XKB_SA_TYPE_LOCK_CONTROLS,
XCB_XKB_SA_TYPE_ACTION_MESSAGE,
XCB_XKB_SA_TYPE_REDIRECT_KEY,
XCB_XKB_SA_TYPE_DEVICE_BTN,
XCB_XKB_SA_TYPE_LOCK_DEVICE_BTN,
XCB_XKB_SA_TYPE_DEVICE_VALUATOR);
pragma Convention (C, xcb_xkb_sa_type_t); -- /usr/include/xcb/xkb.h:1030
type xcb_xkb_sa_no_action_t_pad0_array is
array (0 .. 6) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_no_action_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1058
pad0 : aliased xcb_xkb_sa_no_action_t_pad0_array; -- /usr/include/xcb/xkb.h:1059
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_no_action_t); -- /usr/include/xcb/xkb.h:1057
type xcb_xkb_sa_no_action_iterator_t is record
data : access xcb_xkb_sa_no_action_t; -- /usr/include/xcb/xkb.h:1066
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1067
index : aliased int; -- /usr/include/xcb/xkb.h:1068
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_no_action_iterator_t); -- /usr/include/xcb/xkb.h:1065
type xcb_xkb_sa_set_mods_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_set_mods_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1075
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1076
mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1077
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1078
vmodsHigh : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1079
vmodsLow : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1080
pad0 : aliased xcb_xkb_sa_set_mods_t_pad0_array; -- /usr/include/xcb/xkb.h:1081
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_mods_t); -- /usr/include/xcb/xkb.h:1074
type xcb_xkb_sa_set_mods_iterator_t is record
data : access xcb_xkb_sa_set_mods_t; -- /usr/include/xcb/xkb.h:1088
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1089
index : aliased int; -- /usr/include/xcb/xkb.h:1090
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_mods_iterator_t); -- /usr/include/xcb/xkb.h:1087
type xcb_xkb_sa_latch_mods_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_latch_mods_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1097
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1098
mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1099
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1100
vmodsHigh : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1101
vmodsLow : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1102
pad0 : aliased xcb_xkb_sa_latch_mods_t_pad0_array; -- /usr/include/xcb/xkb.h:1103
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_latch_mods_t); -- /usr/include/xcb/xkb.h:1096
type xcb_xkb_sa_latch_mods_iterator_t is record
data : access xcb_xkb_sa_latch_mods_t; -- /usr/include/xcb/xkb.h:1110
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1111
index : aliased int; -- /usr/include/xcb/xkb.h:1112
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_latch_mods_iterator_t); -- /usr/include/xcb/xkb.h:1109
type xcb_xkb_sa_lock_mods_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_lock_mods_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1119
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1120
mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1121
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1122
vmodsHigh : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1123
vmodsLow : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1124
pad0 : aliased xcb_xkb_sa_lock_mods_t_pad0_array; -- /usr/include/xcb/xkb.h:1125
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_mods_t); -- /usr/include/xcb/xkb.h:1118
type xcb_xkb_sa_lock_mods_iterator_t is record
data : access xcb_xkb_sa_lock_mods_t; -- /usr/include/xcb/xkb.h:1132
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1133
index : aliased int; -- /usr/include/xcb/xkb.h:1134
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_mods_iterator_t); -- /usr/include/xcb/xkb.h:1131
type xcb_xkb_sa_set_group_t_pad0_array is
array (0 .. 4) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_set_group_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1141
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1142
group : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1143
pad0 : aliased xcb_xkb_sa_set_group_t_pad0_array; -- /usr/include/xcb/xkb.h:1144
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_group_t); -- /usr/include/xcb/xkb.h:1140
type xcb_xkb_sa_set_group_iterator_t is record
data : access xcb_xkb_sa_set_group_t; -- /usr/include/xcb/xkb.h:1151
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1152
index : aliased int; -- /usr/include/xcb/xkb.h:1153
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_group_iterator_t); -- /usr/include/xcb/xkb.h:1150
type xcb_xkb_sa_latch_group_t_pad0_array is
array (0 .. 4) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_latch_group_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1160
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1161
group : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1162
pad0 : aliased xcb_xkb_sa_latch_group_t_pad0_array; -- /usr/include/xcb/xkb.h:1163
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_latch_group_t); -- /usr/include/xcb/xkb.h:1159
type xcb_xkb_sa_latch_group_iterator_t is record
data : access xcb_xkb_sa_latch_group_t; -- /usr/include/xcb/xkb.h:1170
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1171
index : aliased int; -- /usr/include/xcb/xkb.h:1172
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_latch_group_iterator_t); -- /usr/include/xcb/xkb.h:1169
type xcb_xkb_sa_lock_group_t_pad0_array is
array (0 .. 4) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_lock_group_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1179
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1180
group : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1181
pad0 : aliased xcb_xkb_sa_lock_group_t_pad0_array; -- /usr/include/xcb/xkb.h:1182
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_group_t); -- /usr/include/xcb/xkb.h:1178
type xcb_xkb_sa_lock_group_iterator_t is record
data : access xcb_xkb_sa_lock_group_t; -- /usr/include/xcb/xkb.h:1189
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1190
index : aliased int; -- /usr/include/xcb/xkb.h:1191
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_group_iterator_t); -- /usr/include/xcb/xkb.h:1188
subtype xcb_xkb_sa_move_ptr_flag_t is unsigned;
XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION : constant xcb_xkb_sa_move_ptr_flag_t :=
1;
XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_X : constant xcb_xkb_sa_move_ptr_flag_t :=
2;
XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_Y : constant xcb_xkb_sa_move_ptr_flag_t :=
4; -- /usr/include/xcb/xkb.h:1194
type xcb_xkb_sa_move_ptr_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_move_ptr_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1204
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1205
xHigh : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1206
xLow : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1207
yHigh : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1208
yLow : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1209
pad0 : aliased xcb_xkb_sa_move_ptr_t_pad0_array; -- /usr/include/xcb/xkb.h:1210
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_move_ptr_t); -- /usr/include/xcb/xkb.h:1203
type xcb_xkb_sa_move_ptr_iterator_t is record
data : access xcb_xkb_sa_move_ptr_t; -- /usr/include/xcb/xkb.h:1217
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1218
index : aliased int; -- /usr/include/xcb/xkb.h:1219
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_move_ptr_iterator_t); -- /usr/include/xcb/xkb.h:1216
type xcb_xkb_sa_ptr_btn_t_pad0_array is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_ptr_btn_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1226
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1227
count : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1228
button : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1229
pad0 : aliased xcb_xkb_sa_ptr_btn_t_pad0_array; -- /usr/include/xcb/xkb.h:1230
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_ptr_btn_t); -- /usr/include/xcb/xkb.h:1225
type xcb_xkb_sa_ptr_btn_iterator_t is record
data : access xcb_xkb_sa_ptr_btn_t; -- /usr/include/xcb/xkb.h:1237
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1238
index : aliased int; -- /usr/include/xcb/xkb.h:1239
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_ptr_btn_iterator_t); -- /usr/include/xcb/xkb.h:1236
type xcb_xkb_sa_lock_ptr_btn_t_pad1_array is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_lock_ptr_btn_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1246
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1247
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1248
button : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1249
pad1 : aliased xcb_xkb_sa_lock_ptr_btn_t_pad1_array; -- /usr/include/xcb/xkb.h:1250
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_ptr_btn_t); -- /usr/include/xcb/xkb.h:1245
type xcb_xkb_sa_lock_ptr_btn_iterator_t is record
data : access xcb_xkb_sa_lock_ptr_btn_t; -- /usr/include/xcb/xkb.h:1257
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1258
index : aliased int; -- /usr/include/xcb/xkb.h:1259
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_ptr_btn_iterator_t); -- /usr/include/xcb/xkb.h:1256
subtype xcb_xkb_sa_set_ptr_dflt_flag_t is unsigned;
XCB_XKB_SA_SET_PTR_DFLT_FLAG_DFLT_BTN_ABSOLUTE : constant xcb_xkb_sa_set_ptr_dflt_flag_t :=
4;
XCB_XKB_SA_SET_PTR_DFLT_FLAG_AFFECT_DFLT_BUTTON : constant xcb_xkb_sa_set_ptr_dflt_flag_t :=
1; -- /usr/include/xcb/xkb.h:1262
type xcb_xkb_sa_set_ptr_dflt_t_pad0_array is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_set_ptr_dflt_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1271
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1272
affect : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1273
value : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1274
pad0 : aliased xcb_xkb_sa_set_ptr_dflt_t_pad0_array; -- /usr/include/xcb/xkb.h:1275
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_ptr_dflt_t); -- /usr/include/xcb/xkb.h:1270
type xcb_xkb_sa_set_ptr_dflt_iterator_t is record
data : access xcb_xkb_sa_set_ptr_dflt_t; -- /usr/include/xcb/xkb.h:1282
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1283
index : aliased int; -- /usr/include/xcb/xkb.h:1284
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_ptr_dflt_iterator_t); -- /usr/include/xcb/xkb.h:1281
subtype xcb_xkb_sa_iso_lock_flag_t is unsigned;
XCB_XKB_SA_ISO_LOCK_FLAG_NO_LOCK : constant xcb_xkb_sa_iso_lock_flag_t := 1;
XCB_XKB_SA_ISO_LOCK_FLAG_NO_UNLOCK : constant xcb_xkb_sa_iso_lock_flag_t :=
2;
XCB_XKB_SA_ISO_LOCK_FLAG_USE_MOD_MAP_MODS : constant xcb_xkb_sa_iso_lock_flag_t :=
4;
XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE : constant xcb_xkb_sa_iso_lock_flag_t :=
4;
XCB_XKB_SA_ISO_LOCK_FLAG_ISO_DFLT_IS_GROUP : constant xcb_xkb_sa_iso_lock_flag_t :=
8; -- /usr/include/xcb/xkb.h:1287
subtype xcb_xkb_sa_iso_lock_no_affect_t is unsigned;
XCB_XKB_SA_ISO_LOCK_NO_AFFECT_CTRLS : constant xcb_xkb_sa_iso_lock_no_affect_t :=
8;
XCB_XKB_SA_ISO_LOCK_NO_AFFECT_PTR : constant xcb_xkb_sa_iso_lock_no_affect_t :=
16;
XCB_XKB_SA_ISO_LOCK_NO_AFFECT_GROUP : constant xcb_xkb_sa_iso_lock_no_affect_t :=
32;
XCB_XKB_SA_ISO_LOCK_NO_AFFECT_MODS : constant xcb_xkb_sa_iso_lock_no_affect_t :=
64; -- /usr/include/xcb/xkb.h:1295
type xcb_xkb_sa_iso_lock_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1306
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1307
mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1308
realMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1309
group : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1310
affect : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1311
vmodsHigh : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1312
vmodsLow : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1313
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_iso_lock_t); -- /usr/include/xcb/xkb.h:1305
type xcb_xkb_sa_iso_lock_iterator_t is record
data : access xcb_xkb_sa_iso_lock_t; -- /usr/include/xcb/xkb.h:1320
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1321
index : aliased int; -- /usr/include/xcb/xkb.h:1322
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_iso_lock_iterator_t); -- /usr/include/xcb/xkb.h:1319
type xcb_xkb_sa_terminate_t_pad0_array is
array (0 .. 6) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_terminate_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1329
pad0 : aliased xcb_xkb_sa_terminate_t_pad0_array; -- /usr/include/xcb/xkb.h:1330
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_terminate_t); -- /usr/include/xcb/xkb.h:1328
type xcb_xkb_sa_terminate_iterator_t is record
data : access xcb_xkb_sa_terminate_t; -- /usr/include/xcb/xkb.h:1337
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1338
index : aliased int; -- /usr/include/xcb/xkb.h:1339
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_terminate_iterator_t); -- /usr/include/xcb/xkb.h:1336
subtype xcb_xkb_switch_screen_flag_t is unsigned;
XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION : constant xcb_xkb_switch_screen_flag_t :=
1;
XCB_XKB_SWITCH_SCREEN_FLAG_ABSOLUTE : constant xcb_xkb_switch_screen_flag_t :=
4; -- /usr/include/xcb/xkb.h:1342
type xcb_xkb_sa_switch_screen_t_pad0_array is
array (0 .. 4) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_switch_screen_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1351
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1352
newScreen : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1353
pad0 : aliased xcb_xkb_sa_switch_screen_t_pad0_array; -- /usr/include/xcb/xkb.h:1354
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_switch_screen_t); -- /usr/include/xcb/xkb.h:1350
type xcb_xkb_sa_switch_screen_iterator_t is record
data : access xcb_xkb_sa_switch_screen_t; -- /usr/include/xcb/xkb.h:1361
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1362
index : aliased int; -- /usr/include/xcb/xkb.h:1363
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_switch_screen_iterator_t); -- /usr/include/xcb/xkb.h:1360
subtype xcb_xkb_bool_ctrls_high_t is unsigned;
XCB_XKB_BOOL_CTRLS_HIGH_ACCESS_X_FEEDBACK : constant xcb_xkb_bool_ctrls_high_t :=
1;
XCB_XKB_BOOL_CTRLS_HIGH_AUDIBLE_BELL : constant xcb_xkb_bool_ctrls_high_t :=
2;
XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_1 : constant xcb_xkb_bool_ctrls_high_t := 4;
XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_2 : constant xcb_xkb_bool_ctrls_high_t := 8;
XCB_XKB_BOOL_CTRLS_HIGH_IGNORE_GROUP_LOCK : constant xcb_xkb_bool_ctrls_high_t :=
16; -- /usr/include/xcb/xkb.h:1366
subtype xcb_xkb_bool_ctrls_low_t is unsigned;
XCB_XKB_BOOL_CTRLS_LOW_REPEAT_KEYS : constant xcb_xkb_bool_ctrls_low_t := 1;
XCB_XKB_BOOL_CTRLS_LOW_SLOW_KEYS : constant xcb_xkb_bool_ctrls_low_t := 2;
XCB_XKB_BOOL_CTRLS_LOW_BOUNCE_KEYS : constant xcb_xkb_bool_ctrls_low_t := 4;
XCB_XKB_BOOL_CTRLS_LOW_STICKY_KEYS : constant xcb_xkb_bool_ctrls_low_t := 8;
XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS : constant xcb_xkb_bool_ctrls_low_t := 16;
XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS_ACCEL : constant xcb_xkb_bool_ctrls_low_t :=
32;
XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_KEYS : constant xcb_xkb_bool_ctrls_low_t :=
64;
XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_TIMEOUT : constant xcb_xkb_bool_ctrls_low_t :=
128; -- /usr/include/xcb/xkb.h:1374
type xcb_xkb_sa_set_controls_t_pad0_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_set_controls_t_pad1_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_set_controls_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1389
pad0 : aliased xcb_xkb_sa_set_controls_t_pad0_array; -- /usr/include/xcb/xkb.h:1390
boolCtrlsHigh : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1391
boolCtrlsLow : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1392
pad1 : aliased xcb_xkb_sa_set_controls_t_pad1_array; -- /usr/include/xcb/xkb.h:1393
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_controls_t); -- /usr/include/xcb/xkb.h:1388
type xcb_xkb_sa_set_controls_iterator_t is record
data : access xcb_xkb_sa_set_controls_t; -- /usr/include/xcb/xkb.h:1400
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1401
index : aliased int; -- /usr/include/xcb/xkb.h:1402
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_set_controls_iterator_t); -- /usr/include/xcb/xkb.h:1399
type xcb_xkb_sa_lock_controls_t_pad0_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_lock_controls_t_pad1_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_lock_controls_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1409
pad0 : aliased xcb_xkb_sa_lock_controls_t_pad0_array; -- /usr/include/xcb/xkb.h:1410
boolCtrlsHigh : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1411
boolCtrlsLow : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1412
pad1 : aliased xcb_xkb_sa_lock_controls_t_pad1_array; -- /usr/include/xcb/xkb.h:1413
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_controls_t); -- /usr/include/xcb/xkb.h:1408
type xcb_xkb_sa_lock_controls_iterator_t is record
data : access xcb_xkb_sa_lock_controls_t; -- /usr/include/xcb/xkb.h:1420
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1421
index : aliased int; -- /usr/include/xcb/xkb.h:1422
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_controls_iterator_t); -- /usr/include/xcb/xkb.h:1419
subtype xcb_xkb_action_message_flag_t is unsigned;
XCB_XKB_ACTION_MESSAGE_FLAG_ON_PRESS : constant xcb_xkb_action_message_flag_t :=
1;
XCB_XKB_ACTION_MESSAGE_FLAG_ON_RELEASE : constant xcb_xkb_action_message_flag_t :=
2;
XCB_XKB_ACTION_MESSAGE_FLAG_GEN_KEY_EVENT : constant xcb_xkb_action_message_flag_t :=
4; -- /usr/include/xcb/xkb.h:1425
type xcb_xkb_sa_action_message_t_message_array is
array (0 .. 5) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_action_message_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1435
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1436
message : aliased xcb_xkb_sa_action_message_t_message_array; -- /usr/include/xcb/xkb.h:1437
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_action_message_t); -- /usr/include/xcb/xkb.h:1434
type xcb_xkb_sa_action_message_iterator_t is record
data : access xcb_xkb_sa_action_message_t; -- /usr/include/xcb/xkb.h:1444
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1445
index : aliased int; -- /usr/include/xcb/xkb.h:1446
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_action_message_iterator_t); -- /usr/include/xcb/xkb.h:1443
type xcb_xkb_sa_redirect_key_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1453
newkey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1454
mask : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1455
realModifiers : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1456
vmodsMaskHigh : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1457
vmodsMaskLow : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1458
vmodsHigh : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1459
vmodsLow : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1460
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_redirect_key_t); -- /usr/include/xcb/xkb.h:1452
type xcb_xkb_sa_redirect_key_iterator_t is record
data : access xcb_xkb_sa_redirect_key_t; -- /usr/include/xcb/xkb.h:1467
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1468
index : aliased int; -- /usr/include/xcb/xkb.h:1469
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_redirect_key_iterator_t); -- /usr/include/xcb/xkb.h:1466
type xcb_xkb_sa_device_btn_t_pad0_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_device_btn_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1476
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1477
count : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1478
button : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1479
device : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1480
pad0 : aliased xcb_xkb_sa_device_btn_t_pad0_array; -- /usr/include/xcb/xkb.h:1481
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_device_btn_t); -- /usr/include/xcb/xkb.h:1475
type xcb_xkb_sa_device_btn_iterator_t is record
data : access xcb_xkb_sa_device_btn_t; -- /usr/include/xcb/xkb.h:1488
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1489
index : aliased int; -- /usr/include/xcb/xkb.h:1490
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_device_btn_iterator_t); -- /usr/include/xcb/xkb.h:1487
subtype xcb_xkb_lock_device_flags_t is unsigned;
XCB_XKB_LOCK_DEVICE_FLAGS_NO_LOCK : constant xcb_xkb_lock_device_flags_t :=
1;
XCB_XKB_LOCK_DEVICE_FLAGS_NO_UNLOCK : constant xcb_xkb_lock_device_flags_t :=
2; -- /usr/include/xcb/xkb.h:1493
type xcb_xkb_sa_lock_device_btn_t_pad1_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_sa_lock_device_btn_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1502
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1503
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1504
button : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1505
device : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1506
pad1 : aliased xcb_xkb_sa_lock_device_btn_t_pad1_array; -- /usr/include/xcb/xkb.h:1507
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_device_btn_t); -- /usr/include/xcb/xkb.h:1501
type xcb_xkb_sa_lock_device_btn_iterator_t is record
data : access xcb_xkb_sa_lock_device_btn_t; -- /usr/include/xcb/xkb.h:1514
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1515
index : aliased int; -- /usr/include/xcb/xkb.h:1516
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_lock_device_btn_iterator_t); -- /usr/include/xcb/xkb.h:1513
type xcb_xkb_sa_val_what_t is
(XCB_XKB_SA_VAL_WHAT_IGNORE_VAL,
XCB_XKB_SA_VAL_WHAT_SET_VAL_MIN,
XCB_XKB_SA_VAL_WHAT_SET_VAL_CENTER,
XCB_XKB_SA_VAL_WHAT_SET_VAL_MAX,
XCB_XKB_SA_VAL_WHAT_SET_VAL_RELATIVE,
XCB_XKB_SA_VAL_WHAT_SET_VAL_ABSOLUTE);
pragma Convention
(C,
xcb_xkb_sa_val_what_t); -- /usr/include/xcb/xkb.h:1519
type xcb_xkb_sa_device_valuator_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1532
device : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1533
val1what : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1534
val1index : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1535
val1value : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1536
val2what : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1537
val2index : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1538
val2value : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1539
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_device_valuator_t); -- /usr/include/xcb/xkb.h:1531
type xcb_xkb_sa_device_valuator_iterator_t is record
data : access xcb_xkb_sa_device_valuator_t; -- /usr/include/xcb/xkb.h:1546
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1547
index : aliased int; -- /usr/include/xcb/xkb.h:1548
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sa_device_valuator_iterator_t); -- /usr/include/xcb/xkb.h:1545
type xcb_xkb_si_action_t_data_array is
array (0 .. 6) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_si_action_t is record
c_type : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1555
data : aliased xcb_xkb_si_action_t_data_array; -- /usr/include/xcb/xkb.h:1556
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_si_action_t); -- /usr/include/xcb/xkb.h:1554
type xcb_xkb_si_action_iterator_t is record
data : access xcb_xkb_si_action_t; -- /usr/include/xcb/xkb.h:1563
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1564
index : aliased int; -- /usr/include/xcb/xkb.h:1565
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_si_action_iterator_t); -- /usr/include/xcb/xkb.h:1562
type xcb_xkb_sym_interpret_t is record
sym : aliased XCB.XProto.xcb_keysym_t; -- /usr/include/xcb/xkb.h:1572
mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1573
match : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1574
virtualMod : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1575
flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1576
action : aliased xcb_xkb_si_action_t; -- /usr/include/xcb/xkb.h:1577
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sym_interpret_t); -- /usr/include/xcb/xkb.h:1571
type xcb_xkb_sym_interpret_iterator_t is record
data : access xcb_xkb_sym_interpret_t; -- /usr/include/xcb/xkb.h:1584
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1585
index : aliased int; -- /usr/include/xcb/xkb.h:1586
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_sym_interpret_iterator_t); -- /usr/include/xcb/xkb.h:1583
type xcb_xkb_action_t (discr : unsigned := 0) is record
case discr is
when 0 =>
noaction : aliased xcb_xkb_sa_no_action_t; -- /usr/include/xcb/xkb.h:1593
when 1 =>
setmods : aliased xcb_xkb_sa_set_mods_t; -- /usr/include/xcb/xkb.h:1594
when 2 =>
latchmods : aliased xcb_xkb_sa_latch_mods_t; -- /usr/include/xcb/xkb.h:1595
when 3 =>
lockmods : aliased xcb_xkb_sa_lock_mods_t; -- /usr/include/xcb/xkb.h:1596
when 4 =>
setgroup : aliased xcb_xkb_sa_set_group_t; -- /usr/include/xcb/xkb.h:1597
when 5 =>
latchgroup : aliased xcb_xkb_sa_latch_group_t; -- /usr/include/xcb/xkb.h:1598
when 6 =>
lockgroup : aliased xcb_xkb_sa_lock_group_t; -- /usr/include/xcb/xkb.h:1599
when 7 =>
moveptr : aliased xcb_xkb_sa_move_ptr_t; -- /usr/include/xcb/xkb.h:1600
when 8 =>
ptrbtn : aliased xcb_xkb_sa_ptr_btn_t; -- /usr/include/xcb/xkb.h:1601
when 9 =>
lockptrbtn : aliased xcb_xkb_sa_lock_ptr_btn_t; -- /usr/include/xcb/xkb.h:1602
when 10 =>
setptrdflt : aliased xcb_xkb_sa_set_ptr_dflt_t; -- /usr/include/xcb/xkb.h:1603
when 11 =>
isolock : aliased xcb_xkb_sa_iso_lock_t; -- /usr/include/xcb/xkb.h:1604
when 12 =>
c_terminate : aliased xcb_xkb_sa_terminate_t; -- /usr/include/xcb/xkb.h:1605
when 13 =>
switchscreen : aliased xcb_xkb_sa_switch_screen_t; -- /usr/include/xcb/xkb.h:1606
when 14 =>
setcontrols : aliased xcb_xkb_sa_set_controls_t; -- /usr/include/xcb/xkb.h:1607
when 15 =>
lockcontrols : aliased xcb_xkb_sa_lock_controls_t; -- /usr/include/xcb/xkb.h:1608
when 16 =>
message : aliased xcb_xkb_sa_action_message_t; -- /usr/include/xcb/xkb.h:1609
when 17 =>
redirect : aliased xcb_xkb_sa_redirect_key_t; -- /usr/include/xcb/xkb.h:1610
when 18 =>
devbtn : aliased xcb_xkb_sa_device_btn_t; -- /usr/include/xcb/xkb.h:1611
when 19 =>
lockdevbtn : aliased xcb_xkb_sa_lock_device_btn_t; -- /usr/include/xcb/xkb.h:1612
when 20 =>
devval : aliased xcb_xkb_sa_device_valuator_t; -- /usr/include/xcb/xkb.h:1613
when others =>
c_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1614
end case;
end record;
pragma Convention (C_Pass_By_Copy, xcb_xkb_action_t);
pragma Unchecked_Union (xcb_xkb_action_t); -- /usr/include/xcb/xkb.h:1592
type xcb_xkb_action_iterator_t is record
data : access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:1621
c_rem : aliased int; -- /usr/include/xcb/xkb.h:1622
index : aliased int; -- /usr/include/xcb/xkb.h:1623
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_action_iterator_t); -- /usr/include/xcb/xkb.h:1620
type xcb_xkb_use_extension_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:1630
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_use_extension_cookie_t); -- /usr/include/xcb/xkb.h:1629
type xcb_xkb_use_extension_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1640
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1641
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1642
wantedMajor : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1643
wantedMinor : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1644
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_use_extension_request_t); -- /usr/include/xcb/xkb.h:1639
type xcb_xkb_use_extension_reply_t_pad0_array is
array (0 .. 19) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_use_extension_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1651
supported : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1652
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1653
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:1654
serverMajor : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1655
serverMinor : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1656
pad0 : aliased xcb_xkb_use_extension_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:1657
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_use_extension_reply_t); -- /usr/include/xcb/xkb.h:1650
type xcb_xkb_select_events_details_t is record
affectNewKeyboard : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1664
newKeyboardDetails : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1665
affectState : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1666
stateDetails : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1667
affectCtrls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1668
ctrlDetails : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1669
affectIndicatorState : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1670
indicatorStateDetails : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1671
affectIndicatorMap : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1672
indicatorMapDetails : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1673
affectNames : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1674
namesDetails : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1675
affectCompat : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1676
compatDetails : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1677
affectBell : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1678
bellDetails : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1679
affectMsgDetails : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1680
msgDetails : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1681
affectAccessX : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1682
accessXDetails : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1683
affectExtDev : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1684
extdevDetails : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1685
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_select_events_details_t); -- /usr/include/xcb/xkb.h:1663
type xcb_xkb_select_events_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1695
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1696
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1697
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:1698
affectWhich : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1699
clear : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1700
selectAll : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1701
affectMap : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1702
map : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1703
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_select_events_request_t); -- /usr/include/xcb/xkb.h:1694
type xcb_xkb_bell_request_t_pad1_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_bell_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1713
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1714
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1715
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:1716
bellClass : aliased xcb_xkb_bell_class_spec_t; -- /usr/include/xcb/xkb.h:1717
bellID : aliased xcb_xkb_id_spec_t; -- /usr/include/xcb/xkb.h:1718
percent : aliased Libc.Stdint.int8_t; -- /usr/include/xcb/xkb.h:1719
forceSound : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1720
eventOnly : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1721
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1722
pitch : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xkb.h:1723
duration : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xkb.h:1724
pad1 : aliased xcb_xkb_bell_request_t_pad1_array; -- /usr/include/xcb/xkb.h:1725
name : aliased XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:1726
window : aliased XCB.XProto.xcb_window_t; -- /usr/include/xcb/xkb.h:1727
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_bell_request_t); -- /usr/include/xcb/xkb.h:1712
type xcb_xkb_get_state_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:1734
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_state_cookie_t); -- /usr/include/xcb/xkb.h:1733
type xcb_xkb_get_state_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_state_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1744
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1745
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1746
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:1747
pad0 : aliased xcb_xkb_get_state_request_t_pad0_array; -- /usr/include/xcb/xkb.h:1748
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_state_request_t); -- /usr/include/xcb/xkb.h:1743
type xcb_xkb_get_state_reply_t_pad1_array is
array (0 .. 5) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_state_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1755
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1756
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1757
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:1758
mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1759
baseMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1760
latchedMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1761
lockedMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1762
group : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1763
lockedGroup : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1764
baseGroup : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xkb.h:1765
latchedGroup : aliased Libc.Stdint
.int16_t; -- /usr/include/xcb/xkb.h:1766
compatState : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1767
grabMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1768
compatGrabMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1769
lookupMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1770
compatLookupMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1771
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1772
ptrBtnState : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1773
pad1 : aliased xcb_xkb_get_state_reply_t_pad1_array; -- /usr/include/xcb/xkb.h:1774
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_state_reply_t); -- /usr/include/xcb/xkb.h:1754
type xcb_xkb_latch_lock_state_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1784
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1785
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1786
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:1787
affectModLocks : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1788
modLocks : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1789
lockGroup : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1790
groupLock : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1791
affectModLatches : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1792
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1793
latchGroup : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1794
groupLatch : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1795
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_latch_lock_state_request_t); -- /usr/include/xcb/xkb.h:1783
type xcb_xkb_get_controls_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:1802
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_controls_cookie_t); -- /usr/include/xcb/xkb.h:1801
type xcb_xkb_get_controls_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_controls_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1812
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1813
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1814
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:1815
pad0 : aliased xcb_xkb_get_controls_request_t_pad0_array; -- /usr/include/xcb/xkb.h:1816
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_controls_request_t); -- /usr/include/xcb/xkb.h:1811
type xcb_xkb_get_controls_reply_t_pad1_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_controls_reply_t_perKeyRepeat_array is
array (0 .. 31) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_controls_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1823
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1824
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1825
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:1826
mouseKeysDfltBtn : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1827
numGroups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1828
groupsWrap : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1829
internalModsMask : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1830
ignoreLockModsMask : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1831
internalModsRealMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1832
ignoreLockModsRealMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1833
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1834
internalModsVmods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1835
ignoreLockModsVmods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1836
repeatDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1837
repeatInterval : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1838
slowKeysDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1839
debounceDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1840
mouseKeysDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1841
mouseKeysInterval : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1842
mouseKeysTimeToMax : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1843
mouseKeysMaxSpeed : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1844
mouseKeysCurve : aliased Libc.Stdint
.int16_t; -- /usr/include/xcb/xkb.h:1845
accessXOption : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1846
accessXTimeout : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1847
accessXTimeoutOptionsMask : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1848
accessXTimeoutOptionsValues : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1849
pad1 : aliased xcb_xkb_get_controls_reply_t_pad1_array; -- /usr/include/xcb/xkb.h:1850
accessXTimeoutMask : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1851
accessXTimeoutValues : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1852
enabledControls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1853
perKeyRepeat : aliased xcb_xkb_get_controls_reply_t_perKeyRepeat_array; -- /usr/include/xcb/xkb.h:1854
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_controls_reply_t); -- /usr/include/xcb/xkb.h:1822
type xcb_xkb_set_controls_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_set_controls_request_t_perKeyRepeat_array is
array (0 .. 31) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_set_controls_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1864
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1865
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1866
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:1867
affectInternalRealMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1868
internalRealMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1869
affectIgnoreLockRealMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1870
ignoreLockRealMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1871
affectInternalVirtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1872
internalVirtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1873
affectIgnoreLockVirtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1874
ignoreLockVirtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1875
mouseKeysDfltBtn : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1876
groupsWrap : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1877
accessXOptions : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1878
pad0 : aliased xcb_xkb_set_controls_request_t_pad0_array; -- /usr/include/xcb/xkb.h:1879
affectEnabledControls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1880
enabledControls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1881
changeControls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1882
repeatDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1883
repeatInterval : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1884
slowKeysDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1885
debounceDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1886
mouseKeysDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1887
mouseKeysInterval : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1888
mouseKeysTimeToMax : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1889
mouseKeysMaxSpeed : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1890
mouseKeysCurve : aliased Libc.Stdint
.int16_t; -- /usr/include/xcb/xkb.h:1891
accessXTimeout : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1892
accessXTimeoutMask : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1893
accessXTimeoutValues : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:1894
accessXTimeoutOptionsMask : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1895
accessXTimeoutOptionsValues : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1896
perKeyRepeat : aliased xcb_xkb_set_controls_request_t_perKeyRepeat_array; -- /usr/include/xcb/xkb.h:1897
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_controls_request_t); -- /usr/include/xcb/xkb.h:1863
type xcb_xkb_get_map_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:1904
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_map_cookie_t); -- /usr/include/xcb/xkb.h:1903
type xcb_xkb_get_map_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_map_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1914
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1915
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1916
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:1917
full : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1918
partial : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1919
firstType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1920
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1921
firstKeySym : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1922
nKeySyms : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1923
firstKeyAction : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1924
nKeyActions : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1925
firstKeyBehavior : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1926
nKeyBehaviors : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1927
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1928
firstKeyExplicit : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1929
nKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1930
firstModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1931
nModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1932
firstVModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1933
nVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1934
pad0 : aliased xcb_xkb_get_map_request_t_pad0_array; -- /usr/include/xcb/xkb.h:1935
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_map_request_t); -- /usr/include/xcb/xkb.h:1913
type xcb_xkb_get_map_map_t is record
types_rtrn : access xcb_xkb_key_type_t; -- /usr/include/xcb/xkb.h:1942
syms_rtrn : access xcb_xkb_key_sym_map_t; -- /usr/include/xcb/xkb.h:1943
acts_rtrn_count : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1944
alignment_pad : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1945
acts_rtrn_acts : access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:1946
behaviors_rtrn : access xcb_xkb_set_behavior_t; -- /usr/include/xcb/xkb.h:1947
vmods_rtrn : access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1948
alignment_pad2 : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1949
explicit_rtrn : access xcb_xkb_set_explicit_t; -- /usr/include/xcb/xkb.h:1950
alignment_pad3 : access Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1951
modmap_rtrn : access xcb_xkb_key_mod_map_t; -- /usr/include/xcb/xkb.h:1952
alignment_pad4 : access Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1953
vmodmap_rtrn : access xcb_xkb_key_v_mod_map_t; -- /usr/include/xcb/xkb.h:1954
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_map_map_t); -- /usr/include/xcb/xkb.h:1941
type xcb_xkb_get_map_reply_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_map_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1961
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1962
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1963
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:1964
pad0 : aliased xcb_xkb_get_map_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:1965
minKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1966
maxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1967
present : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1968
firstType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1969
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1970
totalTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1971
firstKeySym : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1972
totalSyms : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:1973
nKeySyms : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1974
firstKeyAction : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1975
totalActions : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1976
nKeyActions : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1977
firstKeyBehavior : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1978
nKeyBehaviors : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1979
totalKeyBehaviors : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1980
firstKeyExplicit : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1981
nKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1982
totalKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1983
firstModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1984
nModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1985
totalModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1986
firstVModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:1987
nVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1988
totalVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:1989
pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:1990
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:1991
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_map_reply_t); -- /usr/include/xcb/xkb.h:1960
type xcb_xkb_set_map_values_t is record
types : access xcb_xkb_set_key_type_t; -- /usr/include/xcb/xkb.h:1998
syms : access xcb_xkb_key_sym_map_t; -- /usr/include/xcb/xkb.h:1999
actionsCount : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2000
actions : access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:2001
behaviors : access xcb_xkb_set_behavior_t; -- /usr/include/xcb/xkb.h:2002
vmods : access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2003
modmap : access xcb_xkb_key_mod_map_t; -- /usr/include/xcb/xkb.h:2005
vmodmap : access xcb_xkb_key_v_mod_map_t; -- /usr/include/xcb/xkb.h:2006
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_map_values_t); -- /usr/include/xcb/xkb.h:1997
type xcb_xkb_set_map_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2016
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2017
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2018
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2019
present : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2020
flags : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2021
minKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2022
maxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2023
firstType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2024
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2025
firstKeySym : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2026
nKeySyms : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2027
totalSyms : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2028
firstKeyAction : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2029
nKeyActions : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2030
totalActions : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2031
firstKeyBehavior : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2032
nKeyBehaviors : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2033
totalKeyBehaviors : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2034
firstKeyExplicit : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2035
nKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2036
totalKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2037
firstModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2038
nModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2039
totalModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2040
firstVModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2041
nVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2042
totalVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2043
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2044
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_map_request_t); -- /usr/include/xcb/xkb.h:2015
type xcb_xkb_get_compat_map_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2051
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_compat_map_cookie_t); -- /usr/include/xcb/xkb.h:2050
type xcb_xkb_get_compat_map_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2061
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2062
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2063
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2064
groups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2065
getAllSI : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2066
firstSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2067
nSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2068
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_compat_map_request_t); -- /usr/include/xcb/xkb.h:2060
type xcb_xkb_get_compat_map_reply_t_pad1_array is
array (0 .. 15) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_compat_map_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2075
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2076
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2077
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2078
groupsRtrn : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2079
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2080
firstSIRtrn : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2081
nSIRtrn : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2082
nTotalSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2083
pad1 : aliased xcb_xkb_get_compat_map_reply_t_pad1_array; -- /usr/include/xcb/xkb.h:2084
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_compat_map_reply_t); -- /usr/include/xcb/xkb.h:2074
type xcb_xkb_set_compat_map_request_t_pad1_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_set_compat_map_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2094
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2095
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2096
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2097
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2098
recomputeActions : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2099
truncateSI : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2100
groups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2101
firstSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2102
nSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2103
pad1 : aliased xcb_xkb_set_compat_map_request_t_pad1_array; -- /usr/include/xcb/xkb.h:2104
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_compat_map_request_t); -- /usr/include/xcb/xkb.h:2093
type xcb_xkb_get_indicator_state_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2111
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_indicator_state_cookie_t); -- /usr/include/xcb/xkb.h:2110
type xcb_xkb_get_indicator_state_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_indicator_state_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2121
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2122
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2123
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2124
pad0 : aliased xcb_xkb_get_indicator_state_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2125
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_indicator_state_request_t); -- /usr/include/xcb/xkb.h:2120
type xcb_xkb_get_indicator_state_reply_t_pad0_array is
array (0 .. 19) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_indicator_state_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2132
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2133
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2134
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2135
state : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2136
pad0 : aliased xcb_xkb_get_indicator_state_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2137
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_indicator_state_reply_t); -- /usr/include/xcb/xkb.h:2131
type xcb_xkb_get_indicator_map_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2144
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_indicator_map_cookie_t); -- /usr/include/xcb/xkb.h:2143
type xcb_xkb_get_indicator_map_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_indicator_map_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2154
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2155
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2156
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2157
pad0 : aliased xcb_xkb_get_indicator_map_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2158
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2159
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_indicator_map_request_t); -- /usr/include/xcb/xkb.h:2153
type xcb_xkb_get_indicator_map_reply_t_pad0_array is
array (0 .. 14) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_indicator_map_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2166
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2167
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2168
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2169
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2170
realIndicators : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2171
nIndicators : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2172
pad0 : aliased xcb_xkb_get_indicator_map_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2173
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_indicator_map_reply_t); -- /usr/include/xcb/xkb.h:2165
type xcb_xkb_set_indicator_map_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_set_indicator_map_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2183
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2184
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2185
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2186
pad0 : aliased xcb_xkb_set_indicator_map_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2187
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2188
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_indicator_map_request_t); -- /usr/include/xcb/xkb.h:2182
type xcb_xkb_get_named_indicator_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2195
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_named_indicator_cookie_t); -- /usr/include/xcb/xkb.h:2194
type xcb_xkb_get_named_indicator_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_named_indicator_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2205
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2206
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2207
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2208
ledClass : aliased xcb_xkb_led_class_spec_t; -- /usr/include/xcb/xkb.h:2209
ledID : aliased xcb_xkb_id_spec_t; -- /usr/include/xcb/xkb.h:2210
pad0 : aliased xcb_xkb_get_named_indicator_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2211
indicator : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2212
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_named_indicator_request_t); -- /usr/include/xcb/xkb.h:2204
type xcb_xkb_get_named_indicator_reply_t_pad0_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_named_indicator_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2219
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2220
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2221
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2222
indicator : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2223
found : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2224
on : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2225
realIndicator : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2226
ndx : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2227
map_flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2228
map_whichGroups : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2229
map_groups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2230
map_whichMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2231
map_mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2232
map_realMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2233
map_vmod : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2234
map_ctrls : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2235
supported : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2236
pad0 : aliased xcb_xkb_get_named_indicator_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2237
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_named_indicator_reply_t); -- /usr/include/xcb/xkb.h:2218
type xcb_xkb_set_named_indicator_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_set_named_indicator_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2247
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2248
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2249
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2250
ledClass : aliased xcb_xkb_led_class_spec_t; -- /usr/include/xcb/xkb.h:2251
ledID : aliased xcb_xkb_id_spec_t; -- /usr/include/xcb/xkb.h:2252
pad0 : aliased xcb_xkb_set_named_indicator_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2253
indicator : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2254
setState : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2255
on : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2256
setMap : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2257
createMap : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2258
pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2259
map_flags : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2260
map_whichGroups : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2261
map_groups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2262
map_whichMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2263
map_realMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2264
map_vmods : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2265
map_ctrls : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2266
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_named_indicator_request_t); -- /usr/include/xcb/xkb.h:2246
type xcb_xkb_get_names_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2273
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_names_cookie_t); -- /usr/include/xcb/xkb.h:2272
type xcb_xkb_get_names_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_names_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2283
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2284
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2285
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2286
pad0 : aliased xcb_xkb_get_names_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2287
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2288
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_names_request_t); -- /usr/include/xcb/xkb.h:2282
type xcb_xkb_get_names_value_list_t is record
keycodesName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2295
geometryName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2296
symbolsName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2297
physSymbolsName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2298
typesName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2299
compatName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2300
typeNames : access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2301
nLevelsPerType : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2302
alignment_pad : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2303
ktLevelNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2304
indicatorNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2305
virtualModNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2306
groups : access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2307
keyNames : access xcb_xkb_key_name_t; -- /usr/include/xcb/xkb.h:2308
keyAliases : access xcb_xkb_key_alias_t; -- /usr/include/xcb/xkb.h:2309
radioGroupNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2310
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_names_value_list_t); -- /usr/include/xcb/xkb.h:2294
type xcb_xkb_get_names_reply_t_pad0_array is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_names_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2317
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2318
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2319
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2320
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2321
minKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2322
maxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2323
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2324
groupNames : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2325
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2326
firstKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2327
nKeys : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2328
indicators : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2329
nRadioGroups : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2330
nKeyAliases : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2331
nKTLevels : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2332
pad0 : aliased xcb_xkb_get_names_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2333
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_names_reply_t); -- /usr/include/xcb/xkb.h:2316
type xcb_xkb_set_names_values_t is record
keycodesName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2340
geometryName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2341
symbolsName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2342
physSymbolsName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2343
typesName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2344
compatName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2345
typeNames : access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2346
nLevelsPerType : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2347
ktLevelNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2348
indicatorNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2349
virtualModNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2350
groups : access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2351
keyNames : access xcb_xkb_key_name_t; -- /usr/include/xcb/xkb.h:2352
keyAliases : access xcb_xkb_key_alias_t; -- /usr/include/xcb/xkb.h:2353
radioGroupNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2354
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_names_values_t); -- /usr/include/xcb/xkb.h:2339
type xcb_xkb_set_names_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2364
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2365
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2366
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2367
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2368
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2369
firstType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2370
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2371
firstKTLevelt : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2372
nKTLevels : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2373
indicators : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2374
groupNames : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2375
nRadioGroups : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2376
firstKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2377
nKeys : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2378
nKeyAliases : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2379
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2380
totalKTLevelNames : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2381
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_names_request_t); -- /usr/include/xcb/xkb.h:2363
type xcb_xkb_per_client_flags_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2388
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_per_client_flags_cookie_t); -- /usr/include/xcb/xkb.h:2387
type xcb_xkb_per_client_flags_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_per_client_flags_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2398
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2399
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2400
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2401
pad0 : aliased xcb_xkb_per_client_flags_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2402
change : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2403
value : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2404
ctrlsToChange : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2405
autoCtrls : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2406
autoCtrlsValues : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2407
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_per_client_flags_request_t); -- /usr/include/xcb/xkb.h:2397
type xcb_xkb_per_client_flags_reply_t_pad0_array is
array (0 .. 7) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_per_client_flags_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2414
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2415
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2416
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2417
supported : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2418
value : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2419
autoCtrls : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2420
autoCtrlsValues : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2421
pad0 : aliased xcb_xkb_per_client_flags_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2422
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_per_client_flags_reply_t); -- /usr/include/xcb/xkb.h:2413
type xcb_xkb_list_components_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2429
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_list_components_cookie_t); -- /usr/include/xcb/xkb.h:2428
type xcb_xkb_list_components_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2439
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2440
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2441
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2442
maxNames : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2443
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_list_components_request_t); -- /usr/include/xcb/xkb.h:2438
type xcb_xkb_list_components_reply_t_pad0_array is
array (0 .. 9) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_list_components_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2450
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2451
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2452
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2453
nKeymaps : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2454
nKeycodes : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2455
nTypes : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2456
nCompatMaps : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2457
nSymbols : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2458
nGeometries : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2459
extra : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2460
pad0 : aliased xcb_xkb_list_components_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2461
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_list_components_reply_t); -- /usr/include/xcb/xkb.h:2449
type xcb_xkb_get_kbd_by_name_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2468
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_kbd_by_name_cookie_t); -- /usr/include/xcb/xkb.h:2467
type xcb_xkb_get_kbd_by_name_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2478
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2479
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2480
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2481
need : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2482
want : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2483
load : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2484
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2485
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_kbd_by_name_request_t); -- /usr/include/xcb/xkb.h:2477
type xcb_xkb_get_kbd_by_name_replies_types_map_t is record
types_rtrn : access xcb_xkb_key_type_t; -- /usr/include/xcb/xkb.h:2492
syms_rtrn : access xcb_xkb_key_sym_map_t; -- /usr/include/xcb/xkb.h:2493
acts_rtrn_count : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2494
acts_rtrn_acts : access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:2495
behaviors_rtrn : access xcb_xkb_set_behavior_t; -- /usr/include/xcb/xkb.h:2496
vmods_rtrn : access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2497
explicit_rtrn : access xcb_xkb_set_explicit_t; -- /usr/include/xcb/xkb.h:2498
modmap_rtrn : access xcb_xkb_key_mod_map_t; -- /usr/include/xcb/xkb.h:2499
vmodmap_rtrn : access xcb_xkb_key_v_mod_map_t; -- /usr/include/xcb/xkb.h:2500
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_kbd_by_name_replies_types_map_t); -- /usr/include/xcb/xkb.h:2491
type xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t is record
keycodesName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2507
geometryName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2508
symbolsName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2509
physSymbolsName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2510
typesName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2511
compatName : aliased XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2512
typeNames : access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2513
nLevelsPerType : access Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2514
ktLevelNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2515
indicatorNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2516
virtualModNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2517
groups : access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2518
keyNames : access xcb_xkb_key_name_t; -- /usr/include/xcb/xkb.h:2519
keyAliases : access xcb_xkb_key_alias_t; -- /usr/include/xcb/xkb.h:2520
radioGroupNames : access XCB.XProto
.xcb_atom_t; -- /usr/include/xcb/xkb.h:2521
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t); -- /usr/include/xcb/xkb.h:2506
type xcb_xkb_get_kbd_by_name_replies_t;
type xcb_xkb_get_kbd_by_name_replies_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type u_types is record
getmap_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2529
typeDeviceID : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2530
getmap_sequence : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2531
getmap_length : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2532
pad0 : aliased xcb_xkb_get_kbd_by_name_replies_t_pad0_array; -- /usr/include/xcb/xkb.h:2533
typeMinKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2534
typeMaxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2535
present : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2536
firstType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2537
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2538
totalTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2539
firstKeySym : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2540
totalSyms : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2541
nKeySyms : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2542
firstKeyAction : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2543
totalActions : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2544
nKeyActions : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2545
firstKeyBehavior : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2546
nKeyBehaviors : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2547
totalKeyBehaviors : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2548
firstKeyExplicit : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2549
nKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2550
totalKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2551
firstModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2552
nModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2553
totalModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2554
firstVModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2555
nVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2556
totalVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2557
pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2558
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2559
map : aliased xcb_xkb_get_kbd_by_name_replies_types_map_t; -- /usr/include/xcb/xkb.h:2560
end record;
pragma Convention (C_Pass_By_Copy, u_types);
type xcb_xkb_get_kbd_by_name_replies_t_pad1_array is
array (0 .. 15) of aliased Libc.Stdint.uint8_t;
type u_compat_map is record
compatmap_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2563
compatDeviceID : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2564
compatmap_sequence : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2565
compatmap_length : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2566
groupsRtrn : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2567
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2568
firstSIRtrn : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2569
nSIRtrn : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2570
nTotalSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2571
pad1 : aliased xcb_xkb_get_kbd_by_name_replies_t_pad1_array; -- /usr/include/xcb/xkb.h:2572
si_rtrn : access xcb_xkb_sym_interpret_t; -- /usr/include/xcb/xkb.h:2573
group_rtrn : access xcb_xkb_mod_def_t; -- /usr/include/xcb/xkb.h:2574
end record;
pragma Convention (C_Pass_By_Copy, u_compat_map);
type Xcb_Xkb_Get_Kbd_By_Name_Replies_T_Pad0_Array_1 is
array (0 .. 14) of aliased Libc.Stdint.uint8_t;
type u_indicator_maps is record
indicatormap_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2577
indicatorDeviceID : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2578
indicatormap_sequence : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2579
indicatormap_length : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2580
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2581
realIndicators : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2582
nIndicators : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2583
pad0 : aliased Xcb_Xkb_Get_Kbd_By_Name_Replies_T_Pad0_Array_1; -- /usr/include/xcb/xkb.h:2584
maps : access xcb_xkb_indicator_map_t; -- /usr/include/xcb/xkb.h:2585
end record;
pragma Convention (C_Pass_By_Copy, u_indicator_maps);
type Xcb_Xkb_Get_Kbd_By_Name_Replies_T_Pad0_Array_2 is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type u_key_names is record
keyname_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2588
keyDeviceID : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2589
keyname_sequence : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2590
keyname_length : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2591
which : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2592
keyMinKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2593
keyMaxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2594
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2595
groupNames : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2596
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2597
firstKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2598
nKeys : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2599
indicators : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2600
nRadioGroups : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2601
nKeyAliases : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2602
nKTLevels : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2603
pad0 : aliased Xcb_Xkb_Get_Kbd_By_Name_Replies_T_Pad0_Array_2; -- /usr/include/xcb/xkb.h:2604
valueList : aliased xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t; -- /usr/include/xcb/xkb.h:2605
end record;
pragma Convention (C_Pass_By_Copy, u_key_names);
type u_geometry is record
geometry_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2608
geometryDeviceID : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2609
geometry_sequence : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2610
geometry_length : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2611
name : aliased XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2612
geometryFound : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2613
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2614
widthMM : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2615
heightMM : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2616
nProperties : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2617
nColors : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2618
nShapes : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2619
nSections : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2620
nDoodads : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2621
nKeyAliases : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2622
baseColorNdx : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2623
labelColorNdx : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2624
labelFont : access xcb_xkb_counted_string_16_t; -- /usr/include/xcb/xkb.h:2625
end record;
pragma Convention (C_Pass_By_Copy, u_geometry);
type xcb_xkb_get_kbd_by_name_replies_t is record
types : aliased u_types; -- /usr/include/xcb/xkb.h:2561
compat_map : aliased u_compat_map; -- /usr/include/xcb/xkb.h:2575
indicator_maps : aliased u_indicator_maps; -- /usr/include/xcb/xkb.h:2586
key_names : aliased u_key_names; -- /usr/include/xcb/xkb.h:2606
geometry : aliased u_geometry; -- /usr/include/xcb/xkb.h:2626
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_kbd_by_name_replies_t); -- /usr/include/xcb/xkb.h:2527
function xcb_xkb_get_kbd_by_name_replies_types_map
(R : access xcb_xkb_get_kbd_by_name_replies_t)
return access xcb_xkb_get_kbd_by_name_replies_types_map_t; -- /usr/include/xcb/xkb.h:2640
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map,
"xcb_xkb_get_kbd_by_name_replies_types_map");
type xcb_xkb_get_kbd_by_name_reply_t_pad0_array is
array (0 .. 15) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_kbd_by_name_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2646
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2647
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2648
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2649
minKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2650
maxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2651
loaded : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2652
newKeyboard : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2653
found : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2654
reported : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2655
pad0 : aliased xcb_xkb_get_kbd_by_name_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2656
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_kbd_by_name_reply_t); -- /usr/include/xcb/xkb.h:2645
type xcb_xkb_get_device_info_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2663
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_device_info_cookie_t); -- /usr/include/xcb/xkb.h:2662
type xcb_xkb_get_device_info_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2673
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2674
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2675
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2676
wanted : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2677
allButtons : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2678
firstButton : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2679
nButtons : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2680
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2681
ledClass : aliased xcb_xkb_led_class_spec_t; -- /usr/include/xcb/xkb.h:2682
ledID : aliased xcb_xkb_id_spec_t; -- /usr/include/xcb/xkb.h:2683
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_device_info_request_t); -- /usr/include/xcb/xkb.h:2672
type xcb_xkb_get_device_info_reply_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_get_device_info_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2690
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2691
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2692
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2693
present : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2694
supported : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2695
unsupported : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2696
nDeviceLedFBs : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2697
firstBtnWanted : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2698
nBtnsWanted : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2699
firstBtnRtrn : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2700
nBtnsRtrn : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2701
totalBtns : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2702
hasOwnState : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2703
dfltKbdFB : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2704
dfltLedFB : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2705
pad0 : aliased xcb_xkb_get_device_info_reply_t_pad0_array; -- /usr/include/xcb/xkb.h:2706
devType : aliased XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2707
nameLen : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2708
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_get_device_info_reply_t); -- /usr/include/xcb/xkb.h:2689
type xcb_xkb_set_device_info_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2718
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2719
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2720
deviceSpec : aliased xcb_xkb_device_spec_t; -- /usr/include/xcb/xkb.h:2721
firstBtn : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2722
nBtns : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2723
change : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2724
nDeviceLedFBs : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2725
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_device_info_request_t); -- /usr/include/xcb/xkb.h:2717
type xcb_xkb_set_debugging_flags_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xkb.h:2732
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_debugging_flags_cookie_t); -- /usr/include/xcb/xkb.h:2731
type xcb_xkb_set_debugging_flags_request_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_set_debugging_flags_request_t is record
major_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2742
minor_opcode : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2743
length : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2744
msgLength : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2745
pad0 : aliased xcb_xkb_set_debugging_flags_request_t_pad0_array; -- /usr/include/xcb/xkb.h:2746
affectFlags : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2747
flags : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2748
affectCtrls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2749
ctrls : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2750
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_debugging_flags_request_t); -- /usr/include/xcb/xkb.h:2741
type xcb_xkb_set_debugging_flags_reply_t_pad1_array is
array (0 .. 7) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_set_debugging_flags_reply_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2757
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2758
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2759
length : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2760
currentFlags : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2761
currentCtrls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2762
supportedFlags : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2763
supportedCtrls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2764
pad1 : aliased xcb_xkb_set_debugging_flags_reply_t_pad1_array; -- /usr/include/xcb/xkb.h:2765
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_set_debugging_flags_reply_t); -- /usr/include/xcb/xkb.h:2756
type xcb_xkb_new_keyboard_notify_event_t_pad0_array is
array (0 .. 13) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_new_keyboard_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2775
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2776
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2777
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2778
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2779
oldDeviceID : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2780
minKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2781
maxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2782
oldMinKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2783
oldMaxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2784
requestMajor : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2785
requestMinor : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2786
changed : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2787
pad0 : aliased xcb_xkb_new_keyboard_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:2788
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_new_keyboard_notify_event_t); -- /usr/include/xcb/xkb.h:2774
type xcb_xkb_map_notify_event_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_map_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2798
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2799
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2800
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2801
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2802
ptrBtnActions : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2803
changed : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2804
minKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2805
maxKeyCode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2806
firstType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2807
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2808
firstKeySym : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2809
nKeySyms : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2810
firstKeyAct : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2811
nKeyActs : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2812
firstKeyBehavior : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2813
nKeyBehavior : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2814
firstKeyExplicit : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2815
nKeyExplicit : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2816
firstModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2817
nModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2818
firstVModMapKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2819
nVModMapKeys : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2820
virtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2821
pad0 : aliased xcb_xkb_map_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:2822
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_map_notify_event_t); -- /usr/include/xcb/xkb.h:2797
type xcb_xkb_state_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2832
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2833
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2834
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2835
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2836
mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2837
baseMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2838
latchedMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2839
lockedMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2840
group : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2841
baseGroup : aliased Libc.Stdint.int16_t; -- /usr/include/xcb/xkb.h:2842
latchedGroup : aliased Libc.Stdint
.int16_t; -- /usr/include/xcb/xkb.h:2843
lockedGroup : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2844
compatState : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2845
grabMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2846
compatGrabMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2847
lookupMods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2848
compatLoockupMods : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2849
ptrBtnState : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2850
changed : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2851
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2852
eventType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2853
requestMajor : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2854
requestMinor : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2855
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_state_notify_event_t); -- /usr/include/xcb/xkb.h:2831
type xcb_xkb_controls_notify_event_t_pad0_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_controls_notify_event_t_pad1_array is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_controls_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2865
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2866
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2867
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2868
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2869
numGroups : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2870
pad0 : aliased xcb_xkb_controls_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:2871
changedControls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2872
enabledControls : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2873
enabledControlChanges : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2874
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2875
eventType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2876
requestMajor : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2877
requestMinor : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2878
pad1 : aliased xcb_xkb_controls_notify_event_t_pad1_array; -- /usr/include/xcb/xkb.h:2879
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_controls_notify_event_t); -- /usr/include/xcb/xkb.h:2864
type xcb_xkb_indicator_state_notify_event_t_pad0_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_indicator_state_notify_event_t_pad1_array is
array (0 .. 11) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_indicator_state_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2889
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2890
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2891
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2892
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2893
pad0 : aliased xcb_xkb_indicator_state_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:2894
state : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2895
stateChanged : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2896
pad1 : aliased xcb_xkb_indicator_state_notify_event_t_pad1_array; -- /usr/include/xcb/xkb.h:2897
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_indicator_state_notify_event_t); -- /usr/include/xcb/xkb.h:2888
type xcb_xkb_indicator_map_notify_event_t_pad0_array is
array (0 .. 2) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_indicator_map_notify_event_t_pad1_array is
array (0 .. 11) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_indicator_map_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2907
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2908
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2909
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2910
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2911
pad0 : aliased xcb_xkb_indicator_map_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:2912
state : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:2913
mapChanged : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2914
pad1 : aliased xcb_xkb_indicator_map_notify_event_t_pad1_array; -- /usr/include/xcb/xkb.h:2915
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_indicator_map_notify_event_t); -- /usr/include/xcb/xkb.h:2906
type xcb_xkb_names_notify_event_t_pad2_array is
array (0 .. 3) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_names_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2925
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2926
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2927
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2928
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2929
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2930
changed : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2931
firstType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2932
nTypes : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2933
firstLevelName : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2934
nLevelNames : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2935
pad1 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2936
nRadioGroups : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2937
nKeyAliases : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2938
changedGroupNames : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2939
changedVirtualMods : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:2940
firstKey : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:2941
nKeys : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2942
changedIndicators : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:2943
pad2 : aliased xcb_xkb_names_notify_event_t_pad2_array; -- /usr/include/xcb/xkb.h:2944
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_names_notify_event_t); -- /usr/include/xcb/xkb.h:2924
type xcb_xkb_compat_map_notify_event_t_pad0_array is
array (0 .. 15) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_compat_map_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2954
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2955
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2956
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2957
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2958
changedGroups : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2959
firstSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2960
nSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2961
nTotalSI : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2962
pad0 : aliased xcb_xkb_compat_map_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:2963
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_compat_map_notify_event_t); -- /usr/include/xcb/xkb.h:2953
type xcb_xkb_bell_notify_event_t_pad0_array is
array (0 .. 6) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_bell_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2973
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2974
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2975
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2976
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2977
bellClass : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2978
bellID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2979
percent : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2980
pitch : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2981
duration : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2982
name : aliased XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:2983
window : aliased XCB.XProto.xcb_window_t; -- /usr/include/xcb/xkb.h:2984
eventOnly : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2985
pad0 : aliased xcb_xkb_bell_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:2986
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_bell_notify_event_t); -- /usr/include/xcb/xkb.h:2972
type xcb_xkb_action_message_event_t_message_array is
array (0 .. 7) of aliased xcb_xkb_string8_t;
type xcb_xkb_action_message_event_t_pad0_array is
array (0 .. 9) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_action_message_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:2996
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:2997
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:2998
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:2999
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3000
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:3001
press : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3002
keyEventFollows : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:3003
mods : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3004
group : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3005
message : aliased xcb_xkb_action_message_event_t_message_array; -- /usr/include/xcb/xkb.h:3006
pad0 : aliased xcb_xkb_action_message_event_t_pad0_array; -- /usr/include/xcb/xkb.h:3007
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_action_message_event_t); -- /usr/include/xcb/xkb.h:2995
type xcb_xkb_access_x_notify_event_t_pad0_array is
array (0 .. 15) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_access_x_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:3017
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3018
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:3019
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:3020
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3021
keycode : aliased XCB.XProto
.xcb_keycode_t; -- /usr/include/xcb/xkb.h:3022
detailt : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:3023
slowKeysDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:3024
debounceDelay : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:3025
pad0 : aliased xcb_xkb_access_x_notify_event_t_pad0_array; -- /usr/include/xcb/xkb.h:3026
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_access_x_notify_event_t); -- /usr/include/xcb/xkb.h:3016
type xcb_xkb_extension_device_notify_event_t_pad1_array is
array (0 .. 1) of aliased Libc.Stdint.uint8_t;
type xcb_xkb_extension_device_notify_event_t is record
response_type : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:3036
xkbType : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3037
sequence : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:3038
time : aliased XCB.XProto
.xcb_timestamp_t; -- /usr/include/xcb/xkb.h:3039
deviceID : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3040
pad0 : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3041
reason : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:3042
ledClass : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:3043
ledID : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:3044
ledsDefined : aliased Libc.Stdint
.uint32_t; -- /usr/include/xcb/xkb.h:3045
ledState : aliased Libc.Stdint.uint32_t; -- /usr/include/xcb/xkb.h:3046
firstButton : aliased Libc.Stdint
.uint8_t; -- /usr/include/xcb/xkb.h:3047
nButtons : aliased Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:3048
supported : aliased Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:3049
unsupported : aliased Libc.Stdint
.uint16_t; -- /usr/include/xcb/xkb.h:3050
pad1 : aliased xcb_xkb_extension_device_notify_event_t_pad1_array; -- /usr/include/xcb/xkb.h:3051
end record;
pragma Convention
(C_Pass_By_Copy,
xcb_xkb_extension_device_notify_event_t); -- /usr/include/xcb/xkb.h:3035
procedure xcb_xkb_device_spec_next
(i : access xcb_xkb_device_spec_iterator_t); -- /usr/include/xcb/xkb.h:3073
pragma Import (C, xcb_xkb_device_spec_next, "xcb_xkb_device_spec_next");
function xcb_xkb_device_spec_end
(i : xcb_xkb_device_spec_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3095
pragma Import (C, xcb_xkb_device_spec_end, "xcb_xkb_device_spec_end");
procedure xcb_xkb_led_class_spec_next
(i : access xcb_xkb_led_class_spec_iterator_t); -- /usr/include/xcb/xkb.h:3116
pragma Import
(C,
xcb_xkb_led_class_spec_next,
"xcb_xkb_led_class_spec_next");
function xcb_xkb_led_class_spec_end
(i : xcb_xkb_led_class_spec_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3138
pragma Import (C, xcb_xkb_led_class_spec_end, "xcb_xkb_led_class_spec_end");
procedure xcb_xkb_bell_class_spec_next
(i : access xcb_xkb_bell_class_spec_iterator_t); -- /usr/include/xcb/xkb.h:3159
pragma Import
(C,
xcb_xkb_bell_class_spec_next,
"xcb_xkb_bell_class_spec_next");
function xcb_xkb_bell_class_spec_end
(i : xcb_xkb_bell_class_spec_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3181
pragma Import
(C,
xcb_xkb_bell_class_spec_end,
"xcb_xkb_bell_class_spec_end");
procedure xcb_xkb_id_spec_next
(i : access xcb_xkb_id_spec_iterator_t); -- /usr/include/xcb/xkb.h:3202
pragma Import (C, xcb_xkb_id_spec_next, "xcb_xkb_id_spec_next");
function xcb_xkb_id_spec_end
(i : xcb_xkb_id_spec_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3224
pragma Import (C, xcb_xkb_id_spec_end, "xcb_xkb_id_spec_end");
procedure xcb_xkb_indicator_map_next
(i : access xcb_xkb_indicator_map_iterator_t); -- /usr/include/xcb/xkb.h:3245
pragma Import (C, xcb_xkb_indicator_map_next, "xcb_xkb_indicator_map_next");
function xcb_xkb_indicator_map_end
(i : xcb_xkb_indicator_map_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3267
pragma Import (C, xcb_xkb_indicator_map_end, "xcb_xkb_indicator_map_end");
procedure xcb_xkb_mod_def_next
(i : access xcb_xkb_mod_def_iterator_t); -- /usr/include/xcb/xkb.h:3288
pragma Import (C, xcb_xkb_mod_def_next, "xcb_xkb_mod_def_next");
function xcb_xkb_mod_def_end
(i : xcb_xkb_mod_def_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3310
pragma Import (C, xcb_xkb_mod_def_end, "xcb_xkb_mod_def_end");
procedure xcb_xkb_key_name_next
(i : access xcb_xkb_key_name_iterator_t); -- /usr/include/xcb/xkb.h:3331
pragma Import (C, xcb_xkb_key_name_next, "xcb_xkb_key_name_next");
function xcb_xkb_key_name_end
(i : xcb_xkb_key_name_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3353
pragma Import (C, xcb_xkb_key_name_end, "xcb_xkb_key_name_end");
procedure xcb_xkb_key_alias_next
(i : access xcb_xkb_key_alias_iterator_t); -- /usr/include/xcb/xkb.h:3374
pragma Import (C, xcb_xkb_key_alias_next, "xcb_xkb_key_alias_next");
function xcb_xkb_key_alias_end
(i : xcb_xkb_key_alias_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3396
pragma Import (C, xcb_xkb_key_alias_end, "xcb_xkb_key_alias_end");
function xcb_xkb_counted_string_16_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:3399
pragma Import
(C,
xcb_xkb_counted_string_16_sizeof,
"xcb_xkb_counted_string_16_sizeof");
function xcb_xkb_counted_string_16_string
(R : access xcb_xkb_counted_string_16_t)
return Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xkb.h:3412
pragma Import
(C,
xcb_xkb_counted_string_16_string,
"xcb_xkb_counted_string_16_string");
function xcb_xkb_counted_string_16_string_length
(R : access xcb_xkb_counted_string_16_t)
return int; -- /usr/include/xcb/xkb.h:3425
pragma Import
(C,
xcb_xkb_counted_string_16_string_length,
"xcb_xkb_counted_string_16_string_length");
function xcb_xkb_counted_string_16_string_end
(R : access xcb_xkb_counted_string_16_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3438
pragma Import
(C,
xcb_xkb_counted_string_16_string_end,
"xcb_xkb_counted_string_16_string_end");
function xcb_xkb_counted_string_16_alignment_pad
(R : access xcb_xkb_counted_string_16_t)
return System.Address; -- /usr/include/xcb/xkb.h:3451
pragma Import
(C,
xcb_xkb_counted_string_16_alignment_pad,
"xcb_xkb_counted_string_16_alignment_pad");
function xcb_xkb_counted_string_16_alignment_pad_length
(R : access xcb_xkb_counted_string_16_t)
return int; -- /usr/include/xcb/xkb.h:3464
pragma Import
(C,
xcb_xkb_counted_string_16_alignment_pad_length,
"xcb_xkb_counted_string_16_alignment_pad_length");
function xcb_xkb_counted_string_16_alignment_pad_end
(R : access xcb_xkb_counted_string_16_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3477
pragma Import
(C,
xcb_xkb_counted_string_16_alignment_pad_end,
"xcb_xkb_counted_string_16_alignment_pad_end");
procedure xcb_xkb_counted_string_16_next
(i : access xcb_xkb_counted_string_16_iterator_t); -- /usr/include/xcb/xkb.h:3498
pragma Import
(C,
xcb_xkb_counted_string_16_next,
"xcb_xkb_counted_string_16_next");
function xcb_xkb_counted_string_16_end
(i : xcb_xkb_counted_string_16_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3520
pragma Import
(C,
xcb_xkb_counted_string_16_end,
"xcb_xkb_counted_string_16_end");
procedure xcb_xkb_kt_map_entry_next
(i : access xcb_xkb_kt_map_entry_iterator_t); -- /usr/include/xcb/xkb.h:3541
pragma Import (C, xcb_xkb_kt_map_entry_next, "xcb_xkb_kt_map_entry_next");
function xcb_xkb_kt_map_entry_end
(i : xcb_xkb_kt_map_entry_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3563
pragma Import (C, xcb_xkb_kt_map_entry_end, "xcb_xkb_kt_map_entry_end");
function xcb_xkb_key_type_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:3566
pragma Import (C, xcb_xkb_key_type_sizeof, "xcb_xkb_key_type_sizeof");
function xcb_xkb_key_type_map
(R : access xcb_xkb_key_type_t)
return access xcb_xkb_kt_map_entry_t; -- /usr/include/xcb/xkb.h:3579
pragma Import (C, xcb_xkb_key_type_map, "xcb_xkb_key_type_map");
function xcb_xkb_key_type_map_length
(R : access xcb_xkb_key_type_t)
return int; -- /usr/include/xcb/xkb.h:3592
pragma Import
(C,
xcb_xkb_key_type_map_length,
"xcb_xkb_key_type_map_length");
function xcb_xkb_key_type_map_iterator
(R : access xcb_xkb_key_type_t)
return xcb_xkb_kt_map_entry_iterator_t; -- /usr/include/xcb/xkb.h:3605
pragma Import
(C,
xcb_xkb_key_type_map_iterator,
"xcb_xkb_key_type_map_iterator");
function xcb_xkb_key_type_preserve
(R : access xcb_xkb_key_type_t)
return access xcb_xkb_mod_def_t; -- /usr/include/xcb/xkb.h:3618
pragma Import (C, xcb_xkb_key_type_preserve, "xcb_xkb_key_type_preserve");
function xcb_xkb_key_type_preserve_length
(R : access xcb_xkb_key_type_t)
return int; -- /usr/include/xcb/xkb.h:3631
pragma Import
(C,
xcb_xkb_key_type_preserve_length,
"xcb_xkb_key_type_preserve_length");
function xcb_xkb_key_type_preserve_iterator
(R : access xcb_xkb_key_type_t)
return xcb_xkb_mod_def_iterator_t; -- /usr/include/xcb/xkb.h:3644
pragma Import
(C,
xcb_xkb_key_type_preserve_iterator,
"xcb_xkb_key_type_preserve_iterator");
procedure xcb_xkb_key_type_next
(i : access xcb_xkb_key_type_iterator_t); -- /usr/include/xcb/xkb.h:3665
pragma Import (C, xcb_xkb_key_type_next, "xcb_xkb_key_type_next");
function xcb_xkb_key_type_end
(i : xcb_xkb_key_type_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3687
pragma Import (C, xcb_xkb_key_type_end, "xcb_xkb_key_type_end");
function xcb_xkb_key_sym_map_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:3690
pragma Import (C, xcb_xkb_key_sym_map_sizeof, "xcb_xkb_key_sym_map_sizeof");
function xcb_xkb_key_sym_map_syms
(R : access xcb_xkb_key_sym_map_t)
return access XCB.XProto.xcb_keysym_t; -- /usr/include/xcb/xkb.h:3703
pragma Import (C, xcb_xkb_key_sym_map_syms, "xcb_xkb_key_sym_map_syms");
function xcb_xkb_key_sym_map_syms_length
(R : access xcb_xkb_key_sym_map_t)
return int; -- /usr/include/xcb/xkb.h:3716
pragma Import
(C,
xcb_xkb_key_sym_map_syms_length,
"xcb_xkb_key_sym_map_syms_length");
function xcb_xkb_key_sym_map_syms_end
(R : access xcb_xkb_key_sym_map_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3729
pragma Import
(C,
xcb_xkb_key_sym_map_syms_end,
"xcb_xkb_key_sym_map_syms_end");
procedure xcb_xkb_key_sym_map_next
(i : access xcb_xkb_key_sym_map_iterator_t); -- /usr/include/xcb/xkb.h:3750
pragma Import (C, xcb_xkb_key_sym_map_next, "xcb_xkb_key_sym_map_next");
function xcb_xkb_key_sym_map_end
(i : xcb_xkb_key_sym_map_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3772
pragma Import (C, xcb_xkb_key_sym_map_end, "xcb_xkb_key_sym_map_end");
procedure xcb_xkb_common_behavior_next
(i : access xcb_xkb_common_behavior_iterator_t); -- /usr/include/xcb/xkb.h:3793
pragma Import
(C,
xcb_xkb_common_behavior_next,
"xcb_xkb_common_behavior_next");
function xcb_xkb_common_behavior_end
(i : xcb_xkb_common_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3815
pragma Import
(C,
xcb_xkb_common_behavior_end,
"xcb_xkb_common_behavior_end");
procedure xcb_xkb_default_behavior_next
(i : access xcb_xkb_default_behavior_iterator_t); -- /usr/include/xcb/xkb.h:3836
pragma Import
(C,
xcb_xkb_default_behavior_next,
"xcb_xkb_default_behavior_next");
function xcb_xkb_default_behavior_end
(i : xcb_xkb_default_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3858
pragma Import
(C,
xcb_xkb_default_behavior_end,
"xcb_xkb_default_behavior_end");
procedure xcb_xkb_lock_behavior_next
(i : access xcb_xkb_lock_behavior_iterator_t); -- /usr/include/xcb/xkb.h:3879
pragma Import (C, xcb_xkb_lock_behavior_next, "xcb_xkb_lock_behavior_next");
function xcb_xkb_lock_behavior_end
(i : xcb_xkb_lock_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3901
pragma Import (C, xcb_xkb_lock_behavior_end, "xcb_xkb_lock_behavior_end");
procedure xcb_xkb_radio_group_behavior_next
(i : access xcb_xkb_radio_group_behavior_iterator_t); -- /usr/include/xcb/xkb.h:3922
pragma Import
(C,
xcb_xkb_radio_group_behavior_next,
"xcb_xkb_radio_group_behavior_next");
function xcb_xkb_radio_group_behavior_end
(i : xcb_xkb_radio_group_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3944
pragma Import
(C,
xcb_xkb_radio_group_behavior_end,
"xcb_xkb_radio_group_behavior_end");
procedure xcb_xkb_overlay_behavior_next
(i : access xcb_xkb_overlay_behavior_iterator_t); -- /usr/include/xcb/xkb.h:3965
pragma Import
(C,
xcb_xkb_overlay_behavior_next,
"xcb_xkb_overlay_behavior_next");
function xcb_xkb_overlay_behavior_end
(i : xcb_xkb_overlay_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:3987
pragma Import
(C,
xcb_xkb_overlay_behavior_end,
"xcb_xkb_overlay_behavior_end");
procedure xcb_xkb_permament_lock_behavior_next
(i : access xcb_xkb_permament_lock_behavior_iterator_t); -- /usr/include/xcb/xkb.h:4008
pragma Import
(C,
xcb_xkb_permament_lock_behavior_next,
"xcb_xkb_permament_lock_behavior_next");
function xcb_xkb_permament_lock_behavior_end
(i : xcb_xkb_permament_lock_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4030
pragma Import
(C,
xcb_xkb_permament_lock_behavior_end,
"xcb_xkb_permament_lock_behavior_end");
procedure xcb_xkb_permament_radio_group_behavior_next
(i : access xcb_xkb_permament_radio_group_behavior_iterator_t); -- /usr/include/xcb/xkb.h:4051
pragma Import
(C,
xcb_xkb_permament_radio_group_behavior_next,
"xcb_xkb_permament_radio_group_behavior_next");
function xcb_xkb_permament_radio_group_behavior_end
(i : xcb_xkb_permament_radio_group_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4073
pragma Import
(C,
xcb_xkb_permament_radio_group_behavior_end,
"xcb_xkb_permament_radio_group_behavior_end");
procedure xcb_xkb_permament_overlay_behavior_next
(i : access xcb_xkb_permament_overlay_behavior_iterator_t); -- /usr/include/xcb/xkb.h:4094
pragma Import
(C,
xcb_xkb_permament_overlay_behavior_next,
"xcb_xkb_permament_overlay_behavior_next");
function xcb_xkb_permament_overlay_behavior_end
(i : xcb_xkb_permament_overlay_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4116
pragma Import
(C,
xcb_xkb_permament_overlay_behavior_end,
"xcb_xkb_permament_overlay_behavior_end");
procedure xcb_xkb_behavior_next
(i : access xcb_xkb_behavior_iterator_t); -- /usr/include/xcb/xkb.h:4137
pragma Import (C, xcb_xkb_behavior_next, "xcb_xkb_behavior_next");
function xcb_xkb_behavior_end
(i : xcb_xkb_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4159
pragma Import (C, xcb_xkb_behavior_end, "xcb_xkb_behavior_end");
procedure xcb_xkb_set_behavior_next
(i : access xcb_xkb_set_behavior_iterator_t); -- /usr/include/xcb/xkb.h:4180
pragma Import (C, xcb_xkb_set_behavior_next, "xcb_xkb_set_behavior_next");
function xcb_xkb_set_behavior_end
(i : xcb_xkb_set_behavior_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4202
pragma Import (C, xcb_xkb_set_behavior_end, "xcb_xkb_set_behavior_end");
procedure xcb_xkb_set_explicit_next
(i : access xcb_xkb_set_explicit_iterator_t); -- /usr/include/xcb/xkb.h:4223
pragma Import (C, xcb_xkb_set_explicit_next, "xcb_xkb_set_explicit_next");
function xcb_xkb_set_explicit_end
(i : xcb_xkb_set_explicit_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4245
pragma Import (C, xcb_xkb_set_explicit_end, "xcb_xkb_set_explicit_end");
procedure xcb_xkb_key_mod_map_next
(i : access xcb_xkb_key_mod_map_iterator_t); -- /usr/include/xcb/xkb.h:4266
pragma Import (C, xcb_xkb_key_mod_map_next, "xcb_xkb_key_mod_map_next");
function xcb_xkb_key_mod_map_end
(i : xcb_xkb_key_mod_map_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4288
pragma Import (C, xcb_xkb_key_mod_map_end, "xcb_xkb_key_mod_map_end");
procedure xcb_xkb_key_v_mod_map_next
(i : access xcb_xkb_key_v_mod_map_iterator_t); -- /usr/include/xcb/xkb.h:4309
pragma Import (C, xcb_xkb_key_v_mod_map_next, "xcb_xkb_key_v_mod_map_next");
function xcb_xkb_key_v_mod_map_end
(i : xcb_xkb_key_v_mod_map_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4331
pragma Import (C, xcb_xkb_key_v_mod_map_end, "xcb_xkb_key_v_mod_map_end");
procedure xcb_xkb_kt_set_map_entry_next
(i : access xcb_xkb_kt_set_map_entry_iterator_t); -- /usr/include/xcb/xkb.h:4352
pragma Import
(C,
xcb_xkb_kt_set_map_entry_next,
"xcb_xkb_kt_set_map_entry_next");
function xcb_xkb_kt_set_map_entry_end
(i : xcb_xkb_kt_set_map_entry_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4374
pragma Import
(C,
xcb_xkb_kt_set_map_entry_end,
"xcb_xkb_kt_set_map_entry_end");
function xcb_xkb_set_key_type_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:4377
pragma Import
(C,
xcb_xkb_set_key_type_sizeof,
"xcb_xkb_set_key_type_sizeof");
function xcb_xkb_set_key_type_entries
(R : access xcb_xkb_set_key_type_t)
return access xcb_xkb_kt_set_map_entry_t; -- /usr/include/xcb/xkb.h:4390
pragma Import
(C,
xcb_xkb_set_key_type_entries,
"xcb_xkb_set_key_type_entries");
function xcb_xkb_set_key_type_entries_length
(R : access xcb_xkb_set_key_type_t)
return int; -- /usr/include/xcb/xkb.h:4403
pragma Import
(C,
xcb_xkb_set_key_type_entries_length,
"xcb_xkb_set_key_type_entries_length");
function xcb_xkb_set_key_type_entries_iterator
(R : access xcb_xkb_set_key_type_t)
return xcb_xkb_kt_set_map_entry_iterator_t; -- /usr/include/xcb/xkb.h:4416
pragma Import
(C,
xcb_xkb_set_key_type_entries_iterator,
"xcb_xkb_set_key_type_entries_iterator");
function xcb_xkb_set_key_type_preserve_entries
(R : access xcb_xkb_set_key_type_t)
return access xcb_xkb_kt_set_map_entry_t; -- /usr/include/xcb/xkb.h:4429
pragma Import
(C,
xcb_xkb_set_key_type_preserve_entries,
"xcb_xkb_set_key_type_preserve_entries");
function xcb_xkb_set_key_type_preserve_entries_length
(R : access xcb_xkb_set_key_type_t)
return int; -- /usr/include/xcb/xkb.h:4442
pragma Import
(C,
xcb_xkb_set_key_type_preserve_entries_length,
"xcb_xkb_set_key_type_preserve_entries_length");
function xcb_xkb_set_key_type_preserve_entries_iterator
(R : access xcb_xkb_set_key_type_t)
return xcb_xkb_kt_set_map_entry_iterator_t; -- /usr/include/xcb/xkb.h:4455
pragma Import
(C,
xcb_xkb_set_key_type_preserve_entries_iterator,
"xcb_xkb_set_key_type_preserve_entries_iterator");
procedure xcb_xkb_set_key_type_next
(i : access xcb_xkb_set_key_type_iterator_t); -- /usr/include/xcb/xkb.h:4476
pragma Import (C, xcb_xkb_set_key_type_next, "xcb_xkb_set_key_type_next");
function xcb_xkb_set_key_type_end
(i : xcb_xkb_set_key_type_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4498
pragma Import (C, xcb_xkb_set_key_type_end, "xcb_xkb_set_key_type_end");
procedure xcb_xkb_string8_next
(i : access xcb_xkb_string8_iterator_t); -- /usr/include/xcb/xkb.h:4519
pragma Import (C, xcb_xkb_string8_next, "xcb_xkb_string8_next");
function xcb_xkb_string8_end
(i : xcb_xkb_string8_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4541
pragma Import (C, xcb_xkb_string8_end, "xcb_xkb_string8_end");
function xcb_xkb_outline_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:4544
pragma Import (C, xcb_xkb_outline_sizeof, "xcb_xkb_outline_sizeof");
function xcb_xkb_outline_points
(R : access xcb_xkb_outline_t)
return access XCB.XProto.xcb_point_t; -- /usr/include/xcb/xkb.h:4557
pragma Import (C, xcb_xkb_outline_points, "xcb_xkb_outline_points");
function xcb_xkb_outline_points_length
(R : access xcb_xkb_outline_t) return int; -- /usr/include/xcb/xkb.h:4570
pragma Import
(C,
xcb_xkb_outline_points_length,
"xcb_xkb_outline_points_length");
function xcb_xkb_outline_points_iterator
(R : access xcb_xkb_outline_t)
return XCB.XProto.xcb_point_iterator_t; -- /usr/include/xcb/xkb.h:4583
pragma Import
(C,
xcb_xkb_outline_points_iterator,
"xcb_xkb_outline_points_iterator");
procedure xcb_xkb_outline_next
(i : access xcb_xkb_outline_iterator_t); -- /usr/include/xcb/xkb.h:4604
pragma Import (C, xcb_xkb_outline_next, "xcb_xkb_outline_next");
function xcb_xkb_outline_end
(i : xcb_xkb_outline_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4626
pragma Import (C, xcb_xkb_outline_end, "xcb_xkb_outline_end");
function xcb_xkb_shape_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:4629
pragma Import (C, xcb_xkb_shape_sizeof, "xcb_xkb_shape_sizeof");
function xcb_xkb_shape_outlines_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:4642
pragma Import
(C,
xcb_xkb_shape_outlines_length,
"xcb_xkb_shape_outlines_length");
function xcb_xkb_shape_outlines_iterator
(R : System.Address)
return xcb_xkb_outline_iterator_t; -- /usr/include/xcb/xkb.h:4655
pragma Import
(C,
xcb_xkb_shape_outlines_iterator,
"xcb_xkb_shape_outlines_iterator");
procedure xcb_xkb_shape_next
(i : access xcb_xkb_shape_iterator_t); -- /usr/include/xcb/xkb.h:4676
pragma Import (C, xcb_xkb_shape_next, "xcb_xkb_shape_next");
function xcb_xkb_shape_end
(i : xcb_xkb_shape_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4698
pragma Import (C, xcb_xkb_shape_end, "xcb_xkb_shape_end");
procedure xcb_xkb_key_next
(i : access xcb_xkb_key_iterator_t); -- /usr/include/xcb/xkb.h:4719
pragma Import (C, xcb_xkb_key_next, "xcb_xkb_key_next");
function xcb_xkb_key_end
(i : xcb_xkb_key_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4741
pragma Import (C, xcb_xkb_key_end, "xcb_xkb_key_end");
procedure xcb_xkb_overlay_key_next
(i : access xcb_xkb_overlay_key_iterator_t); -- /usr/include/xcb/xkb.h:4762
pragma Import (C, xcb_xkb_overlay_key_next, "xcb_xkb_overlay_key_next");
function xcb_xkb_overlay_key_end
(i : xcb_xkb_overlay_key_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4784
pragma Import (C, xcb_xkb_overlay_key_end, "xcb_xkb_overlay_key_end");
function xcb_xkb_overlay_row_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:4787
pragma Import (C, xcb_xkb_overlay_row_sizeof, "xcb_xkb_overlay_row_sizeof");
function xcb_xkb_overlay_row_keys
(R : System.Address)
return access xcb_xkb_overlay_key_t; -- /usr/include/xcb/xkb.h:4800
pragma Import (C, xcb_xkb_overlay_row_keys, "xcb_xkb_overlay_row_keys");
function xcb_xkb_overlay_row_keys_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:4813
pragma Import
(C,
xcb_xkb_overlay_row_keys_length,
"xcb_xkb_overlay_row_keys_length");
function xcb_xkb_overlay_row_keys_iterator
(R : System.Address)
return xcb_xkb_overlay_key_iterator_t; -- /usr/include/xcb/xkb.h:4826
pragma Import
(C,
xcb_xkb_overlay_row_keys_iterator,
"xcb_xkb_overlay_row_keys_iterator");
procedure xcb_xkb_overlay_row_next
(i : access xcb_xkb_overlay_row_iterator_t); -- /usr/include/xcb/xkb.h:4847
pragma Import (C, xcb_xkb_overlay_row_next, "xcb_xkb_overlay_row_next");
function xcb_xkb_overlay_row_end
(i : xcb_xkb_overlay_row_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4869
pragma Import (C, xcb_xkb_overlay_row_end, "xcb_xkb_overlay_row_end");
function xcb_xkb_overlay_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:4872
pragma Import (C, xcb_xkb_overlay_sizeof, "xcb_xkb_overlay_sizeof");
function xcb_xkb_overlay_rows_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:4885
pragma Import
(C,
xcb_xkb_overlay_rows_length,
"xcb_xkb_overlay_rows_length");
function xcb_xkb_overlay_rows_iterator
(R : System.Address)
return xcb_xkb_overlay_row_iterator_t; -- /usr/include/xcb/xkb.h:4898
pragma Import
(C,
xcb_xkb_overlay_rows_iterator,
"xcb_xkb_overlay_rows_iterator");
procedure xcb_xkb_overlay_next
(i : access xcb_xkb_overlay_iterator_t); -- /usr/include/xcb/xkb.h:4919
pragma Import (C, xcb_xkb_overlay_next, "xcb_xkb_overlay_next");
function xcb_xkb_overlay_end
(i : xcb_xkb_overlay_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:4941
pragma Import (C, xcb_xkb_overlay_end, "xcb_xkb_overlay_end");
function xcb_xkb_row_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:4944
pragma Import (C, xcb_xkb_row_sizeof, "xcb_xkb_row_sizeof");
function xcb_xkb_row_keys
(R : System.Address)
return access xcb_xkb_key_t; -- /usr/include/xcb/xkb.h:4957
pragma Import (C, xcb_xkb_row_keys, "xcb_xkb_row_keys");
function xcb_xkb_row_keys_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:4970
pragma Import (C, xcb_xkb_row_keys_length, "xcb_xkb_row_keys_length");
function xcb_xkb_row_keys_iterator
(R : System.Address)
return xcb_xkb_key_iterator_t; -- /usr/include/xcb/xkb.h:4983
pragma Import (C, xcb_xkb_row_keys_iterator, "xcb_xkb_row_keys_iterator");
procedure xcb_xkb_row_next
(i : access xcb_xkb_row_iterator_t); -- /usr/include/xcb/xkb.h:5004
pragma Import (C, xcb_xkb_row_next, "xcb_xkb_row_next");
function xcb_xkb_row_end
(i : xcb_xkb_row_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5026
pragma Import (C, xcb_xkb_row_end, "xcb_xkb_row_end");
function xcb_xkb_listing_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:5029
pragma Import (C, xcb_xkb_listing_sizeof, "xcb_xkb_listing_sizeof");
function xcb_xkb_listing_string
(R : System.Address)
return access xcb_xkb_string8_t; -- /usr/include/xcb/xkb.h:5042
pragma Import (C, xcb_xkb_listing_string, "xcb_xkb_listing_string");
function xcb_xkb_listing_string_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:5055
pragma Import
(C,
xcb_xkb_listing_string_length,
"xcb_xkb_listing_string_length");
function xcb_xkb_listing_string_end
(R : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5068
pragma Import (C, xcb_xkb_listing_string_end, "xcb_xkb_listing_string_end");
procedure xcb_xkb_listing_next
(i : access xcb_xkb_listing_iterator_t); -- /usr/include/xcb/xkb.h:5089
pragma Import (C, xcb_xkb_listing_next, "xcb_xkb_listing_next");
function xcb_xkb_listing_end
(i : xcb_xkb_listing_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5111
pragma Import (C, xcb_xkb_listing_end, "xcb_xkb_listing_end");
function xcb_xkb_device_led_info_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:5114
pragma Import
(C,
xcb_xkb_device_led_info_sizeof,
"xcb_xkb_device_led_info_sizeof");
function xcb_xkb_device_led_info_names
(R : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:5127
pragma Import
(C,
xcb_xkb_device_led_info_names,
"xcb_xkb_device_led_info_names");
function xcb_xkb_device_led_info_names_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:5140
pragma Import
(C,
xcb_xkb_device_led_info_names_length,
"xcb_xkb_device_led_info_names_length");
function xcb_xkb_device_led_info_names_end
(R : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5153
pragma Import
(C,
xcb_xkb_device_led_info_names_end,
"xcb_xkb_device_led_info_names_end");
function xcb_xkb_device_led_info_maps
(R : System.Address)
return access xcb_xkb_indicator_map_t; -- /usr/include/xcb/xkb.h:5166
pragma Import
(C,
xcb_xkb_device_led_info_maps,
"xcb_xkb_device_led_info_maps");
function xcb_xkb_device_led_info_maps_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:5179
pragma Import
(C,
xcb_xkb_device_led_info_maps_length,
"xcb_xkb_device_led_info_maps_length");
function xcb_xkb_device_led_info_maps_iterator
(R : System.Address)
return xcb_xkb_indicator_map_iterator_t; -- /usr/include/xcb/xkb.h:5192
pragma Import
(C,
xcb_xkb_device_led_info_maps_iterator,
"xcb_xkb_device_led_info_maps_iterator");
procedure xcb_xkb_device_led_info_next
(i : access xcb_xkb_device_led_info_iterator_t); -- /usr/include/xcb/xkb.h:5213
pragma Import
(C,
xcb_xkb_device_led_info_next,
"xcb_xkb_device_led_info_next");
function xcb_xkb_device_led_info_end
(i : xcb_xkb_device_led_info_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5235
pragma Import
(C,
xcb_xkb_device_led_info_end,
"xcb_xkb_device_led_info_end");
procedure xcb_xkb_sa_no_action_next
(i : access xcb_xkb_sa_no_action_iterator_t); -- /usr/include/xcb/xkb.h:5256
pragma Import (C, xcb_xkb_sa_no_action_next, "xcb_xkb_sa_no_action_next");
function xcb_xkb_sa_no_action_end
(i : xcb_xkb_sa_no_action_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5278
pragma Import (C, xcb_xkb_sa_no_action_end, "xcb_xkb_sa_no_action_end");
procedure xcb_xkb_sa_set_mods_next
(i : access xcb_xkb_sa_set_mods_iterator_t); -- /usr/include/xcb/xkb.h:5299
pragma Import (C, xcb_xkb_sa_set_mods_next, "xcb_xkb_sa_set_mods_next");
function xcb_xkb_sa_set_mods_end
(i : xcb_xkb_sa_set_mods_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5321
pragma Import (C, xcb_xkb_sa_set_mods_end, "xcb_xkb_sa_set_mods_end");
procedure xcb_xkb_sa_latch_mods_next
(i : access xcb_xkb_sa_latch_mods_iterator_t); -- /usr/include/xcb/xkb.h:5342
pragma Import (C, xcb_xkb_sa_latch_mods_next, "xcb_xkb_sa_latch_mods_next");
function xcb_xkb_sa_latch_mods_end
(i : xcb_xkb_sa_latch_mods_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5364
pragma Import (C, xcb_xkb_sa_latch_mods_end, "xcb_xkb_sa_latch_mods_end");
procedure xcb_xkb_sa_lock_mods_next
(i : access xcb_xkb_sa_lock_mods_iterator_t); -- /usr/include/xcb/xkb.h:5385
pragma Import (C, xcb_xkb_sa_lock_mods_next, "xcb_xkb_sa_lock_mods_next");
function xcb_xkb_sa_lock_mods_end
(i : xcb_xkb_sa_lock_mods_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5407
pragma Import (C, xcb_xkb_sa_lock_mods_end, "xcb_xkb_sa_lock_mods_end");
procedure xcb_xkb_sa_set_group_next
(i : access xcb_xkb_sa_set_group_iterator_t); -- /usr/include/xcb/xkb.h:5428
pragma Import (C, xcb_xkb_sa_set_group_next, "xcb_xkb_sa_set_group_next");
function xcb_xkb_sa_set_group_end
(i : xcb_xkb_sa_set_group_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5450
pragma Import (C, xcb_xkb_sa_set_group_end, "xcb_xkb_sa_set_group_end");
procedure xcb_xkb_sa_latch_group_next
(i : access xcb_xkb_sa_latch_group_iterator_t); -- /usr/include/xcb/xkb.h:5471
pragma Import
(C,
xcb_xkb_sa_latch_group_next,
"xcb_xkb_sa_latch_group_next");
function xcb_xkb_sa_latch_group_end
(i : xcb_xkb_sa_latch_group_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5493
pragma Import (C, xcb_xkb_sa_latch_group_end, "xcb_xkb_sa_latch_group_end");
procedure xcb_xkb_sa_lock_group_next
(i : access xcb_xkb_sa_lock_group_iterator_t); -- /usr/include/xcb/xkb.h:5514
pragma Import (C, xcb_xkb_sa_lock_group_next, "xcb_xkb_sa_lock_group_next");
function xcb_xkb_sa_lock_group_end
(i : xcb_xkb_sa_lock_group_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5536
pragma Import (C, xcb_xkb_sa_lock_group_end, "xcb_xkb_sa_lock_group_end");
procedure xcb_xkb_sa_move_ptr_next
(i : access xcb_xkb_sa_move_ptr_iterator_t); -- /usr/include/xcb/xkb.h:5557
pragma Import (C, xcb_xkb_sa_move_ptr_next, "xcb_xkb_sa_move_ptr_next");
function xcb_xkb_sa_move_ptr_end
(i : xcb_xkb_sa_move_ptr_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5579
pragma Import (C, xcb_xkb_sa_move_ptr_end, "xcb_xkb_sa_move_ptr_end");
procedure xcb_xkb_sa_ptr_btn_next
(i : access xcb_xkb_sa_ptr_btn_iterator_t); -- /usr/include/xcb/xkb.h:5600
pragma Import (C, xcb_xkb_sa_ptr_btn_next, "xcb_xkb_sa_ptr_btn_next");
function xcb_xkb_sa_ptr_btn_end
(i : xcb_xkb_sa_ptr_btn_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5622
pragma Import (C, xcb_xkb_sa_ptr_btn_end, "xcb_xkb_sa_ptr_btn_end");
procedure xcb_xkb_sa_lock_ptr_btn_next
(i : access xcb_xkb_sa_lock_ptr_btn_iterator_t); -- /usr/include/xcb/xkb.h:5643
pragma Import
(C,
xcb_xkb_sa_lock_ptr_btn_next,
"xcb_xkb_sa_lock_ptr_btn_next");
function xcb_xkb_sa_lock_ptr_btn_end
(i : xcb_xkb_sa_lock_ptr_btn_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5665
pragma Import
(C,
xcb_xkb_sa_lock_ptr_btn_end,
"xcb_xkb_sa_lock_ptr_btn_end");
procedure xcb_xkb_sa_set_ptr_dflt_next
(i : access xcb_xkb_sa_set_ptr_dflt_iterator_t); -- /usr/include/xcb/xkb.h:5686
pragma Import
(C,
xcb_xkb_sa_set_ptr_dflt_next,
"xcb_xkb_sa_set_ptr_dflt_next");
function xcb_xkb_sa_set_ptr_dflt_end
(i : xcb_xkb_sa_set_ptr_dflt_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5708
pragma Import
(C,
xcb_xkb_sa_set_ptr_dflt_end,
"xcb_xkb_sa_set_ptr_dflt_end");
procedure xcb_xkb_sa_iso_lock_next
(i : access xcb_xkb_sa_iso_lock_iterator_t); -- /usr/include/xcb/xkb.h:5729
pragma Import (C, xcb_xkb_sa_iso_lock_next, "xcb_xkb_sa_iso_lock_next");
function xcb_xkb_sa_iso_lock_end
(i : xcb_xkb_sa_iso_lock_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5751
pragma Import (C, xcb_xkb_sa_iso_lock_end, "xcb_xkb_sa_iso_lock_end");
procedure xcb_xkb_sa_terminate_next
(i : access xcb_xkb_sa_terminate_iterator_t); -- /usr/include/xcb/xkb.h:5772
pragma Import (C, xcb_xkb_sa_terminate_next, "xcb_xkb_sa_terminate_next");
function xcb_xkb_sa_terminate_end
(i : xcb_xkb_sa_terminate_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5794
pragma Import (C, xcb_xkb_sa_terminate_end, "xcb_xkb_sa_terminate_end");
procedure xcb_xkb_sa_switch_screen_next
(i : access xcb_xkb_sa_switch_screen_iterator_t); -- /usr/include/xcb/xkb.h:5815
pragma Import
(C,
xcb_xkb_sa_switch_screen_next,
"xcb_xkb_sa_switch_screen_next");
function xcb_xkb_sa_switch_screen_end
(i : xcb_xkb_sa_switch_screen_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5837
pragma Import
(C,
xcb_xkb_sa_switch_screen_end,
"xcb_xkb_sa_switch_screen_end");
procedure xcb_xkb_sa_set_controls_next
(i : access xcb_xkb_sa_set_controls_iterator_t); -- /usr/include/xcb/xkb.h:5858
pragma Import
(C,
xcb_xkb_sa_set_controls_next,
"xcb_xkb_sa_set_controls_next");
function xcb_xkb_sa_set_controls_end
(i : xcb_xkb_sa_set_controls_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5880
pragma Import
(C,
xcb_xkb_sa_set_controls_end,
"xcb_xkb_sa_set_controls_end");
procedure xcb_xkb_sa_lock_controls_next
(i : access xcb_xkb_sa_lock_controls_iterator_t); -- /usr/include/xcb/xkb.h:5901
pragma Import
(C,
xcb_xkb_sa_lock_controls_next,
"xcb_xkb_sa_lock_controls_next");
function xcb_xkb_sa_lock_controls_end
(i : xcb_xkb_sa_lock_controls_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5923
pragma Import
(C,
xcb_xkb_sa_lock_controls_end,
"xcb_xkb_sa_lock_controls_end");
procedure xcb_xkb_sa_action_message_next
(i : access xcb_xkb_sa_action_message_iterator_t); -- /usr/include/xcb/xkb.h:5944
pragma Import
(C,
xcb_xkb_sa_action_message_next,
"xcb_xkb_sa_action_message_next");
function xcb_xkb_sa_action_message_end
(i : xcb_xkb_sa_action_message_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:5966
pragma Import
(C,
xcb_xkb_sa_action_message_end,
"xcb_xkb_sa_action_message_end");
procedure xcb_xkb_sa_redirect_key_next
(i : access xcb_xkb_sa_redirect_key_iterator_t); -- /usr/include/xcb/xkb.h:5987
pragma Import
(C,
xcb_xkb_sa_redirect_key_next,
"xcb_xkb_sa_redirect_key_next");
function xcb_xkb_sa_redirect_key_end
(i : xcb_xkb_sa_redirect_key_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:6009
pragma Import
(C,
xcb_xkb_sa_redirect_key_end,
"xcb_xkb_sa_redirect_key_end");
procedure xcb_xkb_sa_device_btn_next
(i : access xcb_xkb_sa_device_btn_iterator_t); -- /usr/include/xcb/xkb.h:6030
pragma Import (C, xcb_xkb_sa_device_btn_next, "xcb_xkb_sa_device_btn_next");
function xcb_xkb_sa_device_btn_end
(i : xcb_xkb_sa_device_btn_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:6052
pragma Import (C, xcb_xkb_sa_device_btn_end, "xcb_xkb_sa_device_btn_end");
procedure xcb_xkb_sa_lock_device_btn_next
(i : access xcb_xkb_sa_lock_device_btn_iterator_t); -- /usr/include/xcb/xkb.h:6073
pragma Import
(C,
xcb_xkb_sa_lock_device_btn_next,
"xcb_xkb_sa_lock_device_btn_next");
function xcb_xkb_sa_lock_device_btn_end
(i : xcb_xkb_sa_lock_device_btn_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:6095
pragma Import
(C,
xcb_xkb_sa_lock_device_btn_end,
"xcb_xkb_sa_lock_device_btn_end");
procedure xcb_xkb_sa_device_valuator_next
(i : access xcb_xkb_sa_device_valuator_iterator_t); -- /usr/include/xcb/xkb.h:6116
pragma Import
(C,
xcb_xkb_sa_device_valuator_next,
"xcb_xkb_sa_device_valuator_next");
function xcb_xkb_sa_device_valuator_end
(i : xcb_xkb_sa_device_valuator_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:6138
pragma Import
(C,
xcb_xkb_sa_device_valuator_end,
"xcb_xkb_sa_device_valuator_end");
procedure xcb_xkb_si_action_next
(i : access xcb_xkb_si_action_iterator_t); -- /usr/include/xcb/xkb.h:6159
pragma Import (C, xcb_xkb_si_action_next, "xcb_xkb_si_action_next");
function xcb_xkb_si_action_end
(i : xcb_xkb_si_action_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:6181
pragma Import (C, xcb_xkb_si_action_end, "xcb_xkb_si_action_end");
procedure xcb_xkb_sym_interpret_next
(i : access xcb_xkb_sym_interpret_iterator_t); -- /usr/include/xcb/xkb.h:6202
pragma Import (C, xcb_xkb_sym_interpret_next, "xcb_xkb_sym_interpret_next");
function xcb_xkb_sym_interpret_end
(i : xcb_xkb_sym_interpret_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:6224
pragma Import (C, xcb_xkb_sym_interpret_end, "xcb_xkb_sym_interpret_end");
procedure xcb_xkb_action_next
(i : access xcb_xkb_action_iterator_t); -- /usr/include/xcb/xkb.h:6245
pragma Import (C, xcb_xkb_action_next, "xcb_xkb_action_next");
function xcb_xkb_action_end
(i : xcb_xkb_action_iterator_t)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:6267
pragma Import (C, xcb_xkb_action_end, "xcb_xkb_action_end");
function xcb_xkb_use_extension
(c : xcb_connection_t_access;
wantedMajor : Libc.Stdint.uint16_t;
wantedMinor : Libc.Stdint.uint16_t)
return xcb_xkb_use_extension_cookie_t; -- /usr/include/xcb/xkb.h:6290
pragma Import (C, xcb_xkb_use_extension, "xcb_xkb_use_extension");
function xcb_xkb_use_extension_unchecked
(c : xcb_connection_t_access;
wantedMajor : Libc.Stdint.uint16_t;
wantedMinor : Libc.Stdint.uint16_t)
return xcb_xkb_use_extension_cookie_t; -- /usr/include/xcb/xkb.h:6318
pragma Import
(C,
xcb_xkb_use_extension_unchecked,
"xcb_xkb_use_extension_unchecked");
function xcb_xkb_use_extension_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_use_extension_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_use_extension_reply_t; -- /usr/include/xcb/xkb.h:6349
pragma Import
(C,
xcb_xkb_use_extension_reply,
"xcb_xkb_use_extension_reply");
function xcb_xkb_select_events_details_serialize
(u_buffer : System.Address;
affectWhich : Libc.Stdint.uint16_t;
clear : Libc.Stdint.uint16_t;
selectAll : Libc.Stdint.uint16_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:6354
pragma Import
(C,
xcb_xkb_select_events_details_serialize,
"xcb_xkb_select_events_details_serialize");
function xcb_xkb_select_events_details_unpack
(u_buffer : System.Address;
affectWhich : Libc.Stdint.uint16_t;
clear : Libc.Stdint.uint16_t;
selectAll : Libc.Stdint.uint16_t;
u_aux : access xcb_xkb_select_events_details_t)
return int; -- /usr/include/xcb/xkb.h:6361
pragma Import
(C,
xcb_xkb_select_events_details_unpack,
"xcb_xkb_select_events_details_unpack");
function xcb_xkb_select_events_details_sizeof
(u_buffer : System.Address;
affectWhich : Libc.Stdint.uint16_t;
clear : Libc.Stdint.uint16_t;
selectAll : Libc.Stdint.uint16_t)
return int; -- /usr/include/xcb/xkb.h:6368
pragma Import
(C,
xcb_xkb_select_events_details_sizeof,
"xcb_xkb_select_events_details_sizeof");
function xcb_xkb_select_events_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectWhich : Libc.Stdint.uint16_t;
clear : Libc.Stdint.uint16_t;
selectAll : Libc.Stdint.uint16_t;
affectMap : Libc.Stdint.uint16_t;
map : Libc.Stdint.uint16_t;
details : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6402
pragma Import
(C,
xcb_xkb_select_events_checked,
"xcb_xkb_select_events_checked");
function xcb_xkb_select_events
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectWhich : Libc.Stdint.uint16_t;
clear : Libc.Stdint.uint16_t;
selectAll : Libc.Stdint.uint16_t;
affectMap : Libc.Stdint.uint16_t;
map : Libc.Stdint.uint16_t;
details : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6437
pragma Import (C, xcb_xkb_select_events, "xcb_xkb_select_events");
function xcb_xkb_select_events_aux_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectWhich : Libc.Stdint.uint16_t;
clear : Libc.Stdint.uint16_t;
selectAll : Libc.Stdint.uint16_t;
affectMap : Libc.Stdint.uint16_t;
map : Libc.Stdint.uint16_t;
details : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6475
pragma Import
(C,
xcb_xkb_select_events_aux_checked,
"xcb_xkb_select_events_aux_checked");
function xcb_xkb_select_events_aux
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectWhich : Libc.Stdint.uint16_t;
clear : Libc.Stdint.uint16_t;
selectAll : Libc.Stdint.uint16_t;
affectMap : Libc.Stdint.uint16_t;
map : Libc.Stdint.uint16_t;
details : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6510
pragma Import (C, xcb_xkb_select_events_aux, "xcb_xkb_select_events_aux");
function xcb_xkb_bell_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
bellClass : xcb_xkb_bell_class_spec_t;
bellID : xcb_xkb_id_spec_t;
percent : Libc.Stdint.int8_t;
forceSound : Libc.Stdint.uint8_t;
eventOnly : Libc.Stdint.uint8_t;
pitch : Libc.Stdint.int16_t;
duration : Libc.Stdint.int16_t;
name : XCB.XProto.xcb_atom_t;
window : XCB.XProto.xcb_window_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6551
pragma Import (C, xcb_xkb_bell_checked, "xcb_xkb_bell_checked");
function xcb_xkb_bell
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
bellClass : xcb_xkb_bell_class_spec_t;
bellID : xcb_xkb_id_spec_t;
percent : Libc.Stdint.int8_t;
forceSound : Libc.Stdint.uint8_t;
eventOnly : Libc.Stdint.uint8_t;
pitch : Libc.Stdint.int16_t;
duration : Libc.Stdint.int16_t;
name : XCB.XProto.xcb_atom_t;
window : XCB.XProto.xcb_window_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6592
pragma Import (C, xcb_xkb_bell, "xcb_xkb_bell");
function xcb_xkb_get_state
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t)
return xcb_xkb_get_state_cookie_t; -- /usr/include/xcb/xkb.h:6624
pragma Import (C, xcb_xkb_get_state, "xcb_xkb_get_state");
function xcb_xkb_get_state_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t)
return xcb_xkb_get_state_cookie_t; -- /usr/include/xcb/xkb.h:6650
pragma Import
(C,
xcb_xkb_get_state_unchecked,
"xcb_xkb_get_state_unchecked");
function xcb_xkb_get_state_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_state_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_state_reply_t; -- /usr/include/xcb/xkb.h:6680
pragma Import (C, xcb_xkb_get_state_reply, "xcb_xkb_get_state_reply");
function xcb_xkb_latch_lock_state_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectModLocks : Libc.Stdint.uint8_t;
modLocks : Libc.Stdint.uint8_t;
lockGroup : Libc.Stdint.uint8_t;
groupLock : Libc.Stdint.uint8_t;
affectModLatches : Libc.Stdint.uint8_t;
latchGroup : Libc.Stdint.uint8_t;
groupLatch : Libc.Stdint.uint16_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6714
pragma Import
(C,
xcb_xkb_latch_lock_state_checked,
"xcb_xkb_latch_lock_state_checked");
function xcb_xkb_latch_lock_state
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectModLocks : Libc.Stdint.uint8_t;
modLocks : Libc.Stdint.uint8_t;
lockGroup : Libc.Stdint.uint8_t;
groupLock : Libc.Stdint.uint8_t;
affectModLatches : Libc.Stdint.uint8_t;
latchGroup : Libc.Stdint.uint8_t;
groupLatch : Libc.Stdint.uint16_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6751
pragma Import (C, xcb_xkb_latch_lock_state, "xcb_xkb_latch_lock_state");
function xcb_xkb_get_controls
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t)
return xcb_xkb_get_controls_cookie_t; -- /usr/include/xcb/xkb.h:6781
pragma Import (C, xcb_xkb_get_controls, "xcb_xkb_get_controls");
function xcb_xkb_get_controls_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t)
return xcb_xkb_get_controls_cookie_t; -- /usr/include/xcb/xkb.h:6807
pragma Import
(C,
xcb_xkb_get_controls_unchecked,
"xcb_xkb_get_controls_unchecked");
function xcb_xkb_get_controls_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_controls_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_controls_reply_t; -- /usr/include/xcb/xkb.h:6837
pragma Import (C, xcb_xkb_get_controls_reply, "xcb_xkb_get_controls_reply");
function xcb_xkb_set_controls_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectInternalRealMods : Libc.Stdint.uint8_t;
internalRealMods : Libc.Stdint.uint8_t;
affectIgnoreLockRealMods : Libc.Stdint.uint8_t;
ignoreLockRealMods : Libc.Stdint.uint8_t;
affectInternalVirtualMods : Libc.Stdint.uint16_t;
internalVirtualMods : Libc.Stdint.uint16_t;
affectIgnoreLockVirtualMods : Libc.Stdint.uint16_t;
ignoreLockVirtualMods : Libc.Stdint.uint16_t;
mouseKeysDfltBtn : Libc.Stdint.uint8_t;
groupsWrap : Libc.Stdint.uint8_t;
accessXOptions : Libc.Stdint.uint16_t;
affectEnabledControls : Libc.Stdint.uint32_t;
enabledControls : Libc.Stdint.uint32_t;
changeControls : Libc.Stdint.uint32_t;
repeatDelay : Libc.Stdint.uint16_t;
repeatInterval : Libc.Stdint.uint16_t;
slowKeysDelay : Libc.Stdint.uint16_t;
debounceDelay : Libc.Stdint.uint16_t;
mouseKeysDelay : Libc.Stdint.uint16_t;
mouseKeysInterval : Libc.Stdint.uint16_t;
mouseKeysTimeToMax : Libc.Stdint.uint16_t;
mouseKeysMaxSpeed : Libc.Stdint.uint16_t;
mouseKeysCurve : Libc.Stdint.int16_t;
accessXTimeout : Libc.Stdint.uint16_t;
accessXTimeoutMask : Libc.Stdint.uint32_t;
accessXTimeoutValues : Libc.Stdint.uint32_t;
accessXTimeoutOptionsMask : Libc.Stdint.uint16_t;
accessXTimeoutOptionsValues : Libc.Stdint.uint16_t;
perKeyRepeat : access Libc.Stdint.uint8_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6893
pragma Import
(C,
xcb_xkb_set_controls_checked,
"xcb_xkb_set_controls_checked");
function xcb_xkb_set_controls
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
affectInternalRealMods : Libc.Stdint.uint8_t;
internalRealMods : Libc.Stdint.uint8_t;
affectIgnoreLockRealMods : Libc.Stdint.uint8_t;
ignoreLockRealMods : Libc.Stdint.uint8_t;
affectInternalVirtualMods : Libc.Stdint.uint16_t;
internalVirtualMods : Libc.Stdint.uint16_t;
affectIgnoreLockVirtualMods : Libc.Stdint.uint16_t;
ignoreLockVirtualMods : Libc.Stdint.uint16_t;
mouseKeysDfltBtn : Libc.Stdint.uint8_t;
groupsWrap : Libc.Stdint.uint8_t;
accessXOptions : Libc.Stdint.uint16_t;
affectEnabledControls : Libc.Stdint.uint32_t;
enabledControls : Libc.Stdint.uint32_t;
changeControls : Libc.Stdint.uint32_t;
repeatDelay : Libc.Stdint.uint16_t;
repeatInterval : Libc.Stdint.uint16_t;
slowKeysDelay : Libc.Stdint.uint16_t;
debounceDelay : Libc.Stdint.uint16_t;
mouseKeysDelay : Libc.Stdint.uint16_t;
mouseKeysInterval : Libc.Stdint.uint16_t;
mouseKeysTimeToMax : Libc.Stdint.uint16_t;
mouseKeysMaxSpeed : Libc.Stdint.uint16_t;
mouseKeysCurve : Libc.Stdint.int16_t;
accessXTimeout : Libc.Stdint.uint16_t;
accessXTimeoutMask : Libc.Stdint.uint32_t;
accessXTimeoutValues : Libc.Stdint.uint32_t;
accessXTimeoutOptionsMask : Libc.Stdint.uint16_t;
accessXTimeoutOptionsValues : Libc.Stdint.uint16_t;
perKeyRepeat : access Libc.Stdint.uint8_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:6974
pragma Import (C, xcb_xkb_set_controls, "xcb_xkb_set_controls");
function xcb_xkb_get_map_map_types_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7017
pragma Import
(C,
xcb_xkb_get_map_map_types_rtrn_length,
"xcb_xkb_get_map_map_types_rtrn_length");
function xcb_xkb_get_map_map_types_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_type_iterator_t; -- /usr/include/xcb/xkb.h:7031
pragma Import
(C,
xcb_xkb_get_map_map_types_rtrn_iterator,
"xcb_xkb_get_map_map_types_rtrn_iterator");
function xcb_xkb_get_map_map_syms_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7045
pragma Import
(C,
xcb_xkb_get_map_map_syms_rtrn_length,
"xcb_xkb_get_map_map_syms_rtrn_length");
function xcb_xkb_get_map_map_syms_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_sym_map_iterator_t; -- /usr/include/xcb/xkb.h:7059
pragma Import
(C,
xcb_xkb_get_map_map_syms_rtrn_iterator,
"xcb_xkb_get_map_map_syms_rtrn_iterator");
function xcb_xkb_get_map_map_acts_rtrn_count
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:7073
pragma Import
(C,
xcb_xkb_get_map_map_acts_rtrn_count,
"xcb_xkb_get_map_map_acts_rtrn_count");
function xcb_xkb_get_map_map_acts_rtrn_count_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7086
pragma Import
(C,
xcb_xkb_get_map_map_acts_rtrn_count_length,
"xcb_xkb_get_map_map_acts_rtrn_count_length");
function xcb_xkb_get_map_map_acts_rtrn_count_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7100
pragma Import
(C,
xcb_xkb_get_map_map_acts_rtrn_count_end,
"xcb_xkb_get_map_map_acts_rtrn_count_end");
function xcb_xkb_get_map_map_alignment_pad
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:7114
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad,
"xcb_xkb_get_map_map_alignment_pad");
function xcb_xkb_get_map_map_alignment_pad_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7127
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_length,
"xcb_xkb_get_map_map_alignment_pad_length");
function xcb_xkb_get_map_map_alignment_pad_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7141
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_end,
"xcb_xkb_get_map_map_alignment_pad_end");
function xcb_xkb_get_map_map_acts_rtrn_acts
(S : System.Address)
return access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:7155
pragma Import
(C,
xcb_xkb_get_map_map_acts_rtrn_acts,
"xcb_xkb_get_map_map_acts_rtrn_acts");
function xcb_xkb_get_map_map_acts_rtrn_acts_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7168
pragma Import
(C,
xcb_xkb_get_map_map_acts_rtrn_acts_length,
"xcb_xkb_get_map_map_acts_rtrn_acts_length");
function xcb_xkb_get_map_map_acts_rtrn_acts_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_action_iterator_t; -- /usr/include/xcb/xkb.h:7182
pragma Import
(C,
xcb_xkb_get_map_map_acts_rtrn_acts_iterator,
"xcb_xkb_get_map_map_acts_rtrn_acts_iterator");
function xcb_xkb_get_map_map_behaviors_rtrn
(S : System.Address)
return access xcb_xkb_set_behavior_t; -- /usr/include/xcb/xkb.h:7196
pragma Import
(C,
xcb_xkb_get_map_map_behaviors_rtrn,
"xcb_xkb_get_map_map_behaviors_rtrn");
function xcb_xkb_get_map_map_behaviors_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7209
pragma Import
(C,
xcb_xkb_get_map_map_behaviors_rtrn_length,
"xcb_xkb_get_map_map_behaviors_rtrn_length");
function xcb_xkb_get_map_map_behaviors_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_set_behavior_iterator_t; -- /usr/include/xcb/xkb.h:7223
pragma Import
(C,
xcb_xkb_get_map_map_behaviors_rtrn_iterator,
"xcb_xkb_get_map_map_behaviors_rtrn_iterator");
function xcb_xkb_get_map_map_vmods_rtrn
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:7237
pragma Import
(C,
xcb_xkb_get_map_map_vmods_rtrn,
"xcb_xkb_get_map_map_vmods_rtrn");
function xcb_xkb_get_map_map_vmods_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7250
pragma Import
(C,
xcb_xkb_get_map_map_vmods_rtrn_length,
"xcb_xkb_get_map_map_vmods_rtrn_length");
function xcb_xkb_get_map_map_vmods_rtrn_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7264
pragma Import
(C,
xcb_xkb_get_map_map_vmods_rtrn_end,
"xcb_xkb_get_map_map_vmods_rtrn_end");
function xcb_xkb_get_map_map_alignment_pad_2
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:7278
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_2,
"xcb_xkb_get_map_map_alignment_pad_2");
function xcb_xkb_get_map_map_alignment_pad_2_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7291
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_2_length,
"xcb_xkb_get_map_map_alignment_pad_2_length");
function xcb_xkb_get_map_map_alignment_pad_2_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7305
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_2_end,
"xcb_xkb_get_map_map_alignment_pad_2_end");
function xcb_xkb_get_map_map_explicit_rtrn
(S : System.Address)
return access xcb_xkb_set_explicit_t; -- /usr/include/xcb/xkb.h:7319
pragma Import
(C,
xcb_xkb_get_map_map_explicit_rtrn,
"xcb_xkb_get_map_map_explicit_rtrn");
function xcb_xkb_get_map_map_explicit_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7332
pragma Import
(C,
xcb_xkb_get_map_map_explicit_rtrn_length,
"xcb_xkb_get_map_map_explicit_rtrn_length");
function xcb_xkb_get_map_map_explicit_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_set_explicit_iterator_t; -- /usr/include/xcb/xkb.h:7346
pragma Import
(C,
xcb_xkb_get_map_map_explicit_rtrn_iterator,
"xcb_xkb_get_map_map_explicit_rtrn_iterator");
function xcb_xkb_get_map_map_alignment_pad_3
(S : System.Address)
return access Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:7360
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_3,
"xcb_xkb_get_map_map_alignment_pad_3");
function xcb_xkb_get_map_map_alignment_pad_3_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7373
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_3_length,
"xcb_xkb_get_map_map_alignment_pad_3_length");
function xcb_xkb_get_map_map_alignment_pad_3_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7387
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_3_end,
"xcb_xkb_get_map_map_alignment_pad_3_end");
function xcb_xkb_get_map_map_modmap_rtrn
(S : System.Address)
return access xcb_xkb_key_mod_map_t; -- /usr/include/xcb/xkb.h:7401
pragma Import
(C,
xcb_xkb_get_map_map_modmap_rtrn,
"xcb_xkb_get_map_map_modmap_rtrn");
function xcb_xkb_get_map_map_modmap_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7414
pragma Import
(C,
xcb_xkb_get_map_map_modmap_rtrn_length,
"xcb_xkb_get_map_map_modmap_rtrn_length");
function xcb_xkb_get_map_map_modmap_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_mod_map_iterator_t; -- /usr/include/xcb/xkb.h:7428
pragma Import
(C,
xcb_xkb_get_map_map_modmap_rtrn_iterator,
"xcb_xkb_get_map_map_modmap_rtrn_iterator");
function xcb_xkb_get_map_map_alignment_pad_4
(S : System.Address)
return access Libc.Stdint.uint16_t; -- /usr/include/xcb/xkb.h:7442
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_4,
"xcb_xkb_get_map_map_alignment_pad_4");
function xcb_xkb_get_map_map_alignment_pad_4_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7455
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_4_length,
"xcb_xkb_get_map_map_alignment_pad_4_length");
function xcb_xkb_get_map_map_alignment_pad_4_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7469
pragma Import
(C,
xcb_xkb_get_map_map_alignment_pad_4_end,
"xcb_xkb_get_map_map_alignment_pad_4_end");
function xcb_xkb_get_map_map_vmodmap_rtrn
(S : System.Address)
return access xcb_xkb_key_v_mod_map_t; -- /usr/include/xcb/xkb.h:7483
pragma Import
(C,
xcb_xkb_get_map_map_vmodmap_rtrn,
"xcb_xkb_get_map_map_vmodmap_rtrn");
function xcb_xkb_get_map_map_vmodmap_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7496
pragma Import
(C,
xcb_xkb_get_map_map_vmodmap_rtrn_length,
"xcb_xkb_get_map_map_vmodmap_rtrn_length");
function xcb_xkb_get_map_map_vmodmap_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_v_mod_map_iterator_t; -- /usr/include/xcb/xkb.h:7510
pragma Import
(C,
xcb_xkb_get_map_map_vmodmap_rtrn_iterator,
"xcb_xkb_get_map_map_vmodmap_rtrn_iterator");
function xcb_xkb_get_map_map_serialize
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:7514
pragma Import
(C,
xcb_xkb_get_map_map_serialize,
"xcb_xkb_get_map_map_serialize");
function xcb_xkb_get_map_map_unpack
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t;
u_aux : access xcb_xkb_get_map_map_t)
return int; -- /usr/include/xcb/xkb.h:7528
pragma Import (C, xcb_xkb_get_map_map_unpack, "xcb_xkb_get_map_map_unpack");
function xcb_xkb_get_map_map_sizeof
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t)
return int; -- /usr/include/xcb/xkb.h:7542
pragma Import (C, xcb_xkb_get_map_map_sizeof, "xcb_xkb_get_map_map_sizeof");
function xcb_xkb_get_map
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
full : Libc.Stdint.uint16_t;
partial : Libc.Stdint.uint16_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKeySym : XCB.XProto.xcb_keycode_t;
nKeySyms : Libc.Stdint.uint8_t;
firstKeyAction : XCB.XProto.xcb_keycode_t;
nKeyActions : Libc.Stdint.uint8_t;
firstKeyBehavior : XCB.XProto.xcb_keycode_t;
nKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
firstKeyExplicit : XCB.XProto.xcb_keycode_t;
nKeyExplicit : Libc.Stdint.uint8_t;
firstModMapKey : XCB.XProto.xcb_keycode_t;
nModMapKeys : Libc.Stdint.uint8_t;
firstVModMapKey : XCB.XProto.xcb_keycode_t;
nVModMapKeys : Libc.Stdint.uint8_t)
return xcb_xkb_get_map_cookie_t; -- /usr/include/xcb/xkb.h:7591
pragma Import (C, xcb_xkb_get_map, "xcb_xkb_get_map");
function xcb_xkb_get_map_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
full : Libc.Stdint.uint16_t;
partial : Libc.Stdint.uint16_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKeySym : XCB.XProto.xcb_keycode_t;
nKeySyms : Libc.Stdint.uint8_t;
firstKeyAction : XCB.XProto.xcb_keycode_t;
nKeyActions : Libc.Stdint.uint8_t;
firstKeyBehavior : XCB.XProto.xcb_keycode_t;
nKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
firstKeyExplicit : XCB.XProto.xcb_keycode_t;
nKeyExplicit : Libc.Stdint.uint8_t;
firstModMapKey : XCB.XProto.xcb_keycode_t;
nModMapKeys : Libc.Stdint.uint8_t;
firstVModMapKey : XCB.XProto.xcb_keycode_t;
nVModMapKeys : Libc.Stdint.uint8_t)
return xcb_xkb_get_map_cookie_t; -- /usr/include/xcb/xkb.h:7651
pragma Import (C, xcb_xkb_get_map_unchecked, "xcb_xkb_get_map_unchecked");
function xcb_xkb_get_map_map
(R : System.Address)
return System.Address; -- /usr/include/xcb/xkb.h:7682
pragma Import (C, xcb_xkb_get_map_map, "xcb_xkb_get_map_map");
function xcb_xkb_get_map_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_map_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_map_reply_t; -- /usr/include/xcb/xkb.h:7711
pragma Import (C, xcb_xkb_get_map_reply, "xcb_xkb_get_map_reply");
function xcb_xkb_set_map_values_types_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7726
pragma Import
(C,
xcb_xkb_set_map_values_types_length,
"xcb_xkb_set_map_values_types_length");
function xcb_xkb_set_map_values_types_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_set_key_type_iterator_t; -- /usr/include/xcb/xkb.h:7740
pragma Import
(C,
xcb_xkb_set_map_values_types_iterator,
"xcb_xkb_set_map_values_types_iterator");
function xcb_xkb_set_map_values_syms_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7754
pragma Import
(C,
xcb_xkb_set_map_values_syms_length,
"xcb_xkb_set_map_values_syms_length");
function xcb_xkb_set_map_values_syms_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_sym_map_iterator_t; -- /usr/include/xcb/xkb.h:7768
pragma Import
(C,
xcb_xkb_set_map_values_syms_iterator,
"xcb_xkb_set_map_values_syms_iterator");
function xcb_xkb_set_map_values_actions_count
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:7782
pragma Import
(C,
xcb_xkb_set_map_values_actions_count,
"xcb_xkb_set_map_values_actions_count");
function xcb_xkb_set_map_values_actions_count_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7795
pragma Import
(C,
xcb_xkb_set_map_values_actions_count_length,
"xcb_xkb_set_map_values_actions_count_length");
function xcb_xkb_set_map_values_actions_count_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7809
pragma Import
(C,
xcb_xkb_set_map_values_actions_count_end,
"xcb_xkb_set_map_values_actions_count_end");
function xcb_xkb_set_map_values_actions
(S : System.Address)
return access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:7823
pragma Import
(C,
xcb_xkb_set_map_values_actions,
"xcb_xkb_set_map_values_actions");
function xcb_xkb_set_map_values_actions_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7836
pragma Import
(C,
xcb_xkb_set_map_values_actions_length,
"xcb_xkb_set_map_values_actions_length");
function xcb_xkb_set_map_values_actions_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_action_iterator_t; -- /usr/include/xcb/xkb.h:7850
pragma Import
(C,
xcb_xkb_set_map_values_actions_iterator,
"xcb_xkb_set_map_values_actions_iterator");
function xcb_xkb_set_map_values_behaviors
(S : System.Address)
return access xcb_xkb_set_behavior_t; -- /usr/include/xcb/xkb.h:7864
pragma Import
(C,
xcb_xkb_set_map_values_behaviors,
"xcb_xkb_set_map_values_behaviors");
function xcb_xkb_set_map_values_behaviors_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7877
pragma Import
(C,
xcb_xkb_set_map_values_behaviors_length,
"xcb_xkb_set_map_values_behaviors_length");
function xcb_xkb_set_map_values_behaviors_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_set_behavior_iterator_t; -- /usr/include/xcb/xkb.h:7891
pragma Import
(C,
xcb_xkb_set_map_values_behaviors_iterator,
"xcb_xkb_set_map_values_behaviors_iterator");
function xcb_xkb_set_map_values_vmods
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:7905
pragma Import
(C,
xcb_xkb_set_map_values_vmods,
"xcb_xkb_set_map_values_vmods");
function xcb_xkb_set_map_values_vmods_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7918
pragma Import
(C,
xcb_xkb_set_map_values_vmods_length,
"xcb_xkb_set_map_values_vmods_length");
function xcb_xkb_set_map_values_vmods_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:7932
pragma Import
(C,
xcb_xkb_set_map_values_vmods_end,
"xcb_xkb_set_map_values_vmods_end");
function xcb_xkb_set_map_values_explicit
(S : System.Address)
return access xcb_xkb_set_explicit_t; -- /usr/include/xcb/xkb.h:7946
pragma Import
(C,
xcb_xkb_set_map_values_explicit,
"xcb_xkb_set_map_values_explicit");
function xcb_xkb_set_map_values_explicit_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:7959
pragma Import
(C,
xcb_xkb_set_map_values_explicit_length,
"xcb_xkb_set_map_values_explicit_length");
function xcb_xkb_set_map_values_explicit_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_set_explicit_iterator_t; -- /usr/include/xcb/xkb.h:7973
pragma Import
(C,
xcb_xkb_set_map_values_explicit_iterator,
"xcb_xkb_set_map_values_explicit_iterator");
function xcb_xkb_set_map_values_modmap
(S : System.Address)
return access xcb_xkb_key_mod_map_t; -- /usr/include/xcb/xkb.h:7987
pragma Import
(C,
xcb_xkb_set_map_values_modmap,
"xcb_xkb_set_map_values_modmap");
function xcb_xkb_set_map_values_modmap_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:8000
pragma Import
(C,
xcb_xkb_set_map_values_modmap_length,
"xcb_xkb_set_map_values_modmap_length");
function xcb_xkb_set_map_values_modmap_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_mod_map_iterator_t; -- /usr/include/xcb/xkb.h:8014
pragma Import
(C,
xcb_xkb_set_map_values_modmap_iterator,
"xcb_xkb_set_map_values_modmap_iterator");
function xcb_xkb_set_map_values_vmodmap
(S : System.Address)
return access xcb_xkb_key_v_mod_map_t; -- /usr/include/xcb/xkb.h:8028
pragma Import
(C,
xcb_xkb_set_map_values_vmodmap,
"xcb_xkb_set_map_values_vmodmap");
function xcb_xkb_set_map_values_vmodmap_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:8041
pragma Import
(C,
xcb_xkb_set_map_values_vmodmap_length,
"xcb_xkb_set_map_values_vmodmap_length");
function xcb_xkb_set_map_values_vmodmap_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_v_mod_map_iterator_t; -- /usr/include/xcb/xkb.h:8055
pragma Import
(C,
xcb_xkb_set_map_values_vmodmap_iterator,
"xcb_xkb_set_map_values_vmodmap_iterator");
function xcb_xkb_set_map_values_serialize
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:8059
pragma Import
(C,
xcb_xkb_set_map_values_serialize,
"xcb_xkb_set_map_values_serialize");
function xcb_xkb_set_map_values_unpack
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t;
u_aux : access xcb_xkb_set_map_values_t)
return int; -- /usr/include/xcb/xkb.h:8073
pragma Import
(C,
xcb_xkb_set_map_values_unpack,
"xcb_xkb_set_map_values_unpack");
function xcb_xkb_set_map_values_sizeof
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t)
return int; -- /usr/include/xcb/xkb.h:8087
pragma Import
(C,
xcb_xkb_set_map_values_sizeof,
"xcb_xkb_set_map_values_sizeof");
function xcb_xkb_set_map_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
present : Libc.Stdint.uint16_t;
flags : Libc.Stdint.uint16_t;
minKeyCode : XCB.XProto.xcb_keycode_t;
maxKeyCode : XCB.XProto.xcb_keycode_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKeySym : XCB.XProto.xcb_keycode_t;
nKeySyms : Libc.Stdint.uint8_t;
totalSyms : Libc.Stdint.uint16_t;
firstKeyAction : XCB.XProto.xcb_keycode_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
firstKeyBehavior : XCB.XProto.xcb_keycode_t;
nKeyBehaviors : Libc.Stdint.uint8_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
firstKeyExplicit : XCB.XProto.xcb_keycode_t;
nKeyExplicit : Libc.Stdint.uint8_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
firstModMapKey : XCB.XProto.xcb_keycode_t;
nModMapKeys : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
firstVModMapKey : XCB.XProto.xcb_keycode_t;
nVModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8148
pragma Import (C, xcb_xkb_set_map_checked, "xcb_xkb_set_map_checked");
function xcb_xkb_set_map
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
present : Libc.Stdint.uint16_t;
flags : Libc.Stdint.uint16_t;
minKeyCode : XCB.XProto.xcb_keycode_t;
maxKeyCode : XCB.XProto.xcb_keycode_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKeySym : XCB.XProto.xcb_keycode_t;
nKeySyms : Libc.Stdint.uint8_t;
totalSyms : Libc.Stdint.uint16_t;
firstKeyAction : XCB.XProto.xcb_keycode_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
firstKeyBehavior : XCB.XProto.xcb_keycode_t;
nKeyBehaviors : Libc.Stdint.uint8_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
firstKeyExplicit : XCB.XProto.xcb_keycode_t;
nKeyExplicit : Libc.Stdint.uint8_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
firstModMapKey : XCB.XProto.xcb_keycode_t;
nModMapKeys : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
firstVModMapKey : XCB.XProto.xcb_keycode_t;
nVModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8223
pragma Import (C, xcb_xkb_set_map, "xcb_xkb_set_map");
function xcb_xkb_set_map_aux_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
present : Libc.Stdint.uint16_t;
flags : Libc.Stdint.uint16_t;
minKeyCode : XCB.XProto.xcb_keycode_t;
maxKeyCode : XCB.XProto.xcb_keycode_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKeySym : XCB.XProto.xcb_keycode_t;
nKeySyms : Libc.Stdint.uint8_t;
totalSyms : Libc.Stdint.uint16_t;
firstKeyAction : XCB.XProto.xcb_keycode_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
firstKeyBehavior : XCB.XProto.xcb_keycode_t;
nKeyBehaviors : Libc.Stdint.uint8_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
firstKeyExplicit : XCB.XProto.xcb_keycode_t;
nKeyExplicit : Libc.Stdint.uint8_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
firstModMapKey : XCB.XProto.xcb_keycode_t;
nModMapKeys : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
firstVModMapKey : XCB.XProto.xcb_keycode_t;
nVModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8301
pragma Import
(C,
xcb_xkb_set_map_aux_checked,
"xcb_xkb_set_map_aux_checked");
function xcb_xkb_set_map_aux
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
present : Libc.Stdint.uint16_t;
flags : Libc.Stdint.uint16_t;
minKeyCode : XCB.XProto.xcb_keycode_t;
maxKeyCode : XCB.XProto.xcb_keycode_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKeySym : XCB.XProto.xcb_keycode_t;
nKeySyms : Libc.Stdint.uint8_t;
totalSyms : Libc.Stdint.uint16_t;
firstKeyAction : XCB.XProto.xcb_keycode_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
firstKeyBehavior : XCB.XProto.xcb_keycode_t;
nKeyBehaviors : Libc.Stdint.uint8_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
firstKeyExplicit : XCB.XProto.xcb_keycode_t;
nKeyExplicit : Libc.Stdint.uint8_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
firstModMapKey : XCB.XProto.xcb_keycode_t;
nModMapKeys : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
firstVModMapKey : XCB.XProto.xcb_keycode_t;
nVModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8376
pragma Import (C, xcb_xkb_set_map_aux, "xcb_xkb_set_map_aux");
function xcb_xkb_get_compat_map_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:8406
pragma Import
(C,
xcb_xkb_get_compat_map_sizeof,
"xcb_xkb_get_compat_map_sizeof");
function xcb_xkb_get_compat_map
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
groups : Libc.Stdint.uint8_t;
getAllSI : Libc.Stdint.uint8_t;
firstSI : Libc.Stdint.uint16_t;
nSI : Libc.Stdint.uint16_t)
return xcb_xkb_get_compat_map_cookie_t; -- /usr/include/xcb/xkb.h:8432
pragma Import (C, xcb_xkb_get_compat_map, "xcb_xkb_get_compat_map");
function xcb_xkb_get_compat_map_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
groups : Libc.Stdint.uint8_t;
getAllSI : Libc.Stdint.uint8_t;
firstSI : Libc.Stdint.uint16_t;
nSI : Libc.Stdint.uint16_t)
return xcb_xkb_get_compat_map_cookie_t; -- /usr/include/xcb/xkb.h:8466
pragma Import
(C,
xcb_xkb_get_compat_map_unchecked,
"xcb_xkb_get_compat_map_unchecked");
function xcb_xkb_get_compat_map_si_rtrn
(R : System.Address)
return access xcb_xkb_sym_interpret_t; -- /usr/include/xcb/xkb.h:8484
pragma Import
(C,
xcb_xkb_get_compat_map_si_rtrn,
"xcb_xkb_get_compat_map_si_rtrn");
function xcb_xkb_get_compat_map_si_rtrn_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:8497
pragma Import
(C,
xcb_xkb_get_compat_map_si_rtrn_length,
"xcb_xkb_get_compat_map_si_rtrn_length");
function xcb_xkb_get_compat_map_si_rtrn_iterator
(R : System.Address)
return xcb_xkb_sym_interpret_iterator_t; -- /usr/include/xcb/xkb.h:8510
pragma Import
(C,
xcb_xkb_get_compat_map_si_rtrn_iterator,
"xcb_xkb_get_compat_map_si_rtrn_iterator");
function xcb_xkb_get_compat_map_group_rtrn
(R : System.Address)
return access xcb_xkb_mod_def_t; -- /usr/include/xcb/xkb.h:8523
pragma Import
(C,
xcb_xkb_get_compat_map_group_rtrn,
"xcb_xkb_get_compat_map_group_rtrn");
function xcb_xkb_get_compat_map_group_rtrn_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:8536
pragma Import
(C,
xcb_xkb_get_compat_map_group_rtrn_length,
"xcb_xkb_get_compat_map_group_rtrn_length");
function xcb_xkb_get_compat_map_group_rtrn_iterator
(R : System.Address)
return xcb_xkb_mod_def_iterator_t; -- /usr/include/xcb/xkb.h:8549
pragma Import
(C,
xcb_xkb_get_compat_map_group_rtrn_iterator,
"xcb_xkb_get_compat_map_group_rtrn_iterator");
function xcb_xkb_get_compat_map_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_compat_map_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_compat_map_reply_t; -- /usr/include/xcb/xkb.h:8578
pragma Import
(C,
xcb_xkb_get_compat_map_reply,
"xcb_xkb_get_compat_map_reply");
function xcb_xkb_set_compat_map_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:8583
pragma Import
(C,
xcb_xkb_set_compat_map_sizeof,
"xcb_xkb_set_compat_map_sizeof");
function xcb_xkb_set_compat_map_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
recomputeActions : Libc.Stdint.uint8_t;
truncateSI : Libc.Stdint.uint8_t;
groups : Libc.Stdint.uint8_t;
firstSI : Libc.Stdint.uint16_t;
nSI : Libc.Stdint.uint16_t;
si : System.Address;
groupMaps : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8615
pragma Import
(C,
xcb_xkb_set_compat_map_checked,
"xcb_xkb_set_compat_map_checked");
function xcb_xkb_set_compat_map
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
recomputeActions : Libc.Stdint.uint8_t;
truncateSI : Libc.Stdint.uint8_t;
groups : Libc.Stdint.uint8_t;
firstSI : Libc.Stdint.uint16_t;
nSI : Libc.Stdint.uint16_t;
si : System.Address;
groupMaps : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8652
pragma Import (C, xcb_xkb_set_compat_map, "xcb_xkb_set_compat_map");
function xcb_xkb_get_indicator_state
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t)
return xcb_xkb_get_indicator_state_cookie_t; -- /usr/include/xcb/xkb.h:8682
pragma Import
(C,
xcb_xkb_get_indicator_state,
"xcb_xkb_get_indicator_state");
function xcb_xkb_get_indicator_state_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t)
return xcb_xkb_get_indicator_state_cookie_t; -- /usr/include/xcb/xkb.h:8708
pragma Import
(C,
xcb_xkb_get_indicator_state_unchecked,
"xcb_xkb_get_indicator_state_unchecked");
function xcb_xkb_get_indicator_state_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_indicator_state_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_indicator_state_reply_t; -- /usr/include/xcb/xkb.h:8738
pragma Import
(C,
xcb_xkb_get_indicator_state_reply,
"xcb_xkb_get_indicator_state_reply");
function xcb_xkb_get_indicator_map_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:8743
pragma Import
(C,
xcb_xkb_get_indicator_map_sizeof,
"xcb_xkb_get_indicator_map_sizeof");
function xcb_xkb_get_indicator_map
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
which : Libc.Stdint.uint32_t)
return xcb_xkb_get_indicator_map_cookie_t; -- /usr/include/xcb/xkb.h:8766
pragma Import (C, xcb_xkb_get_indicator_map, "xcb_xkb_get_indicator_map");
function xcb_xkb_get_indicator_map_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
which : Libc.Stdint.uint32_t)
return xcb_xkb_get_indicator_map_cookie_t; -- /usr/include/xcb/xkb.h:8794
pragma Import
(C,
xcb_xkb_get_indicator_map_unchecked,
"xcb_xkb_get_indicator_map_unchecked");
function xcb_xkb_get_indicator_map_maps
(R : System.Address)
return access xcb_xkb_indicator_map_t; -- /usr/include/xcb/xkb.h:8809
pragma Import
(C,
xcb_xkb_get_indicator_map_maps,
"xcb_xkb_get_indicator_map_maps");
function xcb_xkb_get_indicator_map_maps_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:8822
pragma Import
(C,
xcb_xkb_get_indicator_map_maps_length,
"xcb_xkb_get_indicator_map_maps_length");
function xcb_xkb_get_indicator_map_maps_iterator
(R : System.Address)
return xcb_xkb_indicator_map_iterator_t; -- /usr/include/xcb/xkb.h:8835
pragma Import
(C,
xcb_xkb_get_indicator_map_maps_iterator,
"xcb_xkb_get_indicator_map_maps_iterator");
function xcb_xkb_get_indicator_map_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_indicator_map_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_indicator_map_reply_t; -- /usr/include/xcb/xkb.h:8864
pragma Import
(C,
xcb_xkb_get_indicator_map_reply,
"xcb_xkb_get_indicator_map_reply");
function xcb_xkb_set_indicator_map_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:8869
pragma Import
(C,
xcb_xkb_set_indicator_map_sizeof,
"xcb_xkb_set_indicator_map_sizeof");
function xcb_xkb_set_indicator_map_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
which : Libc.Stdint.uint32_t;
maps : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8896
pragma Import
(C,
xcb_xkb_set_indicator_map_checked,
"xcb_xkb_set_indicator_map_checked");
function xcb_xkb_set_indicator_map
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
which : Libc.Stdint.uint32_t;
maps : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:8923
pragma Import (C, xcb_xkb_set_indicator_map, "xcb_xkb_set_indicator_map");
function xcb_xkb_get_named_indicator
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
ledClass : xcb_xkb_led_class_spec_t;
ledID : xcb_xkb_id_spec_t;
indicator : XCB.XProto.xcb_atom_t)
return xcb_xkb_get_named_indicator_cookie_t; -- /usr/include/xcb/xkb.h:8951
pragma Import
(C,
xcb_xkb_get_named_indicator,
"xcb_xkb_get_named_indicator");
function xcb_xkb_get_named_indicator_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
ledClass : xcb_xkb_led_class_spec_t;
ledID : xcb_xkb_id_spec_t;
indicator : XCB.XProto.xcb_atom_t)
return xcb_xkb_get_named_indicator_cookie_t; -- /usr/include/xcb/xkb.h:8983
pragma Import
(C,
xcb_xkb_get_named_indicator_unchecked,
"xcb_xkb_get_named_indicator_unchecked");
function xcb_xkb_get_named_indicator_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_named_indicator_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_named_indicator_reply_t; -- /usr/include/xcb/xkb.h:9016
pragma Import
(C,
xcb_xkb_get_named_indicator_reply,
"xcb_xkb_get_named_indicator_reply");
function xcb_xkb_set_named_indicator_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
ledClass : xcb_xkb_led_class_spec_t;
ledID : xcb_xkb_id_spec_t;
indicator : XCB.XProto.xcb_atom_t;
setState : Libc.Stdint.uint8_t;
on : Libc.Stdint.uint8_t;
setMap : Libc.Stdint.uint8_t;
createMap : Libc.Stdint.uint8_t;
map_flags : Libc.Stdint.uint8_t;
map_whichGroups : Libc.Stdint.uint8_t;
map_groups : Libc.Stdint.uint8_t;
map_whichMods : Libc.Stdint.uint8_t;
map_realMods : Libc.Stdint.uint8_t;
map_vmods : Libc.Stdint.uint16_t;
map_ctrls : Libc.Stdint.uint32_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:9057
pragma Import
(C,
xcb_xkb_set_named_indicator_checked,
"xcb_xkb_set_named_indicator_checked");
function xcb_xkb_set_named_indicator
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
ledClass : xcb_xkb_led_class_spec_t;
ledID : xcb_xkb_id_spec_t;
indicator : XCB.XProto.xcb_atom_t;
setState : Libc.Stdint.uint8_t;
on : Libc.Stdint.uint8_t;
setMap : Libc.Stdint.uint8_t;
createMap : Libc.Stdint.uint8_t;
map_flags : Libc.Stdint.uint8_t;
map_whichGroups : Libc.Stdint.uint8_t;
map_groups : Libc.Stdint.uint8_t;
map_whichMods : Libc.Stdint.uint8_t;
map_realMods : Libc.Stdint.uint8_t;
map_vmods : Libc.Stdint.uint16_t;
map_ctrls : Libc.Stdint.uint32_t)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:9108
pragma Import
(C,
xcb_xkb_set_named_indicator,
"xcb_xkb_set_named_indicator");
function xcb_xkb_get_names_value_list_type_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9136
pragma Import
(C,
xcb_xkb_get_names_value_list_type_names,
"xcb_xkb_get_names_value_list_type_names");
function xcb_xkb_get_names_value_list_type_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9149
pragma Import
(C,
xcb_xkb_get_names_value_list_type_names_length,
"xcb_xkb_get_names_value_list_type_names_length");
function xcb_xkb_get_names_value_list_type_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9163
pragma Import
(C,
xcb_xkb_get_names_value_list_type_names_end,
"xcb_xkb_get_names_value_list_type_names_end");
function xcb_xkb_get_names_value_list_n_levels_per_type
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:9177
pragma Import
(C,
xcb_xkb_get_names_value_list_n_levels_per_type,
"xcb_xkb_get_names_value_list_n_levels_per_type");
function xcb_xkb_get_names_value_list_n_levels_per_type_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9190
pragma Import
(C,
xcb_xkb_get_names_value_list_n_levels_per_type_length,
"xcb_xkb_get_names_value_list_n_levels_per_type_length");
function xcb_xkb_get_names_value_list_n_levels_per_type_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9204
pragma Import
(C,
xcb_xkb_get_names_value_list_n_levels_per_type_end,
"xcb_xkb_get_names_value_list_n_levels_per_type_end");
function xcb_xkb_get_names_value_list_alignment_pad
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:9218
pragma Import
(C,
xcb_xkb_get_names_value_list_alignment_pad,
"xcb_xkb_get_names_value_list_alignment_pad");
function xcb_xkb_get_names_value_list_alignment_pad_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9231
pragma Import
(C,
xcb_xkb_get_names_value_list_alignment_pad_length,
"xcb_xkb_get_names_value_list_alignment_pad_length");
function xcb_xkb_get_names_value_list_alignment_pad_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9245
pragma Import
(C,
xcb_xkb_get_names_value_list_alignment_pad_end,
"xcb_xkb_get_names_value_list_alignment_pad_end");
function xcb_xkb_get_names_value_list_kt_level_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9259
pragma Import
(C,
xcb_xkb_get_names_value_list_kt_level_names,
"xcb_xkb_get_names_value_list_kt_level_names");
function xcb_xkb_get_names_value_list_kt_level_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9272
pragma Import
(C,
xcb_xkb_get_names_value_list_kt_level_names_length,
"xcb_xkb_get_names_value_list_kt_level_names_length");
function xcb_xkb_get_names_value_list_kt_level_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9286
pragma Import
(C,
xcb_xkb_get_names_value_list_kt_level_names_end,
"xcb_xkb_get_names_value_list_kt_level_names_end");
function xcb_xkb_get_names_value_list_indicator_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9300
pragma Import
(C,
xcb_xkb_get_names_value_list_indicator_names,
"xcb_xkb_get_names_value_list_indicator_names");
function xcb_xkb_get_names_value_list_indicator_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9313
pragma Import
(C,
xcb_xkb_get_names_value_list_indicator_names_length,
"xcb_xkb_get_names_value_list_indicator_names_length");
function xcb_xkb_get_names_value_list_indicator_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9327
pragma Import
(C,
xcb_xkb_get_names_value_list_indicator_names_end,
"xcb_xkb_get_names_value_list_indicator_names_end");
function xcb_xkb_get_names_value_list_virtual_mod_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9341
pragma Import
(C,
xcb_xkb_get_names_value_list_virtual_mod_names,
"xcb_xkb_get_names_value_list_virtual_mod_names");
function xcb_xkb_get_names_value_list_virtual_mod_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9354
pragma Import
(C,
xcb_xkb_get_names_value_list_virtual_mod_names_length,
"xcb_xkb_get_names_value_list_virtual_mod_names_length");
function xcb_xkb_get_names_value_list_virtual_mod_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9368
pragma Import
(C,
xcb_xkb_get_names_value_list_virtual_mod_names_end,
"xcb_xkb_get_names_value_list_virtual_mod_names_end");
function xcb_xkb_get_names_value_list_groups
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9382
pragma Import
(C,
xcb_xkb_get_names_value_list_groups,
"xcb_xkb_get_names_value_list_groups");
function xcb_xkb_get_names_value_list_groups_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9395
pragma Import
(C,
xcb_xkb_get_names_value_list_groups_length,
"xcb_xkb_get_names_value_list_groups_length");
function xcb_xkb_get_names_value_list_groups_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9409
pragma Import
(C,
xcb_xkb_get_names_value_list_groups_end,
"xcb_xkb_get_names_value_list_groups_end");
function xcb_xkb_get_names_value_list_key_names
(S : System.Address)
return access xcb_xkb_key_name_t; -- /usr/include/xcb/xkb.h:9423
pragma Import
(C,
xcb_xkb_get_names_value_list_key_names,
"xcb_xkb_get_names_value_list_key_names");
function xcb_xkb_get_names_value_list_key_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9436
pragma Import
(C,
xcb_xkb_get_names_value_list_key_names_length,
"xcb_xkb_get_names_value_list_key_names_length");
function xcb_xkb_get_names_value_list_key_names_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_name_iterator_t; -- /usr/include/xcb/xkb.h:9450
pragma Import
(C,
xcb_xkb_get_names_value_list_key_names_iterator,
"xcb_xkb_get_names_value_list_key_names_iterator");
function xcb_xkb_get_names_value_list_key_aliases
(S : System.Address)
return access xcb_xkb_key_alias_t; -- /usr/include/xcb/xkb.h:9464
pragma Import
(C,
xcb_xkb_get_names_value_list_key_aliases,
"xcb_xkb_get_names_value_list_key_aliases");
function xcb_xkb_get_names_value_list_key_aliases_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9477
pragma Import
(C,
xcb_xkb_get_names_value_list_key_aliases_length,
"xcb_xkb_get_names_value_list_key_aliases_length");
function xcb_xkb_get_names_value_list_key_aliases_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_alias_iterator_t; -- /usr/include/xcb/xkb.h:9491
pragma Import
(C,
xcb_xkb_get_names_value_list_key_aliases_iterator,
"xcb_xkb_get_names_value_list_key_aliases_iterator");
function xcb_xkb_get_names_value_list_radio_group_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9505
pragma Import
(C,
xcb_xkb_get_names_value_list_radio_group_names,
"xcb_xkb_get_names_value_list_radio_group_names");
function xcb_xkb_get_names_value_list_radio_group_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9518
pragma Import
(C,
xcb_xkb_get_names_value_list_radio_group_names_length,
"xcb_xkb_get_names_value_list_radio_group_names_length");
function xcb_xkb_get_names_value_list_radio_group_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9532
pragma Import
(C,
xcb_xkb_get_names_value_list_radio_group_names_end,
"xcb_xkb_get_names_value_list_radio_group_names_end");
function xcb_xkb_get_names_value_list_serialize
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:9536
pragma Import
(C,
xcb_xkb_get_names_value_list_serialize,
"xcb_xkb_get_names_value_list_serialize");
function xcb_xkb_get_names_value_list_unpack
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t;
u_aux : access xcb_xkb_get_names_value_list_t)
return int; -- /usr/include/xcb/xkb.h:9548
pragma Import
(C,
xcb_xkb_get_names_value_list_unpack,
"xcb_xkb_get_names_value_list_unpack");
function xcb_xkb_get_names_value_list_sizeof
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t) return int; -- /usr/include/xcb/xkb.h:9560
pragma Import
(C,
xcb_xkb_get_names_value_list_sizeof,
"xcb_xkb_get_names_value_list_sizeof");
function xcb_xkb_get_names
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
which : Libc.Stdint.uint32_t)
return xcb_xkb_get_names_cookie_t; -- /usr/include/xcb/xkb.h:9591
pragma Import (C, xcb_xkb_get_names, "xcb_xkb_get_names");
function xcb_xkb_get_names_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
which : Libc.Stdint.uint32_t)
return xcb_xkb_get_names_cookie_t; -- /usr/include/xcb/xkb.h:9619
pragma Import
(C,
xcb_xkb_get_names_unchecked,
"xcb_xkb_get_names_unchecked");
function xcb_xkb_get_names_value_list
(R : System.Address)
return System.Address; -- /usr/include/xcb/xkb.h:9634
pragma Import
(C,
xcb_xkb_get_names_value_list,
"xcb_xkb_get_names_value_list");
function xcb_xkb_get_names_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_names_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_names_reply_t; -- /usr/include/xcb/xkb.h:9663
pragma Import (C, xcb_xkb_get_names_reply, "xcb_xkb_get_names_reply");
function xcb_xkb_set_names_values_type_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9678
pragma Import
(C,
xcb_xkb_set_names_values_type_names,
"xcb_xkb_set_names_values_type_names");
function xcb_xkb_set_names_values_type_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9691
pragma Import
(C,
xcb_xkb_set_names_values_type_names_length,
"xcb_xkb_set_names_values_type_names_length");
function xcb_xkb_set_names_values_type_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9705
pragma Import
(C,
xcb_xkb_set_names_values_type_names_end,
"xcb_xkb_set_names_values_type_names_end");
function xcb_xkb_set_names_values_n_levels_per_type
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:9719
pragma Import
(C,
xcb_xkb_set_names_values_n_levels_per_type,
"xcb_xkb_set_names_values_n_levels_per_type");
function xcb_xkb_set_names_values_n_levels_per_type_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9732
pragma Import
(C,
xcb_xkb_set_names_values_n_levels_per_type_length,
"xcb_xkb_set_names_values_n_levels_per_type_length");
function xcb_xkb_set_names_values_n_levels_per_type_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9746
pragma Import
(C,
xcb_xkb_set_names_values_n_levels_per_type_end,
"xcb_xkb_set_names_values_n_levels_per_type_end");
function xcb_xkb_set_names_values_kt_level_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9760
pragma Import
(C,
xcb_xkb_set_names_values_kt_level_names,
"xcb_xkb_set_names_values_kt_level_names");
function xcb_xkb_set_names_values_kt_level_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9773
pragma Import
(C,
xcb_xkb_set_names_values_kt_level_names_length,
"xcb_xkb_set_names_values_kt_level_names_length");
function xcb_xkb_set_names_values_kt_level_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9787
pragma Import
(C,
xcb_xkb_set_names_values_kt_level_names_end,
"xcb_xkb_set_names_values_kt_level_names_end");
function xcb_xkb_set_names_values_indicator_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9801
pragma Import
(C,
xcb_xkb_set_names_values_indicator_names,
"xcb_xkb_set_names_values_indicator_names");
function xcb_xkb_set_names_values_indicator_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9814
pragma Import
(C,
xcb_xkb_set_names_values_indicator_names_length,
"xcb_xkb_set_names_values_indicator_names_length");
function xcb_xkb_set_names_values_indicator_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9828
pragma Import
(C,
xcb_xkb_set_names_values_indicator_names_end,
"xcb_xkb_set_names_values_indicator_names_end");
function xcb_xkb_set_names_values_virtual_mod_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9842
pragma Import
(C,
xcb_xkb_set_names_values_virtual_mod_names,
"xcb_xkb_set_names_values_virtual_mod_names");
function xcb_xkb_set_names_values_virtual_mod_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9855
pragma Import
(C,
xcb_xkb_set_names_values_virtual_mod_names_length,
"xcb_xkb_set_names_values_virtual_mod_names_length");
function xcb_xkb_set_names_values_virtual_mod_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9869
pragma Import
(C,
xcb_xkb_set_names_values_virtual_mod_names_end,
"xcb_xkb_set_names_values_virtual_mod_names_end");
function xcb_xkb_set_names_values_groups
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:9883
pragma Import
(C,
xcb_xkb_set_names_values_groups,
"xcb_xkb_set_names_values_groups");
function xcb_xkb_set_names_values_groups_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9896
pragma Import
(C,
xcb_xkb_set_names_values_groups_length,
"xcb_xkb_set_names_values_groups_length");
function xcb_xkb_set_names_values_groups_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:9910
pragma Import
(C,
xcb_xkb_set_names_values_groups_end,
"xcb_xkb_set_names_values_groups_end");
function xcb_xkb_set_names_values_key_names
(S : System.Address)
return access xcb_xkb_key_name_t; -- /usr/include/xcb/xkb.h:9924
pragma Import
(C,
xcb_xkb_set_names_values_key_names,
"xcb_xkb_set_names_values_key_names");
function xcb_xkb_set_names_values_key_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9937
pragma Import
(C,
xcb_xkb_set_names_values_key_names_length,
"xcb_xkb_set_names_values_key_names_length");
function xcb_xkb_set_names_values_key_names_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_name_iterator_t; -- /usr/include/xcb/xkb.h:9951
pragma Import
(C,
xcb_xkb_set_names_values_key_names_iterator,
"xcb_xkb_set_names_values_key_names_iterator");
function xcb_xkb_set_names_values_key_aliases
(S : System.Address)
return access xcb_xkb_key_alias_t; -- /usr/include/xcb/xkb.h:9965
pragma Import
(C,
xcb_xkb_set_names_values_key_aliases,
"xcb_xkb_set_names_values_key_aliases");
function xcb_xkb_set_names_values_key_aliases_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:9978
pragma Import
(C,
xcb_xkb_set_names_values_key_aliases_length,
"xcb_xkb_set_names_values_key_aliases_length");
function xcb_xkb_set_names_values_key_aliases_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_alias_iterator_t; -- /usr/include/xcb/xkb.h:9992
pragma Import
(C,
xcb_xkb_set_names_values_key_aliases_iterator,
"xcb_xkb_set_names_values_key_aliases_iterator");
function xcb_xkb_set_names_values_radio_group_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:10006
pragma Import
(C,
xcb_xkb_set_names_values_radio_group_names,
"xcb_xkb_set_names_values_radio_group_names");
function xcb_xkb_set_names_values_radio_group_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10019
pragma Import
(C,
xcb_xkb_set_names_values_radio_group_names_length,
"xcb_xkb_set_names_values_radio_group_names_length");
function xcb_xkb_set_names_values_radio_group_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:10033
pragma Import
(C,
xcb_xkb_set_names_values_radio_group_names_end,
"xcb_xkb_set_names_values_radio_group_names_end");
function xcb_xkb_set_names_values_serialize
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:10037
pragma Import
(C,
xcb_xkb_set_names_values_serialize,
"xcb_xkb_set_names_values_serialize");
function xcb_xkb_set_names_values_unpack
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t;
u_aux : access xcb_xkb_set_names_values_t)
return int; -- /usr/include/xcb/xkb.h:10050
pragma Import
(C,
xcb_xkb_set_names_values_unpack,
"xcb_xkb_set_names_values_unpack");
function xcb_xkb_set_names_values_sizeof
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t)
return int; -- /usr/include/xcb/xkb.h:10063
pragma Import
(C,
xcb_xkb_set_names_values_sizeof,
"xcb_xkb_set_names_values_sizeof");
function xcb_xkb_set_names_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
virtualMods : Libc.Stdint.uint16_t;
which : Libc.Stdint.uint32_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKTLevelt : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
groupNames : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
firstKey : XCB.XProto.xcb_keycode_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
totalKTLevelNames : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:10111
pragma Import (C, xcb_xkb_set_names_checked, "xcb_xkb_set_names_checked");
function xcb_xkb_set_names
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
virtualMods : Libc.Stdint.uint16_t;
which : Libc.Stdint.uint32_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKTLevelt : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
groupNames : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
firstKey : XCB.XProto.xcb_keycode_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
totalKTLevelNames : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:10162
pragma Import (C, xcb_xkb_set_names, "xcb_xkb_set_names");
function xcb_xkb_set_names_aux_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
virtualMods : Libc.Stdint.uint16_t;
which : Libc.Stdint.uint32_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKTLevelt : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
groupNames : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
firstKey : XCB.XProto.xcb_keycode_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
totalKTLevelNames : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:10216
pragma Import
(C,
xcb_xkb_set_names_aux_checked,
"xcb_xkb_set_names_aux_checked");
function xcb_xkb_set_names_aux
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
virtualMods : Libc.Stdint.uint16_t;
which : Libc.Stdint.uint32_t;
firstType : Libc.Stdint.uint8_t;
nTypes : Libc.Stdint.uint8_t;
firstKTLevelt : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint8_t;
indicators : Libc.Stdint.uint32_t;
groupNames : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
firstKey : XCB.XProto.xcb_keycode_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
totalKTLevelNames : Libc.Stdint.uint16_t;
values : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:10267
pragma Import (C, xcb_xkb_set_names_aux, "xcb_xkb_set_names_aux");
function xcb_xkb_per_client_flags
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
change : Libc.Stdint.uint32_t;
value : Libc.Stdint.uint32_t;
ctrlsToChange : Libc.Stdint.uint32_t;
autoCtrls : Libc.Stdint.uint32_t;
autoCtrlsValues : Libc.Stdint.uint32_t)
return xcb_xkb_per_client_flags_cookie_t; -- /usr/include/xcb/xkb.h:10309
pragma Import (C, xcb_xkb_per_client_flags, "xcb_xkb_per_client_flags");
function xcb_xkb_per_client_flags_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
change : Libc.Stdint.uint32_t;
value : Libc.Stdint.uint32_t;
ctrlsToChange : Libc.Stdint.uint32_t;
autoCtrls : Libc.Stdint.uint32_t;
autoCtrlsValues : Libc.Stdint.uint32_t)
return xcb_xkb_per_client_flags_cookie_t; -- /usr/include/xcb/xkb.h:10345
pragma Import
(C,
xcb_xkb_per_client_flags_unchecked,
"xcb_xkb_per_client_flags_unchecked");
function xcb_xkb_per_client_flags_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_per_client_flags_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_per_client_flags_reply_t; -- /usr/include/xcb/xkb.h:10380
pragma Import
(C,
xcb_xkb_per_client_flags_reply,
"xcb_xkb_per_client_flags_reply");
function xcb_xkb_list_components_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:10385
pragma Import
(C,
xcb_xkb_list_components_sizeof,
"xcb_xkb_list_components_sizeof");
function xcb_xkb_list_components
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
maxNames : Libc.Stdint.uint16_t)
return xcb_xkb_list_components_cookie_t; -- /usr/include/xcb/xkb.h:10408
pragma Import (C, xcb_xkb_list_components, "xcb_xkb_list_components");
function xcb_xkb_list_components_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
maxNames : Libc.Stdint.uint16_t)
return xcb_xkb_list_components_cookie_t; -- /usr/include/xcb/xkb.h:10436
pragma Import
(C,
xcb_xkb_list_components_unchecked,
"xcb_xkb_list_components_unchecked");
function xcb_xkb_list_components_keymaps_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:10451
pragma Import
(C,
xcb_xkb_list_components_keymaps_length,
"xcb_xkb_list_components_keymaps_length");
function xcb_xkb_list_components_keymaps_iterator
(R : System.Address)
return xcb_xkb_listing_iterator_t; -- /usr/include/xcb/xkb.h:10464
pragma Import
(C,
xcb_xkb_list_components_keymaps_iterator,
"xcb_xkb_list_components_keymaps_iterator");
function xcb_xkb_list_components_keycodes_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:10477
pragma Import
(C,
xcb_xkb_list_components_keycodes_length,
"xcb_xkb_list_components_keycodes_length");
function xcb_xkb_list_components_keycodes_iterator
(R : System.Address)
return xcb_xkb_listing_iterator_t; -- /usr/include/xcb/xkb.h:10490
pragma Import
(C,
xcb_xkb_list_components_keycodes_iterator,
"xcb_xkb_list_components_keycodes_iterator");
function xcb_xkb_list_components_types_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:10503
pragma Import
(C,
xcb_xkb_list_components_types_length,
"xcb_xkb_list_components_types_length");
function xcb_xkb_list_components_types_iterator
(R : System.Address)
return xcb_xkb_listing_iterator_t; -- /usr/include/xcb/xkb.h:10516
pragma Import
(C,
xcb_xkb_list_components_types_iterator,
"xcb_xkb_list_components_types_iterator");
function xcb_xkb_list_components_compat_maps_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:10529
pragma Import
(C,
xcb_xkb_list_components_compat_maps_length,
"xcb_xkb_list_components_compat_maps_length");
function xcb_xkb_list_components_compat_maps_iterator
(R : System.Address)
return xcb_xkb_listing_iterator_t; -- /usr/include/xcb/xkb.h:10542
pragma Import
(C,
xcb_xkb_list_components_compat_maps_iterator,
"xcb_xkb_list_components_compat_maps_iterator");
function xcb_xkb_list_components_symbols_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:10555
pragma Import
(C,
xcb_xkb_list_components_symbols_length,
"xcb_xkb_list_components_symbols_length");
function xcb_xkb_list_components_symbols_iterator
(R : System.Address)
return xcb_xkb_listing_iterator_t; -- /usr/include/xcb/xkb.h:10568
pragma Import
(C,
xcb_xkb_list_components_symbols_iterator,
"xcb_xkb_list_components_symbols_iterator");
function xcb_xkb_list_components_geometries_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:10581
pragma Import
(C,
xcb_xkb_list_components_geometries_length,
"xcb_xkb_list_components_geometries_length");
function xcb_xkb_list_components_geometries_iterator
(R : System.Address)
return xcb_xkb_listing_iterator_t; -- /usr/include/xcb/xkb.h:10594
pragma Import
(C,
xcb_xkb_list_components_geometries_iterator,
"xcb_xkb_list_components_geometries_iterator");
function xcb_xkb_list_components_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_list_components_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_list_components_reply_t; -- /usr/include/xcb/xkb.h:10623
pragma Import
(C,
xcb_xkb_list_components_reply,
"xcb_xkb_list_components_reply");
function xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10638
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_type_iterator_t; -- /usr/include/xcb/xkb.h:10652
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10666
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_sym_map_iterator_t; -- /usr/include/xcb/xkb.h:10680
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:10694
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count,
"xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count");
function xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10707
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:10721
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end,
"xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end");
function xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts
(S : System.Address)
return access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:10735
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts,
"xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts");
function xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10748
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_action_iterator_t; -- /usr/include/xcb/xkb.h:10762
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator,
"xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator");
function xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn
(S : System.Address)
return access xcb_xkb_set_behavior_t; -- /usr/include/xcb/xkb.h:10776
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn,
"xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn");
function xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10789
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_set_behavior_iterator_t; -- /usr/include/xcb/xkb.h:10803
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:10817
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn,
"xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn");
function xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10830
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:10844
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end,
"xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end");
function xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn
(S : System.Address)
return access xcb_xkb_set_explicit_t; -- /usr/include/xcb/xkb.h:10858
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn,
"xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn");
function xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10871
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_set_explicit_iterator_t; -- /usr/include/xcb/xkb.h:10885
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn
(S : System.Address)
return access xcb_xkb_key_mod_map_t; -- /usr/include/xcb/xkb.h:10899
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn,
"xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn");
function xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10912
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_mod_map_iterator_t; -- /usr/include/xcb/xkb.h:10926
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn
(S : System.Address)
return access xcb_xkb_key_v_mod_map_t; -- /usr/include/xcb/xkb.h:10940
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn,
"xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn");
function xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:10953
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_v_mod_map_iterator_t; -- /usr/include/xcb/xkb.h:10967
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_types_map_serialize
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:10971
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_serialize,
"xcb_xkb_get_kbd_by_name_replies_types_map_serialize");
function xcb_xkb_get_kbd_by_name_replies_types_map_unpack
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t;
u_aux : access xcb_xkb_get_kbd_by_name_replies_types_map_t)
return int; -- /usr/include/xcb/xkb.h:10985
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_unpack,
"xcb_xkb_get_kbd_by_name_replies_types_map_unpack");
function xcb_xkb_get_kbd_by_name_replies_types_map_sizeof
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKeySyms : Libc.Stdint.uint8_t;
nKeyActions : Libc.Stdint.uint8_t;
totalActions : Libc.Stdint.uint16_t;
totalKeyBehaviors : Libc.Stdint.uint8_t;
virtualMods : Libc.Stdint.uint16_t;
totalKeyExplicit : Libc.Stdint.uint8_t;
totalModMapKeys : Libc.Stdint.uint8_t;
totalVModMapKeys : Libc.Stdint.uint8_t;
present : Libc.Stdint.uint16_t)
return int; -- /usr/include/xcb/xkb.h:10999
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_types_map_sizeof,
"xcb_xkb_get_kbd_by_name_replies_types_map_sizeof");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:11022
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11035
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11049
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type
(S : System.Address)
return access Libc.Stdint.uint8_t; -- /usr/include/xcb/xkb.h:11063
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11076
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11090
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:11104
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11117
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11131
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:11145
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11158
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11172
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:11186
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11199
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11213
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:11227
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11240
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11254
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names
(S : System.Address)
return access xcb_xkb_key_name_t; -- /usr/include/xcb/xkb.h:11268
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11281
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_name_iterator_t; -- /usr/include/xcb/xkb.h:11295
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases
(S : System.Address)
return access xcb_xkb_key_alias_t; -- /usr/include/xcb/xkb.h:11309
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11322
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_key_alias_iterator_t; -- /usr/include/xcb/xkb.h:11336
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names
(S : System.Address)
return access XCB.XProto.xcb_atom_t; -- /usr/include/xcb/xkb.h:11350
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11363
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end
(R : System.Address;
S : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11377
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint16_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:11381
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint16_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t;
u_aux : access xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t)
return int; -- /usr/include/xcb/xkb.h:11394
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof
(u_buffer : System.Address;
nTypes : Libc.Stdint.uint8_t;
nKTLevels : Libc.Stdint.uint16_t;
indicators : Libc.Stdint.uint32_t;
virtualMods : Libc.Stdint.uint16_t;
groupNames : Libc.Stdint.uint8_t;
nKeys : Libc.Stdint.uint8_t;
nKeyAliases : Libc.Stdint.uint8_t;
nRadioGroups : Libc.Stdint.uint8_t;
which : Libc.Stdint.uint32_t)
return int; -- /usr/include/xcb/xkb.h:11407
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof");
function xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
(S : System.Address)
return access xcb_xkb_sym_interpret_t; -- /usr/include/xcb/xkb.h:11429
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn,
"xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn");
function xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11442
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_sym_interpret_iterator_t; -- /usr/include/xcb/xkb.h:11456
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn
(S : System.Address)
return access xcb_xkb_mod_def_t; -- /usr/include/xcb/xkb.h:11470
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn,
"xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn");
function xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11483
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length,
"xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length");
function xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_mod_def_iterator_t; -- /usr/include/xcb/xkb.h:11497
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator,
"xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator");
function xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps
(S : System.Address)
return access xcb_xkb_indicator_map_t; -- /usr/include/xcb/xkb.h:11511
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps,
"xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps");
function xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length
(R : System.Address;
S : System.Address) return int; -- /usr/include/xcb/xkb.h:11524
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length,
"xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length");
function xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator
(R : System.Address;
S : System.Address)
return xcb_xkb_indicator_map_iterator_t; -- /usr/include/xcb/xkb.h:11538
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator,
"xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator");
function xcb_xkb_get_kbd_by_name_replies_key_names_value_list
(R : System.Address)
return access xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t; -- /usr/include/xcb/xkb.h:11552
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_key_names_value_list,
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list");
function xcb_xkb_get_kbd_by_name_replies_geometry_label_font
(R : System.Address)
return access xcb_xkb_counted_string_16_t; -- /usr/include/xcb/xkb.h:11565
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_geometry_label_font,
"xcb_xkb_get_kbd_by_name_replies_geometry_label_font");
function xcb_xkb_get_kbd_by_name_replies_serialize
(u_buffer : System.Address;
reported : Libc.Stdint.uint16_t;
u_aux : System.Address) return int; -- /usr/include/xcb/xkb.h:11568
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_serialize,
"xcb_xkb_get_kbd_by_name_replies_serialize");
function xcb_xkb_get_kbd_by_name_replies_unpack
(u_buffer : System.Address;
reported : Libc.Stdint.uint16_t;
u_aux : access xcb_xkb_get_kbd_by_name_replies_t)
return int; -- /usr/include/xcb/xkb.h:11573
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_unpack,
"xcb_xkb_get_kbd_by_name_replies_unpack");
function xcb_xkb_get_kbd_by_name_replies_sizeof
(u_buffer : System.Address;
reported : Libc.Stdint.uint16_t)
return int; -- /usr/include/xcb/xkb.h:11578
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies_sizeof,
"xcb_xkb_get_kbd_by_name_replies_sizeof");
function xcb_xkb_get_kbd_by_name
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
need : Libc.Stdint.uint16_t;
want : Libc.Stdint.uint16_t;
load : Libc.Stdint.uint8_t)
return xcb_xkb_get_kbd_by_name_cookie_t; -- /usr/include/xcb/xkb.h:11604
pragma Import (C, xcb_xkb_get_kbd_by_name, "xcb_xkb_get_kbd_by_name");
function xcb_xkb_get_kbd_by_name_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
need : Libc.Stdint.uint16_t;
want : Libc.Stdint.uint16_t;
load : Libc.Stdint.uint8_t)
return xcb_xkb_get_kbd_by_name_cookie_t; -- /usr/include/xcb/xkb.h:11636
pragma Import
(C,
xcb_xkb_get_kbd_by_name_unchecked,
"xcb_xkb_get_kbd_by_name_unchecked");
function xcb_xkb_get_kbd_by_name_replies
(R : System.Address)
return System.Address; -- /usr/include/xcb/xkb.h:11653
pragma Import
(C,
xcb_xkb_get_kbd_by_name_replies,
"xcb_xkb_get_kbd_by_name_replies");
function xcb_xkb_get_kbd_by_name_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_kbd_by_name_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_kbd_by_name_reply_t; -- /usr/include/xcb/xkb.h:11682
pragma Import
(C,
xcb_xkb_get_kbd_by_name_reply,
"xcb_xkb_get_kbd_by_name_reply");
function xcb_xkb_get_device_info_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:11687
pragma Import
(C,
xcb_xkb_get_device_info_sizeof,
"xcb_xkb_get_device_info_sizeof");
function xcb_xkb_get_device_info
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
wanted : Libc.Stdint.uint16_t;
allButtons : Libc.Stdint.uint8_t;
firstButton : Libc.Stdint.uint8_t;
nButtons : Libc.Stdint.uint8_t;
ledClass : xcb_xkb_led_class_spec_t;
ledID : xcb_xkb_id_spec_t)
return xcb_xkb_get_device_info_cookie_t; -- /usr/include/xcb/xkb.h:11715
pragma Import (C, xcb_xkb_get_device_info, "xcb_xkb_get_device_info");
function xcb_xkb_get_device_info_unchecked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
wanted : Libc.Stdint.uint16_t;
allButtons : Libc.Stdint.uint8_t;
firstButton : Libc.Stdint.uint8_t;
nButtons : Libc.Stdint.uint8_t;
ledClass : xcb_xkb_led_class_spec_t;
ledID : xcb_xkb_id_spec_t)
return xcb_xkb_get_device_info_cookie_t; -- /usr/include/xcb/xkb.h:11753
pragma Import
(C,
xcb_xkb_get_device_info_unchecked,
"xcb_xkb_get_device_info_unchecked");
function xcb_xkb_get_device_info_name
(R : System.Address)
return access xcb_xkb_string8_t; -- /usr/include/xcb/xkb.h:11773
pragma Import
(C,
xcb_xkb_get_device_info_name,
"xcb_xkb_get_device_info_name");
function xcb_xkb_get_device_info_name_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:11786
pragma Import
(C,
xcb_xkb_get_device_info_name_length,
"xcb_xkb_get_device_info_name_length");
function xcb_xkb_get_device_info_name_end
(R : System.Address)
return XCB.xcb_generic_iterator_t; -- /usr/include/xcb/xkb.h:11799
pragma Import
(C,
xcb_xkb_get_device_info_name_end,
"xcb_xkb_get_device_info_name_end");
function xcb_xkb_get_device_info_btn_actions
(R : System.Address)
return access xcb_xkb_action_t; -- /usr/include/xcb/xkb.h:11812
pragma Import
(C,
xcb_xkb_get_device_info_btn_actions,
"xcb_xkb_get_device_info_btn_actions");
function xcb_xkb_get_device_info_btn_actions_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:11825
pragma Import
(C,
xcb_xkb_get_device_info_btn_actions_length,
"xcb_xkb_get_device_info_btn_actions_length");
function xcb_xkb_get_device_info_btn_actions_iterator
(R : System.Address)
return xcb_xkb_action_iterator_t; -- /usr/include/xcb/xkb.h:11838
pragma Import
(C,
xcb_xkb_get_device_info_btn_actions_iterator,
"xcb_xkb_get_device_info_btn_actions_iterator");
function xcb_xkb_get_device_info_leds_length
(R : System.Address) return int; -- /usr/include/xcb/xkb.h:11851
pragma Import
(C,
xcb_xkb_get_device_info_leds_length,
"xcb_xkb_get_device_info_leds_length");
function xcb_xkb_get_device_info_leds_iterator
(R : System.Address)
return xcb_xkb_device_led_info_iterator_t; -- /usr/include/xcb/xkb.h:11864
pragma Import
(C,
xcb_xkb_get_device_info_leds_iterator,
"xcb_xkb_get_device_info_leds_iterator");
function xcb_xkb_get_device_info_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_get_device_info_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_get_device_info_reply_t; -- /usr/include/xcb/xkb.h:11893
pragma Import
(C,
xcb_xkb_get_device_info_reply,
"xcb_xkb_get_device_info_reply");
function xcb_xkb_set_device_info_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:11898
pragma Import
(C,
xcb_xkb_set_device_info_sizeof,
"xcb_xkb_set_device_info_sizeof");
function xcb_xkb_set_device_info_checked
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
firstBtn : Libc.Stdint.uint8_t;
nBtns : Libc.Stdint.uint8_t;
change : Libc.Stdint.uint16_t;
nDeviceLedFBs : Libc.Stdint.uint16_t;
btnActions : System.Address;
leds : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:11929
pragma Import
(C,
xcb_xkb_set_device_info_checked,
"xcb_xkb_set_device_info_checked");
function xcb_xkb_set_device_info
(c : xcb_connection_t_access;
deviceSpec : xcb_xkb_device_spec_t;
firstBtn : Libc.Stdint.uint8_t;
nBtns : Libc.Stdint.uint8_t;
change : Libc.Stdint.uint16_t;
nDeviceLedFBs : Libc.Stdint.uint16_t;
btnActions : System.Address;
leds : System.Address)
return XCB.xcb_void_cookie_t; -- /usr/include/xcb/xkb.h:11964
pragma Import (C, xcb_xkb_set_device_info, "xcb_xkb_set_device_info");
function xcb_xkb_set_debugging_flags_sizeof
(u_buffer : System.Address) return int; -- /usr/include/xcb/xkb.h:11974
pragma Import
(C,
xcb_xkb_set_debugging_flags_sizeof,
"xcb_xkb_set_debugging_flags_sizeof");
function xcb_xkb_set_debugging_flags
(c : xcb_connection_t_access;
msgLength : Libc.Stdint.uint16_t;
affectFlags : Libc.Stdint.uint32_t;
flags : Libc.Stdint.uint32_t;
affectCtrls : Libc.Stdint.uint32_t;
ctrls : Libc.Stdint.uint32_t;
message : access xcb_xkb_string8_t)
return xcb_xkb_set_debugging_flags_cookie_t; -- /usr/include/xcb/xkb.h:12001
pragma Import
(C,
xcb_xkb_set_debugging_flags,
"xcb_xkb_set_debugging_flags");
function xcb_xkb_set_debugging_flags_unchecked
(c : xcb_connection_t_access;
msgLength : Libc.Stdint.uint16_t;
affectFlags : Libc.Stdint.uint32_t;
flags : Libc.Stdint.uint32_t;
affectCtrls : Libc.Stdint.uint32_t;
ctrls : Libc.Stdint.uint32_t;
message : access xcb_xkb_string8_t)
return xcb_xkb_set_debugging_flags_cookie_t; -- /usr/include/xcb/xkb.h:12037
pragma Import
(C,
xcb_xkb_set_debugging_flags_unchecked,
"xcb_xkb_set_debugging_flags_unchecked");
function xcb_xkb_set_debugging_flags_reply
(c : xcb_connection_t_access;
cookie : xcb_xkb_set_debugging_flags_cookie_t;
e : access xcb_generic_error_t_access)
return access xcb_xkb_set_debugging_flags_reply_t; -- /usr/include/xcb/xkb.h:12072
pragma Import
(C,
xcb_xkb_set_debugging_flags_reply,
"xcb_xkb_set_debugging_flags_reply");
end XCB.XKB;
|
-- Copyright 2015-2016 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pack is
type Rec_Type is record
I : Integer;
B : Boolean;
end record;
type Vec_Type is array (1 .. 4) of Rec_Type;
type Array_Type is array (Positive range <>) of Vec_Type;
procedure Do_Nothing (A : Array_Type);
function Identity (I : Integer) return Integer;
end Pack;
|
-- Copyright 2008-2015 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck; use Pck;
procedure Foo is
My_Parameter : Parameter := Ident (P => (1, 2, 3));
begin
Do_Nothing (My_Parameter); -- STOP
end Foo;
|
package Loop_Optimization7_Pkg is
pragma Pure;
type Rec is record
F : Float;
end record;
function Conv (Trig : Rec) return Rec;
end Loop_Optimization7_Pkg;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-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$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.OCL.Invalid_Literal_Exps.Collections is
pragma Preelaborate;
package OCL_Invalid_Literal_Exp_Collections is
new AMF.Generic_Collections
(OCL_Invalid_Literal_Exp,
OCL_Invalid_Literal_Exp_Access);
type Set_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Set with null record;
Empty_Set_Of_OCL_Invalid_Literal_Exp : constant Set_Of_OCL_Invalid_Literal_Exp;
type Ordered_Set_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_OCL_Invalid_Literal_Exp : constant Ordered_Set_Of_OCL_Invalid_Literal_Exp;
type Bag_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Bag with null record;
Empty_Bag_Of_OCL_Invalid_Literal_Exp : constant Bag_Of_OCL_Invalid_Literal_Exp;
type Sequence_Of_OCL_Invalid_Literal_Exp is
new OCL_Invalid_Literal_Exp_Collections.Sequence with null record;
Empty_Sequence_Of_OCL_Invalid_Literal_Exp : constant Sequence_Of_OCL_Invalid_Literal_Exp;
private
Empty_Set_Of_OCL_Invalid_Literal_Exp : constant Set_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Set with null record);
Empty_Ordered_Set_Of_OCL_Invalid_Literal_Exp : constant Ordered_Set_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Ordered_Set with null record);
Empty_Bag_Of_OCL_Invalid_Literal_Exp : constant Bag_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Bag with null record);
Empty_Sequence_Of_OCL_Invalid_Literal_Exp : constant Sequence_Of_OCL_Invalid_Literal_Exp
:= (OCL_Invalid_Literal_Exp_Collections.Sequence with null record);
end AMF.OCL.Invalid_Literal_Exps.Collections;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . R P C --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- Note: this is a dummy implementation which does not support distribution.
-- The GLADE distribution package includes a replacement for this file which
-- has a different private
with Ada.Streams;
package System.RPC is
type Partition_ID is range 0 .. Integer'Last;
Communication_Error : exception;
type Params_Stream_Type
(Initial_Size : Ada.Streams.Stream_Element_Count) is new
Ada.Streams.Root_Stream_Type with private;
overriding procedure Read
(Stream : in out Params_Stream_Type;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset);
overriding procedure Write
(Stream : in out Params_Stream_Type;
Item : Ada.Streams.Stream_Element_Array);
-- Synchronous call
procedure Do_RPC
(Partition : Partition_ID;
Params : access Params_Stream_Type;
Result : access Params_Stream_Type);
-- Asynchronous call
procedure Do_APC
(Partition : Partition_ID;
Params : access Params_Stream_Type);
-- The handler for incoming RPCs
type RPC_Receiver is
access procedure
(Params : access Params_Stream_Type;
Result : access Params_Stream_Type);
procedure Establish_RPC_Receiver (
Partition : Partition_ID;
Receiver : RPC_Receiver);
private
type Params_Stream_Type
(Initial_Size : Ada.Streams.Stream_Element_Count) is new
Ada.Streams.Root_Stream_Type with null record;
end System.RPC;
|
generic
type Element is mod <>;
type Index is range <>;
type Element_Array is array (Index range <>) of Element;
Hash_Length : Index;
type Hash_Context is private;
with function Hash_Initialize (Input : Element_Array) return Hash_Context;
with procedure Hash_Update
(Ctx : in out Hash_Context; Input : Element_Array);
with function Hash_Finalize (Ctx : Hash_Context) return Element_Array;
package PBKDF2_Generic with
Pure,
Preelaborate
is
pragma Compile_Time_Error
(Element'Modulus /= 256,
"'Element' type must be mod 2**8, i.e. represent a byte");
function PBKDF2
(Password : String; Salt : String; Iterations : Positive;
Derived_Key_Length : Index) return Element_Array;
function PBKDF2
(Password : Element_Array; Salt : Element_Array; Iterations : Positive;
Derived_Key_Length : Index) return Element_Array;
private
function Write_Big_Endian (Input : Index) return Element_Array;
procedure XOR_In_Place (L : in out Element_Array; R : Element_Array);
end PBKDF2_Generic;
|
with impact.d2.orbs.Collision,
impact.d2.Math;
private with impact.d2.orbs.dynamic_Tree;
package impact.d2.orbs.Broadphase
--
-- The broad-phase is used for computing pairs and performing volume queries and ray casts.
-- This broad-phase does not persist pairs. Instead, this reports potentially new pairs.
-- It is up to the client to consume the new pairs and to track subsequent overlap.
--
is
use impact.d2.Math;
type b2Pair is
record
proxyIdA,
proxyIdB,
next : int32;
end record;
type b2Pairs is array (int32 range <>) of aliased b2Pair;
e_nullProxy : constant := -1;
type b2BroadPhase is tagged private;
function to_b2BroadPhase return b2BroadPhase;
procedure destruct (Self : in out b2BroadPhase);
-- Create a proxy with an initial AABB. Pairs are not reported until
-- UpdatePairs is called.
--
function CreateProxy (Self : access b2BroadPhase; aabb : in collision.b2AABB;
userData : access Any'Class) return int32;
-- Destroy a proxy. It is up to the client to remove any pairs.
--
procedure DestroyProxy (Self : in out b2BroadPhase; proxyId : in int32);
-- Call MoveProxy as many times as you like, then when you are done
-- call UpdatePairs to finalized the proxy pairs (for your time step).
--
procedure MoveProxy (Self : in out b2BroadPhase; proxyId : in int32;
aabb : in collision.b2AABB;
displacement : in b2Vec2);
-- Get the fat AABB for a proxy.
--
function GetFatAABB (Self : in b2BroadPhase; proxyId : in int32) return collision.b2AABB;
-- Get user data from a proxy. Returns NULL if the id is invalid.
--
function GetUserData (Self : in b2BroadPhase; proxyId : in int32) return access Any'Class;
-- Test overlap of fat AABBs.
--
function TestOverlap (Self : in b2BroadPhase; proxyIdA, proxyIdB : in int32) return Boolean;
-- Get the number of proxies.
--
function GetProxyCount (Self : in b2BroadPhase) return int32;
-- Update the pairs. This results in pair callbacks. This can only add pairs.
--
generic
type callback_t is private;
with procedure addPair (the_Callback : access callback_t;
userDataA,
userDataB : access Any'Class);
procedure UpdatePairs (Self : in out b2BroadPhase; the_Callback : access callback_t);
-- template <typename T>
-- void UpdatePairs(T* callback);
-- addPair (callback, userDataA, userDataB);
-- Query an AABB for overlapping proxies. The callback class
-- is called for each proxy that overlaps the supplied AABB.
--
generic
type callback_t is private;
with function QueryCallback (the_Callback : access callback_t ;
nodeId : in int32 ) return Boolean;
procedure Query (Self : in b2BroadPhase; the_Callback : access callback_t;
aabb : in collision.b2AABB);
-- template <typename T>
-- void Query(T* callback, const b2AABB& aabb) const;
-- Ray-cast against the proxies in the tree. This relies on the callback
-- to perform a exact ray-cast in the case were the proxy contains a shape.
-- The callback also performs the any collision filtering. This has performance
-- roughly equal to k * log(n), where k is the number of collisions and n is the
-- number of proxies in the tree.
-- 'input' the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
-- 'callback' a callback class that is called for each proxy that is hit by the ray.
--
generic
type callback_t is private;
with function RayCastCallback (the_Callback : access callback_t;
Input : in collision.b2RayCastInput;
nodeId : in int32 ) return float32;
procedure RayCast (Self : in b2BroadPhase; the_Callback : access callback_t;
input : in collision.b2RayCastInput);
-- template <typename T>
-- void RayCast(T* callback, const b2RayCastInput& input) const;
-- Compute the height of the embedded tree.
--
function ComputeHeight (Self : in b2BroadPhase) return int32;
private
type b2Pairs_view is access all b2Pairs;
type int32_array_view is access all int32_array;
type b2BroadPhase is tagged
record
m_tree : aliased dynamic_tree.b2DynamicTree := dynamic_tree.to_b2DynamicTree;
m_proxyCount : int32;
m_moveBuffer : int32_array_view;
m_moveCapacity : int32;
m_moveCount : int32;
m_pairBuffer : b2Pairs_view;
m_pairCapacity : int32;
m_pairCount : int32;
m_queryProxyId : int32;
end record;
procedure BufferMove (Self : in out b2BroadPhase; proxyId : in int32);
procedure unBufferMove (Self : in out b2BroadPhase; proxyId : in int32);
function QueryCallback (Self : access b2BroadPhase; proxyId : in int32) return Boolean;
end impact.d2.orbs.Broadphase;
|
------------------------------------------------------------------------------
-- --
-- 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 STM32.DMA; use STM32.DMA;
with HAL.SPI;
package body STM32.SPI.DMA is
procedure Transmit_Common
(This : in out SPI_Port_DMA;
Source : System.Address;
Data_Count : UInt16;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000);
---------------------
-- Transmit_Common --
---------------------
procedure Transmit_Common
(This : in out SPI_Port_DMA;
Source : System.Address;
Data_Count : UInt16;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
pragma Unreferenced (Timeout);
DMA_Status : DMA_Error_Code;
begin
if not Compatible_Alignments (This.TX_DMA.Controller.all,
This.TX_DMA.Stream,
Source,
This.Data_Register_Address)
then
raise Program_Error with "Incompatible alignments";
end if;
-- Enable TX DMA
This.Periph.CR2.TXDMAEN := True;
This.TX_DMA.Start_Transfer (Source => Source,
Destination => This.Data_Register_Address,
Data_Count => Data_Count);
This.TX_DMA.Wait_For_Completion (DMA_Status);
if DMA_Status = DMA_No_Error then
Status := HAL.SPI.Ok;
else
Status := HAL.SPI.Err_Error;
end if;
end Transmit_Common;
------------------------
-- Set_TX_DMA_Handler --
------------------------
procedure Set_TX_DMA_Handler
(This : in out SPI_Port_DMA;
DMA : DMA_Interrupt_Controller_Access)
is
begin
This.TX_DMA := DMA;
end Set_TX_DMA_Handler;
---------------------------
-- Set_Polling_Threshold --
---------------------------
procedure Set_Polling_Threshold
(This : in out SPI_Port_DMA;
Threshold : Natural)
is
begin
This.Threshold := Threshold;
end Set_Polling_Threshold;
---------------
-- Configure --
---------------
overriding procedure Configure
(This : in out SPI_Port_DMA;
Conf : SPI_Configuration)
is
begin
Configure (Parent (This), Conf);
end Configure;
--------------
-- Transmit --
--------------
overriding procedure Transmit
(This : in out SPI_Port_DMA;
Data : HAL.SPI.SPI_Data_8b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
begin
if This.TX_DMA = null or else Data'Length < This.Threshold then
-- Fallback to polling implementation
Transmit (Parent (This), Data, Status, Timeout);
else
Transmit_Common (This,
Data (Data'First)'Address,
Data'Length,
Status,
Timeout);
end if;
end Transmit;
--------------
-- Transmit --
--------------
overriding procedure Transmit
(This : in out SPI_Port_DMA;
Data : HAL.SPI.SPI_Data_16b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
begin
if This.TX_DMA = null or else Data'Length < This.Threshold then
-- Fallback to polling implementation
Transmit (Parent (This), Data, Status, Timeout);
else
Transmit_Common (This,
Data (Data'First)'Address,
Data'Length,
Status,
Timeout);
end if;
end Transmit;
-------------
-- Receive --
-------------
overriding procedure Receive
(This : in out SPI_Port_DMA;
Data : out HAL.SPI.SPI_Data_8b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
begin
-- Not implemented, fallback to polling implementation
Receive (Parent (This), Data, Status, Timeout);
end Receive;
-------------
-- Receive --
-------------
overriding procedure Receive
(This : in out SPI_Port_DMA;
Data : out HAL.SPI.SPI_Data_16b;
Status : out HAL.SPI.SPI_Status;
Timeout : Natural := 1000)
is
begin
-- Not implemented, fallback to polling implementation
Receive (Parent (This), Data, Status, Timeout);
end Receive;
end STM32.SPI.DMA;
|
-- Copyright (c) 2020 Bartek thindil Jasicki <thindil@laeran.pl>
--
-- 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.Strings.Unbounded; use Ada.Strings.Unbounded;
package body Tk.TopLevel is
overriding function Create
(Path_Name: Tk_Path_String; Options: Toplevel_Create_Options;
Interpreter: Tcl_Interpreter := Get_Interpreter) return Tk_Toplevel is
Options_String: Unbounded_String := Null_Unbounded_String;
begin
Option_Image
(Name => "background", Value => Options.Background,
Options_String => Options_String);
Option_Image
(Name => "borderwidth", Value => Options.Border_Width,
Options_String => Options_String);
Option_Image
(Name => "class", Value => Options.Class,
Options_String => Options_String);
Option_Image
(Name => "colormap", Value => Options.Color_Map,
Options_String => Options_String);
Option_Image
(Name => "container", Value => Options.Container,
Options_String => Options_String);
Option_Image
(Name => "cursor", Value => Options.Cursor,
Options_String => Options_String);
Option_Image
(Name => "height", Value => Options.Height,
Options_String => Options_String);
Option_Image
(Name => "highlightbackground", Value => Options.Highlight_Background,
Options_String => Options_String);
Option_Image
(Name => "highlightcolot", Value => Options.Highlight_Color,
Options_String => Options_String);
Option_Image
(Name => "highlighthickness", Value => Options.Highlight_Thickness,
Options_String => Options_String);
Option_Image
(Name => "menu", Value => Options.Menu,
Options_String => Options_String);
Option_Image
(Name => "padx", Value => Options.Pad_X,
Options_String => Options_String);
Option_Image
(Name => "pady", Value => Options.Pad_Y,
Options_String => Options_String);
Option_Image
(Name => "relief", Value => Options.Relief,
Options_String => Options_String);
Option_Image
(Name => "screen", Value => Options.Screen,
Options_String => Options_String);
Option_Image
(Name => "takefocus", Value => Options.Take_Focus,
Options_String => Options_String);
Option_Image
(Name => "use", Value => Options.Use_Container,
Options_String => Options_String);
Option_Image
(Name => "visual", Value => Options.Visual,
Options_String => Options_String);
Option_Image
(Name => "width", Value => Options.Width,
Options_String => Options_String);
Tcl_Eval
(Tcl_Script =>
"toplevel " & Path_Name & " " & To_String(Source => Options_String),
Interpreter => Interpreter);
return Get_Widget(Path_Name => Path_Name, Interpreter => Interpreter);
end Create;
overriding procedure Create
(Toplevel_Widget: out Tk_Toplevel; Path_Name: Tk_Path_String;
Options: Toplevel_Create_Options;
Interpreter: Tcl_Interpreter := Get_Interpreter) is
begin
Toplevel_Widget :=
Create
(Path_Name => Path_Name, Options => Options,
Interpreter => Interpreter);
end Create;
overriding function Get_Options
(Toplevel_Widget: Tk_Toplevel) return Toplevel_Create_Options is
begin
return
Options: Toplevel_Create_Options := Default_Toplevel_Create_Options do
Options.Background :=
Option_Value(Widgt => Toplevel_Widget, Name => "background");
Options.Border_Width :=
Option_Value(Widgt => Toplevel_Widget, Name => "borderwidth");
Options.Class :=
Option_Value(Widgt => Toplevel_Widget, Name => "class");
Options.Color_Map :=
Option_Value(Widgt => Toplevel_Widget, Name => "colormap");
Options.Container :=
Option_Value(Widgt => Toplevel_Widget, Name => "container");
Options.Cursor :=
Option_Value(Widgt => Toplevel_Widget, Name => "cursor");
Options.Height :=
Option_Value(Widgt => Toplevel_Widget, Name => "height");
Options.Highlight_Background :=
Option_Value
(Widgt => Toplevel_Widget, Name => "highlightbackground");
Options.Highlight_Color :=
Option_Value(Widgt => Toplevel_Widget, Name => "highlightcolor");
Options.Highlight_Thickness :=
Option_Value
(Widgt => Toplevel_Widget, Name => "highlightthickness");
Options.Menu :=
Option_Value(Widgt => Toplevel_Widget, Name => "menu");
Options.Pad_X :=
Option_Value(Widgt => Toplevel_Widget, Name => "padx");
Options.Pad_Y :=
Option_Value(Widgt => Toplevel_Widget, Name => "pady");
Options.Relief :=
Option_Value(Widgt => Toplevel_Widget, Name => "relief");
Options.Screen :=
Option_Value(Widgt => Toplevel_Widget, Name => "screen");
Options.Take_Focus :=
Option_Value(Widgt => Toplevel_Widget, Name => "takefocus");
Options.Use_Container :=
Option_Value(Widgt => Toplevel_Widget, Name => "use");
Options.Visual :=
Option_Value(Widgt => Toplevel_Widget, Name => "visual");
Options.Width :=
Option_Value(Widgt => Toplevel_Widget, Name => "width");
end return;
end Get_Options;
overriding procedure Configure
(Toplevel_Widget: Tk_Toplevel; Options: Toplevel_Options) is
Options_String: Unbounded_String := Null_Unbounded_String;
begin
Option_Image
(Name => "background", Value => Options.Background,
Options_String => Options_String);
Option_Image
(Name => "borderwidth", Value => Options.Border_Width,
Options_String => Options_String);
Option_Image
(Name => "cursor", Value => Options.Cursor,
Options_String => Options_String);
Option_Image
(Name => "height", Value => Options.Height,
Options_String => Options_String);
Option_Image
(Name => "highlightbackground", Value => Options.Highlight_Background,
Options_String => Options_String);
Option_Image
(Name => "highlightcolot", Value => Options.Highlight_Color,
Options_String => Options_String);
Option_Image
(Name => "highlighthickness", Value => Options.Highlight_Thickness,
Options_String => Options_String);
Option_Image
(Name => "menu", Value => Options.Menu,
Options_String => Options_String);
Option_Image
(Name => "padx", Value => Options.Pad_X,
Options_String => Options_String);
Option_Image
(Name => "pady", Value => Options.Pad_Y,
Options_String => Options_String);
Option_Image
(Name => "relief", Value => Options.Relief,
Options_String => Options_String);
Option_Image
(Name => "takefocus", Value => Options.Take_Focus,
Options_String => Options_String);
Option_Image
(Name => "width", Value => Options.Width,
Options_String => Options_String);
Execute_Widget_Command
(Widgt => Toplevel_Widget, Command_Name => "configure",
Options => To_String(Source => Options_String));
end Configure;
end Tk.TopLevel;
|
-- Copyright 2012-2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Ops is
function Make (X: Natural) return Int is
begin
return Int (X);
end Make;
function "+" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) + IntRep (I2));
end;
function "-" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) - IntRep (I2));
end;
function "*" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) * IntRep (I2));
end;
function "/" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) / IntRep (I2));
end;
function "mod" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) mod IntRep (I2));
end;
function "rem" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) rem IntRep (I2));
end;
function "**" (I1, I2 : Int) return Int is
Result : IntRep := 1;
begin
for J in 1 .. IntRep (I2) loop
Result := IntRep (I1) * Result;
end loop;
return Int (Result);
end;
function "<" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) < IntRep (I2);
end;
function "<=" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) <= IntRep (I2);
end;
function ">" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) > IntRep (I2);
end;
function ">=" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) >= IntRep (I2);
end;
function "=" (I1, I2 : Int) return Boolean is
begin
return IntRep (I1) = IntRep (I2);
end;
function "and" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) and IntRep (I2));
end;
function "or" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) or IntRep (I2));
end;
function "xor" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) xor IntRep (I2));
end;
function "&" (I1, I2 : Int) return Int is
begin
return Int (IntRep (I1) and IntRep (I2));
end;
function "abs" (I1 : Int) return Int is
begin
return Int (abs IntRep (I1));
end;
function "not" (I1 : Int) return Int is
begin
return Int (not IntRep (I1));
end;
function "+" (I1 : Int) return Int is
begin
return Int (IntRep (I1));
end;
function "-" (I1 : Int) return Int is
begin
return Int (-IntRep (I1));
end;
procedure Dummy (I1 : Int) is
begin
null;
end Dummy;
procedure Dummy (B1 : Boolean) is
begin
null;
end Dummy;
end Ops;
|
-- Copyright 2019-2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pack; use Pack;
procedure Foo is
S : String := "test string";
I : Natural := S'First;
begin
declare
procedure Nested is
begin
Do_Nothing (S); -- BREAK
end Nested;
begin
Nested;
end;
end Foo;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . H A S H E D _ M A P S --
-- --
-- B o d y --
-- --
-- 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/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with Ada.Containers.Hash_Tables.Generic_Operations;
pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Operations);
with Ada.Containers.Hash_Tables.Generic_Keys;
pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Keys);
with Ada.Containers.Helpers; use Ada.Containers.Helpers;
with System; use type System.Address;
package body Ada.Containers.Hashed_Maps is
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
-----------------------
-- Local Subprograms --
-----------------------
function Copy_Node
(Source : Node_Access) return Node_Access;
pragma Inline (Copy_Node);
function Equivalent_Key_Node
(Key : Key_Type;
Node : Node_Access) return Boolean;
pragma Inline (Equivalent_Key_Node);
procedure Free (X : in out Node_Access);
function Find_Equal_Key
(R_HT : Hash_Table_Type;
L_Node : Node_Access) return Boolean;
function Hash_Node (Node : Node_Access) return Hash_Type;
pragma Inline (Hash_Node);
function Next (Node : Node_Access) return Node_Access;
pragma Inline (Next);
function Read_Node
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Set_Next (Node : Node_Access; Next : Node_Access);
pragma Inline (Set_Next);
function Vet (Position : Cursor) return Boolean;
procedure Write_Node
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
--------------------------
-- Local Instantiations --
--------------------------
package HT_Ops is new Hash_Tables.Generic_Operations
(HT_Types => HT_Types,
Hash_Node => Hash_Node,
Next => Next,
Set_Next => Set_Next,
Copy_Node => Copy_Node,
Free => Free);
package Key_Ops is new Hash_Tables.Generic_Keys
(HT_Types => HT_Types,
Next => Next,
Set_Next => Set_Next,
Key_Type => Key_Type,
Hash => Hash,
Equivalent_Keys => Equivalent_Key_Node);
function Is_Equal is new HT_Ops.Generic_Equal (Find_Equal_Key);
procedure Read_Nodes is new HT_Ops.Generic_Read (Read_Node);
procedure Write_Nodes is new HT_Ops.Generic_Write (Write_Node);
---------
-- "=" --
---------
function "=" (Left, Right : Map) return Boolean is
begin
return Is_Equal (Left.HT, Right.HT);
end "=";
------------
-- Adjust --
------------
procedure Adjust (Container : in out Map) is
begin
HT_Ops.Adjust (Container.HT);
end Adjust;
------------
-- Assign --
------------
procedure Assign (Target : in out Map; Source : Map) is
procedure Insert_Item (Node : Node_Access);
pragma Inline (Insert_Item);
procedure Insert_Items is new HT_Ops.Generic_Iteration (Insert_Item);
-----------------
-- Insert_Item --
-----------------
procedure Insert_Item (Node : Node_Access) is
begin
Target.Insert (Key => Node.Key, New_Item => Node.Element);
end Insert_Item;
-- Start of processing for Assign
begin
if Target'Address = Source'Address then
return;
end if;
Target.Clear;
if Target.Capacity < Source.Length then
Target.Reserve_Capacity (Source.Length);
end if;
Insert_Items (Source.HT);
end Assign;
--------------
-- Capacity --
--------------
function Capacity (Container : Map) return Count_Type is
begin
return HT_Ops.Capacity (Container.HT);
end Capacity;
-----------
-- Clear --
-----------
procedure Clear (Container : in out Map) is
begin
HT_Ops.Clear (Container.HT);
end Clear;
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Container : aliased Map;
Position : Cursor) return Constant_Reference_Type
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with
"Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor designates wrong map";
end if;
pragma Assert
(Vet (Position),
"Position cursor in Constant_Reference is bad");
declare
HT : Hash_Table_Type renames Container'Unrestricted_Access.all.HT;
TC : constant Tamper_Counts_Access :=
HT.TC'Unrestricted_Access;
begin
return R : constant Constant_Reference_Type :=
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
Lock (TC.all);
end return;
end;
end Constant_Reference;
function Constant_Reference
(Container : aliased Map;
Key : Key_Type) return Constant_Reference_Type
is
HT : Hash_Table_Type renames Container'Unrestricted_Access.HT;
Node : constant Node_Access := Key_Ops.Find (HT, Key);
begin
if Checks and then Node = null then
raise Constraint_Error with "key not in map";
end if;
declare
TC : constant Tamper_Counts_Access :=
HT.TC'Unrestricted_Access;
begin
return R : constant Constant_Reference_Type :=
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
Lock (TC.all);
end return;
end;
end Constant_Reference;
--------------
-- Contains --
--------------
function Contains (Container : Map; Key : Key_Type) return Boolean is
begin
return Find (Container, Key) /= No_Element;
end Contains;
----------
-- Copy --
----------
function Copy
(Source : Map;
Capacity : Count_Type := 0) return Map
is
C : Count_Type;
begin
if Capacity < Source.Length then
if Checks and then Capacity /= 0 then
raise Capacity_Error
with "Requested capacity is less than Source length";
end if;
C := Source.Length;
else
C := Capacity;
end if;
return Target : Map do
Target.Reserve_Capacity (C);
Target.Assign (Source);
end return;
end Copy;
---------------
-- Copy_Node --
---------------
function Copy_Node
(Source : Node_Access) return Node_Access
is
Target : constant Node_Access :=
new Node_Type'(Key => Source.Key,
Element => Source.Element,
Next => null);
begin
return Target;
end Copy_Node;
------------
-- Delete --
------------
procedure Delete (Container : in out Map; Key : Key_Type) is
X : Node_Access;
begin
Key_Ops.Delete_Key_Sans_Free (Container.HT, Key, X);
if Checks and then X = null then
raise Constraint_Error with "attempt to delete key not in map";
end if;
Free (X);
end Delete;
procedure Delete (Container : in out Map; Position : in out Cursor) is
begin
if Checks and then Position.Node = null then
raise Constraint_Error with
"Position cursor of Delete equals No_Element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor of Delete designates wrong map";
end if;
TC_Check (Container.HT.TC);
pragma Assert (Vet (Position), "bad cursor in Delete");
HT_Ops.Delete_Node_Sans_Free (Container.HT, Position.Node);
Free (Position.Node);
Position.Container := null;
end Delete;
-------------
-- Element --
-------------
function Element (Container : Map; Key : Key_Type) return Element_Type is
HT : Hash_Table_Type renames Container'Unrestricted_Access.HT;
Node : constant Node_Access := Key_Ops.Find (HT, Key);
begin
if Checks and then Node = null then
raise Constraint_Error with
"no element available because key not in map";
end if;
return Node.Element;
end Element;
function Element (Position : Cursor) return Element_Type is
begin
if Checks and then Position.Node = null then
raise Constraint_Error with
"Position cursor of function Element equals No_Element";
end if;
pragma Assert (Vet (Position), "bad cursor in function Element");
return Position.Node.Element;
end Element;
-------------------------
-- Equivalent_Key_Node --
-------------------------
function Equivalent_Key_Node
(Key : Key_Type;
Node : Node_Access) return Boolean is
begin
return Equivalent_Keys (Key, Node.Key);
end Equivalent_Key_Node;
---------------------
-- Equivalent_Keys --
---------------------
function Equivalent_Keys (Left, Right : Cursor)
return Boolean is
begin
if Checks and then Left.Node = null then
raise Constraint_Error with
"Left cursor of Equivalent_Keys equals No_Element";
end if;
if Checks and then Right.Node = null then
raise Constraint_Error with
"Right cursor of Equivalent_Keys equals No_Element";
end if;
pragma Assert (Vet (Left), "Left cursor of Equivalent_Keys is bad");
pragma Assert (Vet (Right), "Right cursor of Equivalent_Keys is bad");
return Equivalent_Keys (Left.Node.Key, Right.Node.Key);
end Equivalent_Keys;
function Equivalent_Keys (Left : Cursor; Right : Key_Type) return Boolean is
begin
if Checks and then Left.Node = null then
raise Constraint_Error with
"Left cursor of Equivalent_Keys equals No_Element";
end if;
pragma Assert (Vet (Left), "Left cursor in Equivalent_Keys is bad");
return Equivalent_Keys (Left.Node.Key, Right);
end Equivalent_Keys;
function Equivalent_Keys (Left : Key_Type; Right : Cursor) return Boolean is
begin
if Checks and then Right.Node = null then
raise Constraint_Error with
"Right cursor of Equivalent_Keys equals No_Element";
end if;
pragma Assert (Vet (Right), "Right cursor of Equivalent_Keys is bad");
return Equivalent_Keys (Left, Right.Node.Key);
end Equivalent_Keys;
-------------
-- Exclude --
-------------
procedure Exclude (Container : in out Map; Key : Key_Type) is
X : Node_Access;
begin
Key_Ops.Delete_Key_Sans_Free (Container.HT, Key, X);
Free (X);
end Exclude;
--------------
-- Finalize --
--------------
procedure Finalize (Container : in out Map) is
begin
HT_Ops.Finalize (Container.HT);
end Finalize;
procedure Finalize (Object : in out Iterator) is
begin
if Object.Container /= null then
Unbusy (Object.Container.HT.TC);
end if;
end Finalize;
----------
-- Find --
----------
function Find (Container : Map; Key : Key_Type) return Cursor is
HT : Hash_Table_Type renames Container'Unrestricted_Access.HT;
Node : constant Node_Access := Key_Ops.Find (HT, Key);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node, Hash_Type'Last);
end Find;
--------------------
-- Find_Equal_Key --
--------------------
function Find_Equal_Key
(R_HT : Hash_Table_Type;
L_Node : Node_Access) return Boolean
is
R_Index : constant Hash_Type := Key_Ops.Index (R_HT, L_Node.Key);
R_Node : Node_Access := R_HT.Buckets (R_Index);
begin
while R_Node /= null loop
if Equivalent_Keys (L_Node.Key, R_Node.Key) then
return L_Node.Element = R_Node.Element;
end if;
R_Node := R_Node.Next;
end loop;
return False;
end Find_Equal_Key;
-----------
-- First --
-----------
function First (Container : Map) return Cursor is
Pos : Hash_Type;
Node : constant Node_Access := HT_Ops.First (Container.HT, Pos);
begin
if Node = null then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Node, Pos);
end First;
function First (Object : Iterator) return Cursor is
begin
return Object.Container.First;
end First;
----------
-- Free --
----------
procedure Free (X : in out Node_Access) is
procedure Deallocate is
new Ada.Unchecked_Deallocation (Node_Type, Node_Access);
begin
if X /= null then
X.Next := X; -- detect mischief (in Vet)
Deallocate (X);
end if;
end Free;
------------------------
-- Get_Element_Access --
------------------------
function Get_Element_Access
(Position : Cursor) return not null Element_Access is
begin
return Position.Node.Element'Access;
end Get_Element_Access;
-----------------
-- Has_Element --
-----------------
function Has_Element (Position : Cursor) return Boolean is
begin
pragma Assert (Vet (Position), "bad cursor in Has_Element");
return Position.Node /= null;
end Has_Element;
---------------
-- Hash_Node --
---------------
function Hash_Node (Node : Node_Access) return Hash_Type is
begin
return Hash (Node.Key);
end Hash_Node;
-------------
-- Include --
-------------
procedure Include
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type)
is
Position : Cursor;
Inserted : Boolean;
begin
Insert (Container, Key, New_Item, Position, Inserted);
if not Inserted then
TE_Check (Container.HT.TC);
Position.Node.Key := Key;
Position.Node.Element := New_Item;
end if;
end Include;
------------
-- Insert --
------------
procedure Insert
(Container : in out Map;
Key : Key_Type;
Position : out Cursor;
Inserted : out Boolean)
is
function New_Node (Next : Node_Access) return Node_Access;
pragma Inline (New_Node);
procedure Local_Insert is
new Key_Ops.Generic_Conditional_Insert (New_Node);
--------------
-- New_Node --
--------------
function New_Node (Next : Node_Access) return Node_Access is
begin
return new Node_Type'(Key => Key,
Element => <>,
Next => Next);
end New_Node;
HT : Hash_Table_Type renames Container.HT;
-- Start of processing for Insert
begin
if HT_Ops.Capacity (HT) = 0 then
HT_Ops.Reserve_Capacity (HT, 1);
end if;
Local_Insert (HT, Key, Position.Node, Inserted);
if Inserted
and then HT.Length > HT_Ops.Capacity (HT)
then
HT_Ops.Reserve_Capacity (HT, HT.Length);
end if;
Position.Container := Container'Unrestricted_Access;
end Insert;
procedure Insert
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type;
Position : out Cursor;
Inserted : out Boolean)
is
function New_Node (Next : Node_Access) return Node_Access;
pragma Inline (New_Node);
procedure Local_Insert is
new Key_Ops.Generic_Conditional_Insert (New_Node);
--------------
-- New_Node --
--------------
function New_Node (Next : Node_Access) return Node_Access is
begin
return new Node_Type'(Key, New_Item, Next);
end New_Node;
HT : Hash_Table_Type renames Container.HT;
-- Start of processing for Insert
begin
if HT_Ops.Capacity (HT) = 0 then
HT_Ops.Reserve_Capacity (HT, 1);
end if;
Local_Insert (HT, Key, Position.Node, Inserted);
if Inserted
and then HT.Length > HT_Ops.Capacity (HT)
then
HT_Ops.Reserve_Capacity (HT, HT.Length);
end if;
Position.Container := Container'Unrestricted_Access;
end Insert;
procedure Insert
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type)
is
Position : Cursor;
pragma Unreferenced (Position);
Inserted : Boolean;
begin
Insert (Container, Key, New_Item, Position, Inserted);
if Checks and then not Inserted then
raise Constraint_Error with
"attempt to insert key already in map";
end if;
end Insert;
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Map) return Boolean is
begin
return Container.HT.Length = 0;
end Is_Empty;
-------------
-- Iterate --
-------------
procedure Iterate
(Container : Map;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Node_Access; Position : Hash_Type);
pragma Inline (Process_Node);
procedure Local_Iterate is
new HT_Ops.Generic_Iteration_With_Position (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Node_Access; Position : Hash_Type) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node, Position));
end Process_Node;
Busy : With_Busy (Container.HT.TC'Unrestricted_Access);
-- Start of processing for Iterate
begin
Local_Iterate (Container.HT);
end Iterate;
function Iterate
(Container : Map) return Map_Iterator_Interfaces.Forward_Iterator'Class
is
begin
return It : constant Iterator :=
(Limited_Controlled with Container => Container'Unrestricted_Access)
do
Busy (Container.HT.TC'Unrestricted_Access.all);
end return;
end Iterate;
---------
-- Key --
---------
function Key (Position : Cursor) return Key_Type is
begin
if Checks and then Position.Node = null then
raise Constraint_Error with
"Position cursor of function Key equals No_Element";
end if;
pragma Assert (Vet (Position), "bad cursor in function Key");
return Position.Node.Key;
end Key;
------------
-- Length --
------------
function Length (Container : Map) return Count_Type is
begin
return Container.HT.Length;
end Length;
----------
-- Move --
----------
procedure Move
(Target : in out Map;
Source : in out Map)
is
begin
HT_Ops.Move (Target => Target.HT, Source => Source.HT);
end Move;
----------
-- Next --
----------
function Next (Node : Node_Access) return Node_Access is
begin
return Node.Next;
end Next;
function Next (Position : Cursor) return Cursor is
Node : Node_Access := null;
Pos : Hash_Type;
-- Position of cursor's element in the map buckets.
begin
if Position.Node = null then
return No_Element;
end if;
pragma Assert (Vet (Position), "bad cursor in function Next");
-- Initialize to current position, so that HT_Ops.Next can use it
Pos := Position.Position;
Node := HT_Ops.Next (Position.Container.HT, Position.Node, Pos);
if Node = null then
return No_Element;
else
return Cursor'(Position.Container, Node, Pos);
end if;
end Next;
procedure Next (Position : in out Cursor) is
begin
Position := Next (Position);
end Next;
function Next
(Object : Iterator;
Position : Cursor) return Cursor
is
begin
if Position.Container = null then
return No_Element;
end if;
if Checks and then Position.Container /= Object.Container then
raise Program_Error with
"Position cursor of Next designates wrong map";
end if;
return Next (Position);
end Next;
----------------------
-- Pseudo_Reference --
----------------------
function Pseudo_Reference
(Container : aliased Map'Class) return Reference_Control_Type
is
TC : constant Tamper_Counts_Access :=
Container.HT.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
Lock (TC.all);
end return;
end Pseudo_Reference;
-------------------
-- Query_Element --
-------------------
procedure Query_Element
(Position : Cursor;
Process : not null access
procedure (Key : Key_Type; Element : Element_Type))
is
begin
if Checks and then Position.Node = null then
raise Constraint_Error with
"Position cursor of Query_Element equals No_Element";
end if;
pragma Assert (Vet (Position), "bad cursor in Query_Element");
declare
M : Map renames Position.Container.all;
HT : Hash_Table_Type renames M.HT'Unrestricted_Access.all;
Lock : With_Lock (HT.TC'Unrestricted_Access);
K : Key_Type renames Position.Node.Key;
E : Element_Type renames Position.Node.Element;
begin
Process (K, E);
end;
end Query_Element;
----------
-- Read --
----------
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Map)
is
begin
Read_Nodes (Stream, Container.HT);
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
raise Program_Error with "attempt to stream map cursor";
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
---------------
-- Reference --
---------------
function Reference
(Container : aliased in out Map;
Position : Cursor) return Reference_Type
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with
"Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor designates wrong map";
end if;
pragma Assert
(Vet (Position),
"Position cursor in function Reference is bad");
declare
HT : Hash_Table_Type renames Container'Unrestricted_Access.all.HT;
TC : constant Tamper_Counts_Access :=
HT.TC'Unrestricted_Access;
begin
return R : constant Reference_Type :=
(Element => Position.Node.Element'Access,
Control => (Controlled with TC))
do
Lock (TC.all);
end return;
end;
end Reference;
function Reference
(Container : aliased in out Map;
Key : Key_Type) return Reference_Type
is
HT : Hash_Table_Type renames Container.HT;
Node : constant Node_Access := Key_Ops.Find (HT, Key);
begin
if Checks and then Node = null then
raise Constraint_Error with "key not in map";
end if;
declare
TC : constant Tamper_Counts_Access :=
HT.TC'Unrestricted_Access;
begin
return R : constant Reference_Type :=
(Element => Node.Element'Access,
Control => (Controlled with TC))
do
Lock (TC.all);
end return;
end;
end Reference;
---------------
-- Read_Node --
---------------
function Read_Node
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
begin
Key_Type'Read (Stream, Node.Key);
Element_Type'Read (Stream, Node.Element);
return Node;
exception
when others =>
Free (Node);
raise;
end Read_Node;
-------------
-- Replace --
-------------
procedure Replace
(Container : in out Map;
Key : Key_Type;
New_Item : Element_Type)
is
Node : constant Node_Access := Key_Ops.Find (Container.HT, Key);
begin
if Checks and then Node = null then
raise Constraint_Error with
"attempt to replace key not in map";
end if;
TE_Check (Container.HT.TC);
Node.Key := Key;
Node.Element := New_Item;
end Replace;
---------------------
-- Replace_Element --
---------------------
procedure Replace_Element
(Container : in out Map;
Position : Cursor;
New_Item : Element_Type)
is
begin
if Checks and then Position.Node = null then
raise Constraint_Error with
"Position cursor of Replace_Element equals No_Element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor of Replace_Element designates wrong map";
end if;
TE_Check (Position.Container.HT.TC);
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
Position.Node.Element := New_Item;
end Replace_Element;
----------------------
-- Reserve_Capacity --
----------------------
procedure Reserve_Capacity
(Container : in out Map;
Capacity : Count_Type)
is
begin
HT_Ops.Reserve_Capacity (Container.HT, Capacity);
end Reserve_Capacity;
--------------
-- Set_Next --
--------------
procedure Set_Next (Node : Node_Access; Next : Node_Access) is
begin
Node.Next := Next;
end Set_Next;
--------------------
-- Update_Element --
--------------------
procedure Update_Element
(Container : in out Map;
Position : Cursor;
Process : not null access procedure (Key : Key_Type;
Element : in out Element_Type))
is
begin
if Checks and then Position.Node = null then
raise Constraint_Error with
"Position cursor of Update_Element equals No_Element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor of Update_Element designates wrong map";
end if;
pragma Assert (Vet (Position), "bad cursor in Update_Element");
declare
HT : Hash_Table_Type renames Container.HT;
Lock : With_Lock (HT.TC'Unrestricted_Access);
K : Key_Type renames Position.Node.Key;
E : Element_Type renames Position.Node.Element;
begin
Process (K, E);
end;
end Update_Element;
---------
-- Vet --
---------
function Vet (Position : Cursor) return Boolean is
begin
if Position.Node = null then
return Position.Container = null;
end if;
if Position.Container = null then
return False;
end if;
if Position.Node.Next = Position.Node then
return False;
end if;
declare
HT : Hash_Table_Type renames Position.Container.HT;
X : Node_Access;
begin
if HT.Length = 0 then
return False;
end if;
if HT.Buckets = null
or else HT.Buckets'Length = 0
then
return False;
end if;
X := HT.Buckets (Key_Ops.Checked_Index (HT, Position.Node.Key));
for J in 1 .. HT.Length loop
if X = Position.Node then
return True;
end if;
if X = null then
return False;
end if;
if X = X.Next then -- to prevent unnecessary looping
return False;
end if;
X := X.Next;
end loop;
return False;
end;
end Vet;
-----------
-- Write --
-----------
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Map)
is
begin
Write_Nodes (Stream, Container.HT);
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin
raise Program_Error with "attempt to stream map cursor";
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
----------------
-- Write_Node --
----------------
procedure Write_Node
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin
Key_Type'Write (Stream, Node.Key);
Element_Type'Write (Stream, Node.Element);
end Write_Node;
end Ada.Containers.Hashed_Maps;
|
-----------------------------------------------------------------------
-- security-auth-oauth-yahoo -- Yahoo! OAuth based authentication
-- Copyright (C) 2013, 2014, 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 Util.Log.Loggers;
with Security.OAuth.JWT;
package body Security.Auth.OAuth.Yahoo is
use Util.Log;
use Security.OAuth;
Log : constant Loggers.Logger := Util.Log.Loggers.Create ("Security.Auth.OAuth.Yahoo");
-- ------------------------------
-- Verify the OAuth access token and retrieve information about the user.
-- ------------------------------
overriding
procedure Verify_Access_Token (Realm : in Manager;
Assoc : in Association;
Request : in Parameters'Class;
Token : in Security.OAuth.Clients.Access_Token_Access;
Result : in out Authentication) is
pragma Unreferenced (Request);
begin
-- The token returned by Yahoo! must contain an id_token.
if not (Token.all in Security.OAuth.Clients.OpenID_Token'Class) then
Log.Warn ("Invalid token instance created: missing the id_token");
Set_Result (Result, INVALID_SIGNATURE, "invalid access token returned");
return;
end if;
-- The id_token is a JWT token that must be decoded and verified.
-- See https://developer.yahoo.com/oauth2/guide/openid_connect/decode_id_token.html
-- It contains information to identify the user.
declare
T : constant Security.OAuth.Clients.OpenID_Token_Access :=
Security.OAuth.Clients.OpenID_Token'Class (Token.all)'Access;
Info : constant Security.OAuth.JWT.Token := Security.OAuth.JWT.Decode (T.Get_Id_Token);
begin
-- Verify that the JWT token concerns our application.
if Security.OAuth.JWT.Get_Audience (Info) /= Realm.App.Get_Application_Identifier then
Set_Result (Result, INVALID_SIGNATURE,
"the access token was granted for another application");
return;
-- Verify that the issuer is Yahoo!
elsif Security.OAuth.JWT.Get_Issuer (Info) /= Realm.Issuer then
Set_Result (Result, INVALID_SIGNATURE,
"the access token was not generated by the expected authority");
return;
-- Verify that the nonce we received matches our nonce.
elsif Security.OAuth.JWT.Get_Claim (Info, "nonce") /= Assoc.Nonce then
Set_Result (Result, INVALID_SIGNATURE,
"the access token was not generated with the expected nonce");
return;
end if;
Result.Identity := Realm.Issuer;
Append (Result.Identity, "/");
Append (Result.Identity, Security.OAuth.JWT.Get_Subject (Info));
Result.Claimed_Id := Result.Identity;
Result.First_Name := To_Unbounded_String (JWT.Get_Claim (Info, "name", ""));
Result.Last_Name := To_Unbounded_String (JWT.Get_Claim (Info, "family_name", ""));
Result.Gender := To_Unbounded_String (JWT.Get_Claim (Info, "gender", ""));
Result.Nickname := To_Unbounded_String (JWT.Get_Claim (Info, "nickname", ""));
Result.Full_Name := To_Unbounded_String (JWT.Get_Claim (Info, "name", ""));
-- The email is optional and depends on the scope.
Result.Email := To_Unbounded_String (JWT.Get_Claim (Info, "email", ""));
Set_Result (Result, AUTHENTICATED, "authenticated");
end;
end Verify_Access_Token;
end Security.Auth.OAuth.Yahoo;
|
-- { dg-do run }
with Ada.Direct_IO;
procedure Test_Direct_IO is
package BDIO is new Ada.Direct_IO (Boolean);
use BDIO;
FD : File_Type;
begin
Create (FD, Form => "shared=yes");
Reset (FD);
Close (FD);
end Test_Direct_IO;
|
generic
N: Integer;
package data is
type Vector is private;
type Matrix is private;
function Func1(A,B,C: in Vector; MA,ME: in Matrix) return Integer;
function Func2(MH,MK,ML: in Matrix) return Integer;
function Func3(P: out Vector; MR,MT: in Matrix) return Vector;
function Matrix_Multiplication(A,B: in Matrix) return Matrix;
function Sum_Vector(A,B: in Vector) return Vector;
function Vector_Matrix_Multiplication(A: in Vector; B: in Matrix) return Vector;
function Max_of_Vector(A: in Vector) return Integer;
function Max_of_Matrix(A: in Matrix) return Integer;
function Matrix_Sub(A,B: in Matrix) return Matrix;
procedure Vector_Sort(A: in out Vector);
procedure Vector_Fill_Ones(A: out Vector);
procedure Matrix_Fill_Ones(A: out Matrix);
procedure Vector_Input (A: out Vector); -- fills values of
procedure Vector_Output (A: in Vector); -- shows values of
procedure Matrix_Input (A: out Matrix);
procedure Matrix_Output (A: in Matrix);
private
type Vector is array(1..N) of Integer;
type Matrix is array(1..N) of Vector;
end data;
|
with Ada.Text_IO;
with BigInteger; use BigInteger;
package body Problem_13 is
package IO renames Ada.Text_IO;
procedure Solve is
type Problem_13_Array is Array (1 .. 100) of BigInt;
nums : Problem_13_Array;
sum : BigInt := BigInteger.Create(0);
begin
nums( 1) := BigInteger.Create("37107287533902102798797998220837590246510135740250");
nums( 2) := BigInteger.Create("46376937677490009712648124896970078050417018260538");
nums( 3) := BigInteger.Create("74324986199524741059474233309513058123726617309629");
nums( 4) := BigInteger.Create("91942213363574161572522430563301811072406154908250");
nums( 5) := BigInteger.Create("23067588207539346171171980310421047513778063246676");
nums( 6) := BigInteger.Create("89261670696623633820136378418383684178734361726757");
nums( 7) := BigInteger.Create("28112879812849979408065481931592621691275889832738");
nums( 8) := BigInteger.Create("44274228917432520321923589422876796487670272189318");
nums( 9) := BigInteger.Create("47451445736001306439091167216856844588711603153276");
nums( 10) := BigInteger.Create("70386486105843025439939619828917593665686757934951");
nums( 11) := BigInteger.Create("62176457141856560629502157223196586755079324193331");
nums( 12) := BigInteger.Create("64906352462741904929101432445813822663347944758178");
nums( 13) := BigInteger.Create("92575867718337217661963751590579239728245598838407");
nums( 14) := BigInteger.Create("58203565325359399008402633568948830189458628227828");
nums( 15) := BigInteger.Create("80181199384826282014278194139940567587151170094390");
nums( 16) := BigInteger.Create("35398664372827112653829987240784473053190104293586");
nums( 17) := BigInteger.Create("86515506006295864861532075273371959191420517255829");
nums( 18) := BigInteger.Create("71693888707715466499115593487603532921714970056938");
nums( 19) := BigInteger.Create("54370070576826684624621495650076471787294438377604");
nums( 20) := BigInteger.Create("53282654108756828443191190634694037855217779295145");
nums( 21) := BigInteger.Create("36123272525000296071075082563815656710885258350721");
nums( 22) := BigInteger.Create("45876576172410976447339110607218265236877223636045");
nums( 23) := BigInteger.Create("17423706905851860660448207621209813287860733969412");
nums( 24) := BigInteger.Create("81142660418086830619328460811191061556940512689692");
nums( 25) := BigInteger.Create("51934325451728388641918047049293215058642563049483");
nums( 26) := BigInteger.Create("62467221648435076201727918039944693004732956340691");
nums( 27) := BigInteger.Create("15732444386908125794514089057706229429197107928209");
nums( 28) := BigInteger.Create("55037687525678773091862540744969844508330393682126");
nums( 29) := BigInteger.Create("18336384825330154686196124348767681297534375946515");
nums( 30) := BigInteger.Create("80386287592878490201521685554828717201219257766954");
nums( 31) := BigInteger.Create("78182833757993103614740356856449095527097864797581");
nums( 32) := BigInteger.Create("16726320100436897842553539920931837441497806860984");
nums( 33) := BigInteger.Create("48403098129077791799088218795327364475675590848030");
nums( 34) := BigInteger.Create("87086987551392711854517078544161852424320693150332");
nums( 35) := BigInteger.Create("59959406895756536782107074926966537676326235447210");
nums( 36) := BigInteger.Create("69793950679652694742597709739166693763042633987085");
nums( 37) := BigInteger.Create("41052684708299085211399427365734116182760315001271");
nums( 38) := BigInteger.Create("65378607361501080857009149939512557028198746004375");
nums( 39) := BigInteger.Create("35829035317434717326932123578154982629742552737307");
nums( 40) := BigInteger.Create("94953759765105305946966067683156574377167401875275");
nums( 41) := BigInteger.Create("88902802571733229619176668713819931811048770190271");
nums( 42) := BigInteger.Create("25267680276078003013678680992525463401061632866526");
nums( 43) := BigInteger.Create("36270218540497705585629946580636237993140746255962");
nums( 44) := BigInteger.Create("24074486908231174977792365466257246923322810917141");
nums( 45) := BigInteger.Create("91430288197103288597806669760892938638285025333403");
nums( 46) := BigInteger.Create("34413065578016127815921815005561868836468420090470");
nums( 47) := BigInteger.Create("23053081172816430487623791969842487255036638784583");
nums( 48) := BigInteger.Create("11487696932154902810424020138335124462181441773470");
nums( 49) := BigInteger.Create("63783299490636259666498587618221225225512486764533");
nums( 50) := BigInteger.Create("67720186971698544312419572409913959008952310058822");
nums( 51) := BigInteger.Create("95548255300263520781532296796249481641953868218774");
nums( 52) := BigInteger.Create("76085327132285723110424803456124867697064507995236");
nums( 53) := BigInteger.Create("37774242535411291684276865538926205024910326572967");
nums( 54) := BigInteger.Create("23701913275725675285653248258265463092207058596522");
nums( 55) := BigInteger.Create("29798860272258331913126375147341994889534765745501");
nums( 56) := BigInteger.Create("18495701454879288984856827726077713721403798879715");
nums( 57) := BigInteger.Create("38298203783031473527721580348144513491373226651381");
nums( 58) := BigInteger.Create("34829543829199918180278916522431027392251122869539");
nums( 59) := BigInteger.Create("40957953066405232632538044100059654939159879593635");
nums( 60) := BigInteger.Create("29746152185502371307642255121183693803580388584903");
nums( 61) := BigInteger.Create("41698116222072977186158236678424689157993532961922");
nums( 62) := BigInteger.Create("62467957194401269043877107275048102390895523597457");
nums( 63) := BigInteger.Create("23189706772547915061505504953922979530901129967519");
nums( 64) := BigInteger.Create("86188088225875314529584099251203829009407770775672");
nums( 65) := BigInteger.Create("11306739708304724483816533873502340845647058077308");
nums( 66) := BigInteger.Create("82959174767140363198008187129011875491310547126581");
nums( 67) := BigInteger.Create("97623331044818386269515456334926366572897563400500");
nums( 68) := BigInteger.Create("42846280183517070527831839425882145521227251250327");
nums( 69) := BigInteger.Create("55121603546981200581762165212827652751691296897789");
nums( 70) := BigInteger.Create("32238195734329339946437501907836945765883352399886");
nums( 71) := BigInteger.Create("75506164965184775180738168837861091527357929701337");
nums( 72) := BigInteger.Create("62177842752192623401942399639168044983993173312731");
nums( 73) := BigInteger.Create("32924185707147349566916674687634660915035914677504");
nums( 74) := BigInteger.Create("99518671430235219628894890102423325116913619626622");
nums( 75) := BigInteger.Create("73267460800591547471830798392868535206946944540724");
nums( 76) := BigInteger.Create("76841822524674417161514036427982273348055556214818");
nums( 77) := BigInteger.Create("97142617910342598647204516893989422179826088076852");
nums( 78) := BigInteger.Create("87783646182799346313767754307809363333018982642090");
nums( 79) := BigInteger.Create("10848802521674670883215120185883543223812876952786");
nums( 80) := BigInteger.Create("71329612474782464538636993009049310363619763878039");
nums( 81) := BigInteger.Create("62184073572399794223406235393808339651327408011116");
nums( 82) := BigInteger.Create("66627891981488087797941876876144230030984490851411");
nums( 83) := BigInteger.Create("60661826293682836764744779239180335110989069790714");
nums( 84) := BigInteger.Create("85786944089552990653640447425576083659976645795096");
nums( 85) := BigInteger.Create("66024396409905389607120198219976047599490197230297");
nums( 86) := BigInteger.Create("64913982680032973156037120041377903785566085089252");
nums( 87) := BigInteger.Create("16730939319872750275468906903707539413042652315011");
nums( 88) := BigInteger.Create("94809377245048795150954100921645863754710598436791");
nums( 89) := BigInteger.Create("78639167021187492431995700641917969777599028300699");
nums( 90) := BigInteger.Create("15368713711936614952811305876380278410754449733078");
nums( 91) := BigInteger.Create("40789923115535562561142322423255033685442488917353");
nums( 92) := BigInteger.Create("44889911501440648020369068063960672322193204149535");
nums( 93) := BigInteger.Create("41503128880339536053299340368006977710650566631954");
nums( 94) := BigInteger.Create("81234880673210146739058568557934581403627822703280");
nums( 95) := BigInteger.Create("82616570773948327592232845941706525094512325230608");
nums( 96) := BigInteger.Create("22918802058777319719839450180888072429661980811197");
nums( 97) := BigInteger.Create("77158542502016545090413245809786882778948721859617");
nums( 98) := BigInteger.Create("72107838435069186155435662884062257473692284509516");
nums( 99) := BigInteger.Create("20849603980134001723930671666823555245252804609722");
nums(100) := BigInteger.Create("53503534226472524250874054075591789781264330331690");
for index in nums'Range loop
sum := sum + nums(index);
end loop;
declare
total : constant String := BigInteger.ToString(sum);
start : String (1 .. 10);
begin
for index in start'Range loop
start(index) := total(index);
end loop;
IO.Put_Line(start);
end;
end Solve;
end Problem_13;
|
-- This package was generated by the Ada_Drivers_Library project wizard script
package ADL_Config is
Board : constant String := "STM32F407_Discovery"; -- From user input
Architecture : constant String := "ARM"; -- From board definition
Vendor : constant String := "STMicro"; -- From board definition
Device_Family : constant String := "STM32F4"; -- From board definition
Device_Name : constant String := "STM32F407VGTx"; -- From board definition
CPU_Core : constant String := "ARM Cortex-M4F"; -- From mcu definition
High_Speed_External_Clock : constant := 8000000; -- From board definition
Number_Of_Interrupts : constant := 0; -- From user input
Has_ZFP_Runtime : constant String := "False"; -- From board definition
Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition
Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition
Runtime_Profile : constant String := "ravenscar-full"; -- From user input
Runtime_Name_Suffix : constant String := "stm32f4"; -- From board definition
Runtime_Name : constant String := "ravenscar-full-stm32f4"; -- From user input
Use_Startup_Gen : constant Boolean := True; -- From user input
Has_Custom_Memory_Area_1 : constant Boolean := True; -- From user input
Custom_Mem_1_Kind : constant String := "RAM"; -- From user input
Custom_Mem_1_Addr : constant := 0; -- From user input
Custom_Mem_1_Size : constant := 1; -- From user input
Custom_Mem_1_Name : constant String := "1"; -- From user input
Has_Custom_Memory_Area_2 : constant Boolean := True; -- From user input
Custom_Mem_2_Kind : constant String := "RAM"; -- From user input
Custom_Mem_2_Addr : constant := 1; -- From user input
Custom_Mem_2_Size : constant := 1; -- From user input
Custom_Mem_2_Name : constant String := "1"; -- From user input
Has_Custom_Memory_Area_3 : constant Boolean := False; -- From user input
Boot_Memory : constant String := "n"; -- From user input
Max_Path_Length : constant := 1024; -- From user input
Max_Mount_Points : constant := 2; -- From user input
Max_Mount_Name_Length : constant := 128; -- From user input
end ADL_Config;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Protected_Body_Stubs is
function Create
(Protected_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Body_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Is_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Separate_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
With_Token : Program.Lexical_Elements.Lexical_Element_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Protected_Body_Stub is
begin
return Result : Protected_Body_Stub :=
(Protected_Token => Protected_Token, Body_Token => Body_Token,
Name => Name, Is_Token => Is_Token, Separate_Token => Separate_Token,
With_Token => With_Token, Aspects => Aspects,
Semicolon_Token => Semicolon_Token, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Protected_Body_Stub is
begin
return Result : Implicit_Protected_Body_Stub :=
(Name => Name, Aspects => Aspects,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Name
(Self : Base_Protected_Body_Stub)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access is
begin
return Self.Name;
end Name;
overriding function Aspects
(Self : Base_Protected_Body_Stub)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access is
begin
return Self.Aspects;
end Aspects;
overriding function Protected_Token
(Self : Protected_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Protected_Token;
end Protected_Token;
overriding function Body_Token
(Self : Protected_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Body_Token;
end Body_Token;
overriding function Is_Token
(Self : Protected_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Is_Token;
end Is_Token;
overriding function Separate_Token
(Self : Protected_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Separate_Token;
end Separate_Token;
overriding function With_Token
(Self : Protected_Body_Stub)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.With_Token;
end With_Token;
overriding function Semicolon_Token
(Self : Protected_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Semicolon_Token;
end Semicolon_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Protected_Body_Stub)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Protected_Body_Stub)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Protected_Body_Stub)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize
(Self : aliased in out Base_Protected_Body_Stub'Class) is
begin
Set_Enclosing_Element (Self.Name, Self'Unchecked_Access);
for Item in Self.Aspects.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
null;
end Initialize;
overriding function Is_Protected_Body_Stub_Element
(Self : Base_Protected_Body_Stub)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Protected_Body_Stub_Element;
overriding function Is_Declaration_Element
(Self : Base_Protected_Body_Stub)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Declaration_Element;
overriding procedure Visit
(Self : not null access Base_Protected_Body_Stub;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Protected_Body_Stub (Self);
end Visit;
overriding function To_Protected_Body_Stub_Text
(Self : aliased in out Protected_Body_Stub)
return Program.Elements.Protected_Body_Stubs
.Protected_Body_Stub_Text_Access is
begin
return Self'Unchecked_Access;
end To_Protected_Body_Stub_Text;
overriding function To_Protected_Body_Stub_Text
(Self : aliased in out Implicit_Protected_Body_Stub)
return Program.Elements.Protected_Body_Stubs
.Protected_Body_Stub_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Protected_Body_Stub_Text;
end Program.Nodes.Protected_Body_Stubs;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-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 STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
------------------------------------------------------------------------------
with STM32_SVD.EXTI; use STM32_SVD.EXTI;
with STM32_SVD.AFIO; use STM32_SVD.AFIO;
with STM32.Device; use STM32.Device;
with STM32.EXTI;
package body STM32.AFIO is
procedure Connect_External_Interrupt
(Port : GPIO_Port;
Pin : GPIO_Pin_Index)
is
Port_Id : constant UInt4 := GPIO_Port_Representation (Port);
begin
-- 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.
case Pin is
when 0 .. 3 =>
AFIO_Periph.EXTICR1.EXTI.Arr (Pin) := Port_Id;
when 4 .. 7 =>
AFIO_Periph.EXTICR2.EXTI.Arr (Pin) := Port_Id;
when 8 .. 11 =>
AFIO_Periph.EXTICR3.EXTI.Arr (Pin) := Port_Id;
when 12 .. 15 =>
AFIO_Periph.EXTICR4.EXTI.Arr (Pin) := Port_Id;
end case;
end Connect_External_Interrupt;
procedure Connect_External_Interrupt (Port : GPIO_Port; Pin : GPIO_Pin)
is
begin
Connect_External_Interrupt (Port, GPIO_Pin'Pos (Pin));
end Connect_External_Interrupt;
procedure Connect_External_Interrupt
(Point : GPIO_Point)
is
begin
Connect_External_Interrupt (Point.Periph.all, Point.Pin);
end 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;
procedure Clear_External_Interrupt (Pin : GPIO_Pin)
is
use STM32.EXTI;
begin
Clear_External_Interrupt (External_Line_Number'Val (GPIO_Pin'Pos (Pin)));
end Clear_External_Interrupt;
end STM32.AFIO;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . D I R E C T _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.IO_Exceptions; use Ada.IO_Exceptions;
with Ada.Unchecked_Deallocation;
with Interfaces.C_Streams; use Interfaces.C_Streams;
with System; use System;
with System.CRTL;
with System.File_IO;
with System.Soft_Links;
package body System.Direct_IO is
package FIO renames System.File_IO;
package SSL renames System.Soft_Links;
subtype AP is FCB.AFCB_Ptr;
use type FCB.Shared_Status_Type;
use type System.CRTL.int64;
use type System.CRTL.size_t;
-----------------------
-- Local Subprograms --
-----------------------
procedure Set_Position (File : File_Type);
-- Sets file position pointer according to value of current index
-------------------
-- AFCB_Allocate --
-------------------
function AFCB_Allocate (Control_Block : Direct_AFCB) return FCB.AFCB_Ptr is
pragma Unreferenced (Control_Block);
begin
return new Direct_AFCB;
end AFCB_Allocate;
----------------
-- AFCB_Close --
----------------
-- No special processing required for Direct_IO close
procedure AFCB_Close (File : not null access Direct_AFCB) is
pragma Unreferenced (File);
begin
null;
end AFCB_Close;
---------------
-- AFCB_Free --
---------------
procedure AFCB_Free (File : not null access Direct_AFCB) is
type FCB_Ptr is access all Direct_AFCB;
FT : FCB_Ptr := FCB_Ptr (File);
procedure Free is new
Ada.Unchecked_Deallocation (Direct_AFCB, FCB_Ptr);
begin
Free (FT);
end AFCB_Free;
------------
-- Create --
------------
procedure Create
(File : in out File_Type;
Mode : FCB.File_Mode := FCB.Inout_File;
Name : String := "";
Form : String := "")
is
Dummy_File_Control_Block : Direct_AFCB;
pragma Warnings (Off, Dummy_File_Control_Block);
-- Yes, we know this is never assigned a value, only the tag is used for
-- dispatching purposes, so that's expected.
begin
FIO.Open (File_Ptr => AP (File),
Dummy_FCB => Dummy_File_Control_Block,
Mode => Mode,
Name => Name,
Form => Form,
Amethod => 'D',
Creat => True,
Text => False);
end Create;
-----------------
-- End_Of_File --
-----------------
function End_Of_File (File : File_Type) return Boolean is
begin
FIO.Check_Read_Status (AP (File));
return File.Index > Size (File);
end End_Of_File;
-----------
-- Index --
-----------
function Index (File : File_Type) return Positive_Count is
begin
FIO.Check_File_Open (AP (File));
return File.Index;
end Index;
----------
-- Open --
----------
procedure Open
(File : in out File_Type;
Mode : FCB.File_Mode;
Name : String;
Form : String := "")
is
Dummy_File_Control_Block : Direct_AFCB;
pragma Warnings (Off, Dummy_File_Control_Block);
-- Yes, we know this is never assigned a value, only the tag is used for
-- dispatching purposes, so that's expected.
begin
FIO.Open (File_Ptr => AP (File),
Dummy_FCB => Dummy_File_Control_Block,
Mode => Mode,
Name => Name,
Form => Form,
Amethod => 'D',
Creat => False,
Text => False);
end Open;
----------
-- Read --
----------
procedure Read
(File : File_Type;
Item : Address;
Size : Interfaces.C_Streams.size_t;
From : Positive_Count)
is
begin
Set_Index (File, From);
Read (File, Item, Size);
end Read;
procedure Read
(File : File_Type;
Item : Address;
Size : Interfaces.C_Streams.size_t)
is
begin
FIO.Check_Read_Status (AP (File));
-- If last operation was not a read, or if in file sharing mode,
-- then reset the physical pointer of the file to match the index
-- We lock out task access over the two operations in this case.
if File.Last_Op /= Op_Read
or else File.Shared_Status = FCB.Yes
then
if End_Of_File (File) then
raise End_Error;
end if;
Locked_Processing : begin
SSL.Lock_Task.all;
Set_Position (File);
FIO.Read_Buf (AP (File), Item, Size);
SSL.Unlock_Task.all;
exception
when others =>
SSL.Unlock_Task.all;
raise;
end Locked_Processing;
else
FIO.Read_Buf (AP (File), Item, Size);
end if;
File.Index := File.Index + 1;
-- Set last operation to read, unless we did not read a full record
-- (happens with the variant record case) in which case we set the
-- last operation as other, to force the file position to be reset
-- on the next read.
File.Last_Op := (if File.Bytes = Size then Op_Read else Op_Other);
end Read;
-- The following is the required overriding for Stream.Read, which is
-- not used, since we do not do Stream operations on Direct_IO files.
procedure Read
(File : in out Direct_AFCB;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset)
is
begin
raise Program_Error;
end Read;
-----------
-- Reset --
-----------
procedure Reset (File : in out File_Type; Mode : FCB.File_Mode) is
pragma Warnings (Off, File);
-- File is actually modified via Unrestricted_Access below, but
-- GNAT will generate a warning anyway.
--
-- Note that we do not use pragma Unmodified here, since in -gnatc mode,
-- GNAT will complain that File is modified for "File.Index := 1;"
begin
FIO.Reset (AP (File)'Unrestricted_Access, Mode);
File.Index := 1;
File.Last_Op := Op_Read;
end Reset;
procedure Reset (File : in out File_Type) is
pragma Warnings (Off, File);
-- See above (other Reset procedure) for explanations on this pragma
begin
FIO.Reset (AP (File)'Unrestricted_Access);
File.Index := 1;
File.Last_Op := Op_Read;
end Reset;
---------------
-- Set_Index --
---------------
procedure Set_Index (File : File_Type; To : Positive_Count) is
begin
FIO.Check_File_Open (AP (File));
File.Index := Count (To);
File.Last_Op := Op_Other;
end Set_Index;
------------------
-- Set_Position --
------------------
procedure Set_Position (File : File_Type) is
R : int;
begin
R :=
fseek64
(File.Stream, int64 (File.Bytes) * int64 (File.Index - 1), SEEK_SET);
if R /= 0 then
raise Use_Error;
end if;
end Set_Position;
----------
-- Size --
----------
function Size (File : File_Type) return Count is
Pos : int64;
begin
FIO.Check_File_Open (AP (File));
File.Last_Op := Op_Other;
if fseek64 (File.Stream, 0, SEEK_END) /= 0 then
raise Device_Error;
end if;
Pos := ftell64 (File.Stream);
if Pos = -1 then
raise Use_Error;
end if;
return Count (Pos / int64 (File.Bytes));
end Size;
-----------
-- Write --
-----------
procedure Write
(File : File_Type;
Item : Address;
Size : Interfaces.C_Streams.size_t;
Zeroes : System.Storage_Elements.Storage_Array)
is
procedure Do_Write;
-- Do the actual write
--------------
-- Do_Write --
--------------
procedure Do_Write is
begin
FIO.Write_Buf (AP (File), Item, Size);
-- If we did not write the whole record (happens with the variant
-- record case), then fill out the rest of the record with zeroes.
-- This is cleaner in any case, and is required for the last
-- record, since otherwise the length of the file is wrong.
if File.Bytes > Size then
FIO.Write_Buf (AP (File), Zeroes'Address, File.Bytes - Size);
end if;
end Do_Write;
-- Start of processing for Write
begin
FIO.Check_Write_Status (AP (File));
-- If last operation was not a write, or if in file sharing mode,
-- then reset the physical pointer of the file to match the index
-- We lock out task access over the two operations in this case.
if File.Last_Op /= Op_Write
or else File.Shared_Status = FCB.Yes
then
Locked_Processing : begin
SSL.Lock_Task.all;
Set_Position (File);
Do_Write;
SSL.Unlock_Task.all;
exception
when others =>
SSL.Unlock_Task.all;
raise;
end Locked_Processing;
else
Do_Write;
end if;
File.Index := File.Index + 1;
-- Set last operation to write, unless we did not read a full record
-- (happens with the variant record case) in which case we set the
-- last operation as other, to force the file position to be reset
-- on the next write.
File.Last_Op := (if File.Bytes = Size then Op_Write else Op_Other);
end Write;
-- The following is the required overriding for Stream.Write, which is
-- not used, since we do not do Stream operations on Direct_IO files.
procedure Write
(File : in out Direct_AFCB;
Item : Ada.Streams.Stream_Element_Array)
is
begin
raise Program_Error;
end Write;
end System.Direct_IO;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . C H E C K E D _ P O O L S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2006, 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, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Storage_Pools;
package System.Checked_Pools is
type Checked_Pool is abstract
new System.Storage_Pools.Root_Storage_Pool with private;
-- Equivalent of storage pools with the addition that Dereference is
-- called on each implicit or explicit dereference of a pointer which
-- has such a storage pool
procedure Dereference
(Pool : in out Checked_Pool;
Storage_Address : Address;
Size_In_Storage_Elements : System.Storage_Elements.Storage_Count;
Alignment : System.Storage_Elements.Storage_Count)
is abstract;
-- Called implicitly each time a pointer to a checked pool is dereferenced
-- All parameters in the profile are compatible with the profile of
-- Allocate/Deallocate: the Storage_Address corresponds to the address of
-- the dereferenced object, Size_in_Storage_Elements is its dynamic size
-- (and thus may involve an implicit dispatching call to size) and
-- Alignment is the alignment of the object.
private
type Checked_Pool is abstract
new System.Storage_Pools.Root_Storage_Pool with null record;
end System.Checked_Pools;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G . T A S K _ A T T R I B U T E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2014-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- 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/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
with System.Parameters; use System.Parameters;
with System.Tasking.Initialization; use System.Tasking.Initialization;
with System.Task_Primitives.Operations;
package body System.Tasking.Task_Attributes is
package STPO renames System.Task_Primitives.Operations;
type Index_Info is record
Used : Boolean;
-- Used is True if a given index is used by an instantiation of
-- Ada.Task_Attributes, False otherwise.
Require_Finalization : Boolean;
-- Require_Finalization is True if the attribute requires finalization
end record;
Index_Array : array (1 .. Max_Attribute_Count) of Index_Info :=
(others => (False, False));
-- Note that this package will use an efficient implementation with no
-- locks and no extra dynamic memory allocation if Attribute can fit in a
-- System.Address type and Initial_Value is 0 (or null for an access type).
function Next_Index (Require_Finalization : Boolean) return Integer is
Self_Id : constant Task_Id := STPO.Self;
begin
Task_Lock (Self_Id);
for J in Index_Array'Range loop
if not Index_Array (J).Used then
Index_Array (J).Used := True;
Index_Array (J).Require_Finalization := Require_Finalization;
Task_Unlock (Self_Id);
return J;
end if;
end loop;
Task_Unlock (Self_Id);
raise Storage_Error with "Out of task attributes";
end Next_Index;
--------------
-- Finalize --
--------------
procedure Finalize (Index : Integer) is
Self_Id : constant Task_Id := STPO.Self;
begin
pragma Assert (Index in Index_Array'Range);
Task_Lock (Self_Id);
Index_Array (Index).Used := False;
Task_Unlock (Self_Id);
end Finalize;
--------------------------
-- Require_Finalization --
--------------------------
function Require_Finalization (Index : Integer) return Boolean is
begin
pragma Assert (Index in Index_Array'Range);
return Index_Array (Index).Require_Finalization;
end Require_Finalization;
end System.Tasking.Task_Attributes;
|
-- Abstract :
--
-- A generic doubly linked list with indefinite elements, allowing
-- permanent references to elements.
--
-- Copyright (C) 2018 - 2019 Free Software Foundation, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under terms of the GNU General Public License as
-- published by the Free Software Foundation; either version 3, or (at
-- your option) any later version. This library is distributed in the
-- hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-- PURPOSE. See the GNU General Public License for more details. You
-- should have received a copy of the GNU General Public License
-- distributed with this program; see file COPYING. If not, write to
-- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
-- MA 02111-1307, USA.
--
-- 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.
pragma License (Modified_GPL);
with Ada.Finalization;
with Ada.Unchecked_Deallocation;
generic
type Element_Type (<>) is private;
package SAL.Gen_Indefinite_Doubly_Linked_Lists is
type List is new Ada.Finalization.Controlled with private;
Empty_List : constant List;
overriding procedure Adjust (Container : in out List);
-- Deep copy.
overriding procedure Finalize (Container : in out List);
-- Free all items in List.
function Length (Container : in List) return Base_Peek_Type;
procedure Append (Container : in out List; Element : in Element_Type);
procedure Prepend (Container : in out List; Element : in Element_Type);
type Cursor is private;
No_Element : constant Cursor;
function Has_Element (Position : in Cursor) return Boolean;
function First (Container : in List) return Cursor;
procedure Next (Position : in out Cursor);
function Next (Position : in Cursor) return Cursor;
function Element (Position : in Cursor) return Element_Type
with Pre => Has_Element (Position);
procedure Delete (Container : in out List; Position : in out Cursor)
with Pre => Has_Element (Position);
function Persistent_Ref (Position : in Cursor) return access Element_Type
with Pre => Has_Element (Position);
type Constant_Reference_Type (Element : not null access constant Element_Type) is null record
with Implicit_Dereference => Element;
function Constant_Reference (Position : in Cursor) return Constant_Reference_Type
with Pre => Has_Element (Position);
pragma Inline (Constant_Reference);
function Constant_Ref (Container : in List'Class; Position : in Peek_Type) return Constant_Reference_Type
with Pre => Position <= Container.Length;
pragma Inline (Constant_Ref);
type Reference_Type (Element : not null access Element_Type) is null record
with Implicit_Dereference => Element;
function Reference (Position : in Cursor) return Reference_Type
with Pre => Has_Element (Position);
pragma Inline (Reference);
private
type Node_Type;
type Node_Access is access Node_Type;
type Element_Access is access Element_Type;
type Node_Type is record
Element : Element_Access;
Prev : Node_Access;
Next : Node_Access;
end record;
procedure Free is new Ada.Unchecked_Deallocation (Node_Type, Node_Access);
procedure Free is new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
type List is new Ada.Finalization.Controlled with record
Head : Node_Access := null;
Tail : Node_Access := null;
Count : SAL.Base_Peek_Type := 0;
end record;
type Cursor is record
Container : access List;
Ptr : Node_Access;
end record;
Empty_List : constant List := (Ada.Finalization.Controlled with null, null, 0);
No_Element : constant Cursor := (null, null);
end SAL.Gen_Indefinite_Doubly_Linked_Lists;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . C A L E N D A R --
-- --
-- B o d y --
-- --
-- Copyright (C) 1997-2005, 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, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, 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. --
-- --
-- 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 NT/95 version
-- Why do we need separate version ???
-- Do we need *this* much code duplication???
with System.OS_Primitives;
-- used for Clock
with System.OS_Interface;
package body Ada.Calendar is
use System.OS_Interface;
------------------------------
-- Use of Pragma Unsuppress --
------------------------------
-- This implementation of Calendar takes advantage of the permission in
-- Ada 95 of using arithmetic overflow checks to check for out of bounds
-- time values. This means that we must catch the constraint error that
-- results from arithmetic overflow, so we use pragma Unsuppress to make
-- sure that overflow is enabled, using software overflow checking if
-- necessary. That way, compiling Calendar with options to suppress this
-- checking will not affect its correctness.
------------------------
-- Local Declarations --
------------------------
Ada_Year_Min : constant := 1901;
Ada_Year_Max : constant := 2099;
-- Win32 time constants
epoch_1970 : constant := 16#19D_B1DE_D53E_8000#; -- win32 UTC epoch
system_time_ns : constant := 100; -- 100 ns per tick
Sec_Unit : constant := 10#1#E9;
---------
-- "+" --
---------
function "+" (Left : Time; Right : Duration) return Time is
pragma Unsuppress (Overflow_Check);
begin
return (Left + Time (Right));
exception
when Constraint_Error =>
raise Time_Error;
end "+";
function "+" (Left : Duration; Right : Time) return Time is
pragma Unsuppress (Overflow_Check);
begin
return (Time (Left) + Right);
exception
when Constraint_Error =>
raise Time_Error;
end "+";
---------
-- "-" --
---------
function "-" (Left : Time; Right : Duration) return Time is
pragma Unsuppress (Overflow_Check);
begin
return Left - Time (Right);
exception
when Constraint_Error =>
raise Time_Error;
end "-";
function "-" (Left : Time; Right : Time) return Duration is
pragma Unsuppress (Overflow_Check);
begin
return Duration (Left) - Duration (Right);
exception
when Constraint_Error =>
raise Time_Error;
end "-";
---------
-- "<" --
---------
function "<" (Left, Right : Time) return Boolean is
begin
return Duration (Left) < Duration (Right);
end "<";
----------
-- "<=" --
----------
function "<=" (Left, Right : Time) return Boolean is
begin
return Duration (Left) <= Duration (Right);
end "<=";
---------
-- ">" --
---------
function ">" (Left, Right : Time) return Boolean is
begin
return Duration (Left) > Duration (Right);
end ">";
----------
-- ">=" --
----------
function ">=" (Left, Right : Time) return Boolean is
begin
return Duration (Left) >= Duration (Right);
end ">=";
-----------
-- Clock --
-----------
-- The Ada.Calendar.Clock function gets the time from the soft links
-- interface which will call the appropriate function depending wether
-- tasking is involved or not.
function Clock return Time is
begin
return Time (System.OS_Primitives.Clock);
end Clock;
---------
-- Day --
---------
function Day (Date : Time) return Day_Number is
DY : Year_Number;
DM : Month_Number;
DD : Day_Number;
DS : Day_Duration;
begin
Split (Date, DY, DM, DD, DS);
return DD;
end Day;
-----------
-- Month --
-----------
function Month (Date : Time) return Month_Number is
DY : Year_Number;
DM : Month_Number;
DD : Day_Number;
DS : Day_Duration;
begin
Split (Date, DY, DM, DD, DS);
return DM;
end Month;
-------------
-- Seconds --
-------------
function Seconds (Date : Time) return Day_Duration is
DY : Year_Number;
DM : Month_Number;
DD : Day_Number;
DS : Day_Duration;
begin
Split (Date, DY, DM, DD, DS);
return DS;
end Seconds;
-----------
-- Split --
-----------
procedure Split
(Date : Time;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Seconds : out Day_Duration)
is
Date_Int : aliased Long_Long_Integer;
Date_Loc : aliased Long_Long_Integer;
Timbuf : aliased SYSTEMTIME;
Int_Date : Long_Long_Integer;
Sub_Seconds : Duration;
begin
-- We take the sub-seconds (decimal part) of Date and this is added
-- to compute the Seconds. This way we keep the precision of the
-- high-precision clock that was lost with the Win32 API calls
-- below.
if Date < 0.0 then
-- this is a Date before Epoch (January 1st, 1970)
Sub_Seconds := Duration (Date) -
Duration (Long_Long_Integer (Date + Duration'(0.5)));
Int_Date := Long_Long_Integer (Date - Sub_Seconds);
-- For Date = -86400.1 we are 2 days before Epoch at 0.1 seconds
-- from day 1 before Epoch. It means that it is 23h 59m 59.9s.
-- here we adjust for that.
if Sub_Seconds < 0.0 then
Int_Date := Int_Date - 1;
Sub_Seconds := 1.0 + Sub_Seconds;
end if;
else
-- this is a Date after Epoch (January 1st, 1970)
Sub_Seconds := Duration (Date) -
Duration (Long_Long_Integer (Date - Duration'(0.5)));
Int_Date := Long_Long_Integer (Date - Sub_Seconds);
end if;
-- Date_Int is the number of seconds from Epoch
Date_Int := Long_Long_Integer
(Int_Date * Sec_Unit / system_time_ns) + epoch_1970;
if not FileTimeToLocalFileTime (Date_Int'Access, Date_Loc'Access) then
raise Time_Error;
end if;
if not FileTimeToSystemTime (Date_Loc'Access, Timbuf'Access) then
raise Time_Error;
end if;
if Timbuf.wYear not in Ada_Year_Min .. Ada_Year_Max then
raise Time_Error;
end if;
Seconds :=
Duration (Timbuf.wHour) * 3_600.0 +
Duration (Timbuf.wMinute) * 60.0 +
Duration (Timbuf.wSecond) +
Sub_Seconds;
Day := Integer (Timbuf.wDay);
Month := Integer (Timbuf.wMonth);
Year := Integer (Timbuf.wYear);
end Split;
-------------
-- Time_Of --
-------------
function Time_Of
(Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Seconds : Day_Duration := 0.0)
return Time
is
Timbuf : aliased SYSTEMTIME;
Now : aliased Long_Long_Integer;
Loc : aliased Long_Long_Integer;
Int_Secs : Integer;
Secs : Integer;
Add_One_Day : Boolean := False;
Date : Time;
begin
-- The following checks are redundant with respect to the constraint
-- error checks that should normally be made on parameters, but we
-- decide to raise Constraint_Error in any case if bad values come
-- in (as a result of checks being off in the caller, or for other
-- erroneous or bounded error cases).
if not Year 'Valid
or else not Month 'Valid
or else not Day 'Valid
or else not Seconds'Valid
then
raise Constraint_Error;
end if;
if Seconds = 0.0 then
Int_Secs := 0;
else
Int_Secs := Integer (Seconds - 0.5);
end if;
-- Timbuf.wMillisec is to keep the msec. We can't use that because the
-- high-resolution clock has a precision of 1 Microsecond.
-- Anyway the sub-seconds part is not needed to compute the number
-- of seconds in UTC.
if Int_Secs = 86_400 then
Secs := 0;
Add_One_Day := True;
else
Secs := Int_Secs;
end if;
Timbuf.wMilliseconds := 0;
Timbuf.wSecond := WORD (Secs mod 60);
Timbuf.wMinute := WORD ((Secs / 60) mod 60);
Timbuf.wHour := WORD (Secs / 3600);
Timbuf.wDay := WORD (Day);
Timbuf.wMonth := WORD (Month);
Timbuf.wYear := WORD (Year);
if not SystemTimeToFileTime (Timbuf'Access, Loc'Access) then
raise Time_Error;
end if;
if not LocalFileTimeToFileTime (Loc'Access, Now'Access) then
raise Time_Error;
end if;
-- Here we have the UTC now translate UTC to Epoch time (UNIX style
-- time based on 1 january 1970) and add there the sub-seconds part.
declare
Sub_Sec : constant Duration := Seconds - Duration (Int_Secs);
begin
Date := Time ((Now - epoch_1970) * system_time_ns / Sec_Unit) +
Sub_Sec;
end;
if Add_One_Day then
Date := Date + Duration (86400.0);
end if;
return Date;
end Time_Of;
----------
-- Year --
----------
function Year (Date : Time) return Year_Number is
DY : Year_Number;
DM : Month_Number;
DD : Day_Number;
DS : Day_Duration;
begin
Split (Date, DY, DM, DD, DS);
return DY;
end Year;
begin
System.OS_Primitives.Initialize;
end Ada.Calendar;
|
with Text_IO;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Strings.UTF_Encoding;
with System.WCh_Con;
with System.WCh_Cnv;
with JSON_Gen.Command_Lines; use JSON_Gen.Command_Lines;
with Ada.Directories; use Ada.Directories;
with Interfaces; use type Interfaces.Unsigned_16;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Langkit_Support.Diagnostics;
with Langkit_Support.Slocs;
with Langkit_Support.Text;
with Libadalang; use Libadalang;
with Libadalang.Common; use Libadalang.Common;
with LAL_Extensions; use LAL_Extensions;
with Utils.Command_Lines.Common; use Utils.Command_Lines.Common;
with Utils.Dbg_Out;
with Utils.Formatted_Output;
with Utils.Tool_Names;
with GNATCOLL.VFS;
with GNATCOLL.Projects;
with Utils.Generic_Formatted_Output;
with Utils_Debug; use Utils_Debug;
with Utils.Environment;
-- with Pp.Actions;
-- with JSON_Gen.Command_Lines;
package body JSON_Gen.Actions is
use Utils.Char_Vectors.Char_Vectors;
function Image (X : Integer) return String
renames Utils.String_Utilities.Image;
pragma Warnings (Off);
use Common_Flag_Switches, Common_String_Switches,
Common_String_Seq_Switches, Common_Nat_Switches;
pragma Warnings (On);
use Json_Gen_Flag_Switches,
Json_Gen_String_Switches,
Json_Gen_Nat_Switches;
use Scanner.Source_Message_Vectors;
-- The current body-generating version of gnatstub generates output bodies;
-- we could implement a new body-modifying version modifies existing
-- bodies.
--
-- Body-generating: By default, the command line arguments refer to specs,
-- and the --subunits switch is not given. The output is a body. It is an
-- error if the body already exists. If the --force/-f switch is given,
-- then any existing body is overwritten; if that body contains
-- hand-written code, it is lost. If the --subunits switch is given, the
-- command line arguments refer to bodies, and a subunit is generated for
-- each Ada stub found in that body, skipping ones that already exist.
--
-- Thus "--subunits switch given" if and only if "argument is a body".
--
-- Body-modifying: Command-line arguments always refer to specs. [???Or
-- perhaps allow bodies, but process as if the corresponding spec were
-- mentioned.] If the body exists, read it; otherwise create an empty one.
-- Further processing can then assume that the body exists.
--
-- If --subunits is not given, then for each declaration in the spec and in
-- the body that requires completion, and whose completion does not exist,
-- generate the completion in the body. The completion is placed
-- immediately after the completion of the preceding declaration (where the
-- order takes into account the Alphabetical_Order switch, if given).
-- What about private types???
--
-- If --subunits is given, then processing is as above, except we generate
-- an Ada stub instead of a proper body.
--
-- With or without --subunits, for each Ada stub (whether or not newly
-- generated), we generate the subunit if it doesn't already exist.
-- ???Recursively process subunits, even if they already exist?
--
-- Withdraw support for the --force/-f switch. We are always updating an
-- existing body, not replacing it.
--
-- Design notes:
--
-- Read text of spec, parse.
-- Read text of body (or concoct empty one), parse, split text into lines.
-- Collect relevant nodes into an Ada_Node_Vector. Relevant = requires
-- completion, or is an Ada Stub. Nodes from the spec, followed by nodes
-- from the body.
-- Sort. By default, types first, then other things, otherwise retaining
-- order from the source. If --alphabetical-order is given, then types
-- first, in alphabetical order, then bodies, in alphabetical order,
-- retaining source order for overloaded declarations.
--
-- Walk the sorted vector, generating a vector of strings. Each string is
-- the text of a completion, and has a source location attached. For each
-- item:
-- If it requires completion, and the completion does not exist, append
-- that completion to the string vector, along with the source location
-- just after the preceding item. If --subunits is given, the completion
-- is an Ada stub, and we also generate the subunit if it does not
-- exist.
-- If it is an Ada stub, generate the subunit if it does not exist.
--
-- Sort the completions in source location order.
--
-- Walk the text lines of the body and the completions in sync, copying
-- both to the output, interleaved by source location.
-- The above is way too complicated for now. A customer has asked for a way
-- to generate the body for a single declaration in a package spec. Here
-- are design notes for that. See Update_Body.
--
-- If --update=line:col is given, it must be a [generic] package spec.
-- Collect subp decls.
-- Find the one with the right sloc. Better not have a completion.
-- Sort if --alphabetic-order.
-- Find preceding one that has a completion, or the start of the
-- declarative part if no such.
-- Copy body text through that one.
-- Append completion.
-- Copy rest of body text.
package Slocs renames Langkit_Support.Slocs;
----------
-- Init --
----------
overriding procedure Init (Tool : in out Json_Gen_Tool; Cmd : in out Command_Line) is
pragma Unreferenced (Tool);
begin
-- ????Other checks from gnatstub/lal_ul-check_parameters.adb?
pragma Assert (Environment.Initial_Dir = Current_Directory);
if Update_Body_Specified (Cmd) and then Num_File_Names (Cmd) > 1 then
Cmd_Error
("only one file name allowed with " &
Switch_Text
(JSON_Gen.Command_Lines.Descriptor, To_All (Update_Body)).all);
end if;
end Init;
-----------
-- Final --
-----------
overriding procedure Final (Tool : in out Json_Gen_Tool; Cmd : Command_Line) is
begin
null;
end Final;
procedure Format_Vector
(Cmd : Command_Line;
Input : Char_Vector;
Node : Ada_Node;
In_Range : Char_Subrange;
Output : out Char_Vector;
Out_Range : out Char_Subrange;
Messages : out Pp.Scanner.Source_Message_Vector) is
begin
null;
end;
---------------------
-- Per_File_Action --
---------------------
-- Debugging printouts:
-- See also Libadalang.Debug.
pragma Warnings (Off);
pragma Style_Checks (Off);
procedure knd (X : Ada_Node) is
use Utils.Dbg_Out;
begin
Utils.Dbg_Out.Output_Enabled := True;
Put ("\1\n", Kind (X)'Img);
end knd;
procedure psloc (X : Ada_Node) is
function Lines_String
(Sloc_Range : Slocs.Source_Location_Range) return String is
(Image (Integer (Sloc_Range.Start_Line)) & ": " &
Image (Integer (Sloc_Range.End_Line)));
use Utils.Dbg_Out;
begin
Utils.Dbg_Out.Output_Enabled := True;
Put ("\1\n", Lines_String (Sloc_Range (X)));
end psloc;
procedure nn (X : Ada_Node) is
use Utils.Dbg_Out;
begin
Utils.Dbg_Out.Output_Enabled := True;
Put ("\1\n", (if X.Is_Null then "null" else Short_Image (X)));
end nn;
procedure ppp (X : Ada_Node) is
use Utils.Dbg_Out;
begin
nn (X);
Print (X);
end ppp;
procedure Put_Ada_Node_Array (X : Ada_Node_Array) is
use Utils.Dbg_Out;
begin
for N of X loop
nn (N);
Put ("----------------\n");
end loop;
end Put_Ada_Node_Array;
procedure Put_Child_Record (C : Child_Record) is
use Utils.Dbg_Out;
begin
case C.Kind is
when Child =>
Put ("Child: \1\n", Short_Image (C.Node));
when Trivia =>
declare
Trivia_Data : constant Token_Data_Type := Data (C.Trivia);
begin
Put ("Trivia: \1 ""\2"" \3\n",
Kind (Trivia_Data)'Img,
To_UTF8 (Text_To_W_Str (Libadalang.common.Text (C.Trivia))),
Slocs.Image (Sloc_Range (Trivia_Data)));
end;
end case;
end Put_Child_Record;
procedure Put_Children_Array (A : Children_Array) is
use Utils.Dbg_Out;
begin
for I in A'Range loop
Put ("\1: ", Image (I));
Put_Child_Record (A (I));
end loop;
end Put_Children_Array;
procedure Dump
(Tool : in out Json_Gen_Tool;
Message : String := "")
is
pragma Unreferenced (Tool);
use Utils.Formatted_Output;
begin
if Debug_Flag_V then
Put ("\1\n", Message);
end if;
end Dump;
pragma Style_Checks (On);
pragma Warnings (On);
procedure Generate
(Tool : in out Json_Gen_Tool;
Cmd : Command_Line;
File_Name : String;
Input : String;
BOM_Seen : Boolean;
Root_Node : Ada_Node;
Parent_Body_Of_Subunit : Ada_Node);
-- Given a spec, generate the body file. Given a body, recursively call
-- Generate on any Ada stubs, and given a stub, generate the subunit file.
--
-- Note: "stub" is used in two different ways. In Ada, a stub ends with "is
-- separate;", and we generate subunits for those. But the "stubs"
-- generated by gnatstub are not stubs in the Ada sense; they are proper
-- bodies.
function Q (S : W_Str) return W_Str is
(if S (S'First) = '"' then """" & S & """" else S);
-- S is the name of a program unit. If it's an operator symbol, like
-- "and", we return ""and"" so it can be used inside a generated string
-- literal. If it's an identifier, we return it unchanged.
function Intersperse_Spaces (S : W_Str) return W_Str;
-- Put a space between each character, so "Foo" --> "F o o".
-- Used in generating header comments.
function Centered_Comment (S : W_Str; Len : Natural) return W_Str;
-- Return something like "-- S --" of the right length.
-- Used in generating header comments.
function Needs_Completion (N : Ada_Node) return Boolean;
-- Returns True if N is a declaration that needs a completion.
function Get_Parent_Name (Parent_Body_Of_Subunit : Ada_Node) return W_Str;
-- This is the name to put in "separate (...)" when generating a subunit.
function Less_Than (X, Y : Ada_Node) return Boolean;
package Sorting is new Ada_Node_Vectors.Generic_Sorting (Less_Than);
-- Used to implement the Alphabetical_Order switch (-gnatyo).
-- Type declarations come first, in alphabetical order, then bodies, in
-- alphabetical order. If two or more subprograms have the same name, they
-- retain their order in the spec. Here we are sorting the incomplete types
-- and specs into the order their completions should appear in.
function Get_JSON_Gen_Cmd return Command_Line;
-- Return a command line for passing to the pretty printer.
Comments_Fill_Arg : aliased String := "--comments-fill";
Decimal_Grouping_Arg : aliased String := "--decimal-grouping=3";
Based_Grouping_Arg : aliased String := "--based-grouping=4";
Args : aliased GNAT.OS_Lib.Argument_List :=
(Comments_Fill_Arg'Access,
Decimal_Grouping_Arg'Access,
Based_Grouping_Arg'Access);
function Get_JSON_Gen_Cmd return Command_Line is
begin
return Result : Command_Line (JSON_Gen.Command_Lines.Descriptor'Access) do
Parse (Args'Access, Result,
Cmd_Line_1, Null_Callback'Access,
Collect_File_Names => False);
end return;
end Get_JSON_Gen_Cmd;
JSON_Gen_Cmd : Command_Line := Get_JSON_Gen_Cmd;
function Overriding_String
(Overrides : Ada_Overriding_Node) return W_Str is
(case Overrides is
when Ada_Overriding_Not_Overriding => "not overriding ",
when Ada_Overriding_Overriding => "overriding ",
when Ada_Overriding_Unspecified => "");
function Intersperse_Spaces (S : W_Str) return W_Str is
use WChar_Vectors;
Result : WChar_Vector;
First_Time : Boolean := True;
begin
for C of S loop
if First_Time then
First_Time := False;
else
Append (Result, ' ');
end if;
Append (Result, C);
end loop;
return To_Array (Result);
end Intersperse_Spaces;
function Centered_Comment (S : W_Str; Len : Natural) return W_Str is
Num_Spaces : constant Integer := Len - S'Length - 4;
begin
if Num_Spaces < 0 then
return "--" & S & "--";
else
declare
L : constant Natural := Num_Spaces / 2;
R : constant Natural :=
(if Num_Spaces mod 2 = 0 then L else L + 1);
begin
return "--" & (1 .. L => ' ') & S & (1 .. R => ' ') & "--";
end;
end if;
end Centered_Comment;
function Less_Than (X, Y : Ada_Node) return Boolean is
X_Name : constant W_Str := L_Name (Get_Def_Name (X));
Y_Name : constant W_Str := L_Name (Get_Def_Name (Y));
use Slocs;
X_Sloc : constant Source_Location := Start_Sloc (Sloc_Range (X));
Y_Sloc : constant Source_Location := Start_Sloc (Sloc_Range (Y));
begin
if X.Kind in Ada_Type_Decl and then Y.Kind not in Ada_Type_Decl then
return True;
end if;
if X.Kind not in Ada_Type_Decl and then Y.Kind in Ada_Type_Decl then
return False;
end if;
if X_Name = Y_Name then
return Compare (X_Sloc, Y_Sloc) = After; -- Make the sort stable.
end if;
return X_Name < Y_Name;
end Less_Than;
function Needs_Completion (N : Ada_Node) return Boolean is
function Recurse (Decls : Ada_Node_List) return Boolean;
-- Recursively process a nested declaration list. This is used for a
-- package spec, which needs a completion if and only if there's
-- something in it that needs a completion.
function Recurse (Decls : Ada_Node_List) return Boolean is
begin
if not Decls.Is_Null then
for X in 1 .. Last_Child_Index (Decls) loop
declare
Subtree : constant Ada_Node := Childx (Decls, X);
begin
if Needs_Completion (Subtree)
or else Subtree.Kind in Ada_Incomplete_Type_Decl |
Ada_Incomplete_Tagged_Type_Decl
then
return True;
end if;
end;
end loop;
end if;
return False;
end Recurse;
-- Start of processing for Needs_Completion
begin
case N.Kind is
when Ada_Package_Decl | Ada_Generic_Package_Decl =>
declare
VP : constant Public_Part := Vis_Part (N);
PP : constant Private_Part := Priv_Part (N);
begin
return
(not VP.Is_Null and then Recurse (F_Decls (VP)))
or else
(not PP.Is_Null and then Recurse (F_Decls (PP)));
end;
when Ada_Single_Protected_Decl | Ada_Protected_Type_Decl |
Ada_Single_Task_Decl | Ada_Task_Type_Decl => return True;
when Ada_Entry_Decl => return True;
when Ada_Subp_Decl =>
return not N.As_Basic_Subp_Decl.P_Is_Imported;
when Ada_Generic_Subp_Decl =>
return not N.As_Generic_Subp_Decl.P_Is_Imported;
when Ada_Incomplete_Type_Decl | Ada_Incomplete_Tagged_Type_Decl =>
return False;
-- Because these are handled specially in Walk
when others => return False;
end case;
end Needs_Completion;
function Get_Parent_Name (Parent_Body_Of_Subunit : Ada_Node) return W_Str is
begin
if Parent_Body_Of_Subunit.Is_Null then
return "";
elsif Ada_Node'(Parent (Parent_Body_Of_Subunit)).Kind = Ada_Subunit then
declare
Parent_Parent : constant W_Str :=
Full_Name (Parent_Body_Of_Subunit.Parent.As_Subunit.F_Name);
Parent_Simple : constant W_Str :=
Id_Name (Get_Def_Name (Parent_Body_Of_Subunit));
begin
return Parent_Parent & "." & Parent_Simple;
end;
else
return Full_Name (Get_Def_Name (Parent_Body_Of_Subunit).As_Name);
end if;
end Get_Parent_Name;
procedure Generate
(Tool : in out Json_Gen_Tool;
Cmd : Command_Line;
File_Name : String;
Input : String;
BOM_Seen : Boolean;
Root_Node : Ada_Node;
Parent_Body_Of_Subunit : Ada_Node)
is
Looking_For_Ada_Stubs : constant Boolean :=
Root_Node.Kind in Ada_Body_Node
and then Root_Node.Kind not in Ada_Body_Stub;
Parent_Name : constant W_Str := Get_Parent_Name (Parent_Body_Of_Subunit);
Root_Node_Name : constant W_Str :=
(if not Parent_Body_Of_Subunit.Is_Null
then Parent_Name & "." else "") &
Full_Name (Get_Def_Name (Root_Node).As_Name);
UC_Root_Node_Name : constant W_Str := To_Upper (Root_Node_Name);
LC_Root_Node_Name : constant W_Str := To_Lower (Root_Node_Name);
Wide_Char_Encoding : constant System.WCh_Con.WC_Encoding_Method :=
Wide_Character_Encoding (Cmd);
Out_Vec, JSON_Gen_Out_Vec : Char_Vector;
procedure Put_To_Out_Vec (WC : W_Char);
procedure Put_To_Out_Vec (WC : W_Char) is
procedure Append_One (C : Character);
pragma Inline (Append_One);
procedure Append_One (C : Character) is
begin
Append (Out_Vec, C);
end Append_One;
procedure Encode is new
System.WCh_Cnv.Wide_Char_To_Char_Sequence (Append_One);
begin
Encode (WC, Wide_Char_Encoding);
end Put_To_Out_Vec;
package Buffered_Output is new Utils.Generic_Formatted_Output
(W_Char,
W_Str,
Basic_Put_Char => Put_To_Out_Vec);
use Buffered_Output;
procedure Generate_CU_Header;
procedure Walk (Decl : Ada_Node; Level : Natural);
-- Generate code corresponding to Decl, and recursively walk subtrees.
--
-- Note on recursion: Generate calls Walk. Walk calls Walk. Walk calls
-- Generate. In more detail: Generate is called on the compilation unit
-- spec or body. In the case of a spec, Generate calls Walk on the spec,
-- which calls Walk on nested specs, and generates a body for each one.
-- In the case of a body, Generate calls Walk on the body, which calls
-- Generate on nested Ada body stubs, to generate subunit files for each
-- one.
procedure Generate_Local_Header (Name : W_Str; Level : Natural);
-- Generate the local header that appears before each body,
-- unless the --no_local_header switch was given.
procedure Generate_Subunit_Start (Level : Natural);
-- If we are processing a subunit, generate "separate (parent)".
procedure Generate_Subp_Body
(Decl : Ada_Node; Name : W_Str; Ada_Stub : Boolean);
-- Generate a subprogram body stub. If Ada_Stub is True, we generate
-- "is separate"; otherwise the so-called "stub" is a proper body.
procedure Generate_Entry_Body (Decl : Ada_Node; Name : W_Str);
-- Generate an entry body stub
procedure Generate_Subp_Or_Entry_Body
(Decl : Ada_Node; Name : W_Str; Ada_Stub : Boolean);
procedure Generate_Json_Gen_Begin_End (Name, Json_Gen_Kind : W_Str);
-- Generate the text from "begin" to "end" of the generated code for a
-- subprogram, entry, or task body. Json_Gen_Kind is "function",
-- "procedure", "entry", or "task".
procedure Format;
-- Call the pretty printer on Out_Vec, producing JSON_Gen_Out_Vec.
procedure Write_Output_File;
-- Write the content of JSON_Gen_Out_Vec to the output file
function Get_Output_Name (Resolve_Links : Boolean) return String;
-- Return the name of the output file
procedure Generate_CU_Header is
begin
if Arg (Cmd, Header_File) /= null then
declare
Header : String_Access :=
Read_File (Arg (Cmd, Header_File).all);
begin
Put ("\1", From_UTF8 (Header.all));
Free (Header);
end;
end if;
if Arg (Cmd, Comment_Header_Sample) then
declare
With_Spaces : constant W_Str :=
Intersperse_Spaces (UC_Root_Node_Name);
Len : constant Natural := Arg (Cmd, Max_Line_Length);
Dashes : constant W_Str := (1 .. Len => '-');
Spaces : constant W_Str := "--" & (1 .. Len - 4 => ' ') & "--";
begin
Put ("\1\n", Dashes);
Put ("\1\n", Spaces);
Put ("\1\n", Centered_Comment (With_Spaces, Len));
Put ("\1\n", Spaces);
Put ("\1\n", Centered_Comment ("B o d y", Len));
Put ("\1\n", Spaces);
Put ("\1\n", Dashes);
Put ("\n");
end;
end if;
if Arg (Cmd, Comment_Header_Spec) then
declare
pragma Assert (Input'First = 1);
Last : Natural := 0;
Next : Positive := 1;
begin
-- We want to copy comment lines from the input, starting at
-- the start of the file, and stopping when we get to a
-- noncomment line. Se set Last to point to the NL at the
-- end of the last comment line in the header.
while Next <= Input'Last - 2 loop
while Next <= Input'Last - 2 and then
Input (Next) in ' ' | ASCII.HT
loop
Next := Next + 1;
end loop;
exit when Input (Next .. Next + 1) /= "--";
while Next <= Input'Last and then Input (Next) /= ASCII.LF loop
Next := Next + 1;
end loop;
Last := Next;
Next := Next + 1;
end loop;
-- Now the slice ending at Last is what we want to copy,
-- replacing the "S p e c" string, if any.
Append (Out_Vec,
Replace_String (Input (1 .. Last),
From => "S p e c", To => "B o d y"));
Put ("\n");
end;
end if;
end Generate_CU_Header;
procedure Generate_Local_Header (Name : W_Str; Level : Natural) is
begin
if not Arg (Cmd, No_Local_Header) and then Level > 0 then
declare
Header_Length : constant Natural := Name'Length + 6;
Header_Line : constant W_Str := (1 .. Header_Length => '-');
begin
Put (" \1\n", Header_Line);
Put (" -- \1 --\n", Name);
Put (" \1\n\n", Header_Line);
end;
end if;
end Generate_Local_Header;
procedure Generate_Subunit_Start (Level : Natural) is
begin
if Level = 0 and then not Parent_Body_Of_Subunit.Is_Null then
Put ("separate (\1)\n", Parent_Name);
end if;
end Generate_Subunit_Start;
procedure Generate_Subp_Body
(Decl : Ada_Node; Name : W_Str; Ada_Stub : Boolean)
is
Empty_Vec, JSON_Gen_Out_Vec : Char_Vector;
Spec : constant Subp_Spec := Get_Subp_Spec (Decl);
Overrides : constant Ada_Overriding_Node :=
(if Decl.Kind in Ada_Classic_Subp_Decl
then Decl.As_Classic_Subp_Decl.F_Overriding
else Ada_Overriding_Unspecified);
Returns : constant Boolean :=
not F_Subp_Returns (Spec).Is_Null;
begin
JSON_Gen.Actions.Format_Vector
(JSON_Gen_Cmd,
Input => Empty_Vec,
Node => Ada_Node (Spec),
In_Range => (1, 0),
Output => JSON_Gen_Out_Vec,
Out_Range => Tool.Ignored_Out_Range,
Messages => Tool.Ignored_Messages);
pragma Assert (Is_Empty (Tool.Ignored_Messages));
Put (" \1\2 is",
Overriding_String (Overrides),
From_UTF8
(Elems (JSON_Gen_Out_Vec) (1 .. Last_Index (JSON_Gen_Out_Vec))));
if Ada_Stub then
Put (" separate;\n");
else
Put ("\n");
Generate_Json_Gen_Begin_End
(Name, (if Returns then "function" else "procedure"));
end if;
end Generate_Subp_Body;
procedure Generate_Entry_Body (Decl : Ada_Node; Name : W_Str) is
Empty_Vec, JSON_Gen_Out_Vec : Char_Vector;
Parms : constant Params :=
Decl.As_Entry_Decl.F_Spec.F_Entry_Params;
Overrides : constant Ada_Overriding_Node :=
Decl.As_Entry_Decl.F_Overriding;
begin
if not Parms.Is_Null then
JSON_Gen.Actions.Format_Vector
(JSON_Gen_Cmd,
Input => Empty_Vec,
Node => Ada_Node (Parms),
In_Range => (1, 0),
Output => JSON_Gen_Out_Vec,
Out_Range => Tool.Ignored_Out_Range,
Messages => Tool.Ignored_Messages);
pragma Assert (Is_Empty (Tool.Ignored_Messages));
Put ("\1entry \2 \3 when Standard.True is\n",
Overriding_String (Overrides),
Name,
From_UTF8
(Elems (JSON_Gen_Out_Vec)
(1 .. Last_Index (JSON_Gen_Out_Vec))));
else
Put ("\1entry \2 when Standard.True is\n",
Overriding_String (Overrides),
Name);
end if;
Generate_Json_Gen_Begin_End (Name, "entry");
end Generate_Entry_Body;
procedure Generate_Subp_Or_Entry_Body
(Decl : Ada_Node; Name : W_Str; Ada_Stub : Boolean) is
begin
case Decl.Kind is
when Ada_Subp_Decl | Ada_Generic_Subp_Decl =>
Generate_Subp_Body (Decl, Name, Ada_Stub);
when Ada_Entry_Decl =>
Generate_Entry_Body (Decl, Name);
when others =>
raise Program_Error;
end case;
end Generate_Subp_Or_Entry_Body;
procedure Generate_Json_Gen_Begin_End (Name, Json_Gen_Kind : W_Str) is
Returns : constant Boolean := Json_Gen_Kind = "function";
begin
Put ("begin\n");
Put (" -- Generated stub: replace with real body!\n");
Put ("pragma Compile_Time_Warning " &
"(Standard.True, ""\1 unimplemented"");\n",
Q (Name));
if Arg (Cmd, No_Exception) and then not Returns then
Put ("null;");
else
Put ("\1raise Program_Error with ""Unimplemented \2 \3"";\n",
(if Returns then "return " else ""), Json_Gen_Kind, Q (Name));
end if;
Put ("end;\n");
end Generate_Json_Gen_Begin_End;
procedure Walk (Decl : Ada_Node; Level : Natural) is
Local_Decls, Incomplete_Types : Ada_Node_Vector;
Name : constant W_Str := Full_Name (Get_Def_Name (Decl).As_Name);
use Ada_Node_Vectors;
procedure Collect_Local_Decls (Decls : Ada_Node_List);
-- Append all the declarations that need recursive processing onto
-- Local_Decls.
procedure Collect_Incomplete_Types (Decls : Ada_Node_List);
-- Append all the incomplete type declarations in a private part that
-- are not completed in the same private part onto Incomplete_Types.
procedure Collect_Local_Decls (Decls : Ada_Node_List) is
begin
for X in 1 .. Last_Child_Index (Decls) loop
declare
Subtree : constant Ada_Node := Childx (Decls, X);
begin
if (Looking_For_Ada_Stubs
and then Subtree.Kind in Ada_Body_Stub)
or else
(not Looking_For_Ada_Stubs
and then Needs_Completion (Subtree))
then
Append (Local_Decls, Subtree);
end if;
end;
end loop;
end Collect_Local_Decls;
procedure Collect_Incomplete_Types (Decls : Ada_Node_List) is
begin
for X in 1 .. Last_Child_Index (Decls) loop
declare
Subtree : constant Ada_Node := Childx (Decls, X);
begin
if Subtree.Kind in Ada_Incomplete_Type_Decl |
Ada_Incomplete_Tagged_Type_Decl
then
declare
Next_Part : constant Base_Type_Decl :=
Subtree.As_Base_Type_Decl.P_Next_Part;
begin
if Next_Part.Is_Null
or else Next_Part = Subtree
then
-- ???Not sure why P_Next_Part sometimes returns
-- "self".
Append (Incomplete_Types, Subtree);
end if;
end;
end if;
end;
end loop;
end Collect_Incomplete_Types;
-- Start of processing for Walk
begin
if Level > 0 then
Put ("\n");
end if;
-- For things we will recursively walk (packages, protecteds),
-- generate the start of the body. For other things (tasks,
-- subprograms, entries), generate the body.
case Decl.Kind is
when Ada_Package_Decl | Ada_Generic_Package_Decl |
Ada_Package_Body_Stub =>
Generate_Local_Header (Name, Level);
Generate_Subunit_Start (Level);
Put ("package body \1 is\n", Name);
when Ada_Single_Protected_Decl | Ada_Protected_Type_Decl |
Ada_Protected_Body_Stub =>
Generate_Local_Header (Name, Level);
Generate_Subunit_Start (Level);
Put ("protected body \1 is\n", Name);
when Ada_Single_Task_Decl | Ada_Task_Type_Decl |
Ada_Task_Body_Stub =>
Generate_Local_Header (Name, Level);
Generate_Subunit_Start (Level);
Put ("task body \1 is\n", Name);
Generate_Json_Gen_Begin_End (Name, "task");
when Ada_Subp_Decl | Ada_Generic_Subp_Decl | Ada_Subp_Body_Stub =>
Generate_Local_Header (Name, Level);
Generate_Subunit_Start (Level);
Generate_Subp_Body (Decl, Name, Ada_Stub => False);
when Ada_Entry_Decl =>
Generate_Local_Header (Name, Level);
Generate_Entry_Body (Decl, Name);
when Ada_Subp_Body | Ada_Package_Body | Ada_Task_Body |
Ada_Protected_Body => null;
when others => raise Program_Error;
end case;
-- Collect in Local_Decls all the nested declarations or body stubs
-- that need recursive processing. We don't process them right away,
-- because we might need to sort the list.
case Decl.Kind is
when Ada_Package_Decl | Ada_Generic_Package_Decl |
Ada_Single_Protected_Decl | Ada_Protected_Type_Decl =>
if not Vis_Part (Decl).Is_Null then
Collect_Local_Decls (F_Decls (Vis_Part (Decl)));
end if;
if not Priv_Part (Decl).Is_Null then
Collect_Local_Decls (F_Decls (Priv_Part (Decl)));
end if;
when Ada_Subp_Body | Ada_Package_Body | Ada_Task_Body |
Ada_Protected_Body =>
Collect_Local_Decls (F_Decls (Body_Decls (Decl)));
when Ada_Package_Body_Stub | Ada_Protected_Body_Stub =>
-- Find the corresponding spec, and walk the decls therein
declare
Spec : constant Basic_Decl :=
P_Previous_Part (Decl.As_Body_Node);
begin
if not Vis_Part (Spec).Is_Null then
Collect_Local_Decls (F_Decls (Vis_Part (Spec)));
end if;
if not Priv_Part (Spec).Is_Null then
Collect_Local_Decls (F_Decls (Priv_Part (Spec)));
end if;
end;
when Ada_Subp_Decl | Ada_Generic_Subp_Decl |
Ada_Single_Task_Decl | Ada_Task_Type_Decl |
Ada_Entry_Decl |
Ada_Task_Body_Stub | Ada_Subp_Body_Stub =>
null;
when others => raise Program_Error;
end case;
-- Sort the list if appropriate. There's no point in sorting if we're
-- doing subunits, because each one goes in a separate file.
if Arg (Cmd, Alphabetical_Order) and then not Looking_For_Ada_Stubs then
Sorting.Sort (Local_Decls);
end if;
-- For an incomplete type in a private part that has no completion in
-- the same private part, generate a completion in the package body.
-- We do this separately from the normal walk, because we want the
-- full type declarations to come first, before procedure bodies and
-- whatnot.
case Decl.Kind is
when Ada_Package_Decl | Ada_Generic_Package_Decl =>
if not Priv_Part (Decl).Is_Null then
Collect_Incomplete_Types (F_Decls (Priv_Part (Decl)));
for Child of Incomplete_Types loop
Put ("\ntype \1 is\2 null record;\n",
Full_Name (Get_Def_Name (Child).As_Name),
(if Child.Kind = Ada_Incomplete_Type_Decl then ""
else " tagged"));
end loop;
end if;
when others => null;
end case;
-- Recursively process the nested declarations. In the case of Ada
-- stubs, we call Generate, because the corrsponding subunit goes in
-- a separate file, and Generate knows how to create files.
for Child of Local_Decls loop
if Looking_For_Ada_Stubs and then
Decl.Kind not in Ada_Package_Body_Stub | Ada_Protected_Body_Stub
then
pragma Assert (Child.Kind in Ada_Body_Stub);
Generate (Tool, Cmd, File_Name, Input, BOM_Seen,
Root_Node => Child,
Parent_Body_Of_Subunit => Root_Node);
else
Walk (Child, Level + 1);
end if;
end loop;
-- For things we recursively walked above (packages, protecteds),
-- generate the end of the body. For other things (tasks,
-- subprograms, entries), generate nothing.
case Decl.Kind is
when Ada_Package_Decl | Ada_Generic_Package_Decl |
Ada_Package_Body_Stub |
Ada_Single_Protected_Decl | Ada_Protected_Type_Decl |
Ada_Protected_Body_Stub =>
Put ("\nend;\n");
when Ada_Subp_Decl | Ada_Generic_Subp_Decl |
Ada_Subp_Body_Stub |
Ada_Single_Task_Decl | Ada_Task_Type_Decl |
Ada_Task_Body_Stub |
Ada_Entry_Decl |
Ada_Subp_Body | Ada_Package_Body | Ada_Task_Body |
Ada_Protected_Body =>
null;
when others => raise Program_Error;
end case;
end Walk;
procedure Format is
Context : constant Analysis_Context :=
Create_Context (Charset => Wide_Character_Encoding (Cmd));
Out_Str : String renames Elems (Out_Vec) (1 .. Last_Index (Out_Vec));
Out_Unit : constant Analysis_Unit := Get_From_Buffer
(Context, Filename => "", Buffer => Out_Str);
begin
if Has_Diagnostics (Out_Unit) then
if Assert_Enabled then
Text_IO.Put_Line ("Errors while parsing """ & Out_Str & """");
for D of Analysis.Diagnostics (Out_Unit) loop
Text_IO.Put_Line
(Langkit_Support.Diagnostics.To_Pretty_String (D));
end loop;
end if;
raise Program_Error;
end if;
pragma Assert (not Root (Out_Unit).Is_Null);
JSON_Gen.Actions.Format_Vector
(JSON_Gen_Cmd,
Input => Out_Vec,
Node => Root (Out_Unit),
In_Range => (1, 0),
Output => JSON_Gen_Out_Vec,
Out_Range => Tool.Ignored_Out_Range,
Messages => Tool.Ignored_Messages);
pragma Assert (Is_Empty (Tool.Ignored_Messages));
end Format;
function Get_Output_Name (Resolve_Links : Boolean) return String is
pragma Unreferenced (Resolve_Links);
use GNATCOLL.Projects, GNATCOLL.VFS;
function Default_Name return String;
-- This is used when the output file is not specified on the
-- command line, and there is no project file. It uses the
-- default GNAT conventions for file names (.ads, .adb).
function Name_From_Project return String;
-- This is used when there is a project file. It queries the
-- project, so it uses whatever naming convention is specified in
-- the project.
function Default_Name return String is
begin
if Has_Suffix (File_Name, Suffix => ".ads")
or else Has_Suffix (File_Name, Suffix => ".adb")
then
if Root_Node.Kind in Ada_Body_Stub then
declare
Root_Node_Name_String : constant String :=
To_UTF8 (LC_Root_Node_Name) & ".JSON";
-- Root_Node is the stub (in the Ada sense).
begin
return Replace_String
(Root_Node_Name_String, From => ".", To => "-") &
".adb";
end;
else
return Result : String := File_Name do
Result (Result'Last) := 'b';
end return;
end if;
else
Cmd_Error
("output file name should be provided because " &
File_Name &
" does not follow GNAT naming rules for " &
"spec files");
end if;
end Default_Name;
function Name_From_Project return String is
Arg_Virt_File : constant Virtual_File :=
Create (Tool.Project_Tree.all, +File_Name);
Arg_File_Info : constant File_Info :=
Info (Tool.Project_Tree.all, Arg_Virt_File);
Unit_Name : constant String := To_UTF8 (LC_Root_Node_Name);
-- Unit_Name is correct for both library units and Ada stubs
Part : constant Unit_Parts :=
(if Root_Node.Kind in Ada_Body_Stub then Unit_Separate
else Unit_Body);
begin
pragma Assert
(Extending_Project (Project (Arg_File_Info)) = No_Project);
-- We don't want to modify extended projects
return Result : constant String :=
+GNATCOLL.Projects.File_From_Unit
(Project => Project (Arg_File_Info),
Unit_Name => Unit_Name,
Part => Part,
Language => "Ada",
File_Must_Exist => False)
do
null;
end return;
end Name_From_Project;
-- If the output file is specified on the command line,
-- use that. Otherwise, if there is a project file,
-- use that. Otherwise use the default naming convention.
Simple : constant String :=
(if Arg (Cmd, Output) = null then
(if Status (Tool.Project_Tree.all) = Empty
then Simple_Name (Default_Name)
else Name_From_Project)
else Arg (Cmd, Output).all);
pragma Assert (Simple_Name (Simple) = Simple);
begin
return Result : constant String :=
(if Arg (Cmd, Output_Directory) = null
then Compose (Containing_Directory (File_Name), Simple)
else Compose (Arg (Cmd, Output_Directory).all, Simple))
do
if Debug_Flag_C then
Formatted_Output.Put ("writing \1?\n", Result);
end if;
end return;
end Get_Output_Name;
Output_Name : constant String :=
Get_Output_Name (Resolve_Links => True);
procedure Write_Output_File is
Out_File : constant File_Descriptor :=
Create_File (Output_Name, Fmode => Binary);
Out_String : String renames
Elems (JSON_Gen_Out_Vec) (1 .. Last_Index (JSON_Gen_Out_Vec));
Status : Boolean;
-- Start of Processing for Write_Output_File
begin
if Out_File = Invalid_FD then
raise Program_Error with
"write of " & Output_Name & " failed";
end if;
if BOM_Seen then
-- if Options.Output_Encoding /= System.WCh_Con.WCEM_UTF8 then
-- raise Program_Error;
-- end if;
Write_File (Out_File, Ada.Strings.UTF_Encoding.BOM_8);
-- Put (W_Char'Val (16#FEFF#)); -- BOM as a wide character
end if;
Write_File (Out_File, Out_String);
Close (Out_File, Status);
if not Status then
raise Program_Error with
"write of " & Output_Name & " failed";
end if;
if Debug_Flag_C then
Formatted_Output.Put ("wrote \1\n", Output_Name);
end if;
-- ???The following messages would be more helpful if they say what
-- is created, not what it's created for.
if not Arg (Cmd, Quiet) then
if Root_Node.Kind in Ada_Body_Stub then
Formatted_Output.Put
("separate body is created for stub for \1\n",
To_UTF8 (Id_Name (Get_Def_Name (Root_Node))));
elsif Update_Body_Specified (Cmd) then
Formatted_Output.Put ("body is updated for \1\n", File_Name);
else
Formatted_Output.Put ("body is created for \1\n", File_Name);
end if;
end if;
end Write_Output_File;
procedure Update_Body;
-- Implement the --update-body=N switch.
procedure Update_Body is
use Slocs, Ada_Node_Vectors;
Search_Line : constant Line_Number :=
Line_Number (Arg (Cmd, Update_Body));
-- For --update-body=N, this is the value of N; we are searching for
-- a subprogram declaration that appears on line N of the spec.
Subp_Decl : Ada_Node := No_Ada_Node;
-- The Subp_Decl at Search_Line
Body_Line : Line_Number;
-- The line number in the body file after which the new subprogram
-- body should be inserted.
Body_Line_Set : Boolean := False;
procedure Search;
-- Compute Subp_Decl and Body_Line
function Find_Insertion_Index
(Old_Content : String; Body_Line : Line_Number) return Positive;
-- Return the index at which the stub is to be inserted
procedure Indent_Stub (Amount : Natural);
-- Indents the stub that is in JSON_Gen_Out_Vec. This is needed because the
-- --initial-indentation switch doesn't fully work. We don't specify
-- --initial-indentation=3; instead we subtract 3 from
-- --max-line-length, and call Indent_Stub.
procedure Search is
-- Walk the spec, recursing into nested package and protected
-- specs, searching for the subprogram declaration at Search_Line.
-- Each time we see a declaration that has a corresponding
-- declaration in the body, update Body_Line; we're going to
-- insert the new body after the last such one encountered. When
-- we find the subprogram we're searching for, we set Subp_Decl
-- and quit.
procedure Rec (Decl : Ada_Node);
procedure Rec (Decl : Ada_Node) is
Sorted : Ada_Node_Vector;
procedure Update_Body_Line (New_Body_Line : Line_Number);
-- Update Body_Line, asserting that we have not yet found the
-- subprogram declaration we are looking for; once found, we
-- should quit.
procedure Collect_Decls (Decls : Ada_Node_List);
-- Collect the declarations into Sorted, which will be sorted
-- if --alphabetical-order was specified.
procedure Update_Body_Line (New_Body_Line : Line_Number) is
use Utils.Formatted_Output;
begin
if Debug_Flag_V then
nn (Decl);
Put ("\1 ==> \2\n", Image (Integer (Body_Line)),
Image (Integer (New_Body_Line)));
end if;
pragma Assert (Subp_Decl.Is_Null);
Body_Line_Set := True;
Body_Line := New_Body_Line;
end Update_Body_Line;
procedure Collect_Decls (Decls : Ada_Node_List) is
begin
for X in 1 .. Last_Child_Index (Decls) loop
declare
Subtree : constant Ada_Node := Childx (Decls, X);
begin
Append (Sorted, Subtree);
end;
end loop;
end Collect_Decls;
Sloc : constant Source_Location_Range := Sloc_Range (Decl);
Decl_Name : constant String :=
To_UTF8 (Full_Name (Get_Def_Name (Decl).As_Name));
-- Start of processing for Rec
begin
if Search_Line in Sloc.Start_Line .. Sloc.End_Line then
case Decl.Kind is
when Ada_Package_Decl | Ada_Generic_Package_Decl |
Ada_Single_Protected_Decl | Ada_Protected_Type_Decl =>
declare
B : constant Body_Node :=
Decl.As_Basic_Decl.P_Body_Part_For_Decl;
begin
if B.Is_Null then
if not Body_Line_Set then
Cmd_Error
("body of " & Decl_Name & " not found");
end if;
else
Update_Body_Line
(Body_Decls (B).Sloc_Range.Start_Line);
end if;
end;
if not Vis_Part (Decl).Is_Null then
Collect_Decls (F_Decls (Vis_Part (Decl)));
end if;
if not Priv_Part (Decl).Is_Null then
Collect_Decls (F_Decls (Priv_Part (Decl)));
end if;
if Arg (Cmd, Alphabetical_Order) then
Sorting.Sort (Sorted);
end if;
for X in 1 .. Last_Index (Sorted) loop
Rec (Sorted (X));
exit when not Subp_Decl.Is_Null;
end loop;
if Subp_Decl.Is_Null then
Cmd_Error ("subprogram not found at line " &
Image (Arg (Cmd, Update_Body)));
end if;
when Ada_Subp_Decl | Ada_Generic_Subp_Decl |
Ada_Entry_Decl =>
pragma Assert (Subp_Decl.Is_Null);
Subp_Decl := Decl;
if not Decl.As_Basic_Decl.P_Body_Part_For_Decl.Is_Null
then
Cmd_Error
("body for " & Decl_Name & " already exists");
end if;
when others => null;
end case;
else
declare
B : constant Body_Node :=
Decl.As_Basic_Decl.P_Body_Part_For_Decl;
begin
if not B.Is_Null then
Update_Body_Line (B.Sloc_Range.End_Line);
end if;
end;
end if;
end Rec;
begin
Rec (Root_Node);
if Subp_Decl.Is_Null then
Cmd_Error ("no subprogram found at line " &
Image (Arg (Cmd, Update_Body)));
end if;
end Search;
function Find_Insertion_Index
(Old_Content : String; Body_Line : Line_Number) return Positive
is
Line_Num : Line_Number := 1;
begin
return Result : Positive := 1 do
while Line_Num <= Body_Line loop
if Old_Content (Result) = ASCII.LF then
Line_Num := Line_Num + 1;
end if;
Result := Result + 1;
end loop;
end return;
end Find_Insertion_Index;
procedure Indent_Stub (Amount : Natural) is
Ind : constant String := (1 .. Amount => ' ');
Temp : Char_Vector;
begin
Append (Temp, Ind);
for X in 1 .. Last_Index (JSON_Gen_Out_Vec) loop
Append (Temp, JSON_Gen_Out_Vec (X));
if JSON_Gen_Out_Vec (X) = ASCII.LF
and then X /= Last_Index (JSON_Gen_Out_Vec)
and then JSON_Gen_Out_Vec (X + 1) /= ASCII.LF
then
Append (Temp, Ind);
end if;
end loop;
Move (Target => JSON_Gen_Out_Vec, Source => Temp);
end Indent_Stub;
Old_Content : String_Access := Read_File (Output_Name);
Backup_Name : constant String := Output_Name & ".bak";
Create_Backup : constant Boolean := False;
-- For now, we do not create a backup file
-- Start of processing for Update_Body
begin
if Root_Node.Kind not in
Ada_Package_Decl | Ada_Generic_Package_Decl
then
Cmd_Error ("package spec not found");
end if;
Search;
pragma Assert (Body_Line_Set);
declare
Name : constant W_Str :=
Full_Name (Get_Def_Name (Subp_Decl).As_Name);
Level : constant Natural := 1;
Insertion_Index : constant Positive :=
Find_Insertion_Index (Old_Content.all, Body_Line);
pragma Assert (Old_Content (Insertion_Index - 1) = ASCII.LF);
begin
-- We want to insert the generated stub into the body at
-- Insertion_Index. We want to pretty print the generated stub,
-- but leave the rest of the code alone. So we generate the stub
-- into Out_Vec, then call Format, which formats it into
-- JSON_Gen_Out_Vec. Then move it back into Out_Vec, copy the first part
-- of the body to JSON_Gen_Out_Vec, copy the stub into JSON_Gen_Out_Vec, and
-- copy the rest of the body into JSON_Gen_Out_Vec. Finally, call
-- Write_Output_File to write JSON_Gen_Out_Vec to the output (body)
-- file.
pragma Assert (Is_Empty (Out_Vec) and then Is_Empty (JSON_Gen_Out_Vec));
Generate_Local_Header (Name, Level);
Generate_Subunit_Start (Level);
Generate_Subp_Or_Entry_Body
(Subp_Decl, Name, Ada_Stub => Arg (Cmd, Subunits));
-- JSON_Gen.Command_Lines.Json_Gen_Nat_Switches.Set_Arg
-- (JSON_Gen_Cmd, JSON_Gen.Command_Lines.Initial_Indentation, 0);
JSON_Gen.Command_Lines.Json_Gen_Nat_Switches.Set_Arg
(JSON_Gen_Cmd, JSON_Gen.Command_Lines.Max_Line_Length,
JSON_Gen.Command_Lines.Json_Gen_Nat_Switches.Arg
(JSON_Gen_Cmd, JSON_Gen.Command_Lines.Max_Line_Length) - 3);
if Update_Body_Specified (Cmd) and then Arg (Cmd, Subunits) then
-- We would prefer to use Format in this case, with an
-- appropriate Rule passed to Get_From_Buffer, but that
-- doesn't quite work.
Move (Target => JSON_Gen_Out_Vec, Source => Out_Vec);
Indent_Stub (2);
else
Format;
Indent_Stub (3);
end if;
Move (Target => Out_Vec, Source => JSON_Gen_Out_Vec);
Append (JSON_Gen_Out_Vec,
Old_Content (Old_Content'First .. Insertion_Index - 1));
Append (JSON_Gen_Out_Vec, ASCII.LF);
Append (JSON_Gen_Out_Vec, Elems (Out_Vec) (1 .. Last_Index (Out_Vec)));
if Old_Content (Insertion_Index) /= ASCII.LF then
Append (JSON_Gen_Out_Vec, ASCII.LF);
end if;
Append (JSON_Gen_Out_Vec,
Old_Content (Insertion_Index .. Old_Content'Last));
Free (Old_Content);
Clear (Out_Vec);
end;
if Create_Backup then
Move_File (Old_Name => Output_Name, New_Name => Backup_Name);
end if;
Write_Output_File;
-- Finally, if we generated an Ada stub (i.e. --subunits is True), we
-- recursively call ourself on the body to generate the subunits.
if Arg (Cmd, Subunits) then
declare
Body_Cmd : Cmd_Line := Copy_Command_Line (Cmd);
Cont : Natural := 1;
begin
Clear_File_Names (Body_Cmd);
Append_File_Name (Body_Cmd, Output_Name);
Set_Arg (Body_Cmd, Update_Body, No_Update_Body);
Process_File (Tool, Body_Cmd, Output_Name, Cont);
end;
end if;
end Update_Body;
-- Start of processing for Generate
begin
if Update_Body_Specified (Cmd) then
Update_Body;
goto Skip;
end if;
-- If we are looking for Ada stubs, then of course the body file exists;
-- we are not going to overwrite it. If we are generating a subunit for
-- an Ada stub, and the subunit file already exists, we simply skip
-- it. If we are generating a body for an Ada spec, it is an error if
-- the output already exists, unless --force was given.
if not Looking_For_Ada_Stubs and then Exists (Output_Name) then
if Root_Node.Kind in Ada_Body_Stub then
goto Skip;
else
if not Arg (Cmd, Force) then
Cmd_Error
("the body for " & File_Name & " already exists; " &
"use -f to overwrite it");
end if;
end if;
end if;
Generate_CU_Header;
Put ("pragma Ada_2012;\n");
Walk (Root_Node, Level => 0);
-- If we're processing a body for stubs, we don't want to output
-- anything corresponding to that body; we've already output the
-- subunits. In that case, the above Walk will have generated some
-- rubbage, which we ignore. Looking_For_Ada_Stubs will be False if the
-- input is a spec, so we're generating bodies, or if we're in a
-- recursive call to Generate for an Ada stub. It will be True only for
-- the outer call with a body as input.
if not Looking_For_Ada_Stubs then
Format;
Write_Output_File;
end if;
<<Skip>>
end Generate;
overriding procedure Per_File_Action
(Tool : in out Json_Gen_Tool;
Cmd : Command_Line;
File_Name : String;
Input : String;
BOM_Seen : Boolean;
Unit : Analysis_Unit)
is
Lib_Item_Or_Subunit : constant Ada_Node :=
Root (Unit).As_Compilation_Unit.F_Body;
Root_Node : constant Ada_Node :=
(case Lib_Item_Or_Subunit.Kind is
when Ada_Library_Item =>
Lib_Item_Or_Subunit.As_Library_Item.F_Item.As_Ada_Node,
when Ada_Subunit =>
Lib_Item_Or_Subunit.As_Subunit.F_Body.As_Ada_Node,
when others => raise Program_Error);
-- Start of processing for Per_File_Action
begin
if Debug_Mode then
Print (Unit);
-- Put ("With trivia\n");
-- PP_Trivia (Unit);
end if;
case Root_Node.Kind is
when Ada_Package_Decl | Ada_Generic_Package_Decl |
Ada_Subp_Decl | Ada_Generic_Subp_Decl =>
if Arg (Cmd, Subunits)
and then not Update_Body_Specified (Cmd)
then
Cmd_Error ("argument unit cannot have subunits");
end if;
if not Needs_Completion (Root_Node) then
Cmd_Error_No_Help
("Compilation unit " &
To_UTF8 (Full_Name (Get_Def_Name (Root_Node).As_Name)) &
" does not require a body");
end if;
when Ada_Body_Node =>
if not Arg (Cmd, Subunits) then
declare
use Text_IO;
begin
Put (Standard_Error, Utils.Tool_Names.Tool_Name & ": ");
Put_Line (Standard_Error, "input file looks like a body");
Cmd_Error_No_Help
("output file name should be provided because " &
File_Name &
" does not follow GNAT naming rules for " &
"spec files");
end;
end if;
when others => raise Program_Error;
end case;
Generate (Tool, Cmd, File_Name, Input, BOM_Seen, Root_Node,
Parent_Body_Of_Subunit => No_Ada_Node);
end Per_File_Action;
---------------
-- Tool_Help --
---------------
overriding procedure Tool_Help (Tool : Json_Gen_Tool) is
pragma Unreferenced (Tool);
use Utils.Formatted_Output;
begin
pragma Style_Checks ("M200"); -- Allow long lines
Put ("Usage: jsongen [options] {filename}\n");
Put ("\n");
Put (" filename Ada source file\n");
Put ("\n");
Put ("options:\n");
Put (" --version Display version and exit\n");
Put (" --help Display usage and exit\n");
Put ("\n");
Put (" -Pproject Use project file project\n");
Put (" -U process all sources of the argument project\n");
Put (" -U main process the closure of units rooted at unit main\n");
Put (" -Xname=value specify an external reference for argument project file\n");
Put (" -eL follow all symbolic links when processing project files\n");
Put ("\n");
Put (" --subunits generate separate bodies for body stubs\n");
Put (" --files=filename name of a file containing a list of files to process\n");
Put ("\n");
Put (" --force replace an existing body file (if any), with a body sample\n");
Put (" --max-line-length=nnn maximum line length in sample body\n");
Put (" --indentation=n number of spaces used for indentation in sample body\n");
Put (" --alphabetical-order alphabetically order local bodies\n");
Put (" --comment_header_sample insert a sample comment header\n");
Put (" --comment_header_spec insert the comment header from the spec\n");
Put (" --header-file=filename insert the comment header from the specified file\n");
Put (" --no-exception avoid raising Program_Error in procedure stubs\n");
Put (" --no-local-header no local comment headers for unit stubs\n");
Put (" --output=body-name the name of the file to place the body into\n");
Put (" --output-dir=directory place generated file(s) into directory\n");
Put (" --wide-character-encoding=(8|b)\n");
Put (" wide character encoding of the result file\n");
Put ("\n");
Put (" --quiet / -q quiet mode\n");
Put (" --verbose / -v verbose mode\n");
Put ("\n\nReport bugs to report@adacore.com\n");
pragma Style_Checks ("M79");
end Tool_Help;
end JSON_Gen.Actions;
|
-- Abstract :
--
-- See spec.
--
-- Copyright (C) 2013-2015, 2017, 2018, 2019 Free Software Foundation, Inc.
--
-- This file is part of the WisiToken package.
--
-- The WisiToken package is free software; you can redistribute it
-- and/or modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 3, or
-- (at your option) any later version. The WisiToken package 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 distributed with the WisiToken package;
-- see file GPL.txt. If not, write to the Free Software Foundation,
-- 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.
pragma License (GPL);
with Ada.Exceptions;
with Ada.Strings.Maps;
with Ada.Strings.Fixed;
with Ada.Text_IO;
with GNATCOLL.Mmap;
package body WisiToken.Parse.LR is
----------
-- Public subprograms, declaration order
function Image (Item : in Parse_Action_Rec; Descriptor : in WisiToken.Descriptor) return String
is
use Ada.Containers;
begin
case Item.Verb is
when Shift =>
return "(Shift," & State_Index'Image (Item.State) & ")";
when Reduce =>
return "(Reduce," & Count_Type'Image (Item.Token_Count) & ", " &
Image (Item.Production.LHS, Descriptor) & "," & Trimmed_Image (Item.Production.RHS) & ")";
when Accept_It =>
return "(Accept It)";
when Error =>
return "(Error)";
end case;
end Image;
procedure Put (Trace : in out WisiToken.Trace'Class; Item : in Parse_Action_Rec)
is
use Ada.Containers;
begin
case Item.Verb is
when Shift =>
Trace.Put ("shift and goto state" & State_Index'Image (Item.State), Prefix => False);
when Reduce =>
Trace.Put
("reduce" & Count_Type'Image (Item.Token_Count) & " tokens to " &
Image (Item.Production.LHS, Trace.Descriptor.all),
Prefix => False);
when Accept_It =>
Trace.Put ("accept it", Prefix => False);
when Error =>
Trace.Put ("ERROR", Prefix => False);
end case;
end Put;
function Equal (Left, Right : in Parse_Action_Rec) return Boolean
is
use all type Ada.Containers.Count_Type;
begin
if Left.Verb = Right.Verb then
case Left.Verb is
when Shift =>
return Left.State = Right.State;
when Reduce | Accept_It =>
return Left.Production.LHS = Right.Production.LHS and Left.Token_Count = Right.Token_Count;
when Error =>
return True;
end case;
else
return False;
end if;
end Equal;
function Is_In (Item : in Parse_Action_Rec; List : in Parse_Action_Node_Ptr) return Boolean
is
Node : Parse_Action_Node_Ptr := List;
begin
loop
exit when Node = null;
if Equal (Item, Node.Item) then
return True;
end if;
Node := Node.Next;
end loop;
return False;
end Is_In;
function Compare (Left, Right : in Token_ID) return SAL.Compare_Result
is begin
if Left < Right then
return SAL.Less;
elsif Left = Right then
return SAL.Equal;
else
return SAL.Greater;
end if;
end Compare;
procedure Add
(List : in out Action_Arrays.Vector;
Symbol : in Token_ID;
Action : in Parse_Action_Rec)
is begin
declare
Node : constant Action_Arrays.Find_Reference_Type := List.Find (Symbol);
begin
if Node.Element /= null then
declare
I : Parse_Action_Node_Ptr := Node.Element.Actions;
begin
loop
exit when I.Next = null;
I := I.Next;
end loop;
I.Next := new Parse_Action_Node'(Action, null);
return;
end;
end if;
end;
List.Insert ((Symbol, new Parse_Action_Node'(Action, null)));
end Add;
function To_Vector (Item : in Kernel_Info_Array) return Kernel_Info_Arrays.Vector
is begin
return Result : Kernel_Info_Arrays.Vector do
Result.Set_First_Last (Item'First, Item'Last);
for I in Item'Range loop
Result (I) := Item (I);
end loop;
end return;
end To_Vector;
function Strict_Image (Item : in Kernel_Info) return String
is begin
return "(" & Trimmed_Image (Item.LHS) & "," & Token_ID'Image (Item.Before_Dot) & "," &
Ada.Containers.Count_Type'Image (Item.Length_After_Dot) & ", " &
(if Item.Recursive then "True" else "False") & ")";
end Strict_Image;
function Strict_Image (Item : in Minimal_Action) return String
is begin
case Item.Verb is
when Shift =>
return "(Shift," & Token_ID'Image (Item.ID) & "," & State_Index'Image (Item.State) & ")";
when Reduce =>
return "(Reduce," & Token_ID'Image (Item.Nonterm) & "," &
Ada.Containers.Count_Type'Image (Item.Token_Count) & ")";
end case;
end Strict_Image;
function Image (Item : in Minimal_Action; Descriptor : in WisiToken.Descriptor) return String
is begin
case Item.Verb is
when Shift =>
return "Shift " & Image (Item.ID, Descriptor);
when Reduce =>
return "Reduce to " & Image (Item.Nonterm, Descriptor);
end case;
end Image;
function To_Vector (Item : in Minimal_Action_Array) return Minimal_Action_Arrays.Vector
is begin
return Result : Minimal_Action_Arrays.Vector do
Result.Set_First_Last (Item'First, Item'Last);
for I in Item'Range loop
Result.Replace_Element (I, Item (I));
end loop;
end return;
end To_Vector;
procedure Add_Action
(State : in out LR.Parse_State;
Symbol : in Token_ID;
State_Index : in WisiToken.State_Index)
is begin
Add (State.Action_List, Symbol, (Shift, State_Index));
end Add_Action;
procedure Add_Action
(State : in out LR.Parse_State;
Symbol : in Token_ID;
Verb : in LR.Parse_Action_Verbs;
Production : in Production_ID;
RHS_Token_Count : in Ada.Containers.Count_Type;
Semantic_Action : in WisiToken.Syntax_Trees.Semantic_Action;
Semantic_Check : in Semantic_Checks.Semantic_Check)
is
Action : constant Parse_Action_Rec :=
(case Verb is
when Reduce => (Reduce, Production, Semantic_Action, Semantic_Check, RHS_Token_Count),
when Accept_It => (Accept_It, Production, Semantic_Action, Semantic_Check, RHS_Token_Count),
when others => raise SAL.Programmer_Error);
begin
Add (State.Action_List, Symbol, Action);
end Add_Action;
procedure Add_Action
(State : in out Parse_State;
Symbols : in Token_ID_Array;
Production : in Production_ID;
RHS_Token_Count : in Ada.Containers.Count_Type;
Semantic_Action : in WisiToken.Syntax_Trees.Semantic_Action;
Semantic_Check : in WisiToken.Semantic_Checks.Semantic_Check)
is begin
-- We assume WisiToken.BNF.Output_Ada_Common.Duplicate_Reduce is True
-- for this state; no conflicts, all the same action.
for Symbol of Symbols loop
Add_Action
(State, Symbol, Reduce, Production, RHS_Token_Count,
Semantic_Action, Semantic_Check);
end loop;
end Add_Action;
procedure Add_Conflict
(State : in out LR.Parse_State;
Symbol : in Token_ID;
Reduce_Production : in Production_ID;
RHS_Token_Count : in Ada.Containers.Count_Type;
Semantic_Action : in WisiToken.Syntax_Trees.Semantic_Action;
Semantic_Check : in Semantic_Checks.Semantic_Check)
is
Conflict : constant Parse_Action_Rec :=
(Reduce, Reduce_Production, Semantic_Action, Semantic_Check, RHS_Token_Count);
Ref : constant Action_Arrays.Find_Reference_Constant_Type := State.Action_List.Find_Constant (Symbol);
Node : Parse_Action_Node_Ptr := Ref.Actions;
begin
loop
exit when Node.Next = null;
Node := Node.Next;
end loop;
Node.Next := new Parse_Action_Node'(Conflict, null);
end Add_Conflict;
procedure Add_Goto
(State : in out LR.Parse_State;
Symbol : in Token_ID;
To_State : in State_Index)
is begin
State.Goto_List.Insert ((Symbol, To_State));
end Add_Goto;
function Goto_For
(Table : in Parse_Table;
State : in State_Index;
ID : in Token_ID)
return Unknown_State_Index
is
Ref : constant Goto_Arrays.Find_Reference_Constant_Type := Table.States (State).Goto_List.Find_Constant (ID);
begin
if Ref.Element = null then
-- We can only get here during error recovery.
return Unknown_State;
else
return Ref.State;
end if;
end Goto_For;
function Action_For
(Table : in Parse_Table;
State : in State_Index;
ID : in Token_ID)
return Parse_Action_Node_Ptr
is
Ref : constant Action_Arrays.Find_Reference_Constant_Type := Table.States (State).Action_List.Find_Constant (ID);
begin
if Ref.Element = null then
return Table.Error_Action;
end if;
return Ref.Actions;
end Action_For;
function Expecting (Table : in Parse_Table; State : in State_Index) return Token_ID_Set
is
Result : Token_ID_Set := (Table.First_Terminal .. Table.Last_Terminal => False);
begin
for Action of Table.States (State).Action_List loop
Result (Action.Symbol) := True;
end loop;
return Result;
end Expecting;
procedure Free_Table (Table : in out Parse_Table_Ptr)
is
procedure Free is new Ada.Unchecked_Deallocation (Parse_Table, Parse_Table_Ptr);
Parse_Action : Parse_Action_Node_Ptr;
Temp_Parse_Action : Parse_Action_Node_Ptr;
begin
if Table = null then
return;
end if;
for State of Table.States loop
for Action of State.Action_List loop
Parse_Action := Action.Actions;
loop
exit when Parse_Action = null;
Temp_Parse_Action := Parse_Action;
Parse_Action := Parse_Action.Next;
Free (Temp_Parse_Action);
end loop;
end loop;
end loop;
Free (Table);
end Free_Table;
function Get_Text_Rep
(File_Name : in String;
McKenzie_Param : in McKenzie_Param_Type;
Actions : in Semantic_Action_Array_Arrays.Vector)
return Parse_Table_Ptr
is
use Ada.Text_IO;
File : GNATCOLL.Mmap.Mapped_File;
Region : GNATCOLL.Mmap.Mapped_Region;
Buffer : GNATCOLL.Mmap.Str_Access;
Buffer_Abs_Last : Integer; -- Buffer'Last, except Buffer has no bounds
Buffer_Last : Integer := 0; -- Last char read from Buffer
Delimiters : constant Ada.Strings.Maps.Character_Set := Ada.Strings.Maps.To_Set (" ;" & ASCII.LF);
function Check_Semicolon return Boolean
is begin
if Buffer (Buffer_Last) = ';' then
-- There is a space, newline, or newline and space after ';'. Leave
-- Buffer_Last on newline for Check_New_Line.
Buffer_Last := Buffer_Last + 1;
return True;
else
return False;
end if;
end Check_Semicolon;
procedure Check_Semicolon
is begin
if Buffer (Buffer_Last) = ';' then
-- There is a space, newline, or newline and space after ';'. Leave
-- Buffer_Last on newline for Check_New_Line.
Buffer_Last := Buffer_Last + 1;
else
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Buffer_Last),
"expecting semicolon, found '" & Buffer (Buffer_Last) & "'");
end if;
end Check_Semicolon;
function Check_EOI return Boolean
is begin
return Buffer_Last >= Buffer_Abs_Last;
end Check_EOI;
procedure Check_New_Line
is
use Ada.Strings.Maps;
begin
if Buffer (Buffer_Last) = ASCII.LF then
-- There is a space or semicolon after some newlines.
if Is_In (Buffer (Buffer_Last + 1), Delimiters) then
Buffer_Last := Buffer_Last + 1;
end if;
else
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Buffer_Last),
"expecting new_line, found '" & Buffer (Buffer_Last) & "'");
end if;
end Check_New_Line;
type Buffer_Region is record
First : Integer;
Last : Integer;
end record;
function Next_Value return Buffer_Region;
pragma Inline (Next_Value);
function Next_Value return Buffer_Region
is
use Ada.Strings.Fixed;
First : constant Integer := Buffer_Last + 1;
begin
Buffer_Last := Index (Buffer.all, Delimiters, First);
return (First, Buffer_Last - 1);
end Next_Value;
procedure Raise_Gen_Next_Value_Constraint_Error (Name : String; Region : Buffer_Region);
pragma No_Return (Raise_Gen_Next_Value_Constraint_Error);
procedure Raise_Gen_Next_Value_Constraint_Error (Name : String; Region : Buffer_Region)
is begin
-- Factored out from Gen_Next_Value to make Inline efficient.
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Region.First),
"expecting " & Name & ", found '" & Buffer (Region.First .. Region.Last) & "'");
end Raise_Gen_Next_Value_Constraint_Error;
generic
type Value_Type is (<>);
Name : in String;
function Gen_Next_Value return Value_Type;
pragma Inline (Gen_Next_Value);
function Gen_Next_Value return Value_Type
is
Region : constant Buffer_Region := Next_Value;
begin
return Value_Type'Value (Buffer (Region.First .. Region.Last));
exception
when Constraint_Error =>
Raise_Gen_Next_Value_Constraint_Error (Name, Region);
end Gen_Next_Value;
function Next_State_Index is new Gen_Next_Value (State_Index, "State_Index");
function Next_Token_ID is new Gen_Next_Value (Token_ID, "Token_ID");
function Next_Integer is new Gen_Next_Value (Integer, "Integer");
function Next_Parse_Action_Verbs is new Gen_Next_Value (Parse_Action_Verbs, "Parse_Action_Verbs");
function Next_Boolean is new Gen_Next_Value (Boolean, "Boolean");
function Next_Count_Type is new Gen_Next_Value (Ada.Containers.Count_Type, "Count_Type");
begin
File := GNATCOLL.Mmap.Open_Read (File_Name);
Region := GNATCOLL.Mmap.Read (File);
Buffer := GNATCOLL.Mmap.Data (Region);
Buffer_Abs_Last := GNATCOLL.Mmap.Last (Region);
declare
use Ada.Containers;
-- We don't read the discriminants in the aggregate, because
-- aggregate evaluation order is not guaranteed.
State_First : constant State_Index := Next_State_Index;
State_Last : constant State_Index := Next_State_Index;
First_Terminal : constant Token_ID := Next_Token_ID;
Last_Terminal : constant Token_ID := Next_Token_ID;
First_Nonterminal : constant Token_ID := Next_Token_ID;
Last_Nonterminal : constant Token_ID := Next_Token_ID;
Table : constant Parse_Table_Ptr := new Parse_Table
(State_First, State_Last, First_Terminal, Last_Terminal, First_Nonterminal, Last_Nonterminal);
begin
Check_New_Line;
Table.McKenzie_Param := McKenzie_Param;
for State of Table.States loop
declare
Actions_Done : Boolean := False;
begin
State.Action_List.Set_Capacity (Next_Count_Type);
loop
declare
Node_I : Action_Node;
Node_J : Parse_Action_Node_Ptr := new Parse_Action_Node;
Action_Done : Boolean := False;
Verb : Parse_Action_Verbs;
begin
Node_I.Actions := Node_J;
loop
Verb := Next_Parse_Action_Verbs;
Node_J.Item :=
(case Verb is
when Shift => (Verb => Shift, others => <>),
when Reduce => (Verb => Reduce, others => <>),
when Accept_It => (Verb => Accept_It, others => <>),
when Error => (Verb => Error));
case Verb is
when Shift =>
Node_J.Item.State := Next_State_Index;
when Reduce | Accept_It =>
Node_J.Item.Production.LHS := Next_Token_ID;
Node_J.Item.Production.RHS := Next_Integer;
if Next_Boolean then
Node_J.Item.Action := Actions
(Node_J.Item.Production.LHS)(Node_J.Item.Production.RHS).Action;
else
Node_J.Item.Action := null;
end if;
if Next_Boolean then
Node_J.Item.Check := Actions
(Node_J.Item.Production.LHS)(Node_J.Item.Production.RHS).Check;
else
Node_J.Item.Check := null;
end if;
Node_J.Item.Token_Count := Next_Count_Type;
when Error =>
raise SAL.Programmer_Error;
end case;
if Check_Semicolon then
Action_Done := True;
Node_I.Symbol := Next_Token_ID;
if Check_Semicolon then
Actions_Done := True;
end if;
end if;
exit when Action_Done;
Node_J.Next := new Parse_Action_Node;
Node_J := Node_J.Next;
end loop;
Check_New_Line;
State.Action_List.Insert (Node_I);
end;
exit when Actions_Done;
end loop;
end;
if Check_Semicolon then
-- No Gotos
null;
else
State.Goto_List.Set_Capacity (Next_Count_Type);
declare
Node : Goto_Node;
begin
loop
Node.Symbol := Next_Token_ID;
Node.State := Next_State_Index;
State.Goto_List.Insert (Node);
exit when Check_Semicolon;
end loop;
end;
end if;
Check_New_Line;
declare
First : constant Count_Type := Next_Count_Type;
Last : constant Integer := Next_Integer;
begin
if Last = -1 then
-- State.Kernel not set for state 0
null;
else
State.Kernel.Set_First_Last (First, Count_Type (Last));
for I in State.Kernel.First_Index .. State.Kernel.Last_Index loop
State.Kernel (I).LHS := Next_Token_ID;
State.Kernel (I).Before_Dot := Next_Token_ID;
State.Kernel (I).Length_After_Dot := Next_Count_Type;
end loop;
end if;
end;
Check_New_Line;
if Check_Semicolon then
-- No minimal action
null;
else
declare
First : constant Count_Type := Next_Count_Type;
Last : constant Count_Type := Next_Count_Type;
begin
State.Minimal_Complete_Actions.Set_First_Last (First, Last);
end;
for I in State.Minimal_Complete_Actions.First_Index .. State.Minimal_Complete_Actions.Last_Index loop
declare
Verb : constant Minimal_Verbs := Next_Parse_Action_Verbs;
ID : Token_ID;
Action_State : State_Index;
Count : Ada.Containers.Count_Type;
begin
case Verb is
when Shift =>
ID := Next_Token_ID;
Action_State := Next_State_Index;
State.Minimal_Complete_Actions.Replace_Element (I, (Shift, ID, Action_State));
when Reduce =>
ID := Next_Token_ID;
Count := Next_Count_Type;
State.Minimal_Complete_Actions.Replace_Element (I, (Reduce, ID, Count));
end case;
end;
end loop;
Check_Semicolon;
end if;
Check_New_Line;
exit when Check_EOI;
end loop;
Table.Error_Action := new Parse_Action_Node'((Verb => Error), null);
return Table;
end;
exception
when Name_Error =>
raise User_Error with "parser table text file '" & File_Name & "' not found.";
when SAL.Programmer_Error =>
raise;
when E : others =>
raise SAL.Programmer_Error with Error_Message
(File_Name, 1, Ada.Text_IO.Count (Buffer_Last),
Ada.Exceptions.Exception_Name (E) & ": " & Ada.Exceptions.Exception_Message (E));
end Get_Text_Rep;
function Compare (Left, Right : in Insert_Delete_Op) return SAL.Compare_Result
is
Left_Token_Index : constant WisiToken.Token_Index :=
(case Insert_Delete_Op_Label'(Left.Op) is
when Insert => Left.Ins_Token_Index,
when Delete => Left.Del_Token_Index);
Right_Token_Index : constant WisiToken.Token_Index :=
(case Insert_Delete_Op_Label'(Right.Op) is
when Insert => Right.Ins_Token_Index,
when Delete => Right.Del_Token_Index);
begin
if Left_Token_Index < Right_Token_Index then
return SAL.Less;
elsif Left_Token_Index = Right_Token_Index then
return SAL.Equal;
else
return SAL.Greater;
end if;
end Compare;
function Equal (Left : in Config_Op; Right : in Insert_Op) return Boolean
is begin
return Left.Op = Insert and then
Left.Ins_ID = Right.Ins_ID and then
Left.Ins_Token_Index = Right.Ins_Token_Index;
end Equal;
function None (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
begin
for I in First_Index (Ops) .. Last_Index (Ops) loop
if Constant_Ref (Ops, I).Op /= Op then
return False;
end if;
end loop;
return True;
end None;
function None_Since_FF (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
begin
for I in reverse First_Index (Ops) .. Last_Index (Ops) loop
declare
O : Config_Op renames Constant_Ref (Ops, I);
begin
exit when O.Op = Fast_Forward;
if O.Op = Op then
return False;
end if;
end;
end loop;
return True;
end None_Since_FF;
function Only_Since_FF (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
use all type Ada.Containers.Count_Type;
begin
if Length (Ops) = 0 or else Constant_Ref (Ops, Last_Index (Ops)).Op /= Op then
return False;
else
for I in reverse First_Index (Ops) .. Last_Index (Ops) loop
declare
O : Config_Op renames Constant_Ref (Ops, I);
begin
exit when O.Op = Fast_Forward;
if O.Op /= Op then
return False;
end if;
end;
end loop;
return True;
end if;
end Only_Since_FF;
function Any (Ops : aliased in Config_Op_Arrays.Vector; Op : in Config_Op_Label) return Boolean
is
use Config_Op_Arrays, Config_Op_Array_Refs;
begin
for I in First_Index (Ops) .. Last_Index (Ops) loop
declare
O : Config_Op renames Constant_Ref (Ops, I);
begin
if O.Op = Op then
return True;
end if;
end;
end loop;
return False;
end Any;
function Valid_Tree_Indices (Stack : in Recover_Stacks.Stack; Depth : in SAL.Base_Peek_Type) return Boolean
is
use all type WisiToken.Syntax_Trees.Node_Index;
begin
for I in 1 .. Depth loop
if Stack.Peek (I).Tree_Index = Syntax_Trees.Invalid_Node_Index then
return False;
end if;
end loop;
return True;
end Valid_Tree_Indices;
procedure Set_Key (Item : in out Configuration; Key : in Integer)
is begin
Item.Cost := Key;
end Set_Key;
procedure Accumulate (Data : in McKenzie_Data; Counts : in out Strategy_Counts)
is
procedure Proc (Config : in Configuration)
is begin
for I in Config.Strategy_Counts'Range loop
Counts (I) := Counts (I) + Config.Strategy_Counts (I);
end loop;
end Proc;
begin
Data.Results.Process (Proc'Unrestricted_Access);
end Accumulate;
end WisiToken.Parse.LR;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ P A K D --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Checks; use Checks;
with Einfo; use Einfo;
with Errout; use Errout;
with Exp_Dbug; use Exp_Dbug;
with Exp_Util; use Exp_Util;
with Layout; use Layout;
with Lib.Xref; use Lib.Xref;
with Namet; use Namet;
with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
with Sem; use Sem;
with Sem_Aux; use Sem_Aux;
with Sem_Ch3; use Sem_Ch3;
with Sem_Ch8; use Sem_Ch8;
with Sem_Ch13; use Sem_Ch13;
with Sem_Eval; use Sem_Eval;
with Sem_Res; use Sem_Res;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Snames; use Snames;
with Stand; use Stand;
with Targparm; use Targparm;
with Tbuild; use Tbuild;
with Ttypes; use Ttypes;
with Uintp; use Uintp;
package body Exp_Pakd is
---------------------------
-- Endian Considerations --
---------------------------
-- As described in the specification, bit numbering in a packed array
-- is consistent with bit numbering in a record representation clause,
-- and hence dependent on the endianness of the machine:
-- For little-endian machines, element zero is at the right hand end
-- (low order end) of a bit field.
-- For big-endian machines, element zero is at the left hand end
-- (high order end) of a bit field.
-- The shifts that are used to right justify a field therefore differ in
-- the two cases. For the little-endian case, we can simply use the bit
-- number (i.e. the element number * element size) as the count for a right
-- shift. For the big-endian case, we have to subtract the shift count from
-- an appropriate constant to use in the right shift. We use rotates
-- instead of shifts (which is necessary in the store case to preserve
-- other fields), and we expect that the backend will be able to change the
-- right rotate into a left rotate, avoiding the subtract, if the machine
-- architecture provides such an instruction.
-----------------------
-- Local Subprograms --
-----------------------
procedure Compute_Linear_Subscript
(Atyp : Entity_Id;
N : Node_Id;
Subscr : out Node_Id);
-- Given a constrained array type Atyp, and an indexed component node N
-- referencing an array object of this type, build an expression of type
-- Standard.Integer representing the zero-based linear subscript value.
-- This expression includes any required range checks.
function Compute_Number_Components
(N : Node_Id;
Typ : Entity_Id) return Node_Id;
-- Build an expression that multiplies the length of the dimensions of the
-- array, used to control array equality checks.
procedure Convert_To_PAT_Type (Aexp : Node_Id);
-- Given an expression of a packed array type, builds a corresponding
-- expression whose type is the implementation type used to represent
-- the packed array. Aexp is analyzed and resolved on entry and on exit.
procedure Get_Base_And_Bit_Offset
(N : Node_Id;
Base : out Node_Id;
Offset : out Node_Id);
-- Given a node N for a name which involves a packed array reference,
-- return the base object of the reference and build an expression of
-- type Standard.Integer representing the zero-based offset in bits
-- from Base'Address to the first bit of the reference.
function Known_Aligned_Enough (Obj : Node_Id; Csiz : Nat) return Boolean;
-- There are two versions of the Set routines, the ones used when the
-- object is known to be sufficiently well aligned given the number of
-- bits, and the ones used when the object is not known to be aligned.
-- This routine is used to determine which set to use. Obj is a reference
-- to the object, and Csiz is the component size of the packed array.
-- True is returned if the alignment of object is known to be sufficient,
-- defined as 1 for odd bit sizes, 4 for bit sizes divisible by 4, and
-- 2 otherwise.
function Make_Shift_Left (N : Node_Id; S : Node_Id) return Node_Id;
-- Build a left shift node, checking for the case of a shift count of zero
function Make_Shift_Right (N : Node_Id; S : Node_Id) return Node_Id;
-- Build a right shift node, checking for the case of a shift count of zero
function RJ_Unchecked_Convert_To
(Typ : Entity_Id;
Expr : Node_Id) return Node_Id;
-- The packed array code does unchecked conversions which in some cases
-- may involve non-discrete types with differing sizes. The semantics of
-- such conversions is potentially endianness dependent, and the effect
-- we want here for such a conversion is to do the conversion in size as
-- though numeric items are involved, and we extend or truncate on the
-- left side. This happens naturally in the little-endian case, but in
-- the big endian case we can get left justification, when what we want
-- is right justification. This routine does the unchecked conversion in
-- a stepwise manner to ensure that it gives the expected result. Hence
-- the name (RJ = Right justified). The parameters Typ and Expr are as
-- for the case of a normal Unchecked_Convert_To call.
procedure Setup_Enumeration_Packed_Array_Reference (N : Node_Id);
-- This routine is called in the Get and Set case for arrays that are
-- packed but not bit-packed, meaning that they have at least one
-- subscript that is of an enumeration type with a non-standard
-- representation. This routine modifies the given node to properly
-- reference the corresponding packed array type.
procedure Setup_Inline_Packed_Array_Reference
(N : Node_Id;
Atyp : Entity_Id;
Obj : in out Node_Id;
Cmask : out Uint;
Shift : out Node_Id);
-- This procedure performs common processing on the N_Indexed_Component
-- parameter given as N, whose prefix is a reference to a packed array.
-- This is used for the get and set when the component size is 1, 2, 4,
-- or for other component sizes when the packed array type is a modular
-- type (i.e. the cases that are handled with inline code).
--
-- On entry:
--
-- N is the N_Indexed_Component node for the packed array reference
--
-- Atyp is the constrained array type (the actual subtype has been
-- computed if necessary to obtain the constraints, but this is still
-- the original array type, not the Packed_Array_Impl_Type value).
--
-- Obj is the object which is to be indexed. It is always of type Atyp.
--
-- On return:
--
-- Obj is the object containing the desired bit field. It is of type
-- Unsigned, Long_Unsigned, or Long_Long_Unsigned, and is either the
-- entire value, for the small static case, or the proper selected byte
-- from the array in the large or dynamic case. This node is analyzed
-- and resolved on return.
--
-- Shift is a node representing the shift count to be used in the
-- rotate right instruction that positions the field for access.
-- This node is analyzed and resolved on return.
--
-- Cmask is a mask corresponding to the width of the component field.
-- Its value is 2 ** Csize - 1 (e.g. 2#1111# for component size of 4).
--
-- Note: in some cases the call to this routine may generate actions
-- (for handling multi-use references and the generation of the packed
-- array type on the fly). Such actions are inserted into the tree
-- directly using Insert_Action.
function Revert_Storage_Order (N : Node_Id) return Node_Id;
-- Perform appropriate justification and byte ordering adjustments for N,
-- an element of a packed array type, when both the component type and
-- the enclosing packed array type have reverse scalar storage order.
-- On little-endian targets, the value is left justified before byte
-- swapping. The Etype of the returned expression is an integer type of
-- an appropriate power-of-2 size.
--------------------------
-- Revert_Storage_Order --
--------------------------
function Revert_Storage_Order (N : Node_Id) return Node_Id is
Loc : constant Source_Ptr := Sloc (N);
T : constant Entity_Id := Etype (N);
T_Size : constant Uint := RM_Size (T);
Swap_RE : RE_Id;
Swap_F : Entity_Id;
Swap_T : Entity_Id;
-- Swapping function
Arg : Node_Id;
Adjusted : Node_Id;
Shift : Uint;
begin
if T_Size <= 8 then
-- Array component size is less than a byte: no swapping needed
Swap_F := Empty;
Swap_T := RTE (RE_Unsigned_8);
else
-- Select byte swapping function depending on array component size
if T_Size <= 16 then
Swap_RE := RE_Bswap_16;
elsif T_Size <= 32 then
Swap_RE := RE_Bswap_32;
else pragma Assert (T_Size <= 64);
Swap_RE := RE_Bswap_64;
end if;
Swap_F := RTE (Swap_RE);
Swap_T := Etype (Swap_F);
end if;
Shift := Esize (Swap_T) - T_Size;
Arg := RJ_Unchecked_Convert_To (Swap_T, N);
if not Bytes_Big_Endian and then Shift > Uint_0 then
Arg :=
Make_Op_Shift_Left (Loc,
Left_Opnd => Arg,
Right_Opnd => Make_Integer_Literal (Loc, Shift));
end if;
if Present (Swap_F) then
Adjusted :=
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Swap_F, Loc),
Parameter_Associations => New_List (Arg));
else
Adjusted := Arg;
end if;
Set_Etype (Adjusted, Swap_T);
return Adjusted;
end Revert_Storage_Order;
------------------------------
-- Compute_Linear_Subscript --
------------------------------
procedure Compute_Linear_Subscript
(Atyp : Entity_Id;
N : Node_Id;
Subscr : out Node_Id)
is
Loc : constant Source_Ptr := Sloc (N);
Oldsub : Node_Id;
Newsub : Node_Id;
Indx : Node_Id;
Styp : Entity_Id;
begin
Subscr := Empty;
-- Loop through dimensions
Indx := First_Index (Atyp);
Oldsub := First (Expressions (N));
while Present (Indx) loop
Styp := Etype (Indx);
Newsub := Relocate_Node (Oldsub);
-- Get expression for the subscript value. First, if Do_Range_Check
-- is set on a subscript, then we must do a range check against the
-- original bounds (not the bounds of the packed array type). We do
-- this by introducing a subtype conversion.
if Do_Range_Check (Newsub)
and then Etype (Newsub) /= Styp
then
Newsub := Convert_To (Styp, Newsub);
end if;
-- Now evolve the expression for the subscript. First convert
-- the subscript to be zero based and of an integer type.
-- Case of integer type, where we just subtract to get lower bound
if Is_Integer_Type (Styp) then
-- If length of integer type is smaller than standard integer,
-- then we convert to integer first, then do the subtract
-- Integer (subscript) - Integer (Styp'First)
if Esize (Styp) < Esize (Standard_Integer) then
Newsub :=
Make_Op_Subtract (Loc,
Left_Opnd => Convert_To (Standard_Integer, Newsub),
Right_Opnd =>
Convert_To (Standard_Integer,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Styp, Loc),
Attribute_Name => Name_First)));
-- For larger integer types, subtract first, then convert to
-- integer, this deals with strange long long integer bounds.
-- Integer (subscript - Styp'First)
else
Newsub :=
Convert_To (Standard_Integer,
Make_Op_Subtract (Loc,
Left_Opnd => Newsub,
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Styp, Loc),
Attribute_Name => Name_First)));
end if;
-- For the enumeration case, we have to use 'Pos to get the value
-- to work with before subtracting the lower bound.
-- Integer (Styp'Pos (subscr)) - Integer (Styp'Pos (Styp'First));
-- This is not quite right for bizarre cases where the size of the
-- enumeration type is > Integer'Size bits due to rep clause ???
else
pragma Assert (Is_Enumeration_Type (Styp));
Newsub :=
Make_Op_Subtract (Loc,
Left_Opnd => Convert_To (Standard_Integer,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Styp, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (Newsub))),
Right_Opnd =>
Convert_To (Standard_Integer,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Styp, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Styp, Loc),
Attribute_Name => Name_First)))));
end if;
Set_Paren_Count (Newsub, 1);
-- For the first subscript, we just copy that subscript value
if No (Subscr) then
Subscr := Newsub;
-- Otherwise, we must multiply what we already have by the current
-- stride and then add in the new value to the evolving subscript.
else
Subscr :=
Make_Op_Add (Loc,
Left_Opnd =>
Make_Op_Multiply (Loc,
Left_Opnd => Subscr,
Right_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Range_Length,
Prefix => New_Occurrence_Of (Styp, Loc))),
Right_Opnd => Newsub);
end if;
-- Move to next subscript
Next_Index (Indx);
Next (Oldsub);
end loop;
end Compute_Linear_Subscript;
-------------------------------
-- Compute_Number_Components --
-------------------------------
function Compute_Number_Components
(N : Node_Id;
Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (N);
Len_Expr : Node_Id;
begin
Len_Expr :=
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Length,
Prefix => New_Occurrence_Of (Typ, Loc),
Expressions => New_List (Make_Integer_Literal (Loc, 1)));
for J in 2 .. Number_Dimensions (Typ) loop
Len_Expr :=
Make_Op_Multiply (Loc,
Left_Opnd => Len_Expr,
Right_Opnd =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_Length,
Prefix => New_Occurrence_Of (Typ, Loc),
Expressions => New_List (Make_Integer_Literal (Loc, J))));
end loop;
return Len_Expr;
end Compute_Number_Components;
-------------------------
-- Convert_To_PAT_Type --
-------------------------
-- The PAT is always obtained from the actual subtype
procedure Convert_To_PAT_Type (Aexp : Node_Id) is
Act_ST : Entity_Id;
begin
Convert_To_Actual_Subtype (Aexp);
Act_ST := Underlying_Type (Etype (Aexp));
Create_Packed_Array_Impl_Type (Act_ST);
-- Just replace the etype with the packed array type. This works because
-- the expression will not be further analyzed, and Gigi considers the
-- two types equivalent in any case.
-- This is not strictly the case ??? If the reference is an actual in
-- call, the expansion of the prefix is delayed, and must be reanalyzed,
-- see Reset_Packed_Prefix. On the other hand, if the prefix is a simple
-- array reference, reanalysis can produce spurious type errors when the
-- PAT type is replaced again with the original type of the array. Same
-- for the case of a dereference. Ditto for function calls: expansion
-- may introduce additional actuals which will trigger errors if call is
-- reanalyzed. The following is correct and minimal, but the handling of
-- more complex packed expressions in actuals is confused. Probably the
-- problem only remains for actuals in calls.
Set_Etype (Aexp, Packed_Array_Impl_Type (Act_ST));
if Is_Entity_Name (Aexp)
or else
(Nkind (Aexp) = N_Indexed_Component
and then Is_Entity_Name (Prefix (Aexp)))
or else Nkind_In (Aexp, N_Explicit_Dereference, N_Function_Call)
then
Set_Analyzed (Aexp);
end if;
end Convert_To_PAT_Type;
-----------------------------------
-- Create_Packed_Array_Impl_Type --
-----------------------------------
procedure Create_Packed_Array_Impl_Type (Typ : Entity_Id) is
Loc : constant Source_Ptr := Sloc (Typ);
Ctyp : constant Entity_Id := Component_Type (Typ);
Csize : constant Uint := Component_Size (Typ);
Ancest : Entity_Id;
PB_Type : Entity_Id;
PASize : Uint;
Decl : Node_Id;
PAT : Entity_Id;
Len_Expr : Node_Id;
Len_Bits : Uint;
Bits_U1 : Node_Id;
PAT_High : Node_Id;
Btyp : Entity_Id;
Lit : Node_Id;
procedure Install_PAT;
-- This procedure is called with Decl set to the declaration for the
-- packed array type. It creates the type and installs it as required.
procedure Set_PB_Type;
-- Sets PB_Type to Packed_Bytes{1,2,4} as required by the alignment
-- requirements (see documentation in the spec of this package).
-----------------
-- Install_PAT --
-----------------
procedure Install_PAT is
Pushed_Scope : Boolean := False;
begin
-- We do not want to put the declaration we have created in the tree
-- since it is often hard, and sometimes impossible to find a proper
-- place for it (the impossible case arises for a packed array type
-- with bounds depending on the discriminant, a declaration cannot
-- be put inside the record, and the reference to the discriminant
-- cannot be outside the record).
-- The solution is to analyze the declaration while temporarily
-- attached to the tree at an appropriate point, and then we install
-- the resulting type as an Itype in the packed array type field of
-- the original type, so that no explicit declaration is required.
-- Note: the packed type is created in the scope of its parent type.
-- There are at least some cases where the current scope is deeper,
-- and so when this is the case, we temporarily reset the scope
-- for the definition. This is clearly safe, since the first use
-- of the packed array type will be the implicit reference from
-- the corresponding unpacked type when it is elaborated.
if Is_Itype (Typ) then
Set_Parent (Decl, Associated_Node_For_Itype (Typ));
else
Set_Parent (Decl, Declaration_Node (Typ));
end if;
if Scope (Typ) /= Current_Scope then
Push_Scope (Scope (Typ));
Pushed_Scope := True;
end if;
Set_Is_Itype (PAT, True);
Set_Is_Packed_Array_Impl_Type (PAT, True);
Set_Packed_Array_Impl_Type (Typ, PAT);
Analyze (Decl, Suppress => All_Checks);
if Pushed_Scope then
Pop_Scope;
end if;
-- Set Esize and RM_Size to the actual size of the packed object
-- Do not reset RM_Size if already set, as happens in the case of
-- a modular type.
if Unknown_Esize (PAT) then
Set_Esize (PAT, PASize);
end if;
if Unknown_RM_Size (PAT) then
Set_RM_Size (PAT, PASize);
end if;
Adjust_Esize_Alignment (PAT);
-- Set remaining fields of packed array type
Init_Alignment (PAT);
Set_Parent (PAT, Empty);
Set_Associated_Node_For_Itype (PAT, Typ);
Set_Original_Array_Type (PAT, Typ);
-- Propagate representation aspects
Set_Is_Atomic (PAT, Is_Atomic (Typ));
Set_Is_Independent (PAT, Is_Independent (Typ));
Set_Is_Volatile (PAT, Is_Volatile (Typ));
Set_Is_Volatile_Full_Access (PAT, Is_Volatile_Full_Access (Typ));
Set_Treat_As_Volatile (PAT, Treat_As_Volatile (Typ));
-- For a non-bit-packed array, propagate reverse storage order
-- flag from original base type to packed array base type.
if not Is_Bit_Packed_Array (Typ) then
Set_Reverse_Storage_Order
(Etype (PAT), Reverse_Storage_Order (Base_Type (Typ)));
end if;
-- We definitely do not want to delay freezing for packed array
-- types. This is of particular importance for the itypes that are
-- generated for record components depending on discriminants where
-- there is no place to put the freeze node.
Set_Has_Delayed_Freeze (PAT, False);
Set_Has_Delayed_Freeze (Etype (PAT), False);
-- If we did allocate a freeze node, then clear out the reference
-- since it is obsolete (should we delete the freeze node???)
Set_Freeze_Node (PAT, Empty);
Set_Freeze_Node (Etype (PAT), Empty);
end Install_PAT;
-----------------
-- Set_PB_Type --
-----------------
procedure Set_PB_Type is
begin
-- If the user has specified an explicit alignment for the
-- type or component, take it into account.
if Csize <= 2 or else Csize = 4 or else Csize mod 2 /= 0
or else Alignment (Typ) = 1
or else Component_Alignment (Typ) = Calign_Storage_Unit
then
PB_Type := RTE (RE_Packed_Bytes1);
elsif Csize mod 4 /= 0
or else Alignment (Typ) = 2
then
PB_Type := RTE (RE_Packed_Bytes2);
else
PB_Type := RTE (RE_Packed_Bytes4);
end if;
end Set_PB_Type;
-- Start of processing for Create_Packed_Array_Impl_Type
begin
-- If we already have a packed array type, nothing to do
if Present (Packed_Array_Impl_Type (Typ)) then
return;
end if;
-- If our immediate ancestor subtype is constrained, and it already
-- has a packed array type, then just share the same type, since the
-- bounds must be the same. If the ancestor is not an array type but
-- a private type, as can happen with multiple instantiations, create
-- a new packed type, to avoid privacy issues.
if Ekind (Typ) = E_Array_Subtype then
Ancest := Ancestor_Subtype (Typ);
if Present (Ancest)
and then Is_Array_Type (Ancest)
and then Is_Constrained (Ancest)
and then Present (Packed_Array_Impl_Type (Ancest))
then
Set_Packed_Array_Impl_Type (Typ, Packed_Array_Impl_Type (Ancest));
return;
end if;
end if;
-- We preset the result type size from the size of the original array
-- type, since this size clearly belongs to the packed array type. The
-- size of the conceptual unpacked type is always set to unknown.
PASize := RM_Size (Typ);
-- Case of an array where at least one index is of an enumeration
-- type with a non-standard representation, but the component size
-- is not appropriate for bit packing. This is the case where we
-- have Is_Packed set (we would never be in this unit otherwise),
-- but Is_Bit_Packed_Array is false.
-- Note that if the component size is appropriate for bit packing,
-- then the circuit for the computation of the subscript properly
-- deals with the non-standard enumeration type case by taking the
-- Pos anyway.
if not Is_Bit_Packed_Array (Typ) then
-- Here we build a declaration:
-- type tttP is array (index1, index2, ...) of component_type
-- where index1, index2, are the index types. These are the same
-- as the index types of the original array, except for the non-
-- standard representation enumeration type case, where we have
-- two subcases.
-- For the unconstrained array case, we use
-- Natural range <>
-- For the constrained case, we use
-- Natural range Enum_Type'Pos (Enum_Type'First) ..
-- Enum_Type'Pos (Enum_Type'Last);
-- Note that tttP is created even if no index subtype is a non
-- standard enumeration, because we still need to remove padding
-- normally inserted for component alignment.
PAT :=
Make_Defining_Identifier (Loc,
Chars => New_External_Name (Chars (Typ), 'P'));
declare
Indexes : constant List_Id := New_List;
Indx : Node_Id;
Indx_Typ : Entity_Id;
Enum_Case : Boolean;
Typedef : Node_Id;
begin
Indx := First_Index (Typ);
while Present (Indx) loop
Indx_Typ := Etype (Indx);
Enum_Case := Is_Enumeration_Type (Indx_Typ)
and then Has_Non_Standard_Rep (Indx_Typ);
-- Unconstrained case
if not Is_Constrained (Typ) then
if Enum_Case then
Indx_Typ := Standard_Natural;
end if;
Append_To (Indexes, New_Occurrence_Of (Indx_Typ, Loc));
-- Constrained case
else
if not Enum_Case then
Append_To (Indexes, New_Occurrence_Of (Indx_Typ, Loc));
else
Append_To (Indexes,
Make_Subtype_Indication (Loc,
Subtype_Mark =>
New_Occurrence_Of (Standard_Natural, Loc),
Constraint =>
Make_Range_Constraint (Loc,
Range_Expression =>
Make_Range (Loc,
Low_Bound =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Indx_Typ, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Indx_Typ, Loc),
Attribute_Name => Name_First))),
High_Bound =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Indx_Typ, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Indx_Typ, Loc),
Attribute_Name => Name_Last)))))));
end if;
end if;
Next_Index (Indx);
end loop;
if not Is_Constrained (Typ) then
Typedef :=
Make_Unconstrained_Array_Definition (Loc,
Subtype_Marks => Indexes,
Component_Definition =>
Make_Component_Definition (Loc,
Aliased_Present => False,
Subtype_Indication =>
New_Occurrence_Of (Ctyp, Loc)));
else
Typedef :=
Make_Constrained_Array_Definition (Loc,
Discrete_Subtype_Definitions => Indexes,
Component_Definition =>
Make_Component_Definition (Loc,
Aliased_Present => False,
Subtype_Indication =>
New_Occurrence_Of (Ctyp, Loc)));
end if;
Decl :=
Make_Full_Type_Declaration (Loc,
Defining_Identifier => PAT,
Type_Definition => Typedef);
end;
Install_PAT;
return;
-- Case of bit-packing required for unconstrained array. We create
-- a subtype that is equivalent to use Packed_Bytes{1,2,4} as needed.
elsif not Is_Constrained (Typ) then
-- When generating standard DWARF (i.e when GNAT_Encodings is
-- DWARF_GNAT_Encodings_Minimal), the ___XP suffix will be stripped
-- by the back-end but generate it anyway to ease compiler debugging.
-- This will help to distinguish implementation types from original
-- packed arrays.
PAT :=
Make_Defining_Identifier (Loc,
Chars => Make_Packed_Array_Impl_Type_Name (Typ, Csize));
Set_PB_Type;
Decl :=
Make_Subtype_Declaration (Loc,
Defining_Identifier => PAT,
Subtype_Indication => New_Occurrence_Of (PB_Type, Loc));
Install_PAT;
return;
-- Remaining code is for the case of bit-packing for constrained array
-- The name of the packed array subtype is
-- ttt___XPsss
-- where sss is the component size in bits and ttt is the name of
-- the parent packed type.
else
PAT :=
Make_Defining_Identifier (Loc,
Chars => Make_Packed_Array_Impl_Type_Name (Typ, Csize));
-- Build an expression for the length of the array in bits.
-- This is the product of the length of each of the dimensions
Len_Expr := Compute_Number_Components (Typ, Typ);
-- Temporarily attach the length expression to the tree and analyze
-- and resolve it, so that we can test its value. We assume that the
-- total length fits in type Integer. This expression may involve
-- discriminants, so we treat it as a default/per-object expression.
Set_Parent (Len_Expr, Typ);
Preanalyze_Spec_Expression (Len_Expr, Standard_Long_Long_Integer);
-- Use a modular type if possible. We can do this if we have
-- static bounds, and the length is small enough, and the length
-- is not zero. We exclude the zero length case because the size
-- of things is always at least one, and the zero length object
-- would have an anomalous size.
if Compile_Time_Known_Value (Len_Expr) then
Len_Bits := Expr_Value (Len_Expr) * Csize;
-- Check for size known to be too large
if Len_Bits >
Uint_2 ** (Standard_Integer_Size - 1) * System_Storage_Unit
then
if System_Storage_Unit = 8 then
Error_Msg_N
("packed array size cannot exceed " &
"Integer''Last bytes", Typ);
else
Error_Msg_N
("packed array size cannot exceed " &
"Integer''Last storage units", Typ);
end if;
-- Reset length to arbitrary not too high value to continue
Len_Expr := Make_Integer_Literal (Loc, 65535);
Analyze_And_Resolve (Len_Expr, Standard_Long_Long_Integer);
end if;
-- We normally consider small enough to mean no larger than the
-- value of System_Max_Binary_Modulus_Power, checking that in the
-- case of values longer than word size, we have long shifts.
if Len_Bits > 0
and then
(Len_Bits <= System_Word_Size
or else (Len_Bits <= System_Max_Binary_Modulus_Power
and then Support_Long_Shifts_On_Target))
then
-- We can use the modular type, it has the form:
-- subtype tttPn is btyp
-- range 0 .. 2 ** ((Typ'Length (1)
-- * ... * Typ'Length (n)) * Csize) - 1;
-- The bounds are statically known, and btyp is one of the
-- unsigned types, depending on the length.
if Len_Bits <= Standard_Short_Short_Integer_Size then
Btyp := RTE (RE_Short_Short_Unsigned);
elsif Len_Bits <= Standard_Short_Integer_Size then
Btyp := RTE (RE_Short_Unsigned);
elsif Len_Bits <= Standard_Integer_Size then
Btyp := RTE (RE_Unsigned);
elsif Len_Bits <= Standard_Long_Integer_Size then
Btyp := RTE (RE_Long_Unsigned);
else
Btyp := RTE (RE_Long_Long_Unsigned);
end if;
Lit := Make_Integer_Literal (Loc, 2 ** Len_Bits - 1);
Set_Print_In_Hex (Lit);
Decl :=
Make_Subtype_Declaration (Loc,
Defining_Identifier => PAT,
Subtype_Indication =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Occurrence_Of (Btyp, Loc),
Constraint =>
Make_Range_Constraint (Loc,
Range_Expression =>
Make_Range (Loc,
Low_Bound =>
Make_Integer_Literal (Loc, 0),
High_Bound => Lit))));
if PASize = Uint_0 then
PASize := Len_Bits;
end if;
Install_PAT;
-- Propagate a given alignment to the modular type. This can
-- cause it to be under-aligned, but that's OK.
if Present (Alignment_Clause (Typ)) then
Set_Alignment (PAT, Alignment (Typ));
end if;
return;
end if;
end if;
-- Could not use a modular type, for all other cases, we build
-- a packed array subtype:
-- subtype tttPn is
-- System.Packed_Bytes{1,2,4} (0 .. (Bits + 7) / 8 - 1);
-- Bits is the length of the array in bits
Set_PB_Type;
Bits_U1 :=
Make_Op_Add (Loc,
Left_Opnd =>
Make_Op_Multiply (Loc,
Left_Opnd =>
Make_Integer_Literal (Loc, Csize),
Right_Opnd => Len_Expr),
Right_Opnd =>
Make_Integer_Literal (Loc, 7));
Set_Paren_Count (Bits_U1, 1);
PAT_High :=
Make_Op_Subtract (Loc,
Left_Opnd =>
Make_Op_Divide (Loc,
Left_Opnd => Bits_U1,
Right_Opnd => Make_Integer_Literal (Loc, 8)),
Right_Opnd => Make_Integer_Literal (Loc, 1));
Decl :=
Make_Subtype_Declaration (Loc,
Defining_Identifier => PAT,
Subtype_Indication =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Occurrence_Of (PB_Type, Loc),
Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
Make_Range (Loc,
Low_Bound =>
Make_Integer_Literal (Loc, 0),
High_Bound =>
Convert_To (Standard_Integer, PAT_High))))));
Install_PAT;
-- Currently the code in this unit requires that packed arrays
-- represented by non-modular arrays of bytes be on a byte
-- boundary for bit sizes handled by System.Pack_nn units.
-- That's because these units assume the array being accessed
-- starts on a byte boundary.
if Get_Id (UI_To_Int (Csize)) /= RE_Null then
Set_Must_Be_On_Byte_Boundary (Typ);
end if;
end if;
end Create_Packed_Array_Impl_Type;
-----------------------------------
-- Expand_Bit_Packed_Element_Set --
-----------------------------------
procedure Expand_Bit_Packed_Element_Set (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Lhs : constant Node_Id := Name (N);
Ass_OK : constant Boolean := Assignment_OK (Lhs);
-- Used to preserve assignment OK status when assignment is rewritten
Rhs : Node_Id := Expression (N);
-- Initially Rhs is the right hand side value, it will be replaced
-- later by an appropriate unchecked conversion for the assignment.
Obj : Node_Id;
Atyp : Entity_Id;
PAT : Entity_Id;
Ctyp : Entity_Id;
Csiz : Int;
Cmask : Uint;
Shift : Node_Id;
-- The expression for the shift value that is required
Shift_Used : Boolean := False;
-- Set True if Shift has been used in the generated code at least once,
-- so that it must be duplicated if used again.
New_Lhs : Node_Id;
New_Rhs : Node_Id;
Rhs_Val_Known : Boolean;
Rhs_Val : Uint;
-- If the value of the right hand side as an integer constant is
-- known at compile time, Rhs_Val_Known is set True, and Rhs_Val
-- contains the value. Otherwise Rhs_Val_Known is set False, and
-- the Rhs_Val is undefined.
function Get_Shift return Node_Id;
-- Function used to get the value of Shift, making sure that it
-- gets duplicated if the function is called more than once.
---------------
-- Get_Shift --
---------------
function Get_Shift return Node_Id is
begin
-- If we used the shift value already, then duplicate it. We
-- set a temporary parent in case actions have to be inserted.
if Shift_Used then
Set_Parent (Shift, N);
return Duplicate_Subexpr_No_Checks (Shift);
-- If first time, use Shift unchanged, and set flag for first use
else
Shift_Used := True;
return Shift;
end if;
end Get_Shift;
-- Start of processing for Expand_Bit_Packed_Element_Set
begin
pragma Assert (Is_Bit_Packed_Array (Etype (Prefix (Lhs))));
Obj := Relocate_Node (Prefix (Lhs));
Convert_To_Actual_Subtype (Obj);
Atyp := Etype (Obj);
PAT := Packed_Array_Impl_Type (Atyp);
Ctyp := Component_Type (Atyp);
Csiz := UI_To_Int (Component_Size (Atyp));
-- We remove side effects, in case the rhs modifies the lhs, because we
-- are about to transform the rhs into an expression that first READS
-- the lhs, so we can do the necessary shifting and masking. Example:
-- "X(2) := F(...);" where F modifies X(3). Otherwise, the side effect
-- will be lost.
Remove_Side_Effects (Rhs);
-- We convert the right hand side to the proper subtype to ensure
-- that an appropriate range check is made (since the normal range
-- check from assignment will be lost in the transformations). This
-- conversion is analyzed immediately so that subsequent processing
-- can work with an analyzed Rhs (and e.g. look at its Etype)
-- If the right-hand side is a string literal, create a temporary for
-- it, constant-folding is not ready to wrap the bit representation
-- of a string literal.
if Nkind (Rhs) = N_String_Literal then
declare
Decl : Node_Id;
begin
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Make_Temporary (Loc, 'T', Rhs),
Object_Definition => New_Occurrence_Of (Ctyp, Loc),
Expression => New_Copy_Tree (Rhs));
Insert_Actions (N, New_List (Decl));
Rhs := New_Occurrence_Of (Defining_Identifier (Decl), Loc);
end;
end if;
Rhs := Convert_To (Ctyp, Rhs);
Set_Parent (Rhs, N);
-- If we are building the initialization procedure for a packed array,
-- and Initialize_Scalars is enabled, each component assignment is an
-- out-of-range value by design. Compile this value without checks,
-- because a call to the array init_proc must not raise an exception.
-- Condition is not consistent with description above, Within_Init_Proc
-- is True also when we are building the IP for a record or protected
-- type that has a packed array component???
if Within_Init_Proc
and then Initialize_Scalars
then
Analyze_And_Resolve (Rhs, Ctyp, Suppress => All_Checks);
else
Analyze_And_Resolve (Rhs, Ctyp);
end if;
-- Case of component size 1,2,4 or any component size for the modular
-- case. These are the cases for which we can inline the code.
if Csiz = 1 or else Csiz = 2 or else Csiz = 4
or else (Present (PAT) and then Is_Modular_Integer_Type (PAT))
then
Setup_Inline_Packed_Array_Reference (Lhs, Atyp, Obj, Cmask, Shift);
-- The statement to be generated is:
-- Obj := atyp!((Obj and Mask1) or (shift_left (rhs, Shift)))
-- or in the case of a freestanding Reverse_Storage_Order object,
-- Obj := Swap (atyp!((Swap (Obj) and Mask1)
-- or (shift_left (rhs, Shift))))
-- where Mask1 is obtained by shifting Cmask left Shift bits
-- and then complementing the result.
-- the "and Mask1" is omitted if rhs is constant and all 1 bits
-- the "or ..." is omitted if rhs is constant and all 0 bits
-- rhs is converted to the appropriate type
-- The result is converted back to the array type, since
-- otherwise we lose knowledge of the packed nature.
-- Determine if right side is all 0 bits or all 1 bits
if Compile_Time_Known_Value (Rhs) then
Rhs_Val := Expr_Rep_Value (Rhs);
Rhs_Val_Known := True;
-- The following test catches the case of an unchecked conversion of
-- an integer literal. This results from optimizing aggregates of
-- packed types.
elsif Nkind (Rhs) = N_Unchecked_Type_Conversion
and then Compile_Time_Known_Value (Expression (Rhs))
then
Rhs_Val := Expr_Rep_Value (Expression (Rhs));
Rhs_Val_Known := True;
else
Rhs_Val := No_Uint;
Rhs_Val_Known := False;
end if;
-- Some special checks for the case where the right hand value is
-- known at compile time. Basically we have to take care of the
-- implicit conversion to the subtype of the component object.
if Rhs_Val_Known then
-- If we have a biased component type then we must manually do the
-- biasing, since we are taking responsibility in this case for
-- constructing the exact bit pattern to be used.
if Has_Biased_Representation (Ctyp) then
Rhs_Val := Rhs_Val - Expr_Rep_Value (Type_Low_Bound (Ctyp));
end if;
-- For a negative value, we manually convert the two's complement
-- value to a corresponding unsigned value, so that the proper
-- field width is maintained. If we did not do this, we would
-- get too many leading sign bits later on.
if Rhs_Val < 0 then
Rhs_Val := 2 ** UI_From_Int (Csiz) + Rhs_Val;
end if;
end if;
-- Now create copies removing side effects. Note that in some complex
-- cases, this may cause the fact that we have already set a packed
-- array type on Obj to get lost. So we save the type of Obj, and
-- make sure it is reset properly.
New_Lhs := Duplicate_Subexpr (Obj, Name_Req => True);
New_Rhs := Duplicate_Subexpr_No_Checks (Obj);
-- First we deal with the "and"
if not Rhs_Val_Known or else Rhs_Val /= Cmask then
declare
Mask1 : Node_Id;
Lit : Node_Id;
begin
if Compile_Time_Known_Value (Shift) then
Mask1 :=
Make_Integer_Literal (Loc,
Modulus (Etype (Obj)) - 1 -
(Cmask * (2 ** Expr_Value (Get_Shift))));
Set_Print_In_Hex (Mask1);
else
Lit := Make_Integer_Literal (Loc, Cmask);
Set_Print_In_Hex (Lit);
Mask1 :=
Make_Op_Not (Loc,
Right_Opnd => Make_Shift_Left (Lit, Get_Shift));
end if;
New_Rhs :=
Make_Op_And (Loc,
Left_Opnd => New_Rhs,
Right_Opnd => Mask1);
end;
end if;
-- Then deal with the "or"
if not Rhs_Val_Known or else Rhs_Val /= 0 then
declare
Or_Rhs : Node_Id;
procedure Fixup_Rhs;
-- Adjust Rhs by bias if biased representation for components
-- or remove extraneous high order sign bits if signed.
procedure Fixup_Rhs is
Etyp : constant Entity_Id := Etype (Rhs);
begin
-- For biased case, do the required biasing by simply
-- converting to the biased subtype (the conversion
-- will generate the required bias).
if Has_Biased_Representation (Ctyp) then
Rhs := Convert_To (Ctyp, Rhs);
-- For a signed integer type that is not biased, generate
-- a conversion to unsigned to strip high order sign bits.
elsif Is_Signed_Integer_Type (Ctyp) then
Rhs := Unchecked_Convert_To (RTE (Bits_Id (Csiz)), Rhs);
end if;
-- Set Etype, since it can be referenced before the node is
-- completely analyzed.
Set_Etype (Rhs, Etyp);
-- We now need to do an unchecked conversion of the
-- result to the target type, but it is important that
-- this conversion be a right justified conversion and
-- not a left justified conversion.
Rhs := RJ_Unchecked_Convert_To (Etype (Obj), Rhs);
end Fixup_Rhs;
begin
if Rhs_Val_Known
and then Compile_Time_Known_Value (Get_Shift)
then
Or_Rhs :=
Make_Integer_Literal (Loc,
Rhs_Val * (2 ** Expr_Value (Get_Shift)));
Set_Print_In_Hex (Or_Rhs);
else
-- We have to convert the right hand side to Etype (Obj).
-- A special case arises if what we have now is a Val
-- attribute reference whose expression type is Etype (Obj).
-- This happens for assignments of fields from the same
-- array. In this case we get the required right hand side
-- by simply removing the inner attribute reference.
if Nkind (Rhs) = N_Attribute_Reference
and then Attribute_Name (Rhs) = Name_Val
and then Etype (First (Expressions (Rhs))) = Etype (Obj)
then
Rhs := Relocate_Node (First (Expressions (Rhs)));
Fixup_Rhs;
-- If the value of the right hand side is a known integer
-- value, then just replace it by an untyped constant,
-- which will be properly retyped when we analyze and
-- resolve the expression.
elsif Rhs_Val_Known then
-- Note that Rhs_Val has already been normalized to
-- be an unsigned value with the proper number of bits.
Rhs := Make_Integer_Literal (Loc, Rhs_Val);
-- Otherwise we need an unchecked conversion
else
Fixup_Rhs;
end if;
Or_Rhs := Make_Shift_Left (Rhs, Get_Shift);
end if;
if Nkind (New_Rhs) = N_Op_And then
Set_Paren_Count (New_Rhs, 1);
Set_Etype (New_Rhs, Etype (Left_Opnd (New_Rhs)));
end if;
New_Rhs :=
Make_Op_Or (Loc,
Left_Opnd => New_Rhs,
Right_Opnd => Or_Rhs);
end;
end if;
-- Now do the rewrite
Rewrite (N,
Make_Assignment_Statement (Loc,
Name => New_Lhs,
Expression =>
Unchecked_Convert_To (Etype (New_Lhs), New_Rhs)));
Set_Assignment_OK (Name (N), Ass_OK);
-- All other component sizes for non-modular case
else
-- We generate
-- Set_nn (Arr'address, Subscr, Bits_nn!(Rhs))
-- where Subscr is the computed linear subscript
declare
Bits_nn : constant Entity_Id := RTE (Bits_Id (Csiz));
Set_nn : Entity_Id;
Subscr : Node_Id;
Atyp : Entity_Id;
Rev_SSO : Node_Id;
begin
if No (Bits_nn) then
-- Error, most likely High_Integrity_Mode restriction
return;
end if;
-- Acquire proper Set entity. We use the aligned or unaligned
-- case as appropriate.
if Known_Aligned_Enough (Obj, Csiz) then
Set_nn := RTE (Set_Id (Csiz));
else
Set_nn := RTE (SetU_Id (Csiz));
end if;
-- Now generate the set reference
Obj := Relocate_Node (Prefix (Lhs));
Convert_To_Actual_Subtype (Obj);
Atyp := Etype (Obj);
Compute_Linear_Subscript (Atyp, Lhs, Subscr);
-- Set indication of whether the packed array has reverse SSO
Rev_SSO :=
New_Occurrence_Of
(Boolean_Literals (Reverse_Storage_Order (Atyp)), Loc);
-- Below we must make the assumption that Obj is
-- at least byte aligned, since otherwise its address
-- cannot be taken. The assumption holds since the
-- only arrays that can be misaligned are small packed
-- arrays which are implemented as a modular type, and
-- that is not the case here.
Rewrite (N,
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Set_nn, Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => Obj,
Attribute_Name => Name_Address),
Subscr,
Unchecked_Convert_To (Bits_nn, Convert_To (Ctyp, Rhs)),
Rev_SSO)));
end;
end if;
Analyze (N, Suppress => All_Checks);
end Expand_Bit_Packed_Element_Set;
-------------------------------------
-- Expand_Packed_Address_Reference --
-------------------------------------
procedure Expand_Packed_Address_Reference (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Base : Node_Id;
Offset : Node_Id;
begin
-- We build an expression that has the form
-- outer_object'Address
-- + (linear-subscript * component_size for each array reference
-- + field'Bit_Position for each record field
-- + ...
-- + ...) / Storage_Unit;
Get_Base_And_Bit_Offset (Prefix (N), Base, Offset);
Rewrite (N,
Unchecked_Convert_To (RTE (RE_Address),
Make_Op_Add (Loc,
Left_Opnd =>
Unchecked_Convert_To (RTE (RE_Integer_Address),
Make_Attribute_Reference (Loc,
Prefix => Base,
Attribute_Name => Name_Address)),
Right_Opnd =>
Unchecked_Convert_To (RTE (RE_Integer_Address),
Make_Op_Divide (Loc,
Left_Opnd => Offset,
Right_Opnd =>
Make_Integer_Literal (Loc, System_Storage_Unit))))));
Analyze_And_Resolve (N, RTE (RE_Address));
end Expand_Packed_Address_Reference;
---------------------------------
-- Expand_Packed_Bit_Reference --
---------------------------------
procedure Expand_Packed_Bit_Reference (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Base : Node_Id;
Offset : Node_Id;
begin
-- We build an expression that has the form
-- (linear-subscript * component_size for each array reference
-- + field'Bit_Position for each record field
-- + ...
-- + ...) mod Storage_Unit;
Get_Base_And_Bit_Offset (Prefix (N), Base, Offset);
Rewrite (N,
Unchecked_Convert_To (Universal_Integer,
Make_Op_Mod (Loc,
Left_Opnd => Offset,
Right_Opnd => Make_Integer_Literal (Loc, System_Storage_Unit))));
Analyze_And_Resolve (N, Universal_Integer);
end Expand_Packed_Bit_Reference;
------------------------------------
-- Expand_Packed_Boolean_Operator --
------------------------------------
-- This routine expands "a op b" for the packed cases
procedure Expand_Packed_Boolean_Operator (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (N);
L : constant Node_Id := Relocate_Node (Left_Opnd (N));
R : constant Node_Id := Relocate_Node (Right_Opnd (N));
Ltyp : Entity_Id;
Rtyp : Entity_Id;
PAT : Entity_Id;
begin
Convert_To_Actual_Subtype (L);
Convert_To_Actual_Subtype (R);
Ensure_Defined (Etype (L), N);
Ensure_Defined (Etype (R), N);
Apply_Length_Check (R, Etype (L));
Ltyp := Etype (L);
Rtyp := Etype (R);
-- Deal with silly case of XOR where the subcomponent has a range
-- True .. True where an exception must be raised.
if Nkind (N) = N_Op_Xor then
Silly_Boolean_Array_Xor_Test (N, Rtyp);
end if;
-- Now that that silliness is taken care of, get packed array type
Convert_To_PAT_Type (L);
Convert_To_PAT_Type (R);
PAT := Etype (L);
-- For the modular case, we expand a op b into
-- rtyp!(pat!(a) op pat!(b))
-- where rtyp is the Etype of the left operand. Note that we do not
-- convert to the base type, since this would be unconstrained, and
-- hence not have a corresponding packed array type set.
-- Note that both operands must be modular for this code to be used
if Is_Modular_Integer_Type (PAT)
and then
Is_Modular_Integer_Type (Etype (R))
then
declare
P : Node_Id;
begin
if Nkind (N) = N_Op_And then
P := Make_Op_And (Loc, L, R);
elsif Nkind (N) = N_Op_Or then
P := Make_Op_Or (Loc, L, R);
else -- Nkind (N) = N_Op_Xor
P := Make_Op_Xor (Loc, L, R);
end if;
Rewrite (N, Unchecked_Convert_To (Ltyp, P));
end;
-- For the array case, we insert the actions
-- Result : Ltype;
-- System.Bit_Ops.Bit_And/Or/Xor
-- (Left'Address,
-- Ltype'Length * Ltype'Component_Size;
-- Right'Address,
-- Rtype'Length * Rtype'Component_Size
-- Result'Address);
-- where Left and Right are the Packed_Bytes{1,2,4} operands and
-- the second argument and fourth arguments are the lengths of the
-- operands in bits. Then we replace the expression by a reference
-- to Result.
-- Note that if we are mixing a modular and array operand, everything
-- works fine, since we ensure that the modular representation has the
-- same physical layout as the array representation (that's what the
-- left justified modular stuff in the big-endian case is about).
else
declare
Result_Ent : constant Entity_Id := Make_Temporary (Loc, 'T');
E_Id : RE_Id;
begin
if Nkind (N) = N_Op_And then
E_Id := RE_Bit_And;
elsif Nkind (N) = N_Op_Or then
E_Id := RE_Bit_Or;
else -- Nkind (N) = N_Op_Xor
E_Id := RE_Bit_Xor;
end if;
Insert_Actions (N, New_List (
Make_Object_Declaration (Loc,
Defining_Identifier => Result_Ent,
Object_Definition => New_Occurrence_Of (Ltyp, Loc)),
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (RTE (E_Id), Loc),
Parameter_Associations => New_List (
Make_Byte_Aligned_Attribute_Reference (Loc,
Prefix => L,
Attribute_Name => Name_Address),
Make_Op_Multiply (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of
(Etype (First_Index (Ltyp)), Loc),
Attribute_Name => Name_Range_Length),
Right_Opnd =>
Make_Integer_Literal (Loc, Component_Size (Ltyp))),
Make_Byte_Aligned_Attribute_Reference (Loc,
Prefix => R,
Attribute_Name => Name_Address),
Make_Op_Multiply (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of
(Etype (First_Index (Rtyp)), Loc),
Attribute_Name => Name_Range_Length),
Right_Opnd =>
Make_Integer_Literal (Loc, Component_Size (Rtyp))),
Make_Byte_Aligned_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Result_Ent, Loc),
Attribute_Name => Name_Address)))));
Rewrite (N,
New_Occurrence_Of (Result_Ent, Loc));
end;
end if;
Analyze_And_Resolve (N, Typ, Suppress => All_Checks);
end Expand_Packed_Boolean_Operator;
-------------------------------------
-- Expand_Packed_Element_Reference --
-------------------------------------
procedure Expand_Packed_Element_Reference (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Obj : Node_Id;
Atyp : Entity_Id;
PAT : Entity_Id;
Ctyp : Entity_Id;
Csiz : Int;
Shift : Node_Id;
Cmask : Uint;
Lit : Node_Id;
Arg : Node_Id;
begin
-- If the node is an actual in a call, the prefix has not been fully
-- expanded, to account for the additional expansion for in-out actuals
-- (see expand_actuals for details). If the prefix itself is a packed
-- reference as well, we have to recurse to complete the transformation
-- of the prefix.
if Nkind (Prefix (N)) = N_Indexed_Component
and then not Analyzed (Prefix (N))
and then Is_Bit_Packed_Array (Etype (Prefix (Prefix (N))))
then
Expand_Packed_Element_Reference (Prefix (N));
end if;
-- The prefix may be rewritten below as a conversion. If it is a source
-- entity generate reference to it now, to prevent spurious warnings
-- about unused entities.
if Is_Entity_Name (Prefix (N))
and then Comes_From_Source (Prefix (N))
then
Generate_Reference (Entity (Prefix (N)), Prefix (N), 'r');
end if;
-- If not bit packed, we have the enumeration case, which is easily
-- dealt with (just adjust the subscripts of the indexed component)
-- Note: this leaves the result as an indexed component, which is
-- still a variable, so can be used in the assignment case, as is
-- required in the enumeration case.
if not Is_Bit_Packed_Array (Etype (Prefix (N))) then
Setup_Enumeration_Packed_Array_Reference (N);
return;
end if;
-- Remaining processing is for the bit-packed case
Obj := Relocate_Node (Prefix (N));
Convert_To_Actual_Subtype (Obj);
Atyp := Etype (Obj);
PAT := Packed_Array_Impl_Type (Atyp);
Ctyp := Component_Type (Atyp);
Csiz := UI_To_Int (Component_Size (Atyp));
-- Case of component size 1,2,4 or any component size for the modular
-- case. These are the cases for which we can inline the code.
if Csiz = 1 or else Csiz = 2 or else Csiz = 4
or else (Present (PAT) and then Is_Modular_Integer_Type (PAT))
then
Setup_Inline_Packed_Array_Reference (N, Atyp, Obj, Cmask, Shift);
Lit := Make_Integer_Literal (Loc, Cmask);
Set_Print_In_Hex (Lit);
-- We generate a shift right to position the field, followed by a
-- masking operation to extract the bit field, and we finally do an
-- unchecked conversion to convert the result to the required target.
-- Note that the unchecked conversion automatically deals with the
-- bias if we are dealing with a biased representation. What will
-- happen is that we temporarily generate the biased representation,
-- but almost immediately that will be converted to the original
-- unbiased component type, and the bias will disappear.
Arg :=
Make_Op_And (Loc,
Left_Opnd => Make_Shift_Right (Obj, Shift),
Right_Opnd => Lit);
Set_Etype (Arg, Ctyp);
-- Component extraction is performed on a native endianness scalar
-- value: if Atyp has reverse storage order, then it has been byte
-- swapped, and if the component being extracted is itself of a
-- composite type with reverse storage order, then we need to swap
-- it back to its expected endianness after extraction.
if Reverse_Storage_Order (Atyp)
and then (Is_Record_Type (Ctyp) or else Is_Array_Type (Ctyp))
and then Reverse_Storage_Order (Ctyp)
then
Arg := Revert_Storage_Order (Arg);
end if;
-- We needed to analyze this before we do the unchecked convert
-- below, but we need it temporarily attached to the tree for
-- this analysis (hence the temporary Set_Parent call).
Set_Parent (Arg, Parent (N));
Analyze_And_Resolve (Arg);
Rewrite (N, RJ_Unchecked_Convert_To (Ctyp, Arg));
-- All other component sizes for non-modular case
else
-- We generate
-- Component_Type!(Get_nn (Arr'address, Subscr))
-- where Subscr is the computed linear subscript
declare
Get_nn : Entity_Id;
Subscr : Node_Id;
Rev_SSO : constant Node_Id :=
New_Occurrence_Of
(Boolean_Literals (Reverse_Storage_Order (Atyp)), Loc);
begin
-- Acquire proper Get entity. We use the aligned or unaligned
-- case as appropriate.
if Known_Aligned_Enough (Obj, Csiz) then
Get_nn := RTE (Get_Id (Csiz));
else
Get_nn := RTE (GetU_Id (Csiz));
end if;
-- Now generate the get reference
Compute_Linear_Subscript (Atyp, N, Subscr);
-- Below we make the assumption that Obj is at least byte
-- aligned, since otherwise its address cannot be taken.
-- The assumption holds since the only arrays that can be
-- misaligned are small packed arrays which are implemented
-- as a modular type, and that is not the case here.
Rewrite (N,
Unchecked_Convert_To (Ctyp,
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Get_nn, Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => Obj,
Attribute_Name => Name_Address),
Subscr,
Rev_SSO))));
end;
end if;
Analyze_And_Resolve (N, Ctyp, Suppress => All_Checks);
end Expand_Packed_Element_Reference;
----------------------
-- Expand_Packed_Eq --
----------------------
-- Handles expansion of "=" on packed array types
procedure Expand_Packed_Eq (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
L : constant Node_Id := Relocate_Node (Left_Opnd (N));
R : constant Node_Id := Relocate_Node (Right_Opnd (N));
LLexpr : Node_Id;
RLexpr : Node_Id;
Ltyp : Entity_Id;
Rtyp : Entity_Id;
PAT : Entity_Id;
begin
Convert_To_Actual_Subtype (L);
Convert_To_Actual_Subtype (R);
Ltyp := Underlying_Type (Etype (L));
Rtyp := Underlying_Type (Etype (R));
Convert_To_PAT_Type (L);
Convert_To_PAT_Type (R);
PAT := Etype (L);
LLexpr :=
Make_Op_Multiply (Loc,
Left_Opnd => Compute_Number_Components (N, Ltyp),
Right_Opnd => Make_Integer_Literal (Loc, Component_Size (Ltyp)));
RLexpr :=
Make_Op_Multiply (Loc,
Left_Opnd => Compute_Number_Components (N, Rtyp),
Right_Opnd => Make_Integer_Literal (Loc, Component_Size (Rtyp)));
-- For the modular case, we transform the comparison to:
-- Ltyp'Length = Rtyp'Length and then PAT!(L) = PAT!(R)
-- where PAT is the packed array type. This works fine, since in the
-- modular case we guarantee that the unused bits are always zeroes.
-- We do have to compare the lengths because we could be comparing
-- two different subtypes of the same base type.
if Is_Modular_Integer_Type (PAT) then
Rewrite (N,
Make_And_Then (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd => LLexpr,
Right_Opnd => RLexpr),
Right_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd => L,
Right_Opnd => R)));
-- For the non-modular case, we call a runtime routine
-- System.Bit_Ops.Bit_Eq
-- (L'Address, L_Length, R'Address, R_Length)
-- where PAT is the packed array type, and the lengths are the lengths
-- in bits of the original packed arrays. This routine takes care of
-- not comparing the unused bits in the last byte.
else
Rewrite (N,
Make_Function_Call (Loc,
Name => New_Occurrence_Of (RTE (RE_Bit_Eq), Loc),
Parameter_Associations => New_List (
Make_Byte_Aligned_Attribute_Reference (Loc,
Prefix => L,
Attribute_Name => Name_Address),
LLexpr,
Make_Byte_Aligned_Attribute_Reference (Loc,
Prefix => R,
Attribute_Name => Name_Address),
RLexpr)));
end if;
Analyze_And_Resolve (N, Standard_Boolean, Suppress => All_Checks);
end Expand_Packed_Eq;
-----------------------
-- Expand_Packed_Not --
-----------------------
-- Handles expansion of "not" on packed array types
procedure Expand_Packed_Not (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (N);
Opnd : constant Node_Id := Relocate_Node (Right_Opnd (N));
Rtyp : Entity_Id;
PAT : Entity_Id;
Lit : Node_Id;
begin
Convert_To_Actual_Subtype (Opnd);
Rtyp := Etype (Opnd);
-- Deal with silly False..False and True..True subtype case
Silly_Boolean_Array_Not_Test (N, Rtyp);
-- Now that the silliness is taken care of, get packed array type
Convert_To_PAT_Type (Opnd);
PAT := Etype (Opnd);
-- For the case where the packed array type is a modular type, "not A"
-- expands simply into:
-- Rtyp!(PAT!(A) xor Mask)
-- where PAT is the packed array type, Mask is a mask of all 1 bits of
-- length equal to the size of this packed type, and Rtyp is the actual
-- actual subtype of the operand.
Lit := Make_Integer_Literal (Loc, 2 ** RM_Size (PAT) - 1);
Set_Print_In_Hex (Lit);
if not Is_Array_Type (PAT) then
Rewrite (N,
Unchecked_Convert_To (Rtyp,
Make_Op_Xor (Loc,
Left_Opnd => Opnd,
Right_Opnd => Lit)));
-- For the array case, we insert the actions
-- Result : Typ;
-- System.Bit_Ops.Bit_Not
-- (Opnd'Address,
-- Typ'Length * Typ'Component_Size,
-- Result'Address);
-- where Opnd is the Packed_Bytes{1,2,4} operand and the second argument
-- is the length of the operand in bits. We then replace the expression
-- with a reference to Result.
else
declare
Result_Ent : constant Entity_Id := Make_Temporary (Loc, 'T');
begin
Insert_Actions (N, New_List (
Make_Object_Declaration (Loc,
Defining_Identifier => Result_Ent,
Object_Definition => New_Occurrence_Of (Rtyp, Loc)),
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (RTE (RE_Bit_Not), Loc),
Parameter_Associations => New_List (
Make_Byte_Aligned_Attribute_Reference (Loc,
Prefix => Opnd,
Attribute_Name => Name_Address),
Make_Op_Multiply (Loc,
Left_Opnd =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of
(Etype (First_Index (Rtyp)), Loc),
Attribute_Name => Name_Range_Length),
Right_Opnd =>
Make_Integer_Literal (Loc, Component_Size (Rtyp))),
Make_Byte_Aligned_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Result_Ent, Loc),
Attribute_Name => Name_Address)))));
Rewrite (N, New_Occurrence_Of (Result_Ent, Loc));
end;
end if;
Analyze_And_Resolve (N, Typ, Suppress => All_Checks);
end Expand_Packed_Not;
-----------------------------
-- Get_Base_And_Bit_Offset --
-----------------------------
procedure Get_Base_And_Bit_Offset
(N : Node_Id;
Base : out Node_Id;
Offset : out Node_Id)
is
Loc : Source_Ptr;
Term : Node_Id;
Atyp : Entity_Id;
Subscr : Node_Id;
begin
Base := N;
Offset := Empty;
-- We build up an expression serially that has the form
-- linear-subscript * component_size for each array reference
-- + field'Bit_Position for each record field
-- + ...
loop
Loc := Sloc (Base);
if Nkind (Base) = N_Indexed_Component then
Convert_To_Actual_Subtype (Prefix (Base));
Atyp := Etype (Prefix (Base));
Compute_Linear_Subscript (Atyp, Base, Subscr);
Term :=
Make_Op_Multiply (Loc,
Left_Opnd => Subscr,
Right_Opnd =>
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Atyp, Loc),
Attribute_Name => Name_Component_Size));
elsif Nkind (Base) = N_Selected_Component then
Term :=
Make_Attribute_Reference (Loc,
Prefix => Selector_Name (Base),
Attribute_Name => Name_Bit_Position);
else
return;
end if;
if No (Offset) then
Offset := Term;
else
Offset :=
Make_Op_Add (Loc,
Left_Opnd => Offset,
Right_Opnd => Term);
end if;
Base := Prefix (Base);
end loop;
end Get_Base_And_Bit_Offset;
-------------------------------------
-- Involves_Packed_Array_Reference --
-------------------------------------
function Involves_Packed_Array_Reference (N : Node_Id) return Boolean is
begin
if Nkind (N) = N_Indexed_Component
and then Is_Bit_Packed_Array (Etype (Prefix (N)))
then
return True;
elsif Nkind (N) = N_Selected_Component then
return Involves_Packed_Array_Reference (Prefix (N));
else
return False;
end if;
end Involves_Packed_Array_Reference;
--------------------------
-- Known_Aligned_Enough --
--------------------------
function Known_Aligned_Enough (Obj : Node_Id; Csiz : Nat) return Boolean is
Typ : constant Entity_Id := Etype (Obj);
function In_Partially_Packed_Record (Comp : Entity_Id) return Boolean;
-- If the component is in a record that contains previous packed
-- components, consider it unaligned because the back-end might
-- choose to pack the rest of the record. Lead to less efficient code,
-- but safer vis-a-vis of back-end choices.
--------------------------------
-- In_Partially_Packed_Record --
--------------------------------
function In_Partially_Packed_Record (Comp : Entity_Id) return Boolean is
Rec_Type : constant Entity_Id := Scope (Comp);
Prev_Comp : Entity_Id;
begin
Prev_Comp := First_Entity (Rec_Type);
while Present (Prev_Comp) loop
if Is_Packed (Etype (Prev_Comp)) then
return True;
elsif Prev_Comp = Comp then
return False;
end if;
Next_Entity (Prev_Comp);
end loop;
return False;
end In_Partially_Packed_Record;
-- Start of processing for Known_Aligned_Enough
begin
-- Odd bit sizes don't need alignment anyway
if Csiz mod 2 = 1 then
return True;
-- If we have a specified alignment, see if it is sufficient, if not
-- then we can't possibly be aligned enough in any case.
elsif Known_Alignment (Etype (Obj)) then
-- Alignment required is 4 if size is a multiple of 4, and
-- 2 otherwise (e.g. 12 bits requires 4, 10 bits requires 2)
if Alignment (Etype (Obj)) < 4 - (Csiz mod 4) then
return False;
end if;
end if;
-- OK, alignment should be sufficient, if object is aligned
-- If object is strictly aligned, then it is definitely aligned
if Strict_Alignment (Typ) then
return True;
-- Case of subscripted array reference
elsif Nkind (Obj) = N_Indexed_Component then
-- If we have a pointer to an array, then this is definitely
-- aligned, because pointers always point to aligned versions.
if Is_Access_Type (Etype (Prefix (Obj))) then
return True;
-- Otherwise, go look at the prefix
else
return Known_Aligned_Enough (Prefix (Obj), Csiz);
end if;
-- Case of record field
elsif Nkind (Obj) = N_Selected_Component then
-- What is significant here is whether the record type is packed
if Is_Record_Type (Etype (Prefix (Obj)))
and then Is_Packed (Etype (Prefix (Obj)))
then
return False;
-- Or the component has a component clause which might cause
-- the component to become unaligned (we can't tell if the
-- backend is doing alignment computations).
elsif Present (Component_Clause (Entity (Selector_Name (Obj)))) then
return False;
elsif In_Partially_Packed_Record (Entity (Selector_Name (Obj))) then
return False;
-- In all other cases, go look at prefix
else
return Known_Aligned_Enough (Prefix (Obj), Csiz);
end if;
elsif Nkind (Obj) = N_Type_Conversion then
return Known_Aligned_Enough (Expression (Obj), Csiz);
-- For a formal parameter, it is safer to assume that it is not
-- aligned, because the formal may be unconstrained while the actual
-- is constrained. In this situation, a small constrained packed
-- array, represented in modular form, may be unaligned.
elsif Is_Entity_Name (Obj) then
return not Is_Formal (Entity (Obj));
else
-- If none of the above, must be aligned
return True;
end if;
end Known_Aligned_Enough;
---------------------
-- Make_Shift_Left --
---------------------
function Make_Shift_Left (N : Node_Id; S : Node_Id) return Node_Id is
Nod : Node_Id;
begin
if Compile_Time_Known_Value (S) and then Expr_Value (S) = 0 then
return N;
else
Nod :=
Make_Op_Shift_Left (Sloc (N),
Left_Opnd => N,
Right_Opnd => S);
Set_Shift_Count_OK (Nod, True);
return Nod;
end if;
end Make_Shift_Left;
----------------------
-- Make_Shift_Right --
----------------------
function Make_Shift_Right (N : Node_Id; S : Node_Id) return Node_Id is
Nod : Node_Id;
begin
if Compile_Time_Known_Value (S) and then Expr_Value (S) = 0 then
return N;
else
Nod :=
Make_Op_Shift_Right (Sloc (N),
Left_Opnd => N,
Right_Opnd => S);
Set_Shift_Count_OK (Nod, True);
return Nod;
end if;
end Make_Shift_Right;
-----------------------------
-- RJ_Unchecked_Convert_To --
-----------------------------
function RJ_Unchecked_Convert_To
(Typ : Entity_Id;
Expr : Node_Id) return Node_Id
is
Source_Typ : constant Entity_Id := Etype (Expr);
Target_Typ : constant Entity_Id := Typ;
Src : Node_Id := Expr;
Source_Siz : Nat;
Target_Siz : Nat;
begin
Source_Siz := UI_To_Int (RM_Size (Source_Typ));
Target_Siz := UI_To_Int (RM_Size (Target_Typ));
-- For a little-endian target type stored byte-swapped on a
-- big-endian machine, do not mask to Target_Siz bits.
if Bytes_Big_Endian
and then (Is_Record_Type (Target_Typ)
or else
Is_Array_Type (Target_Typ))
and then Reverse_Storage_Order (Target_Typ)
then
Source_Siz := Target_Siz;
end if;
-- First step, if the source type is not a discrete type, then we first
-- convert to a modular type of the source length, since otherwise, on
-- a big-endian machine, we get left-justification. We do it for little-
-- endian machines as well, because there might be junk bits that are
-- not cleared if the type is not numeric. This can be done only if the
-- source siz is different from 0 (i.e. known), otherwise we must trust
-- the type declarations (case of non-discrete components).
if Source_Siz /= 0
and then Source_Siz /= Target_Siz
and then not Is_Discrete_Type (Source_Typ)
then
Src := Unchecked_Convert_To (RTE (Bits_Id (Source_Siz)), Src);
end if;
-- In the big endian case, if the lengths of the two types differ, then
-- we must worry about possible left justification in the conversion,
-- and avoiding that is what this is all about.
if Bytes_Big_Endian and then Source_Siz /= Target_Siz then
-- Next step. If the target is not a discrete type, then we first
-- convert to a modular type of the target length, since otherwise,
-- on a big-endian machine, we get left-justification.
if not Is_Discrete_Type (Target_Typ) then
Src := Unchecked_Convert_To (RTE (Bits_Id (Target_Siz)), Src);
end if;
end if;
-- And now we can do the final conversion to the target type
return Unchecked_Convert_To (Target_Typ, Src);
end RJ_Unchecked_Convert_To;
----------------------------------------------
-- Setup_Enumeration_Packed_Array_Reference --
----------------------------------------------
-- All we have to do here is to find the subscripts that correspond to the
-- index positions that have non-standard enumeration types and insert a
-- Pos attribute to get the proper subscript value.
-- Finally the prefix must be uncheck-converted to the corresponding packed
-- array type.
-- Note that the component type is unchanged, so we do not need to fiddle
-- with the types (Gigi always automatically takes the packed array type if
-- it is set, as it will be in this case).
procedure Setup_Enumeration_Packed_Array_Reference (N : Node_Id) is
Pfx : constant Node_Id := Prefix (N);
Typ : constant Entity_Id := Etype (N);
Exprs : constant List_Id := Expressions (N);
Expr : Node_Id;
begin
-- If the array is unconstrained, then we replace the array reference
-- with its actual subtype. This actual subtype will have a packed array
-- type with appropriate bounds.
if not Is_Constrained (Packed_Array_Impl_Type (Etype (Pfx))) then
Convert_To_Actual_Subtype (Pfx);
end if;
Expr := First (Exprs);
while Present (Expr) loop
declare
Loc : constant Source_Ptr := Sloc (Expr);
Expr_Typ : constant Entity_Id := Etype (Expr);
begin
if Is_Enumeration_Type (Expr_Typ)
and then Has_Non_Standard_Rep (Expr_Typ)
then
Rewrite (Expr,
Make_Attribute_Reference (Loc,
Prefix => New_Occurrence_Of (Expr_Typ, Loc),
Attribute_Name => Name_Pos,
Expressions => New_List (Relocate_Node (Expr))));
Analyze_And_Resolve (Expr, Standard_Natural);
end if;
end;
Next (Expr);
end loop;
Rewrite (N,
Make_Indexed_Component (Sloc (N),
Prefix =>
Unchecked_Convert_To (Packed_Array_Impl_Type (Etype (Pfx)), Pfx),
Expressions => Exprs));
Analyze_And_Resolve (N, Typ);
end Setup_Enumeration_Packed_Array_Reference;
-----------------------------------------
-- Setup_Inline_Packed_Array_Reference --
-----------------------------------------
procedure Setup_Inline_Packed_Array_Reference
(N : Node_Id;
Atyp : Entity_Id;
Obj : in out Node_Id;
Cmask : out Uint;
Shift : out Node_Id)
is
Loc : constant Source_Ptr := Sloc (N);
PAT : Entity_Id;
Otyp : Entity_Id;
Csiz : Uint;
Osiz : Uint;
begin
Csiz := Component_Size (Atyp);
Convert_To_PAT_Type (Obj);
PAT := Etype (Obj);
Cmask := 2 ** Csiz - 1;
if Is_Array_Type (PAT) then
Otyp := Component_Type (PAT);
Osiz := Component_Size (PAT);
else
Otyp := PAT;
-- In the case where the PAT is a modular type, we want the actual
-- size in bits of the modular value we use. This is neither the
-- Object_Size nor the Value_Size, either of which may have been
-- reset to strange values, but rather the minimum size. Note that
-- since this is a modular type with full range, the issue of
-- biased representation does not arise.
Osiz := UI_From_Int (Minimum_Size (Otyp));
end if;
Compute_Linear_Subscript (Atyp, N, Shift);
-- If the component size is not 1, then the subscript must be multiplied
-- by the component size to get the shift count.
if Csiz /= 1 then
Shift :=
Make_Op_Multiply (Loc,
Left_Opnd => Make_Integer_Literal (Loc, Csiz),
Right_Opnd => Shift);
end if;
-- If we have the array case, then this shift count must be broken down
-- into a byte subscript, and a shift within the byte.
if Is_Array_Type (PAT) then
declare
New_Shift : Node_Id;
begin
-- We must analyze shift, since we will duplicate it
Set_Parent (Shift, N);
Analyze_And_Resolve
(Shift, Standard_Integer, Suppress => All_Checks);
-- The shift count within the word is
-- shift mod Osiz
New_Shift :=
Make_Op_Mod (Loc,
Left_Opnd => Duplicate_Subexpr (Shift),
Right_Opnd => Make_Integer_Literal (Loc, Osiz));
-- The subscript to be used on the PAT array is
-- shift / Osiz
Obj :=
Make_Indexed_Component (Loc,
Prefix => Obj,
Expressions => New_List (
Make_Op_Divide (Loc,
Left_Opnd => Duplicate_Subexpr (Shift),
Right_Opnd => Make_Integer_Literal (Loc, Osiz))));
Shift := New_Shift;
end;
-- For the modular integer case, the object to be manipulated is the
-- entire array, so Obj is unchanged. Note that we will reset its type
-- to PAT before returning to the caller.
else
null;
end if;
-- The one remaining step is to modify the shift count for the
-- big-endian case. Consider the following example in a byte:
-- xxxxxxxx bits of byte
-- vvvvvvvv bits of value
-- 33221100 little-endian numbering
-- 00112233 big-endian numbering
-- Here we have the case of 2-bit fields
-- For the little-endian case, we already have the proper shift count
-- set, e.g. for element 2, the shift count is 2*2 = 4.
-- For the big endian case, we have to adjust the shift count, computing
-- it as (N - F) - Shift, where N is the number of bits in an element of
-- the array used to implement the packed array, F is the number of bits
-- in a source array element, and Shift is the count so far computed.
-- We also have to adjust if the storage order is reversed
if Bytes_Big_Endian xor Reverse_Storage_Order (Base_Type (Atyp)) then
Shift :=
Make_Op_Subtract (Loc,
Left_Opnd => Make_Integer_Literal (Loc, Osiz - Csiz),
Right_Opnd => Shift);
end if;
Set_Parent (Shift, N);
Set_Parent (Obj, N);
Analyze_And_Resolve (Obj, Otyp, Suppress => All_Checks);
Analyze_And_Resolve (Shift, Standard_Integer, Suppress => All_Checks);
-- Make sure final type of object is the appropriate packed type
Set_Etype (Obj, Otyp);
end Setup_Inline_Packed_Array_Reference;
end Exp_Pakd;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . P A R A M E T E R S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2020, AdaCore --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- 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/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
-- The port of GNARL to bare board targets was initially developed by the --
-- Real-Time Systems Group at the Technical University of Madrid. --
-- --
------------------------------------------------------------------------------
-- This package defines basic parameters used by the low level tasking system
-- This is the TMS570 (ARMv7) version of this package
with System.Board_Parameters;
package System.BB.Parameters is
pragma No_Elaboration_Code_All;
pragma Pure;
--------------------
-- Hardware clock --
--------------------
-- see system_tms570ls31.c for clock setup
Clock_Frequency : constant := System.Board_Parameters.Clock_Frequency;
-- GCLK clock Hz: used by the Cortex-R cores
Ticks_Per_Second : constant := Clock_Frequency / 8;
-- RTICLK, with PRE1 used as source, and divider set to 2 ** 3
-- RTICLK source can come from VCLK, or from the PLL1 with a divider.
-- Here we use the latter.
-- RTICLK Value = 22 MHz.
----------------
-- Interrupts --
----------------
-- These definitions are in this package in order to isolate target
-- dependencies.
subtype Interrupt_Range is Natural range 0 .. 95;
-- Number of interrupts supported by the VIC. For the TMS570 interrupts,
-- we really only consider the 95 usable interrupt channels. The run time
-- assumes the interrupt source to interrupt channel map is direct (1:1),
-- as is the default, but the user can change this as long as the IRQ used
-- by the system for alarms stays unchanged.
Trap_Vectors : constant := 7;
-- ARM in general has these traps:
-- 0 (at 16#0000#) Reset
-- 1 (at 16#0004#) Undefined Instruction (synchronous)
-- 2 (at 16#0008#) Supervisor Call (synchronous)
-- 3 (at 16#000C#) Abort - Prefetch (synchronous)
-- 4 (at 16#0010#) Abort - Data (asynchronous)
-- 5 (at 16#0014#) IRQ Trap (asynchronous)
-- 6 (at 16#0018#) FIQ Trap (asynchronous)
Interrupt_Unmask_Priority : constant System.Interrupt_Priority :=
System.Interrupt_Priority'First;
-- The priority under which we unmask interrupts.
-- Useful when we use FIQ to simulate priorities on ARM.
------------------------
-- Context Management --
------------------------
-- The run time stores a minimal amount of state in the thread context.
-- Most state will be saved on the task's stack when calling a potentially
-- blocking operation, or on the interrupt stack when the task is pre-
-- empted. Most of the space is currently required for floating point
-- state, which is saved lazily.
-- The TMS570 processor needs to save:
-- * 6 integer registers of 32 bits (r0, r1, PC, CPSR, R12, SP)
-- for normal processing
-- * 33 floating point registers of 32 bits (s0 .. s31, FPCSR)
-- This amounts to 39 registers, rounded up to 40 for alignment.
Context_Buffer_Capacity : constant := 40;
------------
-- Stacks --
------------
Interrupt_Stack_Size : constant := 4096; -- bytes
-- Size of each of the interrupt stacks. Each processor has its own
-- set of interrupt stacks, one per interrupt priority.
Interrupt_Sec_Stack_Size : constant := 128;
-- Size of the secondary stack for interrupt handlers
----------
-- CPUS --
----------
Max_Number_Of_CPUs : constant := 1;
-- Maximum number of CPUs
Multiprocessor : constant Boolean := Max_Number_Of_CPUs /= 1;
-- Are we on a multiprocessor board?
end System.BB.Parameters;
|
-------------------------------------------------------------------------------
-- --
-- 0MQ Ada-binding --
-- --
-- Z M Q . P R O X Y S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2020-2030, per.s.sandberg@bahnhof.se --
-- --
-- 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 ZMQ.Low_Level;
with Interfaces.C; use Interfaces.C;
with System; use System;
package body ZMQ.Proxys is
--
-----------
-- Proxy --
-----------
procedure Proxy
(Frontend : not null access Sockets.Socket;
Backend : not null access Sockets.Socket;
Capture : access Sockets.Socket := null)
is
Dummy : int;
pragma Unreferenced (Dummy);
begin
Dummy := ZMQ.Low_Level.zmq_proxy
(Frontend.Get_Impl, Backend.Get_Impl,
(if Capture /= null then Capture.Get_Impl else System.Null_Address));
end Proxy;
end ZMQ.Proxys;
|
-- { dg-do run }
-- { dg-options "-gnatws" }
with Text_IO;
procedure renaming2 is
type RealNodeData;
type RefRealNodeData is access RealNodeData;
type ExpressionEntry;
type RefExpression is access ExpressionEntry;
type RefDefUseEntry is access Natural;
type ExpressionEntry is
record
Number : RefDefUseEntry;
Id : Integer;
end record;
type RealNodeData is
record
Node : RefExpression;
Id : Integer;
end record;
for ExpressionEntry use
record
Number at 0 range 0 .. 63;
Id at 8 range 0 .. 31;
end record ;
for RealNodeData use
record
Node at 0 range 0 .. 63;
Id at 8 range 0 .. 31;
end record ;
U_Node : RefDefUseEntry := new Natural'(1);
E_Node : RefExpression := new ExpressionEntry'(Number => U_Node,
Id => 2);
R_Node : RefRealNodeData := new RealNodeData'(Node => E_Node,
Id => 3);
procedure test_routine (NodeRealData : RefRealNodeData)
is
OldHead : RefDefUseEntry renames NodeRealData.all.Node.all.Number;
OldHead1 : constant RefDefUseEntry := OldHead;
begin
NodeRealData.all.Node := new ExpressionEntry'(Number => null, Id => 4);
declare
OldHead2 : constant RefDefUseEntry := OldHead;
begin
if OldHead1 /= OldHead2
then
Text_IO.Put_Line (" OldHead changed !!!");
end if;
end;
end;
begin
test_routine (R_Node);
end;
|
-- Institution: Technische Universitaet Muenchen
-- Department: Realtime Computer Systems (RCS)
-- Project: StratoX
--
-- Authors: Martin Becker (becker@rcs.ei.tum.de>
with Units;
-- @summary
-- Target-independent specification for simple HIL of Piezo Buzzer
package HIL.Buzzer with SPARK_Mode is
procedure Initialize;
procedure Enable;
procedure Disable;
function Valid_Frequency (f : Units.Frequency_Type) return Boolean is (f in 1.0 .. 1_000_000.0);
procedure Set_Frequency (Frequency : Units.Frequency_Type)
with Pre => Valid_Frequency (Frequency);
end HIL.Buzzer;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . V A L _ D E C --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992,1993,1994,1995,1996 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. --
-- --
-- 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains routines for scanning decimal values where the size
-- of the type is no greater than Standard.Integer'Size, for use in Text_IO.
-- Decimal_IO, and the Value attribute for such decimal types.
package System.Val_Dec is
pragma Pure (Val_Dec);
function Scan_Decimal
(Str : String;
Ptr : access Integer;
Max : Integer;
Scale : Integer)
return Integer;
-- This function scans the string starting at Str (Ptr.all) for a valid
-- real literal according to the syntax described in (RM 3.5(43)). The
-- substring scanned extends no further than Str (Max). There are three
-- cases for the return:
--
-- If a valid real literal is found after scanning past any initial spaces,
-- then Ptr.all is updated past the last character of the literal (but
-- trailing spaces are not scanned out). The value returned is the value
-- Integer'Integer_Value (decimal-literal-value), using the given Scale
-- to determine this value.
--
-- If no valid real literal is found, then Ptr.all points either to an
-- initial non-digit character, or to Max + 1 if the field is all spaces
-- and the exception Constraint_Error is raised.
--
-- If a syntactically valid integer is scanned, but the value is out of
-- range, or, in the based case, the base value is out of range or there
-- is an out of range digit, then Ptr.all points past the integer, and
-- Constraint_Error is raised.
--
-- Note: these rules correspond to the requirements for leaving the
-- pointer positioned in Text_Io.Get
--
-- Note: if Str is null, i.e. if Max is less than Ptr, then this is a
-- special case of an all-blank string, and Ptr is unchanged, and hence
-- is greater than Max as required in this case.
function Value_Decimal (Str : String; Scale : Integer) return Integer;
-- Used in computing X'Value (Str) where X is a decimal types whose size
-- does not exceed Standard.Integer'Size. Str is the string argument of
-- the attribute. Constraint_Error is raised if the string is malformed
-- or if the value is out of range, otherwise the value returned is the
-- value Integer'Integer_Value (decimal-literal-value), using the given
-- Scale to determine this value.
end System.Val_Dec;
|
-----------------------------------------------------------------------
-- openapi-server-operation -- Rest server operation
-- Copyright (C) 2017, 2018, 2022 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 Security.Permissions;
generic
with procedure Handler (Req : in out OpenAPI.Servers.Request'Class;
Reply : in out OpenAPI.Servers.Response'Class;
Stream : in out OpenAPI.Servers.Output_Stream'Class;
Context : in out OpenAPI.Servers.Context_Type);
Method : Method_Type := Servlet.Rest.GET;
URI : String;
Permission : Security.Permissions.Permission_Index := Security.Permissions.NONE;
package OpenAPI.Servers.Operation is
function Definition return Descriptor_Access;
end OpenAPI.Servers.Operation;
|
with Ada.Streams;
with Ada.Streams.Stream_IO;
package Generator.Markdown is
procedure To_HTML (Filein : in out Ada.Streams.Stream_IO.File_Type);
private
end Generator.Markdown;
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>rgb2gry</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>input_mat_data_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>input_mat.data.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>24</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>output_mat_data_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>output_mat.data.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>18</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>5</id>
<name></name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>128</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second class_id="11" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="12" tracking_level="0" version="0">
<first class_id="13" tracking_level="0" version="0">
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>128</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.65</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name>indvar_flatten</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>20</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>32</item>
<item>33</item>
<item>34</item>
<item>35</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>exitcond_flatten</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>36</item>
<item>38</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.07</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>9</id>
<name>indvar_flatten_next</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>20</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>39</item>
<item>41</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.89</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>10</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>42</item>
<item>43</item>
<item>44</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name>input_pixel_V</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>131</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>131</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>input_pixel.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>24</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>46</item>
<item>47</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.83</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>15</id>
<name>tmp</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>49</item>
<item>50</item>
<item>52</item>
<item>54</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>tmp_3_cast</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>8</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>17</id>
<name>tmp_2</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>56</item>
<item>57</item>
<item>59</item>
<item>61</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>18</id>
<name>tmp_4_cast</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>19</id>
<name>tmp_3</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>5</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>63</item>
<item>64</item>
<item>66</item>
<item>68</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp_5_cast</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>12</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>tmp_6</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>70</item>
<item>71</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.78</m_delay>
<m_topoIndex>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>tmp_6_cast</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>14</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>p_s</name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>73</item>
<item>74</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.78</m_delay>
<m_topoIndex>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name></name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>136</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>136</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>76</item>
<item>77</item>
<item>78</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.83</m_delay>
<m_topoIndex>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name></name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>129</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>129</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name></name>
<fileName>hls_video_block.cpp</fileName>
<fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory>
<lineNumber>139</lineNumber>
<contextFuncName>rgb2gry</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>hls_video_block.cpp</first>
<second>rgb2gry</second>
</first>
<second>139</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_21">
<Value>
<Obj>
<type>2</type>
<id>31</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>20</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_22">
<Value>
<Obj>
<type>2</type>
<id>37</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>20</bitwidth>
</Value>
<const_type>0</const_type>
<content>921600</content>
</item>
<item class_id_reference="16" object_id="_23">
<Value>
<Obj>
<type>2</type>
<id>40</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>20</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_24">
<Value>
<Obj>
<type>2</type>
<id>51</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>3</content>
</item>
<item class_id_reference="16" object_id="_25">
<Value>
<Obj>
<type>2</type>
<id>53</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>7</content>
</item>
<item class_id_reference="16" object_id="_26">
<Value>
<Obj>
<type>2</type>
<id>58</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>11</content>
</item>
<item class_id_reference="16" object_id="_27">
<Value>
<Obj>
<type>2</type>
<id>60</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>15</content>
</item>
<item class_id_reference="16" object_id="_28">
<Value>
<Obj>
<type>2</type>
<id>65</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>19</content>
</item>
<item class_id_reference="16" object_id="_29">
<Value>
<Obj>
<type>2</type>
<id>67</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>23</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_30">
<Obj>
<type>3</type>
<id>6</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>5</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_31">
<Obj>
<type>3</type>
<id>11</id>
<name>.preheader</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_32">
<Obj>
<type>3</type>
<id>27</id>
<name>.preheader.preheader</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>12</count>
<item_version>0</item_version>
<item>14</item>
<item>15</item>
<item>16</item>
<item>17</item>
<item>18</item>
<item>19</item>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
<item>24</item>
<item>26</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_33">
<Obj>
<type>3</type>
<id>29</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>37</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_34">
<id>30</id>
<edge_type>2</edge_type>
<source_obj>11</source_obj>
<sink_obj>5</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_35">
<id>32</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_36">
<id>33</id>
<edge_type>2</edge_type>
<source_obj>6</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_37">
<id>34</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_38">
<id>35</id>
<edge_type>2</edge_type>
<source_obj>27</source_obj>
<sink_obj>7</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
<item class_id_reference="20" object_id="_39">
<id>36</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>8</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_40">
<id>38</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>8</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_41">
<id>39</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>9</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_42">
<id>41</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>9</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_43">
<id>42</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>10</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_44">
<id>43</id>
<edge_type>2</edge_type>
<source_obj>27</source_obj>
<sink_obj>10</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_45">
<id>44</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>10</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_46">
<id>47</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>14</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_47">
<id>50</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_48">
<id>52</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_49">
<id>54</id>
<edge_type>1</edge_type>
<source_obj>53</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_50">
<id>55</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>16</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_51">
<id>57</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_52">
<id>59</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_53">
<id>61</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>17</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_54">
<id>62</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>18</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_55">
<id>64</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>19</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_56">
<id>66</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>19</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_57">
<id>68</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>19</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_58">
<id>69</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>20</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_59">
<id>70</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_60">
<id>71</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>21</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_61">
<id>72</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>22</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_62">
<id>73</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_63">
<id>74</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>23</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_64">
<id>77</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_65">
<id>78</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>24</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_66">
<id>79</id>
<edge_type>2</edge_type>
<source_obj>11</source_obj>
<sink_obj>26</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_67">
<id>137</id>
<edge_type>2</edge_type>
<source_obj>6</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_68">
<id>138</id>
<edge_type>2</edge_type>
<source_obj>11</source_obj>
<sink_obj>29</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_69">
<id>139</id>
<edge_type>2</edge_type>
<source_obj>11</source_obj>
<sink_obj>27</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_70">
<id>140</id>
<edge_type>2</edge_type>
<source_obj>27</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>1</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_71">
<mId>1</mId>
<mTag>rgb2gry</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>921602</mMinLatency>
<mMaxLatency>921602</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_72">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>6</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_73">
<mId>3</mId>
<mTag>Loop 1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>11</item>
<item>27</item>
</basic_blocks>
<mII>1</mII>
<mDepth>2</mDepth>
<mMinTripCount>921600</mMinTripCount>
<mMaxTripCount>921600</mMaxTripCount>
<mMinLatency>921600</mMinLatency>
<mMaxLatency>921600</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_74">
<mId>4</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="-1"></fsm>
<res class_id="-1"></res>
<node_label_latency class_id="26" tracking_level="0" version="0">
<count>18</count>
<item_version>0</item_version>
<item class_id="27" tracking_level="0" version="0">
<first>5</first>
<second class_id="28" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>7</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>9</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>10</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>18</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>19</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="29" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="0" version="0">
<first>6</first>
<second class_id="31" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="1" version="0" object_id="_75">
<region_name>Loop 1</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>11</item>
<item>27</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>2</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="34" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="35" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="36" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_reg_nodes>
<dp_regname_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_port_io_nodes>
<port2core class_id="38" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, Fabien Chouteau --
-- --
-- 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 LibRISCV.Sim.Memory_Bus;
with LibRISCV.Except;
with LibRISCV.CSR;
private with LibRISCV.Instructions;
package LibRISCV.Sim.Hart
with SPARK_Mode => On
is
type Breakpoint_Number is range 0 .. 100;
type Instance
(Number_Of_Breakpoints : Breakpoint_Number := 1)
is tagged limited private;
subtype Class is Instance'Class;
type Ptr is access all Class;
procedure Reset (This : in out Instance);
procedure Cycle (This : in out Instance;
Bus : in out Sim.Memory_Bus.Class);
type State_Kind is (Running, Debug_Halt, Single_Step);
function State (This : Instance) return State_Kind;
type Halt_Source_Kind is (None, Single_Step, Breakpoint, Watchpoint);
function Halt_Source (This : in out Instance) return Halt_Source_Kind
with Pre => This.State = Debug_Halt;
procedure Halt (This : in out Instance)
with Post => This.State = Debug_Halt;
procedure Resume (This : in out Instance)
with Pre => This.State = Debug_Halt;
procedure Single_Step (This : in out Instance)
with Post => This.State = Single_Step;
function Read_GPR (This : Instance; Id : GPR_Id) return Register;
procedure Write_GPR (This : in out Instance; Id : GPR_Id; Value : Register);
function Read_PC (This : Instance) return Register;
procedure Write_PC (This : in out Instance; Addr : Register);
procedure Set_Debugger_Attached (This : in out Instance;
Attached : Boolean := True);
function Debug_Read_CSR (This : Instance; Id : CSR.Id) return Register;
procedure Add_Breakpoint (This : in out Instance;
Addr : Address;
Success : out Boolean);
procedure Remove_Breakpoint (This : in out Instance;
Addr : Address;
Success : out Boolean);
procedure Dump (This : Instance);
type Privilege_Level is (User, Machine)
with Size => 2;
private
for Privilege_Level use (User => 0,
Machine => 3);
type GPR_Array is array (GPR_Id) of Register;
type CSR_Array is array (CSR.Name) of Register;
type Breakpoint_Rec is record
Enabled : Boolean := False;
Addr : Address;
end record;
type Breakpoint_Array is array (Breakpoint_Number range <>) of Breakpoint_Rec;
type Instance
(Number_Of_Breakpoints : Breakpoint_Number := 1)
is tagged limited record
Privilege : Privilege_Level := Machine;
State : State_Kind := Debug_Halt;
Halt_Src : Halt_Source_Kind := None;
PC : Register;
Next_PC : Register;
Mcause : Except.Kind;
Mepc : U_Register;
GPR : GPR_Array;
CSRs : CSR_Array;
Debugger_Attached : Boolean := False;
Breakpoints : Breakpoint_Array (1 .. Number_Of_Breakpoints);
end record
with Type_Invariant => Instance.GPR (0).U = 0;
type Branch_Condition is (Cond_EQ, Cond_NE, Cond_LT, Cond_GE, Cond_GEU,
Cond_LTU);
procedure Fetch (This : in out Instance;
Bus : in out Sim.Memory_Bus.Class;
Raw_Insn : out Word;
Success : out Boolean);
function Evaluate (Cond : Branch_Condition;
R1, R2 : Register)
return Boolean;
procedure Raise_Exception (This : in out Instance;
E : Except.Kind;
tval : U_Register := 0);
procedure Read_CSR (This : in out Instance;
Data : out Register;
Id : CSR.Id);
procedure Write_CSR (This : in out Instance;
Data : Register;
Id : CSR.Id);
procedure Exec_Branch (This : in out Instance;
Insn : Instructions.Instruction)
with Pre => Insn.Kind in Instructions.B_Insn_Kind;
procedure Exec_Instruction (This : in out Instance; Raw : Word; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_Invalid (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLLI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRLI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRAI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_ADD (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SUB (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLL (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLT (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLTU (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_XOR (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRL (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SRA (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_OR (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_AND (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SB (This : in out Instance; Insn : Instructions.Instruction; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_SH (This : in out Instance; Insn : Instructions.Instruction; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_SW (This : in out Instance; Insn : Instructions.Instruction; Bus : in out Sim.Memory_Bus.Class);
procedure Exec_JALR (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_LB (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LH (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LW (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LBU (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_LHU (This : in out Instance; Insn : Instructions.Instruction; Bus : Sim.Memory_Bus.Class);
procedure Exec_ADDI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLTI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_SLTIU (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_XORI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_ORI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_ANDI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_FENCE (This : in out Instance);
procedure Exec_FENCE_I (This : in out Instance);
procedure Exec_ECALL (This : in out Instance);
procedure Exec_EBREAK (This : in out Instance);
procedure Exec_CSRRW (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRS (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRC (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRWI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRSI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_CSRRCI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_LUI (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_AUIPC (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_JAL (This : in out Instance; Insn : Instructions.Instruction);
procedure Exec_XRET (This : in out Instance; Insn : Instructions.Instruction);
end LibRISCV.Sim.Hart;
|
-- Copyright © by Jeff Foley 2020-2022. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-- SPDX-License-Identifier: Apache-2.0
local json = require("json")
name = "SecurityTrails"
type = "api"
function start()
set_rate_limit(2)
end
function check()
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c ~= nil and c.key ~= nil and c.key ~= "") then
return true
end
return false
end
function vertical(ctx, domain)
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c == nil or c.key == nil or c.key == "") then
return
end
local resp, err = request(ctx, {
['url']=vert_url(domain),
headers={['APIKEY']=c.key},
})
if (err ~= nil and err ~= "") then
log(ctx, "vertical request to service failed: " .. err)
return
end
local j = json.decode(resp)
if (j == nil or j.subdomains == nil or #(j.subdomains) == 0) then
return
end
for _, sub in pairs(j.subdomains) do
new_name(ctx, sub .. "." .. domain)
end
end
function vert_url(domain)
return "https://api.securitytrails.com/v1/domain/" .. domain .. "/subdomains"
end
function horizontal(ctx, domain)
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c == nil or c.key == nil or c.key == "") then
return
end
for i=1,100 do
local resp, err = request(ctx, {
['url']=horizon_url(domain, i),
headers={['APIKEY']=c.key},
})
if (err ~= nil and err ~= "") then
log(ctx, "horizontal request to service failed: " .. err)
return
end
local j = json.decode(resp)
if (j == nil or j.records == nil or #(j.records) == 0) then
return
end
for _, r in pairs(j.records) do
if (r.hostname ~= nil and r.hostname ~= "") then
associated(ctx, domain, r.hostname)
end
end
end
end
function horizon_url(domain, pagenum)
return "https://api.securitytrails.com/v1/domain/" .. domain .. "/associated?page=" .. pagenum
end
|
-----------------------------------------------------------------------
-- security-openid-servlets - Servlets for OpenID 2.0 Authentication
-- Copyright (C) 2010, 2011, 2012, 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 ASF.Servlets;
with ASF.Requests;
with ASF.Responses;
with ASF.Principals;
with Security.Auth; use Security;
-- The <b>Security.Openid.Servlets</b> package defines two servlets that can be used
-- to implement an OpenID 2.0 authentication with an OpenID provider such as Google,
-- Yahoo!, Verisign, Orange, ...
--
-- The process to use these servlets is the following:
-- <ul>
-- <li>Declare and register a <b>Request_Auth_Servlet</b> servlet.</li>
-- <li>Map that servlet to an authenticate URL. To authenticate, a user will have
-- to click on a link mapped to that servlet. To identify the OpenID provider,
-- the URL must contain the name of the provider. Example:
--
-- http://localhost:8080/app/openid/auth/google
--
-- <li>Declare and register a <b>Verify_Auth_Servlet</b> servlet.
-- <li>Map that servlet to the verification URL. This is the URL that the user
-- will return to when authentication is done by the OpenID provider. Example:
--
-- http://localhost:8080/app/openid/verify
--
-- <li>Declare in the application properties a set of configurations:
-- <ul>
-- <li>The <b>openid.realm</b> must indicate the URL that identifies the
-- application the end user will trust. Example:
--
-- openid.realm=http://localhost:8080/app
--
-- <li>The <b>openid.callback_url</b> must indicate the callback URL to
-- which the OpenID provider will redirect the user when authentication
-- is finished (successfully or not). The callback URL must match
-- the realm.
--
-- openid.callback_url=http://localhost:8080/app/openid/verify
--
-- <li>For each OpenID provider, a URL to the Yadis entry point of the
-- OpenID provider is necessary. This URL is used to get the XRDS
-- stream giving endoint of the OpenID provider. Example:
--
-- openid.provider.google=https://www.google.com/accounts/o8/id
-- </ul>
--
-- </ul>
--
package ASF.Security.Servlets is
-- ------------------------------
-- OpenID Servlet
-- ------------------------------
-- The <b>Openid_Servlet</b> is the OpenID root servlet for OpenID 2.0 authentication.
-- It is defined to provide a common basis for the authentication and verification servlets.
type Openid_Servlet is abstract new ASF.Servlets.Servlet and Auth.Parameters with private;
-- Called by the servlet container to indicate to a servlet that the servlet
-- is being placed into service.
overriding
procedure Initialize (Server : in out Openid_Servlet;
Context : in ASF.Servlets.Servlet_Registry'Class);
-- Get a configuration parameter from the servlet context for the security Auth provider.
overriding
function Get_Parameter (Server : in Openid_Servlet;
Name : in String) return String;
-- ------------------------------
-- OpenID Request Servlet
-- ------------------------------
-- The <b>Request_Auth_Servlet</b> servlet implements the first steps of an OpenID
-- authentication.
type Request_Auth_Servlet is new Openid_Servlet with private;
-- Proceed to the OpenID authentication with an OpenID provider.
-- Find the OpenID provider URL and starts the discovery, association phases
-- during which a private key is obtained from the OpenID provider.
-- After OpenID discovery and association, the user will be redirected to
-- the OpenID provider.
overriding
procedure Do_Get (Server : in Request_Auth_Servlet;
Request : in out ASF.Requests.Request'Class;
Response : in out ASF.Responses.Response'Class);
-- ------------------------------
-- OpenID Verification Servlet
-- ------------------------------
-- The <b>Verify_Auth_Servlet</b> verifies the authentication result and
-- extract authentication from the callback URL.
type Verify_Auth_Servlet is new Openid_Servlet with private;
-- Verify the authentication result that was returned by the OpenID provider.
-- If the authentication succeeded and the signature was correct, sets a
-- user principals on the session.
overriding
procedure Do_Get (Server : in Verify_Auth_Servlet;
Request : in out ASF.Requests.Request'Class;
Response : in out ASF.Responses.Response'Class);
-- Create a principal object that correspond to the authenticated user identified
-- by the <b>Credential</b> information. The principal will be attached to the session
-- and will be destroyed when the session is closed.
procedure Create_Principal (Server : in Verify_Auth_Servlet;
Credential : in Auth.Authentication;
Result : out ASF.Principals.Principal_Access);
private
function Get_Provider_URL (Server : in Request_Auth_Servlet;
Request : in ASF.Requests.Request'Class) return String;
procedure Initialize (Server : in Openid_Servlet;
Provider : in String;
Manager : in out Auth.Manager);
type Openid_Servlet is new ASF.Servlets.Servlet and Auth.Parameters with null record;
type Request_Auth_Servlet is new Openid_Servlet with null record;
type Verify_Auth_Servlet is new Openid_Servlet with null record;
end ASF.Security.Servlets;
|
--
-- Copyright (C) 2018, AdaCore
--
-- This spec has been automatically generated from FE310.svd
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
-- E31 CPU Coreplex, high-performance, 32-bit RV32IMAC core
--
package Interfaces.FE310 is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Base type --
---------------
type UInt32 is new Interfaces.Unsigned_32;
type UInt16 is new Interfaces.Unsigned_16;
type Byte is new Interfaces.Unsigned_8;
type Bit is mod 2**1
with Size => 1;
type UInt2 is mod 2**2
with Size => 2;
type UInt3 is mod 2**3
with Size => 3;
type UInt4 is mod 2**4
with Size => 4;
type UInt5 is mod 2**5
with Size => 5;
type UInt6 is mod 2**6
with Size => 6;
type UInt7 is mod 2**7
with Size => 7;
type UInt9 is mod 2**9
with Size => 9;
type UInt10 is mod 2**10
with Size => 10;
type UInt11 is mod 2**11
with Size => 11;
type UInt12 is mod 2**12
with Size => 12;
type UInt13 is mod 2**13
with Size => 13;
type UInt14 is mod 2**14
with Size => 14;
type UInt15 is mod 2**15
with Size => 15;
type UInt17 is mod 2**17
with Size => 17;
type UInt18 is mod 2**18
with Size => 18;
type UInt19 is mod 2**19
with Size => 19;
type UInt20 is mod 2**20
with Size => 20;
type UInt21 is mod 2**21
with Size => 21;
type UInt22 is mod 2**22
with Size => 22;
type UInt23 is mod 2**23
with Size => 23;
type UInt24 is mod 2**24
with Size => 24;
type UInt25 is mod 2**25
with Size => 25;
type UInt26 is mod 2**26
with Size => 26;
type UInt27 is mod 2**27
with Size => 27;
type UInt28 is mod 2**28
with Size => 28;
type UInt29 is mod 2**29
with Size => 29;
type UInt30 is mod 2**30
with Size => 30;
type UInt31 is mod 2**31
with Size => 31;
--------------------
-- Base addresses --
--------------------
PLIC_Base : constant System.Address :=
System'To_Address (16#C000000#);
CLINT_Base : constant System.Address :=
System'To_Address (16#2000000#);
GPIO0_Base : constant System.Address :=
System'To_Address (16#10012000#);
QSPI0_Base : constant System.Address :=
System'To_Address (16#10014000#);
QSPI1_Base : constant System.Address :=
System'To_Address (16#10024000#);
QSPI2_Base : constant System.Address :=
System'To_Address (16#10034000#);
UART0_Base : constant System.Address :=
System'To_Address (16#10013000#);
UART1_Base : constant System.Address :=
System'To_Address (16#10023000#);
PWM0_Base : constant System.Address :=
System'To_Address (16#10015000#);
PWM1_Base : constant System.Address :=
System'To_Address (16#10025000#);
PWM2_Base : constant System.Address :=
System'To_Address (16#10035000#);
WDT_Base : constant System.Address :=
System'To_Address (16#10000000#);
RTC_Base : constant System.Address :=
System'To_Address (16#10000040#);
AON_Base : constant System.Address :=
System'To_Address (16#10000070#);
BACKUP_Base : constant System.Address :=
System'To_Address (16#10000080#);
PMU_Base : constant System.Address :=
System'To_Address (16#10000100#);
end Interfaces.FE310;
|
package Loop_Optimization12 is
type Enum1 is (A, B, C, D, E, F, G, H, I, J);
type Enum2 is (A, B, C);
type Enum3 is (A, B, C, D, E, F);
type Enum4 is (A, B, C, D);
type Enum5 is (A, B, C, D, E);
type Arr is array (Enum3, Enum4, Enum4, Enum5, Enum5, Enum3,
Enum2, Enum3, Enum5, Enum3) of Natural;
type Arr_Ptr is access Arr;
type Ext_Arr is array (Enum1) of Arr_Ptr;
type Rec is record
F : Ext_Arr;
end record;
type Rec_Ptr is access Rec;
procedure Reset (S : Rec_Ptr);
end Loop_Optimization12;
|
-- Copyright 2019 by Martin Moene
--
-- https://github.com/martinmoene/kalman-estimator-ada
--
-- Distributed under the Boost Software License, Version 1.0.
-- (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
with system.machine_code; use system.machine_code;
with interfaces; use interfaces;
with system;
procedure avr_blink_led_e is
led_ddr : unsigned_8;
led_port : unsigned_8;
led_pin : constant := 5;
-- led_msk : constant := 2#0010_0000#;
led_ms : constant := 200;
for led_port'address use system'to_address ( 16#25# );
for led_ddr'address use system'to_address ( 16#24# );
function bitmask( pin : in natural ) return unsigned_8 is
begin
return shift_left( 1, pin );
end bitmask;
procedure delay_ms( ms : in natural ) is
f_cpu_hz : constant := 12_000_000;
ms_count : constant := f_cpu_hz / ( 7 * 1000 );
begin
for i in 1 .. ms loop
for k in 1 .. ms_count loop
asm ("nop", volatile => true );
end loop;
end loop;
end delay_ms;
procedure blink_ms( n : in natural; ms : in natural ) is
begin
for i in 1 .. n loop
led_port := led_port xor bitmask ( led_pin );
delay_ms( ms );
end loop;
end blink_ms;
begin
led_port := 2#1111_1111#;
led_ddr := led_ddr or bitmask( led_pin );
--blink_ms( 7, led_ms );
loop
delay_ms( led_ms );
led_port := led_port xor bitmask( led_pin );
end loop;
end avr_blink_led_e;
|
with Ada.Characters.Handling;
with Ada.Strings.Fixed;
with Ada.Tags;
with Ahven.Framework;
with Subtypes.Api;
package Test_Subtypes.Read is
package Skill renames Subtypes.Api;
use Subtypes;
use Subtypes.Api;
type Test is new Ahven.Framework.Test_Case with null record;
procedure Initialize (T : in out Test);
procedure Check_Types;
procedure Check_Fields_A;
procedure Check_Fields_B;
procedure Check_Fields_C;
procedure Check_Fields_D;
end Test_Subtypes.Read;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, 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$
------------------------------------------------------------------------------
with AMF.Internals.UML_Packageable_Elements;
with AMF.UML.Behaviored_Classifiers;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Elements.Collections;
with AMF.UML.Interface_Realizations;
with AMF.UML.Interfaces;
with AMF.UML.Named_Elements.Collections;
with AMF.UML.Namespaces;
with AMF.UML.Opaque_Expressions;
with AMF.UML.Packages.Collections;
with AMF.UML.Parameterable_Elements;
with AMF.UML.String_Expressions;
with AMF.UML.Template_Parameters;
with AMF.Visitors;
package AMF.Internals.UML_Interface_Realizations is
type UML_Interface_Realization_Proxy is
limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy
and AMF.UML.Interface_Realizations.UML_Interface_Realization with null record;
overriding function Get_Contract
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Interfaces.UML_Interface_Access;
-- Getter of InterfaceRealization::contract.
--
-- References the Interface specifying the conformance contract.
overriding procedure Set_Contract
(Self : not null access UML_Interface_Realization_Proxy;
To : AMF.UML.Interfaces.UML_Interface_Access);
-- Setter of InterfaceRealization::contract.
--
-- References the Interface specifying the conformance contract.
overriding function Get_Implementing_Classifier
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Behaviored_Classifiers.UML_Behaviored_Classifier_Access;
-- Getter of InterfaceRealization::implementingClassifier.
--
-- References the BehavioredClassifier that owns this Interfacerealization
-- (i.e., the classifier that realizes the Interface to which it points).
overriding procedure Set_Implementing_Classifier
(Self : not null access UML_Interface_Realization_Proxy;
To : AMF.UML.Behaviored_Classifiers.UML_Behaviored_Classifier_Access);
-- Setter of InterfaceRealization::implementingClassifier.
--
-- References the BehavioredClassifier that owns this Interfacerealization
-- (i.e., the classifier that realizes the Interface to which it points).
overriding function Get_Mapping
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access;
-- Getter of Abstraction::mapping.
--
-- An composition of an Expression that states the abstraction
-- relationship between the supplier and the client. In some cases, such
-- as Derivation, it is usually formal and unidirectional; in other cases,
-- such as Trace, it is usually informal and bidirectional. The mapping
-- expression is optional and may be omitted if the precise relationship
-- between the elements is not specified.
overriding procedure Set_Mapping
(Self : not null access UML_Interface_Realization_Proxy;
To : AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access);
-- Setter of Abstraction::mapping.
--
-- An composition of an Expression that states the abstraction
-- relationship between the supplier and the client. In some cases, such
-- as Derivation, it is usually formal and unidirectional; in other cases,
-- such as Trace, it is usually informal and bidirectional. The mapping
-- expression is optional and may be omitted if the precise relationship
-- between the elements is not specified.
overriding function Get_Client
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Dependency::client.
--
-- The element(s) dependent on the supplier element(s). In some cases
-- (such as a Trace Abstraction) the assignment of direction (that is, the
-- designation of the client element) is at the discretion of the modeler,
-- and is a stipulation.
overriding function Get_Supplier
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Dependency::supplier.
--
-- The element(s) independent of the client element(s), in the same
-- respect and the same dependency relationship. In some directed
-- dependency relationships (such as Refinement Abstractions), a common
-- convention in the domain of class-based OO software is to put the more
-- abstract element in this role. Despite this convention, users of UML
-- may stipulate a sense of dependency suitable for their domain, which
-- makes a more abstract element dependent on that which is more specific.
overriding function Get_Source
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element;
-- Getter of DirectedRelationship::source.
--
-- Specifies the sources of the DirectedRelationship.
overriding function Get_Target
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element;
-- Getter of DirectedRelationship::target.
--
-- Specifies the targets of the DirectedRelationship.
overriding function Get_Related_Element
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element;
-- Getter of Relationship::relatedElement.
--
-- Specifies the elements related by the Relationship.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Interface_Realization_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UML_Interface_Realization_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Interface_Realization_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function All_Owning_Packages
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Interface_Realization_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Interface_Realization_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding function Is_Compatible_With
(Self : not null access constant UML_Interface_Realization_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean;
-- Operation ParameterableElement::isCompatibleWith.
--
-- The query isCompatibleWith() determines if this parameterable element
-- is compatible with the specified parameterable element. By default
-- parameterable element P is compatible with parameterable element Q if
-- the kind of P is the same or a subtype as the kind of Q. Subclasses
-- should override this operation to specify different compatibility
-- constraints.
overriding function Is_Template_Parameter
(Self : not null access constant UML_Interface_Realization_Proxy)
return Boolean;
-- Operation ParameterableElement::isTemplateParameter.
--
-- The query isTemplateParameter() determines if this parameterable
-- element is exposed as a formal template parameter.
overriding procedure Enter_Element
(Self : not null access constant UML_Interface_Realization_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Interface_Realization_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Interface_Realization_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Interface_Realizations;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, 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$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UML.Instance_Specifications.Collections is
pragma Preelaborate;
package UML_Instance_Specification_Collections is
new AMF.Generic_Collections
(UML_Instance_Specification,
UML_Instance_Specification_Access);
type Set_Of_UML_Instance_Specification is
new UML_Instance_Specification_Collections.Set with null record;
Empty_Set_Of_UML_Instance_Specification : constant Set_Of_UML_Instance_Specification;
type Ordered_Set_Of_UML_Instance_Specification is
new UML_Instance_Specification_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Instance_Specification : constant Ordered_Set_Of_UML_Instance_Specification;
type Bag_Of_UML_Instance_Specification is
new UML_Instance_Specification_Collections.Bag with null record;
Empty_Bag_Of_UML_Instance_Specification : constant Bag_Of_UML_Instance_Specification;
type Sequence_Of_UML_Instance_Specification is
new UML_Instance_Specification_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Instance_Specification : constant Sequence_Of_UML_Instance_Specification;
private
Empty_Set_Of_UML_Instance_Specification : constant Set_Of_UML_Instance_Specification
:= (UML_Instance_Specification_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Instance_Specification : constant Ordered_Set_Of_UML_Instance_Specification
:= (UML_Instance_Specification_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Instance_Specification : constant Bag_Of_UML_Instance_Specification
:= (UML_Instance_Specification_Collections.Bag with null record);
Empty_Sequence_Of_UML_Instance_Specification : constant Sequence_Of_UML_Instance_Specification
:= (UML_Instance_Specification_Collections.Sequence with null record);
end AMF.UML.Instance_Specifications.Collections;
|
------------------------------------------------------------------------------
-- --
-- Copyright (c) 2016-2021 Vitalii Bondarenko <vibondare@gmail.com> --
-- --
------------------------------------------------------------------------------
-- --
-- The MIT License (MIT) --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, sublicense, and/or sell copies of the Software, and to --
-- permit persons to whom the Software is furnished to do so, subject to --
-- the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY --
-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, --
-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE --
-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
------------------------------------------------------------------------------
generic
type Item_Type is mod <>;
package Formatted_Output.Modular_Output is
function "&" (Fmt : Format_Type; Value : Item_Type) return Format_Type;
-- Replaces leftmost formatting sequence in Fmt with formatted Value image,
-- then returns Fmt. Raises exception Format_Error when invalid formatting
-- sequence is found or no formatting sequence found at all
end Formatted_Output.Modular_Output;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P A R . C H 9 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2005, 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, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Style_Checks (All_Checks);
-- Turn off subprogram body ordering check. Subprograms are in order by RM
-- section rather than alphabetical.
separate (Par)
package body Ch9 is
-- Local subprograms, used only in this chapter
function P_Accept_Alternative return Node_Id;
function P_Delay_Alternative return Node_Id;
function P_Delay_Relative_Statement return Node_Id;
function P_Delay_Until_Statement return Node_Id;
function P_Entry_Barrier return Node_Id;
function P_Entry_Body_Formal_Part return Node_Id;
function P_Entry_Declaration return Node_Id;
function P_Entry_Index_Specification return Node_Id;
function P_Protected_Definition return Node_Id;
function P_Protected_Operation_Declaration_Opt return Node_Id;
function P_Protected_Operation_Items return List_Id;
function P_Task_Definition return Node_Id;
function P_Task_Items return List_Id;
-----------------------------
-- 9.1 Task (also 10.1.3) --
-----------------------------
-- TASK_TYPE_DECLARATION ::=
-- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
-- [is [new INTERFACE_LIST with] TASK_DEFINITION];
-- SINGLE_TASK_DECLARATION ::=
-- task DEFINING_IDENTIFIER
-- [is [new INTERFACE_LIST with] TASK_DEFINITION];
-- TASK_BODY ::=
-- task body DEFINING_IDENTIFIER is
-- DECLARATIVE_PART
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [task_IDENTIFIER]
-- TASK_BODY_STUB ::=
-- task body DEFINING_IDENTIFIER is separate;
-- This routine scans out a task declaration, task body, or task stub
-- The caller has checked that the initial token is TASK and scanned
-- past it, so that Token is set to the token after TASK
-- Error recovery: cannot raise Error_Resync
function P_Task return Node_Id is
Name_Node : Node_Id;
Task_Node : Node_Id;
Task_Sloc : Source_Ptr;
begin
Push_Scope_Stack;
Scope.Table (Scope.Last).Etyp := E_Name;
Scope.Table (Scope.Last).Ecol := Start_Column;
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Scope.Table (Scope.Last).Lreq := False;
Task_Sloc := Prev_Token_Ptr;
if Token = Tok_Body then
Scan; -- past BODY
Name_Node := P_Defining_Identifier (C_Is);
Scope.Table (Scope.Last).Labl := Name_Node;
if Token = Tok_Left_Paren then
Error_Msg_SC ("discriminant part not allowed in task body");
Discard_Junk_List (P_Known_Discriminant_Part_Opt);
end if;
TF_Is;
-- Task stub
if Token = Tok_Separate then
Scan; -- past SEPARATE
Task_Node := New_Node (N_Task_Body_Stub, Task_Sloc);
Set_Defining_Identifier (Task_Node, Name_Node);
TF_Semicolon;
Pop_Scope_Stack; -- remove unused entry
-- Task body
else
Task_Node := New_Node (N_Task_Body, Task_Sloc);
Set_Defining_Identifier (Task_Node, Name_Node);
Parse_Decls_Begin_End (Task_Node);
end if;
return Task_Node;
-- Otherwise we must have a task declaration
else
if Token = Tok_Type then
Scan; -- past TYPE
Task_Node := New_Node (N_Task_Type_Declaration, Task_Sloc);
Name_Node := P_Defining_Identifier;
Set_Defining_Identifier (Task_Node, Name_Node);
Scope.Table (Scope.Last).Labl := Name_Node;
Set_Discriminant_Specifications
(Task_Node, P_Known_Discriminant_Part_Opt);
else
Task_Node := New_Node (N_Single_Task_Declaration, Task_Sloc);
Name_Node := P_Defining_Identifier (C_Is);
Set_Defining_Identifier (Task_Node, Name_Node);
Scope.Table (Scope.Last).Labl := Name_Node;
if Token = Tok_Left_Paren then
Error_Msg_SC ("discriminant part not allowed for single task");
Discard_Junk_List (P_Known_Discriminant_Part_Opt);
end if;
end if;
-- Parse optional task definition. Note that P_Task_Definition scans
-- out the semicolon as well as the task definition itself.
if Token = Tok_Semicolon then
-- A little check, if the next token after semicolon is
-- Entry, then surely the semicolon should really be IS
Scan; -- past semicolon
if Token = Tok_Entry then
Error_Msg_SP (""";"" should be IS");
Set_Task_Definition (Task_Node, P_Task_Definition);
else
Pop_Scope_Stack; -- Remove unused entry
end if;
else
TF_Is; -- must have IS if no semicolon
-- Ada 2005 (AI-345)
if Token = Tok_New then
Scan; -- past NEW
if Ada_Version < Ada_05 then
Error_Msg_SP ("task interface is an Ada 2005 extension");
Error_Msg_SP ("\unit must be compiled with -gnat05 switch");
end if;
Set_Interface_List (Task_Node, New_List);
loop
Append (P_Qualified_Simple_Name, Interface_List (Task_Node));
exit when Token /= Tok_And;
Scan; -- past AND
end loop;
if Token /= Tok_With then
Error_Msg_SC ("WITH expected");
end if;
Scan; -- past WITH
if Token = Tok_Private then
Error_Msg_SP
("PRIVATE not allowed in task type declaration");
end if;
end if;
Set_Task_Definition (Task_Node, P_Task_Definition);
end if;
return Task_Node;
end if;
end P_Task;
--------------------------------
-- 9.1 Task Type Declaration --
--------------------------------
-- Parsed by P_Task (9.1)
----------------------------------
-- 9.1 Single Task Declaration --
----------------------------------
-- Parsed by P_Task (9.1)
--------------------------
-- 9.1 Task Definition --
--------------------------
-- TASK_DEFINITION ::=
-- {TASK_ITEM}
-- [private
-- {TASK_ITEM}]
-- end [task_IDENTIFIER];
-- The caller has already made the scope stack entry
-- Note: there is a small deviation from official syntax here in that we
-- regard the semicolon after end as part of the Task_Definition, and in
-- the official syntax, it's part of the enclosing declaration. The reason
-- for this deviation is that otherwise the end processing would have to
-- be special cased, which would be a nuisance!
-- Error recovery: cannot raise Error_Resync
function P_Task_Definition return Node_Id is
Def_Node : Node_Id;
begin
Def_Node := New_Node (N_Task_Definition, Token_Ptr);
Set_Visible_Declarations (Def_Node, P_Task_Items);
if Token = Tok_Private then
Scan; -- past PRIVATE
Set_Private_Declarations (Def_Node, P_Task_Items);
-- Deal gracefully with multiple PRIVATE parts
while Token = Tok_Private loop
Error_Msg_SC ("only one private part allowed per task");
Scan; -- past PRIVATE
Append_List (P_Task_Items, Private_Declarations (Def_Node));
end loop;
end if;
End_Statements (Def_Node);
return Def_Node;
end P_Task_Definition;
--------------------
-- 9.1 Task Item --
--------------------
-- TASK_ITEM ::= ENTRY_DECLARATION | REPRESENTATION_CLAUSE
-- This subprogram scans a (possibly empty) list of task items and pragmas
-- Error recovery: cannot raise Error_Resync
-- Note: a pragma can also be returned in this position
function P_Task_Items return List_Id is
Items : List_Id;
Item_Node : Node_Id;
Decl_Sloc : Source_Ptr;
begin
-- Get rid of active SIS entry from outer scope. This means we will
-- miss some nested cases, but it doesn't seem worth the effort. See
-- discussion in Par for further details
SIS_Entry_Active := False;
-- Loop to scan out task items
Items := New_List;
Decl_Loop : loop
Decl_Sloc := Token_Ptr;
if Token = Tok_Pragma then
Append (P_Pragma, Items);
-- Ada 2005 (AI-397): Reserved words NOT and OVERRIDING
-- may begin an entry declaration.
elsif Token = Tok_Entry
or else Token = Tok_Not
or else Token = Tok_Overriding
then
Append (P_Entry_Declaration, Items);
elsif Token = Tok_For then
-- Representation clause in task declaration. The only rep
-- clause which is legal in a protected is an address clause,
-- so that is what we try to scan out.
Item_Node := P_Representation_Clause;
if Nkind (Item_Node) = N_At_Clause then
Append (Item_Node, Items);
elsif Nkind (Item_Node) = N_Attribute_Definition_Clause
and then Chars (Item_Node) = Name_Address
then
Append (Item_Node, Items);
else
Error_Msg
("the only representation clause " &
"allowed here is an address clause!", Decl_Sloc);
end if;
elsif Token = Tok_Identifier
or else Token in Token_Class_Declk
then
Error_Msg_SC ("illegal declaration in task definition");
Resync_Past_Semicolon;
else
exit Decl_Loop;
end if;
end loop Decl_Loop;
return Items;
end P_Task_Items;
--------------------
-- 9.1 Task Body --
--------------------
-- Parsed by P_Task (9.1)
----------------------------------
-- 9.4 Protected (also 10.1.3) --
----------------------------------
-- PROTECTED_TYPE_DECLARATION ::=
-- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
-- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
-- SINGLE_PROTECTED_DECLARATION ::=
-- protected DEFINING_IDENTIFIER
-- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
-- PROTECTED_BODY ::=
-- protected body DEFINING_IDENTIFIER is
-- {PROTECTED_OPERATION_ITEM}
-- end [protected_IDENTIFIER];
-- PROTECTED_BODY_STUB ::=
-- protected body DEFINING_IDENTIFIER is separate;
-- This routine scans out a protected declaration, protected body
-- or a protected stub.
-- The caller has checked that the initial token is PROTECTED and
-- scanned past it, so Token is set to the following token.
-- Error recovery: cannot raise Error_Resync
function P_Protected return Node_Id is
Name_Node : Node_Id;
Protected_Node : Node_Id;
Protected_Sloc : Source_Ptr;
begin
Push_Scope_Stack;
Scope.Table (Scope.Last).Etyp := E_Name;
Scope.Table (Scope.Last).Ecol := Start_Column;
Scope.Table (Scope.Last).Lreq := False;
Protected_Sloc := Prev_Token_Ptr;
if Token = Tok_Body then
Scan; -- past BODY
Name_Node := P_Defining_Identifier (C_Is);
Scope.Table (Scope.Last).Labl := Name_Node;
if Token = Tok_Left_Paren then
Error_Msg_SC ("discriminant part not allowed in protected body");
Discard_Junk_List (P_Known_Discriminant_Part_Opt);
end if;
TF_Is;
-- Protected stub
if Token = Tok_Separate then
Scan; -- past SEPARATE
Protected_Node := New_Node (N_Protected_Body_Stub, Protected_Sloc);
Set_Defining_Identifier (Protected_Node, Name_Node);
TF_Semicolon;
Pop_Scope_Stack; -- remove unused entry
-- Protected body
else
Protected_Node := New_Node (N_Protected_Body, Protected_Sloc);
Set_Defining_Identifier (Protected_Node, Name_Node);
Set_Declarations (Protected_Node, P_Protected_Operation_Items);
End_Statements (Protected_Node);
end if;
return Protected_Node;
-- Otherwise we must have a protected declaration
else
if Token = Tok_Type then
Scan; -- past TYPE
Protected_Node :=
New_Node (N_Protected_Type_Declaration, Protected_Sloc);
Name_Node := P_Defining_Identifier (C_Is);
Set_Defining_Identifier (Protected_Node, Name_Node);
Scope.Table (Scope.Last).Labl := Name_Node;
Set_Discriminant_Specifications
(Protected_Node, P_Known_Discriminant_Part_Opt);
else
Protected_Node :=
New_Node (N_Single_Protected_Declaration, Protected_Sloc);
Name_Node := P_Defining_Identifier (C_Is);
Set_Defining_Identifier (Protected_Node, Name_Node);
if Token = Tok_Left_Paren then
Error_Msg_SC
("discriminant part not allowed for single protected");
Discard_Junk_List (P_Known_Discriminant_Part_Opt);
end if;
Scope.Table (Scope.Last).Labl := Name_Node;
end if;
T_Is;
-- Ada 2005 (AI-345)
if Token = Tok_New then
Scan; -- past NEW
if Ada_Version < Ada_05 then
Error_Msg_SP ("task interface is an Ada 2005 extension");
Error_Msg_SP ("\unit must be compiled with -gnat05 switch");
end if;
Set_Interface_List (Protected_Node, New_List);
loop
Append (P_Qualified_Simple_Name,
Interface_List (Protected_Node));
exit when Token /= Tok_And;
Scan; -- past AND
end loop;
if Token /= Tok_With then
Error_Msg_SC ("WITH expected");
end if;
Scan; -- past WITH
if Token = Tok_Private then
Error_Msg_SP
("PRIVATE not allowed in protected type declaration");
end if;
end if;
Set_Protected_Definition (Protected_Node, P_Protected_Definition);
return Protected_Node;
end if;
end P_Protected;
-------------------------------------
-- 9.4 Protected Type Declaration --
-------------------------------------
-- Parsed by P_Protected (9.4)
---------------------------------------
-- 9.4 Single Protected Declaration --
---------------------------------------
-- Parsed by P_Protected (9.4)
-------------------------------
-- 9.4 Protected Definition --
-------------------------------
-- PROTECTED_DEFINITION ::=
-- {PROTECTED_OPERATION_DECLARATION}
-- [private
-- {PROTECTED_ELEMENT_DECLARATION}]
-- end [protected_IDENTIFIER]
-- PROTECTED_ELEMENT_DECLARATION ::=
-- PROTECTED_OPERATION_DECLARATION
-- | COMPONENT_DECLARATION
-- The caller has already established the scope stack entry
-- Error recovery: cannot raise Error_Resync
function P_Protected_Definition return Node_Id is
Def_Node : Node_Id;
Item_Node : Node_Id;
begin
Def_Node := New_Node (N_Protected_Definition, Token_Ptr);
-- Get rid of active SIS entry from outer scope. This means we will
-- miss some nested cases, but it doesn't seem worth the effort. See
-- discussion in Par for further details
SIS_Entry_Active := False;
-- Loop to scan visible declarations (protected operation declarations)
Set_Visible_Declarations (Def_Node, New_List);
loop
Item_Node := P_Protected_Operation_Declaration_Opt;
exit when No (Item_Node);
Append (Item_Node, Visible_Declarations (Def_Node));
end loop;
-- Deal with PRIVATE part (including graceful handling
-- of multiple PRIVATE parts).
Private_Loop : while Token = Tok_Private loop
if No (Private_Declarations (Def_Node)) then
Set_Private_Declarations (Def_Node, New_List);
else
Error_Msg_SC ("duplicate private part");
end if;
Scan; -- past PRIVATE
Declaration_Loop : loop
if Token = Tok_Identifier then
P_Component_Items (Private_Declarations (Def_Node));
else
Item_Node := P_Protected_Operation_Declaration_Opt;
exit Declaration_Loop when No (Item_Node);
Append (Item_Node, Private_Declarations (Def_Node));
end if;
end loop Declaration_Loop;
end loop Private_Loop;
End_Statements (Def_Node);
return Def_Node;
end P_Protected_Definition;
------------------------------------------
-- 9.4 Protected Operation Declaration --
------------------------------------------
-- PROTECTED_OPERATION_DECLARATION ::=
-- SUBPROGRAM_DECLARATION
-- | ENTRY_DECLARATION
-- | REPRESENTATION_CLAUSE
-- Error recovery: cannot raise Error_Resync
-- Note: a pragma can also be returned in this position
-- We are not currently permitting representation clauses to appear as
-- protected operation declarations, do we have to rethink this???
function P_Protected_Operation_Declaration_Opt return Node_Id is
L : List_Id;
P : Source_Ptr;
function P_Entry_Or_Subprogram_With_Indicator return Node_Id;
-- Ada 2005 (AI-397): Parse an entry or a subprogram with an overriding
-- indicator. The caller has checked that the initial token is NOT or
-- OVERRIDING.
------------------------------------------
-- P_Entry_Or_Subprogram_With_Indicator --
------------------------------------------
function P_Entry_Or_Subprogram_With_Indicator return Node_Id is
Decl : Node_Id := Error;
Is_Overriding : Boolean := False;
Not_Overriding : Boolean := False;
begin
if Token = Tok_Not then
Scan; -- past NOT
if Token = Tok_Overriding then
Scan; -- past OVERRIDING
Not_Overriding := True;
else
Error_Msg_SC ("OVERRIDING expected!");
end if;
else
Scan; -- past OVERRIDING
Is_Overriding := True;
end if;
if (Is_Overriding or else Not_Overriding) then
if Ada_Version < Ada_05 then
Error_Msg_SP (" overriding indicator is an Ada 2005 extension");
Error_Msg_SP ("\unit must be compiled with -gnat05 switch");
elsif Token = Tok_Entry then
Decl := P_Entry_Declaration;
Set_Must_Override (Decl, Is_Overriding);
Set_Must_Not_Override (Decl, Not_Overriding);
elsif Token = Tok_Function or else Token = Tok_Procedure then
Decl := P_Subprogram (Pf_Decl);
Set_Must_Override (Specification (Decl), Is_Overriding);
Set_Must_Not_Override (Specification (Decl), Not_Overriding);
else
Error_Msg_SC ("ENTRY, FUNCTION or PROCEDURE expected!");
end if;
end if;
return Decl;
end P_Entry_Or_Subprogram_With_Indicator;
-- Start of processing for P_Protected_Operation_Declaration_Opt
begin
-- This loop runs more than once only when a junk declaration
-- is skipped.
loop
if Token = Tok_Pragma then
return P_Pragma;
elsif Token = Tok_Not or else Token = Tok_Overriding then
return P_Entry_Or_Subprogram_With_Indicator;
elsif Token = Tok_Entry then
return P_Entry_Declaration;
elsif Token = Tok_Function or else Token = Tok_Procedure then
return P_Subprogram (Pf_Decl);
elsif Token = Tok_Identifier then
L := New_List;
P := Token_Ptr;
Skip_Declaration (L);
if Nkind (First (L)) = N_Object_Declaration then
Error_Msg
("component must be declared in private part of " &
"protected type", P);
else
Error_Msg
("illegal declaration in protected definition", P);
end if;
elsif Token in Token_Class_Declk then
Error_Msg_SC ("illegal declaration in protected definition");
Resync_Past_Semicolon;
-- Return now to avoid cascaded messages if next declaration
-- is a valid component declaration.
return Error;
elsif Token = Tok_For then
Error_Msg_SC
("representation clause not allowed in protected definition");
Resync_Past_Semicolon;
else
return Empty;
end if;
end loop;
end P_Protected_Operation_Declaration_Opt;
-----------------------------------
-- 9.4 Protected Operation Item --
-----------------------------------
-- PROTECTED_OPERATION_ITEM ::=
-- SUBPROGRAM_DECLARATION
-- | SUBPROGRAM_BODY
-- | ENTRY_BODY
-- | REPRESENTATION_CLAUSE
-- This procedure parses and returns a list of protected operation items
-- We are not currently permitting representation clauses to appear
-- as protected operation items, do we have to rethink this???
function P_Protected_Operation_Items return List_Id is
Item_List : List_Id;
begin
Item_List := New_List;
loop
if Token = Tok_Entry or else Bad_Spelling_Of (Tok_Entry) then
Append (P_Entry_Body, Item_List);
elsif Token = Tok_Function or else Bad_Spelling_Of (Tok_Function)
or else
Token = Tok_Procedure or else Bad_Spelling_Of (Tok_Procedure)
then
Append (P_Subprogram (Pf_Decl_Pbod), Item_List);
elsif Token = Tok_Pragma or else Bad_Spelling_Of (Tok_Pragma) then
P_Pragmas_Opt (Item_List);
elsif Token = Tok_Private or else Bad_Spelling_Of (Tok_Private) then
Error_Msg_SC ("PRIVATE not allowed in protected body");
Scan; -- past PRIVATE
elsif Token = Tok_Identifier then
Error_Msg_SC
("all components must be declared in spec!");
Resync_Past_Semicolon;
elsif Token in Token_Class_Declk then
Error_Msg_SC ("this declaration not allowed in protected body");
Resync_Past_Semicolon;
else
exit;
end if;
end loop;
return Item_List;
end P_Protected_Operation_Items;
------------------------------
-- 9.5.2 Entry Declaration --
------------------------------
-- ENTRY_DECLARATION ::=
-- [OVERRIDING_INDICATOR]
-- entry DEFINING_IDENTIFIER [(DISCRETE_SUBTYPE_DEFINITION)]
-- PARAMETER_PROFILE;
-- The caller has checked that the initial token is ENTRY, NOT or
-- OVERRIDING.
-- Error recovery: cannot raise Error_Resync
function P_Entry_Declaration return Node_Id is
Decl_Node : Node_Id;
Scan_State : Saved_Scan_State;
-- Flags for optional overriding indication. Two flags are needed,
-- to distinguish positive and negative overriding indicators from
-- the absence of any indicator.
Is_Overriding : Boolean := False;
Not_Overriding : Boolean := False;
begin
-- Ada 2005 (AI-397): Scan leading overriding indicator
if Token = Tok_Not then
Scan; -- past NOT
if Token = Tok_Overriding then
Scan; -- part OVERRIDING
Not_Overriding := True;
else
Error_Msg_SC ("OVERRIDING expected!");
end if;
elsif Token = Tok_Overriding then
Scan; -- part OVERRIDING
Is_Overriding := True;
end if;
if (Is_Overriding or else Not_Overriding) then
if Ada_Version < Ada_05 then
Error_Msg_SP (" overriding indicator is an Ada 2005 extension");
Error_Msg_SP ("\unit must be compiled with -gnat05 switch");
elsif Token /= Tok_Entry then
Error_Msg_SC ("ENTRY expected!");
end if;
end if;
Decl_Node := New_Node (N_Entry_Declaration, Token_Ptr);
Scan; -- past ENTRY
Set_Defining_Identifier
(Decl_Node, P_Defining_Identifier (C_Left_Paren_Semicolon));
-- If left paren, could be (Discrete_Subtype_Definition) or Formal_Part
if Token = Tok_Left_Paren then
Scan; -- past (
-- If identifier after left paren, could still be either
if Token = Tok_Identifier then
Save_Scan_State (Scan_State); -- at Id
Scan; -- past Id
-- If comma or colon after Id, must be Formal_Part
if Token = Tok_Comma or else Token = Tok_Colon then
Restore_Scan_State (Scan_State); -- to Id
Set_Parameter_Specifications (Decl_Node, P_Formal_Part);
-- Else if Id wi no comma or colon, must be discrete subtype defn
else
Restore_Scan_State (Scan_State); -- to Id
Set_Discrete_Subtype_Definition
(Decl_Node, P_Discrete_Subtype_Definition);
T_Right_Paren;
Set_Parameter_Specifications (Decl_Node, P_Parameter_Profile);
end if;
-- If no Id, must be discrete subtype definition
else
Set_Discrete_Subtype_Definition
(Decl_Node, P_Discrete_Subtype_Definition);
T_Right_Paren;
Set_Parameter_Specifications (Decl_Node, P_Parameter_Profile);
end if;
end if;
if Is_Overriding then
Set_Must_Override (Decl_Node);
elsif Not_Overriding then
Set_Must_Not_Override (Decl_Node);
end if;
-- Error recovery check for illegal return
if Token = Tok_Return then
Error_Msg_SC ("entry cannot have return value!");
Scan;
Discard_Junk_Node (P_Subtype_Indication);
end if;
-- Error recovery check for improper use of entry barrier in spec
if Token = Tok_When then
Error_Msg_SC ("barrier not allowed here (belongs in body)");
Scan; -- past WHEN;
Discard_Junk_Node (P_Expression_No_Right_Paren);
end if;
TF_Semicolon;
return Decl_Node;
exception
when Error_Resync =>
Resync_Past_Semicolon;
return Error;
end P_Entry_Declaration;
-----------------------------
-- 9.5.2 Accept Statement --
-----------------------------
-- ACCEPT_STATEMENT ::=
-- accept entry_DIRECT_NAME
-- [(ENTRY_INDEX)] PARAMETER_PROFILE [do
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [entry_IDENTIFIER]];
-- The caller has checked that the initial token is ACCEPT
-- Error recovery: cannot raise Error_Resync. If an error occurs, the
-- scan is resynchronized past the next semicolon and control returns.
function P_Accept_Statement return Node_Id is
Scan_State : Saved_Scan_State;
Accept_Node : Node_Id;
Hand_Seq : Node_Id;
begin
Push_Scope_Stack;
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Scope.Table (Scope.Last).Ecol := Start_Column;
Accept_Node := New_Node (N_Accept_Statement, Token_Ptr);
Scan; -- past ACCEPT
Scope.Table (Scope.Last).Labl := Token_Node;
Set_Entry_Direct_Name (Accept_Node, P_Identifier (C_Do));
-- Left paren could be (Entry_Index) or Formal_Part, determine which
if Token = Tok_Left_Paren then
Save_Scan_State (Scan_State); -- at left paren
Scan; -- past left paren
-- If first token after left paren not identifier, then Entry_Index
if Token /= Tok_Identifier then
Set_Entry_Index (Accept_Node, P_Expression);
T_Right_Paren;
Set_Parameter_Specifications (Accept_Node, P_Parameter_Profile);
-- First token after left paren is identifier, could be either case
else -- Token = Tok_Identifier
Scan; -- past identifier
-- If identifier followed by comma or colon, must be Formal_Part
if Token = Tok_Comma or else Token = Tok_Colon then
Restore_Scan_State (Scan_State); -- to left paren
Set_Parameter_Specifications (Accept_Node, P_Parameter_Profile);
-- If identifier not followed by comma/colon, must be entry index
else
Restore_Scan_State (Scan_State); -- to left paren
Scan; -- past left paren (again!)
Set_Entry_Index (Accept_Node, P_Expression);
T_Right_Paren;
Set_Parameter_Specifications (Accept_Node, P_Parameter_Profile);
end if;
end if;
end if;
-- Scan out DO if present
if Token = Tok_Do then
Scope.Table (Scope.Last).Etyp := E_Name;
Scope.Table (Scope.Last).Lreq := False;
Scan; -- past DO
Hand_Seq := P_Handled_Sequence_Of_Statements;
Set_Handled_Statement_Sequence (Accept_Node, Hand_Seq);
End_Statements (Handled_Statement_Sequence (Accept_Node));
-- Exception handlers not allowed in Ada 95 node
if Present (Exception_Handlers (Hand_Seq)) then
if Ada_Version = Ada_83 then
Error_Msg_N
("(Ada 83) exception handlers in accept not allowed",
First_Non_Pragma (Exception_Handlers (Hand_Seq)));
end if;
end if;
else
Pop_Scope_Stack; -- discard unused entry
TF_Semicolon;
end if;
return Accept_Node;
-- If error, resynchronize past semicolon
exception
when Error_Resync =>
Resync_Past_Semicolon;
Pop_Scope_Stack; -- discard unused entry
return Error;
end P_Accept_Statement;
------------------------
-- 9.5.2 Entry Index --
------------------------
-- Parsed by P_Expression (4.4)
-----------------------
-- 9.5.2 Entry Body --
-----------------------
-- ENTRY_BODY ::=
-- entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART ENTRY_BARRIER is
-- DECLARATIVE_PART
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- end [entry_IDENTIFIER];
-- The caller has checked that the initial token is ENTRY
-- Error_Recovery: cannot raise Error_Resync
function P_Entry_Body return Node_Id is
Entry_Node : Node_Id;
Formal_Part_Node : Node_Id;
Name_Node : Node_Id;
begin
Push_Scope_Stack;
Entry_Node := New_Node (N_Entry_Body, Token_Ptr);
Scan; -- past ENTRY
Scope.Table (Scope.Last).Ecol := Start_Column;
Scope.Table (Scope.Last).Lreq := False;
Scope.Table (Scope.Last).Etyp := E_Name;
Name_Node := P_Defining_Identifier;
Set_Defining_Identifier (Entry_Node, Name_Node);
Scope.Table (Scope.Last).Labl := Name_Node;
Formal_Part_Node := P_Entry_Body_Formal_Part;
Set_Entry_Body_Formal_Part (Entry_Node, Formal_Part_Node);
Set_Condition (Formal_Part_Node, P_Entry_Barrier);
Parse_Decls_Begin_End (Entry_Node);
return Entry_Node;
end P_Entry_Body;
-----------------------------------
-- 9.5.2 Entry Body Formal Part --
-----------------------------------
-- ENTRY_BODY_FORMAL_PART ::=
-- [(ENTRY_INDEX_SPECIFICATION)] [PARAMETER_PART]
-- Error_Recovery: cannot raise Error_Resync
function P_Entry_Body_Formal_Part return Node_Id is
Fpart_Node : Node_Id;
Scan_State : Saved_Scan_State;
begin
Fpart_Node := New_Node (N_Entry_Body_Formal_Part, Token_Ptr);
-- See if entry index specification present, and if so parse it
if Token = Tok_Left_Paren then
Save_Scan_State (Scan_State); -- at left paren
Scan; -- past left paren
if Token = Tok_For then
Set_Entry_Index_Specification
(Fpart_Node, P_Entry_Index_Specification);
T_Right_Paren;
else
Restore_Scan_State (Scan_State); -- to left paren
end if;
-- Check for (common?) case of left paren omitted before FOR. This
-- is a tricky case, because the corresponding missing left paren
-- can cause real havoc if a formal part is present which gets
-- treated as part of the discrete subtype definition of the
-- entry index specification, so just give error and resynchronize
elsif Token = Tok_For then
T_Left_Paren; -- to give error message
Resync_To_When;
end if;
Set_Parameter_Specifications (Fpart_Node, P_Parameter_Profile);
return Fpart_Node;
end P_Entry_Body_Formal_Part;
--------------------------
-- 9.5.2 Entry Barrier --
--------------------------
-- ENTRY_BARRIER ::= when CONDITION
-- Error_Recovery: cannot raise Error_Resync
function P_Entry_Barrier return Node_Id is
Bnode : Node_Id;
begin
if Token = Tok_When then
Scan; -- past WHEN;
Bnode := P_Expression_No_Right_Paren;
if Token = Tok_Colon_Equal then
Error_Msg_SC (""":="" should be ""=""");
Scan;
Bnode := P_Expression_No_Right_Paren;
end if;
else
T_When; -- to give error message
Bnode := Error;
end if;
TF_Is;
return Bnode;
end P_Entry_Barrier;
--------------------------------------
-- 9.5.2 Entry Index Specification --
--------------------------------------
-- ENTRY_INDEX_SPECIFICATION ::=
-- for DEFINING_IDENTIFIER in DISCRETE_SUBTYPE_DEFINITION
-- Error recovery: can raise Error_Resync
function P_Entry_Index_Specification return Node_Id is
Iterator_Node : Node_Id;
begin
Iterator_Node := New_Node (N_Entry_Index_Specification, Token_Ptr);
T_For; -- past FOR
Set_Defining_Identifier (Iterator_Node, P_Defining_Identifier (C_In));
T_In;
Set_Discrete_Subtype_Definition
(Iterator_Node, P_Discrete_Subtype_Definition);
return Iterator_Node;
end P_Entry_Index_Specification;
---------------------------------
-- 9.5.3 Entry Call Statement --
---------------------------------
-- Parsed by P_Name (4.1). Within a select, an entry call is parsed
-- by P_Select_Statement (9.7)
------------------------------
-- 9.5.4 Requeue Statement --
------------------------------
-- REQUEUE_STATEMENT ::= requeue entry_NAME [with abort];
-- The caller has checked that the initial token is requeue
-- Error recovery: can raise Error_Resync
function P_Requeue_Statement return Node_Id is
Requeue_Node : Node_Id;
begin
Requeue_Node := New_Node (N_Requeue_Statement, Token_Ptr);
Scan; -- past REQUEUE
Set_Name (Requeue_Node, P_Name);
if Token = Tok_With then
Scan; -- past WITH
T_Abort;
Set_Abort_Present (Requeue_Node, True);
end if;
TF_Semicolon;
return Requeue_Node;
end P_Requeue_Statement;
--------------------------
-- 9.6 Delay Statement --
--------------------------
-- DELAY_STATEMENT ::=
-- DELAY_UNTIL_STATEMENT
-- | DELAY_RELATIVE_STATEMENT
-- The caller has checked that the initial token is DELAY
-- Error recovery: cannot raise Error_Resync
function P_Delay_Statement return Node_Id is
begin
Scan; -- past DELAY
-- The following check for delay until misused in Ada 83 doesn't catch
-- all cases, but it's good enough to catch most of them!
if Token_Name = Name_Until then
Check_95_Keyword (Tok_Until, Tok_Left_Paren);
Check_95_Keyword (Tok_Until, Tok_Identifier);
end if;
if Token = Tok_Until then
return P_Delay_Until_Statement;
else
return P_Delay_Relative_Statement;
end if;
end P_Delay_Statement;
--------------------------------
-- 9.6 Delay Until Statement --
--------------------------------
-- DELAY_UNTIL_STATEMENT ::= delay until delay_EXPRESSION;
-- The caller has checked that the initial token is DELAY, scanned it
-- out and checked that the current token is UNTIL
-- Error recovery: cannot raise Error_Resync
function P_Delay_Until_Statement return Node_Id is
Delay_Node : Node_Id;
begin
Delay_Node := New_Node (N_Delay_Until_Statement, Prev_Token_Ptr);
Scan; -- past UNTIL
Set_Expression (Delay_Node, P_Expression_No_Right_Paren);
TF_Semicolon;
return Delay_Node;
end P_Delay_Until_Statement;
-----------------------------------
-- 9.6 Delay Relative Statement --
-----------------------------------
-- DELAY_RELATIVE_STATEMENT ::= delay delay_EXPRESSION;
-- The caller has checked that the initial token is DELAY, scanned it
-- out and determined that the current token is not UNTIL
-- Error recovery: cannot raise Error_Resync
function P_Delay_Relative_Statement return Node_Id is
Delay_Node : Node_Id;
begin
Delay_Node := New_Node (N_Delay_Relative_Statement, Prev_Token_Ptr);
Set_Expression (Delay_Node, P_Expression_No_Right_Paren);
Check_Simple_Expression_In_Ada_83 (Expression (Delay_Node));
TF_Semicolon;
return Delay_Node;
end P_Delay_Relative_Statement;
---------------------------
-- 9.7 Select Statement --
---------------------------
-- SELECT_STATEMENT ::=
-- SELECTIVE_ACCEPT
-- | TIMED_ENTRY_CALL
-- | CONDITIONAL_ENTRY_CALL
-- | ASYNCHRONOUS_SELECT
-- SELECTIVE_ACCEPT ::=
-- select
-- [GUARD]
-- SELECT_ALTERNATIVE
-- {or
-- [GUARD]
-- SELECT_ALTERNATIVE
-- [else
-- SEQUENCE_OF_STATEMENTS]
-- end select;
-- GUARD ::= when CONDITION =>
-- Note: the guard preceding a select alternative is included as part
-- of the node generated for a selective accept alternative.
-- SELECT_ALTERNATIVE ::=
-- ACCEPT_ALTERNATIVE
-- | DELAY_ALTERNATIVE
-- | TERMINATE_ALTERNATIVE
-- TIMED_ENTRY_CALL ::=
-- select
-- ENTRY_CALL_ALTERNATIVE
-- or
-- DELAY_ALTERNATIVE
-- end select;
-- CONDITIONAL_ENTRY_CALL ::=
-- select
-- ENTRY_CALL_ALTERNATIVE
-- else
-- SEQUENCE_OF_STATEMENTS
-- end select;
-- ENTRY_CALL_ALTERNATIVE ::=
-- ENTRY_CALL_STATEMENT [SEQUENCE_OF_STATEMENTS]
-- ASYNCHRONOUS_SELECT ::=
-- select
-- TRIGGERING_ALTERNATIVE
-- then abort
-- ABORTABLE_PART
-- end select;
-- TRIGGERING_ALTERNATIVE ::=
-- TRIGGERING_STATEMENT [SEQUENCE_OF_STATEMENTS]
-- TRIGGERING_STATEMENT ::= ENTRY_CALL_STATEMENT | DELAY_STATEMENT
-- The caller has checked that the initial token is SELECT
-- Error recovery: can raise Error_Resync
function P_Select_Statement return Node_Id is
Select_Node : Node_Id;
Select_Sloc : Source_Ptr;
Stmnt_Sloc : Source_Ptr;
Ecall_Node : Node_Id;
Alternative : Node_Id;
Select_Pragmas : List_Id;
Alt_Pragmas : List_Id;
Statement_List : List_Id;
Alt_List : List_Id;
Cond_Expr : Node_Id;
Delay_Stmnt : Node_Id;
begin
Push_Scope_Stack;
Scope.Table (Scope.Last).Etyp := E_Select;
Scope.Table (Scope.Last).Ecol := Start_Column;
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Scope.Table (Scope.Last).Labl := Error;
Select_Sloc := Token_Ptr;
Scan; -- past SELECT
Stmnt_Sloc := Token_Ptr;
Select_Pragmas := P_Pragmas_Opt;
-- If first token after select is designator, then we have an entry
-- call, which must be the start of a conditional entry call, timed
-- entry call or asynchronous select
if Token in Token_Class_Desig then
-- Scan entry call statement
begin
Ecall_Node := P_Name;
-- ?? The following two clauses exactly parallel code in ch5
-- and should be commoned sometime
if Nkind (Ecall_Node) = N_Indexed_Component then
declare
Prefix_Node : constant Node_Id := Prefix (Ecall_Node);
Exprs_Node : constant List_Id := Expressions (Ecall_Node);
begin
Change_Node (Ecall_Node, N_Procedure_Call_Statement);
Set_Name (Ecall_Node, Prefix_Node);
Set_Parameter_Associations (Ecall_Node, Exprs_Node);
end;
elsif Nkind (Ecall_Node) = N_Function_Call then
declare
Fname_Node : constant Node_Id := Name (Ecall_Node);
Params_List : constant List_Id :=
Parameter_Associations (Ecall_Node);
begin
Change_Node (Ecall_Node, N_Procedure_Call_Statement);
Set_Name (Ecall_Node, Fname_Node);
Set_Parameter_Associations (Ecall_Node, Params_List);
end;
elsif Nkind (Ecall_Node) = N_Identifier
or else Nkind (Ecall_Node) = N_Selected_Component
then
-- Case of a call to a parameterless entry
declare
C_Node : constant Node_Id :=
New_Node (N_Procedure_Call_Statement, Stmnt_Sloc);
begin
Set_Name (C_Node, Ecall_Node);
Set_Parameter_Associations (C_Node, No_List);
Ecall_Node := C_Node;
end;
end if;
TF_Semicolon;
exception
when Error_Resync =>
Resync_Past_Semicolon;
return Error;
end;
Statement_List := P_Sequence_Of_Statements (SS_Eltm_Ortm_Tatm);
-- OR follows, we have a timed entry call
if Token = Tok_Or then
Scan; -- past OR
Alt_Pragmas := P_Pragmas_Opt;
Select_Node := New_Node (N_Timed_Entry_Call, Select_Sloc);
Set_Entry_Call_Alternative (Select_Node,
Make_Entry_Call_Alternative (Stmnt_Sloc,
Entry_Call_Statement => Ecall_Node,
Pragmas_Before => Select_Pragmas,
Statements => Statement_List));
-- Only possibility is delay alternative. If we have anything
-- else, give message, and treat as conditional entry call.
if Token /= Tok_Delay then
Error_Msg_SC
("only allowed alternative in timed entry call is delay!");
Discard_Junk_List (P_Sequence_Of_Statements (SS_Sreq));
Set_Delay_Alternative (Select_Node, Error);
else
Set_Delay_Alternative (Select_Node, P_Delay_Alternative);
Set_Pragmas_Before
(Delay_Alternative (Select_Node), Alt_Pragmas);
end if;
-- ELSE follows, we have a conditional entry call
elsif Token = Tok_Else then
Scan; -- past ELSE
Select_Node := New_Node (N_Conditional_Entry_Call, Select_Sloc);
Set_Entry_Call_Alternative (Select_Node,
Make_Entry_Call_Alternative (Stmnt_Sloc,
Entry_Call_Statement => Ecall_Node,
Pragmas_Before => Select_Pragmas,
Statements => Statement_List));
Set_Else_Statements
(Select_Node, P_Sequence_Of_Statements (SS_Sreq));
-- Only remaining case is THEN ABORT (asynchronous select)
elsif Token = Tok_Abort then
Select_Node :=
Make_Asynchronous_Select (Select_Sloc,
Triggering_Alternative =>
Make_Triggering_Alternative (Stmnt_Sloc,
Triggering_Statement => Ecall_Node,
Pragmas_Before => Select_Pragmas,
Statements => Statement_List),
Abortable_Part => P_Abortable_Part);
-- Else error
else
if Ada_Version = Ada_83 then
Error_Msg_BC ("OR or ELSE expected");
else
Error_Msg_BC ("OR or ELSE or THEN ABORT expected");
end if;
Select_Node := Error;
end if;
End_Statements;
-- Here we have a selective accept or an an asynchronous select (first
-- token after SELECT is other than a designator token).
else
-- If we have delay with no guard, could be asynchronous select
if Token = Tok_Delay then
Delay_Stmnt := P_Delay_Statement;
Statement_List := P_Sequence_Of_Statements (SS_Eltm_Ortm_Tatm);
-- Asynchronous select
if Token = Tok_Abort then
Select_Node :=
Make_Asynchronous_Select (Select_Sloc,
Triggering_Alternative =>
Make_Triggering_Alternative (Stmnt_Sloc,
Triggering_Statement => Delay_Stmnt,
Pragmas_Before => Select_Pragmas,
Statements => Statement_List),
Abortable_Part => P_Abortable_Part);
End_Statements;
return Select_Node;
-- Delay which was not an asynchronous select. Must be a selective
-- accept, and since at least one accept statement is required,
-- we must have at least one OR phrase present.
else
Alt_List := New_List (
Make_Delay_Alternative (Stmnt_Sloc,
Delay_Statement => Delay_Stmnt,
Pragmas_Before => Select_Pragmas,
Statements => Statement_List));
T_Or;
Alt_Pragmas := P_Pragmas_Opt;
end if;
-- If not a delay statement, then must be another possibility for
-- a selective accept alternative, or perhaps a guard is present
else
Alt_List := New_List;
Alt_Pragmas := Select_Pragmas;
end if;
Select_Node := New_Node (N_Selective_Accept, Select_Sloc);
Set_Select_Alternatives (Select_Node, Alt_List);
-- Scan out selective accept alternatives. On entry to this loop,
-- we are just past a SELECT or OR token, and any pragmas that
-- immediately follow the SELECT or OR are in Alt_Pragmas.
loop
if Token = Tok_When then
if Present (Alt_Pragmas) then
Error_Msg_SC ("pragmas may not precede guard");
end if;
Scan; -- past WHEN
Cond_Expr := P_Expression_No_Right_Paren;
T_Arrow;
Alt_Pragmas := P_Pragmas_Opt;
else
Cond_Expr := Empty;
end if;
if Token = Tok_Accept then
Alternative := P_Accept_Alternative;
-- Check for junk attempt at asynchronous select using
-- an Accept alternative as the triggering statement
if Token = Tok_Abort
and then Is_Empty_List (Alt_List)
and then No (Cond_Expr)
then
Error_Msg
("triggering statement must be entry call or delay",
Sloc (Alternative));
Scan; -- past junk ABORT
Discard_Junk_List (P_Sequence_Of_Statements (SS_Sreq));
End_Statements;
return Error;
end if;
elsif Token = Tok_Delay then
Alternative := P_Delay_Alternative;
elsif Token = Tok_Terminate then
Alternative := P_Terminate_Alternative;
else
Error_Msg_SC
("Select alternative (ACCEPT, ABORT, DELAY) expected");
Alternative := Error;
if Token = Tok_Semicolon then
Scan; -- past junk semicolon
end if;
end if;
-- THEN ABORT at this stage is just junk
if Token = Tok_Abort then
Error_Msg_SP ("misplaced `THEN ABORT`");
Scan; -- past junk ABORT
Discard_Junk_List (P_Sequence_Of_Statements (SS_Sreq));
End_Statements;
return Error;
else
if Alternative /= Error then
Set_Condition (Alternative, Cond_Expr);
Set_Pragmas_Before (Alternative, Alt_Pragmas);
Append (Alternative, Alt_List);
end if;
exit when Token /= Tok_Or;
end if;
T_Or;
Alt_Pragmas := P_Pragmas_Opt;
end loop;
if Token = Tok_Else then
Scan; -- past ELSE
Set_Else_Statements
(Select_Node, P_Sequence_Of_Statements (SS_Ortm_Sreq));
if Token = Tok_Or then
Error_Msg_SC ("select alternative cannot follow else part!");
end if;
end if;
End_Statements;
end if;
return Select_Node;
end P_Select_Statement;
-----------------------------
-- 9.7.1 Selective Accept --
-----------------------------
-- Parsed by P_Select_Statement (9.7)
------------------
-- 9.7.1 Guard --
------------------
-- Parsed by P_Select_Statement (9.7)
-------------------------------
-- 9.7.1 Select Alternative --
-------------------------------
-- SELECT_ALTERNATIVE ::=
-- ACCEPT_ALTERNATIVE
-- | DELAY_ALTERNATIVE
-- | TERMINATE_ALTERNATIVE
-- Note: the guard preceding a select alternative is included as part
-- of the node generated for a selective accept alternative.
-- Error recovery: cannot raise Error_Resync
-------------------------------
-- 9.7.1 Accept Alternative --
-------------------------------
-- ACCEPT_ALTERNATIVE ::=
-- ACCEPT_STATEMENT [SEQUENCE_OF_STATEMENTS]
-- Error_Recovery: Cannot raise Error_Resync
-- Note: the caller is responsible for setting the Pragmas_Before
-- field of the returned N_Terminate_Alternative node.
function P_Accept_Alternative return Node_Id is
Accept_Alt_Node : Node_Id;
begin
Accept_Alt_Node := New_Node (N_Accept_Alternative, Token_Ptr);
Set_Accept_Statement (Accept_Alt_Node, P_Accept_Statement);
-- Note: the reason that we accept THEN ABORT as a terminator for
-- the sequence of statements is for error recovery which allows
-- for misuse of an accept statement as a triggering statememt.
Set_Statements
(Accept_Alt_Node, P_Sequence_Of_Statements (SS_Eltm_Ortm_Tatm));
return Accept_Alt_Node;
end P_Accept_Alternative;
------------------------------
-- 9.7.1 Delay Alternative --
------------------------------
-- DELAY_ALTERNATIVE ::=
-- DELAY_STATEMENT [SEQUENCE_OF_STATEMENTS]
-- Error_Recovery: Cannot raise Error_Resync
-- Note: the caller is responsible for setting the Pragmas_Before
-- field of the returned N_Terminate_Alternative node.
function P_Delay_Alternative return Node_Id is
Delay_Alt_Node : Node_Id;
begin
Delay_Alt_Node := New_Node (N_Delay_Alternative, Token_Ptr);
Set_Delay_Statement (Delay_Alt_Node, P_Delay_Statement);
-- Note: the reason that we accept THEN ABORT as a terminator for
-- the sequence of statements is for error recovery which allows
-- for misuse of an accept statement as a triggering statememt.
Set_Statements
(Delay_Alt_Node, P_Sequence_Of_Statements (SS_Eltm_Ortm_Tatm));
return Delay_Alt_Node;
end P_Delay_Alternative;
----------------------------------
-- 9.7.1 Terminate Alternative --
----------------------------------
-- TERMINATE_ALTERNATIVE ::= terminate;
-- Error_Recovery: Cannot raise Error_Resync
-- Note: the caller is responsible for setting the Pragmas_Before
-- field of the returned N_Terminate_Alternative node.
function P_Terminate_Alternative return Node_Id is
Terminate_Alt_Node : Node_Id;
begin
Terminate_Alt_Node := New_Node (N_Terminate_Alternative, Token_Ptr);
Scan; -- past TERMINATE
TF_Semicolon;
-- For all other select alternatives, the sequence of statements
-- after the alternative statement will swallow up any pragmas
-- coming in this position. But the terminate alternative has no
-- sequence of statements, so the pragmas here must be treated
-- specially.
Set_Pragmas_After (Terminate_Alt_Node, P_Pragmas_Opt);
return Terminate_Alt_Node;
end P_Terminate_Alternative;
-----------------------------
-- 9.7.2 Timed Entry Call --
-----------------------------
-- Parsed by P_Select_Statement (9.7)
-----------------------------------
-- 9.7.2 Entry Call Alternative --
-----------------------------------
-- Parsed by P_Select_Statement (9.7)
-----------------------------------
-- 9.7.3 Conditional Entry Call --
-----------------------------------
-- Parsed by P_Select_Statement (9.7)
--------------------------------
-- 9.7.4 Asynchronous Select --
--------------------------------
-- Parsed by P_Select_Statement (9.7)
-----------------------------------
-- 9.7.4 Triggering Alternative --
-----------------------------------
-- Parsed by P_Select_Statement (9.7)
---------------------------------
-- 9.7.4 Triggering Statement --
---------------------------------
-- Parsed by P_Select_Statement (9.7)
---------------------------
-- 9.7.4 Abortable Part --
---------------------------
-- ABORTABLE_PART ::= SEQUENCE_OF_STATEMENTS
-- The caller has verified that THEN ABORT is present, and Token is
-- pointing to the ABORT on entry (or if not, then we have an error)
-- Error recovery: cannot raise Error_Resync
function P_Abortable_Part return Node_Id is
Abortable_Part_Node : Node_Id;
begin
Abortable_Part_Node := New_Node (N_Abortable_Part, Token_Ptr);
T_Abort; -- scan past ABORT
if Ada_Version = Ada_83 then
Error_Msg_SP ("(Ada 83) asynchronous select not allowed!");
end if;
Set_Statements (Abortable_Part_Node, P_Sequence_Of_Statements (SS_Sreq));
return Abortable_Part_Node;
end P_Abortable_Part;
--------------------------
-- 9.8 Abort Statement --
--------------------------
-- ABORT_STATEMENT ::= abort task_NAME {, task_NAME};
-- The caller has checked that the initial token is ABORT
-- Error recovery: cannot raise Error_Resync
function P_Abort_Statement return Node_Id is
Abort_Node : Node_Id;
begin
Abort_Node := New_Node (N_Abort_Statement, Token_Ptr);
Scan; -- past ABORT
Set_Names (Abort_Node, New_List);
loop
Append (P_Name, Names (Abort_Node));
exit when Token /= Tok_Comma;
Scan; -- past comma
end loop;
TF_Semicolon;
return Abort_Node;
end P_Abort_Statement;
end Ch9;
|
with Ada.Formatting;
with Interfaces;
with System.Machine_Code;
procedure fpu is
use type Interfaces.Unsigned_16;
CW : aliased Interfaces.Unsigned_16 := 0;
begin
System.Machine_Code.Asm ("fstcw (%0)",
Inputs => System.Address'Asm_Input ("r", CW'Address),
Volatile => True);
declare
function Image is
new Ada.Formatting.Modular_Image (
Interfaces.Unsigned_16,
Form => Ada.Formatting.Simple,
Signs => Ada.Formatting.Triming_Unsign_Marks,
Base => 16,
Digits_Width => 4);
begin
Ada.Debug.Put (Image (CW));
end;
-- 0 : IM (Invalid-op Mask), 1 as masking exceptions
-- 1 : DM (Denormal Mask)
-- 2 : ZM (Zero-divide Mask)
-- 3 : OM (Overflow Mask)
-- 4 : UM (Underflow Mask)
-- 5 : PM (Precision Mask)
-- 6 .. 7 : ??
-- 8 .. 9 : PC (Precision Control), expected to 2#11# as extended
-- 10 .. 11 : RC (Rounding Control), 0 as rounding
-- 12 : X (Infinity Control), no effect
-- 13 .. 15 : ??
if (CW and 16#0300#) = 16#0300# then
Ada.Debug.Put ("ok, extended precision");
end if;
end fpu;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Web API Definition --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2016, 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 WebAPI.WebGL.Shaders is
pragma Preelaborate;
type WebGL_Shader is limited interface;
type WebGL_Shader_Access is access all WebGL_Shader'Class
with Storage_Size => 0;
end WebAPI.WebGL.Shaders;
|
with Tkmrpc.Types;
with Tkmrpc.Results;
with Tkmrpc.Operations;
package Tkmrpc.Response is
Response_Size : constant := 1024;
Header_Size : constant := 24;
Body_Size : constant := Response_Size - Header_Size;
type Header_Type is record
Operation : Operations.Operation_Type;
Request_Id : Types.Request_Id_Type;
Result : Results.Result_Type;
end record;
for Header_Type use record
Operation at 0 range 0 .. (8 * 8) - 1;
Request_Id at 8 range 0 .. (8 * 8) - 1;
Result at 16 range 0 .. (8 * 8) - 1;
end record;
for Header_Type'Size use Header_Size * 8;
subtype Padded_Data_Range is Natural range 1 .. Body_Size;
subtype Padded_Data_Type is Types.Byte_Sequence (Padded_Data_Range);
type Data_Type is record
Header : Header_Type;
Padded_Data : Padded_Data_Type;
end record;
for Data_Type use record
Header at 0 range 0 .. (Header_Size * 8) - 1;
Padded_Data at Header_Size range 0 .. (Body_Size * 8) - 1;
end record;
for Data_Type'Size use Response_Size * 8;
Null_Data : constant Data_Type := Data_Type'
(Header => Header_Type'
(Operation => 0,
Request_Id => 0,
Result => Results.Invalid_Operation),
Padded_Data => Padded_Data_Type'(others => 0));
end Tkmrpc.Response;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . T H R E A D S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2016, AdaCore --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
-- The port of GNARL to bare board targets was initially developed by the --
-- Real-Time Systems Group at the Technical University of Madrid. --
-- --
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
with System.Parameters;
with System.BB.Parameters;
with System.BB.Board_Support;
with System.BB.Protection;
with System.BB.Threads.Queues;
with Ada.Unchecked_Conversion;
package body System.BB.Threads is
use System.Multiprocessors;
use System.BB.CPU_Primitives;
use System.BB.CPU_Primitives.Multiprocessors;
use System.BB.Time;
use System.BB.Parameters;
use Board_Support;
use type System.Address;
use type System.Parameters.Size_Type;
use type System.Storage_Elements.Storage_Offset;
procedure Initialize_Thread
(Id : Thread_Id;
Code : System.Address;
Arg : System.Address;
Priority : Integer;
This_CPU : System.Multiprocessors.CPU_Range;
Stack_Top : System.Address;
Stack_Bottom : System.Address);
-----------------------
-- Stack information --
-----------------------
-- Boundaries of the stack for the environment task, defined by the linker
-- script file.
Top_Of_Environment_Stack : constant System.Address;
pragma Import (Asm, Top_Of_Environment_Stack, "__stack_end");
-- Top of the stack to be used by the environment task
Bottom_Of_Environment_Stack : constant System.Address;
pragma Import (Asm, Bottom_Of_Environment_Stack, "__stack_start");
-- Bottom of the stack to be used by the environment task
------------------
-- Get_Affinity --
------------------
function Get_Affinity (Thread : Thread_Id) return CPU_Range is
begin
return Thread.Base_CPU;
end Get_Affinity;
-------------
-- Get_CPU --
-------------
function Get_CPU (Thread : Thread_Id) return CPU is
begin
if Thread.Base_CPU = Not_A_Specific_CPU then
-- Return the implementation specific default CPU
return CPU'First;
else
return CPU (Thread.Base_CPU);
end if;
end Get_CPU;
--------------
-- Get_ATCB --
--------------
function Get_ATCB return System.Address is
begin
-- This is not a light operation as there is a function call
return Queues.Running_Thread.ATCB;
end Get_ATCB;
------------------
-- Get_Priority --
------------------
function Get_Priority (Id : Thread_Id) return Integer is
begin
-- This function does not need to be protected by Enter_Kernel and
-- Leave_Kernel, because the Active_Priority value is only updated by
-- Set_Priority (atomically). Moreover, Active_Priority is marked as
-- Volatile.
return Id.Active_Priority;
end Get_Priority;
-----------------------------
-- Initialize_Thread --
-----------------------------
procedure Initialize_Thread
(Id : Thread_Id;
Code : System.Address;
Arg : System.Address;
Priority : Integer;
This_CPU : System.Multiprocessors.CPU_Range;
Stack_Top : System.Address;
Stack_Bottom : System.Address) is
begin
-- The environment thread executes the main procedure of the program
-- CPU of the environment thread is current one (initialization CPU)
Id.Base_CPU := This_CPU;
-- The active priority is initially equal to the base priority
Id.Base_Priority := Priority;
Id.Active_Priority := Priority;
-- Insert in the global list
-- ??? Not thread safe.
Id.Global_List := Queues.Global_List;
Queues.Global_List := Id;
-- Insert task inside the ready list (as last within its priority)
Queues.Insert (Id);
-- Store stack information
Id.Top_Of_Stack := Stack_Top;
Id.Bottom_Of_Stack := Stack_Bottom;
-- The initial state is Runnable
Id.State := Runnable;
-- Not currently in an interrupt handler
Id.In_Interrupt := False;
-- No wakeup has been yet signaled
Id.Wakeup_Signaled := False;
-- Initialize alarm status
Id.Alarm_Time := System.BB.Time.Time'Last;
Id.Next_Alarm := Null_Thread_Id;
-- Reset execution time
Id.Execution_Time :=
System.BB.Time.Initial_Composite_Execution_Time;
-- Initialize the saved registers. We can ignore the stack and code to
-- execute because the environment task is already executing. We are
-- interested in the initialization of the rest of the state, such as
-- the interrupt nesting level and the cache state.
Initialize_Context
(Buffer => Id.Context'Access,
Program_Counter => Code,
Argument => Arg,
Stack_Pointer => (if System.Parameters.Stack_Grows_Down
then Id.Top_Of_Stack
else Id.Bottom_Of_Stack));
end Initialize_Thread;
----------------
-- Initialize --
----------------
procedure Initialize
(Environment_Thread : Thread_Id;
Main_Priority : System.Any_Priority)
is
Main_CPU : constant System.Multiprocessors.CPU := Current_CPU;
begin
-- Perform some basic hardware initialization (clock, timer, and
-- interrupt handlers).
-- First initialize interrupt stacks
Interrupts.Initialize_Interrupts;
-- Then the CPU (which set interrupt stack pointer)
Initialize_CPU;
-- Then the devices
Board_Support.Initialize_Board;
Time.Initialize_Timers;
-- Initialize internal queues and the environment task
Protection.Enter_Kernel;
-- The environment thread executes the main procedure of the program
Initialize_Thread
(Environment_Thread, Null_Address, Null_Address,
Main_Priority, Main_CPU,
Top_Of_Environment_Stack'Address,
Bottom_Of_Environment_Stack'Address);
Queues.Running_Thread_Table (Main_CPU) := Environment_Thread;
-- The tasking executive is initialized
Initialized := True;
Protection.Leave_Kernel;
end Initialize;
----------------------
-- Initialize_Slave --
----------------------
procedure Initialize_Slave
(Idle_Thread : Thread_Id;
Idle_Priority : Integer;
Stack_Address : System.Address;
Stack_Size : System.Storage_Elements.Storage_Offset)
is
CPU_Id : constant System.Multiprocessors.CPU := Current_CPU;
begin
Initialize_Thread
(Idle_Thread, Null_Address, Null_Address,
Idle_Priority, CPU_Id,
Stack_Address + Stack_Size, Stack_Address);
Queues.Running_Thread_Table (CPU_Id) := Idle_Thread;
end Initialize_Slave;
--------------
-- Set_ATCB --
--------------
procedure Set_ATCB (Id : Thread_Id; ATCB : System.Address) is
begin
-- Set_ATCB is only called in the initialization of the task
Id.ATCB := ATCB;
end Set_ATCB;
------------------
-- Set_Priority --
------------------
procedure Set_Priority (Priority : Integer) is
begin
Protection.Enter_Kernel;
-- The Ravenscar profile does not allow dynamic priority changes. Tasks
-- change their priority only when they inherit the ceiling priority of
-- a PO (Ceiling Locking policy). Hence, the task must be running when
-- changing the priority. It is not possible to change the priority of
-- another thread within the Ravenscar profile, so that is why
-- Running_Thread is used.
-- Priority changes are only possible as a result of inheriting the
-- ceiling priority of a protected object. Hence, it can never be set
-- a priority which is lower than the base priority of the thread.
pragma Assert
(Queues.Running_Thread /= Null_Thread_Id
and then Priority >= Queues.Running_Thread.Base_Priority);
Queues.Change_Priority (Queues.Running_Thread, Priority);
Protection.Leave_Kernel;
end Set_Priority;
-----------
-- Sleep --
-----------
procedure Sleep is
Self_Id : constant Thread_Id := Queues.Running_Thread;
begin
Protection.Enter_Kernel;
-- It can only suspend if it is executing
pragma Assert
(Self_Id /= Null_Thread_Id and then Self_Id.State = Runnable);
if Self_Id.Wakeup_Signaled then
-- Another thread has already executed a Wakeup on this thread so
-- that we just consume the token and continue execution. It means
-- that just before this call to Sleep the task has been preempted
-- by the task that is awaking it. Hence the Sleep/Wakeup calls do
-- not happen in the expected order, and we use the Wakeup_Signaled
-- to flag this event so it is not lost.
-- The situation is the following:
-- 1) a task A is going to wait in an entry for a barrier
-- 2) task A releases the lock associated to the protected object
-- 3) task A calls Sleep to suspend itself
-- 4) a task B opens the barrier and awakes task A (calls Wakeup)
-- This is the expected sequence of events, but 4) may happen
-- before 3) because task A decreases its priority in step 2) as a
-- consequence of releasing the lock (Ceiling_Locking). Hence, task
-- A may be preempted by task B in the window between releasing the
-- protected object and actually suspending itself, and the Wakeup
-- call by task B in 4) can happen before the Sleep call in 3).
Self_Id.Wakeup_Signaled := False;
else
-- Update status
Self_Id.State := Suspended;
-- Extract from the list of ready threads
Queues.Extract (Self_Id);
-- The currently executing thread is now blocked, and it will leave
-- the CPU when executing the Leave_Kernel procedure.
end if;
Protection.Leave_Kernel;
-- Now the thread has been awaken again and it is executing
end Sleep;
-------------------
-- Thread_Create --
-------------------
procedure Thread_Create
(Id : Thread_Id;
Code : System.Address;
Arg : System.Address;
Priority : Integer;
Base_CPU : System.Multiprocessors.CPU_Range;
Stack_Address : System.Address;
Stack_Size : System.Storage_Elements.Storage_Offset)
is
begin
Protection.Enter_Kernel;
Initialize_Thread
(Id, Code, Arg, Priority, Base_CPU,
((Stack_Address + Stack_Size) /
Standard'Maximum_Alignment) * Standard'Maximum_Alignment,
Stack_Address);
Protection.Leave_Kernel;
end Thread_Create;
-----------------
-- Thread_Self --
-----------------
function Thread_Self return Thread_Id is
begin
-- Return the thread that is currently executing
return Queues.Running_Thread;
end Thread_Self;
------------
-- Wakeup --
------------
procedure Wakeup (Id : Thread_Id) is
begin
Protection.Enter_Kernel;
if Id.State = Suspended then
-- The thread is already waiting so that we awake it
-- Update status
Id.State := Runnable;
-- Insert the thread at the tail of its active priority so that the
-- thread will resume execution.
Queues.Insert (Id);
else
-- The thread is not yet waiting so that we just signal that the
-- Wakeup command has been executed. We are waking up a task that
-- is going to wait in an entry for a barrier, but before calling
-- Sleep it has been preempted by the task awaking it.
Id.Wakeup_Signaled := True;
end if;
pragma Assert (Id.State = Runnable);
Protection.Leave_Kernel;
end Wakeup;
end System.BB.Threads;
|
function Warnsdorff_Get_Tour(Start_X, Start_Y: Index; Scene: Tour := Empty)
return Tour;
-- uses Warnsdorff heurisitic to find a tour faster
-- same interface as Get_Tour
|
-- sarge_test.adb - Implementation file for the Sarge command line argument parser test.
-- Revision 0
-- Features:
-- -
-- Notes:
-- -
-- 2019/04/10, Maya Posch
with Sarge;
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Strings.Unbounded;
use Ada.Strings.Unbounded;
procedure Sarge_Test is
function "+"(S : in String) return Unbounded_String renames Ada.Strings.Unbounded.To_Unbounded_String;
begin
-- Create Sarge instance, set stuff, parse stuff.
Sarge.setArgument(+"h", +"help", +"Get help.", False);
Sarge.setArgument(+"k", +"kittens", +"K is for kittens. Everyone needs kittens in their life.", True);
Sarge.setArgument(+"n", +"number", +"Gimme a number. Any number.", True);
Sarge.setArgument(+"a", +"apple", +"Just an apple.", False);
Sarge.setArgument(+"b", +"bear", +"Look, it's a bear.", False);
Sarge.setDescription(+"Sarge command line argument parsing testing app. For demonstration purposes and testing.");
Sarge.setUsage(+"sarge_test <options>");
if Sarge.parseArguments /= True then
put_line("Couldn't parse arguments...");
return;
end if;
put_line("Number of flags found: " & Sarge.flagCount'Image);
if Sarge.exists(+"help") /= False then
Sarge.printHelp;
else
put_line("No help requested...");
end if;
--
end Sarge_Test;
|
-----------------------------------------------------------------------
-- Util -- Utilities
-- Copyright (C) 2009, 2010, 2021 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.Testsuite;
with Util.Tests;
with Util.Properties;
procedure Util_Harness is
procedure Initialize (Props : in Util.Properties.Manager);
procedure Harness is new Util.Tests.Harness (Util.Testsuite.Suite, Initialize);
procedure Initialize (Props : in Util.Properties.Manager) is
pragma Unreferenced (Props);
Path : constant String := Util.Tests.Get_Test_Path ("");
begin
if not Ada.Directories.Exists (Path) then
Ada.Directories.Create_Directory (Path);
end if;
end Initialize;
begin
Harness ("util-tests.xml");
end Util_Harness;
|
with GLOBE_3D.Options,
GLOBE_3D.Textures,
GLOBE_3D.Math,
GLOBE_3D.Portals;
with GL.Errors,
GL.Skins;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Exceptions; use Ada.Exceptions;
with Ada.Strings.Fixed; use Ada.Strings, Ada.Strings.Fixed;
with Ada.Text_IO; use Ada.Text_IO;
with System.Storage_Elements;
with Ada.Containers.Generic_Array_Sort;
package body GLOBE_3D is
use GLOBE_3D.Options;
package G3DT renames GLOBE_3D.Textures;
package G3DM renames GLOBE_3D.Math;
--
package List_Id_Generator is
function New_List_Id return List_Ids;
private
Available_List_Id : List_Ids := List_Ids'First;
end List_Id_Generator;
package body List_Id_Generator is
function New_List_Id return List_Ids is
begin
Available_List_Id := Available_List_Id + 1;
return Available_List_Id - 1;
end New_List_Id;
end List_Id_Generator;
--
function Image (r : Real) return String is
s : String (1 .. 10);
begin
RIO.Put (s, r, 4, 0);
return s;
exception
when Ada.Text_IO.Layout_Error =>
return Real'Image (r);
end Image;
function Coords (p : Point_3D) return String is
begin
return ' (' & Image (p (0)) &
', ' & Image (p (1)) &
', ' & Image (p (2)) &
')';
end Coords;
-- normal support
--
procedure Add_Normal_of_3p (o : in Object_3d'Class;
Pn0, Pn1, Pn2 : in Integer;
N : in out Vector_3D) is
use GL, G3dm;
function Params return String is
begin
return
" Object : " & Trim (o.id, right) &
" Pn0=" & Integer'Image (Pn0) &
" Pn1=" & Integer'Image (Pn1) &
" Pn2=" & Integer'Image (Pn2);
end Params;
N_contrib : Vector_3D;
begin
if Pn0=0 or Pn1=0 or Pn2=0 then return; end if;
N_contrib := (o.point (Pn1) - o.point (Pn0))* (o.point (Pn2) - o.point (Pn0)) ;
if strict_geometry and then Almost_zero (Norm2 (N_contrib)) then
raise_exception (zero_normal'Identity,
Params &
" P0=" & Coords (o.point (Pn0)) &
" P1=" & Coords (o.point (Pn1)) &
" P2=" & Coords (o.point (Pn2)) &
" Nc=" & Coords (N_contrib)
);
end if;
N := N + N_contrib;
exception
when e : others =>
raise_exception (
Exception_Identity (e),
Exception_Message (e) & Params
);
end Add_Normal_of_3p;
-- blending support
--
function Is_to_blend (m : GL.Double) return Boolean is
use GL, G3DM;
begin
return not Almost_zero (m - 1.0);
end Is_to_blend;
function Is_to_blend (m : GL.Float) return Boolean is
use GL, G3DM;
begin
return not Almost_zero (m - 1.0);
end Is_to_blend;
function Is_to_blend (m : GL.Material_Float_vector) return Boolean is
begin
return Is_to_blend (m (3));
end Is_to_blend;
function Is_to_blend (m : GL.Materials.Material_type) return Boolean is
begin
return
Is_to_blend (m.ambient) or
Is_to_blend (m.diffuse) or
Is_to_blend (m.specular);
-- m.emission, m.shininess not relevant
end Is_to_blend;
-- material support
--
procedure Set_Material (m : GL.Materials.Material_type) is
use GL;
begin
Material (FRONT_AND_BACK, AMBIENT, m.ambient);
Material (FRONT_AND_BACK, DIFFUSE, m.diffuse);
Material (FRONT_AND_BACK, SPECULAR, m.specular);
Material (FRONT_AND_BACK, EMISSION, m.emission);
Material (FRONT_AND_BACK, SHININESS, m.shininess);
end Set_Material;
-- 'Visual'
--
procedure free (o : in out p_Visual)
is
procedure deallocate is new ada.unchecked_deallocation (Visual'Class, p_Visual);
begin
destroy (o.all);
deallocate (o);
end free;
function skinned_Geometrys (o : in Visual) return GL.skinned_geometry.skinned_Geometrys
is
begin
return GL.skinned_geometry.null_skinned_Geometrys;
end skinned_Geometrys;
function Width (o : in Visual'class) return Real
is
begin
return bounds (o).box.X_Extent.Max - bounds (o).box.X_Extent.Min;
end Width;
function Height (o : in Visual'class) return Real
is
begin
return bounds (o).box.Y_Extent.Max - bounds (o).box.Y_Extent.Min;
end Height;
function Depth (o : in Visual'class) return Real
is
begin
return bounds (o).box.Z_Extent.Max - bounds (o).box.Z_Extent.Min;
end Depth;
-- 'Object_3D'
--
-- object validation
--
procedure Check_object (o : Object_3D) is
use G3DM;
procedure Check_faces is
procedure Check (f, v : Integer) is
pragma Inline (Check);
begin
if v < 0 or else v > o.max_points then
raise_exception (bad_vertex_number'Identity,
o.id & " face=" & Integer'Image (f) &
" vertex=" & Integer'Image (v));
end if;
end Check;
procedure Check_duplicate (f, Pn1, Pn2 : Integer) is
pragma Inline (Check_duplicate);
begin
-- Skip "dead" edge (triangle), 30 - Dec - 2001
if Pn1=0 or else Pn2=0 then return; end if;
-- Detect same point number
if Pn1=Pn2 then
raise_exception (duplicated_vertex'Identity,
o.id & " in face " & Integer'Image (f));
end if;
-- Detect same point coordinates (tolerated in an object,
-- although inefficient, but harms as vertex of the same face!)
if Almost_zero (Norm2 (o.point (Pn1) - o.point (Pn2))) then
raise_exception (duplicated_vertex_location'Identity,
o.id & " in face " & Integer'Image (f));
end if;
end Check_duplicate;
begin
for fa in o.face'Range loop
for edge_num in 1 .. 4 loop
Check (fa, o.face (fa).P (edge_num));
for other_edge in edge_num + 1 .. 4 loop
Check_duplicate (fa, o.face (fa).P (edge_num),
o.face (fa).P (other_edge));
end loop;
end loop;
end loop; -- fa
end Check_faces;
begin
Check_faces;
end Check_object;
--------------------------------------------
-- Object initialization (1x in its life) --
--------------------------------------------
procedure Pre_calculate (o : in out Object_3D) is
use GL, G3DM;
N : Vector_3D;
length_N : Real;
procedure Calculate_face_invariants (
fa : in Face_type;
fi : out Face_invariant_type
) is
l : Natural := 0;
quadri_edge : array (fa.P'Range) of Natural;
ex_U, ex_V : Real;
begin
l := 0;
for qe in fa.P'Range loop
if fa.P (qe) /= 0 then
l := l + 1;
quadri_edge (l) := qe; -- if triangle, "map" edge on a quadri
fi.P_compact (l) := fa.P (qe);
end if;
end loop;
if l in Edge_count then
fi.last_edge := l;
else
raise_exception (bad_edge_number'Identity, o.id);
end if;
-- * Face invariant : Textured face : extremities
for e in 1 .. l loop
if fa.whole_texture then
ex_U := Real (fa.repeat_U);
ex_V := Real (fa.repeat_V);
case quadri_edge (e) is
when 1 => fi.UV_extrema (e) := (0.0, 0.0); -- bottom, left 4 --< --3
when 2 => fi.UV_extrema (e) := (ex_U, 0.0); -- bottom, right | |
when 3 => fi.UV_extrema (e) := (ex_U, ex_V); -- top, right 1 --> --2
when 4 => fi.UV_extrema (e) := (0.0, ex_V); -- top, left
when others => null;
end case;
else
-- Just copy the mapping, but in compact form for triangles:
fi.UV_extrema (e) := fa.texture_edge_map (quadri_edge (e));
end if;
end loop;
-- * Face invariant : Normal of unrotated face
N := (0.0, 0.0, 0.0);
case fi.last_edge is
when 3 =>
Add_Normal_of_3p (o,
fi.P_compact (1),
fi.P_compact (2),
fi.P_compact (3),
N
);
when 4 =>
Add_Normal_of_3p (o, fa.P (1), fa.P (2), fa.P (4), N);
-- We sum other normals for not perfectly flat faces,
-- in order to have a convenient average .. .
Add_Normal_of_3p (o, fa.P (2), fa.P (3), fa.P (1), N);
Add_Normal_of_3p (o, fa.P (3), fa.P (4), fa.P (2), N);
Add_Normal_of_3p (o, fa.P (4), fa.P (1), fa.P (3), N);
end case;
length_N := Norm (N);
if Almost_zero (length_N) then
if strict_geometry then
raise zero_summed_normal;
else
fi.normal := N; -- 0 vector !
end if;
else
fi.normal := (1.0 / length_N) * N;
end if;
end Calculate_face_invariants;
adjacent_faces : array (o.point'Range) of Natural := (others => 0);
pf : Natural;
length : Real;
begin --Pre_calculate
if full_check_objects then Check_object (o); end if;
for i in o.face'Range loop
begin
-- Geometry
Calculate_face_invariants (o.face (i), o.face_invariant (i));
-- Disable blending when alphas are = 1
case o.face (i).skin is
when material_only | material_texture =>
o.face_invariant (i).blending := Is_to_blend (o.face (i).material);
when colour_only | coloured_texture | texture_only =>
o.face_invariant (i).blending := Is_to_blend (o.face (i).alpha);
when invisible =>
o.face_invariant (i).blending := False;
end case;
o.transparent := o.transparent or o.face_invariant (i).blending;
exception
when zero_summed_normal =>
raise_exception (zero_summed_normal'Identity,
o.id & " face=" & Integer'Image (i));
end;
end loop;
declare
use globe_3d.REF;
max_Norm2 : Real := 0.0;
begin
o.bounds.box.X_Extent.Min := Real'Last; o.bounds.box.X_Extent.Max := Real'First;
o.bounds.box.Y_Extent.Min := Real'Last; o.bounds.box.Y_Extent.Max := Real'First;
o.bounds.box.Z_Extent.Min := Real'Last; o.bounds.box.Z_Extent.Max := Real'First;
for p in o.point'Range loop
o.edge_vector (p) := (0.0, 0.0, 0.0);
max_Norm2 := Real'Max (Norm2 (o.Point (p)), max_Norm2);
o.bounds.box.X_Extent.Min := Real'Min (o.bounds.box.X_Extent.Min, o.Point (p) (0)); -- tbd : set extents and bounding sphere radius in
o.bounds.box.X_Extent.Max := Real'Max (o.bounds.box.X_Extent.Max, o.Point (p) (0)); -- common procedure for 'object_base' class.
o.bounds.box.Y_Extent.Min := Real'Min (o.bounds.box.Y_Extent.Min, o.Point (p) (1));
o.bounds.box.Y_Extent.Max := Real'Max (o.bounds.box.Y_Extent.Max, o.Point (p) (1));
o.bounds.box.Z_Extent.Min := Real'Min (o.bounds.box.Z_Extent.Min, o.Point (p) (2));
o.bounds.box.Z_Extent.Max := Real'Max (o.bounds.box.Z_Extent.Max, o.Point (p) (2));
end loop;
o.bounds.sphere_Radius := sqRt (max_Norm2);
end;
-- Calculate edge vectors.
-- Naive algorithm : for each point, scan all faces to see
-- if they are adjacent. It took #points * #faces steps.
-- - > better algorithm here : 2 * #points + 4 * #faces. (22 - Jan - 2006)
for f in o.face'Range loop
for p in o.face (f).P'Range loop
pf := o.face (f).P (p);
if pf /= 0 then
adjacent_faces (pf) := adjacent_faces (pf) + 1;
o.edge_vector (pf) := o.edge_vector (pf) + o.face_invariant (f).normal;
end if;
end loop;
if is_textured (o.face (f).skin) and then
not Textures.Valid_texture_ID (o.face (f).texture) then
raise_exception (Textures.Undefined_texture_ID'Identity,
Trim (o.id, right) &
" face=" & Integer'Image (f) &
" skin=" & Skin_Type'Image (o.face (f).skin) &
" texture_id=" & Image_ID'Image (o.face (f).texture));
end if;
end loop;
for p in o.point'Range loop
if adjacent_faces (p) = 0 then
if strict_geometry then
-- Strict approach : detect any unmatched point:
raise_exception (point_unmatched'Identity,
Trim (o.id, right) &
" point " & Integer'Image (p) &
" belongs to none of the object's face");
end if;
else
length := Norm (o.edge_vector (p));
if not Almost_zero (length) then
o.edge_vector (p) := (1.0/length) * o.edge_vector (p);
end if;
end if;
end loop;
-- Ooof. Now we can certify:
o.pre_calculated := True;
end Pre_calculate;
procedure Arrow (P : Point_3D; D : Vector_3D) is
use GL, G3DM;
V, V1, V2 : Vector_3D;
begin
if Almost_zero (Norm2 (D)) then
return;
end if;
V := (D (1), - D (0), 0.0); -- an orthogonal, or zero
if Almost_zero (Norm2 (V)) then -- bad luck, it is zero
V := (0.0, - D (2), D (1)); -- 2nd try
end if;
V := (0.2/Norm (V)) * V;
V1 := 0.7*D + V;
V2 := 0.7*D - V;
GL_Begin (GL.LINES);
Vertex (P + D); Vertex (P);
Vertex (P + D); Vertex (P + V1);
Vertex (P + D); Vertex (P + V2);
GL_End;
end Arrow;
neutral_material_already_set : Boolean := False;
-------------
-- Display --
-------------
procedure Display_one (o : in out Object_3D) is
-- Display only this object and not connected objects
-- out : object will be initialized if not yet
--
--
-- Display face routine which is optimized to produce a shorter list
-- of GL commands. Runs slower then the original Display face routine
-- yet needs to be executed only once.
--
-- Uwe R. Zimmer, July 2011
--
package Display_face_optimized is
procedure Display_face (First_Face : Boolean; fa : Face_type; fi : in out Face_invariant_type);
private
Previous_face : Face_type;
Previous_face_Invariant : Face_invariant_type;
end Display_face_optimized;
package body Display_face_optimized is
use GL.Materials;
procedure Display_face (First_Face : Boolean; fa : Face_type; fi : in out Face_invariant_type) is
use GL;
blending_hint : Boolean;
begin -- Display_face
if fa.skin = invisible then
Previous_face := fa;
Previous_face_Invariant := fi;
return;
end if;
--------------
-- Material --
--------------
if First_Face
or else Previous_face.skin = invisible
or else fa.skin /= Previous_face.skin
or else (fa.skin = Previous_face.skin
and then fa.material /= Previous_face.material) then
case fa.skin is
when material_only | material_texture =>
Disable (COLOR_MATERIAL);
Set_Material (fa.material);
when others =>
Set_Material (GL.Materials.neutral_material);
end case;
end if;
------------
-- Colour --
------------
if First_Face
or else Previous_face.skin = invisible
or else fa.skin /= Previous_face.skin
or else (fa.skin = Previous_face.skin
and then (fa.colour /= Previous_face.colour
or else fa.alpha /= Previous_face.alpha)) then
case fa.skin is
when material_only | material_texture =>
null; -- done above
when colour_only | coloured_texture =>
Enable (COLOR_MATERIAL);
ColorMaterial (FRONT_AND_BACK, AMBIENT_AND_DIFFUSE);
Color (red => fa.colour.red,
green => fa.colour.green,
blue => fa.colour.blue,
alpha => fa.alpha);
when texture_only =>
Disable (COLOR_MATERIAL);
when invisible =>
null;
end case;
end if;
-------------
-- Texture --
-------------
if First_Face
or else Previous_face.skin = invisible
or else fa.skin /= Previous_face.skin
or else (fa.skin = Previous_face.skin
and then fa.texture /= Previous_face.texture) then
case fa.skin is
when texture_only | coloured_texture | material_texture =>
Enable (TEXTURE_2D);
G3DT.Check_2D_texture (fa.texture, blending_hint);
GL.BindTexture (GL.TEXTURE_2D, GL.Uint (Image_id'Pos (fa.texture) + 1));
-- ^ superfluous ?!!
if blending_hint then
fi.blending := True;
-- 13 - Oct - 2006 : override decision made at Pre_calculate
-- if texture data contains an alpha layer
end if;
when colour_only | material_only =>
Disable (TEXTURE_2D);
when invisible =>
null;
end case;
end if;
-----------------------------
-- Blending / transparency --
-----------------------------
if First_Face
or else Previous_face.skin = invisible
or else fi.blending /= Previous_face_Invariant.blending then
if fi.blending then
Enable (BLEND); -- See 4.1.7 Blending
BlendFunc (sfactor => SRC_ALPHA,
dfactor => ONE_MINUS_SRC_ALPHA);
-- Disable (DEPTH_TEST);
-- Disable (CULL_FACE);
else
Disable (BLEND);
-- Enable (DEPTH_TEST);
-- Enable (CULL_FACE);
-- CullFace (BACK);
end if;
end if;
-------------
-- Drawing --
-------------
case fi.last_edge is
when 3 => GL_Begin (TRIANGLES);
when 4 => GL_Begin (QUADS);
end case;
for i in 1 .. fi.last_edge loop
if is_textured (fa.skin) then
TexCoord (fi.UV_extrema (i).U, fi.UV_extrema (i).V);
end if;
Normal (o.edge_vector (fi.P_compact (i)));
Vertex (o.point (fi.P_compact (i)));
end loop;
GL_End;
Previous_face := fa;
Previous_face_Invariant := fi;
end Display_face;
end Display_face_optimized;
--
procedure Display_face (fa : Face_type; fi : in out Face_invariant_type) is
use GL;
blending_hint : Boolean;
begin -- Display_face
if fa.skin = invisible then
return;
end if;
--------------
-- Material --
--------------
case fa.skin is
when material_only | material_texture =>
Disable (COLOR_MATERIAL);
Set_Material (fa.material);
neutral_material_already_set := False;
when others =>
-- Avoid setting again and again the neutral material
if not neutral_material_already_set then
Set_Material (GL.Materials.neutral_material);
neutral_material_already_set := True;
end if;
end case;
------------
-- Colour --
------------
case fa.skin is
when material_only | material_texture =>
null; -- done above
when colour_only | coloured_texture =>
Enable (COLOR_MATERIAL);
ColorMaterial (FRONT_AND_BACK, AMBIENT_AND_DIFFUSE);
Color (
red => fa.colour.red,
green => fa.colour.green,
blue => fa.colour.blue,
alpha => fa.alpha
);
when texture_only =>
Disable (COLOR_MATERIAL);
when invisible =>
null;
end case;
-------------
-- Texture --
-------------
case fa.skin is
when texture_only | coloured_texture | material_texture =>
Enable (TEXTURE_2D);
G3DT.Check_2D_texture (fa.texture, blending_hint);
GL.BindTexture (GL.TEXTURE_2D, GL.Uint (Image_id'Pos (fa.texture) + 1));
-- ^ superfluous ?!!
if blending_hint then
fi.blending := True;
-- 13 - Oct - 2006 : override decision made at Pre_calculate
-- if texture data contains an alpha layer
end if;
when colour_only | material_only =>
Disable (TEXTURE_2D);
when invisible =>
null;
end case;
-----------------------------
-- Blending / transparency --
-----------------------------
if fi.blending then
Enable (BLEND); -- See 4.1.7 Blending
BlendFunc (sfactor => SRC_ALPHA,
dfactor => ONE_MINUS_SRC_ALPHA);
-- Disable (DEPTH_TEST);
-- Disable (CULL_FACE);
else
Disable (BLEND);
-- Enable (DEPTH_TEST);
-- Enable (CULL_FACE);
-- CullFace (BACK);
end if;
-------------
-- Drawing --
-------------
case fi.last_edge is
when 3 => GL_Begin (TRIANGLES);
when 4 => GL_Begin (QUADS);
end case;
for i in 1 .. fi.last_edge loop
if is_textured (fa.skin) then
TexCoord (fi.UV_extrema (i).U, fi.UV_extrema (i).V);
end if;
Normal (o.edge_vector (fi.P_compact (i)));
Vertex (o.point (fi.P_compact (i)));
end loop;
GL_End;
end Display_face;
procedure Display_normals is
use GL, G3DM;
C : Vector_3D;
begin
GL.Color (0.5, 0.5, 1.0, 1.0);
-- show pseudo (average) normals at edges:
for e in o.point'Range loop
Arrow (o.point (e), arrow_inflator * o.edge_vector (e));
end loop;
GL.Color (1.0, 1.0, 0.5, 1.0);
-- show normals of faces:
for f in o.face'Range loop
C := (0.0, 0.0, 0.0);
for i in 1 .. o.face_invariant (f).last_edge loop
C := C + o.point (o.face_invariant (f).P_compact (i));
end loop;
C := (1.0/Real (o.face_invariant (f).last_edge)) * C;
Arrow (C, arrow_inflator * o.face_invariant (f).normal);
end loop;
end Display_normals;
use GL, G3DM;
begin -- Display_one
if not o.pre_calculated then
Pre_calculate (o);
end if;
GL.bindBuffer (gl.ARRAY_BUFFER, 0); -- disable 'vertex buffer objects'
GL.bindBuffer (gl.ELEMENT_ARRAY_BUFFER, 0); -- disable 'vertex buffer objects' indices
-- GL.disableClientState (gl.TEXTURE_COORD_ARRAY);
-- GL.disable (ALPHA_TEST);
GL.enable (Lighting);
GL.PushMatrix; -- 26 - May - 2006 : instead of rotating/translating back
GL.Translate (o.centre);
Multiply_GL_Matrix (o.rotation);
-- List preparation phase
case o.List_Status is
when No_list | Is_List => null;
when Generate_List =>
o.List_Id := List_Id_Generator.New_List_Id;
GL.NewList (GL.uint (o.List_Id), COMPILE_AND_EXECUTE);
end case;
-- Execution phase
case o.List_Status is
when No_list =>
for f in o.face'Range loop
Display_face (o.face (f), o.face_invariant (f));
end loop;
when Generate_List =>
for f in o.face'Range loop
Display_face_optimized.Display_face (f = o.face'First, o.face (f), o.face_invariant (f));
end loop;
when Is_List => GL.CallList (GL.uint (o.List_Id));
end case;
-- Close list
case o.List_Status is
when No_list | Is_List => null;
when Generate_List =>
GL.EndList;
if GL.GetError = OUT_OF_MEMORY then
o.List_Status := No_List;
else
o.List_Status := Is_List;
end if;
end case;
if show_normals then
GL.Disable (GL.LIGHTING);
GL.Disable (GL.TEXTURE_2D);
Display_normals;
GL.Enable (GL.LIGHTING); -- mmmh .. .
end if;
GL.PopMatrix; -- 26 - May - 2006 : instead of rotating/translating back
-- GL.Rotate (o.auto_rotation (2), 0.0, 0.0, - 1.0);
-- GL.Rotate (o.auto_rotation (1), 0.0, - 1.0, 0.0);
-- GL.Rotate (o.auto_rotation (0), - 1.0, 0.0, 0.0);
-- GL.Translate ( - o.centre);
end Display_one;
procedure Display (
o : in out Object_3D;
clip : in Clipping_data
)
is
use GLOBE_3D.Portals;
procedure Display_clipped (
o : in out Object_3D'Class;
clip_area : in Clipping_area;
portal_depth : in Natural
)
is
procedure Try_portal (f : Positive) is
use G3DM, GL;
dp : Real;
plane_to_eye : Vector_3D; -- vector from any point in plane to the eye
bounding_of_face, intersection_clip_and_face : Clipping_area;
success, non_empty_intersection : Boolean;
begin
-- Culling #1 : check if portal is in vield of view's "dead angle"
dp := o.face_invariant (f).normal * clip.view_direction;
if dp < clip.max_dot_product then
-- Culling #2 : check if we are on the right side of the portal
-- NB : ignores o.auto_rotation !
plane_to_eye :=
clip.eye_position -
(o.point (o.face_invariant (f).P_compact (1)) + o.centre)
;
dp := plane_to_eye * o.face_invariant (f).normal;
-- dp = signed distance to the plane
if dp > 0.0 then
-- Culling #3 : clipping rectangle
Find_bounding_box (o, f, bounding_of_face, success);
if success then
Intersect (clip_area, bounding_of_face,
intersection_clip_and_face, non_empty_intersection);
else
-- in doubt, draw with the present clipping
intersection_clip_and_face := clip_area;
non_empty_intersection := True;
end if;
if non_empty_intersection then
-- Recursion here:
Display_clipped (
o => o.face (f).connecting.all,
clip_area => intersection_clip_and_face,
portal_depth => portal_depth + 1
);
end if;
end if;
end if;
end Try_portal;
begin -- Display_clipped
if not o.pre_calculated then
Pre_calculate (o);
end if;
--
-- a/ Display connected objects which are visible through o's faces
-- This is where recursion happens
if (not filter_portal_depth) or else -- filter_portal_depth : test/debug
portal_depth <= 6
then
for f in o.face'Range loop
if o.face (f).connecting /= null and then
not o.face_invariant (f).portal_seen
-- ^ prevents infinite recursion on rare cases where
-- object A or B is not convex, and A and B see each other
-- and the culling by clipping cannot stop the recursion
-- (e.g. origin2.proc, tomb.proc)
--
-- NB : drawing [different parts of] the same object several times
-- is right, since portions can be seen through different portals,
-- but going more than once through the same portal is wrong
then
o.face_invariant (f).portal_seen := True;
Try_portal (f);
-- ^ recursively calls Display_clipped for
-- objects visible through face f.
end if;
end loop;
end if;
-- b/ Display the object itself
if (not filter_portal_depth) or else -- filter_portal_depth : test/debug
(portal_depth = 1 or portal_depth = 5)
then
-- The graphical clipping (Scissor) gives various effects
-- - almost no speedup on the ATI Radeon 9600 Pro (hardware)
-- - factor : ~ Sqrt (clipped surface ratio) with software GL
if portal_depth > 0 then
GL.Enable (GL.SCISSOR_TEST);
GL.Scissor (
x => GL.Int (clip_area.x1),
y => GL.Int (clip_area.y1),
width => GL.SizeI (clip_area.x2 - clip_area.x1 + 1),
height => GL.SizeI (clip_area.y2 - clip_area.y1 + 1)
);
else
GL.Disable (GL.SCISSOR_TEST);
end if;
info_b_ntl2 := info_b_ntl2 + 1;
info_b_ntl3 := Natural'Max (portal_depth, info_b_ntl3);
Display_one (o);
end if;
if show_portals and then portal_depth > 0 then
Draw_boundary (clip.main_clipping, clip_area);
end if;
end Display_clipped;
procedure Reset_portal_seen (o : in out Object_3D'Class) is
begin
for f in o.face'Range loop
if o.face_invariant (f).portal_seen then
o.face_invariant (f).portal_seen := False;
Reset_portal_seen (o.face (f).connecting.all);
end if;
end loop;
end Reset_portal_seen;
begin
info_b_ntl2 := 0; -- count amount of objects displayed, not distinct
info_b_ntl3 := 0; -- records max depth
Display_clipped (o, clip_area => clip.main_clipping, portal_depth => 0);
Reset_portal_seen (o);
end Display;
procedure Destroy (o : in out Object_3D) is
ol : p_Object_3D_list := o.sub_objects;
begin
while ol /= null loop
Free (p_Visual (ol.objc));
ol := ol.next;
end loop;
end Destroy;
procedure set_Alpha (o : in out Object_3D; Alpha : in GL.Double) is
begin
for f in o.face'Range loop
o.face (f).alpha := Alpha;
end loop;
end set_Alpha;
function is_Transparent (o : in Object_3D) return Boolean is
begin
return o.transparent;
end is_Transparent;
function face_Count (o : in Object_3D) return Natural is
begin
return o.Max_faces;
end face_Count;
function Bounds (o : in Object_3D) return GL.geometry.Bounds_record is
begin
return o.Bounds;
end Bounds;
-- Lighting support.
--
-- lights : array (Light_ident) of Light_definition;
light_defined : array (Light_ident) of Boolean := (others => False);
procedure Define (which : Light_ident; as : Light_definition) is
id : constant GL.LightIDEnm := GL.LightIDEnm'Val (which - 1);
use GL;
begin
-- lights (which) := as;
Light (id, POSITION, as.position);
Light (id, AMBIENT, as.ambient);
Light (id, DIFFUSE, as.diffuse);
Light (id, SPECULAR, as.specular);
light_defined (which) := True;
end Define;
procedure Switch_lights (on : Boolean) is
begin
for l in Light_ident loop
Switch_light (l, on);
end loop;
end Switch_lights;
function Server_id (which : Light_ident) return GL.ServerCapabilityEnm is
begin
return GL.ServerCapabilityEnm'Val (GL.ServerCapabilityEnm'Pos (GL.LIGHT0) + which - 1);
end Server_id;
procedure Switch_light (which : Light_ident; on : Boolean) is
begin
if light_defined (which) then
if on then
GL.Enable (Server_id (which));
else
GL.Disable (Server_id (which));
end if;
end if;
end Switch_light;
function Is_light_switched (which : Light_ident) return Boolean is
begin
return Boolean'Val (GL.IsEnabled (Server_id (which)));
end Is_light_switched;
procedure Reverse_light_switch (which : Light_ident) is
begin
Switch_light (which, not Is_light_switched (which));
end Reverse_light_switch;
prec_a360 : constant := 10000;
r_prec_a360 : constant := 10000.0;
i_r_prec_a360 : constant := 1.0 / r_prec_a360;
procedure Angles_modulo_360 (v : in out Vector_3D)is
use GL;
begin
for i in v'Range loop
v (i) :=
GL.Double (Integer (r_prec_a360 * v (i)) mod (360*prec_a360))
* i_r_prec_a360;
end loop;
end Angles_modulo_360;
------------------
-- Resource I/O --
------------------
procedure Load_if_needed (zif : in out Zip.Zip_info; name : String) is
begin
if not Zip.Is_loaded (zif) then
begin
Zip.Load (zif, name);
exception
when Zip.Zip_file_open_error => -- Try with lower case:
Zip.Load (zif, To_Lower (name));
end;
end if;
end Load_if_needed;
procedure Set_level_data_name (s : String) is
begin
if Zip.Is_loaded (zif_level) then
Zip.Delete (zif_level);
end if;
-- ^ Possible resource name change - > need this, will be reloaded on next use
level_data_name := Ada.Strings.Unbounded.To_Unbounded_String (s);
end Set_level_data_name;
procedure Set_global_data_name (s : String) is
begin
if Zip.Is_loaded (zif_global) then
Zip.Delete (zif_global);
end if;
-- ^ Possible resource name change - > need this, will be reloaded on next use
global_data_name := Ada.Strings.Unbounded.To_Unbounded_String (s);
end Set_global_data_name;
procedure Set_name (o : in out Visual'class; new_name : String) is
begin
if new_name'Length > Ident'Length then
raise Constraint_Error;
end if;
o.ID := empty;
o.ID (1 .. new_name'Length) := new_name;
end Set_name;
function Get_name (o : Visual'class) return String is
begin
return Trim (o.id, right);
end Get_name;
procedure Rebuild_links (
o : in out Object_3D'Class; -- object to be relinked
neighbouring : in Map_of_Visuals; -- neighbourhood
tolerant_obj : in Boolean; -- tolerant on missing objects
tolerant_tex : in Boolean -- tolerant on missing textures
)
is
found : Boolean;
begin
for f in o.face'Range loop
-- 1/ Find texture IDs:
if is_textured (o.face (f).skin) and then
o.face_invariant (f).texture_name /= empty
then
begin
o.face (f).texture :=
Textures.Texture_ID (o.face_invariant (f).texture_name);
exception
when Textures.Texture_name_not_found =>
if tolerant_tex then
o.face (f).texture := null_image;
o.face (f).skin := material_only;
else
raise;
end if;
end;
end if;
-- 2/ Connections through portals:
if o.face_invariant (f).connect_name /= empty then
found := False;
-- XX old linear search:
-- for i in neighbouring'Range loop
-- if neighbouring (i).ID = o.face_invariant (f).connect_name then
-- o.face (f).connecting := neighbouring (i);
-- found := True;
-- exit;
-- end if;
-- end loop;
begin
o.face (f).connecting := p_Object_3D (Visuals_Mapping.Element (
Visuals_Mapping.Map (neighbouring),
Ada.Strings.Unbounded.To_Unbounded_String (o.face_invariant (f).connect_name))
);
found := True;
exception
when Constraint_Error =>
-- GNAT gives also the message:
-- no element available because key not in map
null;
end;
if not found then
if tolerant_obj then
o.face (f).connecting := null;
else
raise_exception (
Portal_connection_failed'Identity,
"For object name [" & Trim (o.ID, right) &
"], looking for [" &
Trim (o.face_invariant (f).connect_name, right)
& ']'
);
end if;
end if;
end if;
end loop;
end Rebuild_links;
procedure Texture_name_hint (
o : in out Object_3D;
face : Positive;
name : String
)
is
begin
if name'Length > Ident'Length then raise Constraint_Error; end if;
o.face_invariant (face).texture_name := empty;
o.face_invariant (face).texture_name (1 .. name'Length) := name;
end Texture_name_hint;
procedure Portal_name_hint (
o : in out Object_3D;
face : Positive;
name : String
)
is
begin
if name'Length > Ident'Length then raise Constraint_Error; end if;
o.face_invariant (face).connect_name := empty;
o.face_invariant (face).connect_name (1 .. name'Length) := name;
end Portal_name_hint;
----------------------------------------
-- tbd : has been moved (for the moment) external to 'render' for performance, but this makes package task unsafe !
--
--
type visual_Geometry is
record
Visual : p_Visual;
Geometry : GL.skinned_geometry.skinned_Geometry;
end record;
pragma Convention (C, visual_Geometry); -- using convention pragma to disable default initialization (for performance)
type visual_Geometrys is array (Positive range <>) of visual_Geometry;
pragma Convention (C, visual_Geometrys); -- using convention pragma to disable default initialization (for performance)
all_Geometrys : visual_geometrys (1 .. 80_000); pragma Convention (C, all_Geometrys); -- tbd : this is slow !
--
--------------------------------------
procedure render (the_Visuals : in Visual_array; the_Camera : in Camera)
is
use GL, REF, G3DM;
all_Transparents : globe_3d.Visual_array (1 .. 10_000);
transparent_Count : Natural := 0;
geometry_Count : Natural := 0; -- for 'all_Geometrys' array.
current_Skin : GL.skins.p_Skin;
begin
-- prepare openGL to display visuals.
--
Clear (COLOR_BUFFER_BIT or DEPTH_BUFFER_BIT);
Enable (DEPTH_TEST);
Enable (LIGHTING); -- enable lighting for G3D.Display in 'separate Visuals' (obsolete).
Enable (CULL_FACE);
CullFace (BACK);
MatrixMode (MODELVIEW);
Set_GL_Matrix (the_Camera.world_rotation);
Translate ( - the_Camera.Clipper.eye_Position (0), - the_Camera.Clipper.eye_Position (1), - the_Camera.Clipper.eye_Position (2));
PushMatrix;
-- separate Visuals
--
for Each in the_Visuals'Range loop
declare
the_Visual : Visual'Class renames the_Visuals (Each).all;
visual_Geometrys : GL.skinned_geometry.skinned_Geometrys renames skinned_Geometrys (the_visual);
begin
if is_transparent (the_Visual) then
transparent_Count := transparent_Count + 1;
all_Transparents (transparent_Count) := the_Visual'Access;
else
for Each in visual_Geometrys'Range loop
geometry_Count := geometry_Count + 1;
all_Geometrys (geometry_Count).Visual := the_Visual'Access;
all_Geometrys (geometry_Count).Geometry := visual_Geometrys (Each);
end loop;
Display (the_Visuals (Each).all, the_Camera.Clipper);
end if;
end;
end loop;
GL.Errors.log;
-- display all opaque geometries, sorted by gl geometry primitive kind and skin.
--
declare
function "<" (L, R : in visual_geometry) return Boolean
is
use GL.Geometry, System.Storage_Elements;
begin
if primitive_Id (L.Geometry.Geometry.all) = primitive_Id (R.Geometry.Geometry.all) then -- tbd : find better naming scheme to avoid '.Geometry.Geometry.'
return to_Integer (L.Geometry.Skin.all'Address) < to_Integer (R.Geometry.Skin.all'Address); -- tbd : check this is safe/portable
-- GdM : aaargh! remove that !!
elsif primitive_Id (L.Geometry.Geometry.all) < primitive_Id (R.Geometry.Geometry.all) then
return True;
else -- L.Geometry.primitive_Id > R.Geometry.primitive_Id
return False;
end if;
end "<";
procedure sort is new Ada.Containers.Generic_Array_Sort (Positive,
visual_geometry,
visual_geometrys);
use GL.Skins, GL.Geometry, GL.Skinned_Geometry;
current_Visual : p_Visual;
begin
if geometry_Count > 1 then
sort (all_Geometrys (1 .. geometry_Count));
end if;
GL.PushMatrix;
for Each in 1 .. geometry_Count loop
if all_Geometrys (Each).Geometry.Skin /= current_Skin then
current_Skin := all_Geometrys (Each).Geometry.Skin;
enable (current_Skin.all);
GL.Errors.log;
end if;
if all_Geometrys (Each).Geometry.Veneer /= null then
enable (all_Geometrys (Each).Geometry.Veneer.all);
GL.Errors.log;
end if;
if all_Geometrys (Each).Visual = current_Visual then
draw (all_Geometrys (Each).Geometry.Geometry.all);
GL.Errors.log;
else
GL.PopMatrix;
GL.PushMatrix;
GL.Translate (all_Geometrys (Each).Visual.centre);
Multiply_GL_Matrix (all_Geometrys (Each).Visual.rotation);
draw (all_Geometrys (Each).Geometry.Geometry.all);
GL.Errors.log;
current_Visual := all_Geometrys (Each).Visual;
end if;
end loop;
GL.PopMatrix;
end;
GL.Errors.log;
-- display all transparent visuals, sorted from far to near.
--
declare
function "<" (L, R : in globe_3d.p_Visual) return Boolean -- tbd : ugh move expensive calcs outside
is
begin
return L.Centre_camera_space (2) < R.Centre_camera_space (2); -- nb : in camera space, negative Z is forward, so use '<'.
end "<";
--procedure sort is new Ada.Containers.Generic_Array_Sort (Positive,
procedure sort is new Ada.Containers.Generic_Array_Sort (Positive,
globe_3d.p_Visual,
globe_3d.Visual_array);
begin
for Each in 1 .. transparent_Count loop -- pre - calculate each visuals Centre in camera space.
all_Transparents (Each).Centre_camera_space := the_Camera.world_Rotation
* (all_Transparents (Each).Centre - the_Camera.Clipper.eye_Position);
end loop;
if transparent_Count > 1 then
sort (all_Transparents (1 .. transparent_Count));
end if;
GL.depthMask (gl_False); -- make depth buffer read - only, for correct transparency
Enable (LIGHTING); -- ensure lighting is enabled for G3D.Display of transparents (obsolete).
Enable (BLEND);
BlendFunc (sfactor => ONE,
dfactor => ONE_MINUS_SRC_ALPHA);
for Each in 1 .. transparent_Count loop
declare
the_Visual : Visual'Class renames all_Transparents (Each).all;
visual_Geometrys : constant GL.skinned_geometry.skinned_Geometrys := skinned_Geometrys (the_visual); -- tbd : apply ogl state sorting here ?
begin
display (the_Visual, the_Camera.clipper);
GL.Errors.log;
for Each in visual_Geometrys'Range loop
declare
use GL.Skins, GL.Geometry;
the_Geometry : GL.skinned_geometry.skinned_Geometry renames visual_Geometrys (Each);
begin
if the_Geometry.Skin /= current_Skin then
current_Skin := the_Geometry.Skin;
enable (current_Skin.all);
GL.Errors.log;
end if;
if the_Geometry.Veneer /= null then
enable (the_Geometry.Veneer.all);
GL.Errors.log;
end if;
GL.PushMatrix;
GL.Translate (the_Visual.centre);
Multiply_GL_Matrix (the_Visual.rotation);
draw (the_Geometry.Geometry.all);
GL.Errors.log;
GL.PopMatrix;
end;
end loop;
end;
end loop;
GL.depthMask (gl_True);
end;
PopMatrix;
GL.Errors.log; -- tbd : for debug only
end render;
function empty_map return Map_of_Visuals is
thing : Map_of_Visuals;
begin
Visuals_Mapping.Map (thing) := Visuals_Mapping.Empty_Map;
return thing;
end empty_map;
procedure Add (to_map : in out Map_of_Visuals; what : p_Visual) is
pos : Visuals_Mapping.Cursor;
success : Boolean;
begin
Visuals_Mapping.Insert (
Visuals_Mapping.Map (to_map),
Ada.Strings.Unbounded.To_Unbounded_String (what.ID),
what,
pos,
success
);
if not success then -- A.18.4. 45/2
raise Duplicate_name with what.ID;
end if;
end Add;
function Map_of (va : Visual_array) return Map_of_Visuals is
res : Map_of_Visuals := empty_map;
begin
-- Perhaps Reserve_Capacity would be good here ??
for i in va'Range loop
Add (res, va (i));
end loop;
return res;
end Map_of;
end GLOBE_3D;
|
-- This spec has been automatically generated from STM32L0x3.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.AES is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_DATATYPE_Field is HAL.UInt2;
subtype CR_MODE_Field is HAL.UInt2;
subtype CR_CHMOD_Field is HAL.UInt2;
-- control register
type CR_Register is record
-- AES enable
EN : Boolean := False;
-- Data type selection (for data in and data out to/from the
-- cryptographic block)
DATATYPE : CR_DATATYPE_Field := 16#0#;
-- AES operating mode
MODE : CR_MODE_Field := 16#0#;
-- AES chaining mode
CHMOD : CR_CHMOD_Field := 16#0#;
-- Computation Complete Flag Clear
CCFC : Boolean := False;
-- Error clear
ERRC : Boolean := False;
-- CCF flag interrupt enable
CCFIE : Boolean := False;
-- Error interrupt enable
ERRIE : Boolean := False;
-- Enable DMA management of data input phase
DMAINEN : Boolean := False;
-- Enable DMA management of data output phase
DMAOUTEN : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
EN at 0 range 0 .. 0;
DATATYPE at 0 range 1 .. 2;
MODE at 0 range 3 .. 4;
CHMOD at 0 range 5 .. 6;
CCFC at 0 range 7 .. 7;
ERRC at 0 range 8 .. 8;
CCFIE at 0 range 9 .. 9;
ERRIE at 0 range 10 .. 10;
DMAINEN at 0 range 11 .. 11;
DMAOUTEN at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- status register
type SR_Register is record
-- Read-only. Computation complete flag
CCF : Boolean;
-- Read-only. Read error flag
RDERR : Boolean;
-- Read-only. Write error flag
WRERR : Boolean;
-- unspecified
Reserved_3_31 : HAL.UInt29;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
CCF at 0 range 0 .. 0;
RDERR at 0 range 1 .. 1;
WRERR at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Advanced encryption standard hardware accelerator
type AES_Peripheral is record
-- control register
CR : aliased CR_Register;
-- status register
SR : aliased SR_Register;
-- data input register
DINR : aliased HAL.UInt32;
-- data output register
DOUTR : aliased HAL.UInt32;
-- key register 0
KEYR0 : aliased HAL.UInt32;
-- key register 1
KEYR1 : aliased HAL.UInt32;
-- key register 2
KEYR2 : aliased HAL.UInt32;
-- key register 3
KEYR3 : aliased HAL.UInt32;
-- initialization vector register 0
IVR0 : aliased HAL.UInt32;
-- initialization vector register 1
IVR1 : aliased HAL.UInt32;
-- initialization vector register 2
IVR2 : aliased HAL.UInt32;
-- initialization vector register 3
IVR3 : aliased HAL.UInt32;
end record
with Volatile;
for AES_Peripheral use record
CR at 16#0# range 0 .. 31;
SR at 16#4# range 0 .. 31;
DINR at 16#8# range 0 .. 31;
DOUTR at 16#C# range 0 .. 31;
KEYR0 at 16#10# range 0 .. 31;
KEYR1 at 16#14# range 0 .. 31;
KEYR2 at 16#18# range 0 .. 31;
KEYR3 at 16#1C# range 0 .. 31;
IVR0 at 16#20# range 0 .. 31;
IVR1 at 16#24# range 0 .. 31;
IVR2 at 16#28# range 0 .. 31;
IVR3 at 16#2C# range 0 .. 31;
end record;
-- Advanced encryption standard hardware accelerator
AES_Periph : aliased AES_Peripheral
with Import, Address => System'To_Address (16#40026000#);
end STM32_SVD.AES;
|
-- Copyright 2020-2021 Jeff Foley. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local url = require("url")
name = "GoogleCT"
type = "cert"
function start()
set_rate_limit(2)
end
function vertical(ctx, domain)
local token = ""
local hdrs={
Connection="close",
Referer="https://transparencyreport.google.com/https/certificates",
}
while(true) do
local page, err = request(ctx, {
['url']=build_url(domain, token),
headers=hdrs,
})
if (err ~= nil and err ~= "") then
log(ctx, "vertical request to service failed: " .. err)
break
end
send_names(ctx, page)
token = get_token(page)
if token == "" then
break
end
end
end
function build_url(domain, token)
local base = "https://www.google.com/transparencyreport/api/v3/httpsreport/ct/certsearch"
if token ~= "" then
base = base .. "/page"
end
local params = {
['domain']=domain,
['include_expired']="true",
['include_subdomains']="true",
}
if token ~= "" then
params['p'] = token
end
return base .. "?" .. url.build_query_string(params)
end
function get_token(content)
local pattern = "\\[(null|\"[a-zA-Z0-9]+\"),\"([a-zA-Z0-9]+)\",null,([0-9]+),([0-9]+)\\]"
local matches = submatch(content, pattern)
if (matches == nil or #matches == 0) then
return ""
end
local match = matches[1]
if (match ~= nil and #match == 5 and (match[4] < match[5])) then
return match[3]
end
return ""
end
|
with STM32_SVD; use STM32_SVD;
generic
Pin : in GPIO_Pin;
Port : in out Natural;
Mode : in Pin_IO_Modes := Mode_In;
Pull_Resistor : in Internal_Pin_Resistors := Floating;
Alternate_Function : in GPIO_Alternate_Function := 0;
package STM32GD.GPIO.Pin is
pragma Preelaborate;
procedure Init;
procedure Set_Mode (Mode : Pin_IO_Modes);
procedure Set_Type (Pin_Type : Pin_Output_Types);
function Get_Pull_Resistor return Internal_Pin_Resistors;
procedure Set_Pull_Resistor (Pull : Internal_Pin_Resistors);
procedure Configure_Alternate_Function (AF : GPIO_Alternate_Function);
function Is_Set return Boolean;
procedure Set;
procedure Clear;
procedure Toggle;
end STM32GD.GPIO.Pin;
|
-- Copyright 2015 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with System;
package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
|
M:main
F:G$Delay1ms$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$delay_ms$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$EEPROM_read$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$EEPROM_write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$EEPROM_clean$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Data_change$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$DATA_read1$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$DATA_save1$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Model_data_reset$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Model_adress$0_0$0({2}DF,SI:U),C,0,0,0,0,0
F:G$DATA_read2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$DATA_save2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$SPI$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$REG_write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$REG_read$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$FIFO_write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$FIFO_write2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$FIFO_read$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$FIFO_read2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$TX_address$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$RX_address$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$RX_mode$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$TX_mode$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_power$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_size$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_channel$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_init$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$NRF_test$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$device_connect$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$location$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_ON$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_OFF$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_clean$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$LCD_init$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send2_rev$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send2_hex$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$send3$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write0$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$photo$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_trim1$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_trim2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_throttle$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$warning$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write_num100$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$write_num1000$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$move_cursor$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$displayModel$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_menu$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_mapping$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_receiver_mode$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_switch$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_bar$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$point$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_curve$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$display_curve2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Xdata_check$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$rounding$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$get_curve$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$get_curve2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_size$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_inverted$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_mix$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_curve$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_curve2$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$function_mapping$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$change_trim$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$CH_calib$0_0$0({2}DF,SI:S),C,0,0,0,0,0
F:G$function_filter$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$Switch_Check$0_0$0({2}DF,SC:U),C,0,0,0,0,0
F:G$UartInit$0_0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$initial$0_0$0({2}DF,SV:S),C,0,0,0,0,0
|
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ncurses --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 2000-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
-- $Revision: 1.7 $
-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms;
with Terminal_Interface.Curses.Forms.Field_User_Data;
with Ada.Characters.Handling;
with Ada.Strings;
with Ada.Strings.Bounded;
procedure ncurses2.demo_forms is
package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (80);
type myptr is access Integer;
-- The C version stores a pointer in the userptr and
-- converts it into a long integer.
-- The correct, but inconvenient way to do it is to use a
-- pointer to long and keep the pointer constant.
-- It just adds one memory piece to allocate and deallocate (not done here)
package StringData is new
Terminal_Interface.Curses.Forms.Field_User_Data (Integer, myptr);
function edit_secure (me : Field; c_in : Key_Code) return Key_Code;
function form_virtualize (f : Form; w : Window) return Key_Code;
function my_form_driver (f : Form; c : Key_Code) return Boolean;
function make_label (frow : Line_Position;
fcol : Column_Position;
label : String) return Field;
function make_field (frow : Line_Position;
fcol : Column_Position;
rows : Line_Count;
cols : Column_Count;
secure : Boolean) return Field;
procedure display_form (f : Form);
procedure erase_form (f : Form);
-- prints '*' instead of characters.
-- Not that this keeps a bug from the C version:
-- type in the psasword field then move off and back.
-- the cursor is at position one, but
-- this assumes it as at the end so text gets appended instead
-- of overwtitting.
function edit_secure (me : Field; c_in : Key_Code) return Key_Code is
rows, frow : Line_Position;
nrow : Natural;
cols, fcol : Column_Position;
nbuf : Buffer_Number;
c : Key_Code := c_in;
c2 : Character;
use StringData;
begin
Info (me, rows, cols, frow, fcol, nrow, nbuf);
-- TODO if result = Form_Ok and nbuf > 0 then
-- C version checked the return value
-- of Info, the Ada binding throws an exception I think.
if nbuf > 0 then
declare
temp : BS.Bounded_String;
temps : String (1 .. 10);
-- TODO Get_Buffer povides no information on the field length?
len : myptr;
begin
Get_Buffer (me, 1, Str => temps);
-- strcpy(temp, field_buffer(me, 1));
Get_User_Data (me, len);
temp := BS.To_Bounded_String (temps (1 .. len.all));
if c <= Key_Max then
c2 := Code_To_Char (c);
if Ada.Characters.Handling.Is_Graphic (c2) then
BS.Append (temp, c2);
len.all := len.all + 1;
Set_Buffer (me, 1, BS.To_String (temp));
c := Character'Pos ('*');
else
c := 0;
end if;
else
case c is
when REQ_BEG_FIELD |
REQ_CLR_EOF |
REQ_CLR_EOL |
REQ_DEL_LINE |
REQ_DEL_WORD |
REQ_DOWN_CHAR |
REQ_END_FIELD |
REQ_INS_CHAR |
REQ_INS_LINE |
REQ_LEFT_CHAR |
REQ_NEW_LINE |
REQ_NEXT_WORD |
REQ_PREV_WORD |
REQ_RIGHT_CHAR |
REQ_UP_CHAR =>
c := 0; -- we don't want to do inline editing
when REQ_CLR_FIELD =>
if len.all /= 0 then
temp := BS.To_Bounded_String ("");
Set_Buffer (me, 1, BS.To_String (temp));
len.all := 0;
end if;
when REQ_DEL_CHAR |
REQ_DEL_PREV =>
if len.all /= 0 then
BS.Delete (temp, BS.Length (temp), BS.Length (temp));
Set_Buffer (me, 1, BS.To_String (temp));
len.all := len.all - 1;
end if;
when others => null;
end case;
end if;
end;
end if;
return c;
end edit_secure;
mode : Key_Code := REQ_INS_MODE;
function form_virtualize (f : Form; w : Window) return Key_Code is
type lookup_t is record
code : Key_Code;
result : Key_Code;
-- should be Form_Request_Code, but we need MAX_COMMAND + 1
end record;
lookup : constant array (Positive range <>) of lookup_t :=
(
(
Character'Pos ('A') mod 16#20#, REQ_NEXT_CHOICE
),
(
Character'Pos ('B') mod 16#20#, REQ_PREV_WORD
),
(
Character'Pos ('C') mod 16#20#, REQ_CLR_EOL
),
(
Character'Pos ('D') mod 16#20#, REQ_DOWN_FIELD
),
(
Character'Pos ('E') mod 16#20#, REQ_END_FIELD
),
(
Character'Pos ('F') mod 16#20#, REQ_NEXT_PAGE
),
(
Character'Pos ('G') mod 16#20#, REQ_DEL_WORD
),
(
Character'Pos ('H') mod 16#20#, REQ_DEL_PREV
),
(
Character'Pos ('I') mod 16#20#, REQ_INS_CHAR
),
(
Character'Pos ('K') mod 16#20#, REQ_CLR_EOF
),
(
Character'Pos ('L') mod 16#20#, REQ_LEFT_FIELD
),
(
Character'Pos ('M') mod 16#20#, REQ_NEW_LINE
),
(
Character'Pos ('N') mod 16#20#, REQ_NEXT_FIELD
),
(
Character'Pos ('O') mod 16#20#, REQ_INS_LINE
),
(
Character'Pos ('P') mod 16#20#, REQ_PREV_FIELD
),
(
Character'Pos ('R') mod 16#20#, REQ_RIGHT_FIELD
),
(
Character'Pos ('S') mod 16#20#, REQ_BEG_FIELD
),
(
Character'Pos ('U') mod 16#20#, REQ_UP_FIELD
),
(
Character'Pos ('V') mod 16#20#, REQ_DEL_CHAR
),
(
Character'Pos ('W') mod 16#20#, REQ_NEXT_WORD
),
(
Character'Pos ('X') mod 16#20#, REQ_CLR_FIELD
),
(
Character'Pos ('Y') mod 16#20#, REQ_DEL_LINE
),
(
Character'Pos ('Z') mod 16#20#, REQ_PREV_CHOICE
),
(
Character'Pos ('[') mod 16#20#, -- ESCAPE
Form_Request_Code'Last + 1
),
(
Key_Backspace, REQ_DEL_PREV
),
(
KEY_DOWN, REQ_DOWN_CHAR
),
(
Key_End, REQ_LAST_FIELD
),
(
Key_Home, REQ_FIRST_FIELD
),
(
KEY_LEFT, REQ_LEFT_CHAR
),
(
KEY_LL, REQ_LAST_FIELD
),
(
Key_Next, REQ_NEXT_FIELD
),
(
KEY_NPAGE, REQ_NEXT_PAGE
),
(
KEY_PPAGE, REQ_PREV_PAGE
),
(
Key_Previous, REQ_PREV_FIELD
),
(
KEY_RIGHT, REQ_RIGHT_CHAR
),
(
KEY_UP, REQ_UP_CHAR
),
(
Character'Pos ('Q') mod 16#20#, -- QUIT
Form_Request_Code'Last + 1 -- TODO MAX_FORM_COMMAND + 1
)
);
c : Key_Code := Getchar (w);
me : constant Field := Current (f);
begin
if c = Character'Pos (']') mod 16#20# then
if mode = REQ_INS_MODE then
mode := REQ_OVL_MODE;
else
mode := REQ_INS_MODE;
end if;
c := mode;
else
for n in lookup'Range loop
if lookup (n).code = c then
c := lookup (n).result;
exit;
end if;
end loop;
end if;
-- Force the field that the user is typing into to be in reverse video,
-- while the other fields are shown underlined.
if c <= Key_Max then
c := edit_secure (me, c);
Set_Background (me, (Reverse_Video => True, others => False));
elsif c <= Form_Request_Code'Last then
c := edit_secure (me, c);
Set_Background (me, (Under_Line => True, others => False));
end if;
return c;
end form_virtualize;
function my_form_driver (f : Form; c : Key_Code) return Boolean is
flag : constant Driver_Result := Driver (f, F_Validate_Field);
begin
if c = Form_Request_Code'Last + 1 and
flag = Form_Ok
then
return True;
else
Beep;
return False;
end if;
end my_form_driver;
function make_label (frow : Line_Position;
fcol : Column_Position;
label : String) return Field is
f : constant Field := Create (1, label'Length, frow, fcol, 0, 0);
o : Field_Option_Set := Get_Options (f);
begin
if f /= Null_Field then
Set_Buffer (f, 0, label);
o.Active := False;
Set_Options (f, o);
end if;
return f;
end make_label;
function make_field (frow : Line_Position;
fcol : Column_Position;
rows : Line_Count;
cols : Column_Count;
secure : Boolean) return Field is
f : Field;
use StringData;
len : myptr;
begin
if secure then
f := Create (rows, cols, frow, fcol, 0, 1);
else
f := Create (rows, cols, frow, fcol, 0, 0);
end if;
if f /= Null_Field then
Set_Background (f, (Under_Line => True, others => False));
len := new Integer;
len.all := 0;
Set_User_Data (f, len);
end if;
return f;
end make_field;
procedure display_form (f : Form) is
w : Window;
rows : Line_Count;
cols : Column_Count;
begin
Scale (f, rows, cols);
w := New_Window (rows + 2, cols + 4, 0, 0);
if w /= Null_Window then
Set_Window (f, w);
Set_Sub_Window (f, Derived_Window (w, rows, cols, 1, 2));
Box (w); -- 0,0
Set_KeyPad_Mode (w, True);
end if;
-- TODO if Post(f) /= Form_Ok then it's a procedure
declare
begin
Post (f);
exception
when
Eti_System_Error |
Eti_Bad_Argument |
Eti_Posted |
Eti_Connected |
Eti_Bad_State |
Eti_No_Room |
Eti_Not_Posted |
Eti_Unknown_Command |
Eti_No_Match |
Eti_Not_Selectable |
Eti_Not_Connected |
Eti_Request_Denied |
Eti_Invalid_Field |
Eti_Current =>
Refresh (w);
end;
-- end if;
end display_form;
procedure erase_form (f : Form) is
w : Window := Get_Window (f);
s : Window := Get_Sub_Window (f);
begin
Post (f, False);
Erase (w);
Refresh (w);
Delete (s);
Delete (w);
end erase_form;
finished : Boolean := False;
f : constant Field_Array_Access := new Field_Array (1 .. 12);
secure : Field;
myform : Form;
w : Window;
c : Key_Code;
result : Driver_Result;
begin
Move_Cursor (Line => 18, Column => 0);
Add (Str => "Defined form-traversal keys: ^Q/ESC- exit form");
Add (Ch => newl);
Add (Str => "^N -- go to next field ^P -- go to previous field");
Add (Ch => newl);
Add (Str => "Home -- go to first field End -- go to last field");
Add (Ch => newl);
Add (Str => "^L -- go to field to left ^R -- go to field to right");
Add (Ch => newl);
Add (Str => "^U -- move upward to field ^D -- move downward to field");
Add (Ch => newl);
Add (Str => "^W -- go to next word ^B -- go to previous word");
Add (Ch => newl);
Add (Str => "^S -- go to start of field ^E -- go to end of field");
Add (Ch => newl);
Add (Str => "^H -- delete previous char ^Y -- delete line");
Add (Ch => newl);
Add (Str => "^G -- delete current word ^C -- clear to end of line");
Add (Ch => newl);
Add (Str => "^K -- clear to end of field ^X -- clear field");
Add (Ch => newl);
Add (Str => "Arrow keys move within a field as you would expect.");
Add (Line => 4, Column => 57, Str => "Forms Entry Test");
Refresh;
-- describe the form
f.all (1) := make_label (0, 15, "Sample Form");
f.all (2) := make_label (2, 0, "Last Name");
f.all (3) := make_field (3, 0, 1, 18, False);
f.all (4) := make_label (2, 20, "First Name");
f.all (5) := make_field (3, 20, 1, 12, False);
f.all (6) := make_label (2, 34, "Middle Name");
f.all (7) := make_field (3, 34, 1, 12, False);
f.all (8) := make_label (5, 0, "Comments");
f.all (9) := make_field (6, 0, 4, 46, False);
f.all (10) := make_label (5, 20, "Password:");
f.all (11) := make_field (5, 30, 1, 9, True);
secure := f.all (11);
f.all (12) := Null_Field;
myform := New_Form (f);
display_form (myform);
w := Get_Window (myform);
Set_Raw_Mode (SwitchOn => True);
Set_NL_Mode (SwitchOn => True); -- lets us read ^M's
while not finished loop
c := form_virtualize (myform, w);
result := Driver (myform, c);
case result is
when Form_Ok =>
Add (Line => 5, Column => 57, Str => Get_Buffer (secure, 1));
Clear_To_End_Of_Line;
Refresh;
when Unknown_Request =>
finished := my_form_driver (myform, c);
when others =>
Beep;
end case;
end loop;
erase_form (myform);
-- TODO Free_Form(myform);
-- for (c = 0; f[c] != 0; c++) free_field(f[c]);
Set_Raw_Mode (SwitchOn => False);
Set_NL_Mode (SwitchOn => True);
end ncurses2.demo_forms;
|
-- This package has been generated automatically by GNATtest.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with Gnattest_Generated;
package Combat.Test_Data.Tests is
type Test is new GNATtest_Generated.GNATtest_Standard.Combat.Test_Data
.Test with
null record;
procedure Test_StartCombat_523cd4_1d4469(Gnattest_T: in out Test);
-- combat.ads:154:4:StartCombat:Test_StartCombat
procedure Test_CombatTurn_4b34b0_e12d30(Gnattest_T: in out Test);
-- combat.ads:165:4:CombatTurn:Test_CombatTurn
end Combat.Test_Data.Tests;
-- end read only
|
----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: test.adb,v 1.1.1.1 2005-10-29 18:01:49 dpt Exp $
-- The program has a few aims.
-- 1. Test ZLib.Ada95 thick binding functionality.
-- 2. Show the example of use main functionality of the ZLib.Ada95 binding.
-- 3. Build this program automatically compile all ZLib.Ada95 packages under
-- GNAT Ada95 compiler.
with ZLib.Streams;
with Ada.Streams.Stream_IO;
with Ada.Numerics.Discrete_Random;
with Ada.Text_IO;
with Ada.Calendar;
procedure Test is
use Ada.Streams;
use Stream_IO;
------------------------------------
-- Test configuration parameters --
------------------------------------
File_Size : Count := 100_000;
Continuous : constant Boolean := False;
Header : constant ZLib.Header_Type := ZLib.Default;
-- ZLib.None;
-- ZLib.Auto;
-- ZLib.GZip;
-- Do not use Header other then Default in ZLib versions 1.1.4
-- and older.
Strategy : constant ZLib.Strategy_Type := ZLib.Default_Strategy;
Init_Random : constant := 10;
-- End --
In_File_Name : constant String := "testzlib.in";
-- Name of the input file
Z_File_Name : constant String := "testzlib.zlb";
-- Name of the compressed file.
Out_File_Name : constant String := "testzlib.out";
-- Name of the decompressed file.
File_In : File_Type;
File_Out : File_Type;
File_Back : File_Type;
File_Z : ZLib.Streams.Stream_Type;
Filter : ZLib.Filter_Type;
Time_Stamp : Ada.Calendar.Time;
procedure Generate_File;
-- Generate file of spetsified size with some random data.
-- The random data is repeatable, for the good compression.
procedure Compare_Streams
(Left, Right : in out Root_Stream_Type'Class);
-- The procedure compearing data in 2 streams.
-- It is for compare data before and after compression/decompression.
procedure Compare_Files (Left, Right : String);
-- Compare files. Based on the Compare_Streams.
procedure Copy_Streams
(Source, Target : in out Root_Stream_Type'Class;
Buffer_Size : in Stream_Element_Offset := 1024);
-- Copying data from one stream to another. It is for test stream
-- interface of the library.
procedure Data_In
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset);
-- this procedure is for generic instantiation of
-- ZLib.Generic_Translate.
-- reading data from the File_In.
procedure Data_Out (Item : in Stream_Element_Array);
-- this procedure is for generic instantiation of
-- ZLib.Generic_Translate.
-- writing data to the File_Out.
procedure Stamp;
-- Store the timestamp to the local variable.
procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count);
-- Print the time statistic with the message.
procedure Translate is new ZLib.Generic_Translate
(Data_In => Data_In,
Data_Out => Data_Out);
-- This procedure is moving data from File_In to File_Out
-- with compression or decompression, depend on initialization of
-- Filter parameter.
-------------------
-- Compare_Files --
-------------------
procedure Compare_Files (Left, Right : String) is
Left_File, Right_File : File_Type;
begin
Open (Left_File, In_File, Left);
Open (Right_File, In_File, Right);
Compare_Streams (Stream (Left_File).all, Stream (Right_File).all);
Close (Left_File);
Close (Right_File);
end Compare_Files;
---------------------
-- Compare_Streams --
---------------------
procedure Compare_Streams
(Left, Right : in out Ada.Streams.Root_Stream_Type'Class)
is
Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#);
Left_Last, Right_Last : Stream_Element_Offset;
begin
loop
Read (Left, Left_Buffer, Left_Last);
Read (Right, Right_Buffer, Right_Last);
if Left_Last /= Right_Last then
Ada.Text_IO.Put_Line ("Compare error :"
& Stream_Element_Offset'Image (Left_Last)
& " /= "
& Stream_Element_Offset'Image (Right_Last));
raise Constraint_Error;
elsif Left_Buffer (0 .. Left_Last)
/= Right_Buffer (0 .. Right_Last)
then
Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal.");
raise Constraint_Error;
end if;
exit when Left_Last < Left_Buffer'Last;
end loop;
end Compare_Streams;
------------------
-- Copy_Streams --
------------------
procedure Copy_Streams
(Source, Target : in out Ada.Streams.Root_Stream_Type'Class;
Buffer_Size : in Stream_Element_Offset := 1024)
is
Buffer : Stream_Element_Array (1 .. Buffer_Size);
Last : Stream_Element_Offset;
begin
loop
Read (Source, Buffer, Last);
Write (Target, Buffer (1 .. Last));
exit when Last < Buffer'Last;
end loop;
end Copy_Streams;
-------------
-- Data_In --
-------------
procedure Data_In
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset) is
begin
Read (File_In, Item, Last);
end Data_In;
--------------
-- Data_Out --
--------------
procedure Data_Out (Item : in Stream_Element_Array) is
begin
Write (File_Out, Item);
end Data_Out;
-------------------
-- Generate_File --
-------------------
procedure Generate_File is
subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
package Random_Elements is
new Ada.Numerics.Discrete_Random (Visible_Symbols);
Gen : Random_Elements.Generator;
Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10;
Buffer_Count : constant Count := File_Size / Buffer'Length;
-- Number of same buffers in the packet.
Density : constant Count := 30; -- from 0 to Buffer'Length - 2;
procedure Fill_Buffer (J, D : in Count);
-- Change the part of the buffer.
-----------------
-- Fill_Buffer --
-----------------
procedure Fill_Buffer (J, D : in Count) is
begin
for K in 0 .. D loop
Buffer
(Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1))
:= Random_Elements.Random (Gen);
end loop;
end Fill_Buffer;
begin
Random_Elements.Reset (Gen, Init_Random);
Create (File_In, Out_File, In_File_Name);
Fill_Buffer (1, Buffer'Length - 2);
for J in 1 .. Buffer_Count loop
Write (File_In, Buffer);
Fill_Buffer (J, Density);
end loop;
-- fill remain size.
Write
(File_In,
Buffer
(1 .. Stream_Element_Offset
(File_Size - Buffer'Length * Buffer_Count)));
Flush (File_In);
Close (File_In);
end Generate_File;
---------------------
-- Print_Statistic --
---------------------
procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is
use Ada.Calendar;
use Ada.Text_IO;
package Count_IO is new Integer_IO (ZLib.Count);
Curr_Dur : Duration := Clock - Time_Stamp;
begin
Put (Msg);
Set_Col (20);
Ada.Text_IO.Put ("size =");
Count_IO.Put
(Data_Size,
Width => Stream_IO.Count'Image (File_Size)'Length);
Put_Line (" duration =" & Duration'Image (Curr_Dur));
end Print_Statistic;
-----------
-- Stamp --
-----------
procedure Stamp is
begin
Time_Stamp := Ada.Calendar.Clock;
end Stamp;
begin
Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
loop
Generate_File;
for Level in ZLib.Compression_Level'Range loop
Ada.Text_IO.Put_Line ("Level ="
& ZLib.Compression_Level'Image (Level));
-- Test generic interface.
Open (File_In, In_File, In_File_Name);
Create (File_Out, Out_File, Z_File_Name);
Stamp;
-- Deflate using generic instantiation.
ZLib.Deflate_Init
(Filter => Filter,
Level => Level,
Strategy => Strategy,
Header => Header);
Translate (Filter);
Print_Statistic ("Generic compress", ZLib.Total_Out (Filter));
ZLib.Close (Filter);
Close (File_In);
Close (File_Out);
Open (File_In, In_File, Z_File_Name);
Create (File_Out, Out_File, Out_File_Name);
Stamp;
-- Inflate using generic instantiation.
ZLib.Inflate_Init (Filter, Header => Header);
Translate (Filter);
Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter));
ZLib.Close (Filter);
Close (File_In);
Close (File_Out);
Compare_Files (In_File_Name, Out_File_Name);
-- Test stream interface.
-- Compress to the back stream.
Open (File_In, In_File, In_File_Name);
Create (File_Back, Out_File, Z_File_Name);
Stamp;
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.Out_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => True,
Level => Level,
Strategy => Strategy,
Header => Header);
Copy_Streams
(Source => Stream (File_In).all,
Target => File_Z);
-- Flushing internal buffers to the back stream.
ZLib.Streams.Flush (File_Z, ZLib.Finish);
Print_Statistic ("Write compress",
ZLib.Streams.Write_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_In);
Close (File_Back);
-- Compare reading from original file and from
-- decompression stream.
Open (File_In, In_File, In_File_Name);
Open (File_Back, In_File, Z_File_Name);
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.In_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => True,
Header => Header);
Stamp;
Compare_Streams (Stream (File_In).all, File_Z);
Print_Statistic ("Read decompress",
ZLib.Streams.Read_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_In);
Close (File_Back);
-- Compress by reading from compression stream.
Open (File_Back, In_File, In_File_Name);
Create (File_Out, Out_File, Z_File_Name);
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.In_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => False,
Level => Level,
Strategy => Strategy,
Header => Header);
Stamp;
Copy_Streams
(Source => File_Z,
Target => Stream (File_Out).all);
Print_Statistic ("Read compress",
ZLib.Streams.Read_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_Out);
Close (File_Back);
-- Decompress to decompression stream.
Open (File_In, In_File, Z_File_Name);
Create (File_Back, Out_File, Out_File_Name);
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.Out_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => False,
Header => Header);
Stamp;
Copy_Streams
(Source => Stream (File_In).all,
Target => File_Z);
Print_Statistic ("Write decompress",
ZLib.Streams.Write_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_In);
Close (File_Back);
Compare_Files (In_File_Name, Out_File_Name);
end loop;
Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok.");
exit when not Continuous;
File_Size := File_Size + 1;
end loop;
end Test;
|
pragma License (Unrestricted);
with Ada.Task_Identification; -- use Ada.Task_Identification;
generic
type Attribute is private;
Initial_Value : Attribute;
package Ada.Task_Attributes is
type Attribute_Handle is access all Attribute;
function Value (
T : Task_Identification.Task_Id := Task_Identification.Current_Task)
return Attribute;
function Reference (
T : Task_Identification.Task_Id := Task_Identification.Current_Task)
return not null Attribute_Handle;
procedure Set_Value (
Val : Attribute;
T : Task_Identification.Task_Id := Task_Identification.Current_Task);
procedure Reinitialize (
T : Task_Identification.Task_Id := Task_Identification.Current_Task);
end Ada.Task_Attributes;
|
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_are_textures_resident_cookie_t is
-- Item
--
type Item is record
sequence : aliased Interfaces.C.unsigned;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_glx_are_textures_resident_cookie_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_are_textures_resident_cookie_t.Item,
Element_Array => xcb.xcb_glx_are_textures_resident_cookie_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_glx_are_textures_resident_cookie_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_are_textures_resident_cookie_t.Pointer,
Element_Array =>
xcb.xcb_glx_are_textures_resident_cookie_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_are_textures_resident_cookie_t;
|
-----------------------------------------------------------------------
-- AWA.OAuth.Models -- AWA.OAuth.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 Ada.Calendar;
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Util.Beans.Objects;
with Util.Beans.Basic.Lists;
with AWA.Users.Models;
pragma Warnings (On);
package AWA.OAuth.Models is
pragma Style_Checks ("-mr");
type Application_Ref is new ADO.Objects.Object_Ref with null record;
type Callback_Ref is new ADO.Objects.Object_Ref with null record;
type Session_Ref is new ADO.Objects.Object_Ref with null record;
-- --------------------
-- The application that is granted access to the database.
-- --------------------
-- Create an object key for Application.
function Application_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Application from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Application_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Application : constant Application_Ref;
function "=" (Left, Right : Application_Ref'Class) return Boolean;
-- Set the application identifier.
procedure Set_Id (Object : in out Application_Ref;
Value : in ADO.Identifier);
-- Get the application identifier.
function Get_Id (Object : in Application_Ref)
return ADO.Identifier;
-- Set the application name.
procedure Set_Name (Object : in out Application_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Name (Object : in out Application_Ref;
Value : in String);
-- Get the application name.
function Get_Name (Object : in Application_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Name (Object : in Application_Ref)
return String;
-- Set the application secret key.
procedure Set_Secret_Key (Object : in out Application_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Secret_Key (Object : in out Application_Ref;
Value : in String);
-- Get the application secret key.
function Get_Secret_Key (Object : in Application_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Secret_Key (Object : in Application_Ref)
return String;
-- Set the application public identifier.
procedure Set_Client_Id (Object : in out Application_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Client_Id (Object : in out Application_Ref;
Value : in String);
-- Get the application public identifier.
function Get_Client_Id (Object : in Application_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Client_Id (Object : in Application_Ref)
return String;
-- Get the optimistic lock version.
function Get_Version (Object : in Application_Ref)
return Integer;
-- Set the application create date.
procedure Set_Create_Date (Object : in out Application_Ref;
Value : in Ada.Calendar.Time);
-- Get the application create date.
function Get_Create_Date (Object : in Application_Ref)
return Ada.Calendar.Time;
-- Set the application update date.
procedure Set_Update_Date (Object : in out Application_Ref;
Value : in Ada.Calendar.Time);
-- Get the application update date.
function Get_Update_Date (Object : in Application_Ref)
return Ada.Calendar.Time;
-- Set the application title displayed in the OAuth login form.
procedure Set_Title (Object : in out Application_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Title (Object : in out Application_Ref;
Value : in String);
-- Get the application title displayed in the OAuth login form.
function Get_Title (Object : in Application_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Title (Object : in Application_Ref)
return String;
-- Set the application description.
procedure Set_Description (Object : in out Application_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Description (Object : in out Application_Ref;
Value : in String);
-- Get the application description.
function Get_Description (Object : in Application_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Description (Object : in Application_Ref)
return String;
-- Set the optional login URL.
procedure Set_App_Login_Url (Object : in out Application_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_App_Login_Url (Object : in out Application_Ref;
Value : in String);
-- Get the optional login URL.
function Get_App_Login_Url (Object : in Application_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_App_Login_Url (Object : in Application_Ref)
return String;
-- Set the application logo URL.
procedure Set_App_Logo_Url (Object : in out Application_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_App_Logo_Url (Object : in out Application_Ref;
Value : in String);
-- Get the application logo URL.
function Get_App_Logo_Url (Object : in Application_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_App_Logo_Url (Object : in Application_Ref)
return String;
--
procedure Set_User (Object : in out Application_Ref;
Value : in AWA.Users.Models.User_Ref'Class);
--
function Get_User (Object : in Application_Ref)
return AWA.Users.Models.User_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Application_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 Application_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 Application_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 Application_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Application_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Application_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
APPLICATION_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Application_Ref);
-- Copy of the object.
procedure Copy (Object : in Application_Ref;
Into : in out Application_Ref);
package Application_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Application_Ref,
"=" => "=");
subtype Application_Vector is Application_Vectors.Vector;
procedure List (Object : in out Application_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
-- Create an object key for Callback.
function Callback_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Callback from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Callback_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Callback : constant Callback_Ref;
function "=" (Left, Right : Callback_Ref'Class) return Boolean;
--
procedure Set_Id (Object : in out Callback_Ref;
Value : in ADO.Identifier);
--
function Get_Id (Object : in Callback_Ref)
return ADO.Identifier;
--
procedure Set_Url (Object : in out Callback_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Url (Object : in out Callback_Ref;
Value : in String);
--
function Get_Url (Object : in Callback_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Url (Object : in Callback_Ref)
return String;
-- Get the optimistic lock version.
function Get_Version (Object : in Callback_Ref)
return Integer;
--
procedure Set_Application (Object : in out Callback_Ref;
Value : in AWA.OAuth.Models.Application_Ref'Class);
--
function Get_Application (Object : in Callback_Ref)
return AWA.OAuth.Models.Application_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Callback_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 Callback_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 Callback_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 Callback_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Callback_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Callback_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
CALLBACK_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Callback_Ref);
-- Copy of the object.
procedure Copy (Object : in Callback_Ref;
Into : in out Callback_Ref);
package Callback_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Callback_Ref,
"=" => "=");
subtype Callback_Vector is Callback_Vectors.Vector;
procedure List (Object : in out Callback_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
-- --------------------
-- The session is created when the user has granted an access to an application
-- or when the application has refreshed its access token.
-- --------------------
-- Create an object key for Session.
function Session_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Session from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Session_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Session : constant Session_Ref;
function "=" (Left, Right : Session_Ref'Class) return Boolean;
-- Set the session identifier.
procedure Set_Id (Object : in out Session_Ref;
Value : in ADO.Identifier);
-- Get the session identifier.
function Get_Id (Object : in Session_Ref)
return ADO.Identifier;
-- Set the session creation date.
procedure Set_Create_Date (Object : in out Session_Ref;
Value : in Ada.Calendar.Time);
-- Get the session creation date.
function Get_Create_Date (Object : in Session_Ref)
return Ada.Calendar.Time;
-- Set a random salt string to access/request token generation.
procedure Set_Salt (Object : in out Session_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Salt (Object : in out Session_Ref;
Value : in String);
-- Get a random salt string to access/request token generation.
function Get_Salt (Object : in Session_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Salt (Object : in Session_Ref)
return String;
-- Set the expiration date.
procedure Set_Expire_Date (Object : in out Session_Ref;
Value : in Ada.Calendar.Time);
-- Get the expiration date.
function Get_Expire_Date (Object : in Session_Ref)
return Ada.Calendar.Time;
-- Set the application that is granted access.
procedure Set_Application (Object : in out Session_Ref;
Value : in AWA.OAuth.Models.Application_Ref'Class);
-- Get the application that is granted access.
function Get_Application (Object : in Session_Ref)
return AWA.OAuth.Models.Application_Ref'Class;
--
procedure Set_User (Object : in out Session_Ref;
Value : in AWA.Users.Models.User_Ref'Class);
--
function Get_User (Object : in Session_Ref)
return AWA.Users.Models.User_Ref'Class;
--
procedure Set_Session (Object : in out Session_Ref;
Value : in AWA.Users.Models.Session_Ref'Class);
--
function Get_Session (Object : in Session_Ref)
return AWA.Users.Models.Session_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Session_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 Session_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 Session_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 Session_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Session_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Session_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
SESSION_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Session_Ref);
-- Copy of the object.
procedure Copy (Object : in Session_Ref;
Into : in out Session_Ref);
package Session_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Session_Ref,
"=" => "=");
subtype Session_Vector is Session_Vectors.Vector;
procedure List (Object : in out Session_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
private
APPLICATION_NAME : aliased constant String := "awa_application";
COL_0_1_NAME : aliased constant String := "id";
COL_1_1_NAME : aliased constant String := "name";
COL_2_1_NAME : aliased constant String := "secret_key";
COL_3_1_NAME : aliased constant String := "client_id";
COL_4_1_NAME : aliased constant String := "version";
COL_5_1_NAME : aliased constant String := "create_date";
COL_6_1_NAME : aliased constant String := "update_date";
COL_7_1_NAME : aliased constant String := "title";
COL_8_1_NAME : aliased constant String := "description";
COL_9_1_NAME : aliased constant String := "app_login_url";
COL_10_1_NAME : aliased constant String := "app_logo_url";
COL_11_1_NAME : aliased constant String := "user_id";
APPLICATION_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 12,
Table => APPLICATION_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,
5 => COL_4_1_NAME'Access,
6 => COL_5_1_NAME'Access,
7 => COL_6_1_NAME'Access,
8 => COL_7_1_NAME'Access,
9 => COL_8_1_NAME'Access,
10 => COL_9_1_NAME'Access,
11 => COL_10_1_NAME'Access,
12 => COL_11_1_NAME'Access)
);
APPLICATION_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= APPLICATION_DEF'Access;
Null_Application : constant Application_Ref
:= Application_Ref'(ADO.Objects.Object_Ref with null record);
type Application_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => APPLICATION_DEF'Access)
with record
Name : Ada.Strings.Unbounded.Unbounded_String;
Secret_Key : Ada.Strings.Unbounded.Unbounded_String;
Client_Id : Ada.Strings.Unbounded.Unbounded_String;
Version : Integer;
Create_Date : Ada.Calendar.Time;
Update_Date : Ada.Calendar.Time;
Title : Ada.Strings.Unbounded.Unbounded_String;
Description : Ada.Strings.Unbounded.Unbounded_String;
App_Login_Url : Ada.Strings.Unbounded.Unbounded_String;
App_Logo_Url : Ada.Strings.Unbounded.Unbounded_String;
User : AWA.Users.Models.User_Ref;
end record;
type Application_Access is access all Application_Impl;
overriding
procedure Destroy (Object : access Application_Impl);
overriding
procedure Find (Object : in out Application_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Application_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Application_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Application_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Application_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Application_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Application_Ref'Class;
Impl : out Application_Access);
CALLBACK_NAME : aliased constant String := "awa_callback";
COL_0_2_NAME : aliased constant String := "id";
COL_1_2_NAME : aliased constant String := "url";
COL_2_2_NAME : aliased constant String := "version";
COL_3_2_NAME : aliased constant String := "application_id";
CALLBACK_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 4,
Table => CALLBACK_NAME'Access,
Members => (
1 => COL_0_2_NAME'Access,
2 => COL_1_2_NAME'Access,
3 => COL_2_2_NAME'Access,
4 => COL_3_2_NAME'Access)
);
CALLBACK_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= CALLBACK_DEF'Access;
Null_Callback : constant Callback_Ref
:= Callback_Ref'(ADO.Objects.Object_Ref with null record);
type Callback_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => CALLBACK_DEF'Access)
with record
Url : Ada.Strings.Unbounded.Unbounded_String;
Version : Integer;
Application : AWA.OAuth.Models.Application_Ref;
end record;
type Callback_Access is access all Callback_Impl;
overriding
procedure Destroy (Object : access Callback_Impl);
overriding
procedure Find (Object : in out Callback_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Callback_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Callback_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Callback_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Callback_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Callback_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Callback_Ref'Class;
Impl : out Callback_Access);
SESSION_NAME : aliased constant String := "awa_oauth_session";
COL_0_3_NAME : aliased constant String := "id";
COL_1_3_NAME : aliased constant String := "create_date";
COL_2_3_NAME : aliased constant String := "salt";
COL_3_3_NAME : aliased constant String := "expire_date";
COL_4_3_NAME : aliased constant String := "application_id";
COL_5_3_NAME : aliased constant String := "user_id";
COL_6_3_NAME : aliased constant String := "session_id";
SESSION_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 7,
Table => SESSION_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,
6 => COL_5_3_NAME'Access,
7 => COL_6_3_NAME'Access)
);
SESSION_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= SESSION_DEF'Access;
Null_Session : constant Session_Ref
:= Session_Ref'(ADO.Objects.Object_Ref with null record);
type Session_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => SESSION_DEF'Access)
with record
Create_Date : Ada.Calendar.Time;
Salt : Ada.Strings.Unbounded.Unbounded_String;
Expire_Date : Ada.Calendar.Time;
Application : AWA.OAuth.Models.Application_Ref;
User : AWA.Users.Models.User_Ref;
Session : AWA.Users.Models.Session_Ref;
end record;
type Session_Access is access all Session_Impl;
overriding
procedure Destroy (Object : access Session_Impl);
overriding
procedure Find (Object : in out Session_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Session_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Session_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Session_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Session_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Session_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Session_Ref'Class;
Impl : out Session_Access);
end AWA.OAuth.Models;
|
pragma Warnings (Off);
pragma Ada_95;
with System;
with System.Parameters;
with System.Secondary_Stack;
package ada_main is
gnat_argc : Integer;
gnat_argv : System.Address;
gnat_envp : System.Address;
pragma Import (C, gnat_argc);
pragma Import (C, gnat_argv);
pragma Import (C, gnat_envp);
gnat_exit_status : Integer;
pragma Import (C, gnat_exit_status);
GNAT_Version : constant String :=
"GNAT Version: Community 2020 (20200818-93)" & ASCII.NUL;
pragma Export (C, GNAT_Version, "__gnat_version");
Ada_Main_Program_Name : constant String := "_ada_demovec" & ASCII.NUL;
pragma Export (C, Ada_Main_Program_Name, "__gnat_ada_main_program_name");
procedure adainit;
pragma Export (C, adainit, "adainit");
procedure adafinal;
pragma Export (C, adafinal, "adafinal");
function main
(argc : Integer;
argv : System.Address;
envp : System.Address)
return Integer;
pragma Export (C, main, "main");
type Version_32 is mod 2 ** 32;
u00001 : constant Version_32 := 16#e99f06d5#;
pragma Export (C, u00001, "demovecB");
u00002 : constant Version_32 := 16#67c8d842#;
pragma Export (C, u00002, "system__standard_libraryB");
u00003 : constant Version_32 := 16#5741b5a5#;
pragma Export (C, u00003, "system__standard_libraryS");
u00004 : constant Version_32 := 16#76789da1#;
pragma Export (C, u00004, "adaS");
u00005 : constant Version_32 := 16#f64b89a4#;
pragma Export (C, u00005, "ada__integer_text_ioB");
u00006 : constant Version_32 := 16#2ec7c168#;
pragma Export (C, u00006, "ada__integer_text_ioS");
u00007 : constant Version_32 := 16#f34ff985#;
pragma Export (C, u00007, "ada__exceptionsB");
u00008 : constant Version_32 := 16#cfbb5cc5#;
pragma Export (C, u00008, "ada__exceptionsS");
u00009 : constant Version_32 := 16#35e1815f#;
pragma Export (C, u00009, "ada__exceptions__last_chance_handlerB");
u00010 : constant Version_32 := 16#cfec26ee#;
pragma Export (C, u00010, "ada__exceptions__last_chance_handlerS");
u00011 : constant Version_32 := 16#32a08138#;
pragma Export (C, u00011, "systemS");
u00012 : constant Version_32 := 16#ae860117#;
pragma Export (C, u00012, "system__soft_linksB");
u00013 : constant Version_32 := 16#4d9536d3#;
pragma Export (C, u00013, "system__soft_linksS");
u00014 : constant Version_32 := 16#59d61025#;
pragma Export (C, u00014, "system__secondary_stackB");
u00015 : constant Version_32 := 16#c30bb6bc#;
pragma Export (C, u00015, "system__secondary_stackS");
u00016 : constant Version_32 := 16#896564a3#;
pragma Export (C, u00016, "system__parametersB");
u00017 : constant Version_32 := 16#75f245f3#;
pragma Export (C, u00017, "system__parametersS");
u00018 : constant Version_32 := 16#ced09590#;
pragma Export (C, u00018, "system__storage_elementsB");
u00019 : constant Version_32 := 16#1f63cb3c#;
pragma Export (C, u00019, "system__storage_elementsS");
u00020 : constant Version_32 := 16#ce3e0e21#;
pragma Export (C, u00020, "system__soft_links__initializeB");
u00021 : constant Version_32 := 16#5697fc2b#;
pragma Export (C, u00021, "system__soft_links__initializeS");
u00022 : constant Version_32 := 16#41837d1e#;
pragma Export (C, u00022, "system__stack_checkingB");
u00023 : constant Version_32 := 16#bc1fead0#;
pragma Export (C, u00023, "system__stack_checkingS");
u00024 : constant Version_32 := 16#34742901#;
pragma Export (C, u00024, "system__exception_tableB");
u00025 : constant Version_32 := 16#0dc9c2c8#;
pragma Export (C, u00025, "system__exception_tableS");
u00026 : constant Version_32 := 16#ce4af020#;
pragma Export (C, u00026, "system__exceptionsB");
u00027 : constant Version_32 := 16#5ac3ecce#;
pragma Export (C, u00027, "system__exceptionsS");
u00028 : constant Version_32 := 16#69416224#;
pragma Export (C, u00028, "system__exceptions__machineB");
u00029 : constant Version_32 := 16#5c74e542#;
pragma Export (C, u00029, "system__exceptions__machineS");
u00030 : constant Version_32 := 16#aa0563fc#;
pragma Export (C, u00030, "system__exceptions_debugB");
u00031 : constant Version_32 := 16#2eed524e#;
pragma Export (C, u00031, "system__exceptions_debugS");
u00032 : constant Version_32 := 16#6c2f8802#;
pragma Export (C, u00032, "system__img_intB");
u00033 : constant Version_32 := 16#307b61fa#;
pragma Export (C, u00033, "system__img_intS");
u00034 : constant Version_32 := 16#39df8c17#;
pragma Export (C, u00034, "system__tracebackB");
u00035 : constant Version_32 := 16#6c825ffc#;
pragma Export (C, u00035, "system__tracebackS");
u00036 : constant Version_32 := 16#9ed49525#;
pragma Export (C, u00036, "system__traceback_entriesB");
u00037 : constant Version_32 := 16#32fb7748#;
pragma Export (C, u00037, "system__traceback_entriesS");
u00038 : constant Version_32 := 16#3f39e75e#;
pragma Export (C, u00038, "system__traceback__symbolicB");
u00039 : constant Version_32 := 16#46491211#;
pragma Export (C, u00039, "system__traceback__symbolicS");
u00040 : constant Version_32 := 16#179d7d28#;
pragma Export (C, u00040, "ada__containersS");
u00041 : constant Version_32 := 16#701f9d88#;
pragma Export (C, u00041, "ada__exceptions__tracebackB");
u00042 : constant Version_32 := 16#ae2d2db5#;
pragma Export (C, u00042, "ada__exceptions__tracebackS");
u00043 : constant Version_32 := 16#e865e681#;
pragma Export (C, u00043, "system__bounded_stringsB");
u00044 : constant Version_32 := 16#455da021#;
pragma Export (C, u00044, "system__bounded_stringsS");
u00045 : constant Version_32 := 16#7b499e82#;
pragma Export (C, u00045, "system__crtlS");
u00046 : constant Version_32 := 16#641e2245#;
pragma Export (C, u00046, "system__dwarf_linesB");
u00047 : constant Version_32 := 16#40ce1ea3#;
pragma Export (C, u00047, "system__dwarf_linesS");
u00048 : constant Version_32 := 16#5b4659fa#;
pragma Export (C, u00048, "ada__charactersS");
u00049 : constant Version_32 := 16#8f637df8#;
pragma Export (C, u00049, "ada__characters__handlingB");
u00050 : constant Version_32 := 16#3b3f6154#;
pragma Export (C, u00050, "ada__characters__handlingS");
u00051 : constant Version_32 := 16#4b7bb96a#;
pragma Export (C, u00051, "ada__characters__latin_1S");
u00052 : constant Version_32 := 16#e6d4fa36#;
pragma Export (C, u00052, "ada__stringsS");
u00053 : constant Version_32 := 16#96df1a3f#;
pragma Export (C, u00053, "ada__strings__mapsB");
u00054 : constant Version_32 := 16#1e526bec#;
pragma Export (C, u00054, "ada__strings__mapsS");
u00055 : constant Version_32 := 16#465aa89c#;
pragma Export (C, u00055, "system__bit_opsB");
u00056 : constant Version_32 := 16#0765e3a3#;
pragma Export (C, u00056, "system__bit_opsS");
u00057 : constant Version_32 := 16#6c6ff32a#;
pragma Export (C, u00057, "system__unsigned_typesS");
u00058 : constant Version_32 := 16#92f05f13#;
pragma Export (C, u00058, "ada__strings__maps__constantsS");
u00059 : constant Version_32 := 16#5ab55268#;
pragma Export (C, u00059, "interfacesS");
u00060 : constant Version_32 := 16#a0d3d22b#;
pragma Export (C, u00060, "system__address_imageB");
u00061 : constant Version_32 := 16#934c1c02#;
pragma Export (C, u00061, "system__address_imageS");
u00062 : constant Version_32 := 16#8631cc2e#;
pragma Export (C, u00062, "system__img_unsB");
u00063 : constant Version_32 := 16#f39bcfdd#;
pragma Export (C, u00063, "system__img_unsS");
u00064 : constant Version_32 := 16#20ec7aa3#;
pragma Export (C, u00064, "system__ioB");
u00065 : constant Version_32 := 16#ace27677#;
pragma Export (C, u00065, "system__ioS");
u00066 : constant Version_32 := 16#3080f2ca#;
pragma Export (C, u00066, "system__mmapB");
u00067 : constant Version_32 := 16#9ad4d587#;
pragma Export (C, u00067, "system__mmapS");
u00068 : constant Version_32 := 16#92d882c5#;
pragma Export (C, u00068, "ada__io_exceptionsS");
u00069 : constant Version_32 := 16#a8ba7b3b#;
pragma Export (C, u00069, "system__mmap__os_interfaceB");
u00070 : constant Version_32 := 16#8f4541b8#;
pragma Export (C, u00070, "system__mmap__os_interfaceS");
u00071 : constant Version_32 := 16#657efc5a#;
pragma Export (C, u00071, "system__os_libB");
u00072 : constant Version_32 := 16#d872da39#;
pragma Export (C, u00072, "system__os_libS");
u00073 : constant Version_32 := 16#ec4d5631#;
pragma Export (C, u00073, "system__case_utilB");
u00074 : constant Version_32 := 16#0d75376c#;
pragma Export (C, u00074, "system__case_utilS");
u00075 : constant Version_32 := 16#2a8e89ad#;
pragma Export (C, u00075, "system__stringsB");
u00076 : constant Version_32 := 16#52b6adad#;
pragma Export (C, u00076, "system__stringsS");
u00077 : constant Version_32 := 16#e49bce3e#;
pragma Export (C, u00077, "interfaces__cB");
u00078 : constant Version_32 := 16#dbc36ce0#;
pragma Export (C, u00078, "interfaces__cS");
u00079 : constant Version_32 := 16#c83ab8ef#;
pragma Export (C, u00079, "system__object_readerB");
u00080 : constant Version_32 := 16#f6d45c39#;
pragma Export (C, u00080, "system__object_readerS");
u00081 : constant Version_32 := 16#914b0305#;
pragma Export (C, u00081, "system__val_lliB");
u00082 : constant Version_32 := 16#5ece13c8#;
pragma Export (C, u00082, "system__val_lliS");
u00083 : constant Version_32 := 16#d2ae2792#;
pragma Export (C, u00083, "system__val_lluB");
u00084 : constant Version_32 := 16#01a17ec8#;
pragma Export (C, u00084, "system__val_lluS");
u00085 : constant Version_32 := 16#269742a9#;
pragma Export (C, u00085, "system__val_utilB");
u00086 : constant Version_32 := 16#9e0037c6#;
pragma Export (C, u00086, "system__val_utilS");
u00087 : constant Version_32 := 16#b578159b#;
pragma Export (C, u00087, "system__exception_tracesB");
u00088 : constant Version_32 := 16#167fa1a2#;
pragma Export (C, u00088, "system__exception_tracesS");
u00089 : constant Version_32 := 16#e1282880#;
pragma Export (C, u00089, "system__win32S");
u00090 : constant Version_32 := 16#8c33a517#;
pragma Export (C, u00090, "system__wch_conB");
u00091 : constant Version_32 := 16#29dda3ea#;
pragma Export (C, u00091, "system__wch_conS");
u00092 : constant Version_32 := 16#9721e840#;
pragma Export (C, u00092, "system__wch_stwB");
u00093 : constant Version_32 := 16#04cc8feb#;
pragma Export (C, u00093, "system__wch_stwS");
u00094 : constant Version_32 := 16#a831679c#;
pragma Export (C, u00094, "system__wch_cnvB");
u00095 : constant Version_32 := 16#266a1919#;
pragma Export (C, u00095, "system__wch_cnvS");
u00096 : constant Version_32 := 16#ece6fdb6#;
pragma Export (C, u00096, "system__wch_jisB");
u00097 : constant Version_32 := 16#a61a0038#;
pragma Export (C, u00097, "system__wch_jisS");
u00098 : constant Version_32 := 16#f4e097a7#;
pragma Export (C, u00098, "ada__text_ioB");
u00099 : constant Version_32 := 16#03e83e15#;
pragma Export (C, u00099, "ada__text_ioS");
u00100 : constant Version_32 := 16#10558b11#;
pragma Export (C, u00100, "ada__streamsB");
u00101 : constant Version_32 := 16#67e31212#;
pragma Export (C, u00101, "ada__streamsS");
u00102 : constant Version_32 := 16#f9576a72#;
pragma Export (C, u00102, "ada__tagsB");
u00103 : constant Version_32 := 16#b6661f55#;
pragma Export (C, u00103, "ada__tagsS");
u00104 : constant Version_32 := 16#796f31f1#;
pragma Export (C, u00104, "system__htableB");
u00105 : constant Version_32 := 16#b66232d2#;
pragma Export (C, u00105, "system__htableS");
u00106 : constant Version_32 := 16#089f5cd0#;
pragma Export (C, u00106, "system__string_hashB");
u00107 : constant Version_32 := 16#143c59ac#;
pragma Export (C, u00107, "system__string_hashS");
u00108 : constant Version_32 := 16#73d2d764#;
pragma Export (C, u00108, "interfaces__c_streamsB");
u00109 : constant Version_32 := 16#b1330297#;
pragma Export (C, u00109, "interfaces__c_streamsS");
u00110 : constant Version_32 := 16#ec9c64c3#;
pragma Export (C, u00110, "system__file_ioB");
u00111 : constant Version_32 := 16#95d1605d#;
pragma Export (C, u00111, "system__file_ioS");
u00112 : constant Version_32 := 16#86c56e5a#;
pragma Export (C, u00112, "ada__finalizationS");
u00113 : constant Version_32 := 16#95817ed8#;
pragma Export (C, u00113, "system__finalization_rootB");
u00114 : constant Version_32 := 16#7d52f2a8#;
pragma Export (C, u00114, "system__finalization_rootS");
u00115 : constant Version_32 := 16#cf3f1b90#;
pragma Export (C, u00115, "system__file_control_blockS");
u00116 : constant Version_32 := 16#fdedfd10#;
pragma Export (C, u00116, "ada__text_io__integer_auxB");
u00117 : constant Version_32 := 16#2fe01d89#;
pragma Export (C, u00117, "ada__text_io__integer_auxS");
u00118 : constant Version_32 := 16#181dc502#;
pragma Export (C, u00118, "ada__text_io__generic_auxB");
u00119 : constant Version_32 := 16#305a076a#;
pragma Export (C, u00119, "ada__text_io__generic_auxS");
u00120 : constant Version_32 := 16#db42ae56#;
pragma Export (C, u00120, "system__img_biuB");
u00121 : constant Version_32 := 16#aa4d7b67#;
pragma Export (C, u00121, "system__img_biuS");
u00122 : constant Version_32 := 16#244fa59d#;
pragma Export (C, u00122, "system__img_llbB");
u00123 : constant Version_32 := 16#eb8a6b99#;
pragma Export (C, u00123, "system__img_llbS");
u00124 : constant Version_32 := 16#9dca6636#;
pragma Export (C, u00124, "system__img_lliB");
u00125 : constant Version_32 := 16#23efd4e9#;
pragma Export (C, u00125, "system__img_lliS");
u00126 : constant Version_32 := 16#cd1fde06#;
pragma Export (C, u00126, "system__img_llwB");
u00127 : constant Version_32 := 16#42e6480f#;
pragma Export (C, u00127, "system__img_llwS");
u00128 : constant Version_32 := 16#811cd12a#;
pragma Export (C, u00128, "system__img_wiuB");
u00129 : constant Version_32 := 16#c40cfcf5#;
pragma Export (C, u00129, "system__img_wiuS");
u00130 : constant Version_32 := 16#65de8d35#;
pragma Export (C, u00130, "system__val_intB");
u00131 : constant Version_32 := 16#875fe85b#;
pragma Export (C, u00131, "system__val_intS");
u00132 : constant Version_32 := 16#5276dcb7#;
pragma Export (C, u00132, "system__val_unsB");
u00133 : constant Version_32 := 16#59698e93#;
pragma Export (C, u00133, "system__val_unsS");
u00134 : constant Version_32 := 16#ce89409d#;
pragma Export (C, u00134, "vector_packageB");
u00135 : constant Version_32 := 16#a4dbf6a2#;
pragma Export (C, u00135, "vector_packageS");
u00136 : constant Version_32 := 16#eca5ecae#;
pragma Export (C, u00136, "system__memoryB");
u00137 : constant Version_32 := 16#6bdde70c#;
pragma Export (C, u00137, "system__memoryS");
-- BEGIN ELABORATION ORDER
-- ada%s
-- ada.characters%s
-- ada.characters.latin_1%s
-- interfaces%s
-- system%s
-- system.img_int%s
-- system.img_int%b
-- system.img_lli%s
-- system.img_lli%b
-- system.io%s
-- system.io%b
-- system.parameters%s
-- system.parameters%b
-- system.crtl%s
-- interfaces.c_streams%s
-- interfaces.c_streams%b
-- system.storage_elements%s
-- system.storage_elements%b
-- system.stack_checking%s
-- system.stack_checking%b
-- system.string_hash%s
-- system.string_hash%b
-- system.htable%s
-- system.htable%b
-- system.strings%s
-- system.strings%b
-- system.traceback_entries%s
-- system.traceback_entries%b
-- system.unsigned_types%s
-- system.img_biu%s
-- system.img_biu%b
-- system.img_llb%s
-- system.img_llb%b
-- system.img_llw%s
-- system.img_llw%b
-- system.img_uns%s
-- system.img_uns%b
-- system.img_wiu%s
-- system.img_wiu%b
-- system.wch_con%s
-- system.wch_con%b
-- system.wch_jis%s
-- system.wch_jis%b
-- system.wch_cnv%s
-- system.wch_cnv%b
-- system.traceback%s
-- system.traceback%b
-- ada.characters.handling%s
-- system.case_util%s
-- system.os_lib%s
-- system.secondary_stack%s
-- system.standard_library%s
-- ada.exceptions%s
-- system.exceptions_debug%s
-- system.exceptions_debug%b
-- system.soft_links%s
-- system.val_lli%s
-- system.val_llu%s
-- system.val_util%s
-- system.val_util%b
-- system.wch_stw%s
-- system.wch_stw%b
-- ada.exceptions.last_chance_handler%s
-- ada.exceptions.last_chance_handler%b
-- ada.exceptions.traceback%s
-- ada.exceptions.traceback%b
-- system.address_image%s
-- system.address_image%b
-- system.bit_ops%s
-- system.bit_ops%b
-- system.bounded_strings%s
-- system.bounded_strings%b
-- system.case_util%b
-- system.exception_table%s
-- system.exception_table%b
-- ada.containers%s
-- ada.io_exceptions%s
-- ada.strings%s
-- ada.strings.maps%s
-- ada.strings.maps%b
-- ada.strings.maps.constants%s
-- interfaces.c%s
-- interfaces.c%b
-- system.exceptions%s
-- system.exceptions%b
-- system.exceptions.machine%s
-- system.exceptions.machine%b
-- system.win32%s
-- ada.characters.handling%b
-- system.exception_traces%s
-- system.exception_traces%b
-- system.memory%s
-- system.memory%b
-- system.mmap%s
-- system.mmap.os_interface%s
-- system.mmap.os_interface%b
-- system.mmap%b
-- system.object_reader%s
-- system.object_reader%b
-- system.dwarf_lines%s
-- system.dwarf_lines%b
-- system.os_lib%b
-- system.secondary_stack%b
-- system.soft_links.initialize%s
-- system.soft_links.initialize%b
-- system.soft_links%b
-- system.standard_library%b
-- system.traceback.symbolic%s
-- system.traceback.symbolic%b
-- ada.exceptions%b
-- system.val_lli%b
-- system.val_llu%b
-- ada.tags%s
-- ada.tags%b
-- ada.streams%s
-- ada.streams%b
-- system.file_control_block%s
-- system.finalization_root%s
-- system.finalization_root%b
-- ada.finalization%s
-- system.file_io%s
-- system.file_io%b
-- system.val_uns%s
-- system.val_uns%b
-- system.val_int%s
-- system.val_int%b
-- ada.text_io%s
-- ada.text_io%b
-- ada.text_io.generic_aux%s
-- ada.text_io.generic_aux%b
-- ada.text_io.integer_aux%s
-- ada.text_io.integer_aux%b
-- ada.integer_text_io%s
-- ada.integer_text_io%b
-- vector_package%s
-- vector_package%b
-- demovec%b
-- END ELABORATION ORDER
end ada_main;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ L L D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005 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, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Image for decimal fixed types where the size of the corresponding integer
-- type does exceeds Integer'Size (also used for Text_IO.Decimal_IO output)
package System.Img_LLD is
pragma Preelaborate;
function Image_Long_Long_Decimal
(V : Long_Long_Integer;
Scale : Integer)
return String;
-- Compute 'Image of V, the integer value (in units of delta) of a decimal
-- type whose Scale is as given and returns the result. The image is given
-- by the rules in RM 3.5(34) for fixed-point type image functions.
procedure Set_Image_Long_Long_Decimal
(V : Long_Long_Integer;
S : out String;
P : in out Natural;
Scale : Integer;
Fore : Natural;
Aft : Natural;
Exp : Natural);
-- Sets the image of V, where V is the integer value (in units of delta)
-- of a decimal type with the given Scale, starting at S (P + 1), updating
-- P to point to the last character stored, the caller promises that the
-- buffer is large enough and no check is made for this. Constraint_Error
-- will not necessarily be raised if this requirement is violated, since
-- it is perfectly valid to compile this unit with checks off. The Fore,
-- Aft and Exp values can be set to any valid values for the case of use
-- by Text_IO.Decimal_IO.
end System.Img_LLD;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.