repo_name
stringlengths 9
74
| language
stringclasses 1
value | length_bytes
int64 11
9.34M
| extension
stringclasses 2
values | content
stringlengths 11
9.34M
|
---|---|---|---|---|
meowthsli/veriflight_boards | Ada | 870 | ads | with HAL.SPI; use HAL.SPI;
with HAL.GPIO; use HAL.GPIO;
with Interfaces; use Interfaces;
package mpu6000_spi is
type Six_Axis_Accelerometer
(Port : not null Any_SPI_Port;
Chip_Select : not null Any_GPIO_Point) is limited private;
type Acc_Data is
record
Xacc, Yacc, Zacc : Short_Integer;
Xang, Yang, Zang : Short_Integer;
end record;
procedure Configure (this : in out Six_Axis_Accelerometer);
function Read (this : in out Six_Axis_Accelerometer) return Acc_Data;
function Id (this : in out Six_Axis_Accelerometer;
product : out Unsigned_8) return Unsigned_8;
private
type Six_Axis_Accelerometer
(Port : not null Any_SPI_Port;
Chip_Select : not null Any_GPIO_Point) is limited
record
Device_Configured : Boolean := False;
end record;
end mpu6000_spi;
|
reznikmm/matreshka | Ada | 14,552 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Named_Elements;
with AMF.UML.Activities;
with AMF.UML.Activity_Edges.Collections;
with AMF.UML.Activity_Final_Nodes;
with AMF.UML.Activity_Groups.Collections;
with AMF.UML.Activity_Nodes.Collections;
with AMF.UML.Activity_Partitions.Collections;
with AMF.UML.Classifiers.Collections;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Interruptible_Activity_Regions.Collections;
with AMF.UML.Named_Elements;
with AMF.UML.Namespaces;
with AMF.UML.Packages.Collections;
with AMF.UML.Redefinable_Elements.Collections;
with AMF.UML.String_Expressions;
with AMF.UML.Structured_Activity_Nodes;
with AMF.Visitors;
package AMF.Internals.UML_Activity_Final_Nodes is
type UML_Activity_Final_Node_Proxy is
limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
and AMF.UML.Activity_Final_Nodes.UML_Activity_Final_Node with null record;
overriding function Get_Activity
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Activities.UML_Activity_Access;
-- Getter of ActivityNode::activity.
--
-- Activity containing the node.
overriding procedure Set_Activity
(Self : not null access UML_Activity_Final_Node_Proxy;
To : AMF.UML.Activities.UML_Activity_Access);
-- Setter of ActivityNode::activity.
--
-- Activity containing the node.
overriding function Get_In_Group
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group;
-- Getter of ActivityNode::inGroup.
--
-- Groups containing the node.
overriding function Get_In_Interruptible_Region
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region;
-- Getter of ActivityNode::inInterruptibleRegion.
--
-- Interruptible regions containing the node.
overriding function Get_In_Partition
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition;
-- Getter of ActivityNode::inPartition.
--
-- Partitions containing the node.
overriding function Get_In_Structured_Node
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access;
-- Getter of ActivityNode::inStructuredNode.
--
-- Structured activity node containing the node.
overriding procedure Set_In_Structured_Node
(Self : not null access UML_Activity_Final_Node_Proxy;
To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access);
-- Setter of ActivityNode::inStructuredNode.
--
-- Structured activity node containing the node.
overriding function Get_Incoming
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
-- Getter of ActivityNode::incoming.
--
-- Edges that have the node as target.
overriding function Get_Outgoing
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
-- Getter of ActivityNode::outgoing.
--
-- Edges that have the node as source.
overriding function Get_Redefined_Node
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node;
-- Getter of ActivityNode::redefinedNode.
--
-- Inherited nodes replaced by this node in a specialization of the
-- activity.
overriding function Get_Is_Leaf
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return Boolean;
-- Getter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding procedure Set_Is_Leaf
(Self : not null access UML_Activity_Final_Node_Proxy;
To : Boolean);
-- Setter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding function Get_Redefined_Element
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
-- Getter of RedefinableElement::redefinedElement.
--
-- The redefinable element that is being redefined by this element.
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of RedefinableElement::redefinitionContext.
--
-- References the contexts that this element may be redefined from.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Activity_Final_Node_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function Is_Consistent_With
(Self : not null access constant UML_Activity_Final_Node_Proxy;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isConsistentWith.
--
-- The query isConsistentWith() specifies, for any two RedefinableElements
-- in a context in which redefinition is possible, whether redefinition
-- would be logically consistent. By default, this is false; this
-- operation must be overridden for subclasses of RedefinableElement to
-- define the consistency conditions.
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Activity_Final_Node_Proxy;
Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isRedefinitionContextValid.
--
-- The query isRedefinitionContextValid() specifies whether the
-- redefinition contexts of this RedefinableElement are properly related
-- to the redefinition contexts of the specified RedefinableElement to
-- allow this element to redefine the other. By default at least one of
-- the redefinition contexts of this element must be a specialization of
-- at least one of the redefinition contexts of the specified element.
overriding function All_Owning_Packages
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Activity_Final_Node_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Activity_Final_Node_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding procedure Enter_Element
(Self : not null access constant UML_Activity_Final_Node_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Activity_Final_Node_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Activity_Final_Node_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Activity_Final_Nodes;
|
pomadchin/ada-sample | Ada | 677 | adb | --::::::::::
--random_generic.adb
--::::::::::
with Ada.Numerics.Discrete_Random;
package body Random_Generic is
-- Body of random number generator package.
-- Uses Ada 95 random number generator; hides generator parameters
-- Michael B. Feldman, The George Washington University,
-- June 1995.
package Ada95_Random is new Ada.Numerics.Discrete_Random
(Result_Subtype => Result_Subtype);
G: Ada95_Random.Generator;
function Random_Value return Result_Subtype is
begin
return Ada95_Random.Random(Gen => G);
end Random_Value;
begin
Ada95_Random.Reset(Gen => G); -- time-dependent initialization
end Random_Generic; |
AdaCore/libadalang | Ada | 315 | adb | procedure Test is
package Lol is
type A is tagged null record;
procedure Foo (Self : access A'Class) is null;
type B is new A with null record;
type C is access all B;
end Lol;
use Lol;
Inst : C := new B'(null record);
begin
Foo (Inst);
pragma Test_Statement;
end Test;
|
anshumang/cp-snucl | Ada | 110 | adb | -- RUN: %llvmgcc -S %s
with System.Machine_Code;
procedure Asm is
begin
System.Machine_Code.Asm ("");
end;
|
reznikmm/matreshka | Ada | 4,901 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UML.Activities.Collections is
pragma Preelaborate;
package UML_Activity_Collections is
new AMF.Generic_Collections
(UML_Activity,
UML_Activity_Access);
type Set_Of_UML_Activity is
new UML_Activity_Collections.Set with null record;
Empty_Set_Of_UML_Activity : constant Set_Of_UML_Activity;
type Ordered_Set_Of_UML_Activity is
new UML_Activity_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Activity : constant Ordered_Set_Of_UML_Activity;
type Bag_Of_UML_Activity is
new UML_Activity_Collections.Bag with null record;
Empty_Bag_Of_UML_Activity : constant Bag_Of_UML_Activity;
type Sequence_Of_UML_Activity is
new UML_Activity_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Activity : constant Sequence_Of_UML_Activity;
private
Empty_Set_Of_UML_Activity : constant Set_Of_UML_Activity
:= (UML_Activity_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Activity : constant Ordered_Set_Of_UML_Activity
:= (UML_Activity_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Activity : constant Bag_Of_UML_Activity
:= (UML_Activity_Collections.Bag with null record);
Empty_Sequence_Of_UML_Activity : constant Sequence_Of_UML_Activity
:= (UML_Activity_Collections.Sequence with null record);
end AMF.UML.Activities.Collections;
|
gitter-badger/spat | Ada | 11,893 | ads | ------------------------------------------------------------------------------
-- Copyright (C) 2020 by Heisenbug Ltd. ([email protected])
--
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------------------------
pragma License (Unrestricted);
------------------------------------------------------------------------------
--
-- SPARK Proof Analysis Tool
--
-- S.P.A.T. - Object representing a JSON "proof" object.
--
------------------------------------------------------------------------------
private with Ada.Tags;
with SPAT.Entity_Location;
with SPAT.Entity.Tree;
with SPAT.Field_Names;
with SPAT.Preconditions;
private with SPAT.Unique_Ids;
package SPAT.Proof_Item is
use all type GNATCOLL.JSON.JSON_Value_Type;
---------------------------------------------------------------------------
-- Has_Required_Fields
---------------------------------------------------------------------------
function Has_Required_Fields (Object : in JSON_Value;
Version : in File_Version) return Boolean is
(Entity_Location.Has_Required_Fields (Object => Object) and
Preconditions.Ensure_Rule_Severity (Object => Object) and
Preconditions.Ensure_Field (Object => Object,
Field => Field_Names.Check_Tree,
Kind => JSON_Array_Type,
Is_Optional =>
(case Version is
when GNAT_CE_2019 => False,
when GNAT_CE_2020 => True)));
type T is new Entity_Location.T with private;
---------------------------------------------------------------------------
-- Create
--
-- This is a dummy. The object returned by Create is empty. For the real
-- "creation" of a proper object, you need to call Add_To_Tree.
---------------------------------------------------------------------------
overriding
function Create (Object : in JSON_Value) return T with
Pre => Has_Required_Fields (Object => Object,
Version => GNAT_CE_2019);
---------------------------------------------------------------------------
-- "<"
--
-- Comparison operator for proof items.
---------------------------------------------------------------------------
overriding
function "<" (Left : in T;
Right : in T) return Boolean;
---------------------------------------------------------------------------
-- Add_To_Tree
---------------------------------------------------------------------------
procedure Add_To_Tree (Object : in JSON_Value;
Version : in File_Version;
Tree : in out Entity.Tree.T;
Parent : in Entity.Tree.Cursor) with
Pre => Has_Required_Fields (Object => Object,
Version => Version);
---------------------------------------------------------------------------
-- Has_Failed_Attempts
---------------------------------------------------------------------------
not overriding
function Has_Failed_Attempts (This : in T) return Boolean;
---------------------------------------------------------------------------
not overriding
function Has_Unproved_Attempts (This : in T) return Boolean;
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in T) return String;
---------------------------------------------------------------------------
-- Is_Unjustified
---------------------------------------------------------------------------
not overriding
function Is_Unjustified (This : in T) return Boolean;
---------------------------------------------------------------------------
-- Rule
---------------------------------------------------------------------------
not overriding
function Rule (This : in T) return Subject_Name;
---------------------------------------------------------------------------
-- Max_Success_Time
---------------------------------------------------------------------------
not overriding
function Max_Success_Time (This : in T) return Duration;
---------------------------------------------------------------------------
-- Max_Time
---------------------------------------------------------------------------
not overriding
function Max_Time (This : in T) return Duration;
---------------------------------------------------------------------------
-- Total_Time
---------------------------------------------------------------------------
not overriding
function Total_Time (This : in T) return Duration;
---------------------------------------------------------------------------
-- Suppressed
---------------------------------------------------------------------------
not overriding
function Suppressed (This : in T) return Subject_Name;
---------------------------------------------------------------------------
-- Before
---------------------------------------------------------------------------
function Before (Left : in Entity.T'Class;
Right : in Entity.T'Class) return Boolean is
(Proof_Item.T (Left) < Proof_Item.T (Right));
package By_Duration is new Entity.Tree.Generic_Sorting (Before => Before);
---------------------------------------------------------------------------
-- Sort_By_Duration
---------------------------------------------------------------------------
procedure Sort_By_Duration (Tree : in out Entity.Tree.T;
Parent : in Entity.Tree.Cursor)
renames By_Duration.Sort;
type Checks_Sentinel is new Entity.T with private;
---------------------------------------------------------------------------
-- Has_Failed_Attempts
---------------------------------------------------------------------------
function Has_Failed_Attempts (This : in Checks_Sentinel) return Boolean;
---------------------------------------------------------------------------
-- Is_Unproved
---------------------------------------------------------------------------
function Is_Unproved (This : in Checks_Sentinel) return Boolean;
private
package Proof_Item_Ids is new Unique_Ids;
type Checks_Sentinel is new Entity.T with
record
Has_Failed_Attempts : Boolean;
Is_Unproved : Boolean;
end record;
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in Checks_Sentinel) return String is
(Ada.Tags.External_Tag (Checks_Sentinel'Class (This)'Tag) & ": " &
"(Has_Failed_Attempts => " & This.Has_Failed_Attempts'Image &
", Is_Unproved => " & This.Is_Unproved'Image & ")");
---------------------------------------------------------------------------
-- Has_Failed_Attempts
---------------------------------------------------------------------------
not overriding
function Has_Failed_Attempts (This : in Checks_Sentinel) return Boolean is
(This.Has_Failed_Attempts);
---------------------------------------------------------------------------
-- Is_Unproved
---------------------------------------------------------------------------
not overriding
function Is_Unproved (This : in Checks_Sentinel) return Boolean is
(This.Is_Unproved);
type Proof_Item_Sentinel is new Entity.T with null record;
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in Proof_Item_Sentinel) return String is
(Ada.Tags.External_Tag (Proof_Item_Sentinel'Class (This)'Tag) & ": ()");
type T is new Entity_Location.T with
record
Suppressed : Subject_Name;
Rule : Subject_Name;
Severity : Subject_Name;
Max_Success_Time : Duration; -- Longest time for a successful proof.
Max_Time : Duration; -- Longest time spent in proof (successful or not)
Total_Time : Duration; -- Accumulated proof time.
Id : Proof_Item_Ids.Id; -- Id for stable sorting.
Has_Failed_Attempts : Boolean;
Has_Unproved_Attempts : Boolean;
Is_Unjustified : Boolean;
end record;
---------------------------------------------------------------------------
-- Has_Failed_Attempts
---------------------------------------------------------------------------
not overriding
function Has_Failed_Attempts (This : in T) return Boolean is
(This.Has_Failed_Attempts);
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in T) return String is
(To_String (This.Rule) & " " &
Entity_Location.T (This).Image & " => " &
(if This.Has_Unproved_Attempts
then "--"
else Image (Value => This.Max_Success_Time)) & "/" &
Image (Value => This.Max_Time) & "/" &
Image (Value => This.Total_Time));
---------------------------------------------------------------------------
-- Is_Unjustified
---------------------------------------------------------------------------
not overriding
function Is_Unjustified (This : in T) return Boolean is
(This.Is_Unjustified);
---------------------------------------------------------------------------
-- Has_Unproved_Attempts
---------------------------------------------------------------------------
not overriding
function Has_Unproved_Attempts (This : in T) return Boolean is
(This.Has_Unproved_Attempts);
---------------------------------------------------------------------------
-- Max_Success_Time
---------------------------------------------------------------------------
not overriding
function Max_Success_Time (This : in T) return Duration is
(This.Max_Success_Time);
---------------------------------------------------------------------------
-- Max_Time
---------------------------------------------------------------------------
not overriding
function Max_Time (This : in T) return Duration is
(This.Max_Time);
---------------------------------------------------------------------------
-- Rule
---------------------------------------------------------------------------
not overriding
function Rule (This : in T) return Subject_Name is
(This.Rule);
---------------------------------------------------------------------------
-- Suppressed
---------------------------------------------------------------------------
not overriding
function Suppressed (This : in T) return Subject_Name is
(This.Suppressed);
---------------------------------------------------------------------------
-- Total_Time
---------------------------------------------------------------------------
not overriding
function Total_Time (This : in T) return Duration is
(This.Total_Time);
end SPAT.Proof_Item;
|
reznikmm/matreshka | Ada | 5,394 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UMLDI.UML_Component_Diagrams.Collections is
pragma Preelaborate;
package UMLDI_UML_Component_Diagram_Collections is
new AMF.Generic_Collections
(UMLDI_UML_Component_Diagram,
UMLDI_UML_Component_Diagram_Access);
type Set_Of_UMLDI_UML_Component_Diagram is
new UMLDI_UML_Component_Diagram_Collections.Set with null record;
Empty_Set_Of_UMLDI_UML_Component_Diagram : constant Set_Of_UMLDI_UML_Component_Diagram;
type Ordered_Set_Of_UMLDI_UML_Component_Diagram is
new UMLDI_UML_Component_Diagram_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UMLDI_UML_Component_Diagram : constant Ordered_Set_Of_UMLDI_UML_Component_Diagram;
type Bag_Of_UMLDI_UML_Component_Diagram is
new UMLDI_UML_Component_Diagram_Collections.Bag with null record;
Empty_Bag_Of_UMLDI_UML_Component_Diagram : constant Bag_Of_UMLDI_UML_Component_Diagram;
type Sequence_Of_UMLDI_UML_Component_Diagram is
new UMLDI_UML_Component_Diagram_Collections.Sequence with null record;
Empty_Sequence_Of_UMLDI_UML_Component_Diagram : constant Sequence_Of_UMLDI_UML_Component_Diagram;
private
Empty_Set_Of_UMLDI_UML_Component_Diagram : constant Set_Of_UMLDI_UML_Component_Diagram
:= (UMLDI_UML_Component_Diagram_Collections.Set with null record);
Empty_Ordered_Set_Of_UMLDI_UML_Component_Diagram : constant Ordered_Set_Of_UMLDI_UML_Component_Diagram
:= (UMLDI_UML_Component_Diagram_Collections.Ordered_Set with null record);
Empty_Bag_Of_UMLDI_UML_Component_Diagram : constant Bag_Of_UMLDI_UML_Component_Diagram
:= (UMLDI_UML_Component_Diagram_Collections.Bag with null record);
Empty_Sequence_Of_UMLDI_UML_Component_Diagram : constant Sequence_Of_UMLDI_UML_Component_Diagram
:= (UMLDI_UML_Component_Diagram_Collections.Sequence with null record);
end AMF.UMLDI.UML_Component_Diagrams.Collections;
|
reznikmm/matreshka | Ada | 4,270 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Examples Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Ada.Command_Line;
with League.Application;
with League.Strings;
with XML.SAX.Input_Sources.Streams.Files;
with XML.SAX.Simple_Readers;
with Events_Printers;
procedure DHTML_Translator is
Source : aliased XML.SAX.Input_Sources.Streams.Files.File_Input_Source;
Reader : aliased XML.SAX.Simple_Readers.SAX_Simple_Reader;
Handler : aliased Events_Printers.Events_Printer;
begin
Events_Printers.Initialize;
Reader.Set_Content_Handler (Handler'Unchecked_Access);
Reader.Set_Declaration_Handler (Handler'Unchecked_Access);
Reader.Set_DTD_Handler (Handler'Unchecked_Access);
Reader.Set_Entity_Resolver (Handler'Unchecked_Access);
Reader.Set_Error_Handler (Handler'Unchecked_Access);
Reader.Set_Lexical_Handler (Handler'Unchecked_Access);
Source.Open_By_File_Name (League.Application.Arguments.Element (1));
Reader.Parse (Source'Access);
Events_Printers.Close;
end DHTML_Translator;
|
sf17k/sdlada | Ada | 3,503 | adb | --------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2014-2015 Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
with Interfaces.C;
private with SDL.C_Pointers;
with SDL.Error;
package body SDL.Video.Renderers.Makers is
package C renames Interfaces.C;
use type C.int;
use type SDL.C_Pointers.Texture_Pointer;
function Get_Internal_Window (Self : in SDL.Video.Windows.Window) return SDL.C_Pointers.Windows_Pointer with
Convention => Ada,
Import => True;
function Get_Internal_Surface (Self : in SDL.Video.Surfaces.Surface) return SDL.C_Pointers.Surface_Pointer with
Import => True,
Convention => Ada;
procedure Create
(Rend : in out Renderer;
Window : in out SDL.Video.Windows.Window;
Driver : in Positive;
Flags : in Renderer_Flags := Default_Renderer_Flags) is
function SDL_Create_Renderer (W : in SDL.C_Pointers.Windows_Pointer; Index : in C.int; Flags : in Renderer_Flags)
return SDL.C_Pointers.Renderer_Pointer with
Import => True,
Convention => C,
External_Name => "SDL_CreateRenderer";
begin
Rend.Internal := SDL_Create_Renderer (Get_Internal_Window (Window), C.int (Driver), Flags);
end Create;
procedure Create
(Rend : in out Renderer;
Window : in out SDL.Video.Windows.Window;
Flags : in Renderer_Flags := Default_Renderer_Flags) is
function SDL_Create_Renderer (W : in SDL.C_Pointers.Windows_Pointer; Index : in C.int; Flags : in Renderer_Flags)
return SDL.C_Pointers.Renderer_Pointer with
Import => True,
Convention => C,
External_Name => "SDL_CreateRenderer";
begin
Rend.Internal := SDL_Create_Renderer (Get_Internal_Window (Window), -1, Flags);
Rend.Owns := True;
end Create;
procedure Create
(Rend : in out Renderer;
Surface : in SDL.Video.Surfaces.Surface) is
function SDL_Create_Software_Renderer (S : in SDL.C_Pointers.Surface_Pointer)
return SDL.C_Pointers.Renderer_Pointer with
Import => True,
Convention => C,
External_Name => "SDL_CreateSoftwareRenderer";
begin
Rend.Internal := SDL_Create_Software_Renderer (Get_Internal_Surface (Surface));
Rend.Owns := True;
end Create;
end SDL.Video.Renderers.Makers;
|
zhmu/ananas | Ada | 3,172 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . S H A 2 2 4 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2009-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package implements the SHA-224 secure hash function as described in
-- FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
-- http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
-- See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
-- documentation.
with GNAT.Secure_Hashes.SHA2_Common;
with GNAT.Secure_Hashes.SHA2_32;
with System;
package GNAT.SHA224 is new GNAT.Secure_Hashes.H
(Block_Words => GNAT.Secure_Hashes.SHA2_Common.Block_Words,
State_Words => 8,
Hash_Words => 7,
Hash_Bit_Order => System.High_Order_First,
Hash_State => GNAT.Secure_Hashes.SHA2_32.Hash_State,
Initial_State => GNAT.Secure_Hashes.SHA2_32.SHA224_Init_State,
Transform => GNAT.Secure_Hashes.SHA2_32.Transform);
|
zhmu/ananas | Ada | 2,788 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- A D A . I N T E R R U P T S . N A M E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1998-2022, Free Software Foundation, Inc. --
-- --
-- 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. 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. --
-- --
------------------------------------------------------------------------------
-- This is the VxWorks version of this package
with System.OS_Interface;
package Ada.Interrupts.Names is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
subtype Hardware_Interrupts is Interrupt_ID
range Interrupt_ID'First .. System.OS_Interface.Max_HW_Interrupt;
-- Range of values that can be used for hardware interrupts
end Ada.Interrupts.Names;
|
AdaCore/libadalang | Ada | 296 | ads | generic
type T is private;
X : in out T;
--% node.p_is_constant_object
Y : in T;
--% node.p_is_constant_object
procedure P
(N : Integer;
M : in Integer;
O : in out Integer;
P : out Integer);
--% [x.p_is_constant_object for x in node.f_subp_decl.f_subp_spec.p_params]
|
jrcarter/Ada_GUI | Ada | 6,171 | ads | -- --
-- package Object.Handle Copyright (c) Dmitry A. Kazakov --
-- Interface Luebeck --
-- Winter, 2002 --
-- --
-- Last revision : 20:41 21 Jul 2017 --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public License as --
-- published by the Free Software Foundation; either version 2 of --
-- the License, or (at your option) any later version. This library --
-- is distributed in the hope that it will be useful, but WITHOUT --
-- ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have --
-- received a copy of the GNU General Public License along with --
-- this library; if not, write to the Free Software Foundation, --
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
--____________________________________________________________________--
--
-- The generic package Object.Handle provides the the type Handle used
-- to reference decendants of the type Entity (declared in the package
-- Object). An object is not destroyed as long as at least one handle of
-- a object exists. The object is destoyed upon finalization of the last
-- handle to it. Handles can be copied.
--
-- Object_Type - A type derived from Object.Entity
-- Object_Type_Ptr - A class-wide access type for Object_Type'Class
--
generic
type Object_Type (<>) is abstract new Entity with private;
type Object_Type_Ptr is access Object_Type'Class;
package Object.Handle is
type Handle is new Ada.Finalization.Controlled with private;
Null_Handle : constant Handle;
--
-- Adjust -- Assignment
--
-- Reference - The handle
--
-- This procedure increases the reference count the object.
--
procedure Adjust (Reference : in out Handle);
--
-- Finalize -- Destructor
--
-- Reference - The handle
--
-- When the last handle to the object is finalized, the object is
-- destroyed.
--
procedure Finalize (Reference : in out Handle);
--
-- Invalidate -- Detach handle from the object
--
-- Reference - The handle
--
-- This procedure makes handle pointing to nothing. If it was the last
-- reference to the object, the later is destroyed.
--
procedure Invalidate (Reference : in out Handle);
--
-- Is_Valid -- Check if the handle is associated with an object
--
-- Reference - The handle
--
-- Returns :
--
-- True if the handle can de dereferenced
--
function Is_Valid (Reference : Handle) return Boolean;
--
-- Ptr -- Get the pointer to the object by the handle
--
-- Reference - The handle
--
-- Returns :
--
-- The referenced object or null if Reference is invalid
--
function Ptr (Reference : Handle) return Object_Type_Ptr;
--
-- Ref -- Get handle to an object
--
-- Thing - A pointer to the object
--
-- Returns :
--
-- Handle to the object
--
function Ref (Thing : Object_Type_Ptr) return Handle;
--
-- Set -- Handle to an object
--
-- Reference - A handle to set
-- Thing - A pointer to the object
--
procedure Set (Reference : in out Handle; Thing : Object_Type_Ptr);
--
-- <, <=, =, >=, > -- Comparisons
--
-- Left - The first argument
-- Right - The second argument
--
-- Only valid handles are comparable. However it is exception-safe to
-- compare Null_Handle for equality. In all other cases Constraint_Error
-- is propagated.
--
-- Returns :
--
-- The result of comparison of the objects
--
-- Exceptions :
--
-- Constraint_Error - One of arguments is Null_Handle
--
function "<" (Left, Right : Handle) return Boolean;
function "<=" (Left, Right : Handle) return Boolean;
function "=" (Left, Right : Handle) return Boolean;
function ">=" (Left, Right : Handle) return Boolean;
function ">" (Left, Right : Handle) return Boolean;
--
-- = -- Equality (handle and object)
--
-- Left - The first argument
-- Right - The second argument
--
-- Returns :
--
-- The result of comparison
--
function "=" (Left : Handle; Right : access Object_Type'Class)
return Boolean;
function "=" (Left : access Object_Type'Class; Right : Handle)
return Boolean;
private
pragma Inline (Adjust);
pragma Inline (Finalize);
pragma Inline (Invalidate);
pragma Inline (Is_Valid);
pragma Inline (Ptr);
pragma Inline (Ref);
pragma Inline (Set);
pragma Inline ("<=", "<", "=", ">", ">=");
pragma Inline ("=");
type Handle is new Ada.Finalization.Controlled with record
Ptr : Object_Type_Ptr := null;
end record;
--
-- Release -- Decrement object's use count
--
-- Ptr - To the object
--
-- The object pointed by Ptr is deleted if its use count in 1. Otherwise
-- the use count is decremented. Nothing happens if Ptr is null.
--
-- Exceptions :
--
-- Program_Error - Use count is already zero
--
procedure Release (Ptr : in out Object_Type_Ptr);
pragma Inline (Release);
Null_Handle : constant Handle :=
(Ada.Finalization.Controlled with null);
end Object.Handle;
|
strenkml/EE368 | Ada | 1,191 | ads |
package Memory.Transform.Shift is
type Shift_Type is new Transform_Type with private;
type Shift_Pointer is access all Shift_Type'Class;
function Create_Shift return Shift_Pointer;
function Random_Shift(next : access Memory_Type'Class;
generator : Distribution_Type;
max_cost : Cost_Type) return Memory_Pointer;
overriding
function Clone(mem : Shift_Type) return Memory_Pointer;
overriding
procedure Permute(mem : in out Shift_Type;
generator : in Distribution_Type;
max_cost : in Cost_Type);
overriding
function Is_Empty(mem : Shift_Type) return Boolean;
overriding
function Get_Name(mem : Shift_Type) return String;
private
type Shift_Type is new Transform_Type with null record;
overriding
function Apply(mem : Shift_Type;
address : Address_Type;
dir : Boolean) return Address_Type;
overriding
function Get_Alignment(mem : Shift_Type) return Positive;
overriding
function Get_Transform_Length(mem : Shift_Type) return Natural;
end Memory.Transform.Shift;
|
jrmarino/AdaBase | Ada | 4,268 | adb | with AdaBase;
with Connect;
with CommonText;
with Ada.Text_IO;
with AdaBase.Results.Sets;
procedure Autocommit is
package CON renames Connect;
package TIO renames Ada.Text_IO;
package ARS renames AdaBase.Results.Sets;
package CT renames CommonText;
insX : constant String := "INSERT INTO fruits (id, fruit, color, calories)";
ins1 : constant String := insX & " VALUES (100,'cucumber','green',16)";
ins2 : constant String := insX & " VALUES (101,'kumquat','yellow',71)";
ins3 : constant String := insX & " VALUES (102,'persimmon','orange',127)";
sel : constant String := "SELECT * FROM fruits WHERE id > 99";
del : constant String := "DELETE FROM fruits WHERE id > 99";
procedure clear_table;
procedure test_uno (expected : Natural; version2 : Boolean);
procedure test_dos (expected : Natural; version2 : Boolean);
procedure test_tres (expected : Natural);
procedure expect (impacted, expected : Natural);
procedure show_results (expected : Natural);
procedure expect (impacted, expected : Natural) is
begin
TIO.Put_Line ("Rows expected:" & expected'Img);
TIO.Put_Line ("Rows returned:" & impacted'Img);
if impacted = expected then
TIO.Put_Line ("=== PASSED ===");
else
TIO.Put_Line ("=== FAILED === <<----------------------------");
end if;
TIO.Put_Line ("");
end expect;
procedure show_results (expected : Natural) is
begin
CON.connect_database;
declare
stmt : CON.Stmt_Type := CON.DR.query (sel);
row : ARS.Datarow;
NR : Natural := 0;
begin
loop
row := stmt.fetch_next;
exit when row.data_exhausted;
NR := NR + 1;
end loop;
expect (NR, expected);
end;
CON.DR.disconnect;
end show_results;
procedure test_uno (expected : Natural; version2 : Boolean) is
AR : AdaBase.Affected_Rows;
begin
CON.connect_database;
AR := CON.DR.execute (ins1);
AR := CON.DR.execute (ins2);
if version2 then
CON.DR.commit;
end if;
CON.DR.disconnect;
show_results (expected);
end test_uno;
procedure test_dos (expected : Natural; version2 : Boolean)
is
AR : AdaBase.Affected_Rows;
begin
CON.connect_database;
AR := CON.DR.execute (ins1);
CON.DR.set_trait_autocommit (True);
AR := CON.DR.execute (ins2);
CON.DR.set_trait_autocommit (False);
AR := CON.DR.execute (ins3);
if version2 then
CON.DR.commit;
end if;
CON.DR.disconnect;
show_results (expected);
end test_dos;
procedure test_tres (expected : Natural)
is
AR : AdaBase.Affected_Rows;
begin
CON.connect_database;
AR := CON.DR.execute (ins1);
CON.DR.set_trait_autocommit (True);
CON.DR.disconnect;
show_results (expected);
end test_tres;
procedure clear_table
is
AR : AdaBase.Affected_Rows;
begin
CON.connect_database;
AR := CON.DR.execute (del);
if not CON.DR.trait_autocommit then
CON.DR.commit;
end if;
CON.DR.disconnect;
end clear_table;
begin
clear_table;
TIO.Put_Line ("=== PRECONNECT AUTOCOMMIT => OFF (DEFAULT) ===");
CON.DR.set_trait_autocommit (False);
test_uno (0, False);
clear_table;
TIO.Put_Line ("=== PRECONNECT AUTOCOMMIT => ON ===");
CON.DR.set_trait_autocommit (True);
test_uno (2, False);
clear_table;
TIO.Put_Line ("=== CONNECT AC=0, INS, AC=1, INS, AC=0, INS ===");
CON.DR.set_trait_autocommit (False);
test_dos (2, False);
clear_table;
TIO.Put_Line ("=== IMPLICIT COMMIT (AC/OFF => ON) ===");
CON.DR.set_trait_autocommit (False);
test_tres (1);
clear_table;
TIO.Put_Line ("=== PRECONNECT AUTOCOMMIT => OFF WITH COMMIT ===");
CON.DR.set_trait_autocommit (False);
test_uno (2, True);
clear_table;
TIO.Put_Line ("=== PRECONNECT AUTOCOMMIT => ON WITH COMMIT (NO-OP) ===");
CON.DR.set_trait_autocommit (True);
test_uno (2, True);
clear_table;
TIO.Put_Line ("=== CONNECT AC=0, INS, AC=1, INS, AC=0, INS COMMIT ===");
CON.DR.set_trait_autocommit (False);
test_dos (3, True);
clear_table;
end Autocommit;
|
reznikmm/matreshka | Ada | 4,089 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Draw_Frame_Margin_Vertical_Attributes;
package Matreshka.ODF_Draw.Frame_Margin_Vertical_Attributes is
type Draw_Frame_Margin_Vertical_Attribute_Node is
new Matreshka.ODF_Draw.Abstract_Draw_Attribute_Node
and ODF.DOM.Draw_Frame_Margin_Vertical_Attributes.ODF_Draw_Frame_Margin_Vertical_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Draw_Frame_Margin_Vertical_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Draw_Frame_Margin_Vertical_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Draw.Frame_Margin_Vertical_Attributes;
|
mimo/Tracker | Ada | 2,467 | adb | with Input_Sources.File; use Input_Sources.File;
with Sax.Readers; use Sax.Readers;
with DOM.Readers; use DOM.Readers;
with DOM.Core; use DOM.Core;
with DOM.Core.Documents; use DOM.Core.Documents;
with DOM.Core.Nodes; use DOM.Core.Nodes;
with DOM.Core.Attrs; use DOM.Core.Attrs;
with Ada.Text_IO; use Ada.Text_IO;
package body tracker.datasource is
procedure Load is
Input : File_Input;
Reader : Tree_Reader;
Doc : Document;
Activities_List : Node_List;
Activity_Node : Node;
Focus_Attrib : Attr;
Current_Child : Node;
begin
Set_Public_Id (Input, "Activities file");
Open ("activities.xml", Input);
Set_Feature (Reader, Validation_Feature, False);
Set_Feature (Reader, Namespace_Feature, False);
Parse (Reader, Input);
Close (Input);
Doc := Get_Tree (Reader);
Activities_List := Get_Elements_By_Tag_Name (Doc, "activity");
for Index in 1 .. Length (Activities_List) loop
READING_COL : declare
Col : Collection;
begin
Activity_Node := DOM.Core.Nodes.Item (Activities_List, Index - 1);
Focus_Attrib := Get_Named_Item (Attributes (Activity_Node), "focus");
if Focus_Attrib = null then
Col.Focused := False;
else
Col.Focused := Boolean'Value (Value (Focus_Attrib));
end if;
Current_Child := First_Child (Activity_Node);
loop
exit when Current_Child = null;
if Node_Type (Current_Child) = Element_Node then
if Node_Name (Current_Child) = "name" then
Set_Name (Col, Node_Value (First_Child (Current_Child)));
else
Add_Item (
Col,
Node_Value (First_Child (Current_Child)),
Item_Status'Value (
Value (
Get_Named_Item (Attributes(Current_Child),
"state"))));
end if;
end if;
Current_Child := Next_Sibling (Current_Child);
end loop;
Add_Collection (Activities, Col);
end READING_COL;
end loop;
Free (Activities_List);
Free (Reader);
end Load;
end tracker.datasource;
|
Fabien-Chouteau/AGATE | Ada | 3,889 | adb | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017-2018, 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 System.Machine_Code; use System.Machine_Code;
with Cortex_M_SVD.SCB; use Cortex_M_SVD.SCB;
with AGATE.Traces;
with AGATE.Arch.ArmvX_m; use AGATE.Arch.ArmvX_m;
package body AGATE.Scheduler.Context_Switch is
procedure Context_Switch_Handler;
pragma Machine_Attribute (Context_Switch_Handler, "naked");
pragma Export (C, Context_Switch_Handler, "PendSV_Handler");
------------
-- Switch --
------------
procedure Switch is
begin
-- Trigger PendSV
SCB_Periph.ICSR.PENDSVSET := True;
end Switch;
----------------------------
-- Context_Switch_Handler --
----------------------------
procedure Context_Switch_Handler is
begin
Asm (Template =>
"push {lr}" & ASCII.LF &
"bl current_task_context" & ASCII.LF &
"stm r0, {r4-r12}", -- Save extra context
Volatile => True);
SCB_Periph.ICSR.PENDSVCLR := True;
Running_Task.Stack_Pointer := PSP;
Set_PSP (Ready_Tasks.Stack_Pointer);
Traces.Context_Switch (Task_ID (Running_Task),
Task_ID (Ready_Tasks));
Running_Task := Ready_Tasks;
Running_Task.Status := Running;
Traces.Running (Current_Task);
Asm (Template =>
"bl current_task_context" & ASCII.LF &
"ldm r0, {r4-r12}" & ASCII.LF & -- Load extra context
"pop {pc}",
Volatile => True);
end Context_Switch_Handler;
end AGATE.Scheduler.Context_Switch;
|
reznikmm/matreshka | Ada | 3,643 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Attributes.Draw.Fill_Color is
type ODF_Draw_Fill_Color is
new XML.DOM.Attributes.DOM_Attribute with private;
private
type ODF_Draw_Fill_Color is
new XML.DOM.Attributes.DOM_Attribute with null record;
end ODF.DOM.Attributes.Draw.Fill_Color;
|
optikos/oasis | Ada | 1,542 | ads | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Definitions;
with Program.Lexical_Elements;
package Program.Elements.Unknown_Discriminant_Parts is
pragma Pure (Program.Elements.Unknown_Discriminant_Parts);
type Unknown_Discriminant_Part is
limited interface and Program.Elements.Definitions.Definition;
type Unknown_Discriminant_Part_Access is
access all Unknown_Discriminant_Part'Class with Storage_Size => 0;
type Unknown_Discriminant_Part_Text is limited interface;
type Unknown_Discriminant_Part_Text_Access is
access all Unknown_Discriminant_Part_Text'Class with Storage_Size => 0;
not overriding function To_Unknown_Discriminant_Part_Text
(Self : aliased in out Unknown_Discriminant_Part)
return Unknown_Discriminant_Part_Text_Access is abstract;
not overriding function Left_Bracket_Token
(Self : Unknown_Discriminant_Part_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Box_Token
(Self : Unknown_Discriminant_Part_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Right_Bracket_Token
(Self : Unknown_Discriminant_Part_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.Unknown_Discriminant_Parts;
|
zhmu/ananas | Ada | 7,001 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T E X T _ I O . C O M P L E X _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO.Complex_Aux;
with Ada.Text_IO.Float_Aux;
with System.Img_Flt; use System.Img_Flt;
with System.Img_LFlt; use System.Img_LFlt;
with System.Img_LLF; use System.Img_LLF;
with System.Val_Flt; use System.Val_Flt;
with System.Val_LFlt; use System.Val_LFlt;
with System.Val_LLF; use System.Val_LLF;
package body Ada.Text_IO.Complex_IO is
use Complex_Types;
package Scalar_Float is new
Ada.Text_IO.Float_Aux (Float, Scan_Float, Set_Image_Float);
package Scalar_Long_Float is new
Ada.Text_IO.Float_Aux
(Long_Float, Scan_Long_Float, Set_Image_Long_Float);
package Scalar_Long_Long_Float is new
Ada.Text_IO.Float_Aux
(Long_Long_Float, Scan_Long_Long_Float, Set_Image_Long_Long_Float);
package Aux_Float is new
Ada.Text_IO.Complex_Aux (Float, Scalar_Float);
package Aux_Long_Float is new
Ada.Text_IO.Complex_Aux (Long_Float, Scalar_Long_Float);
package Aux_Long_Long_Float is new
Ada.Text_IO.Complex_Aux (Long_Long_Float, Scalar_Long_Long_Float);
-- Throughout this generic body, we distinguish between the case where type
-- Float is OK, where type Long_Float is OK and where type Long_Long_Float
-- is needed. These boolean constants are used to test for this, such that
-- only code for the relevant case is included in the instance.
OK_Float : constant Boolean := Real'Base'Digits <= Float'Digits;
OK_Long_Float : constant Boolean := Real'Base'Digits <= Long_Float'Digits;
---------
-- Get --
---------
procedure Get
(File : File_Type;
Item : out Complex;
Width : Field := 0)
is
Real_Item : Real'Base;
Imag_Item : Real'Base;
begin
if OK_Float then
Aux_Float.Get (File, Float (Real_Item), Float (Imag_Item), Width);
elsif OK_Long_Float then
Aux_Long_Float.Get
(File, Long_Float (Real_Item), Long_Float (Imag_Item), Width);
else
Aux_Long_Long_Float.Get
(File, Long_Long_Float (Real_Item), Long_Long_Float (Imag_Item),
Width);
end if;
Item := (Real_Item, Imag_Item);
exception
when Constraint_Error => raise Data_Error;
end Get;
---------
-- Get --
---------
procedure Get
(Item : out Complex;
Width : Field := 0)
is
begin
Get (Current_In, Item, Width);
end Get;
---------
-- Get --
---------
procedure Get
(From : String;
Item : out Complex;
Last : out Positive)
is
Real_Item : Real'Base;
Imag_Item : Real'Base;
begin
if OK_Float then
Aux_Float.Gets (From, Float (Real_Item), Float (Imag_Item), Last);
elsif OK_Long_Float then
Aux_Long_Float.Gets
(From, Long_Float (Real_Item), Long_Float (Imag_Item), Last);
else
Aux_Long_Long_Float.Gets
(From, Long_Long_Float (Real_Item), Long_Long_Float (Imag_Item),
Last);
end if;
Item := (Real_Item, Imag_Item);
exception
when Data_Error => raise Constraint_Error;
end Get;
---------
-- Put --
---------
procedure Put
(File : File_Type;
Item : Complex;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
if OK_Float then
Aux_Float.Put
(File, Float (Re (Item)), Float (Im (Item)), Fore, Aft, Exp);
elsif OK_Long_Float then
Aux_Long_Float.Put
(File, Long_Float (Re (Item)), Long_Float (Im (Item)), Fore, Aft,
Exp);
else
Aux_Long_Long_Float.Put
(File, Long_Long_Float (Re (Item)), Long_Long_Float (Im (Item)),
Fore, Aft, Exp);
end if;
end Put;
---------
-- Put --
---------
procedure Put
(Item : Complex;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
Put (Current_Out, Item, Fore, Aft, Exp);
end Put;
---------
-- Put --
---------
procedure Put
(To : out String;
Item : Complex;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
if OK_Float then
Aux_Float.Puts (To, Float (Re (Item)), Float (Im (Item)), Aft, Exp);
elsif OK_Long_Float then
Aux_Long_Float.Puts
(To, Long_Float (Re (Item)), Long_Float (Im (Item)), Aft, Exp);
else
Aux_Long_Long_Float.Puts
(To, Long_Long_Float (Re (Item)), Long_Long_Float (Im (Item)),
Aft, Exp);
end if;
end Put;
end Ada.Text_IO.Complex_IO;
|
reznikmm/matreshka | Ada | 3,689 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Draw_Dots1_Attributes is
pragma Preelaborate;
type ODF_Draw_Dots1_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Draw_Dots1_Attribute_Access is
access all ODF_Draw_Dots1_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Draw_Dots1_Attributes;
|
AdaCore/Ada_Drivers_Library | Ada | 5,930 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 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. --
-- --
------------------------------------------------------------------------------
-- This package is based on two features implemented in different packages:
-- - Logging_With_Categories
-- - Logging_With_Priorities
--
-- You can directly use one of those pacakge if you are not interested by the
-- other feature.
generic
type Categories is (<>);
-- Logging categories
-- Typicaly an enum type, example:
-- type My_Log_Categories is (Debug, Warning, Error);
type Priorities is (<>);
-- Logging priority type
Default_Category : Categories;
-- Category used when the category is not specified as parameter
Default_Priority : Priorities := Priorities'First;
-- Priority value used at initialization
Categories_Enabled_By_Default : Boolean := True;
-- If this value is true, all logging categories are enabled at
-- initialization. Otherwise, they are all disabled.
Prefix_Enabled_By_Default : Boolean := True;
-- If this value is true, prefix is enabled for all categories at
-- initialization. Otherwise, it is diabled for all.
Maximum_Message_Length : Positive;
-- Maximum number of Characters in a message. Messages longer than this
-- limit will be rejected.
Maximum_Number_Of_Messages : Positive;
-- Maximum number of messages in the queue. When the queue is filled the
-- lower priority will be discared.
package Logging is
procedure Log_Line (Cat : Categories; Str : String);
procedure Log_Line (Str : String);
-- Log under the Default_Category
----------------------
-- Category Control --
----------------------
function Enabled (Cat : Categories) return Boolean;
-- Is logging enabled for the given category?
procedure Enable (Cat : Categories)
with Post => Enabled (Cat);
-- Enable logging for the given category.
-- Messages for this category will printed using the Log_Line_Backend
-- procedure.
procedure Disable (Cat : Categories)
with Post => not Enabled (Cat);
-- Disable logging for the given category.
-- Messages for this category will be ignored.
--------------------
-- Prefix Control --
--------------------
-- Insert the name of the category in front of the log messages.
-- The format is: Catergory'Image (Cat) & ": " & Str
-- This feature works best when the Categories type is an enum and when
-- 'Image is available for enum type (native or ravenscar-full run-times).
procedure Enable_Prefix (Cat : Categories);
-- Enable the prefix for the given category
procedure Disable_Prefix (Cat : Categories);
-- Disable the prefix for the given category
----------------------
-- Priority Control --
----------------------
function Priority (Cat : Categories) return Priorities;
-- Return the proirity associated with the given category
procedure Set_Priority (Cat : Categories; Prio : Priorities)
with Post => Priority (Cat) = Prio;
-- Set the proirity associated with the given category.
-- The value is just passed to the Log_Line procedure, there is no
-- filtering or sorting in this implementation.
------------
-- Output --
------------
procedure Pop (Str : out String;
Length : out Natural;
Prio : out Priorities)
with Pre => Str'Length = Maximum_Message_Length;
-- Remove the top priority message from the queue
function Full return Boolean;
-- Return True if the message queue is full
function Empty return Boolean;
-- Return True if the message queue is empty
end Logging;
|
reznikmm/matreshka | Ada | 4,104 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
package body Matreshka.Internals.SAX_Locators is
-----------------
-- Dereference --
-----------------
procedure Dereference (Self : in out Shared_Locator_Access) is
procedure Free is
new Ada.Unchecked_Deallocation
(Shared_Abstract_Locator'Class, Shared_Locator_Access);
begin
if Matreshka.Atomics.Counters.Decrement (Self.Counter) then
Free (Self);
else
Self := null;
end if;
end Dereference;
---------------
-- Reference --
---------------
procedure Reference (Self : not null Shared_Locator_Access) is
begin
Matreshka.Atomics.Counters.Increment (Self.Counter);
end Reference;
end Matreshka.Internals.SAX_Locators;
|
sebsgit/textproc | Ada | 3,735 | ads | with opencl;
with cl_objects;
with PixelArray.Gpu;
with Ada.Finalization;
package GpuImageProc is
pragma Elaborate_Body;
pragma Assertion_Policy (Pre => Check,
Post => Check,
Type_Invariant => Check);
type Processor is tagged limited private;
type Processor_Access is access all Processor;
function Create_Processor(context: in out cl_objects.Context; status: out opencl.Status) return Processor;
function Get_Command_Queue(proc: in out Processor) return cl_objects.Command_Queue_Access;
function Bernsen_Adaptative_Threshold(proc: in out Processor;
ctx: in out cl_objects.Context;
source: in out PixelArray.Gpu.GpuImage;
target: in out PixelArray.Gpu.GpuImage;
radius: in Positive;
c_min: in PixelArray.Pixel;
cl_code: out opencl.Status) return cl_objects.Event
with Pre => source.Get_Width = target.Get_Width and source.Get_Height = target.Get_Height;
function Bernsen_Adaptative_Threshold(proc: in out Processor;
ctx: in out cl_objects.Context;
source: in out PixelArray.Gpu.GpuImage;
target: in out PixelArray.Gpu.GpuImage;
radius: in Positive;
c_min: in PixelArray.Pixel;
events_to_wait: in opencl.Events;
cl_code: out opencl.Status) return cl_objects.Event
with Pre => source.Get_Width = target.Get_Width and source.Get_Height = target.Get_Height;
function Gaussian_Filter(proc: in out Processor;
ctx: in out cl_objects.Context;
source: in out PixelArray.Gpu.GpuImage;
target: in out PixelArray.Gpu.GpuImage;
size: in Positive;
sigma: in Float;
cl_code: out opencl.Status) return cl_objects.Event;
function Erode(proc: in out Processor;
ctx: in out cl_objects.Context;
source: in out PixelArray.Gpu.GpuImage;
target: in out PixelArray.Gpu.GpuImage;
size: in Positive;
events_to_wait: in opencl.Events;
cl_code: out opencl.Status) return cl_objects.Event;
function Dilate(proc: in out Processor;
ctx: in out cl_objects.Context;
source: in out PixelArray.Gpu.GpuImage;
target: in out PixelArray.Gpu.GpuImage;
size: in Positive;
events_to_wait: in opencl.Events;
cl_code: out opencl.Status) return cl_objects.Event;
-- exposed for unit tests
procedure Circle_Min_Max(proc: in out Processor; ctx: in out cl_objects.Context; image: in out PixelArray.Gpu.GpuImage; x, y: Natural; radius: Positive; min, max: out PixelArray.Pixel);
private
type Processor is new Ada.Finalization.Limited_Controlled with record
queue: cl_objects.Command_Queue_Access;
program: cl_objects.Program_Access;
bernsen_threshold_kernel: cl_objects.Kernel_Access;
gaussian_blur_kernel: cl_objects.Kernel_Access;
erode_kernel: cl_objects.Kernel_Access;
dilate_kernel: cl_objects.Kernel_Access;
end record;
overriding procedure Finalize(This: in out Processor);
end GpuImageProc;
|
Fabien-Chouteau/spdx_ada | Ada | 59,753 | ads | package SPDX.Licenses is
pragma Style_Checks (Off); -- Genrated code
Version : constant String :="3.10-14-g0fb8a59";
type Id is (
Id_0BSD,
AAL,
ADSL,
AFL_1_1,
AFL_1_2,
AFL_2_0,
AFL_2_1,
AFL_3_0,
AGPL_1_0_only,
AGPL_1_0_or_later,
AGPL_3_0_only,
AGPL_3_0_or_later,
AMDPLPA,
AML,
AMPAS,
ANTLR_PD,
APAFML,
APL_1_0,
APSL_1_0,
APSL_1_1,
APSL_1_2,
APSL_2_0,
Abstyles,
Adobe_2006,
Adobe_Glyph,
Afmparse,
Aladdin,
Apache_1_0,
Apache_1_1,
Apache_2_0,
Artistic_1_0,
Artistic_1_0_Perl,
Artistic_1_0_cl8,
Artistic_2_0,
BSD_1_Clause,
BSD_2_Clause,
BSD_2_Clause_Patent,
BSD_2_Clause_Views,
BSD_3_Clause,
BSD_3_Clause_Attribution,
BSD_3_Clause_Clear,
BSD_3_Clause_LBNL,
BSD_3_Clause_No_Nuclear_License,
BSD_3_Clause_No_Nuclear_License_2014,
BSD_3_Clause_No_Nuclear_Warranty,
BSD_3_Clause_Open_MPI,
BSD_4_Clause,
BSD_4_Clause_UC,
BSD_Protection,
BSD_Source_Code,
BSL_1_0,
Bahyph,
Barr,
Beerware,
BitTorrent_1_0,
BitTorrent_1_1,
BlueOak_1_0_0,
Borceux,
CAL_1_0,
CAL_1_0_Combined_Work_Exception,
CATOSL_1_1,
CC_BY_1_0,
CC_BY_2_0,
CC_BY_2_5,
CC_BY_3_0,
CC_BY_3_0_AT,
CC_BY_4_0,
CC_BY_NC_1_0,
CC_BY_NC_2_0,
CC_BY_NC_2_5,
CC_BY_NC_3_0,
CC_BY_NC_4_0,
CC_BY_NC_ND_1_0,
CC_BY_NC_ND_2_0,
CC_BY_NC_ND_2_5,
CC_BY_NC_ND_3_0,
CC_BY_NC_ND_3_0_IGO,
CC_BY_NC_ND_4_0,
CC_BY_NC_SA_1_0,
CC_BY_NC_SA_2_0,
CC_BY_NC_SA_2_5,
CC_BY_NC_SA_3_0,
CC_BY_NC_SA_4_0,
CC_BY_ND_1_0,
CC_BY_ND_2_0,
CC_BY_ND_2_5,
CC_BY_ND_3_0,
CC_BY_ND_4_0,
CC_BY_SA_1_0,
CC_BY_SA_2_0,
CC_BY_SA_2_5,
CC_BY_SA_3_0,
CC_BY_SA_3_0_AT,
CC_BY_SA_4_0,
CC_PDDC,
CC0_1_0,
CDDL_1_0,
CDDL_1_1,
CDLA_Permissive_1_0,
CDLA_Sharing_1_0,
CECILL_1_0,
CECILL_1_1,
CECILL_2_0,
CECILL_2_1,
CECILL_B,
CECILL_C,
CERN_OHL_1_1,
CERN_OHL_1_2,
CERN_OHL_P_2_0,
CERN_OHL_S_2_0,
CERN_OHL_W_2_0,
CNRI_Jython,
CNRI_Python,
CNRI_Python_GPL_Compatible,
CPAL_1_0,
CPL_1_0,
CPOL_1_02,
CUA_OPL_1_0,
Caldera,
ClArtistic,
Condor_1_1,
Crossword,
CrystalStacker,
Cube,
D_FSL_1_0,
DOC,
DSDP,
Dotseqn,
ECL_1_0,
ECL_2_0,
EFL_1_0,
EFL_2_0,
EPICS,
EPL_1_0,
EPL_2_0,
EUDatagrid,
EUPL_1_0,
EUPL_1_1,
EUPL_1_2,
Entessa,
ErlPL_1_1,
Eurosym,
FSFAP,
FSFUL,
FSFULLR,
FTL,
Fair,
Frameworx_1_0,
FreeImage,
GFDL_1_1_invariants_only,
GFDL_1_1_invariants_or_later,
GFDL_1_1_no_invariants_only,
GFDL_1_1_no_invariants_or_later,
GFDL_1_1_only,
GFDL_1_1_or_later,
GFDL_1_2_invariants_only,
GFDL_1_2_invariants_or_later,
GFDL_1_2_no_invariants_only,
GFDL_1_2_no_invariants_or_later,
GFDL_1_2_only,
GFDL_1_2_or_later,
GFDL_1_3_invariants_only,
GFDL_1_3_invariants_or_later,
GFDL_1_3_no_invariants_only,
GFDL_1_3_no_invariants_or_later,
GFDL_1_3_only,
GFDL_1_3_or_later,
GL2PS,
GLWTPL,
GPL_1_0_only,
GPL_1_0_or_later,
GPL_2_0_only,
GPL_2_0_or_later,
GPL_3_0_only,
GPL_3_0_or_later,
Giftware,
Glide,
Glulxe,
HPND,
HPND_sell_variant,
HaskellReport,
Hippocratic_2_1,
IBM_pibs,
ICU,
IJG,
IPA,
IPL_1_0,
ISC,
ImageMagick,
Imlib2,
Info_ZIP,
Intel,
Intel_ACPI,
Interbase_1_0,
JPNIC,
JSON,
JasPer_2_0,
LAL_1_2,
LAL_1_3,
LGPL_2_0_only,
LGPL_2_0_or_later,
LGPL_2_1_only,
LGPL_2_1_or_later,
LGPL_3_0_only,
LGPL_3_0_or_later,
LGPLLR,
LPL_1_0,
LPL_1_02,
LPPL_1_0,
LPPL_1_1,
LPPL_1_2,
LPPL_1_3a,
LPPL_1_3c,
Latex2e,
Leptonica,
LiLiQ_P_1_1,
LiLiQ_R_1_1,
LiLiQ_Rplus_1_1,
Libpng,
Linux_OpenIB,
MIT,
MIT_0,
MIT_CMU,
MIT_advertising,
MIT_enna,
MIT_feh,
MITNFA,
MPL_1_0,
MPL_1_1,
MPL_2_0,
MPL_2_0_no_copyleft_exception,
MS_PL,
MS_RL,
MTLL,
MakeIndex,
MirOS,
Motosoto,
MulanPSL_1_0,
MulanPSL_2_0,
Multics,
Mup,
NASA_1_3,
NBPL_1_0,
NCGL_UK_2_0,
NCSA,
NGPL,
NIST_PD,
NIST_PD_fallback,
NLOD_1_0,
NLPL,
NOSL,
NPL_1_0,
NPL_1_1,
NPOSL_3_0,
NRL,
NTP,
NTP_0,
Naumen,
Net_SNMP,
NetCDF,
Newsletr,
Nokia,
Noweb,
O_UDA_1_0,
OCCT_PL,
OCLC_2_0,
ODC_By_1_0,
ODbL_1_0,
OFL_1_0,
OFL_1_0_RFN,
OFL_1_0_no_RFN,
OFL_1_1,
OFL_1_1_RFN,
OFL_1_1_no_RFN,
OGC_1_0,
OGL_Canada_2_0,
OGL_UK_1_0,
OGL_UK_2_0,
OGL_UK_3_0,
OGTSL,
OLDAP_1_1,
OLDAP_1_2,
OLDAP_1_3,
OLDAP_1_4,
OLDAP_2_0,
OLDAP_2_0_1,
OLDAP_2_1,
OLDAP_2_2,
OLDAP_2_2_1,
OLDAP_2_2_2,
OLDAP_2_3,
OLDAP_2_4,
OLDAP_2_5,
OLDAP_2_6,
OLDAP_2_7,
OLDAP_2_8,
OML,
OPL_1_0,
OSET_PL_2_1,
OSL_1_0,
OSL_1_1,
OSL_2_0,
OSL_2_1,
OSL_3_0,
OpenSSL,
PDDL_1_0,
PHP_3_0,
PHP_3_01,
PSF_2_0,
Parity_6_0_0,
Parity_7_0_0,
Plexus,
PolyForm_Noncommercial_1_0_0,
PolyForm_Small_Business_1_0_0,
PostgreSQL,
Python_2_0,
QPL_1_0,
Qhull,
RHeCos_1_1,
RPL_1_1,
RPL_1_5,
RPSL_1_0,
RSA_MD,
RSCPL,
Rdisc,
Ruby,
SAX_PD,
SCEA,
SGI_B_1_0,
SGI_B_1_1,
SGI_B_2_0,
SHL_0_5,
SHL_0_51,
SISSL,
SISSL_1_2,
SMLNJ,
SMPPL,
SNIA,
SPL_1_0,
SSH_OpenSSH,
SSH_short,
SSPL_1_0,
SWL,
Saxpath,
Sendmail,
Sendmail_8_23,
SimPL_2_0,
Sleepycat,
Spencer_86,
Spencer_94,
Spencer_99,
SugarCRM_1_1_3,
TAPR_OHL_1_0,
TCL,
TCP_wrappers,
TMate,
TORQUE_1_1,
TOSL,
TU_Berlin_1_0,
TU_Berlin_2_0,
UCL_1_0,
UPL_1_0,
Unicode_DFS_2015,
Unicode_DFS_2016,
Unicode_TOU,
Unlicense,
VOSTROM,
VSL_1_0,
Vim,
W3C,
W3C_19980720,
W3C_20150513,
WTFPL,
Watcom_1_0,
Wsuipa,
X11,
XFree86_1_1,
XSkat,
Xerox,
Xnet,
YPL_1_0,
YPL_1_1,
ZPL_1_1,
ZPL_2_0,
ZPL_2_1,
Zed,
Zend_2_0,
Zimbra_1_3,
Zimbra_1_4,
Zlib,
blessing,
bzip2_1_0_5,
bzip2_1_0_6,
copyleft_next_0_3_0,
copyleft_next_0_3_1,
curl,
diffmark,
dvipdfm,
eGenix,
etalab_2_0,
gSOAP_1_3b,
gnuplot,
iMatix,
libpng_2_0,
libselinux_1_0,
libtiff,
mpich2,
psfrag,
psutils,
xinetd,
xpp,
zlib_acknowledgement);
type String_Access is not null access constant String;
Img_Ptr : constant array (Id) of String_Access :=
(
Id_0BSD => new String'("0BSD"),
AAL => new String'("AAL"),
ADSL => new String'("ADSL"),
AFL_1_1 => new String'("AFL-1.1"),
AFL_1_2 => new String'("AFL-1.2"),
AFL_2_0 => new String'("AFL-2.0"),
AFL_2_1 => new String'("AFL-2.1"),
AFL_3_0 => new String'("AFL-3.0"),
AGPL_1_0_only => new String'("AGPL-1.0-only"),
AGPL_1_0_or_later => new String'("AGPL-1.0-or-later"),
AGPL_3_0_only => new String'("AGPL-3.0-only"),
AGPL_3_0_or_later => new String'("AGPL-3.0-or-later"),
AMDPLPA => new String'("AMDPLPA"),
AML => new String'("AML"),
AMPAS => new String'("AMPAS"),
ANTLR_PD => new String'("ANTLR-PD"),
APAFML => new String'("APAFML"),
APL_1_0 => new String'("APL-1.0"),
APSL_1_0 => new String'("APSL-1.0"),
APSL_1_1 => new String'("APSL-1.1"),
APSL_1_2 => new String'("APSL-1.2"),
APSL_2_0 => new String'("APSL-2.0"),
Abstyles => new String'("Abstyles"),
Adobe_2006 => new String'("Adobe-2006"),
Adobe_Glyph => new String'("Adobe-Glyph"),
Afmparse => new String'("Afmparse"),
Aladdin => new String'("Aladdin"),
Apache_1_0 => new String'("Apache-1.0"),
Apache_1_1 => new String'("Apache-1.1"),
Apache_2_0 => new String'("Apache-2.0"),
Artistic_1_0 => new String'("Artistic-1.0"),
Artistic_1_0_Perl => new String'("Artistic-1.0-Perl"),
Artistic_1_0_cl8 => new String'("Artistic-1.0-cl8"),
Artistic_2_0 => new String'("Artistic-2.0"),
BSD_1_Clause => new String'("BSD-1-Clause"),
BSD_2_Clause => new String'("BSD-2-Clause"),
BSD_2_Clause_Patent => new String'("BSD-2-Clause-Patent"),
BSD_2_Clause_Views => new String'("BSD-2-Clause-Views"),
BSD_3_Clause => new String'("BSD-3-Clause"),
BSD_3_Clause_Attribution => new String'("BSD-3-Clause-Attribution"),
BSD_3_Clause_Clear => new String'("BSD-3-Clause-Clear"),
BSD_3_Clause_LBNL => new String'("BSD-3-Clause-LBNL"),
BSD_3_Clause_No_Nuclear_License => new String'("BSD-3-Clause-No-Nuclear-License"),
BSD_3_Clause_No_Nuclear_License_2014 => new String'("BSD-3-Clause-No-Nuclear-License-2014"),
BSD_3_Clause_No_Nuclear_Warranty => new String'("BSD-3-Clause-No-Nuclear-Warranty"),
BSD_3_Clause_Open_MPI => new String'("BSD-3-Clause-Open-MPI"),
BSD_4_Clause => new String'("BSD-4-Clause"),
BSD_4_Clause_UC => new String'("BSD-4-Clause-UC"),
BSD_Protection => new String'("BSD-Protection"),
BSD_Source_Code => new String'("BSD-Source-Code"),
BSL_1_0 => new String'("BSL-1.0"),
Bahyph => new String'("Bahyph"),
Barr => new String'("Barr"),
Beerware => new String'("Beerware"),
BitTorrent_1_0 => new String'("BitTorrent-1.0"),
BitTorrent_1_1 => new String'("BitTorrent-1.1"),
BlueOak_1_0_0 => new String'("BlueOak-1.0.0"),
Borceux => new String'("Borceux"),
CAL_1_0 => new String'("CAL-1.0"),
CAL_1_0_Combined_Work_Exception => new String'("CAL-1.0-Combined-Work-Exception"),
CATOSL_1_1 => new String'("CATOSL-1.1"),
CC_BY_1_0 => new String'("CC-BY-1.0"),
CC_BY_2_0 => new String'("CC-BY-2.0"),
CC_BY_2_5 => new String'("CC-BY-2.5"),
CC_BY_3_0 => new String'("CC-BY-3.0"),
CC_BY_3_0_AT => new String'("CC-BY-3.0-AT"),
CC_BY_4_0 => new String'("CC-BY-4.0"),
CC_BY_NC_1_0 => new String'("CC-BY-NC-1.0"),
CC_BY_NC_2_0 => new String'("CC-BY-NC-2.0"),
CC_BY_NC_2_5 => new String'("CC-BY-NC-2.5"),
CC_BY_NC_3_0 => new String'("CC-BY-NC-3.0"),
CC_BY_NC_4_0 => new String'("CC-BY-NC-4.0"),
CC_BY_NC_ND_1_0 => new String'("CC-BY-NC-ND-1.0"),
CC_BY_NC_ND_2_0 => new String'("CC-BY-NC-ND-2.0"),
CC_BY_NC_ND_2_5 => new String'("CC-BY-NC-ND-2.5"),
CC_BY_NC_ND_3_0 => new String'("CC-BY-NC-ND-3.0"),
CC_BY_NC_ND_3_0_IGO => new String'("CC-BY-NC-ND-3.0-IGO"),
CC_BY_NC_ND_4_0 => new String'("CC-BY-NC-ND-4.0"),
CC_BY_NC_SA_1_0 => new String'("CC-BY-NC-SA-1.0"),
CC_BY_NC_SA_2_0 => new String'("CC-BY-NC-SA-2.0"),
CC_BY_NC_SA_2_5 => new String'("CC-BY-NC-SA-2.5"),
CC_BY_NC_SA_3_0 => new String'("CC-BY-NC-SA-3.0"),
CC_BY_NC_SA_4_0 => new String'("CC-BY-NC-SA-4.0"),
CC_BY_ND_1_0 => new String'("CC-BY-ND-1.0"),
CC_BY_ND_2_0 => new String'("CC-BY-ND-2.0"),
CC_BY_ND_2_5 => new String'("CC-BY-ND-2.5"),
CC_BY_ND_3_0 => new String'("CC-BY-ND-3.0"),
CC_BY_ND_4_0 => new String'("CC-BY-ND-4.0"),
CC_BY_SA_1_0 => new String'("CC-BY-SA-1.0"),
CC_BY_SA_2_0 => new String'("CC-BY-SA-2.0"),
CC_BY_SA_2_5 => new String'("CC-BY-SA-2.5"),
CC_BY_SA_3_0 => new String'("CC-BY-SA-3.0"),
CC_BY_SA_3_0_AT => new String'("CC-BY-SA-3.0-AT"),
CC_BY_SA_4_0 => new String'("CC-BY-SA-4.0"),
CC_PDDC => new String'("CC-PDDC"),
CC0_1_0 => new String'("CC0-1.0"),
CDDL_1_0 => new String'("CDDL-1.0"),
CDDL_1_1 => new String'("CDDL-1.1"),
CDLA_Permissive_1_0 => new String'("CDLA-Permissive-1.0"),
CDLA_Sharing_1_0 => new String'("CDLA-Sharing-1.0"),
CECILL_1_0 => new String'("CECILL-1.0"),
CECILL_1_1 => new String'("CECILL-1.1"),
CECILL_2_0 => new String'("CECILL-2.0"),
CECILL_2_1 => new String'("CECILL-2.1"),
CECILL_B => new String'("CECILL-B"),
CECILL_C => new String'("CECILL-C"),
CERN_OHL_1_1 => new String'("CERN-OHL-1.1"),
CERN_OHL_1_2 => new String'("CERN-OHL-1.2"),
CERN_OHL_P_2_0 => new String'("CERN-OHL-P-2.0"),
CERN_OHL_S_2_0 => new String'("CERN-OHL-S-2.0"),
CERN_OHL_W_2_0 => new String'("CERN-OHL-W-2.0"),
CNRI_Jython => new String'("CNRI-Jython"),
CNRI_Python => new String'("CNRI-Python"),
CNRI_Python_GPL_Compatible => new String'("CNRI-Python-GPL-Compatible"),
CPAL_1_0 => new String'("CPAL-1.0"),
CPL_1_0 => new String'("CPL-1.0"),
CPOL_1_02 => new String'("CPOL-1.02"),
CUA_OPL_1_0 => new String'("CUA-OPL-1.0"),
Caldera => new String'("Caldera"),
ClArtistic => new String'("ClArtistic"),
Condor_1_1 => new String'("Condor-1.1"),
Crossword => new String'("Crossword"),
CrystalStacker => new String'("CrystalStacker"),
Cube => new String'("Cube"),
D_FSL_1_0 => new String'("D-FSL-1.0"),
DOC => new String'("DOC"),
DSDP => new String'("DSDP"),
Dotseqn => new String'("Dotseqn"),
ECL_1_0 => new String'("ECL-1.0"),
ECL_2_0 => new String'("ECL-2.0"),
EFL_1_0 => new String'("EFL-1.0"),
EFL_2_0 => new String'("EFL-2.0"),
EPICS => new String'("EPICS"),
EPL_1_0 => new String'("EPL-1.0"),
EPL_2_0 => new String'("EPL-2.0"),
EUDatagrid => new String'("EUDatagrid"),
EUPL_1_0 => new String'("EUPL-1.0"),
EUPL_1_1 => new String'("EUPL-1.1"),
EUPL_1_2 => new String'("EUPL-1.2"),
Entessa => new String'("Entessa"),
ErlPL_1_1 => new String'("ErlPL-1.1"),
Eurosym => new String'("Eurosym"),
FSFAP => new String'("FSFAP"),
FSFUL => new String'("FSFUL"),
FSFULLR => new String'("FSFULLR"),
FTL => new String'("FTL"),
Fair => new String'("Fair"),
Frameworx_1_0 => new String'("Frameworx-1.0"),
FreeImage => new String'("FreeImage"),
GFDL_1_1_invariants_only => new String'("GFDL-1.1-invariants-only"),
GFDL_1_1_invariants_or_later => new String'("GFDL-1.1-invariants-or-later"),
GFDL_1_1_no_invariants_only => new String'("GFDL-1.1-no-invariants-only"),
GFDL_1_1_no_invariants_or_later => new String'("GFDL-1.1-no-invariants-or-later"),
GFDL_1_1_only => new String'("GFDL-1.1-only"),
GFDL_1_1_or_later => new String'("GFDL-1.1-or-later"),
GFDL_1_2_invariants_only => new String'("GFDL-1.2-invariants-only"),
GFDL_1_2_invariants_or_later => new String'("GFDL-1.2-invariants-or-later"),
GFDL_1_2_no_invariants_only => new String'("GFDL-1.2-no-invariants-only"),
GFDL_1_2_no_invariants_or_later => new String'("GFDL-1.2-no-invariants-or-later"),
GFDL_1_2_only => new String'("GFDL-1.2-only"),
GFDL_1_2_or_later => new String'("GFDL-1.2-or-later"),
GFDL_1_3_invariants_only => new String'("GFDL-1.3-invariants-only"),
GFDL_1_3_invariants_or_later => new String'("GFDL-1.3-invariants-or-later"),
GFDL_1_3_no_invariants_only => new String'("GFDL-1.3-no-invariants-only"),
GFDL_1_3_no_invariants_or_later => new String'("GFDL-1.3-no-invariants-or-later"),
GFDL_1_3_only => new String'("GFDL-1.3-only"),
GFDL_1_3_or_later => new String'("GFDL-1.3-or-later"),
GL2PS => new String'("GL2PS"),
GLWTPL => new String'("GLWTPL"),
GPL_1_0_only => new String'("GPL-1.0-only"),
GPL_1_0_or_later => new String'("GPL-1.0-or-later"),
GPL_2_0_only => new String'("GPL-2.0-only"),
GPL_2_0_or_later => new String'("GPL-2.0-or-later"),
GPL_3_0_only => new String'("GPL-3.0-only"),
GPL_3_0_or_later => new String'("GPL-3.0-or-later"),
Giftware => new String'("Giftware"),
Glide => new String'("Glide"),
Glulxe => new String'("Glulxe"),
HPND => new String'("HPND"),
HPND_sell_variant => new String'("HPND-sell-variant"),
HaskellReport => new String'("HaskellReport"),
Hippocratic_2_1 => new String'("Hippocratic-2.1"),
IBM_pibs => new String'("IBM-pibs"),
ICU => new String'("ICU"),
IJG => new String'("IJG"),
IPA => new String'("IPA"),
IPL_1_0 => new String'("IPL-1.0"),
ISC => new String'("ISC"),
ImageMagick => new String'("ImageMagick"),
Imlib2 => new String'("Imlib2"),
Info_ZIP => new String'("Info-ZIP"),
Intel => new String'("Intel"),
Intel_ACPI => new String'("Intel-ACPI"),
Interbase_1_0 => new String'("Interbase-1.0"),
JPNIC => new String'("JPNIC"),
JSON => new String'("JSON"),
JasPer_2_0 => new String'("JasPer-2.0"),
LAL_1_2 => new String'("LAL-1.2"),
LAL_1_3 => new String'("LAL-1.3"),
LGPL_2_0_only => new String'("LGPL-2.0-only"),
LGPL_2_0_or_later => new String'("LGPL-2.0-or-later"),
LGPL_2_1_only => new String'("LGPL-2.1-only"),
LGPL_2_1_or_later => new String'("LGPL-2.1-or-later"),
LGPL_3_0_only => new String'("LGPL-3.0-only"),
LGPL_3_0_or_later => new String'("LGPL-3.0-or-later"),
LGPLLR => new String'("LGPLLR"),
LPL_1_0 => new String'("LPL-1.0"),
LPL_1_02 => new String'("LPL-1.02"),
LPPL_1_0 => new String'("LPPL-1.0"),
LPPL_1_1 => new String'("LPPL-1.1"),
LPPL_1_2 => new String'("LPPL-1.2"),
LPPL_1_3a => new String'("LPPL-1.3a"),
LPPL_1_3c => new String'("LPPL-1.3c"),
Latex2e => new String'("Latex2e"),
Leptonica => new String'("Leptonica"),
LiLiQ_P_1_1 => new String'("LiLiQ-P-1.1"),
LiLiQ_R_1_1 => new String'("LiLiQ-R-1.1"),
LiLiQ_Rplus_1_1 => new String'("LiLiQ-Rplus-1.1"),
Libpng => new String'("Libpng"),
Linux_OpenIB => new String'("Linux-OpenIB"),
MIT => new String'("MIT"),
MIT_0 => new String'("MIT-0"),
MIT_CMU => new String'("MIT-CMU"),
MIT_advertising => new String'("MIT-advertising"),
MIT_enna => new String'("MIT-enna"),
MIT_feh => new String'("MIT-feh"),
MITNFA => new String'("MITNFA"),
MPL_1_0 => new String'("MPL-1.0"),
MPL_1_1 => new String'("MPL-1.1"),
MPL_2_0 => new String'("MPL-2.0"),
MPL_2_0_no_copyleft_exception => new String'("MPL-2.0-no-copyleft-exception"),
MS_PL => new String'("MS-PL"),
MS_RL => new String'("MS-RL"),
MTLL => new String'("MTLL"),
MakeIndex => new String'("MakeIndex"),
MirOS => new String'("MirOS"),
Motosoto => new String'("Motosoto"),
MulanPSL_1_0 => new String'("MulanPSL-1.0"),
MulanPSL_2_0 => new String'("MulanPSL-2.0"),
Multics => new String'("Multics"),
Mup => new String'("Mup"),
NASA_1_3 => new String'("NASA-1.3"),
NBPL_1_0 => new String'("NBPL-1.0"),
NCGL_UK_2_0 => new String'("NCGL-UK-2.0"),
NCSA => new String'("NCSA"),
NGPL => new String'("NGPL"),
NIST_PD => new String'("NIST-PD"),
NIST_PD_fallback => new String'("NIST-PD-fallback"),
NLOD_1_0 => new String'("NLOD-1.0"),
NLPL => new String'("NLPL"),
NOSL => new String'("NOSL"),
NPL_1_0 => new String'("NPL-1.0"),
NPL_1_1 => new String'("NPL-1.1"),
NPOSL_3_0 => new String'("NPOSL-3.0"),
NRL => new String'("NRL"),
NTP => new String'("NTP"),
NTP_0 => new String'("NTP-0"),
Naumen => new String'("Naumen"),
Net_SNMP => new String'("Net-SNMP"),
NetCDF => new String'("NetCDF"),
Newsletr => new String'("Newsletr"),
Nokia => new String'("Nokia"),
Noweb => new String'("Noweb"),
O_UDA_1_0 => new String'("O-UDA-1.0"),
OCCT_PL => new String'("OCCT-PL"),
OCLC_2_0 => new String'("OCLC-2.0"),
ODC_By_1_0 => new String'("ODC-By-1.0"),
ODbL_1_0 => new String'("ODbL-1.0"),
OFL_1_0 => new String'("OFL-1.0"),
OFL_1_0_RFN => new String'("OFL-1.0-RFN"),
OFL_1_0_no_RFN => new String'("OFL-1.0-no-RFN"),
OFL_1_1 => new String'("OFL-1.1"),
OFL_1_1_RFN => new String'("OFL-1.1-RFN"),
OFL_1_1_no_RFN => new String'("OFL-1.1-no-RFN"),
OGC_1_0 => new String'("OGC-1.0"),
OGL_Canada_2_0 => new String'("OGL-Canada-2.0"),
OGL_UK_1_0 => new String'("OGL-UK-1.0"),
OGL_UK_2_0 => new String'("OGL-UK-2.0"),
OGL_UK_3_0 => new String'("OGL-UK-3.0"),
OGTSL => new String'("OGTSL"),
OLDAP_1_1 => new String'("OLDAP-1.1"),
OLDAP_1_2 => new String'("OLDAP-1.2"),
OLDAP_1_3 => new String'("OLDAP-1.3"),
OLDAP_1_4 => new String'("OLDAP-1.4"),
OLDAP_2_0 => new String'("OLDAP-2.0"),
OLDAP_2_0_1 => new String'("OLDAP-2.0.1"),
OLDAP_2_1 => new String'("OLDAP-2.1"),
OLDAP_2_2 => new String'("OLDAP-2.2"),
OLDAP_2_2_1 => new String'("OLDAP-2.2.1"),
OLDAP_2_2_2 => new String'("OLDAP-2.2.2"),
OLDAP_2_3 => new String'("OLDAP-2.3"),
OLDAP_2_4 => new String'("OLDAP-2.4"),
OLDAP_2_5 => new String'("OLDAP-2.5"),
OLDAP_2_6 => new String'("OLDAP-2.6"),
OLDAP_2_7 => new String'("OLDAP-2.7"),
OLDAP_2_8 => new String'("OLDAP-2.8"),
OML => new String'("OML"),
OPL_1_0 => new String'("OPL-1.0"),
OSET_PL_2_1 => new String'("OSET-PL-2.1"),
OSL_1_0 => new String'("OSL-1.0"),
OSL_1_1 => new String'("OSL-1.1"),
OSL_2_0 => new String'("OSL-2.0"),
OSL_2_1 => new String'("OSL-2.1"),
OSL_3_0 => new String'("OSL-3.0"),
OpenSSL => new String'("OpenSSL"),
PDDL_1_0 => new String'("PDDL-1.0"),
PHP_3_0 => new String'("PHP-3.0"),
PHP_3_01 => new String'("PHP-3.01"),
PSF_2_0 => new String'("PSF-2.0"),
Parity_6_0_0 => new String'("Parity-6.0.0"),
Parity_7_0_0 => new String'("Parity-7.0.0"),
Plexus => new String'("Plexus"),
PolyForm_Noncommercial_1_0_0 => new String'("PolyForm-Noncommercial-1.0.0"),
PolyForm_Small_Business_1_0_0 => new String'("PolyForm-Small-Business-1.0.0"),
PostgreSQL => new String'("PostgreSQL"),
Python_2_0 => new String'("Python-2.0"),
QPL_1_0 => new String'("QPL-1.0"),
Qhull => new String'("Qhull"),
RHeCos_1_1 => new String'("RHeCos-1.1"),
RPL_1_1 => new String'("RPL-1.1"),
RPL_1_5 => new String'("RPL-1.5"),
RPSL_1_0 => new String'("RPSL-1.0"),
RSA_MD => new String'("RSA-MD"),
RSCPL => new String'("RSCPL"),
Rdisc => new String'("Rdisc"),
Ruby => new String'("Ruby"),
SAX_PD => new String'("SAX-PD"),
SCEA => new String'("SCEA"),
SGI_B_1_0 => new String'("SGI-B-1.0"),
SGI_B_1_1 => new String'("SGI-B-1.1"),
SGI_B_2_0 => new String'("SGI-B-2.0"),
SHL_0_5 => new String'("SHL-0.5"),
SHL_0_51 => new String'("SHL-0.51"),
SISSL => new String'("SISSL"),
SISSL_1_2 => new String'("SISSL-1.2"),
SMLNJ => new String'("SMLNJ"),
SMPPL => new String'("SMPPL"),
SNIA => new String'("SNIA"),
SPL_1_0 => new String'("SPL-1.0"),
SSH_OpenSSH => new String'("SSH-OpenSSH"),
SSH_short => new String'("SSH-short"),
SSPL_1_0 => new String'("SSPL-1.0"),
SWL => new String'("SWL"),
Saxpath => new String'("Saxpath"),
Sendmail => new String'("Sendmail"),
Sendmail_8_23 => new String'("Sendmail-8.23"),
SimPL_2_0 => new String'("SimPL-2.0"),
Sleepycat => new String'("Sleepycat"),
Spencer_86 => new String'("Spencer-86"),
Spencer_94 => new String'("Spencer-94"),
Spencer_99 => new String'("Spencer-99"),
SugarCRM_1_1_3 => new String'("SugarCRM-1.1.3"),
TAPR_OHL_1_0 => new String'("TAPR-OHL-1.0"),
TCL => new String'("TCL"),
TCP_wrappers => new String'("TCP-wrappers"),
TMate => new String'("TMate"),
TORQUE_1_1 => new String'("TORQUE-1.1"),
TOSL => new String'("TOSL"),
TU_Berlin_1_0 => new String'("TU-Berlin-1.0"),
TU_Berlin_2_0 => new String'("TU-Berlin-2.0"),
UCL_1_0 => new String'("UCL-1.0"),
UPL_1_0 => new String'("UPL-1.0"),
Unicode_DFS_2015 => new String'("Unicode-DFS-2015"),
Unicode_DFS_2016 => new String'("Unicode-DFS-2016"),
Unicode_TOU => new String'("Unicode-TOU"),
Unlicense => new String'("Unlicense"),
VOSTROM => new String'("VOSTROM"),
VSL_1_0 => new String'("VSL-1.0"),
Vim => new String'("Vim"),
W3C => new String'("W3C"),
W3C_19980720 => new String'("W3C-19980720"),
W3C_20150513 => new String'("W3C-20150513"),
WTFPL => new String'("WTFPL"),
Watcom_1_0 => new String'("Watcom-1.0"),
Wsuipa => new String'("Wsuipa"),
X11 => new String'("X11"),
XFree86_1_1 => new String'("XFree86-1.1"),
XSkat => new String'("XSkat"),
Xerox => new String'("Xerox"),
Xnet => new String'("Xnet"),
YPL_1_0 => new String'("YPL-1.0"),
YPL_1_1 => new String'("YPL-1.1"),
ZPL_1_1 => new String'("ZPL-1.1"),
ZPL_2_0 => new String'("ZPL-2.0"),
ZPL_2_1 => new String'("ZPL-2.1"),
Zed => new String'("Zed"),
Zend_2_0 => new String'("Zend-2.0"),
Zimbra_1_3 => new String'("Zimbra-1.3"),
Zimbra_1_4 => new String'("Zimbra-1.4"),
Zlib => new String'("Zlib"),
blessing => new String'("blessing"),
bzip2_1_0_5 => new String'("bzip2-1.0.5"),
bzip2_1_0_6 => new String'("bzip2-1.0.6"),
copyleft_next_0_3_0 => new String'("copyleft-next-0.3.0"),
copyleft_next_0_3_1 => new String'("copyleft-next-0.3.1"),
curl => new String'("curl"),
diffmark => new String'("diffmark"),
dvipdfm => new String'("dvipdfm"),
eGenix => new String'("eGenix"),
etalab_2_0 => new String'("etalab-2.0"),
gSOAP_1_3b => new String'("gSOAP-1.3b"),
gnuplot => new String'("gnuplot"),
iMatix => new String'("iMatix"),
libpng_2_0 => new String'("libpng-2.0"),
libselinux_1_0 => new String'("libselinux-1.0"),
libtiff => new String'("libtiff"),
mpich2 => new String'("mpich2"),
psfrag => new String'("psfrag"),
psutils => new String'("psutils"),
xinetd => new String'("xinetd"),
xpp => new String'("xpp"),
zlib_acknowledgement => new String'("zlib-acknowledgement"));
function Img (I : Id) return String
is (Img_Ptr (I).all);
Name_Ptr : constant array (Id) of String_Access :=
(
Id_0BSD => new String'("BSD Zero Clause License"),
AAL => new String'("Attribution Assurance License"),
ADSL => new String'("Amazon Digital Services License"),
AFL_1_1 => new String'("Academic Free License v1.1"),
AFL_1_2 => new String'("Academic Free License v1.2"),
AFL_2_0 => new String'("Academic Free License v2.0"),
AFL_2_1 => new String'("Academic Free License v2.1"),
AFL_3_0 => new String'("Academic Free License v3.0"),
AGPL_1_0_only => new String'("Affero General Public License v1.0 only"),
AGPL_1_0_or_later => new String'("Affero General Public License v1.0 or later"),
AGPL_3_0_only => new String'("GNU Affero General Public License v3.0 only"),
AGPL_3_0_or_later => new String'("GNU Affero General Public License v3.0 or later"),
AMDPLPA => new String'("AMD's plpa_map.c License"),
AML => new String'("Apple MIT License"),
AMPAS => new String'("Academy of Motion Picture Arts and Sciences BSD"),
ANTLR_PD => new String'("ANTLR Software Rights Notice"),
APAFML => new String'("Adobe Postscript AFM License"),
APL_1_0 => new String'("Adaptive Public License 1.0"),
APSL_1_0 => new String'("Apple Public Source License 1.0"),
APSL_1_1 => new String'("Apple Public Source License 1.1"),
APSL_1_2 => new String'("Apple Public Source License 1.2"),
APSL_2_0 => new String'("Apple Public Source License 2.0"),
Abstyles => new String'("Abstyles License"),
Adobe_2006 => new String'("Adobe Systems Incorporated Source Code License Agreement"),
Adobe_Glyph => new String'("Adobe Glyph List License"),
Afmparse => new String'("Afmparse License"),
Aladdin => new String'("Aladdin Free Public License"),
Apache_1_0 => new String'("Apache License 1.0"),
Apache_1_1 => new String'("Apache License 1.1"),
Apache_2_0 => new String'("Apache License 2.0"),
Artistic_1_0 => new String'("Artistic License 1.0"),
Artistic_1_0_Perl => new String'("Artistic License 1.0 (Perl)"),
Artistic_1_0_cl8 => new String'("Artistic License 1.0 w/clause 8"),
Artistic_2_0 => new String'("Artistic License 2.0"),
BSD_1_Clause => new String'("BSD 1-Clause License"),
BSD_2_Clause => new String'("BSD 2-Clause ""Simplified"" License"),
BSD_2_Clause_Patent => new String'("BSD-2-Clause Plus Patent License"),
BSD_2_Clause_Views => new String'("BSD 2-Clause with views sentence"),
BSD_3_Clause => new String'("BSD 3-Clause ""New"" or ""Revised"" License"),
BSD_3_Clause_Attribution => new String'("BSD with attribution"),
BSD_3_Clause_Clear => new String'("BSD 3-Clause Clear License"),
BSD_3_Clause_LBNL => new String'("Lawrence Berkeley National Labs BSD variant license"),
BSD_3_Clause_No_Nuclear_License => new String'("BSD 3-Clause No Nuclear License"),
BSD_3_Clause_No_Nuclear_License_2014 => new String'("BSD 3-Clause No Nuclear License 2014"),
BSD_3_Clause_No_Nuclear_Warranty => new String'("BSD 3-Clause No Nuclear Warranty"),
BSD_3_Clause_Open_MPI => new String'("BSD 3-Clause Open MPI variant"),
BSD_4_Clause => new String'("BSD 4-Clause ""Original"" or ""Old"" License"),
BSD_4_Clause_UC => new String'("BSD-4-Clause (University of California-Specific)"),
BSD_Protection => new String'("BSD Protection License"),
BSD_Source_Code => new String'("BSD Source Code Attribution"),
BSL_1_0 => new String'("Boost Software License 1.0"),
Bahyph => new String'("Bahyph License"),
Barr => new String'("Barr License"),
Beerware => new String'("Beerware License"),
BitTorrent_1_0 => new String'("BitTorrent Open Source License v1.0"),
BitTorrent_1_1 => new String'("BitTorrent Open Source License v1.1"),
BlueOak_1_0_0 => new String'("Blue Oak Model License 1.0.0"),
Borceux => new String'("Borceux license"),
CAL_1_0 => new String'("Cryptographic Autonomy License 1.0"),
CAL_1_0_Combined_Work_Exception => new String'("Cryptographic Autonomy License 1.0 (Combined Work Exception)"),
CATOSL_1_1 => new String'("Computer Associates Trusted Open Source License 1.1"),
CC_BY_1_0 => new String'("Creative Commons Attribution 1.0 Generic"),
CC_BY_2_0 => new String'("Creative Commons Attribution 2.0 Generic"),
CC_BY_2_5 => new String'("Creative Commons Attribution 2.5 Generic"),
CC_BY_3_0 => new String'("Creative Commons Attribution 3.0 Unported"),
CC_BY_3_0_AT => new String'("Creative Commons Attribution 3.0 Austria"),
CC_BY_4_0 => new String'("Creative Commons Attribution 4.0 International"),
CC_BY_NC_1_0 => new String'("Creative Commons Attribution Non Commercial 1.0 Generic"),
CC_BY_NC_2_0 => new String'("Creative Commons Attribution Non Commercial 2.0 Generic"),
CC_BY_NC_2_5 => new String'("Creative Commons Attribution Non Commercial 2.5 Generic"),
CC_BY_NC_3_0 => new String'("Creative Commons Attribution Non Commercial 3.0 Unported"),
CC_BY_NC_4_0 => new String'("Creative Commons Attribution Non Commercial 4.0 International"),
CC_BY_NC_ND_1_0 => new String'("Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic"),
CC_BY_NC_ND_2_0 => new String'("Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic"),
CC_BY_NC_ND_2_5 => new String'("Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic"),
CC_BY_NC_ND_3_0 => new String'("Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported"),
CC_BY_NC_ND_3_0_IGO => new String'("Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO"),
CC_BY_NC_ND_4_0 => new String'("Creative Commons Attribution Non Commercial No Derivatives 4.0 International"),
CC_BY_NC_SA_1_0 => new String'("Creative Commons Attribution Non Commercial Share Alike 1.0 Generic"),
CC_BY_NC_SA_2_0 => new String'("Creative Commons Attribution Non Commercial Share Alike 2.0 Generic"),
CC_BY_NC_SA_2_5 => new String'("Creative Commons Attribution Non Commercial Share Alike 2.5 Generic"),
CC_BY_NC_SA_3_0 => new String'("Creative Commons Attribution Non Commercial Share Alike 3.0 Unported"),
CC_BY_NC_SA_4_0 => new String'("Creative Commons Attribution Non Commercial Share Alike 4.0 International"),
CC_BY_ND_1_0 => new String'("Creative Commons Attribution No Derivatives 1.0 Generic"),
CC_BY_ND_2_0 => new String'("Creative Commons Attribution No Derivatives 2.0 Generic"),
CC_BY_ND_2_5 => new String'("Creative Commons Attribution No Derivatives 2.5 Generic"),
CC_BY_ND_3_0 => new String'("Creative Commons Attribution No Derivatives 3.0 Unported"),
CC_BY_ND_4_0 => new String'("Creative Commons Attribution No Derivatives 4.0 International"),
CC_BY_SA_1_0 => new String'("Creative Commons Attribution Share Alike 1.0 Generic"),
CC_BY_SA_2_0 => new String'("Creative Commons Attribution Share Alike 2.0 Generic"),
CC_BY_SA_2_5 => new String'("Creative Commons Attribution Share Alike 2.5 Generic"),
CC_BY_SA_3_0 => new String'("Creative Commons Attribution Share Alike 3.0 Unported"),
CC_BY_SA_3_0_AT => new String'("Creative Commons Attribution-Share Alike 3.0 Austria"),
CC_BY_SA_4_0 => new String'("Creative Commons Attribution Share Alike 4.0 International"),
CC_PDDC => new String'("Creative Commons Public Domain Dedication and Certification"),
CC0_1_0 => new String'("Creative Commons Zero v1.0 Universal"),
CDDL_1_0 => new String'("Common Development and Distribution License 1.0"),
CDDL_1_1 => new String'("Common Development and Distribution License 1.1"),
CDLA_Permissive_1_0 => new String'("Community Data License Agreement Permissive 1.0"),
CDLA_Sharing_1_0 => new String'("Community Data License Agreement Sharing 1.0"),
CECILL_1_0 => new String'("CeCILL Free Software License Agreement v1.0"),
CECILL_1_1 => new String'("CeCILL Free Software License Agreement v1.1"),
CECILL_2_0 => new String'("CeCILL Free Software License Agreement v2.0"),
CECILL_2_1 => new String'("CeCILL Free Software License Agreement v2.1"),
CECILL_B => new String'("CeCILL-B Free Software License Agreement"),
CECILL_C => new String'("CeCILL-C Free Software License Agreement"),
CERN_OHL_1_1 => new String'("CERN Open Hardware Licence v1.1"),
CERN_OHL_1_2 => new String'("CERN Open Hardware Licence v1.2"),
CERN_OHL_P_2_0 => new String'("CERN Open Hardware Licence Version 2 - Permissive"),
CERN_OHL_S_2_0 => new String'("CERN Open Hardware Licence Version 2 - Strongly Reciprocal"),
CERN_OHL_W_2_0 => new String'("CERN Open Hardware Licence Version 2 - Weakly Reciprocal"),
CNRI_Jython => new String'("CNRI Jython License"),
CNRI_Python => new String'("CNRI Python License"),
CNRI_Python_GPL_Compatible => new String'("CNRI Python Open Source GPL Compatible License Agreement"),
CPAL_1_0 => new String'("Common Public Attribution License 1.0"),
CPL_1_0 => new String'("Common Public License 1.0"),
CPOL_1_02 => new String'("Code Project Open License 1.02"),
CUA_OPL_1_0 => new String'("CUA Office Public License v1.0"),
Caldera => new String'("Caldera License"),
ClArtistic => new String'("Clarified Artistic License"),
Condor_1_1 => new String'("Condor Public License v1.1"),
Crossword => new String'("Crossword License"),
CrystalStacker => new String'("CrystalStacker License"),
Cube => new String'("Cube License"),
D_FSL_1_0 => new String'("Deutsche Freie Software Lizenz"),
DOC => new String'("DOC License"),
DSDP => new String'("DSDP License"),
Dotseqn => new String'("Dotseqn License"),
ECL_1_0 => new String'("Educational Community License v1.0"),
ECL_2_0 => new String'("Educational Community License v2.0"),
EFL_1_0 => new String'("Eiffel Forum License v1.0"),
EFL_2_0 => new String'("Eiffel Forum License v2.0"),
EPICS => new String'("EPICS Open License"),
EPL_1_0 => new String'("Eclipse Public License 1.0"),
EPL_2_0 => new String'("Eclipse Public License 2.0"),
EUDatagrid => new String'("EU DataGrid Software License"),
EUPL_1_0 => new String'("European Union Public License 1.0"),
EUPL_1_1 => new String'("European Union Public License 1.1"),
EUPL_1_2 => new String'("European Union Public License 1.2"),
Entessa => new String'("Entessa Public License v1.0"),
ErlPL_1_1 => new String'("Erlang Public License v1.1"),
Eurosym => new String'("Eurosym License"),
FSFAP => new String'("FSF All Permissive License"),
FSFUL => new String'("FSF Unlimited License"),
FSFULLR => new String'("FSF Unlimited License (with License Retention)"),
FTL => new String'("Freetype Project License"),
Fair => new String'("Fair License"),
Frameworx_1_0 => new String'("Frameworx Open License 1.0"),
FreeImage => new String'("FreeImage Public License v1.0"),
GFDL_1_1_invariants_only => new String'("GNU Free Documentation License v1.1 only - invariants"),
GFDL_1_1_invariants_or_later => new String'("GNU Free Documentation License v1.1 or later - invariants"),
GFDL_1_1_no_invariants_only => new String'("GNU Free Documentation License v1.1 only - no invariants"),
GFDL_1_1_no_invariants_or_later => new String'("GNU Free Documentation License v1.1 or later - no invariants"),
GFDL_1_1_only => new String'("GNU Free Documentation License v1.1 only"),
GFDL_1_1_or_later => new String'("GNU Free Documentation License v1.1 or later"),
GFDL_1_2_invariants_only => new String'("GNU Free Documentation License v1.2 only - invariants"),
GFDL_1_2_invariants_or_later => new String'("GNU Free Documentation License v1.2 or later - invariants"),
GFDL_1_2_no_invariants_only => new String'("GNU Free Documentation License v1.2 only - no invariants"),
GFDL_1_2_no_invariants_or_later => new String'("GNU Free Documentation License v1.2 or later - no invariants"),
GFDL_1_2_only => new String'("GNU Free Documentation License v1.2 only"),
GFDL_1_2_or_later => new String'("GNU Free Documentation License v1.2 or later"),
GFDL_1_3_invariants_only => new String'("GNU Free Documentation License v1.3 only - invariants"),
GFDL_1_3_invariants_or_later => new String'("GNU Free Documentation License v1.3 or later - invariants"),
GFDL_1_3_no_invariants_only => new String'("GNU Free Documentation License v1.3 only - no invariants"),
GFDL_1_3_no_invariants_or_later => new String'("GNU Free Documentation License v1.3 or later - no invariants"),
GFDL_1_3_only => new String'("GNU Free Documentation License v1.3 only"),
GFDL_1_3_or_later => new String'("GNU Free Documentation License v1.3 or later"),
GL2PS => new String'("GL2PS License"),
GLWTPL => new String'("Good Luck With That Public License"),
GPL_1_0_only => new String'("GNU General Public License v1.0 only"),
GPL_1_0_or_later => new String'("GNU General Public License v1.0 or later"),
GPL_2_0_only => new String'("GNU General Public License v2.0 only"),
GPL_2_0_or_later => new String'("GNU General Public License v2.0 or later"),
GPL_3_0_only => new String'("GNU General Public License v3.0 only"),
GPL_3_0_or_later => new String'("GNU General Public License v3.0 or later"),
Giftware => new String'("Giftware License"),
Glide => new String'("3dfx Glide License"),
Glulxe => new String'("Glulxe License"),
HPND => new String'("Historical Permission Notice and Disclaimer"),
HPND_sell_variant => new String'("Historical Permission Notice and Disclaimer - sell variant"),
HaskellReport => new String'("Haskell Language Report License"),
Hippocratic_2_1 => new String'("Hippocratic License 2.1"),
IBM_pibs => new String'("IBM PowerPC Initialization and Boot Software"),
ICU => new String'("ICU License"),
IJG => new String'("Independent JPEG Group License"),
IPA => new String'("IPA Font License"),
IPL_1_0 => new String'("IBM Public License v1.0"),
ISC => new String'("ISC License"),
ImageMagick => new String'("ImageMagick License"),
Imlib2 => new String'("Imlib2 License"),
Info_ZIP => new String'("Info-ZIP License"),
Intel => new String'("Intel Open Source License"),
Intel_ACPI => new String'("Intel ACPI Software License Agreement"),
Interbase_1_0 => new String'("Interbase Public License v1.0"),
JPNIC => new String'("Japan Network Information Center License"),
JSON => new String'("JSON License"),
JasPer_2_0 => new String'("JasPer License"),
LAL_1_2 => new String'("Licence Art Libre 1.2"),
LAL_1_3 => new String'("Licence Art Libre 1.3"),
LGPL_2_0_only => new String'("GNU Library General Public License v2 only"),
LGPL_2_0_or_later => new String'("GNU Library General Public License v2 or later"),
LGPL_2_1_only => new String'("GNU Lesser General Public License v2.1 only"),
LGPL_2_1_or_later => new String'("GNU Lesser General Public License v2.1 or later"),
LGPL_3_0_only => new String'("GNU Lesser General Public License v3.0 only"),
LGPL_3_0_or_later => new String'("GNU Lesser General Public License v3.0 or later"),
LGPLLR => new String'("Lesser General Public License For Linguistic Resources"),
LPL_1_0 => new String'("Lucent Public License Version 1.0"),
LPL_1_02 => new String'("Lucent Public License v1.02"),
LPPL_1_0 => new String'("LaTeX Project Public License v1.0"),
LPPL_1_1 => new String'("LaTeX Project Public License v1.1"),
LPPL_1_2 => new String'("LaTeX Project Public License v1.2"),
LPPL_1_3a => new String'("LaTeX Project Public License v1.3a"),
LPPL_1_3c => new String'("LaTeX Project Public License v1.3c"),
Latex2e => new String'("Latex2e License"),
Leptonica => new String'("Leptonica License"),
LiLiQ_P_1_1 => new String'("Licence Libre du Qubec Permissive version 1.1"),
LiLiQ_R_1_1 => new String'("Licence Libre du Qubec Rciprocit version 1.1"),
LiLiQ_Rplus_1_1 => new String'("Licence Libre du Qubec Rciprocit forte version 1.1"),
Libpng => new String'("libpng License"),
Linux_OpenIB => new String'("Linux Kernel Variant of OpenIB.org license"),
MIT => new String'("MIT License"),
MIT_0 => new String'("MIT No Attribution"),
MIT_CMU => new String'("CMU License"),
MIT_advertising => new String'("Enlightenment License (e16)"),
MIT_enna => new String'("enna License"),
MIT_feh => new String'("feh License"),
MITNFA => new String'("MIT +no-false-attribs license"),
MPL_1_0 => new String'("Mozilla Public License 1.0"),
MPL_1_1 => new String'("Mozilla Public License 1.1"),
MPL_2_0 => new String'("Mozilla Public License 2.0"),
MPL_2_0_no_copyleft_exception => new String'("Mozilla Public License 2.0 (no copyleft exception)"),
MS_PL => new String'("Microsoft Public License"),
MS_RL => new String'("Microsoft Reciprocal License"),
MTLL => new String'("Matrix Template Library License"),
MakeIndex => new String'("MakeIndex License"),
MirOS => new String'("The MirOS Licence"),
Motosoto => new String'("Motosoto License"),
MulanPSL_1_0 => new String'("Mulan Permissive Software License, Version 1"),
MulanPSL_2_0 => new String'("Mulan Permissive Software License, Version 2"),
Multics => new String'("Multics License"),
Mup => new String'("Mup License"),
NASA_1_3 => new String'("NASA Open Source Agreement 1.3"),
NBPL_1_0 => new String'("Net Boolean Public License v1"),
NCGL_UK_2_0 => new String'("Non-Commercial Government Licence"),
NCSA => new String'("University of Illinois/NCSA Open Source License"),
NGPL => new String'("Nethack General Public License"),
NIST_PD => new String'("NIST Public Domain Notice"),
NIST_PD_fallback => new String'("NIST Public Domain Notice with license fallback"),
NLOD_1_0 => new String'("Norwegian Licence for Open Government Data"),
NLPL => new String'("No Limit Public License"),
NOSL => new String'("Netizen Open Source License"),
NPL_1_0 => new String'("Netscape Public License v1.0"),
NPL_1_1 => new String'("Netscape Public License v1.1"),
NPOSL_3_0 => new String'("Non-Profit Open Software License 3.0"),
NRL => new String'("NRL License"),
NTP => new String'("NTP License"),
NTP_0 => new String'("NTP No Attribution"),
Naumen => new String'("Naumen Public License"),
Net_SNMP => new String'("Net-SNMP License"),
NetCDF => new String'("NetCDF license"),
Newsletr => new String'("Newsletr License"),
Nokia => new String'("Nokia Open Source License"),
Noweb => new String'("Noweb License"),
O_UDA_1_0 => new String'("Open Use of Data Agreement v1.0"),
OCCT_PL => new String'("Open CASCADE Technology Public License"),
OCLC_2_0 => new String'("OCLC Research Public License 2.0"),
ODC_By_1_0 => new String'("Open Data Commons Attribution License v1.0"),
ODbL_1_0 => new String'("ODC Open Database License v1.0"),
OFL_1_0 => new String'("SIL Open Font License 1.0"),
OFL_1_0_RFN => new String'("SIL Open Font License 1.0 with Reserved Font Name"),
OFL_1_0_no_RFN => new String'("SIL Open Font License 1.0 with no Reserved Font Name"),
OFL_1_1 => new String'("SIL Open Font License 1.1"),
OFL_1_1_RFN => new String'("SIL Open Font License 1.1 with Reserved Font Name"),
OFL_1_1_no_RFN => new String'("SIL Open Font License 1.1 with no Reserved Font Name"),
OGC_1_0 => new String'("OGC Software License, Version 1.0"),
OGL_Canada_2_0 => new String'("Open Government Licence - Canada"),
OGL_UK_1_0 => new String'("Open Government Licence v1.0"),
OGL_UK_2_0 => new String'("Open Government Licence v2.0"),
OGL_UK_3_0 => new String'("Open Government Licence v3.0"),
OGTSL => new String'("Open Group Test Suite License"),
OLDAP_1_1 => new String'("Open LDAP Public License v1.1"),
OLDAP_1_2 => new String'("Open LDAP Public License v1.2"),
OLDAP_1_3 => new String'("Open LDAP Public License v1.3"),
OLDAP_1_4 => new String'("Open LDAP Public License v1.4"),
OLDAP_2_0 => new String'("Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)"),
OLDAP_2_0_1 => new String'("Open LDAP Public License v2.0.1"),
OLDAP_2_1 => new String'("Open LDAP Public License v2.1"),
OLDAP_2_2 => new String'("Open LDAP Public License v2.2"),
OLDAP_2_2_1 => new String'("Open LDAP Public License v2.2.1"),
OLDAP_2_2_2 => new String'("Open LDAP Public License 2.2.2"),
OLDAP_2_3 => new String'("Open LDAP Public License v2.3"),
OLDAP_2_4 => new String'("Open LDAP Public License v2.4"),
OLDAP_2_5 => new String'("Open LDAP Public License v2.5"),
OLDAP_2_6 => new String'("Open LDAP Public License v2.6"),
OLDAP_2_7 => new String'("Open LDAP Public License v2.7"),
OLDAP_2_8 => new String'("Open LDAP Public License v2.8"),
OML => new String'("Open Market License"),
OPL_1_0 => new String'("Open Public License v1.0"),
OSET_PL_2_1 => new String'("OSET Public License version 2.1"),
OSL_1_0 => new String'("Open Software License 1.0"),
OSL_1_1 => new String'("Open Software License 1.1"),
OSL_2_0 => new String'("Open Software License 2.0"),
OSL_2_1 => new String'("Open Software License 2.1"),
OSL_3_0 => new String'("Open Software License 3.0"),
OpenSSL => new String'("OpenSSL License"),
PDDL_1_0 => new String'("ODC Public Domain Dedication & License 1.0"),
PHP_3_0 => new String'("PHP License v3.0"),
PHP_3_01 => new String'("PHP License v3.01"),
PSF_2_0 => new String'("Python Software Foundation License 2.0"),
Parity_6_0_0 => new String'("The Parity Public License 6.0.0"),
Parity_7_0_0 => new String'("The Parity Public License 7.0.0"),
Plexus => new String'("Plexus Classworlds License"),
PolyForm_Noncommercial_1_0_0 => new String'("PolyForm Noncommercial License 1.0.0"),
PolyForm_Small_Business_1_0_0 => new String'("PolyForm Small Business License 1.0.0"),
PostgreSQL => new String'("PostgreSQL License"),
Python_2_0 => new String'("Python License 2.0"),
QPL_1_0 => new String'("Q Public License 1.0"),
Qhull => new String'("Qhull License"),
RHeCos_1_1 => new String'("Red Hat eCos Public License v1.1"),
RPL_1_1 => new String'("Reciprocal Public License 1.1"),
RPL_1_5 => new String'("Reciprocal Public License 1.5"),
RPSL_1_0 => new String'("RealNetworks Public Source License v1.0"),
RSA_MD => new String'("RSA Message-Digest License"),
RSCPL => new String'("Ricoh Source Code Public License"),
Rdisc => new String'("Rdisc License"),
Ruby => new String'("Ruby License"),
SAX_PD => new String'("Sax Public Domain Notice"),
SCEA => new String'("SCEA Shared Source License"),
SGI_B_1_0 => new String'("SGI Free Software License B v1.0"),
SGI_B_1_1 => new String'("SGI Free Software License B v1.1"),
SGI_B_2_0 => new String'("SGI Free Software License B v2.0"),
SHL_0_5 => new String'("Solderpad Hardware License v0.5"),
SHL_0_51 => new String'("Solderpad Hardware License, Version 0.51"),
SISSL => new String'("Sun Industry Standards Source License v1.1"),
SISSL_1_2 => new String'("Sun Industry Standards Source License v1.2"),
SMLNJ => new String'("Standard ML of New Jersey License"),
SMPPL => new String'("Secure Messaging Protocol Public License"),
SNIA => new String'("SNIA Public License 1.1"),
SPL_1_0 => new String'("Sun Public License v1.0"),
SSH_OpenSSH => new String'("SSH OpenSSH license"),
SSH_short => new String'("SSH short notice"),
SSPL_1_0 => new String'("Server Side Public License, v 1"),
SWL => new String'("Scheme Widget Library (SWL) Software License Agreement"),
Saxpath => new String'("Saxpath License"),
Sendmail => new String'("Sendmail License"),
Sendmail_8_23 => new String'("Sendmail License 8.23"),
SimPL_2_0 => new String'("Simple Public License 2.0"),
Sleepycat => new String'("Sleepycat License"),
Spencer_86 => new String'("Spencer License 86"),
Spencer_94 => new String'("Spencer License 94"),
Spencer_99 => new String'("Spencer License 99"),
SugarCRM_1_1_3 => new String'("SugarCRM Public License v1.1.3"),
TAPR_OHL_1_0 => new String'("TAPR Open Hardware License v1.0"),
TCL => new String'("TCL/TK License"),
TCP_wrappers => new String'("TCP Wrappers License"),
TMate => new String'("TMate Open Source License"),
TORQUE_1_1 => new String'("TORQUE v2.5+ Software License v1.1"),
TOSL => new String'("Trusster Open Source License"),
TU_Berlin_1_0 => new String'("Technische Universitaet Berlin License 1.0"),
TU_Berlin_2_0 => new String'("Technische Universitaet Berlin License 2.0"),
UCL_1_0 => new String'("Upstream Compatibility License v1.0"),
UPL_1_0 => new String'("Universal Permissive License v1.0"),
Unicode_DFS_2015 => new String'("Unicode License Agreement - Data Files and Software (2015)"),
Unicode_DFS_2016 => new String'("Unicode License Agreement - Data Files and Software (2016)"),
Unicode_TOU => new String'("Unicode Terms of Use"),
Unlicense => new String'("The Unlicense"),
VOSTROM => new String'("VOSTROM Public License for Open Source"),
VSL_1_0 => new String'("Vovida Software License v1.0"),
Vim => new String'("Vim License"),
W3C => new String'("W3C Software Notice and License (2002-12-31)"),
W3C_19980720 => new String'("W3C Software Notice and License (1998-07-20)"),
W3C_20150513 => new String'("W3C Software Notice and Document License (2015-05-13)"),
WTFPL => new String'("Do What The F*ck You Want To Public License"),
Watcom_1_0 => new String'("Sybase Open Watcom Public License 1.0"),
Wsuipa => new String'("Wsuipa License"),
X11 => new String'("X11 License"),
XFree86_1_1 => new String'("XFree86 License 1.1"),
XSkat => new String'("XSkat License"),
Xerox => new String'("Xerox License"),
Xnet => new String'("X.Net License"),
YPL_1_0 => new String'("Yahoo! Public License v1.0"),
YPL_1_1 => new String'("Yahoo! Public License v1.1"),
ZPL_1_1 => new String'("Zope Public License 1.1"),
ZPL_2_0 => new String'("Zope Public License 2.0"),
ZPL_2_1 => new String'("Zope Public License 2.1"),
Zed => new String'("Zed License"),
Zend_2_0 => new String'("Zend License v2.0"),
Zimbra_1_3 => new String'("Zimbra Public License v1.3"),
Zimbra_1_4 => new String'("Zimbra Public License v1.4"),
Zlib => new String'("zlib License"),
blessing => new String'("SQLite Blessing"),
bzip2_1_0_5 => new String'("bzip2 and libbzip2 License v1.0.5"),
bzip2_1_0_6 => new String'("bzip2 and libbzip2 License v1.0.6"),
copyleft_next_0_3_0 => new String'("copyleft-next 0.3.0"),
copyleft_next_0_3_1 => new String'("copyleft-next 0.3.1"),
curl => new String'("curl License"),
diffmark => new String'("diffmark license"),
dvipdfm => new String'("dvipdfm License"),
eGenix => new String'("eGenix.com Public License 1.1.0"),
etalab_2_0 => new String'("Etalab Open License 2.0"),
gSOAP_1_3b => new String'("gSOAP Public License v1.3b"),
gnuplot => new String'("gnuplot License"),
iMatix => new String'("iMatix Standard Function Library Agreement"),
libpng_2_0 => new String'("PNG Reference Library version 2"),
libselinux_1_0 => new String'("libselinux public domain notice"),
libtiff => new String'("libtiff License"),
mpich2 => new String'("mpich2 License"),
psfrag => new String'("psfrag License"),
psutils => new String'("psutils License"),
xinetd => new String'("xinetd License"),
xpp => new String'("XPP License"),
zlib_acknowledgement => new String'("zlib/libpng License with Acknowledgement"));
function Name (I : Id) return String
is (Name_Ptr (I).all);
function Valid_Id (Str : String) return Boolean;
function From_Id (Str : String) return Id;
end SPDX.Licenses;
|
reznikmm/matreshka | Ada | 4,113 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Draw_Caption_Escape_Direction_Attributes;
package Matreshka.ODF_Draw.Caption_Escape_Direction_Attributes is
type Draw_Caption_Escape_Direction_Attribute_Node is
new Matreshka.ODF_Draw.Abstract_Draw_Attribute_Node
and ODF.DOM.Draw_Caption_Escape_Direction_Attributes.ODF_Draw_Caption_Escape_Direction_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Draw_Caption_Escape_Direction_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Draw_Caption_Escape_Direction_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Draw.Caption_Escape_Direction_Attributes;
|
reznikmm/matreshka | Ada | 4,697 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Visitors;
with ODF.DOM.Table_Sort_By_Elements;
package Matreshka.ODF_Table.Sort_By_Elements is
type Table_Sort_By_Element_Node is
new Matreshka.ODF_Table.Abstract_Table_Element_Node
and ODF.DOM.Table_Sort_By_Elements.ODF_Table_Sort_By
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters)
return Table_Sort_By_Element_Node;
overriding function Get_Local_Name
(Self : not null access constant Table_Sort_By_Element_Node)
return League.Strings.Universal_String;
overriding procedure Enter_Node
(Self : not null access Table_Sort_By_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Leave_Node
(Self : not null access Table_Sort_By_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Visit_Node
(Self : not null access Table_Sort_By_Element_Node;
Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
end Matreshka.ODF_Table.Sort_By_Elements;
|
zhmu/ananas | Ada | 4,783 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T V S N --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. 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. --
-- --
------------------------------------------------------------------------------
-- This package spec holds version information for the GNAT tools.
-- It is updated whenever the release number is changed.
package Gnatvsn is
Gnat_Static_Version_String : constant String := "GNU Ada";
-- Static string identifying this version, that can be used as an argument
-- to e.g. pragma Ident.
Library_Version : constant String := "12";
-- Library version. It needs to be updated whenever the major version
-- number is changed.
--
-- Note: Makefile.in uses the library version string to construct the
-- soname value.
Current_Year : constant String := "2022";
-- Used in printing copyright messages
Verbose_Library_Version : constant String := "GNAT Lib v" & Library_Version;
-- Version string stored in e.g. ALI files
function Gnat_Version_String return String;
-- Version output when GNAT (compiler), or its related tools, including
-- GNATBIND, GNATCHOP, GNATFIND, GNATLINK, GNATMAKE, GNATXREF, are run
-- (with appropriate verbose option switch set).
type Gnat_Build_Type is (FSF, GPL);
-- See Build_Type below for the meaning of these values.
Build_Type : constant Gnat_Build_Type := FSF;
-- Kind of GNAT build:
--
-- FSF
-- GNAT FSF version. This version of GNAT is part of a Free Software
-- Foundation release of the GNU Compiler Collection (GCC). The bug
-- box generated by Comperr gives information on how to report bugs
-- and list the "no warranty" information.
--
-- GPL
-- GNAT Community Edition. This is a special version of GNAT, released
-- by Ada Core Technologies and intended for academic users and free
-- software developers. The bug box generated by the package Comperr
-- gives appropriate bug submission instructions that do not reference
-- customer number etc.
function Gnat_Free_Software return String;
-- Text to be displayed by the different GNAT tools when switch --version
-- is used. This text depends on the GNAT build type.
function Copyright_Holder return String;
-- Return the name of the Copyright holder to be displayed by the different
-- GNAT tools when switch --version is used.
Ver_Len_Max : constant := 256;
-- Longest possible length for Gnat_Version_String in this or any
-- other version of GNAT. This is used by the binder to establish
-- space to store any possible version string value for checks. This
-- value should never be decreased in the future, but it would be
-- OK to increase it if absolutely necessary. If it is increased,
-- be sure to increase GNAT.Compiler.Version.Ver_Len_Max as well.
Ver_Prefix : constant String := "GNAT Version: ";
-- Prefix generated by binder. If it is changed, be sure to change
-- GNAT.Compiler_Version.Ver_Prefix as well.
end Gnatvsn;
|
zhmu/ananas | Ada | 6,351 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . S T A C K _ C H E C K I N G . O P E R A T I O N S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2022, Free Software Foundation, Inc. --
-- --
-- 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. 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. --
-- --
------------------------------------------------------------------------------
-- This is the verson for VxWorks 5, VxWorks 6 Cert and VxWorks MILS
-- This file should be kept synchronized with the general implementation
-- provided by s-stchop.adb.
pragma Restrictions (No_Elaboration_Code);
-- We want to guarantee the absence of elaboration code because the
-- binder does not handle references to this package.
with System.Storage_Elements; use System.Storage_Elements;
with System.Parameters; use System.Parameters;
with Interfaces.C;
package body System.Stack_Checking.Operations is
-- In order to have stack checking working appropriately on VxWorks we need
-- to extract the stack size information from the VxWorks kernel itself.
-- For VxWorks 5 & 6 the library for showing task-related information
-- needs to be linked into the VxWorks system, when using stack checking.
-- The taskShow library can be linked into the VxWorks system by either:
-- * defining INCLUDE_SHOW_ROUTINES in config.h when using
-- configuration header files, or
-- * selecting INCLUDE_TASK_SHOW when using the Tornado project
-- facility.
-- VxWorks MILS includes the necessary routine in taskLib, so nothing
-- special needs to be done there.
Stack_Limit : Address;
pragma Import (C, Stack_Limit, "__gnat_stack_limit");
-- Stack_Limit contains the limit of the stack. This variable is later made
-- a task variable (by calling taskVarAdd) and then correctly set to the
-- stack limit of the task. Before being so initialized its value must be
-- valid so that any subprogram with stack checking enabled will run. We
-- use extreme values according to the direction of the stack.
type Set_Stack_Limit_Proc_Acc is access procedure;
pragma Convention (C, Set_Stack_Limit_Proc_Acc);
Set_Stack_Limit_Hook : Set_Stack_Limit_Proc_Acc;
pragma Import (C, Set_Stack_Limit_Hook, "__gnat_set_stack_limit_hook");
-- Procedure to be called when a task is created to set stack
-- limit.
procedure Set_Stack_Limit_For_Current_Task;
pragma Convention (C, Set_Stack_Limit_For_Current_Task);
-- Register Initial_SP as the initial stack pointer value for the current
-- task when it starts and Size as the associated stack area size. This
-- should be called once, after the soft-links have been initialized?
-----------------------------
-- Initialize_Stack_Limit --
-----------------------------
procedure Initialize_Stack_Limit is
begin
Set_Stack_Limit_For_Current_Task;
-- Will be called by every created task
Set_Stack_Limit_Hook := Set_Stack_Limit_For_Current_Task'Access;
end Initialize_Stack_Limit;
--------------------------------------
-- Set_Stack_Limit_For_Current_Task --
--------------------------------------
procedure Set_Stack_Limit_For_Current_Task is
type OS_Stack_Info is record
Size : Interfaces.C.int;
Base : System.Address;
Limit : System.Address;
end record;
pragma Convention (C, OS_Stack_Info);
-- Type representing the information that we want to extract from the
-- underlying kernel.
procedure Get_Stack_Info (Stack : not null access OS_Stack_Info);
pragma Import (C, Get_Stack_Info, "__gnat_get_stack_info");
-- Procedure that fills the stack information associated to the
-- currently executing task.
Stack_Info : aliased OS_Stack_Info;
Limit : System.Address;
begin
-- Get stack bounds from VxWorks
Get_Stack_Info (Stack_Info'Access);
if Stack_Grows_Down then
Limit :=
Stack_Info.Base - Storage_Offset (Stack_Info.Size) +
Storage_Offset'(12_000);
else
Limit :=
Stack_Info.Base + Storage_Offset (Stack_Info.Size) -
Storage_Offset'(12_000);
end if;
Stack_Limit := Limit;
end Set_Stack_Limit_For_Current_Task;
end System.Stack_Checking.Operations;
|
reznikmm/matreshka | Ada | 5,295 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UML.Read_Variable_Actions.Collections is
pragma Preelaborate;
package UML_Read_Variable_Action_Collections is
new AMF.Generic_Collections
(UML_Read_Variable_Action,
UML_Read_Variable_Action_Access);
type Set_Of_UML_Read_Variable_Action is
new UML_Read_Variable_Action_Collections.Set with null record;
Empty_Set_Of_UML_Read_Variable_Action : constant Set_Of_UML_Read_Variable_Action;
type Ordered_Set_Of_UML_Read_Variable_Action is
new UML_Read_Variable_Action_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Read_Variable_Action : constant Ordered_Set_Of_UML_Read_Variable_Action;
type Bag_Of_UML_Read_Variable_Action is
new UML_Read_Variable_Action_Collections.Bag with null record;
Empty_Bag_Of_UML_Read_Variable_Action : constant Bag_Of_UML_Read_Variable_Action;
type Sequence_Of_UML_Read_Variable_Action is
new UML_Read_Variable_Action_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Read_Variable_Action : constant Sequence_Of_UML_Read_Variable_Action;
private
Empty_Set_Of_UML_Read_Variable_Action : constant Set_Of_UML_Read_Variable_Action
:= (UML_Read_Variable_Action_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Read_Variable_Action : constant Ordered_Set_Of_UML_Read_Variable_Action
:= (UML_Read_Variable_Action_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Read_Variable_Action : constant Bag_Of_UML_Read_Variable_Action
:= (UML_Read_Variable_Action_Collections.Bag with null record);
Empty_Sequence_Of_UML_Read_Variable_Action : constant Sequence_Of_UML_Read_Variable_Action
:= (UML_Read_Variable_Action_Collections.Sequence with null record);
end AMF.UML.Read_Variable_Actions.Collections;
|
reznikmm/matreshka | Ada | 11,761 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Value_Specifications;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Literal_Booleans;
with AMF.UML.Named_Elements;
with AMF.UML.Namespaces;
with AMF.UML.Packages.Collections;
with AMF.UML.Parameterable_Elements;
with AMF.UML.String_Expressions;
with AMF.UML.Template_Parameters;
with AMF.UML.Types;
with AMF.Visitors;
package AMF.Internals.UML_Literal_Booleans is
type UML_Literal_Boolean_Proxy is
limited new AMF.Internals.UML_Value_Specifications.UML_Value_Specification_Proxy
and AMF.UML.Literal_Booleans.UML_Literal_Boolean with null record;
overriding function Get_Value
(Self : not null access constant UML_Literal_Boolean_Proxy)
return Boolean;
-- Getter of LiteralBoolean::value.
--
-- The specified Boolean value.
overriding procedure Set_Value
(Self : not null access UML_Literal_Boolean_Proxy;
To : Boolean);
-- Setter of LiteralBoolean::value.
--
-- The specified Boolean value.
overriding function Get_Type
(Self : not null access constant UML_Literal_Boolean_Proxy)
return AMF.UML.Types.UML_Type_Access;
-- Getter of TypedElement::type.
--
-- The type of the TypedElement.
-- This information is derived from the return result for this Operation.
overriding procedure Set_Type
(Self : not null access UML_Literal_Boolean_Proxy;
To : AMF.UML.Types.UML_Type_Access);
-- Setter of TypedElement::type.
--
-- The type of the TypedElement.
-- This information is derived from the return result for this Operation.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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 Boolean_Value
(Self : not null access constant UML_Literal_Boolean_Proxy)
return Boolean;
-- Operation LiteralBoolean::booleanValue.
--
-- The query booleanValue() gives the value.
overriding function Is_Computable
(Self : not null access constant UML_Literal_Boolean_Proxy)
return Boolean;
-- Operation LiteralBoolean::isComputable.
--
-- The query isComputable() is redefined to be true.
overriding function Boolean_Value
(Self : not null access constant UML_Literal_Boolean_Proxy)
return AMF.Optional_Boolean;
-- Operation ValueSpecification::booleanValue.
--
-- The query booleanValue() gives a single Boolean value when one can be
-- computed.
overriding function Is_Compatible_With
(Self : not null access constant UML_Literal_Boolean_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean;
-- Operation ValueSpecification::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. In addition,
-- for ValueSpecification, the type must be conformant with the type of
-- the specified parameterable element.
overriding function All_Owning_Packages
(Self : not null access constant UML_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding function Is_Template_Parameter
(Self : not null access constant UML_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Boolean_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_Literal_Booleans;
|
charlie5/lace | Ada | 712 | ads |
-- with i.physics.Object;
-- with i.physics.Joint;
with ada.strings.unbounded;
package physics.Motor is
type Item is abstract tagged
record
Name : ada.strings.unbounded.unbounded_String;
is_Enabled : Boolean := False;
end record;
procedure update (Self : in out Item) is abstract;
-- class Motor
-- {
-- public:
--
-- /// Returns true if this Motor depends on the given Solid.
-- virtual bool internal_dependsOnSolid(Solid* s);
--
-- /// Returns true if this Motor depends on the given Joint.
-- virtual bool internal_dependsOnJoint(Joint* j);
-- }
--
-- #endif
procedure dummy;
end physics.Motor;
|
reznikmm/matreshka | Ada | 3,669 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Elements;
package ODF.DOM.Number_Seconds_Elements is
pragma Preelaborate;
type ODF_Number_Seconds is limited interface
and XML.DOM.Elements.DOM_Element;
type ODF_Number_Seconds_Access is
access all ODF_Number_Seconds'Class
with Storage_Size => 0;
end ODF.DOM.Number_Seconds_Elements;
|
AdaCore/gpr | Ada | 64 | ads |
with Pck2;
package Pck is
Var : constant := 12;
end Pck;
|
swagger-api/swagger-codegen | Ada | 1,107 | adb | with Samples.Petstore.Clients;
with Samples.Petstore.Models;
with Swagger;
with Util.Http.Clients.Curl;
with Ada.Text_IO;
with Ada.Command_Line;
with Ada.Calendar.Formatting;
with Ada.Exceptions;
procedure Samples.Petstore.Client is
use Ada.Text_IO;
procedure Usage;
Server : constant Swagger.UString := Swagger.To_UString ("http://localhost:8080/v2");
Arg_Count : constant Natural := Ada.Command_Line.Argument_Count;
Arg : Positive := 1;
procedure Usage is
begin
Put_Line ("Usage: Petstore {params}...");
end Usage;
begin
if Arg_Count <= 1 then
Usage;
return;
end if;
Util.Http.Clients.Curl.Register;
declare
Command : constant String := Ada.Command_Line.Argument (Arg);
Item : constant String := Ada.Command_Line.Argument (Arg + 1);
C : Samples.Petstore.Clients.Client_Type;
begin
C.Set_Server (Server);
Arg := Arg + 2;
exception
when E : Constraint_Error =>
Put_Line ("Constraint error raised: " & Ada.Exceptions.Exception_Message (E));
end;
end Samples.Petstore.Client;
|
reznikmm/matreshka | Ada | 1,333 | adb | with League.Strings;
with XML.DOM.Attributes;
with XML.DOM.Documents;
with XML.DOM.Elements;
with XML.DOM.Implementations;
with XML.DOM.Nodes;
procedure Demo is
Implementation : XML.DOM.Implementations.DOM_Implementation;
Document : XML.DOM.Documents.DOM_Document
:= Implementation.Create_Document;
Element_1 : XML.DOM.Elements.DOM_Element
:= Document.Create_Element_NS
(League.Strings.Empty_Universal_String,
League.Strings.To_Universal_String ("demo1"));
Element_2 : XML.DOM.Elements.DOM_Element
:= Document.Create_Element_NS
(League.Strings.Empty_Universal_String,
League.Strings.To_Universal_String ("demo2"));
Attribute_1 : XML.DOM.Attributes.DOM_Attribute
:= Document.Create_Attribute_NS
(League.Strings.Empty_Universal_String,
League.Strings.To_Universal_String ("demoAttr"));
Aux_Attribute : XML.DOM.Attributes.DOM_Attribute;
Aux_Node : XML.DOM.Nodes.DOM_Node;
begin
Aux_Attribute := Element_1.Set_Attribute_Node_NS (Attribute_1);
Attribute_1 := XML.DOM.Attributes.Null_DOM_Attribute;
Element_1.Append_Child (Element_2);
Document.Append_Child (Element_1);
null;
Element_1 := XML.DOM.Elements.Null_DOM_Element;
null;
Document := XML.DOM.Documents.Null_DOM_Document;
end Demo;
|
reznikmm/matreshka | Ada | 7,039 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.Utp_Attributes;
with AMF.UML.Read_Structural_Feature_Actions;
with AMF.Visitors.Utp_Iterators;
with AMF.Visitors.Utp_Visitors;
package body AMF.Internals.Utp_Timer_Running_Actions is
---------------------------------------------
-- Get_Base_Read_Structural_Feature_Action --
---------------------------------------------
overriding function Get_Base_Read_Structural_Feature_Action
(Self : not null access constant Utp_Timer_Running_Action_Proxy)
return AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access is
begin
return
AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Attributes.Internal_Get_Base_Read_Structural_Feature_Action
(Self.Element)));
end Get_Base_Read_Structural_Feature_Action;
---------------------------------------------
-- Set_Base_Read_Structural_Feature_Action --
---------------------------------------------
overriding procedure Set_Base_Read_Structural_Feature_Action
(Self : not null access Utp_Timer_Running_Action_Proxy;
To : AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access) is
begin
AMF.Internals.Tables.Utp_Attributes.Internal_Set_Base_Read_Structural_Feature_Action
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Base_Read_Structural_Feature_Action;
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant Utp_Timer_Running_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then
AMF.Visitors.Utp_Visitors.Utp_Visitor'Class
(Visitor).Enter_Timer_Running_Action
(AMF.Utp.Timer_Running_Actions.Utp_Timer_Running_Action_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant Utp_Timer_Running_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then
AMF.Visitors.Utp_Visitors.Utp_Visitor'Class
(Visitor).Leave_Timer_Running_Action
(AMF.Utp.Timer_Running_Actions.Utp_Timer_Running_Action_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant Utp_Timer_Running_Action_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.Utp_Iterators.Utp_Iterator'Class then
AMF.Visitors.Utp_Iterators.Utp_Iterator'Class
(Iterator).Visit_Timer_Running_Action
(Visitor,
AMF.Utp.Timer_Running_Actions.Utp_Timer_Running_Action_Access (Self),
Control);
end if;
end Visit_Element;
end AMF.Internals.Utp_Timer_Running_Actions;
|
persan/AdaYaml | Ada | 816 | adb | -- part of AdaYaml, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
with Interfaces.C;
package body Lexer.Source.C_Handler is
use type Yaml.C.Bool;
procedure Read_Data (S : in out Instance; Buffer : out String;
Length : out Natural) is
begin
if not S.Handler.all (S.Data, Buffer (Buffer'First)'Address,
Buffer'Length, Interfaces.C.size_t (Length)) then
raise Lexer_Error with "Error when reading into buffer";
end if;
end Read_Data;
function As_Source (Data : System.Address; Handler : Yaml.C.Read_Handler)
return Pointer is
(new Instance'(Source.Instance with
Handler => Handler, Data => Data));
end Lexer.Source.C_Handler;
|
coopht/axmpp | Ada | 3,459 | ads | ------------------------------------------------------------------------------
-- --
-- AXMPP Project --
-- --
-- XMPP Library for Ada --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2017, Alexander Basov <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Alexander Basov, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XMPP.Networks;
package XMPP.Idle_Tasks is
-------------------
-- Reader_Task --
-------------------
task type Reader_Task is
entry Start (Network : not null XMPP.Networks.Network_Access);
entry Stop;
end Reader_Task;
end XMPP.Idle_Tasks;
|
tj800x/SPARKNaCl | Ada | 5,824 | adb | package body SPARKNaCl.Stream
with SPARK_Mode => On
is
--------------------------------------------------------
-- Local subprogram declarations
--------------------------------------------------------
procedure Salsa20_Xor_Local
(C : out Byte_Seq;
M : in Byte_Seq;
Xor_M : in Boolean; -- If True then xor M against Stream
-- If False then return Stream unmodified
N : in Salsa20_Nonce; -- Nonce
K : in Salsa20_Key) -- Key
with Global => null,
Pre => M'First = 0 and then
C'First = 0 and then
(if Xor_M then (C'Last = M'Last)) and then
(if not Xor_M then M'Last = 0);
--------------------------------------------------------
-- Local subprogram bodies
--------------------------------------------------------
procedure Salsa20_Xor_Local
(C : out Byte_Seq;
M : in Byte_Seq;
Xor_M : in Boolean; -- If True then xor M against Stream
-- If False then return Stream unmodified
N : in Salsa20_Nonce; -- Nonce
K : in Salsa20_Key) -- Key
is
Full_Block_Count : constant I32 := C'Last / 64;
subtype Offset_Range is I32 range 0 .. (Full_Block_Count * 64);
subtype Natural_64 is I64 range 0 .. I64'Last;
Offset : Offset_Range;
Final_Offset : I32;
Z : Bytes_16;
X : Bytes_64;
U : U32;
B : Natural_64;
begin
B := C'Length;
C := (others => 0);
if B = 0 then
return;
end if;
Offset := 0;
Z := (others => 0);
Z (0 .. 7) := Bytes_8 (N);
if B >= 64 then
loop
pragma Loop_Invariant
((B + I64 (Offset) = C'Length) and then
(I64 (Offset) <= (C'Length - B)) and then
((C'Length - B) <= I64 (C'Last) - 63));
Core.Salsa20 (X, Z, K, Sigma);
for I in Index_64 loop
pragma Loop_Invariant
((Offset + I) in C'Range and
(if Xor_M then (Offset + I) in M'Range));
C (Offset + I) :=
(if Xor_M then M (Offset + I) else 0) xor
X (I);
end loop;
U := 1;
for I in I32 range 8 .. 15 loop
U := U + U32 (Z (I));
Z (I) := Byte (U mod 256);
U := Shift_Right (U, 8);
end loop;
B := B - 64;
-- Exit here to prevent subsequent overflow of Offset + 64
-- on the final iteration
exit when B < 64;
Offset := Offset + 64;
end loop;
if B > 0 then
-- Final block is non-empty but incomplete. It starts
-- at Offset C'Length - B
Final_Offset := I32 (C'Length - B);
else
-- B = 0 so final block is empty, so nothing more to do.
-- Set Final_Offset here to avoid a data-flow error.
Final_Offset := 0;
end if;
else
-- Only a single, incomplete block to process, so it must
-- start at Offset 0
Final_Offset := 0;
end if;
if B > 0 then
Core.Salsa20 (X, Z, K, Sigma);
for I in I32 range 0 .. I32 (B - 1) loop
pragma Loop_Invariant
((Final_Offset + I) in C'Range and
(if Xor_M then (Final_Offset + I) in M'Range));
C (Final_Offset + I) :=
(if Xor_M then
M (Final_Offset + I) else 0) xor
X (I);
end loop;
end if;
pragma Warnings (GNATProve, Off, "statement has no effect");
Sanitize (X);
Sanitize (Z);
pragma Unreferenced (X, Z);
end Salsa20_Xor_Local;
--------------------------------------------------------
-- Exported subprogram bodies
--------------------------------------------------------
procedure Salsa20 (C : out Byte_Seq; -- Output stream
N : in Salsa20_Nonce; -- Nonce
K : in Salsa20_Key) -- Key
is
Null_M : Byte_Seq (0 .. 0);
begin
Null_M := (others => 0);
Salsa20_Xor_Local (C, Null_M, False, N, K);
end Salsa20;
procedure Salsa20_Xor (C : out Byte_Seq; -- Output stream
M : in Byte_Seq; -- Input message
N : in Salsa20_Nonce; -- Nonce
K : in Salsa20_Key) -- Key
is
begin
Salsa20_Xor_Local (C, M, True, N, K);
end Salsa20_Xor;
procedure HSalsa20 (C : out Byte_Seq; -- Output stream
N : in HSalsa20_Nonce; -- Nonce
K : in Salsa20_Key) -- Key
is
S : Bytes_32;
begin
Core.HSalsa20 (S, Bytes_16 (N (0 .. 15)), K, Sigma);
Salsa20 (C, Salsa20_Nonce (N (16 .. 23)), Core.Construct (S));
Sanitize (S);
pragma Unreferenced (S);
end HSalsa20;
procedure HSalsa20_Xor (C : out Byte_Seq; -- Output ciphertext
M : in Byte_Seq; -- Input message
N : in HSalsa20_Nonce; -- Nonce
K : in Salsa20_Key) -- Key
is
S : Bytes_32;
begin
Core.HSalsa20 (S, Bytes_16 (N (0 .. 15)), K, Sigma);
Salsa20_Xor_Local (C => C,
M => M,
Xor_M => True,
N => Salsa20_Nonce (N (16 .. 23)),
K => Core.Construct (S));
Sanitize (S);
pragma Unreferenced (S);
end HSalsa20_Xor;
end SPARKNaCl.Stream;
|
AdaCore/training_material | Ada | 1,328 | ads | with Surfaces; use Surfaces;
with Drawable_Chars; use Drawable_Chars;
package Char_Display_Driver is
subtype Row_Display_T is Row_T range Row_T'First .. 60;
subtype Column_Display_T is Column_T range Column_T'First .. 120;
type Char_Display
(Rows : Row_Display_T := Row_T'First;
Columns : Column_Display_T := Column_T'First)
is record
Lux_Charset : Sorted_Charset_T;
Surf : Surface_T (Row_T'First .. Rows, Column_T'First .. Columns);
end record;
-- A char display is a driver to display characters on the screen,
-- given a sorted Lux_Charset, which will match luminosity values
-- to strings, pixel-by-pixel.
function Make (Surf : Surface_T; Lux_Charset : Sorted_Charset_T)
return Char_Display;
-- Return a driver to draw the given surface with the given charset
procedure Display_Row (CD : Char_Display; Row : Row_T)
with Pre => Row in Row_T'First .. CD.Rows;
-- Draw the given row
procedure Display (CD : Char_Display);
-- Draw the full surface
private
function Get_Row (CD : Char_Display; Row : Row_T) return String;
-- Return the drawn value for the given row, using the charset that
-- has been set up.
-- This function is made available there for testing and/or inheritance.
end Char_Display_Driver;
|
optikos/oasis | Ada | 7,907 | ads | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Defining_Identifiers;
with Program.Elements.Parameter_Specifications;
with Program.Elements.Aspect_Specifications;
with Program.Elements.Procedure_Body_Stubs;
with Program.Element_Visitors;
package Program.Nodes.Procedure_Body_Stubs is
pragma Preelaborate;
type Procedure_Body_Stub is
new Program.Nodes.Node
and Program.Elements.Procedure_Body_Stubs.Procedure_Body_Stub
and Program.Elements.Procedure_Body_Stubs.Procedure_Body_Stub_Text
with private;
function Create
(Not_Token : Program.Lexical_Elements.Lexical_Element_Access;
Overriding_Token : Program.Lexical_Elements.Lexical_Element_Access;
Procedure_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_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 Procedure_Body_Stub;
type Implicit_Procedure_Body_Stub is
new Program.Nodes.Node
and Program.Elements.Procedure_Body_Stubs.Procedure_Body_Stub
with private;
function Create
(Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_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;
Has_Not : Boolean := False;
Has_Overriding : Boolean := False)
return Implicit_Procedure_Body_Stub
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Procedure_Body_Stub is
abstract new Program.Nodes.Node
and Program.Elements.Procedure_Body_Stubs.Procedure_Body_Stub
with record
Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
end record;
procedure Initialize (Self : aliased in out Base_Procedure_Body_Stub'Class);
overriding procedure Visit
(Self : not null access Base_Procedure_Body_Stub;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Name
(Self : Base_Procedure_Body_Stub)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
overriding function Parameters
(Self : Base_Procedure_Body_Stub)
return Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
overriding function Aspects
(Self : Base_Procedure_Body_Stub)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
overriding function Is_Procedure_Body_Stub_Element
(Self : Base_Procedure_Body_Stub)
return Boolean;
overriding function Is_Declaration_Element
(Self : Base_Procedure_Body_Stub)
return Boolean;
type Procedure_Body_Stub is
new Base_Procedure_Body_Stub
and Program.Elements.Procedure_Body_Stubs.Procedure_Body_Stub_Text
with record
Not_Token : Program.Lexical_Elements.Lexical_Element_Access;
Overriding_Token : Program.Lexical_Elements.Lexical_Element_Access;
Procedure_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_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;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
end record;
overriding function To_Procedure_Body_Stub_Text
(Self : aliased in out Procedure_Body_Stub)
return Program.Elements.Procedure_Body_Stubs
.Procedure_Body_Stub_Text_Access;
overriding function Not_Token
(Self : Procedure_Body_Stub)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Overriding_Token
(Self : Procedure_Body_Stub)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Procedure_Token
(Self : Procedure_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Left_Bracket_Token
(Self : Procedure_Body_Stub)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Right_Bracket_Token
(Self : Procedure_Body_Stub)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Is_Token
(Self : Procedure_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Separate_Token
(Self : Procedure_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function With_Token
(Self : Procedure_Body_Stub)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Semicolon_Token
(Self : Procedure_Body_Stub)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Has_Not (Self : Procedure_Body_Stub) return Boolean;
overriding function Has_Overriding
(Self : Procedure_Body_Stub)
return Boolean;
type Implicit_Procedure_Body_Stub is
new Base_Procedure_Body_Stub
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
Has_Not : Boolean;
Has_Overriding : Boolean;
end record;
overriding function To_Procedure_Body_Stub_Text
(Self : aliased in out Implicit_Procedure_Body_Stub)
return Program.Elements.Procedure_Body_Stubs
.Procedure_Body_Stub_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Procedure_Body_Stub)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Procedure_Body_Stub)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Procedure_Body_Stub)
return Boolean;
overriding function Has_Not
(Self : Implicit_Procedure_Body_Stub)
return Boolean;
overriding function Has_Overriding
(Self : Implicit_Procedure_Body_Stub)
return Boolean;
end Program.Nodes.Procedure_Body_Stubs;
|
mitchelhaan/ncurses | Ada | 3,374 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Forms.Field_Types.Alpha --
-- --
-- S P E C --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer <[email protected]> 1996
-- Version Control:
-- $Revision: 1.5 $
-- Binding Version 00.93
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Forms.Field_Types.Alpha is
pragma Preelaborate (Alpha);
type Alpha_Field is new Field_Type
with record
Minimum_Field_Width : Natural := 0;
end record;
procedure Set_Field_Type (Fld : in Field;
Typ : in Alpha_Field);
pragma Inline (Set_Field_Type);
end Terminal_Interface.Curses.Forms.Field_Types.Alpha;
|
albinjal/ada_basic | Ada | 826 | ads |
package Sorted_List is
CANTFIND_ERROR: exception;
type List_Type is private;
function Empty(List: List_Type)
return Boolean;
function Member(List: List_Type; Search: Integer)
return Boolean;
function Find(List: List_Type; Search: Integer)
return Integer;
function Length(List: List_Type)
return Integer;
procedure Insert(List: in out List_Type; Int: in Integer);
procedure Put(List: in List_Type);
procedure Remove(List: in out List_Type; Search: in Integer);
procedure Delete(List: in out List_Type);
procedure Find(List: in List_Type; Search: in Integer; Data: out Integer);
private
type Post;
type List_Type is
access Post;
type Post is
record
Data: Integer;
Point: List_Type;
end record;
end Sorted_List;
|
reznikmm/matreshka | Ada | 3,709 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Form_Echo_Char_Attributes is
pragma Preelaborate;
type ODF_Form_Echo_Char_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Form_Echo_Char_Attribute_Access is
access all ODF_Form_Echo_Char_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Form_Echo_Char_Attributes;
|
burratoo/Acton | Ada | 1,141 | ads | ------------------------------------------------------------------------------------------
-- --
-- ACTON PROCESSOR SUPPORT PACKAGE --
-- ATMEL AT91SAM7S --
-- --
-- GNAT_EXCEPTION --
-- --
-- Copyright (C) 2014-2021, Patrick Bernardi --
-- --
------------------------------------------------------------------------------------------
with System;
package GNAT_Exception with Pure is
procedure Last_Chance_Handler (Msg : System.Address; Line : Integer)
with Export, Convention => C,
External_Name => "__gnat_last_chance_handler";
end GNAT_Exception;
|
reznikmm/matreshka | Ada | 3,905 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.ODF_Attributes.Style.Page_Layout_Name;
package ODF.DOM.Attributes.Style.Page_Layout_Name.Internals is
function Create
(Node : Matreshka.ODF_Attributes.Style.Page_Layout_Name.Style_Page_Layout_Name_Access)
return ODF.DOM.Attributes.Style.Page_Layout_Name.ODF_Style_Page_Layout_Name;
function Wrap
(Node : Matreshka.ODF_Attributes.Style.Page_Layout_Name.Style_Page_Layout_Name_Access)
return ODF.DOM.Attributes.Style.Page_Layout_Name.ODF_Style_Page_Layout_Name;
end ODF.DOM.Attributes.Style.Page_Layout_Name.Internals;
|
jwarwick/aoc_2019_ada | Ada | 280 | adb | -- with Day.Test;
with IntCode.Test;
package body AOC_Test_Suite is
function Suite return Access_Test_Suite is
Ret : constant Access_Test_Suite := new Test_Suite;
begin
Ret.Add_Test (new IntCode.Test.Test);
return Ret;
end Suite;
end AOC_Test_Suite;
|
ohenley/ada-util | Ada | 7,389 | ads | -----------------------------------------------------------------------
-- util-streams-pipes -- Pipe stream to or from a process
-- Copyright (C) 2011, 2013, 2015, 2016, 2017, 2018 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Finalization;
with Util.Processes;
-- == Pipes ==
-- The `Util.Streams.Pipes` package defines a pipe stream to or from a process.
-- It allows to launch an external program while getting the program standard output or
-- providing the program standard input. The `Pipe_Stream` type represents the input or
-- output stream for the external program. This is a portable interface that works on
-- Unix and Windows.
--
-- The process is created and launched by the `Open` operation. The pipe allows
-- to read or write to the process through the `Read` and `Write` operation.
-- It is very close to the *popen* operation provided by the C stdio library.
-- First, create the pipe instance:
--
-- with Util.Streams.Pipes;
-- ...
-- Pipe : aliased Util.Streams.Pipes.Pipe_Stream;
--
-- The pipe instance can be associated with only one process at a time.
-- The process is launched by using the `Open` command and by specifying the command
-- to execute as well as the pipe redirection mode:
--
-- * `READ` to read the process standard output,
-- * `WRITE` to write the process standard input.
--
-- For example to run the `ls -l` command and read its output, we could run it by using:
--
-- Pipe.Open (Command => "ls -l", Mode => Util.Processes.READ);
--
-- The `Pipe_Stream` is not buffered and a buffer can be configured easily by using the
-- `Input_Buffer_Stream` type and connecting the buffer to the pipe so that it reads
-- the pipe to fill the buffer. The initialization of the buffer is the following:
--
-- with Util.Streams.Buffered;
-- ...
-- Buffer : Util.Streams.Buffered.Input_Buffer_Stream;
-- ...
-- Buffer.Initialize (Input => Pipe'Unchecked_Access, Size => 1024);
--
-- And to read the process output, one can use the following:
--
-- Content : Ada.Strings.Unbounded.Unbounded_String;
-- ...
-- Buffer.Read (Into => Content);
--
-- The pipe object should be closed when reading or writing to it is finished.
-- By closing the pipe, the caller will wait for the termination of the process.
-- The process exit status can be obtained by using the `Get_Exit_Status` function.
--
-- Pipe.Close;
-- if Pipe.Get_Exit_Status /= 0 then
-- Ada.Text_IO.Put_Line ("Command exited with status "
-- & Integer'Image (Pipe.Get_Exit_Status));
-- end if;
--
-- You will note that the `Pipe_Stream` is a limited type and thus cannot be copied.
-- When leaving the scope of the `Pipe_Stream` instance, the application will wait for
-- the process to terminate.
--
-- Before opening the pipe, it is possible to have some control on the process that
-- will be created to configure:
--
-- * The shell that will be used to launch the process,
-- * The process working directory,
-- * Redirect the process output to a file,
-- * Redirect the process error to a file,
-- * Redirect the process input from a file.
--
-- All these operations must be made before calling the `Open` procedure.
package Util.Streams.Pipes is
use Util.Processes;
subtype Pipe_Mode is Util.Processes.Pipe_Mode range READ .. READ_WRITE;
-- -----------------------
-- Pipe stream
-- -----------------------
-- The <b>Pipe_Stream</b> is an output/input stream that reads or writes
-- to or from a process.
type Pipe_Stream is limited new Output_Stream and Input_Stream with private;
-- Set the shell executable path to use to launch a command. The default on Unix is
-- the /bin/sh command. Argument splitting is done by the /bin/sh -c command.
-- When setting an empty shell command, the argument splitting is done by the
-- <tt>Spawn</tt> procedure.
procedure Set_Shell (Stream : in out Pipe_Stream;
Shell : in String);
-- Before launching the process, redirect the input stream of the process
-- to the specified file.
-- Raises <b>Invalid_State</b> if the process is running.
procedure Set_Input_Stream (Stream : in out Pipe_Stream;
File : in String);
-- Set the output stream of the process.
-- Raises <b>Invalid_State</b> if the process is running.
procedure Set_Output_Stream (Stream : in out Pipe_Stream;
File : in String;
Append : in Boolean := False);
-- Set the error stream of the process.
-- Raises <b>Invalid_State</b> if the process is running.
procedure Set_Error_Stream (Stream : in out Pipe_Stream;
File : in String;
Append : in Boolean := False);
-- Set the working directory that the process will use once it is created.
-- The directory must exist or the <b>Invalid_Directory</b> exception will be raised.
procedure Set_Working_Directory (Stream : in out Pipe_Stream;
Path : in String);
-- Open a pipe to read or write to an external process. The pipe is created and the
-- command is executed with the input and output streams redirected through the pipe.
procedure Open (Stream : in out Pipe_Stream;
Command : in String;
Mode : in Pipe_Mode := READ);
-- Close the pipe and wait for the external process to terminate.
overriding
procedure Close (Stream : in out Pipe_Stream);
-- Get the process exit status.
function Get_Exit_Status (Stream : in Pipe_Stream) return Integer;
-- Returns True if the process is running.
function Is_Running (Stream : in Pipe_Stream) return Boolean;
-- Write the buffer array to the output stream.
overriding
procedure Write (Stream : in out Pipe_Stream;
Buffer : in Ada.Streams.Stream_Element_Array);
-- Read into the buffer as many bytes as possible and return in
-- <b>last</b> the position of the last byte read.
overriding
procedure Read (Stream : in out Pipe_Stream;
Into : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset);
private
use Ada.Streams;
type Pipe_Stream is limited new Ada.Finalization.Limited_Controlled
and Output_Stream and Input_Stream with record
Proc : Util.Processes.Process;
end record;
-- Flush the stream and release the buffer.
overriding
procedure Finalize (Object : in out Pipe_Stream);
end Util.Streams.Pipes;
|
stcarrez/dynamo | Ada | 1,345 | adb | -- part of ParserTools, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
package body Text.Builder is
procedure Init (Object : in out Reference; Pool : Text.Pool.Reference;
Initial_Size : Positive := 255) is
begin
null;
end Init;
function Create (Pool : Text.Pool.Reference;
Initial_Size : Positive := 255) return Reference is
begin
return Ret : Reference do
Init (Ret, Pool, Initial_Size);
end return;
end Create;
function Initialized (Object : Reference) return Boolean is
(True);
procedure Append (Object : in out Reference; Value : String) is
begin
Ada.Strings.Unbounded.Append (Object.Buffer, Value);
end Append;
procedure Append (Object : in out Reference; Value : Character) is
begin
Ada.Strings.Unbounded.Append (Object.Buffer, Value);
end Append;
procedure Append (Object : in out Reference; Value : Text.Reference) is
begin
Ada.Strings.Unbounded.Append (Object.Buffer, Value);
end Append;
function Lock (Object : in out Reference) return Text.Reference is
begin
return Object.Buffer;
end Lock;
function Length (Object : Reference) return Natural is
(Ada.Strings.Unbounded.Length (Object.Buffer));
end Text.Builder;
|
reznikmm/matreshka | Ada | 3,684 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Elements;
package ODF.DOM.Text_Variable_Get_Elements is
pragma Preelaborate;
type ODF_Text_Variable_Get is limited interface
and XML.DOM.Elements.DOM_Element;
type ODF_Text_Variable_Get_Access is
access all ODF_Text_Variable_Get'Class
with Storage_Size => 0;
end ODF.DOM.Text_Variable_Get_Elements;
|
reznikmm/matreshka | Ada | 3,654 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements.Generic_Hash;
function AMF.OCL.Association_Class_Call_Exps.Hash is
new AMF.Elements.Generic_Hash (OCL_Association_Class_Call_Exp, OCL_Association_Class_Call_Exp_Access);
|
Heziode/lsystem-editor | Ada | 1,531 | ads | -------------------------------------------------------------------------------
-- LSE -- L-System Editor
-- Author: Heziode
--
-- License:
-- MIT License
--
-- Copyright (c) 2018 Quentin Dauprat (Heziode) <[email protected]>
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software"),
-- to deal in the Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Software, and to permit persons to whom the
-- Software is furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-- DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------------------
-- @description
-- This package encompass all presenter.
--
package LSE.Presenter is
pragma Pure;
end LSE.Presenter;
|
AdaCore/gpr | Ada | 48 | ads | package Pack2 is
procedure Dummy;
end Pack2;
|
tum-ei-rcs/StratoX | Ada | 3,151 | adb | ------------------------------------------------------------------------------
-- --
-- SPARK LIBRARY COMPONENTS --
-- --
-- S P A R K . M O D _ A R I T H M E T I C _ L E M M A S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- SPARK 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. SPARK 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/>. --
-- --
------------------------------------------------------------------------------
package body SPARK.Mod_Arithmetic_Lemmas
with SPARK_Mode => Off -- TEST_ON
is
procedure Lemma_Div_Is_Monotonic
(Val1 : Uint;
Val2 : Uint;
Denom : Pos)
is null;
procedure Lemma_Div_Then_Mult_Bounds
(Arg1 : Uint;
Arg2 : Pos;
Res : Uint)
is null;
procedure Lemma_Mult_Is_Monotonic
(Val1 : Uint;
Val2 : Uint;
Factor : Uint)
is null;
procedure Lemma_Mult_Is_Strictly_Monotonic
(Val1 : Uint;
Val2 : Uint;
Factor : Pos)
is null;
procedure Lemma_Mult_Protect
(Arg1 : Uint;
Arg2 : Uint;
Upper_Bound : Uint)
is null;
procedure Lemma_Mult_Scale
(Val : Uint;
Scale_Num : Uint;
Scale_Denom : Pos;
Res : Uint)
is null;
procedure Lemma_Mult_Then_Div_Is_Ident
(Arg1 : Uint;
Arg2 : Pos)
is null;
procedure Lemma_Mult_Then_Mod_Is_Zero
(Arg1 : Uint;
Arg2 : Pos)
is null;
end SPARK.Mod_Arithmetic_Lemmas;
|
reznikmm/matreshka | Ada | 4,932 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UML.Parameters.Collections is
pragma Preelaborate;
package UML_Parameter_Collections is
new AMF.Generic_Collections
(UML_Parameter,
UML_Parameter_Access);
type Set_Of_UML_Parameter is
new UML_Parameter_Collections.Set with null record;
Empty_Set_Of_UML_Parameter : constant Set_Of_UML_Parameter;
type Ordered_Set_Of_UML_Parameter is
new UML_Parameter_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Parameter : constant Ordered_Set_Of_UML_Parameter;
type Bag_Of_UML_Parameter is
new UML_Parameter_Collections.Bag with null record;
Empty_Bag_Of_UML_Parameter : constant Bag_Of_UML_Parameter;
type Sequence_Of_UML_Parameter is
new UML_Parameter_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Parameter : constant Sequence_Of_UML_Parameter;
private
Empty_Set_Of_UML_Parameter : constant Set_Of_UML_Parameter
:= (UML_Parameter_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Parameter : constant Ordered_Set_Of_UML_Parameter
:= (UML_Parameter_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Parameter : constant Bag_Of_UML_Parameter
:= (UML_Parameter_Collections.Bag with null record);
Empty_Sequence_Of_UML_Parameter : constant Sequence_Of_UML_Parameter
:= (UML_Parameter_Collections.Sequence with null record);
end AMF.UML.Parameters.Collections;
|
francesco-bongiovanni/ewok-kernel | Ada | 3,303 | adb | --
-- Copyright 2018 The wookey project team <[email protected]>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with ewok.perm; use ewok.perm;
with ewok.tasks; use ewok.tasks;
with ewok.tasks_shared; use ewok.tasks_shared;
with ewok.exported.ticks; use ewok.exported.ticks;
with ewok.sanitize;
with debug;
with soc.dwt;
package body ewok.syscalls.gettick
with spark_mode => off
is
procedure sys_gettick
(caller_id : in ewok.tasks_shared.t_task_id;
params : in out t_parameters;
mode : in ewok.tasks_shared.t_task_mode)
is
value : unsigned_64
with address => to_address (params(0));
precision : ewok.exported.ticks.t_precision
with address => params(1)'address;
begin
--
-- Verifying parameters
--
if not ewok.sanitize.is_range_in_data_slot
(to_system_address (value'address), 8, caller_id, mode)
then
debug.log (debug.WARNING, "[task" & ewok.tasks_shared.t_task_id'image (caller_id)
& "] sys_gettick: value ("
& system_address'image (to_system_address (value'address))
& ") is not in caller space");
goto ret_inval;
end if;
if not precision'valid then
goto ret_inval;
end if;
-- Verifying permisions
case precision is
when PRECISION_MILLI_SEC =>
if not ewok.perm.ressource_is_granted
(PERM_RES_TIM_GETMILLI, caller_id)
then
goto ret_denied;
end if;
soc.dwt.get_milliseconds (value);
when PRECISION_MICRO_SEC =>
if not ewok.perm.ressource_is_granted
(PERM_RES_TIM_GETMICRO, caller_id)
then
goto ret_denied;
end if;
soc.dwt.get_microseconds (value);
when PRECISION_CYCLE =>
if not ewok.perm.ressource_is_granted
(PERM_RES_TIM_GETCYCLE, caller_id)
then
goto ret_denied;
end if;
soc.dwt.get_cycles (value);
end case;
set_return_value (caller_id, mode, SYS_E_DONE);
ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_inval>>
set_return_value (caller_id, mode, SYS_E_INVAL);
ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_denied>>
set_return_value (caller_id, mode, SYS_E_DENIED);
ewok.tasks.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
end sys_gettick;
end ewok.syscalls.gettick;
|
AdaCore/gpr | Ada | 103 | adb | with Ada_Pkg1;
with Ada_Pkg2;
procedure Main is
begin
Ada_Pkg1.Method1 (Ada_Pkg2.Name1);
end Main;
|
micahwelf/FLTK-Ada | Ada | 525 | ads |
package FLTK.Images.Pixmaps.GIF is
type GIF_Image is new Pixmap with private;
type GIF_Image_Reference (Data : not null access GIF_Image'Class) is
limited null record with Implicit_Dereference => Data;
package Forge is
function Create
(Filename : in String)
return GIF_Image;
end Forge;
private
type GIF_Image is new Pixmap with null record;
overriding procedure Finalize
(This : in out GIF_Image);
end FLTK.Images.Pixmaps.GIF;
|
reznikmm/matreshka | Ada | 4,309 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Nodes;
with XML.DOM.Attributes.Internals;
package body ODF.DOM.Attributes.Style.Country_Complex.Internals is
------------
-- Create --
------------
function Create
(Node : Matreshka.ODF_Attributes.Style.Country_Complex.Style_Country_Complex_Access)
return ODF.DOM.Attributes.Style.Country_Complex.ODF_Style_Country_Complex is
begin
return
(XML.DOM.Attributes.Internals.Create
(Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record);
end Create;
----------
-- Wrap --
----------
function Wrap
(Node : Matreshka.ODF_Attributes.Style.Country_Complex.Style_Country_Complex_Access)
return ODF.DOM.Attributes.Style.Country_Complex.ODF_Style_Country_Complex is
begin
return
(XML.DOM.Attributes.Internals.Wrap
(Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record);
end Wrap;
end ODF.DOM.Attributes.Style.Country_Complex.Internals;
|
reznikmm/matreshka | Ada | 4,582 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
private with League.Strings;
private with XML.SAX.Attributes;
private with Web_Services.SOAP.Payloads.Decoders;
package Test_248_Decoders is
private
type Test_248_Decoder is
limited new Web_Services.SOAP.Payloads.Decoders.SOAP_Payload_Decoder
with null record;
overriding procedure Characters
(Self : in out Test_248_Decoder;
Text : League.Strings.Universal_String;
Success : in out Boolean);
overriding function Create
(URI : not null access League.Strings.Universal_String)
return Test_248_Decoder;
overriding procedure End_Element
(Self : in out Test_248_Decoder;
Namespace_URI : League.Strings.Universal_String;
Local_Name : League.Strings.Universal_String;
Success : in out Boolean);
overriding function Payload
(Self : Test_248_Decoder)
return not null Web_Services.SOAP.Payloads.SOAP_Payload_Access;
overriding procedure Start_Element
(Self : in out Test_248_Decoder;
Namespace_URI : League.Strings.Universal_String;
Local_Name : League.Strings.Universal_String;
Attributes : XML.SAX.Attributes.SAX_Attributes;
Success : in out Boolean);
end Test_248_Decoders;
|
AdaCore/libadalang | Ada | 26,943 | adb | ------------------------------------------------------------------------------
-- G P S --
-- --
-- Copyright (C) 2017-2018, AdaCore --
-- --
-- This 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. This software is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
-- TABILITY 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 software; see file --
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
-- of the license. --
------------------------------------------------------------------------------
with Basic_Types; use Basic_Types;
with GNATCOLL.VFS;
with LAL.Core_Module;
with Langkit_Support.Slocs;
with Language;
with Libadalang.Analysis;
package body LAL.Highlighters is
procedure Remove_Style
(Buffer : GPS.Editors.Editor_Buffer'Class;
Line : Positive;
Start : Visible_Column_Type;
Stop : Visible_Column_Type);
-- Remove any highlight related styles from text span in the Buffer
function To_Style (E : Libadalang.Lexer.Token_Kind) return String;
-- Get the name of a style name from a language token
type Node_Kind_Array is array (Positive range <>) of
Libadalang.Analysis.Ada_Node_Kind_Type;
Dotted_Name_Or_Attribute : constant Node_Kind_Array :=
(Libadalang.Analysis.Ada_Dotted_Name,
Libadalang.Analysis.Ada_Attribute_Ref);
function Get_Toppest_Node
(Node : Libadalang.Analysis.Ada_Node;
Kinds : Node_Kind_Array)
return Libadalang.Analysis.Ada_Node;
-- Find a node of given kind enclosing given Node, which in its turn isn't
-- enclosed by another node of this kind.
function The_Toppest_Dotted_Name
(Node : Libadalang.Analysis.Ada_Node)
return Libadalang.Analysis.Ada_Node is
(Get_Toppest_Node (Node, (1 => Libadalang.Analysis.Ada_Dotted_Name)));
-- Find a Dotted_Name enclosing given Node, which in its turn isn't
-- enclosed by another Dotted_Name
function Kind_Of
(Node : Libadalang.Analysis.Ada_Node;
Value : Libadalang.Analysis.Ada_Node_Kind_Type) return Boolean is
(Node.Kind in Value);
-- Check if given node has given kind
generic
type Node_Type is new Libadalang.Analysis.Ada_Node with private;
-- Type of enclosing node, e.g. Accept_Stmt
type Id_Type is new Libadalang.Analysis.Ada_Node with private;
-- Type of the field in the enclosing node, e.g. Identifier or Name
with function To_Node
(Node : Libadalang.Analysis.Ada_Node'Class) return Node_Type;
-- Cast from Ada_Node to Node_Type, e.g. As_Accept_Stmt
with function Field (Node : Node_Type'Class) return Id_Type;
-- Field getter function, e.g. F_Name
-- Node kind range for given Node_Type, e.g. Ada_Accept_Stmt_Range'Range
From : Libadalang.Analysis.Ada_Node_Kind_Type;
To : Libadalang.Analysis.Ada_Node_Kind_Type;
function Generic_Match_Field
(Node : Libadalang.Analysis.Ada_Node) return Boolean;
-- Check if Node is stored in given Field of its parent.
-------------------------
-- Generic_Match_Field --
-------------------------
function Generic_Match_Field
(Node : Libadalang.Analysis.Ada_Node) return Boolean
is
use type Libadalang.Analysis.Ada_Node;
Parent : constant Libadalang.Analysis.Ada_Node := Node.Parent;
begin
if Parent.Kind in From .. To then
declare
Value : constant Id_Type := Field (To_Node (Parent));
begin
return Libadalang.Analysis.As_Ada_Node (Value) = Node;
end;
else
return False;
end if;
end Generic_Match_Field;
function Base_Type_Decl_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Base_Type_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Base_Type_Decl,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Base_Type_Decl'First,
To => Libadalang.Analysis.Ada_Base_Type_Decl'Last);
function Single_Protected_Decl_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Single_Protected_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Single_Protected_Decl,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Single_Protected_Decl,
To => Libadalang.Analysis.Ada_Single_Protected_Decl);
function Accept_Stmt_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Accept_Stmt,
Id_Type => Libadalang.Analysis.Identifier,
To_Node => Libadalang.Analysis.As_Accept_Stmt,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Accept_Stmt_Range'First,
To => Libadalang.Analysis.Ada_Accept_Stmt_Range'Last);
function Label_Decl_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Label_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Label_Decl,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Label_Decl,
To => Libadalang.Analysis.Ada_Label_Decl);
function Named_Stmt_Decl_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Named_Stmt_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Named_Stmt_Decl,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Named_Stmt_Decl,
To => Libadalang.Analysis.Ada_Named_Stmt_Decl);
function Generic_Package_Instantiation_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Generic_Package_Instantiation,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Generic_Package_Instantiation,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Generic_Package_Instantiation,
To => Libadalang.Analysis.Ada_Generic_Package_Instantiation);
function Generic_Subp_Renaming_Decl_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Generic_Subp_Renaming_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Generic_Subp_Renaming_Decl,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Generic_Subp_Renaming_Decl,
To => Libadalang.Analysis.Ada_Generic_Subp_Renaming_Decl);
function Package_Body_Stub_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Package_Body_Stub,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Package_Body_Stub,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Package_Body_Stub,
To => Libadalang.Analysis.Ada_Package_Body_Stub);
function Package_Renaming_Decl_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Package_Renaming_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Package_Renaming_Decl,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Package_Renaming_Decl,
To => Libadalang.Analysis.Ada_Package_Renaming_Decl);
function Protected_Body_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Protected_Body,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Protected_Body,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Protected_Body,
To => Libadalang.Analysis.Ada_Protected_Body);
function Protected_Body_Stub_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Protected_Body_Stub,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Protected_Body_Stub,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Protected_Body_Stub,
To => Libadalang.Analysis.Ada_Protected_Body_Stub);
function Subunit_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Subunit,
Id_Type => Libadalang.Analysis.Name,
To_Node => Libadalang.Analysis.As_Subunit,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Subunit,
To => Libadalang.Analysis.Ada_Subunit);
function Task_Body_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Task_Body,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Task_Body,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Task_Body,
To => Libadalang.Analysis.Ada_Task_Body);
function Task_Body_Stub_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Task_Body_Stub,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Task_Body_Stub,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Task_Body_Stub,
To => Libadalang.Analysis.Ada_Task_Body_Stub);
function Generic_Package_Renaming_Decl_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Generic_Package_Renaming_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Generic_Package_Renaming_Decl,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Generic_Package_Renaming_Decl,
To => Libadalang.Analysis.Ada_Generic_Package_Renaming_Decl);
function Entry_Body_Entry_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Entry_Body,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Entry_Body,
Field => Libadalang.Analysis.F_Entry_Name,
From => Libadalang.Analysis.Ada_Entry_Body,
To => Libadalang.Analysis.Ada_Entry_Body);
function Entry_Spec_Entry_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Entry_Spec,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Entry_Spec,
Field => Libadalang.Analysis.F_Entry_Name,
From => Libadalang.Analysis.Ada_Entry_Spec,
To => Libadalang.Analysis.Ada_Entry_Spec);
function Base_Package_Decl_Package_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Base_Package_Decl,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Base_Package_Decl,
Field => Libadalang.Analysis.F_Package_Name,
From => Libadalang.Analysis.Ada_Base_Package_Decl'First,
To => Libadalang.Analysis.Ada_Base_Package_Decl'Last);
function Subp_Spec_Subp_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Subp_Spec,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Subp_Spec,
Field => Libadalang.Analysis.F_Subp_Name,
From => Libadalang.Analysis.Ada_Subp_Spec,
To => Libadalang.Analysis.Ada_Subp_Spec);
function Generic_Subp_Instantiation_Subp_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Generic_Subp_Instantiation,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Generic_Subp_Instantiation,
Field => Libadalang.Analysis.F_Subp_Name,
From => Libadalang.Analysis.Ada_Generic_Subp_Instantiation,
To => Libadalang.Analysis.Ada_Generic_Subp_Instantiation);
function Package_Body_Package_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Package_Body,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Package_Body,
Field => Libadalang.Analysis.F_Package_Name,
From => Libadalang.Analysis.Ada_Package_Body,
To => Libadalang.Analysis.Ada_Package_Body);
function Exception_Handler_Exception_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Exception_Handler,
Id_Type => Libadalang.Analysis.Defining_Name,
To_Node => Libadalang.Analysis.As_Exception_Handler,
Field => Libadalang.Analysis.F_Exception_Name,
From => Libadalang.Analysis.Ada_Exception_Handler,
To => Libadalang.Analysis.Ada_Exception_Handler);
function Subtype_Indication_Name is new Generic_Match_Field
(Node_Type => Libadalang.Analysis.Subtype_Indication,
Id_Type => Libadalang.Analysis.Name,
To_Node => Libadalang.Analysis.As_Subtype_Indication,
Field => Libadalang.Analysis.F_Name,
From => Libadalang.Analysis.Ada_Subtype_Indication,
To => Libadalang.Analysis.Ada_Subtype_Indication);
type Check_List is array (Positive range <>) of access
function (Node : Libadalang.Analysis.Ada_Node) return Boolean;
function Check
(List : Check_List;
Node : Libadalang.Analysis.Ada_Node) return Boolean is
(for some Item of List => Item (Node));
-- Find if there is at least one item in the List that matches Node
-- List of places in LAL tree where a dotted_name should be highlithed
-- with 'block' style
Dotted_Name_List : constant Check_List :=
(1 => Subunit_Name'Access);
-- List of places in LAL tree where a defining_name should be highlithed
-- with 'block' style
Defining_Name_List : constant Check_List :=
(Base_Type_Decl_Name'Access,
Single_Protected_Decl_Name'Access,
Label_Decl_Name'Access,
Named_Stmt_Decl_Name'Access,
Entry_Body_Entry_Name'Access,
Entry_Spec_Entry_Name'Access,
Exception_Handler_Exception_Name'Access,
Task_Body_Name'Access,
Task_Body_Stub_Name'Access,
Generic_Package_Renaming_Decl_Name'Access,
Generic_Package_Instantiation_Name'Access,
Generic_Subp_Renaming_Decl_Name'Access,
Package_Body_Stub_Name'Access,
Package_Renaming_Decl_Name'Access,
Protected_Body_Name'Access,
Protected_Body_Stub_Name'Access,
Base_Package_Decl_Package_Name'Access,
Subp_Spec_Subp_Name'Access,
Generic_Subp_Instantiation_Subp_Name'Access,
Package_Body_Package_Name'Access
);
-- List of places in LAL tree where an identifier should be highlithed
-- with 'block' style
Id_List : constant Check_List := Dotted_Name_List &
(1 => Accept_Stmt_Name'Access);
-- List of places in LAL tree where an identifier, dotted_name or
-- attribute_ref should be highlithed with 'type' style
Type_Expr_List : constant Check_List :=
(1 => Subtype_Indication_Name'Access);
--------------
-- To_Style --
--------------
function To_Style (E : Libadalang.Lexer.Token_Kind) return String is
use Libadalang.Lexer;
begin
case E is
when Ada_Termination |
Ada_Lexing_Failure |
Ada_Identifier =>
return "";
when
Ada_Abort |
Ada_Abs |
Ada_Abstract |
Ada_Accept |
Ada_Access |
Ada_Aliased |
Ada_All |
Ada_And |
Ada_Array |
Ada_At |
Ada_Begin |
Ada_Body |
Ada_Case |
Ada_Constant |
Ada_Declare |
Ada_Delay |
Ada_Delta |
Ada_Digits |
Ada_Do |
Ada_Else |
Ada_Elsif |
Ada_End |
Ada_Entry |
Ada_Exception |
Ada_Exit |
Ada_For |
Ada_Function |
Ada_Generic |
Ada_Goto |
Ada_If |
Ada_In |
Ada_Is |
Ada_Limited |
Ada_Loop |
Ada_Mod |
Ada_New |
Ada_Not |
Ada_Null |
Ada_Of |
Ada_Or |
Ada_Others |
Ada_Out |
Ada_Package |
Ada_Pragma |
Ada_Private |
Ada_Procedure |
Ada_Raise |
Ada_Range |
Ada_Record |
Ada_Rem |
Ada_Renames |
Ada_Requeue |
Ada_Return |
Ada_Reverse |
Ada_Select |
Ada_Separate |
Ada_Some |
Ada_Subtype |
Ada_Tagged |
Ada_Task |
Ada_Terminate |
Ada_Then |
Ada_Type |
Ada_Until |
Ada_Use |
Ada_When |
Ada_While |
Ada_With |
Ada_Xor =>
return "keyword";
when
Ada_Amp |
Ada_Arrow |
Ada_Assign |
Ada_Colon |
Ada_Comma |
Ada_Diamond |
Ada_Divide |
Ada_Dot |
Ada_Doubledot |
Ada_Equal |
Ada_Gt |
Ada_Gte |
Ada_Label_End |
Ada_Label_Start |
Ada_Lt |
Ada_Lte |
Ada_Minus |
Ada_Mult |
Ada_Notequal |
Ada_Par_Close |
Ada_Par_Open |
Ada_Pipe |
Ada_Plus |
Ada_Power |
Ada_Semicolon |
Ada_Tick |
Ada_Target =>
return "";
when Ada_String =>
return "string";
when Ada_Char =>
return "character";
when Ada_Decimal |
Ada_Integer =>
return "number";
when Ada_Comment =>
return "comment";
when Ada_Prep_Line =>
return "";
-- Other Standout_Language_Entity styles:
-- "block";
-- "type";
-- "annotated_keyword";
-- "annotated_comment";
-- "aspect_keyword";
-- "aspect_comment";
-- "aspect";
end case;
end To_Style;
----------------------
-- Get_Toppest_Node --
----------------------
function Get_Toppest_Node
(Node : Libadalang.Analysis.Ada_Node;
Kinds : Node_Kind_Array)
return Libadalang.Analysis.Ada_Node
is
use type Libadalang.Analysis.Ada_Node_Kind_Type;
Next : Libadalang.Analysis.Ada_Node := Node;
begin
loop
declare
Parent : constant Libadalang.Analysis.Ada_Node := Next.Parent;
Kind : constant Libadalang.Analysis.Ada_Node_Kind_Type :=
Parent.Kind;
begin
if not (for some Item of Kinds => Kind = Item) then
return Next;
else
Next := Parent;
end if;
end;
end loop;
end Get_Toppest_Node;
--------------------
-- Highlight_Fast --
--------------------
not overriding procedure Highlight_Fast
(Self : in out Highlighter;
Buffer : GPS.Editors.Editor_Buffer'Class;
From : Integer;
To : Integer)
is
use Libadalang.Lexer.Token_Data_Handlers;
First : constant GPS.Editors.Editor_Location'Class :=
Buffer.New_Location_At_Line (From);
Last : constant GPS.Editors.Editor_Location'Class :=
Buffer.New_Location_At_Line (To).End_Of_Line;
Index : Libadalang.Lexer.Token_Data_Handlers.Token_Or_Trivia_Index;
Text : constant String := Buffer.Get_Chars (First, Last);
begin
Libadalang.Lexer.Lex_From_Buffer
(Buffer => Text,
Charset => "utf-8",
Read_BOM => False,
TDH => Self.TDH,
Diagnostics => Self.Diags,
With_Trivia => True);
Index := First_Token_Or_Trivia (Self.TDH);
while Index /= No_Token_Or_Trivia_Index loop
declare
Token : constant Libadalang.Lexer.Token_Data_Type :=
Data (Index, Self.TDH);
Style : constant String := To_Style (Token.Kind);
Line : constant Positive :=
From + Natural (Token.Sloc_Range.Start_Line) - 1;
Start : constant Visible_Column_Type :=
Visible_Column_Type (Token.Sloc_Range.Start_Column);
Stop : constant Visible_Column_Type :=
Visible_Column_Type (Token.Sloc_Range.End_Column);
begin
if Style = "" then
Remove_Style (Buffer, Line, Start, Stop);
else
Buffer.Apply_Style (Style, Line, Start, Stop);
end if;
end;
Index := Next (Index, Self.TDH);
end loop;
Self.Diags.Clear;
end Highlight_Fast;
--------------------------
-- Highlight_Using_Tree --
--------------------------
not overriding procedure Highlight_Using_Tree
(Self : in out Highlighter;
Buffer : GPS.Editors.Editor_Buffer'Class;
From : Integer;
To : Integer)
is
use Libadalang.Analysis;
use Langkit_Support.Slocs;
package L renames Libadalang.Lexer;
From_Line : constant Line_Number := Line_Number (From);
File : constant GNATCOLL.VFS.Virtual_File := Buffer.File;
Unit : constant Analysis_Unit := Get_From_File
(Context => Self.Module.Context,
Filename => File.Display_Full_Name);
Root : constant Ada_Node := Libadalang.Analysis.Root (Unit);
Index : Token_Type := Lookup_Token (Unit, (From_Line, 1));
begin
while Index /= No_Token loop
declare
Token : constant Token_Data_Type := Data (Index);
Style : constant String := To_Style (Kind (Token));
Loc : constant Source_Location_Range := Sloc_Range (Token);
Line : constant Positive := Positive (Loc.Start_Line);
Start : constant Visible_Column_Type :=
Visible_Column_Type (Loc.Start_Column);
Stop : constant Visible_Column_Type :=
Visible_Column_Type (Loc.End_Column);
begin
exit when Line > To;
if Style /= "" then
Buffer.Apply_Style (Style, Line, Start, Stop);
elsif Kind (Token) in L.Ada_Identifier then
declare
Node : constant Ada_Node := Root.Lookup
((Loc.Start_Line, Loc.Start_Column));
TDN : constant Ada_Node :=
The_Toppest_Dotted_Name (Node);
begin
-- Check if identifier itself should be highlighted
if Check (Id_List, Node)
or else
-- check if identifier is part of such dotted_name
(Kind_Of (TDN, Libadalang.Analysis.Ada_Dotted_Name)
and then Check (Dotted_Name_List, TDN))
or else
-- check if identifier is part of such defining_name
(Kind_Of (TDN.Parent,
Libadalang.Analysis.Ada_Defining_Name)
and then Check (Defining_Name_List, TDN.Parent))
or else
-- check if identifier is part of any end_name
Kind_Of (TDN.Parent,
Libadalang.Analysis.Ada_End_Name)
then
Buffer.Apply_Style ("block", Line, Start, Stop);
-- Check if identifier is type name
elsif Check
(Type_Expr_List,
Get_Toppest_Node (Node, Dotted_Name_Or_Attribute))
then
Buffer.Apply_Style ("type", Line, Start, Stop);
else
Remove_Style (Buffer, Line, Start, Stop);
end if;
end;
elsif Kind (Token) in L.Ada_Dot then -- Highlight '.'
declare
Node : constant Ada_Node := Root.Lookup
((Loc.Start_Line, Loc.Start_Column));
begin
-- Check if dot is part of dotted_name should be highlighted
if Check (Dotted_Name_List,
The_Toppest_Dotted_Name (Node))
then
Buffer.Apply_Style ("block", Line, Start, Stop);
elsif Check
(Type_Expr_List,
Get_Toppest_Node (Node, Dotted_Name_Or_Attribute))
then
Buffer.Apply_Style ("type", Line, Start, Stop);
else
Remove_Style (Buffer, Line, Start, Stop);
end if;
end;
else
Remove_Style (Buffer, Line, Start, Stop);
end if;
Index := Next (Index);
end;
end loop;
end Highlight_Using_Tree;
----------------
-- Initialize --
----------------
procedure Initialize
(Self : in out Highlighter'Class;
Module : LAL.Core_Module.LAL_Module_Id) is
begin
Self.Module := Module.all'Access;
end Initialize;
------------------
-- Remove_Style --
------------------
procedure Remove_Style
(Buffer : GPS.Editors.Editor_Buffer'Class;
Line : Positive;
Start : Visible_Column_Type;
Stop : Visible_Column_Type) is
begin
Buffer.Remove_Style ("keyword", Line, Start, Stop);
Buffer.Remove_Style ("string", Line, Start, Stop);
Buffer.Remove_Style ("character", Line, Start, Stop);
Buffer.Remove_Style ("number", Line, Start, Stop);
Buffer.Remove_Style ("comment", Line, Start, Stop);
Buffer.Remove_Style ("block", Line, Start, Stop);
Buffer.Remove_Style ("type", Line, Start, Stop);
end Remove_Style;
end LAL.Highlighters;
|
reznikmm/matreshka | Ada | 4,704 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Table.Automatic_Find_Labels_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Table_Automatic_Find_Labels_Attribute_Node is
begin
return Self : Table_Automatic_Find_Labels_Attribute_Node do
Matreshka.ODF_Table.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Table_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Table_Automatic_Find_Labels_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Automatic_Find_Labels_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Table_URI,
Matreshka.ODF_String_Constants.Automatic_Find_Labels_Attribute,
Table_Automatic_Find_Labels_Attribute_Node'Tag);
end Matreshka.ODF_Table.Automatic_Find_Labels_Attributes;
|
HackInvent/Ada_Drivers_Library | Ada | 1,696 | ads | -- This package was generated by Todo
package ADL_Config is
Vendor : constant String := "STMicro"; -- From board definition
Max_Mount_Points : constant := 2; -- From default value
Max_Mount_Name_Length : constant := 128; -- From default value
Runtime_Profile : constant String := "ravenscar-sfp"; -- From command line
Device_Name : constant String := "NUCLEO-H743ZI"; -- From board definition
Device_Family : constant String := "STM32H7"; -- From board definition
Runtime_Name : constant String := "ravenscar-sfp-stm32h743nucleo"; -- From default value
Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition
CPU_Core : constant String := "ARM Cortex-M7F"; -- From mcu definition
Board : constant String := "STM32H743_Nucleo"; -- From command line
Has_ZFP_Runtime : constant String := "False"; -- From board definition
Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition
High_Speed_External_Clock : constant := 25000000; -- From board definition
Max_Path_Length : constant := 1024; -- From default value
Runtime_Name_Suffix : constant String := "stm32h743nucleo"; -- From board definition
Architecture : constant String := "ARM"; -- From board definition
end ADL_Config;
|
sungyeon/drake | Ada | 317 | ads | pragma License (Unrestricted);
-- extended unit
with Ada.Strings.Generic_Bounded.Generic_Functions;
with Ada.Strings.Wide_Wide_Functions;
package Ada.Strings.Bounded_Wide_Wide_Strings.Functions is
new Generic_Functions (Wide_Wide_Functions);
pragma Preelaborate (Ada.Strings.Bounded_Wide_Wide_Strings.Functions);
|
micahwelf/FLTK-Ada | Ada | 11,719 | adb |
with
Ada.Unchecked_Deallocation,
Interfaces.C.Strings,
System;
use type
Interfaces.C.int,
Interfaces.C.Strings.chars_ptr,
System.Address;
package body FLTK.Widgets.Groups.Input_Choices is
procedure input_choice_set_draw_hook
(W, D : in System.Address);
pragma Import (C, input_choice_set_draw_hook, "input_choice_set_draw_hook");
pragma Inline (input_choice_set_draw_hook);
procedure input_choice_set_handle_hook
(W, H : in System.Address);
pragma Import (C, input_choice_set_handle_hook, "input_choice_set_handle_hook");
pragma Inline (input_choice_set_handle_hook);
function new_fl_input_choice
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_input_choice, "new_fl_input_choice");
pragma Inline (new_fl_input_choice);
procedure free_fl_input_choice
(W : in System.Address);
pragma Import (C, free_fl_input_choice, "free_fl_input_choice");
pragma Inline (free_fl_input_choice);
function fl_input_choice_input
(N : in System.Address)
return System.Address;
pragma Import (C, fl_input_choice_input, "fl_input_choice_input");
pragma Inline (fl_input_choice_input);
function fl_input_choice_menubutton
(N : in System.Address)
return System.Address;
pragma Import (C, fl_input_choice_menubutton, "fl_input_choice_menubutton");
pragma Inline (fl_input_choice_menubutton);
procedure fl_input_choice_clear
(N : in System.Address);
pragma Import (C, fl_input_choice_clear, "fl_input_choice_clear");
pragma Inline (fl_input_choice_clear);
function fl_input_choice_changed
(N : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_input_choice_changed, "fl_input_choice_changed");
pragma Inline (fl_input_choice_changed);
procedure fl_input_choice_clear_changed
(N : in System.Address);
pragma Import (C, fl_input_choice_clear_changed, "fl_input_choice_clear_changed");
pragma Inline (fl_input_choice_clear_changed);
procedure fl_input_choice_set_changed
(N : in System.Address);
pragma Import (C, fl_input_choice_set_changed, "fl_input_choice_set_changed");
pragma Inline (fl_input_choice_set_changed);
function fl_input_choice_get_down_box
(N : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_input_choice_get_down_box, "fl_input_choice_get_down_box");
pragma Inline (fl_input_choice_get_down_box);
procedure fl_input_choice_set_down_box
(N : in System.Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_choice_set_down_box, "fl_input_choice_set_down_box");
pragma Inline (fl_input_choice_set_down_box);
function fl_input_choice_get_textcolor
(N : in System.Address)
return Interfaces.C.unsigned;
pragma Import (C, fl_input_choice_get_textcolor, "fl_input_choice_get_textcolor");
pragma Inline (fl_input_choice_get_textcolor);
procedure fl_input_choice_set_textcolor
(N : in System.Address;
T : in Interfaces.C.unsigned);
pragma Import (C, fl_input_choice_set_textcolor, "fl_input_choice_set_textcolor");
pragma Inline (fl_input_choice_set_textcolor);
function fl_input_choice_get_textfont
(N : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_input_choice_get_textfont, "fl_input_choice_get_textfont");
pragma Inline (fl_input_choice_get_textfont);
procedure fl_input_choice_set_textfont
(N : in System.Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_choice_set_textfont, "fl_input_choice_set_textfont");
pragma Inline (fl_input_choice_set_textfont);
function fl_input_choice_get_textsize
(N : in System.Address)
return Interfaces.C.int;
pragma Import (C, fl_input_choice_get_textsize, "fl_input_choice_get_textsize");
pragma Inline (fl_input_choice_get_textsize);
procedure fl_input_choice_set_textsize
(N : in System.Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_choice_set_textsize, "fl_input_choice_set_textsize");
pragma Inline (fl_input_choice_set_textsize);
function fl_input_choice_get_value
(N : in System.Address)
return Interfaces.C.Strings.chars_ptr;
pragma Import (C, fl_input_choice_get_value, "fl_input_choice_get_value");
pragma Inline (fl_input_choice_get_value);
procedure fl_input_choice_set_value
(N : in System.Address;
T : in Interfaces.C.char_array);
pragma Import (C, fl_input_choice_set_value, "fl_input_choice_set_value");
pragma Inline (fl_input_choice_set_value);
procedure fl_input_choice_set_value2
(N : in System.Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_choice_set_value2, "fl_input_choice_set_value2");
pragma Inline (fl_input_choice_set_value2);
procedure fl_input_choice_draw
(W : in System.Address);
pragma Import (C, fl_input_choice_draw, "fl_input_choice_draw");
pragma Inline (fl_input_choice_draw);
function fl_input_choice_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_input_choice_handle, "fl_input_choice_handle");
pragma Inline (fl_input_choice_handle);
procedure Free is new Ada.Unchecked_Deallocation
(INP.Input, Input_Access);
procedure Free is new Ada.Unchecked_Deallocation
(MB.Menu_Button, Menu_Button_Access);
procedure Finalize
(This : in out Input_Choice) is
begin
if This.Void_Ptr /= System.Null_Address and then
This in Input_Choice'Class
then
Group (This).Clear;
free_fl_input_choice (This.Void_Ptr);
Free (This.My_Input);
Free (This.My_Menu_Button);
This.Void_Ptr := System.Null_Address;
end if;
Finalize (Group (This));
end Finalize;
package body Forge is
function Create
(X, Y, W, H : in Integer;
Text : in String)
return Input_Choice is
begin
return This : Input_Choice do
This.Void_Ptr := new_fl_input_choice
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.To_C (Text));
fl_group_end (This.Void_Ptr);
fl_widget_set_user_data
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
input_choice_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
input_choice_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
This.My_Input := new INP.Input;
Wrapper (This.My_Input.all).Void_Ptr :=
fl_input_choice_input (This.Void_Ptr);
Wrapper (This.My_Input.all).Needs_Dealloc := False;
This.My_Menu_Button := new MB.Menu_Button;
Wrapper (This.My_Menu_Button.all).Void_Ptr :=
fl_input_choice_menubutton (This.Void_Ptr);
Wrapper (This.My_Menu_Button.all).Needs_Dealloc := False;
end return;
end Create;
end Forge;
function Input
(This : in out Input_Choice)
return INP.Input_Reference is
begin
return (Data => This.My_Input);
end Input;
function Menu_Button
(This : in out Input_Choice)
return MB.Menu_Button_Reference is
begin
return (Data => This.My_Menu_Button);
end Menu_Button;
procedure Clear
(This : in out Input_Choice) is
begin
fl_input_choice_clear (This.Void_Ptr);
end Clear;
function Has_Changed
(This : in Input_Choice)
return Boolean is
begin
return fl_input_choice_changed (This.Void_Ptr) /= 0;
end Has_Changed;
procedure Clear_Changed
(This : in out Input_Choice) is
begin
fl_input_choice_clear_changed (This.Void_Ptr);
end Clear_Changed;
procedure Set_Changed
(This : in out Input_Choice;
To : in Boolean) is
begin
if To then
fl_input_choice_set_changed (This.Void_Ptr);
end if;
end Set_Changed;
function Get_Down_Box
(This : in Input_Choice)
return Box_Kind is
begin
return Box_Kind'Val (fl_input_choice_get_down_box (This.Void_Ptr));
end Get_Down_Box;
procedure Set_Down_Box
(This : in out Input_Choice;
To : in Box_Kind) is
begin
fl_input_choice_set_down_box (This.Void_Ptr, Box_Kind'Pos (To));
end Set_Down_Box;
function Get_Text_Color
(This : in Input_Choice)
return Color is
begin
return Color (fl_input_choice_get_textcolor (This.Void_Ptr));
end Get_Text_Color;
procedure Set_Text_Color
(This : in out Input_Choice;
To : in Color) is
begin
fl_input_choice_set_textcolor (This.Void_Ptr, Interfaces.C.unsigned (To));
end Set_Text_Color;
function Get_Text_Font
(This : in Input_Choice)
return Font_Kind is
begin
return Font_Kind'Val (fl_input_choice_get_textfont (This.Void_Ptr));
end Get_Text_Font;
procedure Set_Text_Font
(This : in out Input_Choice;
To : in Font_Kind) is
begin
fl_input_choice_set_textfont (This.Void_Ptr, Font_Kind'Pos (To));
end Set_Text_Font;
function Get_Text_Size
(This : in Input_Choice)
return Font_Size is
begin
return Font_Size (fl_input_choice_get_textsize (This.Void_Ptr));
end Get_Text_Size;
procedure Set_Text_Size
(This : in out Input_Choice;
To : in Font_Size) is
begin
fl_input_choice_set_textsize (This.Void_Ptr, Interfaces.C.int (To));
end Set_Text_Size;
function Get_Input
(This : in Input_Choice)
return String
is
Ptr : Interfaces.C.Strings.chars_ptr := fl_input_choice_get_value (This.Void_Ptr);
begin
if Ptr = Interfaces.C.Strings.Null_Ptr then
return "";
else
-- pointer to internal buffer so no free necessary
return Interfaces.C.Strings.Value (Ptr);
end if;
end Get_Input;
procedure Set_Input
(This : in out Input_Choice;
To : in String) is
begin
fl_input_choice_set_value (This.Void_Ptr, Interfaces.C.To_C (To));
end Set_Input;
procedure Set_Item
(This : in out Input_Choice;
Num : in Integer) is
begin
fl_input_choice_set_value2 (This.Void_Ptr, Interfaces.C.int (Num));
end Set_Item;
procedure Draw
(This : in out Input_Choice) is
begin
fl_input_choice_draw (This.Void_Ptr);
end Draw;
function Handle
(This : in out Input_Choice;
Event : in Event_Kind)
return Event_Outcome is
begin
return Event_Outcome'Val
(fl_input_choice_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
end Handle;
end FLTK.Widgets.Groups.Input_Choices;
|
reznikmm/matreshka | Ada | 3,734 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Draw_Text_Path_Mode_Attributes is
pragma Preelaborate;
type ODF_Draw_Text_Path_Mode_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Draw_Text_Path_Mode_Attribute_Access is
access all ODF_Draw_Text_Path_Mode_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Draw_Text_Path_Mode_Attributes;
|
reznikmm/matreshka | Ada | 3,737 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Interfaces.C;
separate (Matreshka.FastCGI.Streaming_Server)
function FCGI_Listen_Socket return GNAT.Sockets.Socket_Type is
STD_INPUT_HANDLE : constant := -10;
function GetStdHandle
(nStdHandle : Interfaces.C.int) return GNAT.Sockets.Socket_Type;
pragma Import (Stdcall, GetStdHandle, "GetStdHandle");
begin
return GetStdHandle (STD_INPUT_HANDLE);
end FCGI_Listen_Socket;
|
jwarwick/aoc_2020 | Ada | 930 | ads | -- AOC 2020, Day 12
with Ada.Containers.Vectors;
package Day is
type Ferry is private;
Instruction_Exception : exception;
function load_file(filename : in String) return Ferry;
function distance(f : in Ferry) return Natural;
function waypoint_distance(f : in Ferry) return Natural;
private
type Action_Type is (north, south, east, west, left, right, forward);
type Heading_Type is (north, east, south, west);
type Instruction is record
action : Action_Type := north;
value : Integer := 0;
end record;
package Instruction_Vectors is new Ada.Containers.Vectors
(Index_Type => Natural,
Element_Type => Instruction);
use Instruction_Vectors;
type Ferry is record
instructions : Instruction_Vectors.Vector := Empty_Vector;
heading : Heading_Type := east;
x : Integer := 0;
y : Integer := 0;
way_x : Integer := 0;
way_y : Integer := 0;
end record;
end Day;
|
DrenfongWong/tkm-rpc | Ada | 269 | ads | with Tkmrpc.Request;
with Tkmrpc.Response;
package Tkmrpc.Operation_Handlers.Ike.Tkm_Version is
procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type);
-- Handler for the tkm_version operation.
end Tkmrpc.Operation_Handlers.Ike.Tkm_Version;
|
thieryw/snake | Ada | 1,257 | ads | with snake_types,display ;
package snake_functions is
function are_same_coord(point1 : snake_types.Coordinates ; point2 : snake_types.Coordinates) return boolean ;
function create_snake return snake_types.Snake ;
procedure move_snake(s : in out snake_types.Snake ; dir : snake_types.Snake_direction ; fruit_coord : in out snake_types.Coordinates ; time_out : in out integer ; score : in out integer) ;
procedure retreve_user_input(
has_new_user_input: out boolean;
direction: out snake_types.Snake_direction ;
user_controls_value: in snake_types.User_Controls.Map
);
function get_user_controls_default return snake_types.User_Controls.Map ;
procedure update_direction(dir : in out snake_types.Snake_direction ; new_direction : snake_types.Snake_direction) ;
procedure generate_fruit(
s : snake_types.snake ;
fruit : out snake_types.Coordinates ;
time_out : out integer
) ;
procedure render_game(s : snake_types.snake ; fruit : snake_types.Coordinates) ;
procedure is_end_of_game(s : snake_types.snake ; end_game : out boolean) ;
end snake_functions ;
|
tum-ei-rcs/StratoX | Ada | 4,103 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- I N T E R F A C E S . B I T _ T Y P E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 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. --
-- --
-- --
-- --
-- --
-- --
-- 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 Ada_2012;
-- Base types used to describe register fields
package Interfaces.Bit_Types is
pragma No_Elaboration_Code_All;
pragma Pure;
subtype Word is Interfaces.Unsigned_32;
subtype Short is Interfaces.Unsigned_16;
subtype Byte is 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;
end Interfaces.Bit_Types;
|
kontena/ruby-packer | Ada | 4,543 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- Sample.Form_Demo.Handler --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
-- $Revision: 1.14 $
-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Sample.Form_Demo.Aux;
package body Sample.Form_Demo.Handler is
package Aux renames Sample.Form_Demo.Aux;
procedure Drive_Me (F : Form;
Title : String := "")
is
L : Line_Count;
C : Column_Count;
Y : Line_Position;
X : Column_Position;
begin
Aux.Geometry (F, L, C, Y, X);
Drive_Me (F, Y, X, Title);
end Drive_Me;
procedure Drive_Me (F : Form;
Lin : Line_Position;
Col : Column_Position;
Title : String := "")
is
Pan : Panel := Aux.Create (F, Title, Lin, Col);
V : Cursor_Visibility := Normal;
Handle_CRLF : Boolean := True;
begin
Set_Cursor_Visibility (V);
if Aux.Count_Active (F) = 1 then
Handle_CRLF := False;
end if;
loop
declare
K : constant Key_Code := Aux.Get_Request (F, Pan, Handle_CRLF);
R : Driver_Result;
begin
if (K = 13 or else K = 10) and then not Handle_CRLF then
R := Unknown_Request;
else
R := Driver (F, K);
end if;
case R is
when Form_Ok => null;
when Unknown_Request =>
if My_Driver (F, K, Pan) then
exit;
end if;
when others => Beep;
end case;
end;
end loop;
Set_Cursor_Visibility (V);
Aux.Destroy (F, Pan);
end Drive_Me;
end Sample.Form_Demo.Handler;
|
zhmu/ananas | Ada | 10,807 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . S C A L A R _ V A L U E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2003-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- 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.Unchecked_Conversion;
package body System.Scalar_Values is
use Interfaces;
----------------
-- Initialize --
----------------
procedure Initialize (Mode1 : Character; Mode2 : Character) is
C1 : Character := Mode1;
C2 : Character := Mode2;
procedure Get_Env_Value_Ptr (Name, Length, Ptr : Address);
pragma Import (C, Get_Env_Value_Ptr, "__gnat_getenv");
subtype String2 is String (1 .. 2);
type String2_Ptr is access all String2;
Env_Value_Ptr : aliased String2_Ptr;
Env_Value_Length : aliased Integer;
EV_Val : aliased constant String :=
"GNAT_INIT_SCALARS" & ASCII.NUL;
B : Byte1;
EFloat : constant Boolean := Long_Long_Float'Size > Long_Float'Size;
-- Set True if we are on an x86 with 96-bit floats for extended
type ByteLF is array (0 .. 7) of Byte1;
for ByteLF'Component_Size use 8;
function To_ByteLF is new Ada.Unchecked_Conversion (Byte8, ByteLF);
type ByteLLF is array (0 .. 7 + 4 * Boolean'Pos (EFloat)) of Byte1;
for ByteLLF'Component_Size use 8;
-- Type used to initialize Long_Long_Float values used on x86 and
-- any other target with the same 80-bit floating-point values that
-- GCC always stores in 96-bits. Note that we are assuming Intel
-- format little-endian addressing for this type. On non-Intel
-- architectures, this is the same length as Byte8 and holds
-- a Long_Float value.
-- The following variables are used to initialize the float values
-- by overlay. We can't assign directly to the float values, since
-- we may be assigning signalling Nan's that will cause a trap if
-- loaded into a floating-point register.
IV_Isf : aliased Byte4; -- Initialize short float
IV_Ifl : aliased Byte4; -- Initialize float
IV_Ilf : aliased ByteLF; -- Initialize long float
IV_Ill : aliased ByteLLF; -- Initialize long long float
for IV_Isf'Address use IS_Isf'Address;
for IV_Ifl'Address use IS_Ifl'Address;
for IV_Ilf'Address use IS_Ilf'Address;
for IV_Ill'Address use IS_Ill'Address;
-- The following pragmas are used to suppress initialization
pragma Import (Ada, IV_Isf);
pragma Import (Ada, IV_Ifl);
pragma Import (Ada, IV_Ilf);
pragma Import (Ada, IV_Ill);
begin
-- Acquire environment variable value if necessary
if C1 = 'E' and then C2 = 'V' then
Get_Env_Value_Ptr
(EV_Val'Address, Env_Value_Length'Address, Env_Value_Ptr'Address);
-- Ignore if length is not 2
if Env_Value_Length /= 2 then
C1 := 'I';
C2 := 'N';
-- Length is 2, see if it is a valid value
else
-- Acquire two characters and fold to upper case
C1 := Env_Value_Ptr (1);
C2 := Env_Value_Ptr (2);
if C1 in 'a' .. 'z' then
C1 := Character'Val (Character'Pos (C1) - 32);
end if;
if C2 in 'a' .. 'z' then
C2 := Character'Val (Character'Pos (C2) - 32);
end if;
-- IN/LO/HI are ok values
if (C1 = 'I' and then C2 = 'N')
or else
(C1 = 'L' and then C2 = 'O')
or else
(C1 = 'H' and then C2 = 'I')
then
null;
-- Try for valid hex digits
elsif (C1 in '0' .. '9' or else C1 in 'A' .. 'Z')
or else
(C2 in '0' .. '9' or else C2 in 'A' .. 'Z')
then
null;
-- Otherwise environment value is bad, ignore and use IN (invalid)
else
C1 := 'I';
C2 := 'N';
end if;
end if;
end if;
-- IN (invalid value)
if C1 = 'I' and then C2 = 'N' then
IS_Is1 := 16#80#;
IS_Is2 := 16#8000#;
IS_Is4 := 16#8000_0000#;
IS_Is8 := 16#8000_0000_0000_0000#;
IS_Is16 := 16#8000_0000_0000_0000_0000_0000_0000_0000#;
IS_Iu1 := 16#FF#;
IS_Iu2 := 16#FFFF#;
IS_Iu4 := 16#FFFF_FFFF#;
IS_Iu8 := 16#FFFF_FFFF_FFFF_FFFF#;
IS_Iu16 := 16#FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF#;
IS_Iz1 := 16#00#;
IS_Iz2 := 16#0000#;
IS_Iz4 := 16#0000_0000#;
IS_Iz8 := 16#0000_0000_0000_0000#;
IS_Iz16 := 16#0000_0000_0000_0000_0000_0000_0000_0000#;
IV_Isf := IS_Iu4;
IV_Ifl := IS_Iu4;
IV_Ilf := To_ByteLF (IS_Iu8);
if EFloat then
IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#C0#, 16#FF#, 16#FF#, 0, 0];
end if;
-- LO (Low values)
elsif C1 = 'L' and then C2 = 'O' then
IS_Is1 := 16#80#;
IS_Is2 := 16#8000#;
IS_Is4 := 16#8000_0000#;
IS_Is8 := 16#8000_0000_0000_0000#;
IS_Is16 := 16#8000_0000_0000_0000_0000_0000_0000_0000#;
IS_Iu1 := 16#00#;
IS_Iu2 := 16#0000#;
IS_Iu4 := 16#0000_0000#;
IS_Iu8 := 16#0000_0000_0000_0000#;
IS_Iu16 := 16#0000_0000_0000_0000_0000_0000_0000_0000#;
IS_Iz1 := 16#00#;
IS_Iz2 := 16#0000#;
IS_Iz4 := 16#0000_0000#;
IS_Iz8 := 16#0000_0000_0000_0000#;
IS_Iz16 := 16#0000_0000_0000_0000_0000_0000_0000_0000#;
IV_Isf := 16#FF80_0000#;
IV_Ifl := 16#FF80_0000#;
IV_Ilf := To_ByteLF (16#FFF0_0000_0000_0000#);
if EFloat then
IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#FF#, 0, 0];
end if;
-- HI (High values)
elsif C1 = 'H' and then C2 = 'I' then
IS_Is1 := 16#7F#;
IS_Is2 := 16#7FFF#;
IS_Is4 := 16#7FFF_FFFF#;
IS_Is8 := 16#7FFF_FFFF_FFFF_FFFF#;
IS_Is16 := 16#7FFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF#;
IS_Iu1 := 16#FF#;
IS_Iu2 := 16#FFFF#;
IS_Iu4 := 16#FFFF_FFFF#;
IS_Iu8 := 16#FFFF_FFFF_FFFF_FFFF#;
IS_Iu16 := 16#FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF#;
IS_Iz1 := 16#FF#;
IS_Iz2 := 16#FFFF#;
IS_Iz4 := 16#FFFF_FFFF#;
IS_Iz8 := 16#FFFF_FFFF_FFFF_FFFF#;
IS_Iz16 := 16#FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF#;
IV_Isf := 16#7F80_0000#;
IV_Ifl := 16#7F80_0000#;
IV_Ilf := To_ByteLF (16#7FF0_0000_0000_0000#);
if EFloat then
IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#7F#, 0, 0];
end if;
-- -Shh (hex byte)
else
-- Convert the two hex digits (we know they are valid here)
B := 16 * (Character'Pos (C1)
- (if C1 in '0' .. '9'
then Character'Pos ('0')
else Character'Pos ('A') - 10))
+ (Character'Pos (C2)
- (if C2 in '0' .. '9'
then Character'Pos ('0')
else Character'Pos ('A') - 10));
-- Initialize data values from the hex value
IS_Is1 := B;
IS_Is2 := 2**8 * Byte2 (IS_Is1) + Byte2 (IS_Is1);
IS_Is4 := 2**16 * Byte4 (IS_Is2) + Byte4 (IS_Is2);
IS_Is8 := 2**32 * Byte8 (IS_Is4) + Byte8 (IS_Is4);
IS_Is16 := 2**64 * Byte16 (IS_Is8) + Byte16 (IS_Is8);
IS_Iu1 := IS_Is1;
IS_Iu2 := IS_Is2;
IS_Iu4 := IS_Is4;
IS_Iu8 := IS_Is8;
IS_Iu16 := IS_Is16;
IS_Iz1 := IS_Is1;
IS_Iz2 := IS_Is2;
IS_Iz4 := IS_Is4;
IS_Iz8 := IS_Is8;
IS_Iz16 := IS_Is16;
IV_Isf := IS_Is4;
IV_Ifl := IS_Is4;
IV_Ilf := To_ByteLF (IS_Is8);
if EFloat then
IV_Ill := [B, B, B, B, B, B, B, B, B, B, B, B];
end if;
end if;
-- If no separate Long_Long_Float, then use Long_Float value as
-- Long_Long_Float initial value.
if not EFloat then
declare
pragma Warnings (Off); -- because sizes don't match
function To_ByteLLF is
new Ada.Unchecked_Conversion (ByteLF, ByteLLF);
pragma Warnings (On);
begin
IV_Ill := To_ByteLLF (IV_Ilf);
end;
end if;
end Initialize;
end System.Scalar_Values;
|
optikos/oasis | Ada | 5,089 | adb | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Qualified_Expressions is
function Create
(Subtype_Mark : not null Program.Elements.Expressions
.Expression_Access;
Apostrophe_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Left_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Operand : not null Program.Elements.Expressions
.Expression_Access;
Right_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Qualified_Expression is
begin
return Result : Qualified_Expression :=
(Subtype_Mark => Subtype_Mark, Apostrophe_Token => Apostrophe_Token,
Left_Bracket_Token => Left_Bracket_Token, Operand => Operand,
Right_Bracket_Token => Right_Bracket_Token, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Subtype_Mark : not null Program.Elements.Expressions
.Expression_Access;
Operand : not null Program.Elements.Expressions
.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Qualified_Expression is
begin
return Result : Implicit_Qualified_Expression :=
(Subtype_Mark => Subtype_Mark, Operand => Operand,
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 Subtype_Mark
(Self : Base_Qualified_Expression)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Subtype_Mark;
end Subtype_Mark;
overriding function Operand
(Self : Base_Qualified_Expression)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Operand;
end Operand;
overriding function Apostrophe_Token
(Self : Qualified_Expression)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Apostrophe_Token;
end Apostrophe_Token;
overriding function Left_Bracket_Token
(Self : Qualified_Expression)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Left_Bracket_Token;
end Left_Bracket_Token;
overriding function Right_Bracket_Token
(Self : Qualified_Expression)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Right_Bracket_Token;
end Right_Bracket_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Qualified_Expression)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Qualified_Expression)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Qualified_Expression)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize
(Self : aliased in out Base_Qualified_Expression'Class) is
begin
Set_Enclosing_Element (Self.Subtype_Mark, Self'Unchecked_Access);
Set_Enclosing_Element (Self.Operand, Self'Unchecked_Access);
null;
end Initialize;
overriding function Is_Qualified_Expression_Element
(Self : Base_Qualified_Expression)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Qualified_Expression_Element;
overriding function Is_Expression_Element
(Self : Base_Qualified_Expression)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Expression_Element;
overriding procedure Visit
(Self : not null access Base_Qualified_Expression;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Qualified_Expression (Self);
end Visit;
overriding function To_Qualified_Expression_Text
(Self : aliased in out Qualified_Expression)
return Program.Elements.Qualified_Expressions
.Qualified_Expression_Text_Access is
begin
return Self'Unchecked_Access;
end To_Qualified_Expression_Text;
overriding function To_Qualified_Expression_Text
(Self : aliased in out Implicit_Qualified_Expression)
return Program.Elements.Qualified_Expressions
.Qualified_Expression_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Qualified_Expression_Text;
end Program.Nodes.Qualified_Expressions;
|
reznikmm/matreshka | Ada | 5,212 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Internals.Utp_Elements;
with AMF.UML.Read_Structural_Feature_Actions;
with AMF.Utp.Get_Timezone_Actions;
with AMF.Visitors;
package AMF.Internals.Utp_Get_Timezone_Actions is
type Utp_Get_Timezone_Action_Proxy is
limited new AMF.Internals.Utp_Elements.Utp_Element_Proxy
and AMF.Utp.Get_Timezone_Actions.Utp_Get_Timezone_Action with null record;
overriding function Get_Base_Read_Structural_Feature_Action
(Self : not null access constant Utp_Get_Timezone_Action_Proxy)
return AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access;
-- Getter of GetTimezoneAction::base_ReadStructuralFeatureAction.
--
overriding procedure Set_Base_Read_Structural_Feature_Action
(Self : not null access Utp_Get_Timezone_Action_Proxy;
To : AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access);
-- Setter of GetTimezoneAction::base_ReadStructuralFeatureAction.
--
overriding procedure Enter_Element
(Self : not null access constant Utp_Get_Timezone_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
overriding procedure Leave_Element
(Self : not null access constant Utp_Get_Timezone_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
overriding procedure Visit_Element
(Self : not null access constant Utp_Get_Timezone_Action_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
end AMF.Internals.Utp_Get_Timezone_Actions;
|
AdaCore/gpr | Ada | 23,035 | adb | --
-- Copyright (C) 2022, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0
--
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Strings;
with GNATCOLL.VFS;
with GPR2.Containers;
with GPR2.Context;
with GPR2.Path_Name;
with GPR2.Project.Tree;
with GPR2_GNATCOLL_Projects;
with GPR2.Project.View;
with Pck1;
pragma Unreferenced (Pck1);
with GNATCOLL.Projects;
with Ada.Strings.Unbounded;
procedure Main is
Tree : GPR2.Project.Tree.Object;
Context : GPR2.Context.Object;
use GPR2;
Project_Tree : GNATCOLL.Projects.Project_Tree;
procedure Print_Messages
(Output_Warnings : Boolean := True;
Output_Information : Boolean := False);
----------
-- Load --
----------
procedure Load (Project_Name : GPR2.Filename_Type;
Subdirs : GPR2.Optional_Name_Type := No_Name;
Language_Runtimes : GPR2.Containers.Lang_Value_Map :=
GPR2.Containers.Lang_Value_Maps.Empty_Map);
procedure Load (Project_Name : GPR2.Filename_Type;
Subdirs : GPR2.Optional_Name_Type := No_Name;
Language_Runtimes : GPR2.Containers.Lang_Value_Map :=
GPR2.Containers.Lang_Value_Maps.Empty_Map)
is
begin
Tree.Unload;
Tree.Load_Autoconf
(Filename => GPR2.Path_Name.Create_File
(GPR2.Project.Ensure_Extension (Project_Name),
GPR2.Path_Name.No_Resolution),
Context => Context,
Subdirs => Subdirs,
Language_Runtimes => Language_Runtimes);
exception
when Project_Error =>
Print_Messages;
end Load;
--------------------
-- Print_Messages --
--------------------
procedure Print_Messages
(Output_Warnings : Boolean := True;
Output_Information : Boolean := False)
is
begin
if Tree.Has_Messages then
GPR2_GNATCOLL_Projects.Output_Messages
(Tree.Log_Messages.all, Output_Warnings, Output_Information);
end if;
end Print_Messages;
------------------------
-- Register_Attribute --
------------------------
procedure Register_Attribute
(Name : String;
Pkg : String;
Is_List : Boolean;
Indexed : Boolean;
Case_Sensitive_Index : Boolean);
procedure Register_Attribute
(Name : String;
Pkg : String;
Is_List : Boolean;
Indexed : Boolean;
Case_Sensitive_Index : Boolean)
is
Status : constant String :=
GPR2_GNATCOLL_Projects.Register_New_Attribute
(Name => (+(GPR2.Optional_Name_Type (Pkg)),
+(GPR2.Optional_Name_Type (Name))),
Is_List => Is_List,
Indexed => Indexed,
Case_Sensitive_Index => Case_Sensitive_Index);
begin
if Status'Length > 0 then
Ada.Text_IO.Put_Line (Status);
end if;
end Register_Attribute;
-------------
-- Strings --
-------------
function Strings (Strings : GNAT.Strings.String_List_Access) return String;
function Strings (Strings : GNAT.Strings.String_List_Access) return String
is
First : Boolean := True;
use GNAT.Strings;
use Ada.Strings.Unbounded;
US : Unbounded_String;
begin
if Strings /= null then
for S of Strings.all loop
if First then
First := False;
else
US := US & ";";
end if;
US := US & S.all;
end loop;
else
US := US & "<null>";
end if;
return To_String (US);
end Strings;
------------------------
-- Test_Actifacts_Dir --
------------------------
procedure Test_Artifacts_Dir;
procedure Test_Artifacts_Dir is
------------------------
-- Test_Actifacts_Dir --
------------------------
procedure Test_Actifacts_Dir
(Prefix : String; View : GPR2.Project.View.Object);
procedure Test_Actifacts_Dir
(Prefix : String; View : GPR2.Project.View.Object)
is
Dir : constant GNATCOLL.VFS.Filesystem_String :=
GPR2_GNATCOLL_Projects.Artifacts_Dir (View).Full_Name;
begin
Ada.Text_IO.Put_Line (Prefix & ":<" & String (Dir) & ">");
end Test_Actifacts_Dir;
begin
Ada.Text_IO.Put_Line ("=== testing Artifacts_Dir ===");
Load ("test.gpr");
Test_Actifacts_Dir ("Undefined", GPR2.Project.View.Undefined);
Test_Actifacts_Dir ("Root", Tree.Root_Project);
Test_Actifacts_Dir ("Abstract",
Tree.View_For ("prj0", GPR2.Context.Root));
Load ("test.gpr", "debug_subdirs");
Test_Actifacts_Dir ("Root", Tree.Root_Project);
end Test_Artifacts_Dir;
--------------------
-- Test_Attribute --
--------------------
procedure Test_Attribute
(View : GPR2.Project.View.Object;
Pack : String := "";
Name : String := "";
Index : String := "";
Use_Extended : Boolean := False);
procedure Test_Attribute
(View : GPR2.Project.View.Object;
Pack : String := "";
Name : String := "";
Index : String := "";
Use_Extended : Boolean := False)
is
Value : constant String :=
GPR2_GNATCOLL_Projects.Attribute_Value
(Project => View,
Name => (+(GPR2.Optional_Name_Type (Pack)),
+(GPR2.Optional_Name_Type (Name))),
Index => Index,
Default => "test default value",
Use_Extended => Use_Extended);
Ref1 : constant String :=
GNATCOLL.Projects.Attribute_Value
(Project => Project_Tree.Root_Project,
Attribute => GNATCOLL.Projects.Build (Pack, Name),
Index => Index,
Default => "test default value",
Use_Extended => Use_Extended);
Values : constant String :=
Strings (GPR2_GNATCOLL_Projects.Attribute_Value
(Project => View,
Name => (+(GPR2.Optional_Name_Type (Pack)),
+(GPR2.Optional_Name_Type (Name))),
Index => Index,
Use_Extended => Use_Extended));
Ref2 : constant String :=
Strings (GNATCOLL.Projects.Attribute_Value
(Project => Project_Tree.Root_Project,
Attribute => GNATCOLL.Projects.Build (Pack, Name),
Index => Index,
Use_Extended => Use_Extended));
------------------
-- Print_Prefix --
------------------
procedure Print_Prefix;
procedure Print_Prefix is
begin
if Pack'Length > 0 then
Ada.Text_IO.Put ("attribute " & Pack & "'");
end if;
Ada.Text_IO.Put (Name);
if Index'Length > 0 then
Ada.Text_IO.Put (" (""" & Index & """)");
end if;
if Use_Extended then
Ada.Text_IO.Put (" (Use_Extended)");
end if;
end Print_Prefix;
begin
if Value /= Ref1 then
Print_Prefix;
Ada.Text_IO.Put_Line
("=<actual:" & Value & ", expected:" & Ref1 & ">");
end if;
if Values /= Ref2 then
Print_Prefix;
Ada.Text_IO.Put_Line
("=(actual:(" & Values & "), expected:(" & Ref2 & "))");
end if;
end Test_Attribute;
procedure Test_Attribute;
procedure Test_Attribute is
-------------------
-- Test_Extended --
-------------------
procedure Test_Extended (Pack : String);
procedure Test_Extended (Pack : String) is
begin
Test_Attribute (View => Tree.Root_Project,
Pack => Pack,
Name => "Switches",
Index => "Ada");
Test_Attribute (View => Tree.Root_Project,
Pack => Pack,
Name => "Switches",
Index => "Ada",
Use_Extended => True);
Test_Attribute (View => Tree.Root_Project,
Pack => Pack,
Name => "Default_Switches",
Index => "Ada");
Test_Attribute (View => Tree.Root_Project,
Pack => Pack,
Name => "Default_Switches",
Index => "Ada",
Use_Extended => True);
end Test_Extended;
begin
Ada.Text_IO.Put_Line ("--- testing Attribute_Value ---");
Load ("files/root.gpr");
declare
use GNATCOLL.VFS;
begin
GNATCOLL.Projects.Load
(Self => Project_Tree,
Root_Project_Path => Create (+"files/root.gpr"));
end;
Test_Attribute (View => GPR2.Project.View.Undefined,
Pack => "",
Name => "Switches",
Index => "Ada");
Test_Attribute (View => GPR2.Project.View.Undefined,
Pack => "Compiler",
Name => "Switches",
Index => "Ada");
Test_Attribute (View => Tree.Root_Project,
Pack => "",
Name => "Object_Dir",
Index => "");
Test_Attribute (View => Tree.Root_Project,
Pack => "",
Name => "Default_Language",
Index => "");
-- Check different kind of attributes (pkg,indexed,single)
Test_Attribute (View => Tree.Root_Project,
Pack => "Install",
Name => "Install_Project",
Index => "");
Test_Attribute (View => Tree.Root_Project,
Pack => "Clean",
Name => "Switches",
Index => "");
Test_Attribute (View => Tree.Root_Project,
Pack => "Ide",
Name => "Compiler_Command",
Index => "Ada");
Test_Attribute (View => Tree.Root_Project,
Pack => "Ide",
Name => "Default_Switches",
Index => "Ada");
Test_Attribute (View => Tree.Root_Project,
Pack => "",
Name => "Excluded_Source_Dirs",
Index => "");
Test_Attribute (View => Tree.Root_Project,
Pack => "",
Name => "Source_List_File",
Index => "");
Test_Attribute (View => Tree.Root_Project,
Pack => "",
Name => "Object_Generated",
Index => "Ada");
Test_Attribute (View => Tree.Root_Project,
Pack => "",
Name => "Roots",
Index => "Ada");
Test_Extended ("Binder");
Test_Extended ("Linker");
Test_Extended ("Metrics");
Test_Extended ("Check");
Test_Extended ("GNATstub");
Test_Extended ("Pretty_Printer");
Test_Extended ("Finder");
Test_Extended ("Cross_Reference");
Test_Extended ("Eliminate");
Test_Extended ("Not Defined Package");
end Test_Attribute;
-----------------
-- Test_Create --
-----------------
procedure Test_Create;
procedure Test_Create is
-----------------
-- Test_Create --
-----------------
procedure Test_Create
(Name : GNATCOLL.VFS.Filesystem_String;
Project : GPR2.Project.View.Object;
Use_Source_Path : Boolean;
Use_Object_Path : Boolean);
procedure Test_Create
(Name : GNATCOLL.VFS.Filesystem_String;
Project : GPR2.Project.View.Object;
Use_Source_Path : Boolean;
Use_Object_Path : Boolean)
is
VF : constant GNATCOLL.VFS.Virtual_File :=
GPR2_GNATCOLL_Projects.Create
(Self => Tree,
Name => Name,
Project => Project,
Use_Source_Path => Use_Source_Path,
Use_Object_Path => Use_Object_Path);
S : constant GNATCOLL.VFS.Filesystem_String := VF.Full_Name;
begin
Put_Line ("<" & String (S) & ">");
end Test_Create;
begin
Ada.Text_IO.Put_Line ("=== testing Create ===");
Tree.Update_Sources (With_Runtime => True);
Test_Create
(Name => GNATCOLL.VFS.Create
(Full_Filename => "files/absolute.path",
Normalize => True).Full_Name,
Project => GPR2.Project.View.Undefined,
Use_Source_Path => False,
Use_Object_Path => False);
Test_Create
(Name => "unexisting.txt",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => True,
Use_Object_Path => True);
Test_Create
(Name => "test.gpr",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => False,
Use_Object_Path => False);
Test_Create
(Name => "prj0.gpr",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => True,
Use_Object_Path => True);
Test_Create
(Name => "test.gpr",
Project => Tree.View_For ("prj1", GPR2.Context.Root),
Use_Source_Path => False,
Use_Object_Path => False);
Test_Create
(Name => "prj0.gpr",
Project => Tree.View_For ("prj1", GPR2.Context.Root),
Use_Source_Path => False,
Use_Object_Path => False);
Test_Create
(Name => "pck1.ads",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => False,
Use_Object_Path => False);
Test_Create
(Name => "pck1.ads",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => True,
Use_Object_Path => False);
Test_Create
(Name => "main.adb",
Project => Tree.View_For ("prj1", GPR2.Context.Root),
Use_Source_Path => True,
Use_Object_Path => False);
Test_Create
(Name => "pck1.ads",
Project => Tree.View_For ("prj1", GPR2.Context.Root),
Use_Source_Path => True,
Use_Object_Path => False);
Test_Create
(Name => "pck1.o",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => True,
Use_Object_Path => True);
Load ("test.gpr");
Test_Create
(Name => "pck1.o",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => False,
Use_Object_Path => False);
Test_Create
(Name => "pck1.o",
Project => GPR2.Project.View.Undefined,
Use_Source_Path => True,
Use_Object_Path => True);
Test_Create
(Name => "main.o",
Project => Tree.View_For ("prj1", GPR2.Context.Root),
Use_Source_Path => False,
Use_Object_Path => True);
Test_Create
(Name => "pck1.o",
Project => Tree.View_For ("prj1", GPR2.Context.Root),
Use_Source_Path => False,
Use_Object_Path => True);
end Test_Create;
-------------------------------
-- Test_File_Path_Conversion --
-------------------------------
procedure Test_File_Path_Conversion;
procedure Test_File_Path_Conversion is
Path : GPR2.Path_Name.Object;
-------------------------------
-- To_GNATCOLL_Projects_Test --
-------------------------------
procedure To_GNATCOLL_Projects_Test (Path : GPR2.Path_Name.Object);
procedure To_GNATCOLL_Projects_Test (Path : GPR2.Path_Name.Object) is
VF : constant GNATCOLL.VFS.Filesystem_String :=
GPR2_GNATCOLL_Projects.To_Filesystem_String
(GPR2_GNATCOLL_Projects.To_Pathname
(GPR2_GNATCOLL_Projects.To_Virtual_File (Path)));
S : constant GNATCOLL.VFS.Filesystem_String :=
GPR2_GNATCOLL_Projects.To_Filesystem_String (Path);
begin
Ada.Text_IO.Put_Line ("<" & String (VF) & ">");
Ada.Text_IO.Put_Line ("<" & String (S) & ">");
end To_GNATCOLL_Projects_Test;
----------------------------
-- To_GPR2_Path_Name_Test --
----------------------------
procedure To_GPR2_Path_Name_Test (VF : GNATCOLL.VFS.Virtual_File);
procedure To_GPR2_Path_Name_Test (VF : GNATCOLL.VFS.Virtual_File) is
Path : constant GPR2.Path_Name.Object :=
GPR2_GNATCOLL_Projects.To_Pathname (VF);
begin
Ada.Text_IO.Put ("<");
if Path.Is_Defined then
if Path.Has_Dir_Name then
Ada.Text_IO.Put
(String (Path.Dir_Name) & String (Path.Simple_Name));
else
Ada.Text_IO.Put (String (Path.Simple_Name));
end if;
else
Ada.Text_IO.Put ("undefined");
end if;
Ada.Text_IO.Put_Line (">");
end To_GPR2_Path_Name_Test;
----------------------------
-- To_GPR2_Path_Name_Test --
----------------------------
procedure To_GPR2_Path_Name_Test (S : GNATCOLL.VFS.Filesystem_String);
procedure To_GPR2_Path_Name_Test (S : GNATCOLL.VFS.Filesystem_String) is
Path : constant GPR2.Path_Name.Object :=
GPR2_GNATCOLL_Projects.To_Pathname (S);
begin
Ada.Text_IO.Put ("<");
if Path.Is_Defined then
if Path.Has_Dir_Name then
Ada.Text_IO.Put
(String (Path.Dir_Name) & String (Path.Simple_Name));
else
Ada.Text_IO.Put (String (Path.Simple_Name));
end if;
else
Ada.Text_IO.Put ("undefined");
end if;
Ada.Text_IO.Put_Line (">");
end To_GPR2_Path_Name_Test;
begin
Ada.Text_IO.Put_Line ("=== testing GNATCOLL.VFS conversion ===");
To_GNATCOLL_Projects_Test (Path);
Path := GPR2.Path_Name.Create_File ("gpr2.path.no.res",
GPR2.Path_Name.No_Resolution);
To_GNATCOLL_Projects_Test (Path);
Path := GPR2.Path_Name.Create_File ("gpr2.path");
To_GNATCOLL_Projects_Test (Path);
Ada.Text_IO.Put_Line ("=== testing GPR2.Path_Name conversion ===");
To_GPR2_Path_Name_Test ("");
To_GPR2_Path_Name_Test (GNATCOLL.VFS.Create (""));
To_GPR2_Path_Name_Test ("gpr2.path.no.res");
To_GPR2_Path_Name_Test (GNATCOLL.VFS.Create ("gpr2.path.no.res"));
To_GPR2_Path_Name_Test (GNATCOLL.VFS.Filesystem_String (Path.Value));
To_GPR2_Path_Name_Test
(GNATCOLL.VFS.Create (GNATCOLL.VFS.Filesystem_String (Path.Value)));
end Test_File_Path_Conversion;
---------------
-- Test_Name --
---------------
procedure Test_Name;
procedure Test_Name is
begin
Ada.Text_IO.Put_Line ("=== testing Name ===");
Ada.Text_IO.Put_Line
("<" & GPR2_GNATCOLL_Projects.Name (GPR2.Project.View.Undefined) &
">");
Ada.Text_IO.Put_Line
("<" & GPR2_GNATCOLL_Projects.Name
(Tree.View_For ("prj0", GPR2.Context.Root)) & ">");
end Test_Name;
---------------------
-- Test_Object_Dir --
---------------------
procedure Test_Object_Dir;
procedure Test_Object_Dir is
---------------------
-- Test_Object_Dir --
---------------------
procedure Test_Object_Dir (View : GPR2.Project.View.Object);
procedure Test_Object_Dir (View : GPR2.Project.View.Object) is
VF : constant GNATCOLL.VFS.Virtual_File :=
GPR2_GNATCOLL_Projects.Object_Dir (View);
FSS : constant GNATCOLL.VFS.Filesystem_String := VF.Full_Name;
begin
Ada.Text_IO.Put_Line ("<" & String (FSS) & ">");
end Test_Object_Dir;
begin
Ada.Text_IO.Put_Line ("=== testing Object_Dir ===");
Test_Object_Dir (GPR2.Project.View.Undefined);
Test_Object_Dir (Tree.Root_Project);
Load (Project_Name => "files/prj2.gpr",
Subdirs => "subdirs1");
Test_Object_Dir (Tree.View_For ("prj1", GPR2.Context.Root));
end Test_Object_Dir;
------------------
-- Test_Runtime --
------------------
procedure Test_Runtime;
procedure Test_Runtime is
Language_Runtimes : GPR2.Containers.Lang_Value_Map :=
GPR2.Containers.Lang_Value_Maps.Empty_Map;
begin
Ada.Text_IO.Put_Line ("=== testing Get_Runtime ===");
Ada.Text_IO.Put_Line
("<" & GPR2_GNATCOLL_Projects.Get_Runtime (Tree.Root_Project) & ">");
Language_Runtimes.Insert (+GPR2.Optional_Name_Type'("ada"),
GPR2.Value_Type'("zfp"));
Load (Project_Name => "test.gpr",
Language_Runtimes => Language_Runtimes);
Ada.Text_IO.Put_Line
("<" & GPR2_GNATCOLL_Projects.Get_Runtime
(Tree.View_For ("prj0", GPR2.Context.Root)) & ">");
end Test_Runtime;
-----------------
-- Test_Target --
-----------------
procedure Test_Target;
procedure Test_Target is
begin
Ada.Text_IO.Put_Line ("=== testing Get_Target ===");
Ada.Text_IO.Put_Line
("<" & GPR2_GNATCOLL_Projects.Get_Target (Tree) & ">");
Load ("files/prj2.gpr");
Ada.Text_IO.Put_Line
("<" & GPR2_GNATCOLL_Projects.Get_Target (Tree) & ">");
end Test_Target;
begin
Test_File_Path_Conversion;
Ada.Text_IO.Put_Line ("=== testing Register_New_Attribute ===");
Register_Attribute ("GCP1", "", False, False, False);
Register_Attribute ("GCPL", "GCP0", True, False, False);
Register_Attribute ("GCPI", "GCP0", False, True, False);
Register_Attribute ("GCPCSI", "GCP0", False, True, True);
Register_Attribute ("Source_Dirs", "", False, False, False);
Load ("files/prj2.gpr");
Test_Name;
Test_Runtime;
Test_Create;
Test_Target;
Test_Object_Dir;
Test_Artifacts_Dir;
Test_Attribute;
end Main;
|
reznikmm/matreshka | Ada | 4,120 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2009, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package body League.Strings.Cursors is
use type Matreshka.Internals.Locales.Locale_Data_Access;
--------------
-- Finalize --
--------------
overriding procedure Finalize (Self : in out Abstract_Tailored_Cursor) is
begin
if Self.Locale /= null then
Matreshka.Internals.Locales.Dereference (Self.Locale);
end if;
Abstract_Cursor (Self).Finalize;
end Finalize;
----------------
-- Set_Locale --
----------------
procedure Set_Locale (Self : in out Abstract_Tailored_Cursor'Class) is
begin
if Self.Locale /= null then
Matreshka.Internals.Locales.Dereference (Self.Locale);
end if;
Self.Locale := Matreshka.Internals.Locales.Get_Locale;
end Set_Locale;
end League.Strings.Cursors;
|
kontena/ruby-packer | Ada | 5,197 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Forms.Field_Types.Enumeration --
-- --
-- S P E C --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C.Strings;
package Terminal_Interface.Curses.Forms.Field_Types.Enumeration is
pragma Preelaborate
(Terminal_Interface.Curses.Forms.Field_Types.Enumeration);
type String_Access is access String;
-- Type_Set is used by the child package Ada
type Type_Set is (Lower_Case, Upper_Case, Mixed_Case);
type Enum_Array is array (Positive range <>)
of String_Access;
type Enumeration_Info (C : Positive) is
record
Names : Enum_Array (1 .. C);
Case_Sensitive : Boolean := False;
Match_Must_Be_Unique : Boolean := False;
end record;
type Enumeration_Field is new Field_Type with private;
function Create (Info : Enumeration_Info;
Auto_Release_Names : Boolean := False)
return Enumeration_Field;
-- Make an fieldtype from the info. Enumerations are special, because
-- they normally don't copy the enum values into a private store, so
-- we have to care for the lifetime of the info we provide.
-- The Auto_Release_Names flag may be used to automatically releases
-- the strings in the Names array of the Enumeration_Info.
function Make_Enumeration_Type (Info : Enumeration_Info;
Auto_Release_Names : Boolean := False)
return Enumeration_Field renames Create;
procedure Release (Enum : in out Enumeration_Field);
-- But we may want to release the field to release the memory allocated
-- by it internally. After that the Enumeration field is no longer usable.
-- The next type defintions are all ncurses extensions. They are typically
-- not available in other curses implementations.
procedure Set_Field_Type (Fld : Field;
Typ : Enumeration_Field);
pragma Inline (Set_Field_Type);
private
type CPA_Access is access Interfaces.C.Strings.chars_ptr_array;
type Enumeration_Field is new Field_Type with
record
Case_Sensitive : Boolean := False;
Match_Must_Be_Unique : Boolean := False;
Arr : CPA_Access := null;
end record;
end Terminal_Interface.Curses.Forms.Field_Types.Enumeration;
|
reznikmm/matreshka | Ada | 4,621 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Fo.Letter_Spacing_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Fo_Letter_Spacing_Attribute_Node is
begin
return Self : Fo_Letter_Spacing_Attribute_Node do
Matreshka.ODF_Fo.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Fo_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Fo_Letter_Spacing_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Letter_Spacing_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Fo_URI,
Matreshka.ODF_String_Constants.Letter_Spacing_Attribute,
Fo_Letter_Spacing_Attribute_Node'Tag);
end Matreshka.ODF_Fo.Letter_Spacing_Attributes;
|
stcarrez/ada-servlet | Ada | 1,495 | ads | -----------------------------------------------------------------------
-- servlet-server -- Servlet Server for AWS
-- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2019, 2020, 2022 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package Servlet.Server.EWS is
type EWS_Container is new Container with private;
-- Start the applications that have been registered.
overriding
procedure Start (Server : in out EWS_Container);
overriding
procedure Configure (Server : in out EWS_Container;
Config : in Configuration);
private
type EWS_Container_Access is access all EWS_Container'Class;
overriding
procedure Initialize (Instance : in out EWS_Container);
type EWS_Container is new Container with record
Conf : Configuration;
end record;
end Servlet.Server.EWS;
|
pdaxrom/Kino2 | Ada | 3,475 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- Status --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998 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: Laurent Pautet <[email protected]>
-- Modified by: Juergen Pfeifer, 1997
-- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en
-- Version Control
-- $Revision: 1.6 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- This package has been contributed by Laurent Pautet <[email protected]> --
-- --
package body Status is
protected body Process is
procedure Stop is
begin
Done := True;
end Stop;
function Continue return Boolean is
begin
return not Done;
end Continue;
end Process;
end Status;
|
skill-lang/adaCommon | Ada | 2,198 | ads | -- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ skills vector container implementation --
-- |___/_|\_\_|_|____| by: Dennis Przytarski, Timm Felden --
-- --
pragma Ada_2012;
with Ada.Containers.Hashed_Sets;
with Ada.Finalization;
with Ada.Unchecked_Conversion;
with Skill.Types;
with Ada.Containers;
-- sets used by skill; those are basically ada hashed sets with template aware boxing
generic
type T is private;
with function Hash (Element : T) return Ada.Containers.Hash_Type is <>;
with function Equals (Left, Right : T) return Boolean is <>;
with function "=" (Left, Right : T) return Boolean is <>;
package Skill.Containers.Sets is
pragma Warnings (Off);
use Skill.Types;
function Cast is new Ada.Unchecked_Conversion (Box, T);
function Cast is new Ada.Unchecked_Conversion (T, Box);
package HS is new Ada.Containers.Hashed_Sets (T, Hash, Equals, "=");
type Iterator_T is new Set_Iterator_T with record
Cursor : Hs.Cursor;
end record;
function Has_Next (This : access Iterator_T) return Boolean is
(Hs.Has_Element(This.Cursor));
function Next (This : access Iterator_T) return Skill.Types.Box;
procedure Free (This : access Iterator_T);
type Set_T is new Boxed_Set_T with record
This : HS.Set;
end record;
type Ref is access Set_T;
procedure Add (This : access Set_T; V : Skill.Types.Box);
function Contains
(This : access Set_T;
V : Skill.Types.Box) return Boolean is
(This.This.Contains (Cast (V)));
function Length
(This : access Set_T) return Natural is
(Natural (This.This.Length));
overriding
function Iterator (This : access Set_T) return Set_Iterator is
(new Iterator_T'(Cursor => This.This.First));
-- create a new container
function Make return Ref;
-- turn a box into a container of right type
function Unboxed is new Ada.Unchecked_Conversion (Box, Ref);
end Skill.Containers.Sets;
|
zhmu/ananas | Ada | 15,333 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ADA.CONTAINERS.INDEFINITE_MULTIWAY_TREES --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2022, 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/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
private with Ada.Strings.Text_Buffers;
generic
type Element_Type (<>) is private;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Multiway_Trees with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
type Tree is tagged private
with Constant_Indexing => Constant_Reference,
Variable_Indexing => Reference,
Default_Iterator => Iterate,
Iterator_Element => Element_Type;
pragma Preelaborable_Initialization (Tree);
type Cursor is private;
pragma Preelaborable_Initialization (Cursor);
Empty_Tree : constant Tree;
No_Element : constant Cursor;
function Has_Element (Position : Cursor) return Boolean;
package Tree_Iterator_Interfaces is new
Ada.Iterator_Interfaces (Cursor, Has_Element);
function Equal_Subtree
(Left_Position : Cursor;
Right_Position : Cursor) return Boolean;
function "=" (Left, Right : Tree) return Boolean;
function Is_Empty (Container : Tree) return Boolean;
function Node_Count (Container : Tree) return Count_Type;
function Subtree_Node_Count (Position : Cursor) return Count_Type;
function Depth (Position : Cursor) return Count_Type;
function Is_Root (Position : Cursor) return Boolean;
function Is_Leaf (Position : Cursor) return Boolean;
function Root (Container : Tree) return Cursor;
procedure Clear (Container : in out Tree);
function Element (Position : Cursor) return Element_Type;
procedure Replace_Element
(Container : in out Tree;
Position : Cursor;
New_Item : Element_Type);
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type));
procedure Update_Element
(Container : in out Tree;
Position : Cursor;
Process : not null access procedure (Element : in out Element_Type));
type Constant_Reference_Type
(Element : not null access constant Element_Type) is private
with Implicit_Dereference => Element;
type Reference_Type
(Element : not null access Element_Type) is private
with Implicit_Dereference => Element;
function Constant_Reference
(Container : aliased Tree;
Position : Cursor) return Constant_Reference_Type;
pragma Inline (Constant_Reference);
function Reference
(Container : aliased in out Tree;
Position : Cursor) return Reference_Type;
pragma Inline (Reference);
procedure Assign (Target : in out Tree; Source : Tree);
function Copy (Source : Tree) return Tree;
procedure Move (Target : in out Tree; Source : in out Tree);
procedure Delete_Leaf
(Container : in out Tree;
Position : in out Cursor);
procedure Delete_Subtree
(Container : in out Tree;
Position : in out Cursor);
procedure Swap
(Container : in out Tree;
I, J : Cursor);
function Find
(Container : Tree;
Item : Element_Type) return Cursor;
-- This version of the AI:
-- 10-06-02 AI05-0136-1/07
-- declares Find_In_Subtree this way:
--
-- function Find_In_Subtree
-- (Container : Tree;
-- Item : Element_Type;
-- Position : Cursor) return Cursor;
--
-- It seems that the Container parameter is there by mistake, but we need
-- an official ruling from the ARG. ???
function Find_In_Subtree
(Position : Cursor;
Item : Element_Type) return Cursor;
-- This version of the AI:
-- 10-06-02 AI05-0136-1/07
-- declares Ancestor_Find this way:
--
-- function Ancestor_Find
-- (Container : Tree;
-- Item : Element_Type;
-- Position : Cursor) return Cursor;
--
-- It seems that the Container parameter is there by mistake, but we need
-- an official ruling from the ARG. ???
function Ancestor_Find
(Position : Cursor;
Item : Element_Type) return Cursor;
function Contains
(Container : Tree;
Item : Element_Type) return Boolean;
procedure Iterate
(Container : Tree;
Process : not null access procedure (Position : Cursor));
procedure Iterate_Subtree
(Position : Cursor;
Process : not null access procedure (Position : Cursor));
function Iterate (Container : Tree)
return Tree_Iterator_Interfaces.Forward_Iterator'Class;
function Iterate_Subtree (Position : Cursor)
return Tree_Iterator_Interfaces.Forward_Iterator'Class;
function Iterate_Children
(Container : Tree;
Parent : Cursor)
return Tree_Iterator_Interfaces.Reversible_Iterator'Class;
function Child_Count (Parent : Cursor) return Count_Type;
function Child_Depth (Parent, Child : Cursor) return Count_Type;
procedure Insert_Child
(Container : in out Tree;
Parent : Cursor;
Before : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1);
procedure Insert_Child
(Container : in out Tree;
Parent : Cursor;
Before : Cursor;
New_Item : Element_Type;
Position : out Cursor;
Count : Count_Type := 1);
procedure Prepend_Child
(Container : in out Tree;
Parent : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1);
procedure Append_Child
(Container : in out Tree;
Parent : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1);
procedure Delete_Children
(Container : in out Tree;
Parent : Cursor);
procedure Copy_Subtree
(Target : in out Tree;
Parent : Cursor;
Before : Cursor;
Source : Cursor);
procedure Splice_Subtree
(Target : in out Tree;
Parent : Cursor;
Before : Cursor;
Source : in out Tree;
Position : in out Cursor);
procedure Splice_Subtree
(Container : in out Tree;
Parent : Cursor;
Before : Cursor;
Position : Cursor);
procedure Splice_Children
(Target : in out Tree;
Target_Parent : Cursor;
Before : Cursor;
Source : in out Tree;
Source_Parent : Cursor);
procedure Splice_Children
(Container : in out Tree;
Target_Parent : Cursor;
Before : Cursor;
Source_Parent : Cursor);
function Parent (Position : Cursor) return Cursor;
function First_Child (Parent : Cursor) return Cursor;
function First_Child_Element (Parent : Cursor) return Element_Type;
function Last_Child (Parent : Cursor) return Cursor;
function Last_Child_Element (Parent : Cursor) return Element_Type;
function Next_Sibling (Position : Cursor) return Cursor;
function Previous_Sibling (Position : Cursor) return Cursor;
procedure Next_Sibling (Position : in out Cursor);
procedure Previous_Sibling (Position : in out Cursor);
-- This version of the AI:
-- 10-06-02 AI05-0136-1/07
-- declares Iterate_Children this way:
--
-- procedure Iterate_Children
-- (Container : Tree;
-- Parent : Cursor;
-- Process : not null access procedure (Position : Cursor));
--
-- It seems that the Container parameter is there by mistake, but we need
-- an official ruling from the ARG. ???
procedure Iterate_Children
(Parent : Cursor;
Process : not null access procedure (Position : Cursor));
procedure Reverse_Iterate_Children
(Parent : Cursor;
Process : not null access procedure (Position : Cursor));
private
use Ada.Containers.Helpers;
package Implementation is new Generic_Implementation;
use Implementation;
type Tree_Node_Type;
type Tree_Node_Access is access all Tree_Node_Type;
type Children_Type is record
First : Tree_Node_Access;
Last : Tree_Node_Access;
end record;
type Element_Access is access all Element_Type;
type Tree_Node_Type is record
Parent : Tree_Node_Access;
Prev : Tree_Node_Access;
Next : Tree_Node_Access;
Children : Children_Type;
Element : Element_Access;
end record;
use Ada.Finalization;
-- The Count component of type Tree represents the number of nodes that
-- have been (dynamically) allocated. It does not include the root node
-- itself. As implementors, we decide to cache this value, so that the
-- selector function Node_Count can execute in O(1) time, in order to be
-- consistent with the behavior of the Length selector function for other
-- standard container library units. This does mean, however, that the
-- two-container forms for Splice_XXX (that move subtrees across tree
-- containers) will execute in O(n) time, because we must count the number
-- of nodes in the subtree(s) that get moved. (We resolve the tension
-- between Node_Count and Splice_XXX in favor of Node_Count, under the
-- assumption that Node_Count is the more common operation).
type Tree is new Controlled with record
Root : aliased Tree_Node_Type;
TC : aliased Tamper_Counts;
Count : Count_Type := 0;
end record with Put_Image => Put_Image;
procedure Put_Image
(S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree);
overriding procedure Adjust (Container : in out Tree);
overriding procedure Finalize (Container : in out Tree) renames Clear;
use Ada.Streams;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Tree);
for Tree'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Tree);
for Tree'Read use Read;
type Tree_Access is access all Tree;
for Tree_Access'Storage_Size use 0;
type Cursor is record
Container : Tree_Access;
Node : Tree_Node_Access;
end record;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Position : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Position : out Cursor);
for Cursor'Read use Read;
subtype Reference_Control_Type is Implementation.Reference_Control_Type;
-- It is necessary to rename this here, so that the compiler can find it
type Constant_Reference_Type
(Element : not null access constant Element_Type) is
record
Control : Reference_Control_Type :=
raise Program_Error with "uninitialized reference";
-- The RM says, "The default initialization of an object of
-- type Constant_Reference_Type or Reference_Type propagates
-- Program_Error."
end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type);
for Constant_Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type);
for Constant_Reference_Type'Write use Write;
type Reference_Type
(Element : not null access Element_Type) is
record
Control : Reference_Control_Type :=
raise Program_Error with "uninitialized reference";
-- The RM says, "The default initialization of an object of
-- type Constant_Reference_Type or Reference_Type propagates
-- Program_Error."
end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type);
for Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type);
for Reference_Type'Write use Write;
-- Three operations are used to optimize in the expansion of "for ... of"
-- loops: the Next(Cursor) procedure in the visible part, and the following
-- Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-- details.
function Pseudo_Reference
(Container : aliased Tree'Class) return Reference_Control_Type;
pragma Inline (Pseudo_Reference);
-- Creates an object of type Reference_Control_Type pointing to the
-- container, and increments the Lock. Finalization of this object will
-- decrement the Lock.
function Get_Element_Access
(Position : Cursor) return not null Element_Access;
-- Returns a pointer to the element designated by Position.
Empty_Tree : constant Tree := (Controlled with others => <>);
No_Element : constant Cursor := (others => <>);
end Ada.Containers.Indefinite_Multiway_Trees;
|
onox/orka | Ada | 1,447 | adb | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 onox <[email protected]>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with Ada.Unchecked_Conversion;
with Orka.SIMD.SSE.Singles.Arithmetic;
with Orka.SIMD.SSE.Singles.Compare;
with Orka.SIMD.SSE2.Integers;
with Orka.SIMD.SSE4_1.Integers.Logical;
package body Orka.SIMD.SSE4_1.Singles.Compare is
use SIMD.SSE.Singles.Arithmetic;
use SIMD.SSE.Singles.Compare;
use SIMD.SSE2.Integers;
use SIMD.SSE4_1.Integers.Logical;
function Is_Equal (Left, Right : m128) return Boolean is
Epsilon : constant := Float_32'Model_Epsilon;
function Convert is new Ada.Unchecked_Conversion (m128, m128i);
Result : constant m128 :=
abs (Left - Right) <= (Epsilon, Epsilon, Epsilon, Epsilon);
begin
return Test_All_Ones (Convert (Result), Convert (Result = Result));
end Is_Equal;
end Orka.SIMD.SSE4_1.Singles.Compare;
|
JohnYang97/Space-Convoy | Ada | 3,153 | adb | --
-- Jan & Uwe R. Zimmer, Australia, July 2011
--
with Ada.Numerics; use Ada.Numerics;
with Ada.Numerics.Generic_Elementary_Functions;
with Ada.Strings.Bounded; use Ada.Strings.Bounded;
package body Vectors_xD is
package Real_Elementary_Functions is
new Ada.Numerics.Generic_Elementary_Functions (Real);
use Real_Elementary_Functions;
package Strings_255 is new Ada.Strings.Bounded.Generic_Bounded_Length (Max => 255);
use Strings_255;
--
function Image (V : Vector_xD) return String is
Image_String : Strings_255.Bounded_String := Strings_255.Null_Bounded_String;
begin
Image_String := Image_String & '(';
for Axes in Vector_xD'Range loop
Image_String := Image_String & Real'Image (V (Axes));
if Axes /= Vector_xD'Last then
Image_String := Image_String & ", ";
end if;
end loop;
Image_String := Image_String & ')';
return To_String (Image_String);
end Image;
--
function Norm (V : Vector_xD) return Vector_xD is
Abs_V : constant Real := abs (V);
begin
if Abs_V = 0.0 then
return Zero_Vector_xD;
else
return (V * (1.0 / Abs_V));
end if;
end Norm;
--
function "*" (Scalar : Real; V : Vector_xD) return Vector_xD is
Scaled_V : Vector_xD;
begin
for Axis in Vector_xD'Range loop
Scaled_V (Axis) := Scalar * V (Axis);
end loop;
return Scaled_V;
end "*";
--
function "*" (V : Vector_xD; Scalar : Real) return Vector_xD is (Scalar * V);
--
function "/" (V : Vector_xD; Scalar : Real) return Vector_xD is ((1.0 / Scalar) * V);
--
function "*" (V_Left, V_Right : Vector_xD) return Real is
Dot : Real := 0.0;
begin
for Axis in Vector_xD'Range loop
Dot := Dot + (V_Left (Axis) * V_Right (Axis));
end loop;
return Dot;
end "*";
--
function Angle_Between (V_Left, V_Right : Vector_xD) return Real is
Abs_Left : constant Real := abs (V_Left);
Abs_Right : constant Real := abs (V_Right);
begin
if Abs_Left = 0.0 or else Abs_Right = 0.0 then
return 0.0;
else
return Arccos (Real'Max (-1.0, Real'Min (1.0, (V_Left * V_Right) / (Abs_Left * Abs_Right))));
end if;
end Angle_Between;
--
function "+" (V_Left, V_Right : Vector_xD) return Vector_xD is
V_Result : Vector_xD;
begin
for Axis in Vector_xD'Range loop
V_Result (Axis) := V_Left (Axis) + V_Right (Axis);
end loop;
return V_Result;
end "+";
--
function "-" (V_Left, V_Right : Vector_xD) return Vector_xD is
V_Result : Vector_xD;
begin
for Axis in Vector_xD'Range loop
V_Result (Axis) := V_Left (Axis) - V_Right (Axis);
end loop;
return V_Result;
end "-";
--
function "abs" (V : Vector_xD) return Real is
Sum_Sqr : Real := 0.0;
begin
for Axis in Vector_xD'Range loop
Sum_Sqr := Sum_Sqr + V (Axis)**2;
end loop;
return Sqrt (Sum_Sqr);
end "abs";
--
end Vectors_xD;
|
reznikmm/matreshka | Ada | 4,067 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Style_First_Page_Number_Attributes;
package Matreshka.ODF_Style.First_Page_Number_Attributes is
type Style_First_Page_Number_Attribute_Node is
new Matreshka.ODF_Style.Abstract_Style_Attribute_Node
and ODF.DOM.Style_First_Page_Number_Attributes.ODF_Style_First_Page_Number_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Style_First_Page_Number_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Style_First_Page_Number_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Style.First_Page_Number_Attributes;
|
AdaCore/libadalang | Ada | 443 | adb | procedure Test is
type Arr is array (Positive range <>) of Integer;
type F_Acc is access function (X : Positive) return Arr;
function Foo (F : F_Acc) return Integer is
begin
return F (2) (1);
pragma Test_Statement;
end Foo;
function Bar
(F : access function (X : Positive) return Arr) return Integer
is
begin
return F (2) (1);
pragma Test_Statement;
end Bar;
begin
null;
end Test;
|
yluo39github/MachineLearningSAT | Ada | 4,332 | ads | ----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib-streams.ads,v 1.1 2008/12/11 02:41:27 xulin730 Exp $
package ZLib.Streams is
type Stream_Mode is (In_Stream, Out_Stream, Duplex);
type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class;
type Stream_Type is
new Ada.Streams.Root_Stream_Type with private;
procedure Read
(Stream : in out Stream_Type;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset);
procedure Write
(Stream : in out Stream_Type;
Item : in Ada.Streams.Stream_Element_Array);
procedure Flush
(Stream : in out Stream_Type;
Mode : in Flush_Mode := Sync_Flush);
-- Flush the written data to the back stream,
-- all data placed to the compressor is flushing to the Back stream.
-- Should not be used untill necessary, becouse it is decreasing
-- compression.
function Read_Total_In (Stream : in Stream_Type) return Count;
pragma Inline (Read_Total_In);
-- Return total number of bytes read from back stream so far.
function Read_Total_Out (Stream : in Stream_Type) return Count;
pragma Inline (Read_Total_Out);
-- Return total number of bytes read so far.
function Write_Total_In (Stream : in Stream_Type) return Count;
pragma Inline (Write_Total_In);
-- Return total number of bytes written so far.
function Write_Total_Out (Stream : in Stream_Type) return Count;
pragma Inline (Write_Total_Out);
-- Return total number of bytes written to the back stream.
procedure Create
(Stream : out Stream_Type;
Mode : in Stream_Mode;
Back : in Stream_Access;
Back_Compressed : in Boolean;
Level : in Compression_Level := Default_Compression;
Strategy : in Strategy_Type := Default_Strategy;
Header : in Header_Type := Default;
Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset
:= Default_Buffer_Size;
Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset
:= Default_Buffer_Size);
-- Create the Comression/Decompression stream.
-- If mode is In_Stream then Write operation is disabled.
-- If mode is Out_Stream then Read operation is disabled.
-- If Back_Compressed is true then
-- Data written to the Stream is compressing to the Back stream
-- and data read from the Stream is decompressed data from the Back stream.
-- If Back_Compressed is false then
-- Data written to the Stream is decompressing to the Back stream
-- and data read from the Stream is compressed data from the Back stream.
-- !!! When the Need_Header is False ZLib-Ada is using undocumented
-- ZLib 1.1.4 functionality to do not create/wait for ZLib headers.
function Is_Open (Stream : Stream_Type) return Boolean;
procedure Close (Stream : in out Stream_Type);
private
use Ada.Streams;
type Buffer_Access is access all Stream_Element_Array;
type Stream_Type
is new Root_Stream_Type with
record
Mode : Stream_Mode;
Buffer : Buffer_Access;
Rest_First : Stream_Element_Offset;
Rest_Last : Stream_Element_Offset;
-- Buffer for Read operation.
-- We need to have this buffer in the record
-- becouse not all read data from back stream
-- could be processed during the read operation.
Buffer_Size : Stream_Element_Offset;
-- Buffer size for write operation.
-- We do not need to have this buffer
-- in the record becouse all data could be
-- processed in the write operation.
Back : Stream_Access;
Reader : Filter_Type;
Writer : Filter_Type;
end record;
end ZLib.Streams;
|
Fabien-Chouteau/samd51-hal | Ada | 4,630 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2020, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with HAL.I2C; use HAL.I2C;
with HAL; use HAL;
package SAM.SERCOM.I2C is
type I2C_Device
is new SERCOM_Device and HAL.I2C.I2C_Port
with private;
procedure Configure (This : in out I2C_Device;
Baud : UInt8)
with Pre => not This.Enabled and then not This.Configured,
Post => not This.Enabled and then This.Configured;
-- Configure SERCOM in I2C Master mode.
-- DMA --
function Data_Address (This : I2C_Device) return System.Address;
-- return the address of the data register for DMA transfer configuration
-------------
-- HAL.I2C --
-------------
overriding
procedure Master_Transmit
(This : in out I2C_Device;
Addr : I2C_Address;
Data : I2C_Data;
Status : out I2C_Status;
Timeout : Natural := 1000);
overriding
procedure Master_Receive
(This : in out I2C_Device;
Addr : I2C_Address;
Data : out I2C_Data;
Status : out I2C_Status;
Timeout : Natural := 1000);
overriding
procedure Mem_Write
(This : in out I2C_Device;
Addr : I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : I2C_Memory_Address_Size;
Data : I2C_Data;
Status : out I2C_Status;
Timeout : Natural := 1000);
overriding
procedure Mem_Read
(This : in out I2C_Device;
Addr : I2C_Address;
Mem_Addr : UInt16;
Mem_Addr_Size : I2C_Memory_Address_Size;
Data : out I2C_Data;
Status : out I2C_Status;
Timeout : Natural := 1000);
private
type I2C_Device
is new SERCOM_Device and HAL.I2C.I2C_Port
with record
Do_Stop_Sequence : Boolean := True;
end record;
procedure Wait_Sync (This : in out I2C_Device);
procedure Wait_Bus (This : in out I2C_Device);
function Send_Addr (This : in out I2C_Device;
Addr : UInt11)
return I2C_Status;
procedure Cmd_Stop (This : in out I2C_Device);
procedure Cmd_Read (This : in out I2C_Device);
procedure Cmd_Nack (This : in out I2C_Device);
function Bus_Status (This : I2C_Device) return I2C_Status;
end SAM.SERCOM.I2C;
|
sparre/Ada-2012-Examples | Ada | 1,406 | adb | with Ada.Command_Line;
with Ada.Text_IO;
with Set_With_Modular_Representation;
procedure Set_With_Modular_Representation_Demo is
type Outcomes is (Paper, Rock, Scissors, Suicide, None);
subtype Choices is Outcomes range Paper .. Scissors;
type Numeric_Choices is mod 2 ** 3;
package Choice_Set is
new Set_With_Modular_Representation (Element_Type => Choices,
Numeric_Type => Numeric_Choices);
use Choice_Set;
Mapping : array (Numeric_Choices) of Outcomes := (others => None);
begin
Set_Up_Mapping :
begin
-- Single challenger victories
Mapping (Ø & Rock) := Rock;
Mapping (Ø & Paper) := Paper;
Mapping (Ø & Scissors) := Scissors;
-- Double challenger victories
Mapping (Rock & Paper) := Paper;
Mapping (Rock & Scissors) := Rock;
Mapping (Paper & Scissors) := Scissors;
end Set_Up_Mapping;
Test :
declare
package Outcome_Text_IO is
new Ada.Text_IO.Enumeration_IO (Outcomes);
use Ada.Command_Line, Ada.Text_IO, Outcome_Text_IO;
Chosen : Numeric_Choices := Ø;
begin
for Index in 1 .. Argument_Count loop
Chosen := Chosen & Choices'Value (Argument (Index));
end loop;
Put ("Outcome: ");
Put (Mapping (Chosen));
New_Line;
end Test;
end Set_With_Modular_Representation_Demo;
|
pdaxrom/Kino2 | Ada | 4,096 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- Terminal_Interface.Curses.Menus.Menu_User_Data --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright (c) 1998 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en
-- Version Control:
-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Menus.Menu_User_Data is
use type Interfaces.C.int;
procedure Set_User_Data (Men : in Menu;
Data : in User_Access)
is
function Set_Menu_Userptr (Men : Menu;
Data : User_Access) return C_Int;
pragma Import (C, Set_Menu_Userptr, "set_menu_userptr");
Res : constant Eti_Error := Set_Menu_Userptr (Men, Data);
begin
if Res /= E_Ok then
Eti_Exception (Res);
end if;
end Set_User_Data;
function Get_User_Data (Men : in Menu) return User_Access
is
function Menu_Userptr (Men : Menu) return User_Access;
pragma Import (C, Menu_Userptr, "menu_userptr");
begin
return Menu_Userptr (Men);
end Get_User_Data;
procedure Get_User_Data (Men : in Menu;
Data : out User_Access)
is
begin
Data := Get_User_Data (Men);
end Get_User_Data;
end Terminal_Interface.Curses.Menus.Menu_User_Data;
|
Fabien-Chouteau/AGATE | Ada | 2,490 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2020, 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. --
-- --
------------------------------------------------------------------------------
private package AGATE.Stack_Canaries_Enable is
Enabled : constant Boolean := True;
end AGATE.Stack_Canaries_Enable;
|
Tim-Tom/project-euler | Ada | 58 | ads | package Problem_04 is
procedure Solve;
end Problem_04;
|
libos-nuse/frankenlibc | Ada | 4,246 | adb | ----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp
-- Test/demo program for the generic read interface.
with Ada.Numerics.Discrete_Random;
with Ada.Streams;
with Ada.Text_IO;
with ZLib;
procedure Read is
use Ada.Streams;
------------------------------------
-- Test configuration parameters --
------------------------------------
File_Size : Stream_Element_Offset := 100_000;
Continuous : constant Boolean := False;
-- If this constant is True, the test would be repeated again and again,
-- with increment File_Size for every iteration.
Header : constant ZLib.Header_Type := ZLib.Default;
-- Do not use Header other than Default in ZLib versions 1.1.4 and older.
Init_Random : constant := 8;
-- We are using the same random sequence, in case of we catch bug,
-- so we would be able to reproduce it.
-- End --
Pack_Size : Stream_Element_Offset;
Offset : Stream_Element_Offset;
Filter : ZLib.Filter_Type;
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;
Period : constant Stream_Element_Offset := 200;
-- Period constant variable for random generator not to be very random.
-- Bigger period, harder random.
Read_Buffer : Stream_Element_Array (1 .. 2048);
Read_First : Stream_Element_Offset;
Read_Last : Stream_Element_Offset;
procedure Reset;
procedure Read
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset);
-- this procedure is for generic instantiation of
-- ZLib.Read
-- reading data from the File_In.
procedure Read is new ZLib.Read
(Read,
Read_Buffer,
Rest_First => Read_First,
Rest_Last => Read_Last);
----------
-- Read --
----------
procedure Read
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset) is
begin
Last := Stream_Element_Offset'Min
(Item'Last,
Item'First + File_Size - Offset);
for J in Item'First .. Last loop
if J < Item'First + Period then
Item (J) := Random_Elements.Random (Gen);
else
Item (J) := Item (J - Period);
end if;
Offset := Offset + 1;
end loop;
end Read;
-----------
-- Reset --
-----------
procedure Reset is
begin
Random_Elements.Reset (Gen, Init_Random);
Pack_Size := 0;
Offset := 1;
Read_First := Read_Buffer'Last + 1;
Read_Last := Read_Buffer'Last;
end Reset;
begin
Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
loop
for Level in ZLib.Compression_Level'Range loop
Ada.Text_IO.Put ("Level ="
& ZLib.Compression_Level'Image (Level));
-- Deflate using generic instantiation.
ZLib.Deflate_Init
(Filter,
Level,
Header => Header);
Reset;
Ada.Text_IO.Put
(Stream_Element_Offset'Image (File_Size) & " ->");
loop
declare
Buffer : Stream_Element_Array (1 .. 1024);
Last : Stream_Element_Offset;
begin
Read (Filter, Buffer, Last);
Pack_Size := Pack_Size + Last - Buffer'First + 1;
exit when Last < Buffer'Last;
end;
end loop;
Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size));
ZLib.Close (Filter);
end loop;
exit when not Continuous;
File_Size := File_Size + 1;
end loop;
end Read;
|
Tim-Tom/project-euler | Ada | 58 | ads | package Problem_35 is
procedure Solve;
end Problem_35;
|
reznikmm/matreshka | Ada | 4,647 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Text.Cond_Style_Name_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Text_Cond_Style_Name_Attribute_Node is
begin
return Self : Text_Cond_Style_Name_Attribute_Node do
Matreshka.ODF_Text.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Text_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Text_Cond_Style_Name_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Cond_Style_Name_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Text_URI,
Matreshka.ODF_String_Constants.Cond_Style_Name_Attribute,
Text_Cond_Style_Name_Attribute_Node'Tag);
end Matreshka.ODF_Text.Cond_Style_Name_Attributes;
|
lumalisan/EspeblancaYLos7PPs | Ada | 29,263 | ads | 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 2018 (20180523-73)" & ASCII.NUL;
pragma Export (C, GNAT_Version, "__gnat_version");
Ada_Main_Program_Name : constant String := "_ada_blancaneus" & 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#cadb312f#;
pragma Export (C, u00001, "blancaneusB");
u00002 : constant Version_32 := 16#050ff2f0#;
pragma Export (C, u00002, "system__standard_libraryB");
u00003 : constant Version_32 := 16#35869f17#;
pragma Export (C, u00003, "system__standard_libraryS");
u00004 : constant Version_32 := 16#76789da1#;
pragma Export (C, u00004, "adaS");
u00005 : constant Version_32 := 16#357666d8#;
pragma Export (C, u00005, "ada__calendar__delaysB");
u00006 : constant Version_32 := 16#a808adf5#;
pragma Export (C, u00006, "ada__calendar__delaysS");
u00007 : constant Version_32 := 16#b8719323#;
pragma Export (C, u00007, "ada__calendarB");
u00008 : constant Version_32 := 16#41508869#;
pragma Export (C, u00008, "ada__calendarS");
u00009 : constant Version_32 := 16#b11c5006#;
pragma Export (C, u00009, "ada__exceptionsB");
u00010 : constant Version_32 := 16#2ccb9557#;
pragma Export (C, u00010, "ada__exceptionsS");
u00011 : constant Version_32 := 16#5726abed#;
pragma Export (C, u00011, "ada__exceptions__last_chance_handlerB");
u00012 : constant Version_32 := 16#41e5552e#;
pragma Export (C, u00012, "ada__exceptions__last_chance_handlerS");
u00013 : constant Version_32 := 16#32a08138#;
pragma Export (C, u00013, "systemS");
u00014 : constant Version_32 := 16#ae860117#;
pragma Export (C, u00014, "system__soft_linksB");
u00015 : constant Version_32 := 16#77a38a8e#;
pragma Export (C, u00015, "system__soft_linksS");
u00016 : constant Version_32 := 16#87be2c0f#;
pragma Export (C, u00016, "system__secondary_stackB");
u00017 : constant Version_32 := 16#77347921#;
pragma Export (C, u00017, "system__secondary_stackS");
u00018 : constant Version_32 := 16#86dbf443#;
pragma Export (C, u00018, "system__parametersB");
u00019 : constant Version_32 := 16#7a4cd513#;
pragma Export (C, u00019, "system__parametersS");
u00020 : constant Version_32 := 16#ced09590#;
pragma Export (C, u00020, "system__storage_elementsB");
u00021 : constant Version_32 := 16#1f63cb3c#;
pragma Export (C, u00021, "system__storage_elementsS");
u00022 : constant Version_32 := 16#75bf515c#;
pragma Export (C, u00022, "system__soft_links__initializeB");
u00023 : constant Version_32 := 16#5697fc2b#;
pragma Export (C, u00023, "system__soft_links__initializeS");
u00024 : constant Version_32 := 16#41837d1e#;
pragma Export (C, u00024, "system__stack_checkingB");
u00025 : constant Version_32 := 16#bc1fead0#;
pragma Export (C, u00025, "system__stack_checkingS");
u00026 : constant Version_32 := 16#34742901#;
pragma Export (C, u00026, "system__exception_tableB");
u00027 : constant Version_32 := 16#6f0ee87a#;
pragma Export (C, u00027, "system__exception_tableS");
u00028 : constant Version_32 := 16#ce4af020#;
pragma Export (C, u00028, "system__exceptionsB");
u00029 : constant Version_32 := 16#5ac3ecce#;
pragma Export (C, u00029, "system__exceptionsS");
u00030 : constant Version_32 := 16#80916427#;
pragma Export (C, u00030, "system__exceptions__machineB");
u00031 : constant Version_32 := 16#3bad9081#;
pragma Export (C, u00031, "system__exceptions__machineS");
u00032 : constant Version_32 := 16#aa0563fc#;
pragma Export (C, u00032, "system__exceptions_debugB");
u00033 : constant Version_32 := 16#4c2a78fc#;
pragma Export (C, u00033, "system__exceptions_debugS");
u00034 : constant Version_32 := 16#6c2f8802#;
pragma Export (C, u00034, "system__img_intB");
u00035 : constant Version_32 := 16#307b61fa#;
pragma Export (C, u00035, "system__img_intS");
u00036 : constant Version_32 := 16#39df8c17#;
pragma Export (C, u00036, "system__tracebackB");
u00037 : constant Version_32 := 16#6c825ffc#;
pragma Export (C, u00037, "system__tracebackS");
u00038 : constant Version_32 := 16#9ed49525#;
pragma Export (C, u00038, "system__traceback_entriesB");
u00039 : constant Version_32 := 16#32fb7748#;
pragma Export (C, u00039, "system__traceback_entriesS");
u00040 : constant Version_32 := 16#9ad5ad12#;
pragma Export (C, u00040, "system__traceback__symbolicB");
u00041 : constant Version_32 := 16#c84061d1#;
pragma Export (C, u00041, "system__traceback__symbolicS");
u00042 : constant Version_32 := 16#179d7d28#;
pragma Export (C, u00042, "ada__containersS");
u00043 : constant Version_32 := 16#701f9d88#;
pragma Export (C, u00043, "ada__exceptions__tracebackB");
u00044 : constant Version_32 := 16#20245e75#;
pragma Export (C, u00044, "ada__exceptions__tracebackS");
u00045 : constant Version_32 := 16#e865e681#;
pragma Export (C, u00045, "system__bounded_stringsB");
u00046 : constant Version_32 := 16#455da021#;
pragma Export (C, u00046, "system__bounded_stringsS");
u00047 : constant Version_32 := 16#74f70e62#;
pragma Export (C, u00047, "system__crtlS");
u00048 : constant Version_32 := 16#d5de7583#;
pragma Export (C, u00048, "system__dwarf_linesB");
u00049 : constant Version_32 := 16#f4013fc9#;
pragma Export (C, u00049, "system__dwarf_linesS");
u00050 : constant Version_32 := 16#5b4659fa#;
pragma Export (C, u00050, "ada__charactersS");
u00051 : constant Version_32 := 16#8f637df8#;
pragma Export (C, u00051, "ada__characters__handlingB");
u00052 : constant Version_32 := 16#3b3f6154#;
pragma Export (C, u00052, "ada__characters__handlingS");
u00053 : constant Version_32 := 16#4b7bb96a#;
pragma Export (C, u00053, "ada__characters__latin_1S");
u00054 : constant Version_32 := 16#e6d4fa36#;
pragma Export (C, u00054, "ada__stringsS");
u00055 : constant Version_32 := 16#96df1a3f#;
pragma Export (C, u00055, "ada__strings__mapsB");
u00056 : constant Version_32 := 16#1e526bec#;
pragma Export (C, u00056, "ada__strings__mapsS");
u00057 : constant Version_32 := 16#a21ad5cd#;
pragma Export (C, u00057, "system__bit_opsB");
u00058 : constant Version_32 := 16#0765e3a3#;
pragma Export (C, u00058, "system__bit_opsS");
u00059 : constant Version_32 := 16#0626fdbb#;
pragma Export (C, u00059, "system__unsigned_typesS");
u00060 : constant Version_32 := 16#92f05f13#;
pragma Export (C, u00060, "ada__strings__maps__constantsS");
u00061 : constant Version_32 := 16#5ab55268#;
pragma Export (C, u00061, "interfacesS");
u00062 : constant Version_32 := 16#a0d3d22b#;
pragma Export (C, u00062, "system__address_imageB");
u00063 : constant Version_32 := 16#934c1c02#;
pragma Export (C, u00063, "system__address_imageS");
u00064 : constant Version_32 := 16#ec78c2bf#;
pragma Export (C, u00064, "system__img_unsB");
u00065 : constant Version_32 := 16#99d2c14c#;
pragma Export (C, u00065, "system__img_unsS");
u00066 : constant Version_32 := 16#d7aac20c#;
pragma Export (C, u00066, "system__ioB");
u00067 : constant Version_32 := 16#ace27677#;
pragma Export (C, u00067, "system__ioS");
u00068 : constant Version_32 := 16#3080f2ca#;
pragma Export (C, u00068, "system__mmapB");
u00069 : constant Version_32 := 16#08d13e5f#;
pragma Export (C, u00069, "system__mmapS");
u00070 : constant Version_32 := 16#92d882c5#;
pragma Export (C, u00070, "ada__io_exceptionsS");
u00071 : constant Version_32 := 16#a82e20f9#;
pragma Export (C, u00071, "system__mmap__os_interfaceB");
u00072 : constant Version_32 := 16#8f4541b8#;
pragma Export (C, u00072, "system__mmap__os_interfaceS");
u00073 : constant Version_32 := 16#35737c3a#;
pragma Export (C, u00073, "system__os_libB");
u00074 : constant Version_32 := 16#d8e681fb#;
pragma Export (C, u00074, "system__os_libS");
u00075 : constant Version_32 := 16#ec4d5631#;
pragma Export (C, u00075, "system__case_utilB");
u00076 : constant Version_32 := 16#0d75376c#;
pragma Export (C, u00076, "system__case_utilS");
u00077 : constant Version_32 := 16#2a8e89ad#;
pragma Export (C, u00077, "system__stringsB");
u00078 : constant Version_32 := 16#52b6adad#;
pragma Export (C, u00078, "system__stringsS");
u00079 : constant Version_32 := 16#769e25e6#;
pragma Export (C, u00079, "interfaces__cB");
u00080 : constant Version_32 := 16#467817d8#;
pragma Export (C, u00080, "interfaces__cS");
u00081 : constant Version_32 := 16#40d3d043#;
pragma Export (C, u00081, "system__object_readerB");
u00082 : constant Version_32 := 16#ec38df4d#;
pragma Export (C, u00082, "system__object_readerS");
u00083 : constant Version_32 := 16#1a74a354#;
pragma Export (C, u00083, "system__val_lliB");
u00084 : constant Version_32 := 16#a8846798#;
pragma Export (C, u00084, "system__val_lliS");
u00085 : constant Version_32 := 16#afdbf393#;
pragma Export (C, u00085, "system__val_lluB");
u00086 : constant Version_32 := 16#7cd4aac9#;
pragma Export (C, u00086, "system__val_lluS");
u00087 : constant Version_32 := 16#269742a9#;
pragma Export (C, u00087, "system__val_utilB");
u00088 : constant Version_32 := 16#9e0037c6#;
pragma Export (C, u00088, "system__val_utilS");
u00089 : constant Version_32 := 16#d7bf3f29#;
pragma Export (C, u00089, "system__exception_tracesB");
u00090 : constant Version_32 := 16#167fa1a2#;
pragma Export (C, u00090, "system__exception_tracesS");
u00091 : constant Version_32 := 16#d178f226#;
pragma Export (C, u00091, "system__win32S");
u00092 : constant Version_32 := 16#8c33a517#;
pragma Export (C, u00092, "system__wch_conB");
u00093 : constant Version_32 := 16#29dda3ea#;
pragma Export (C, u00093, "system__wch_conS");
u00094 : constant Version_32 := 16#9721e840#;
pragma Export (C, u00094, "system__wch_stwB");
u00095 : constant Version_32 := 16#04cc8feb#;
pragma Export (C, u00095, "system__wch_stwS");
u00096 : constant Version_32 := 16#a831679c#;
pragma Export (C, u00096, "system__wch_cnvB");
u00097 : constant Version_32 := 16#266a1919#;
pragma Export (C, u00097, "system__wch_cnvS");
u00098 : constant Version_32 := 16#ece6fdb6#;
pragma Export (C, u00098, "system__wch_jisB");
u00099 : constant Version_32 := 16#a61a0038#;
pragma Export (C, u00099, "system__wch_jisS");
u00100 : constant Version_32 := 16#24ec69e6#;
pragma Export (C, u00100, "system__os_primitivesB");
u00101 : constant Version_32 := 16#355de4ce#;
pragma Export (C, u00101, "system__os_primitivesS");
u00102 : constant Version_32 := 16#05c60a38#;
pragma Export (C, u00102, "system__task_lockB");
u00103 : constant Version_32 := 16#532ab656#;
pragma Export (C, u00103, "system__task_lockS");
u00104 : constant Version_32 := 16#1a9147da#;
pragma Export (C, u00104, "system__win32__extS");
u00105 : constant Version_32 := 16#c04d61ca#;
pragma Export (C, u00105, "ada__real_timeB");
u00106 : constant Version_32 := 16#69ea8064#;
pragma Export (C, u00106, "ada__real_timeS");
u00107 : constant Version_32 := 16#a568828d#;
pragma Export (C, u00107, "system__taskingB");
u00108 : constant Version_32 := 16#d2a71b20#;
pragma Export (C, u00108, "system__taskingS");
u00109 : constant Version_32 := 16#c71f56c0#;
pragma Export (C, u00109, "system__task_primitivesS");
u00110 : constant Version_32 := 16#c5a5fe3f#;
pragma Export (C, u00110, "system__os_interfaceS");
u00111 : constant Version_32 := 16#1d638357#;
pragma Export (C, u00111, "interfaces__c__stringsB");
u00112 : constant Version_32 := 16#603c1c44#;
pragma Export (C, u00112, "interfaces__c__stringsS");
u00113 : constant Version_32 := 16#c1984f17#;
pragma Export (C, u00113, "system__task_primitives__operationsB");
u00114 : constant Version_32 := 16#0af41c2b#;
pragma Export (C, u00114, "system__task_primitives__operationsS");
u00115 : constant Version_32 := 16#1b28662b#;
pragma Export (C, u00115, "system__float_controlB");
u00116 : constant Version_32 := 16#d25cc204#;
pragma Export (C, u00116, "system__float_controlS");
u00117 : constant Version_32 := 16#da8ccc08#;
pragma Export (C, u00117, "system__interrupt_managementB");
u00118 : constant Version_32 := 16#0f60a80c#;
pragma Export (C, u00118, "system__interrupt_managementS");
u00119 : constant Version_32 := 16#f65595cf#;
pragma Export (C, u00119, "system__multiprocessorsB");
u00120 : constant Version_32 := 16#0a0c1e4b#;
pragma Export (C, u00120, "system__multiprocessorsS");
u00121 : constant Version_32 := 16#77769007#;
pragma Export (C, u00121, "system__task_infoB");
u00122 : constant Version_32 := 16#e54688cf#;
pragma Export (C, u00122, "system__task_infoS");
u00123 : constant Version_32 := 16#e5a48551#;
pragma Export (C, u00123, "system__tasking__debugB");
u00124 : constant Version_32 := 16#f1f2435f#;
pragma Export (C, u00124, "system__tasking__debugS");
u00125 : constant Version_32 := 16#fd83e873#;
pragma Export (C, u00125, "system__concat_2B");
u00126 : constant Version_32 := 16#300056e8#;
pragma Export (C, u00126, "system__concat_2S");
u00127 : constant Version_32 := 16#2b70b149#;
pragma Export (C, u00127, "system__concat_3B");
u00128 : constant Version_32 := 16#39d0dd9d#;
pragma Export (C, u00128, "system__concat_3S");
u00129 : constant Version_32 := 16#273384e4#;
pragma Export (C, u00129, "system__img_enum_newB");
u00130 : constant Version_32 := 16#53ec87f8#;
pragma Export (C, u00130, "system__img_enum_newS");
u00131 : constant Version_32 := 16#6ec3c867#;
pragma Export (C, u00131, "system__stack_usageB");
u00132 : constant Version_32 := 16#3a3ac346#;
pragma Export (C, u00132, "system__stack_usageS");
u00133 : constant Version_32 := 16#457fb2da#;
pragma Export (C, u00133, "ada__strings__unboundedB");
u00134 : constant Version_32 := 16#f39c7224#;
pragma Export (C, u00134, "ada__strings__unboundedS");
u00135 : constant Version_32 := 16#144f64ae#;
pragma Export (C, u00135, "ada__strings__searchB");
u00136 : constant Version_32 := 16#c1ab8667#;
pragma Export (C, u00136, "ada__strings__searchS");
u00137 : constant Version_32 := 16#d398a95f#;
pragma Export (C, u00137, "ada__tagsB");
u00138 : constant Version_32 := 16#12a0afb8#;
pragma Export (C, u00138, "ada__tagsS");
u00139 : constant Version_32 := 16#796f31f1#;
pragma Export (C, u00139, "system__htableB");
u00140 : constant Version_32 := 16#b66232d2#;
pragma Export (C, u00140, "system__htableS");
u00141 : constant Version_32 := 16#089f5cd0#;
pragma Export (C, u00141, "system__string_hashB");
u00142 : constant Version_32 := 16#143c59ac#;
pragma Export (C, u00142, "system__string_hashS");
u00143 : constant Version_32 := 16#acee74ad#;
pragma Export (C, u00143, "system__compare_array_unsigned_8B");
u00144 : constant Version_32 := 16#9ba3f0b5#;
pragma Export (C, u00144, "system__compare_array_unsigned_8S");
u00145 : constant Version_32 := 16#a8025f3c#;
pragma Export (C, u00145, "system__address_operationsB");
u00146 : constant Version_32 := 16#21ac3f0b#;
pragma Export (C, u00146, "system__address_operationsS");
u00147 : constant Version_32 := 16#2e260032#;
pragma Export (C, u00147, "system__storage_pools__subpoolsB");
u00148 : constant Version_32 := 16#cc5a1856#;
pragma Export (C, u00148, "system__storage_pools__subpoolsS");
u00149 : constant Version_32 := 16#d96e3c40#;
pragma Export (C, u00149, "system__finalization_mastersB");
u00150 : constant Version_32 := 16#695cb8f2#;
pragma Export (C, u00150, "system__finalization_mastersS");
u00151 : constant Version_32 := 16#7268f812#;
pragma Export (C, u00151, "system__img_boolB");
u00152 : constant Version_32 := 16#c779f0d3#;
pragma Export (C, u00152, "system__img_boolS");
u00153 : constant Version_32 := 16#86c56e5a#;
pragma Export (C, u00153, "ada__finalizationS");
u00154 : constant Version_32 := 16#10558b11#;
pragma Export (C, u00154, "ada__streamsB");
u00155 : constant Version_32 := 16#67e31212#;
pragma Export (C, u00155, "ada__streamsS");
u00156 : constant Version_32 := 16#95817ed8#;
pragma Export (C, u00156, "system__finalization_rootB");
u00157 : constant Version_32 := 16#7d52f2a8#;
pragma Export (C, u00157, "system__finalization_rootS");
u00158 : constant Version_32 := 16#6d4d969a#;
pragma Export (C, u00158, "system__storage_poolsB");
u00159 : constant Version_32 := 16#114d1f95#;
pragma Export (C, u00159, "system__storage_poolsS");
u00160 : constant Version_32 := 16#84042202#;
pragma Export (C, u00160, "system__storage_pools__subpools__finalizationB");
u00161 : constant Version_32 := 16#fe2f4b3a#;
pragma Export (C, u00161, "system__storage_pools__subpools__finalizationS");
u00162 : constant Version_32 := 16#020a3f4d#;
pragma Export (C, u00162, "system__atomic_countersB");
u00163 : constant Version_32 := 16#86fcacb5#;
pragma Export (C, u00163, "system__atomic_countersS");
u00164 : constant Version_32 := 16#039168f8#;
pragma Export (C, u00164, "system__stream_attributesB");
u00165 : constant Version_32 := 16#8bc30a4e#;
pragma Export (C, u00165, "system__stream_attributesS");
u00166 : constant Version_32 := 16#927a893f#;
pragma Export (C, u00166, "ada__text_ioB");
u00167 : constant Version_32 := 16#25015822#;
pragma Export (C, u00167, "ada__text_ioS");
u00168 : constant Version_32 := 16#73d2d764#;
pragma Export (C, u00168, "interfaces__c_streamsB");
u00169 : constant Version_32 := 16#b1330297#;
pragma Export (C, u00169, "interfaces__c_streamsS");
u00170 : constant Version_32 := 16#ec083f01#;
pragma Export (C, u00170, "system__file_ioB");
u00171 : constant Version_32 := 16#95d1605d#;
pragma Export (C, u00171, "system__file_ioS");
u00172 : constant Version_32 := 16#cf3f1b90#;
pragma Export (C, u00172, "system__file_control_blockS");
u00173 : constant Version_32 := 16#33918b64#;
pragma Export (C, u00173, "def_monitorB");
u00174 : constant Version_32 := 16#dac9a4d9#;
pragma Export (C, u00174, "def_monitorS");
u00175 : constant Version_32 := 16#f24a7f45#;
pragma Export (C, u00175, "system__tasking__protected_objectsB");
u00176 : constant Version_32 := 16#b15a1586#;
pragma Export (C, u00176, "system__tasking__protected_objectsS");
u00177 : constant Version_32 := 16#f29e7e8b#;
pragma Export (C, u00177, "system__soft_links__taskingB");
u00178 : constant Version_32 := 16#e939497e#;
pragma Export (C, u00178, "system__soft_links__taskingS");
u00179 : constant Version_32 := 16#17d21067#;
pragma Export (C, u00179, "ada__exceptions__is_null_occurrenceB");
u00180 : constant Version_32 := 16#e1d7566f#;
pragma Export (C, u00180, "ada__exceptions__is_null_occurrenceS");
u00181 : constant Version_32 := 16#50b90464#;
pragma Export (C, u00181, "system__tasking__protected_objects__entriesB");
u00182 : constant Version_32 := 16#7daf93e7#;
pragma Export (C, u00182, "system__tasking__protected_objects__entriesS");
u00183 : constant Version_32 := 16#100eaf58#;
pragma Export (C, u00183, "system__restrictionsB");
u00184 : constant Version_32 := 16#79d25869#;
pragma Export (C, u00184, "system__restrictionsS");
u00185 : constant Version_32 := 16#ff0ade79#;
pragma Export (C, u00185, "system__tasking__initializationB");
u00186 : constant Version_32 := 16#f7885a93#;
pragma Export (C, u00186, "system__tasking__initializationS");
u00187 : constant Version_32 := 16#a067942c#;
pragma Export (C, u00187, "system__tasking__task_attributesB");
u00188 : constant Version_32 := 16#4c40320c#;
pragma Export (C, u00188, "system__tasking__task_attributesS");
u00189 : constant Version_32 := 16#a11c264c#;
pragma Export (C, u00189, "system__tasking__protected_objects__operationsB");
u00190 : constant Version_32 := 16#ba36ad85#;
pragma Export (C, u00190, "system__tasking__protected_objects__operationsS");
u00191 : constant Version_32 := 16#40317118#;
pragma Export (C, u00191, "system__tasking__entry_callsB");
u00192 : constant Version_32 := 16#c7180c67#;
pragma Export (C, u00192, "system__tasking__entry_callsS");
u00193 : constant Version_32 := 16#ec3cf692#;
pragma Export (C, u00193, "system__tasking__queuingB");
u00194 : constant Version_32 := 16#c9e0262c#;
pragma Export (C, u00194, "system__tasking__queuingS");
u00195 : constant Version_32 := 16#70d5a0df#;
pragma Export (C, u00195, "system__tasking__utilitiesB");
u00196 : constant Version_32 := 16#332a5557#;
pragma Export (C, u00196, "system__tasking__utilitiesS");
u00197 : constant Version_32 := 16#0fc99b06#;
pragma Export (C, u00197, "system__tasking__rendezvousB");
u00198 : constant Version_32 := 16#f242aaf9#;
pragma Export (C, u00198, "system__tasking__rendezvousS");
u00199 : constant Version_32 := 16#932a4690#;
pragma Export (C, u00199, "system__concat_4B");
u00200 : constant Version_32 := 16#4cc4aa18#;
pragma Export (C, u00200, "system__concat_4S");
u00201 : constant Version_32 := 16#7724692c#;
pragma Export (C, u00201, "system__tasking__stagesB");
u00202 : constant Version_32 := 16#fb9a8375#;
pragma Export (C, u00202, "system__tasking__stagesS");
u00203 : constant Version_32 := 16#5dc07a5a#;
pragma Export (C, u00203, "system__memoryB");
u00204 : constant Version_32 := 16#6bdde70c#;
pragma Export (C, u00204, "system__memoryS");
-- BEGIN ELABORATION ORDER
-- ada%s
-- ada.characters%s
-- ada.characters.latin_1%s
-- interfaces%s
-- system%s
-- system.address_operations%s
-- system.address_operations%b
-- system.atomic_counters%s
-- system.atomic_counters%b
-- system.float_control%s
-- system.float_control%b
-- system.img_bool%s
-- system.img_bool%b
-- system.img_enum_new%s
-- system.img_enum_new%b
-- system.img_int%s
-- system.img_int%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.restrictions%s
-- system.restrictions%b
-- system.storage_elements%s
-- system.storage_elements%b
-- system.stack_checking%s
-- system.stack_checking%b
-- system.stack_usage%s
-- system.stack_usage%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_uns%s
-- system.img_uns%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.compare_array_unsigned_8%s
-- system.compare_array_unsigned_8%b
-- system.concat_2%s
-- system.concat_2%b
-- system.concat_3%s
-- system.concat_3%b
-- system.concat_4%s
-- system.concat_4%b
-- system.traceback%s
-- system.traceback%b
-- system.case_util%s
-- system.standard_library%s
-- system.exception_traces%s
-- ada.exceptions%s
-- system.wch_stw%s
-- system.val_util%s
-- system.val_llu%s
-- system.val_lli%s
-- system.os_lib%s
-- system.bit_ops%s
-- ada.characters.handling%s
-- ada.exceptions.traceback%s
-- system.secondary_stack%s
-- system.case_util%b
-- system.address_image%s
-- system.bounded_strings%s
-- system.soft_links%s
-- system.exception_table%s
-- system.exception_table%b
-- ada.io_exceptions%s
-- ada.strings%s
-- ada.containers%s
-- system.exceptions%s
-- system.exceptions%b
-- ada.exceptions.last_chance_handler%s
-- system.exceptions_debug%s
-- system.exceptions_debug%b
-- system.exception_traces%b
-- system.memory%s
-- system.memory%b
-- system.wch_stw%b
-- system.val_util%b
-- system.val_llu%b
-- system.val_lli%b
-- interfaces.c%s
-- system.win32%s
-- system.mmap%s
-- system.mmap.os_interface%s
-- system.mmap.os_interface%b
-- system.mmap%b
-- system.os_lib%b
-- system.bit_ops%b
-- ada.strings.maps%s
-- ada.strings.maps.constants%s
-- ada.characters.handling%b
-- ada.exceptions.traceback%b
-- system.exceptions.machine%s
-- system.exceptions.machine%b
-- system.secondary_stack%b
-- system.address_image%b
-- system.bounded_strings%b
-- system.soft_links.initialize%s
-- system.soft_links.initialize%b
-- system.soft_links%b
-- ada.exceptions.last_chance_handler%b
-- system.standard_library%b
-- system.object_reader%s
-- system.dwarf_lines%s
-- system.dwarf_lines%b
-- interfaces.c%b
-- ada.strings.maps%b
-- system.traceback.symbolic%s
-- system.traceback.symbolic%b
-- ada.exceptions%b
-- system.object_reader%b
-- ada.exceptions.is_null_occurrence%s
-- ada.exceptions.is_null_occurrence%b
-- ada.strings.search%s
-- ada.strings.search%b
-- ada.tags%s
-- ada.tags%b
-- ada.streams%s
-- ada.streams%b
-- interfaces.c.strings%s
-- interfaces.c.strings%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.multiprocessors%s
-- system.multiprocessors%b
-- system.os_interface%s
-- system.interrupt_management%s
-- system.interrupt_management%b
-- system.storage_pools%s
-- system.storage_pools%b
-- system.finalization_masters%s
-- system.finalization_masters%b
-- system.storage_pools.subpools%s
-- system.storage_pools.subpools.finalization%s
-- system.storage_pools.subpools%b
-- system.storage_pools.subpools.finalization%b
-- system.stream_attributes%s
-- system.stream_attributes%b
-- ada.strings.unbounded%s
-- ada.strings.unbounded%b
-- system.task_info%s
-- system.task_info%b
-- system.task_lock%s
-- system.task_lock%b
-- system.task_primitives%s
-- system.win32.ext%s
-- system.os_primitives%s
-- system.os_primitives%b
-- system.tasking%s
-- system.task_primitives.operations%s
-- system.tasking.debug%s
-- system.tasking%b
-- system.task_primitives.operations%b
-- system.tasking.debug%b
-- ada.calendar%s
-- ada.calendar%b
-- ada.calendar.delays%s
-- ada.calendar.delays%b
-- ada.real_time%s
-- ada.real_time%b
-- ada.text_io%s
-- ada.text_io%b
-- system.soft_links.tasking%s
-- system.soft_links.tasking%b
-- system.tasking.initialization%s
-- system.tasking.task_attributes%s
-- system.tasking.initialization%b
-- system.tasking.task_attributes%b
-- system.tasking.protected_objects%s
-- system.tasking.protected_objects%b
-- system.tasking.protected_objects.entries%s
-- system.tasking.protected_objects.entries%b
-- system.tasking.queuing%s
-- system.tasking.queuing%b
-- system.tasking.utilities%s
-- system.tasking.utilities%b
-- system.tasking.entry_calls%s
-- system.tasking.rendezvous%s
-- system.tasking.protected_objects.operations%s
-- system.tasking.protected_objects.operations%b
-- system.tasking.entry_calls%b
-- system.tasking.rendezvous%b
-- system.tasking.stages%s
-- system.tasking.stages%b
-- def_monitor%s
-- def_monitor%b
-- blancaneus%b
-- END ELABORATION ORDER
end ada_main;
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.