content stringlengths 23 1.05M |
|---|
-- Chip Richards, Phoenix AZ, April 2007
-- Lumen would not be possible without the support and contributions of a cast
-- of thousands, including and primarily Rod Kay.
-- This code is covered by the ISC License:
--
-- Copyright © 2010, NiEstu
--
-- Permission to use, copy, modify, and/or distribute this software f... |
with System.Storage_Elements; use System.Storage_Elements;
with MSP430_SVD; use MSP430_SVD;
with MSP430_SVD.SYSTEM_CLOCK; use MSP430_SVD.SYSTEM_CLOCK;
with MSPGD.GPIO; use MSPGD.GPIO;
with MSPGD.GPIO.Pin;
with Startup;
package body Board is
CALDCO_1MHz : DCOCTL_Register with Import, Address => System'To_Address (1... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
-----------------------------------------------------------------------
-- gen-artifacts-xmi -- UML-XMI artifact for Code Generator
-- Copyright (C) 2012, 2013, 2014, 2016, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "Licen... |
-----------------------------------------------------------------------
-- awa-events -- AWA Events
-- Copyright (C) 2012, 2015, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except i... |
pragma Ada_2012;
with Adventofcode.File_Line_Readers;
package body Adventofcode.Day_9 is
----------
-- Read --
----------
procedure Read (Self : in out Decoder; From_Path : String) is
begin
Self.Last := 0;
Self.Data := (others => 0);
for Line of Adventofcode.File_Line_Readers.Read_Lin... |
function Grayscale (Picture : Image) return Grayscale_Image is
type Extended_Luminance is range 0..10_000_000;
Result : Grayscale_Image (Picture'Range (1), Picture'Range (2));
Color : Pixel;
begin
for I in Picture'Range (1) loop
for J in Picture'Range (2) loop
Color := Picture (I, J);
... |
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
package body GL.Objects.Lists is
function Create (Raw : UInt_Array) return List is
begin
return List'(Count => Raw'Length, Contents => Raw);
end Create;
function First (Object : List... |
with Ada.Text_IO;
with PrimeInstances;
package body Problem_41 is
package IO renames Ada.Text_IO;
package Positive_Primes renames PrimeInstances.Positive_Primes;
type Prime_Magnitude is new Positive range 1 .. 9;
procedure Solve is
gen : Positive_Primes.Prime_Generator := Positive_Primes.Make_Generato... |
-- { dg-do compile }
-- { dg-options "-gnatws" }
with Discr15_Pkg; use Discr15_Pkg;
procedure Discr15 (History : in Rec_Multi_Moment_History) is
Sub: constant Rec_Multi_Moment_History := Sub_History_Of (History);
subtype Vec is String(0..Sub.Last);
Mmts : array(1..Sub.Size) of Vec;
begin
null;
end;
|
-----------------------------------------------------------------------
-- asf.beans -- Bean Registration and Factory
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you ... |
package Opt9_Pkg is
N : integer := 15;
end Opt9_Pkg;
|
-- { dg-do compile }
package body Enclosing_Record_Reference is
R: aliased T;
function F1 (x: integer) return T is begin return R; end;
function F2 (x: T) return integer is begin return 0; end;
function F3 (x: T) return T is begin return R; end;
function F4 (x: intege... |
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Calendar; use Ada.Calendar;
with Ada.Numerics.Big_Numbers.Big_Integers;
use Ada.Numerics.Big_Numbers.Big_Integers;
with Fibonacci;
with Perfect_Number;
with Primes;
with Aux_Image; use Aux_Image;
procedure Main is
package Fib renames Fibonacci;
package Pn renames Per... |
pragma Ada_2012;
with Brackelib.Stacks;
with Ada.Characters.Conversions;
package body Compiler.Parser is
type State is
(State_Start, State_Inside_Handlebars, State_Inside_Component_Declaration,
State_Inside_Complex_Comment, State_Inside_Simple_Comment);
package State_Stacks is new Brackelib.Stacks (T => ... |
-----------------------------------------------------------------------
-- keystore-repository -- Repository management for the keystore
-- Copyright (C) 2019, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you... |
procedure Ranges is
type Small is range 0E1 .. 1E2;
begin
null;
end Ranges;
|
package body Generic_Queue with SPARK_Mode is
-- Buffer Structure:
-- | 0:X | 1:– | 2:– | 3:– |
-- ^h ^t
-- head(h) points to oldest, tail(t) to next free,
-- empty: t=h, full: t=h => Flag Self.hasElements required
---------------
-- copy_array
---------------
procedure copy... |
with Lv.Hal.Indev;
with Lv.Objx;
with Lv.Area;
with Lv.Group;
package Lv.Indev is
-- Initialize the display input device subsystem
procedure Init;
-- Get the currently processed input device. Can be used in action functions too.
-- @return pointer to the currently processed input device or NULL if no ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Numerics.Generic_Elementary_Functions;
package body Decomposition is
package Math is new Ada.Numerics.Generic_Elementary_Functions
(Matrix.Real);
procedure Decompose (A : Matrix.Real_Matrix; L : out Matrix.Real_Matrix) is
use type Matrix.Real_Matrix, Matrix.Real;
Order : constant Posit... |
with Ada.Text_IO;
procedure Maze_Solver is
X_Size: constant Natural := 45;
Y_Size: constant Natural := 17;
subtype X_Range is Natural range 1 .. X_Size;
subtype Y_Range is Natural range 1 .. Y_Size;
East: constant X_Range := 2;
South: constant Y_Range := 1;
X_Start: constant X_Range := 3; --... |
with
openGL.Visual,
openGL.Demo,
openGL.Model.terrain;
procedure launch_Model_scaling
--
-- Exercise the scaling of models.
--
is
use openGL,
openGL.Math,
openGL.linear_Algebra_3d;
begin
Demo.print_Usage;
Demo.define ("openGL 'Model Scaling' Demo");
Demo.Camera.Position_is ((... |
-- { dg-do compile }
-- { dg-options "-O -gnatn" }
package body Atomic4 is
procedure Next (Self : in out Reader'Class) is
begin
Self.Current_Reference := Self.Reference_Stack.Last_Element;
Self.Reference_Stack.Delete_Last;
end Next;
end Atomic4;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2019 onox <denkpadje@gmail.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/L... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Text_IO;
with Ada.Strings.Fixed;
with Emojis;
procedure Test is
use Emojis;
use Ada.Text_IO;
package SF renames Ada.Strings.Fixed;
begin
Put_Line ("Text emojis:");
for Pair of Emojis.Text_Emojis loop
Put_Line
(SF.Tail (+Pair.Text, 3) & " = " & Emojis.Replace (":" & (+Pair.Label)... |
with
eGL.Pointers;
package eGL.NativeDisplayType
is
subtype Item is eGL.Pointers.Display_Pointer;
type Item_array is array (C.size_t range <>) of aliased Item;
type Pointer is access all eGL.NativeDisplayType.Item;
type Pointer_array is array (C.size_t range <>) of aliased ... |
-- C41201D.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimit... |
with VisitFailurePackage, VisitablePackage, EnvironmentPackage;
use VisitFailurePackage, VisitablePackage, EnvironmentPackage;
with Ada.Text_IO; use Ada.Text_IO;
package body MuVarStrategy is
----------------------------------------------------------------------------
-- Object implementation
--------------------... |
-- Weather update server
-- Binds PUB socket to tcp://*:5556
-- Publishes random weather updates
with Ada.Command_Line;
with Ada.Text_IO;
with Ada.Numerics.Discrete_Random;
with GNAT.Formatted_String;
with ZMQ;
procedure WUServer is
use type GNAT.Formatted_String.Formatted_String;
type Zip_Code_T is range... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- 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;
... |
-- ////////////////////////////////////////////////////////////
-- //
-- // SFML - Simple and Fast Multimedia Library
-- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
-- //
-- // This software is provided 'as-is', without any express or implied warranty.
-- // In no event will the authors be held li... |
--Alvaro Fernandez Velazquez (a_fernandez@usal.es)
--Francisco Blazquez Matias (fran_blm@usal.es)
with Ada.Real_Time;
with Ada.Real_Time.Timing_Events;
use Ada.Real_Time;
package Monitor is
protected type Reactor is
procedure leer(temp : out Integer);
procedure incrementar(incremento:Integer);
proc... |
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Characters.Handling; use Ada.Characters.Handling; -- définit is_digit
with Piles;
package body Integer_IO is
procedure Afficher (N : in Integer) is
package Pile_Integer is
new Piles (Integer'Width, Integer);
use Pile_Integer;... |
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
package mmintrin_h is
-- Copyright (C) 2002-2017 Free Software Foundation, Inc.
-- This file is part of GCC.
-- GCC is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public Li... |
-- C34002C.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimit... |
-----------------------------------------------------------------------
-- Generic Quick_Sort procedure
-----------------------------------------------------------------------
generic
type Element is private;
type Index is (<>);
type Element_Array is array(Index range <>) of Element;
with function "<" (Left... |
with
Interfaces.C.Strings,
System;
use type
System.Address;
package body FLTK.Widgets.Clocks.Updated is
procedure clock_set_draw_hook
(W, D : in System.Address);
pragma Import (C, clock_set_draw_hook, "clock_set_draw_hook");
pragma Inline (clock_set_draw_hook);
procedure... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- Abstract :
--
-- Type and operations for building grammar productions.
--
-- Copyright (C) 2018 - 2020 Free Software Foundation, Inc.
--
-- This file is part of the WisiToken package.
--
-- The WisiToken package is free software; you can redistribute it
-- and/or modify it under terms of the GNU General Public... |
with Ada.Text_IO; use Ada.Text_IO;
procedure Test is
begin
Put_Line ("ABC123")
end Test; |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Slim.Messages.ANIC;
with Slim.Messages.BUTN;
with Slim.Messages.DSCO;
with Slim.Messages.HELO;
with Slim.Messages.IR;
with Slim.M... |
pragma Check_Policy (Validate => Disable);
-- with Ada.Strings.Naked_Maps.Debug;
with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
with System.UTF_Conversions.From_8_To_32;
with System.UTF_Conversions.From_16_To_32;
with System.UTF_Conversions.From_32_To_8;
with System.UTF_Conversions.From_32_To_16;
pack... |
-- Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
--
-- SPDX-License-Identifier: BSD-3-Clause
-- This spec has been automatically generated from rp2040.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package RP_SVD.RESETS is
pragma Preelaborate... |
with Gprslaves.DB;
with GNAT.Spitbol.Table_VString;
package GPR_Tools.Gprslaves.Nameserver.Client is
procedure Register (Server : DB.Info_Struct);
function Find (Keys : GNAT.Spitbol.Table_VString.Table) return DB.Host_Info_Vectors.Vector;
end GPR_Tools.Gprslaves.Nameserver.Client;
|
with HAL;
generic
with package I2C is new HAL.I2C (<>);
package Drivers.Si7006 is
subtype Temperature_Type is Integer range -10000 .. 10000;
subtype Humidity_Type is Natural range 0 .. 100;
function Temperature_x100 return Temperature_Type;
function Humidity return Humidity_Type;
end Drivers.Si700... |
-- Handle Foreign Command
--
-- 2.9.92 sjw; orig
with Lib;
with Condition_Handling;
with System;
procedure Handle_Foreign_Command is
function Get_Foreign return String;
function To_Lower (C : Character) return Character;
function Get_Foreign return String is
Status : Condition_Handling.Cond_Value_Type;
... |
-- This spec has been automatically generated from STM32L5x2.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.TAMP is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- control register 1
typ... |
limited with WebIDL.Scanners;
with WebIDL.Tokens;
with WebIDL.Scanner_Types;
package WebIDL.Scanner_Handlers is
pragma Preelaborate;
type Handler is abstract tagged limited null record;
procedure Delimiter
(Self : not null access Handler;
Scanner : not null access WebIDL.Scanners.Scanner'Class... |
package body Opt15_Pkg is
procedure Trace_Non_Inlined is
begin
raise Program_Error;
end;
procedure Trace_Inlined is
begin
Trace_Non_Inlined;
end;
end Opt15_Pkg;
|
------------------------------------------------------------------------
--
-- Copyright (c) 2018, Brendan T Malone All Rights Reserved.
--
-- 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 a... |
with Numerics, Numerics.Sparse_Matrices;
use Numerics, Numerics.Sparse_Matrices;
package Auto_Differentiation is
type Evaluation_Level is (Value, Gradient, Hessian);
Level : Evaluation_Level := Hessian;
type AD_Type is private;
type AD_2D is array (1 .. 2) of AD_Type;
type AD_Vector is a... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- ... |
with Ada.Exception_Identification.From_Here;
with Ada.Exceptions.Finally;
with Ada.Unchecked_Conversion;
with System.Formatting;
with System.Long_Long_Integer_Types;
with System.Once;
with System.Termination;
with System.Zero_Terminated_WStrings;
with System.Debug; -- assertions
with C.psdk_inc.qwsadata;
with C.winnt;
... |
separate (Numerics.Sparse_Matrices)
function Norm2 (Item : in Sparse_Matrix) return Real is
Sum, Result : Real := 0.0;
X : RVector renames Item.X;
P : IVector renames Item.P;
-- use Real_Functions;
begin
if Item.N_Col = 1 or else Item.N_Row = 1 then
-- 2-norm for vectors
for Item of X l... |
with Ada.Text_IO;
with Ada.Streams.Stream_IO;
package body NeuralNet.IO is
file_magic_mark: constant Integer := 16#666DEAD#;
file_format_version: constant Integer := 1;
procedure save(nn: in NeuralNet.Net; path: in String) is
output_file: Ada.Streams.Stream_IO.File_Type;
output_stream: Ada.Strea... |
with Units; use Units;
package unav with SPARK_Mode is
EARTH_RADIUS : constant Length_Type := 6378.137 * Kilo * Meter;
function Get_Distance return Length_Type with
Post => Get_Distance'Result in 0.0 * Meter .. 2.0*EARTH_RADIUS*180.0*Degree;
end unav;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Containers.Indefinite_Ordered_Maps;
with kv.avm.Instructions;
with kv.avm.Registers;
with kv.avm.Memories;
with kv.avm.Methods; use kv.avm.Methods;
package kv.avm.Actors is
use kv.avm.Instructions;
package Subroutines is new Ada.Containers.Indefinite_Ordered_Maps
(Key_Type => String,
... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
pragma License (Unrestricted);
with Ada.Strings.Generic_Unbounded.Generic_Hash;
with Ada.Strings.Wide_Hash;
function Ada.Strings.Wide_Unbounded.Wide_Hash is
new Unbounded_Wide_Strings.Generic_Hash (Wide_Hash);
pragma Preelaborate (Ada.Strings.Wide_Unbounded.Wide_Hash);
|
-- { dg-do compile }
procedure parameterlessfunc is
type Byte is mod 256;
type Byte_Array is array(Byte range <>) of Byte;
subtype Index is Byte range 0..7;
subtype Small_Array is Byte_Array(Index);
function F return Byte_Array is
begin
return (0..255=>0);
end F;
B5: Small_Array := F(Index);... |
package Tail_Call_P is
type T is new Natural;
type Index is (First, Second);
type A is array (Index) of T;
My_Array : A := (0, 0);
procedure Insert (Into : A; Element : T; Value : T);
end Tail_Call_P;
|
with A_Stack; use A_Stack;
package Reverser with
SPARK_Mode
is
subtype Array_Range is Natural range 1 .. 10_000;
type Array_Of_Items is array (Array_Range range <>) of Item;
procedure Reverse_Array (A : in out Array_Of_Items) with
Global => (In_Out => The_Stack),
Pre => A'Length > 0 and th... |
-- { dg-do compile }
package body Class_Wide2 is
procedure Initialize is
Var_Acc : Class_Acc := new Grand_Child;
Var : Grand_Child'Class := Grand_Child'Class (Var_Acc.all);
begin
Var := Grand_Child'Class (Var_Acc.all);
end Initialize;
end Class_Wide2;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Upg3 is
function Count
return Integer is
S : String(1..3);
C : Character;
A, B : Integer;
begin
Get(S);
Get(A);
Get(C); Get(C);
Get(B);
return (B - A + 1);
en... |
-- { dg-do compile }
-- { dg-options "-gnatws -fdump-tree-gimple" }
procedure Alignment4 is
type Stream is array (1..3) of Character;
S1, S2 : Stream;
begin
S1 := S2;
end;
-- { dg-final { scan-tree-dump-not ".\F" "gimple" } }
|
with Libtcod.Color, Interfaces.C;
private with console_h, context_h, Ada.Finalization;
use Libtcod, Libtcod.Color;
package Libtcod.Console is
-- Basic types --
type X_Pos is new Interfaces.C.int range 0 .. Interfaces.C.int'Last;
type Y_Pos is new Interfaces.C.int range 0 .. Interfaces.C.int'Last;
Error ... |
-- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
--
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without modification,
-- are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice, t... |
-- { dg-do compile }
with Volatile5_Pkg; use Volatile5_Pkg;
procedure Volatile5 is
A : Rec;
procedure Proc is
begin
A := F;
end;
begin
Proc;
end;
|
-- { dg-do run }
with Discr42_Pkg; use Discr42_Pkg;
procedure Discr42 is
R : Rec;
Pos : Natural := 1;
begin
R := F (Pos);
if Pos /= 2 then
raise Program_Error;
end if;
if R /= (D => True, N => 4) then
raise Program_Error;
end if;
end;
|
--
-- Copyright (C) 2021, AdaCore
--
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32H743x.svd
with System;
package Interfaces.STM32.PWR is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Registers --
---------------
subtype CR1_LPDS_... |
-- PACKAGE Runge_5th
--
-- Package implements the 5th order Runge Kutta of Prince and Dormand.
--
-- The program integrates dY/dt = F (t, Y) where t is the
-- independent variable (e.g. time), vector Y is the dependent
-- variable, and F is some function.
--
-- When high accuracy is required, higher order rou... |
with HAL.Bitmap; use HAL.Bitmap;
with Ada.Containers.Doubly_Linked_Lists;
with BMP_Fonts; use BMP_Fonts;
with Ada.Strings.Bounded;
package Menus is
-- Actual package
-- Tick freeze when menu is displayed, to prevent mistouches
WaitTicks : constant Natural := 100;
BorderSize : constant Natural := 10;
MaxS... |
package Single_protected_Declaration is
protected Shared_Array is
private
The_Variable : Integer;
end Shared_Array;
end Single_protected_Declaration;
|
with kv.avm.References;
with kv.avm.Registers;
with kv.avm.Instructions;
package kv.avm.Methods is
type Method_Type is tagged private;
type Method_Access is access Method_Type;
function New_Method(Name : String; Code : kv.avm.Instructions.Code_Access) return Method_Access;
procedure Initialize
(Se... |
with
Shell.Commands.Safe,
Ada.Text_IO,
Ada.Exceptions;
procedure Test_Concurrent_Commands
is
use Ada.Text_IO,
Ada.Exceptions;
task Task_1;
task body Task_1
is
begin
for i in 1 .. 50_000
loop
declare
use Shell,
Shell.Commands,
... |
with CSV;
with Ada.Text_IO; use Ada.Text_IO;
package Simulation is
package CSV_here is new CSV (filename => "../rawdata.csv");
have_data : Boolean := False;
csv_file : File_Type;
Finished : Boolean := False;
procedure init;
procedure update;
procedure close;
end Simulation;
|
package Components is
-- Stats
type Health is range 0 .. 1000;
type Defense is range 0 .. 25;
end Components;
|
with
AdaM.a_Type,
AdaM.Environment;
package AdaM.Assist
is
-- function known_Types return AdaM.a_Type.Vector;
-- function known_Environment return AdaM.Environment.item;
function known_Entities return AdaM.Environment.item;
function Tail_of (the_full_Name : in String) r... |
-- -----------------------------------------------------------------------------
-- smk, the smart make
-- © 2018 Lionel Draghi <lionel.draghi@free.fr>
-- SPDX-License-Identifier: APSL-2.0
-- -----------------------------------------------------------------------------
-- Licensed under the Apache License, Version 2.0 ... |
with AUnit.Assertions; use AUnit.Assertions;
with Ada.Containers;
use type Ada.Containers.Count_Type;
package body FMS.Test is
procedure Test_Load (T : in out AUnit.Test_Cases.Test_Case'Class) is
pragma Unreferenced (T);
begin
null;
load("R8,U5,L5,D3", "U7,R6,D4,L4");
Assert(wire_1.Length =... |
-- { dg-do compile }
-- { dg-options "-O" }
with Varsize_Return2_Pkg; use Varsize_Return2_Pkg;
package Varsize_Return2 is
package My_G is new G (0);
Result : constant T := My_G.Get;
end Varsize_Return2;
|
package body impact.d3.Space.dynamic
is
--- Forge
--
package body Forge
is
procedure define (Self : out Item; dispatcher : access impact.d3.Dispatcher.item'Class;
broadphase : access impact.d3.collision.Broadphase.item'Cla... |
with Libadalang.Analysis; use Libadalang.Analysis;
package Shared is
function Nr_Of_Parameters (S_S : Subp_Spec) return Integer;
function Is_Part_Of_Subp_Def (S_S : Subp_Spec) return Boolean;
function Inside_Private_Part (Node : Ada_Node'Class) return Boolean;
end Shared;
|
-- Standard Ada library specification
-- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
... |
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Compilation_Units;
with Program.Compilation_Unit_Vectors;
package Program.Subunits is
pragma Pure;
type Subunit is limited interface
... |
with Ada.Text_IO;
procedure Euler12 is
Triangle_Num : Positive := 1;
I : Positive := 1;
J : Positive;
Num_Divisors : Natural;
begin
loop
Num_Divisors := 0;
J := 1;
while J * J <= Triangle_Num loop
if Triangle_Num mod J = 0 then
Num_Divisors := Num_Divisors + 2;
end if;
J := ... |
with Prime_Numbers, Ada.Text_IO, Ada.Command_Line;
procedure Sequence_Of_Primes is
package Integer_Numbers is new
Prime_Numbers (Natural, 0, 1, 2);
use Integer_Numbers;
Start: Natural := Natural'Value(Ada.Command_Line.Argument(1));
Stop: Natural := Natural'Value(Ada.Command_Line.Argument(2));
begi... |
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 onox <denkpadje@gmail.com>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/L... |
pragma Ada_2012;
with Ada.Unchecked_Deallocation;
use Ada;
package body Pulsada is
---------------
-- New_Block --
---------------
function New_Block
(N_Channels : Channel_Index;
N_Frames : Frame_Counter)
return Frame_Block
is
N : constant Positive := Positive (N_Channels) * P... |
with Ada.Exceptions;
with TOML.Generic_Dump;
with TOML.Generic_Parse;
package body TOML.File_IO is
procedure Get
(Stream : in out Ada.Text_IO.File_Type;
EOF : out Boolean;
Byte : out Character);
-- Callback for Parse_File
function Parse_File is new TOML.Generic_Parse
(Input_Stre... |
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ... |
with ada.characters.latin_1;
with logger;
use logger;
package body box_info is
function initialize_box(t, w, l, h, q, b : integer) return box_info_t is
box : constant box_info_t := (thickness => t,
height => h,
width => w,
... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.