content
stringlengths
23
1.05M
----------------------------------------------------------------------- -- asf-events-phases -- Lifecycle phase event -- Copyright (C) 2012 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 ex...
with Ada.Containers; use Ada.Containers; with AUnit.Assertions; use AUnit.Assertions; with Libadalang.Analysis; use Libadalang.Analysis; with Libadalang.Common; use Libadalang.Common; with Missing.AUnit.Assertions; use Missing.AUnit.Assertions; with Rejuvenation; ...
with Ada.Text_IO;use Ada.Text_IO; with Ada.Float_Text_IO;use Ada.Float_Text_IO; procedure newton is Number: Float; Accuracy: Float; a0: Float; ak: Float; begin put("Enter your number : "); get(Number); put("Enter the accuracy : "); get(Accuracy); a0 := 1.0; ak := 1.0; loop ...
package body Swaps is procedure Swap (Value_1 : in out Integer; Value_2 : in out Integer) is Tmp : Integer; begin Tmp := Value_1; Value_1 := Value_2; Value_2 := Tmp; end Swap; end Swaps;
with Interfaces; use Interfaces; package STM32.F4.USART is pragma Pure; type Status_Register is record PE: Boolean; -- Psrity error FE: Boolean; -- Framing error NF: Boolean; -- Noise detection flag ORE: Boolean; -- Overrun error IDLE: Boolean; -- IDLE line detected RXNE: Boolean; -- Read data register n...
with Ada.Text_IO; with Ada.Long_Integer_Text_IO; package body Problem_02 is package IO renames Ada.Text_IO; procedure Solve is n : Long_Integer; n_1 : Long_Integer := 1; n_2 : Long_Integer := 0; sum : Long_Integer := 0; begin loop n := n_1 + n_2; exit when n > ...
with RTCH.Maths.Vectors; with RTCH.Maths.Points; package RTCH.Maths.Tuples.Steps is -- @given ^a ← tuple\(([-+]?\d+\.?\d*), ([-+]?\d+\.?\d*), ([-+]?\d+\.?\d*), ([-+]?\d+\.?\d*)\)$ procedure Given_Tuple_A (X, Y, Z, W : Float); -- @then ^a.x = ([-+]?\d+\.?\d*)$ procedure Then_A_X_Is (Expected : Float); ...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Command_Line; use Ada.Command_Line; procedure Hello is type Hello_Integer is array (Positive range 2 .. 4) of Integer; V : hello_integer := (3, 5, 7); procedure Say_Hello_To (Name : String) is begin Put ("hello "); Put_Line (Name); end S...
with STM32.GPIO; use STM32.GPIO; with mpu6000_spi; use mpu6000_spi; with Config; use Config; with Interfaces; use Interfaces; -- -- Accel is MPU 6000 -- package spi_accel is procedure init; type accel_data is record X, Y, Z : Short_Integer; GX, GY, GZ : Short_Integer; end record; ...
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2021 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...
----------------------------------------------------------------------- -- awa-mail -- Mail module -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compl...
with Ada.Command_Line; with Ada.Text_IO; with GNU_Multiple_Precision.Big_Integers; with GNU_Multiple_Precision.Big_Rationals; use GNU_Multiple_Precision; procedure Pi_Digits is type Int is mod 2 ** 64; package Int_To_Big is new Big_Integers.Modular_Conversions (Int); -- constants Zero : constant Big_Integ...
procedure Extension_Aggregate is type Parent is tagged record C1 : Float; C2 : Float; end record; type Extension is new Parent with record C3 : Float; C4 : Float; end record; Parent_Var : Parent := (C1 => 1.0, C2 => 2.0); Exten_Var : Extension; b...
package Lv.Strings is function New_String (Str : String) return Lv.C_String_Ptr; procedure Free (Ptr : in out Lv.C_String_Ptr); end Lv.Strings;
-- { dg-do run } with OCONST1, OCONST2, OCONST3, OCONST4, OCONST5; procedure Test_Oconst is begin OCONST1.check (OCONST1.My_R); OCONST2.check (OCONST2.My_R); OCONST3.check (OCONST3.My_R); OCONST4.check (OCONST4.My_R); OCONST5.check (OCONST5.My_R0, 0); OCONST5.check (OCONST5.My_R1, 1); end;
with Ada.Sequential_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Lexer is type Token_Type is ( Invalid, Literal, Open, Close, EOF ); type Lexer_Type is limited private; procedure Open(lexer : out Lexer_Type; file_name : in St...
-------------------------------------------------------------------------------- -- -- -- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers. -- -- ...
with AdaM.Comment, gtk.Widget; private with gtk.Text_View, gtk.Frame, gtk.Button, gtk.Alignment; package aIDE.Editor.of_comment is type Item is new Editor.item with private; type View is access all Item'Class; package Forge is function to_comment_Editor (the_Comment...
with Ada.Tags; with Ada.Unchecked_Deallocation; with System.Standard_Allocators; with System.Storage_Elements; with System.Storage_Pools.Standard_Pools; procedure Ada.Unchecked_Reallocation ( X : in out Name; First_Index : Index_Type; Last_Index : Index_Type'Base) is pragma Suppress (All_Checks); use typ...
package Giza.Bitmap_Fonts.FreeSansBoldOblique8pt7b is Font : constant Giza.Font.Ref_Const; private FreeSansBoldOblique8pt7bBitmaps : aliased constant Font_Bitmap := ( 16#39#, 16#CC#, 16#63#, 16#10#, 16#8C#, 16#00#, 16#39#, 16#80#, 16#CF#, 16#38#, 16#A2#, 16#0D#, 16#86#, 16#47#, 16#F9#, 16#FE#, 16#32#, 16#09...
-- This package has been generated automatically by GNATtest. -- You are allowed to add your code to the bodies of test routines. -- Such changes will be kept during further regeneration of this file. -- All code placed outside of test routine bodies will be lost. The -- code intended to set up and tear down the t...
package Pack22_Pkg is type byte is mod 256; Temp_buffer : array (0..8) of byte:= (others => 0); for Temp_buffer'Alignment use 2; subtype Id is Short_integer; generic Dummy : Integer := 0; package Bit_Map_Generic is type List is private; function "xor" (L, R : List) return List; ...
with Unchecked_Deallocation; package body Prot2_Pkg2 is protected type Rec is private M : T; end Rec; protected body Rec is end; procedure Create (B : out Id) is begin B := new Rec; end; procedure Delete (B : in out Id) is procedure Free is new Unchecked_Deallocation(Obj...
package body openGL.Frustum is procedure normalise (Planes : in out Plane_array) is use Geometry_3D; begin for Each in Planes'Range loop normalise (Planes (Each)); end loop; end normalise; end openGL.Frustum;
package body Array28_Pkg is function F return Inner_Type is begin return "12345"; end; end Array28_Pkg;
------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- ...
-- Enter your code here. Read input from STDIN. Print output to STDOUT with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; procedure Solution is function solveMeFirst (a, b: Integer) return Integer is begin -- Hint: Type return a+b; below return a+b;...
-- Ada_GUI implementation based on Gnoga. Adapted 2021 -- -- -- GNOGA - The GNU Omnificent GUI for Ada -- -- -- -- G N...
with Ada.Numerics.Generic_Elementary_Functions; package RTCH.Maths with Pure is pragma Warnings (Off); -- Turn off "unused" warning. package Float_Elementary_Functions is new Ada.Numerics.Generic_Elementary_Functions (Float); use Float_Elementary_Functions; pragma Warnings (On); Epsilon : constant...
package STM32GD.USART is pragma Preelaborate; type USART_Instance is (USART_1, USART_2, USART_3); end STM32GD.USART;
----------------------------------------------------------------------- -- awa-users-module -- User management module -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); --...
-- SPDX-License-Identifier: MIT -- -- Contributed by ITEC - NXP Semiconductors -- June 2008 -- -- Copyright (c) 2008 - 2018 Gautier de Montmollin (maintainer) -- SWITZERLAND -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (...
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- package Program.Elements.Statements is pragma Pure (Program.Elements.Statements); type Statement is limited interface and Program.Elements.Element; ...
-- C85006F.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...
-- Copyright (c) 2020-2021 Bartek thindil Jasicki <thindil@laeran.pl> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless req...
-- C64108A.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...
------------------------------------------------------------------------------ -- G E L A X A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
-- MIT License -- -- Copyright (c) 2020 Max Reznik -- -- 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, mo...
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. with Ada.Unchecked_Deallocation; package body Apsepp.Generic_Shared_Instance is ---------------------------------------------------------------------------- procedure Unl_CB is begin if Unlock_...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
------------------------------------------------------------------------------ -- Copyright (c) 2017-2019, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- p...
----------------------------------------------------------------------- -- gen-artifacts-distribs -- Artifact for distributions -- Copyright (C) 2012, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not ...
with Ada.Containers.Vectors; private package Extraction.Utilities is type Project_Context is private; function Open_Project (Project : String) return Project_Context; package Analysis_Unit_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => LAL.Analysis_Unit, "=" ...
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with System; with Interfaces.C.Strings; with bits_types_h; with stddef_h; package bits_types_struct_FILE_h is -- Copyright (C) 1991-2021 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- The GNU C Li...
with Plugins; with EU_Projects.Projects; package Project_Processor.Parsers is subtype Parser_Parameter is Plugins.Parameter_Map; subtype Parser_Parameter_access is Plugins.Parameter_Map_Access; type Parser_ID is new String; No_Parser : constant Parser_ID := ""; function Find_Parser (File_Extension :...
-- Copyright (c) 2021 Devin Hill -- zlib License -- see LICENSE for details. package body GBA.Display.Backgrounds is procedure Set_Offset_X (BG : BG_ID; Value : BG_Scroll_Offset) is begin BG_Offsets (BG).X := Value; end; procedure Set_Offset_Y (BG : BG_ID; Value : BG_Scroll_Offset) is begin BG_Off...
pragma License (Unrestricted); -- BSD 3-Clause -- translated unit from dSFMT -- -- Copyright (c) 2007, 2008, 2009 Mutsuo Saito, Makoto Matsumoto -- and Hiroshima University. -- Copyright (c) 2011, 2002 Mutsuo Saito, Makoto Matsumoto, Hiroshima -- University and The University of Tokyo. -- All rights reserved. -- ...
----------------------------------------------------------------------- -- css-core-values -- Representation of CSS property value(s). -- Copyright (C) 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you m...
with System; with Interfaces.C; use Interfaces.C; with Interfaces; package Lv is subtype Int8_T is Interfaces.Integer_8; subtype Uint8_T is Interfaces.Unsigned_8; subtype Int16_T is Interfaces.Integer_16; subtype Uint16_T is Interfaces.Unsigned_16; subtype Int32_T is Interfaces.Integer_32; subtype U...
-- Time-stamp: <23 oct 2012 10:40 queinnec@enseeiht.fr> with LR.Tasks; use LR.Tasks; package body LR.Simu is Is_Running : Boolean := True; Nb_Procs : Positive; Timespeed : Positive := 1; -- in 1..100 Basefreq : constant Positive := 100; -- sleep unit : 1/Basefreq type Proc_Sleep_Record is ...
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure euler06 is type stringptr is access all char_array; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Str...
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2020 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 ncurses Binding Samples -- -- -- -- ...
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with System; package Glfw.Monitors is type Event is (Connected, Disconnected); type Video_Mode is record Width, Height : Interfaces.C.int; Red_Bits, Green_Bits, Blue_Bits : Interfac...
package Loop_Optimization14_Pkg is procedure Proc (B : in out Boolean); end Loop_Optimization14_Pkg;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ...
-- ___ _ ___ _ _ -- -- / __| |/ (_) | | Common SKilL implementation -- -- \__ \ ' <| | | |__ generic subpools -- -- |___/_|\_\_|_|____| by: Timm Felden ...
with Lv.Area; with System; package Lv.Hal.Indev is type Indev_Type_T is (Type_None, Type_Pointer, Type_Keypad, Type_Button, Type_Encoder); type Indev_State_T is (State_Rel, State_Pr); type Indev_Data_T_Unio...
generic type Element_Type is private; type Element_Array is array (Positive range <>) of Element_Type; package Mode is function Get_Mode (Set : Element_Array) return Element_Array; end Mode;
with AUnit; -------------------- -- Uuid.Test_Main -- -------------------- with AUnit.Reporter.Text; with AUnit.Run; with GNATCOLL.uuid.Suite; procedure GNATCOLL.uuid.Test_Main is procedure Run is new AUnit.Run.Test_Runner (GNATCOLL.uuid.Suite.Suite); reporter : AUnit.Reporter.Text.Text_Reporter; begin Run (r...
-- Lumen.Joystick -- Support (Linux) joysticks under Lumen -- -- Chip Richards, NiEstu, Phoenix AZ, Summer 2010 -- This code is covered by the ISC License: -- -- Copyright © 2010, NiEstu -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, pr...
pragma License (Unrestricted); -- ICU License -- translated unit from icu4c of http://site.icu-project.org/ -- -- ********************************************************************** -- * Copyright (C) 1996-2010, International Business Machines -- * Corporation and others. All Rights Reserved. -- **********...
with Rejuvenation; use Rejuvenation; with Rejuvenation.Finder; use Rejuvenation.Finder; with Rejuvenation.Placeholders; use Rejuvenation.Placeholders; with Rejuvenation.Replacer; use Rejuvenation.Replacer; with String_Maps; use String_Maps; package body Rejuvenation.Find_And_Replac...
-- Copyright 2016-2019 NXP -- All rights reserved.SPDX-License-Identifier: BSD-3-Clause -- This spec has been automatically generated from LPC55S6x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package NXP_SVD.USART is pragma Preelaborate; ...
with Tipos_Tarea; use Tipos_Tarea; procedure Crea_Tarea_De_Tipo is T1 : Tarea_Repetitiva(1); T2 : Tarea_Repetitiva(2); T3 : Tarea_Repetitiva(3); type Tarea_Ptr is access Tarea_Repetitiva; T : Tarea_Ptr; begin T := new Tarea_Repetitiva(4); end Crea_Tarea_De_Tipo;
-- pragma SPARK_Mode; with Wire; use Wire; package body Zumo_L3gd20h is Chip_Addr : constant := 2#0110_1011#; Chip_ID : constant := 2#1101_0111#; procedure Check_WHOAMI is ID : Byte; begin ID := Wire.Read_Byte (Addr => Chip_Addr, Reg => Regs (WHO_AM_I)); ...
pragma Ada_2012; with Ada.Containers; with Protypo.Api.Engine_Values.Constant_Wrappers; with Protypo.Api.Engine_Values.Range_Iterators; with Protypo.Api.Field_Names; pragma Warnings (Off, "no entities of ""Ada.Text_IO"" are referenced"); with Ada.Text_Io; use Ada.Text_Io; package body Protypo.Api.Engine_Values.Engin...
with Greetings; procedure Gmain is begin Greetings.Hello; Greetings.Middle; Greetings.Goodbye; end Gmain;
with Lumen.Image; package Mandelbrot is function Create_Image (Width, Height : Natural) return Lumen.Image.Descriptor; end Mandelbrot;
-- The Village of Vampire by YT, このソースコードはNYSLです with Ada.Numerics.MT19937; package Vampire.Villages.Teaming is type Role_Set is array (Person_Role) of Natural; type Role_Set_Array is array (Positive range <>) of Role_Set; function Possibilities ( People_Count : Ada.Containers.Count_Type; Male_And_Female : B...
package body Discr10 is function Get (X : R) return R is begin return R'(D1 => False, D2 => False, D3 => X.D3); end; end Discr10;
pragma License (Unrestricted); with Ada.Characters.Conversions; with Ada.Strings.Generic_Hash; function Ada.Strings.Wide_Hash is new Generic_Hash (Wide_Character, Wide_String, Characters.Conversions.Get); pragma Pure (Ada.Strings.Wide_Hash);
package openGL.Model.sphere -- -- Provides an abstract model of a sphere. -- is type Item is abstract new Model.item with record null; end record; type View is access all Item'Class; -------------- --- Attributes -- overriding function Bounds (Self : in Item) return openGL...
-- { dg-do compile } -- { dg-options "-gnatws" } package Discr_Private is package Dec is type T_DECIMAL (Prec : Integer := 1) is private; private type T_DECIMAL (Prec : Integer := 1) is record case Prec is when 1 .. 2 => Value : Integer; when others => null; ...
------------------------------------------------------------------------------ -- -- -- Giza -- -- -- -- ...
pragma Initialize_Scalars; with Ada.Text_IO; use Ada.Text_IO; procedure Invalid_Value is type Color is (Red, Green, Blue); X : Float; Y : Color; begin if not X'Valid then Put_Line ("X is not valid"); end if; X := 1.0; if X'Valid then Put_Line ("X is" & Float'Image (X)); end if; ...
with STM32GD.Board; with STM32GD.Clock; with STM32GD.Clock.Tree; with STM32GD.Clock.Timer; with STM32GD.RTC; procedure Main is package Board renames STM32GD.Board; package Clock renames STM32GD.Clock; package Delay_Timer is new STM32GD.Clock.Timer (Clock_Tree => Board.CLOCKS, Input => Clock.SYSCLK); pack...
-- -- Jan & Uwe R. Zimmer, Australia, July 2011 -- with GLOBE_3D; with Real_Type; use Real_Type; with Rotations; use Rotations; with Vectors_2D_N; use Vectors_2D_N; with Vectors_3D; use Vectors_3D; package Graphics_Structures is type RGB is (Red, Green, Blue); type ...
----------------------------------------------------------------------- -- are-generator-ada2012-tests -- Tests for Ada generator -- Copyright (C) 2021 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use ...
with P_StructuralTypes; use P_StructuralTypes; with Ada.Text_IO; use Ada.Text_IO; with Ada.Sequential_IO; with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Strings.Unbounded.Text_IO; with Ada.Streams; use Ada.Streams; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Calendar; use Ada.Calend...
with Ada.Command_Line; with Ada.Streams; with Ada.Streams.Stream_IO; with Ada.Text_IO; with Ada.Integer_Text_IO; with zlib.Streams; procedure test_streams is Verbose : Boolean := False; Text : constant String := "Hello, zlib!"; Temporary_File : Ada.Streams.Stream_IO.File_Type; Extracted : String (1 .. 1024); Extra...
package inline_scope_p is procedure Assert (Expr : Boolean; Str : String); pragma Inline (Assert); end;
-- $Id: scandrv.adb,v 1.2 1997/05/27 21:44:35 grosch rel $ $@ with @, Text_Io, Position, Strings; $@ use @, Text_Io, Position, Strings; $@ procedure @Drv is package Int_Io is new Text_Io.Integer_IO (Integer); use Int_Io; Token : Integer := 1; Word : tString; Debug : Boolean := False; Count : Integ...
with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.MAC; use SPARKNaCl.MAC; with SPARKNaCl.Debug; use SPARKNaCl.Debug; procedure Onetimeauth2 is RS : constant Poly_1305_Key := Construct ((16#ee#, 16#a6#, 16#a7#, 16#25#, 16#1c#, 16#1e#, 16#72#, 16#91#, 16#6d#, 16#11#, 16#c2#, ...
with Interfaces; use Interfaces; with MSPGD; with MSPGD.Board; use MSPGD.Board; with MSPGD.SPI; with Drivers.Text_IO; procedure Main is pragma Preelaborate; package Text_IO is new Drivers.Text_IO (USART => MSPGD.Board.UART); Buffer : MSPGD.Buffer_Type (0 .. 15); begin Init; LED_RED.Init; SPI.Init;...
------------------------------------------------------------------------------ -- A d a r u n - t i m e s p e c i f i c a t i o n -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
-- SPDX-License-Identifier: MIT -- -- Copyright (c) 1999 - 2018 Gautier de Montmollin -- SWITZERLAND -- -- 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...
with ada.containers.indefinite_ordered_maps; with gnat.regexp; with numbers; use numbers; package env is use type word; package environment_t is new ada.containers.indefinite_ordered_maps( element_type => word, key_type => string); environment : environment_t.map; function validate_variable (s : string)...
with Ada.Characters.Latin_1; with Ada.Command_Line; with Ada.Streams.Stream_IO.Pipes; with Ada.Strings.Unbounded_Strings; package body GNAT.Expect is use type GNAT.OS_Lib.Argument_List; function Get_Command_Output ( Command : String; Arguments : GNAT.OS_Lib.Argument_List; Input : String; ...
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. (gh+spat@heisenbug.eu) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hoc...
pragma License (Unrestricted); -- implementation unit required by compiler package System.Byte_Swapping is pragma Pure; type U16 is mod 2 ** 16; type U32 is mod 2 ** 32; type U64 is mod 2 ** 64; function Bswap_16 (X : U16) return U16 with Import, Convention => Intrinsic, External_Name =...
separate (Numerics.Sparse_Matrices) function Plus2 (Left : in Sparse_Matrix; Right : in Sparse_Matrix) return Sparse_Matrix is use Ada.Text_IO, Ada.Containers; X, Y : RVector; Ai, Aj, Bi, Bj : IVector; N_Row, N_Col : Pos; N : constant Count_Type := Left.X.Length + Right.X.Length; C : Sparse_Matrix...
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- with Ada.Containers.Doubly_Linked_Lists; w...
with Ada.Text_IO, Ada.Calendar, System; use Ada.Text_IO, Ada.Calendar, System; procedure Planificador_Ciclico_Con_Prioridades is Comienzo : Time := Clock; -- hora de comienzo -- Tarea principal task Principal is entry Ejecutar (Id: in Integer; Tiempo : in Integer); end Principal; task body Prin...
-- { dg-do run } with Text_IO; use Text_IO; with Self; use Self; procedure Test_Self is It : Lim := G (5); begin Change (It, 10); if Get (It) /= 35 then Put_Line ("self-referential aggregate incorrectly built"); end if; end Test_Self;
with Ada.Text_Io; use Ada.Text_Io; procedure Read_Stream is Line : String(1..10); Length : Natural; begin while not End_Of_File loop Get_Line(Line, Length); -- read up to 10 characters at a time Put(Line(1..Length)); -- The current line of input data may be longer than the string receiving t...
-- Copyright (c) 2021 Devin Hill -- zlib License -- see LICENSE for details. package body GBA.DMA.Generic_Interfaces is Use_Full_Word : constant Boolean := (Element_Type'Size >= 32 and then Element_Type'Size mod 32 = 0); function Memset_Info ( Count : Transfer_Count_Type ) return Transfer_Info is (( Des...
-- { dg-do compile { target i?86-*-* x86_64-*-* } } -- { dg-options "-O3 -msse2 -fdump-tree-vect-details" } package body Vect13 is function "+" (X, Y : Sarray) return Sarray is R : Sarray; begin for I in Sarray'Range loop pragma Loop_Optimize (Vector); R(I) := X(I) + Y(I); en...