content stringlengths 23 1.05M |
|---|
-- { dg-do run }
-- { dg-options "-O -gnatws" }
procedure Discr47 is
type Rec (D : Boolean := False) is record
case D is
when True => null;
when False => C : Character;
end case;
end record;
R : Rec;
begin
if R'Size /= 16 then
raise Program_Error;
end if;
end;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- 3-D gear wheels.
-- -----------------------------------------------------
-- A more simple version of this program was originaly
-- created in C by Brian Paul.
-- -----------------------------------------------------
-- Conversion to Ada + SDL, and extensions, written by:
-- Antonio F. Vargas - Ponta Delga... |
--------------------------------------------------------------------------------
-- Copyright (C) 2020 by Heisenbug Ltd. (gh+owm@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 Ho... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
package body STR_Pack is
SCCS_ID : constant String := "@(#) str_pack.ada, Version 1.2";
Rcs_ID : constant String := "$Header: str_pack.a,v 0.1 86/04/01 15:13:01 ada Exp $";
function Upper_Case (S : in STR) return STR is
Upper_STR : STR (S.Name'Length) := S;
begin
for I in 1..S.Length loop
... |
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Buffer_Package; use Buffer_Package;
package Utilities_Package is
type ERR_TYPE is (
ENDOFFILE,
NOBLOCKMARKED,
INVALIDEFUNCTIONNUMBER,
BEGINNINGOFLINE,
ENDOFLINE,
TOPOFFILE,
OUTOFMEMORY,
EMPTYCOMMAND,
CO... |
package Opt38_Pkg is
procedure Test (I : Integer);
end Opt38_Pkg;
|
pragma License (Unrestricted);
-- runtime unit
package System.Unwind.Foreign is
pragma Preelaborate;
-- This is the substitute name of any exceptions propagated from any other
-- runtimes. (s-except.ads)
Foreign_Exception : exception
with Export,
Convention => Ada,
External_Nam... |
with Ada.Characters.Latin_1;
package body afrl.cmasi.circle is
function getFullLmcpTypeName(this : Circle) return String is ("afrl.cmasi.circle.Circle");
function getLmcpTypeName(this : Circle) return String is ("Circle");
function getLmcpType(this : Circle) return UInt32_t is (CMASIEnum'Pos(CIRCLE_ENUM));... |
with bmp_test_rgb24;
with bmp_test_indexed_1bit;
with bmp_test_indexed_2bits;
with bmp_test_indexed_4bits;
with bmp_test_indexed_8bits;
with bmp_test_rgb24_dma2d;
with bmp_test_indexed_1bit_dma2d;
with bmp_test_indexed_2bits_dma2d;
with bmp_test_indexed_4bits_dma2d;
with bmp_test_indexed_8bits_dma2d;
package body Test... |
-- ----------------------------------------------------------------
-- text_read.adb
--
-- Sep/25/2011
--
-- ----------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Command_Line;
procedure text_read is
Input : File_Type;
Line : String (1 .. 10_000);
Last : Na... |
with Datos;
use Datos;
function Media ( L : Lista ) return Float is
-- pre: Dada una lista, calcular la media de sus valores
-- post: La media de los valores de la lista Suma / longitud
numelementos : Natural;
acumulador : Float;
LCopia : Lista;
begin
numelementos := 0;
acumulador := 0.0;
LCopia... |
--
-- 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.Vectors;
with Ada.Stri... |
pragma Warnings (Off);
pragma Ada_95;
pragma Source_File_Name (ada_main, Spec_File_Name => "b__draw.ads");
pragma Source_File_Name (ada_main, Body_File_Name => "b__draw.adb");
pragma Suppress (Overflow_Check);
package body ada_main is
E021 : Short_Integer; pragma Import (Ada, E021, "ada__real_time_E");
E087 : S... |
with Interfaces; use Interfaces;
package Types is
subtype Byte is Unsigned_8;
subtype Word is Unsigned_16;
subtype Address is Word range 0 .. 4095;
type Memory is array (Address) of Byte;
subtype Rom_Address is Word range 16#200# .. 16#FFF#;
type Rom is array (Rom_Address) of Byte;
type Regist... |
with text_io, task_control;
use text_io, task_control;
procedure ptask is
-- y : duration := 0.0005;
package int_io is new integer_io (integer);
use int_io;
task looper is
end;
task body looper is
begin
for j in 1 .. 100 loop
put (j);
new_line;
end loop;
new_line;
put_... |
package OO_Privacy is
type Confidential_Stuff is tagged private;
subtype Password_Type is String(1 .. 8);
private
type Confidential_Stuff is tagged record
Password: Password_Type := "default!"; -- the "secret"
end record;
end OO_Privacy;
|
with Ada.Calendar;
with Ada.Strings.Unbounded;
package Utils is
type Local_Time is new Ada.Calendar.Time;
Timezone : Ada.Strings.Unbounded.Unbounded_String;
function Shift (S : String) return String;
function Unescape (S : String) return String;
procedure Warn (Text : String);
function Clean_Text (S... |
package GStreamer is
pragma Linker_Options ("-lgstreamer-0.10");
pragma Linker_Options ("-lgobject-2.0");
pragma Linker_Options ("-lgmodule-2.0");
pragma Linker_Options ("-lgthread-2.0");
pragma Linker_Options ("-lglib-2.0");
pragma Linker_Options ("-lxml2");
end GStreamer;
|
------------------------------------------------------------------------------
-- Copyright (c) 2014-2015, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
------------------------------------------------------------------------------
-- --
-- Modular Hash Infrastructure --
-- --
-- ... |
with Ada.Strings.Wide_Unbounded;
package Symbex.Lex is
type Lexer_t is private;
--
-- Token type.
--
type Token_Kind_t is
(Token_Quoted_String,
Token_Symbol,
Token_List_Open,
Token_List_Close,
Token_EOF);
type Line_Number_t is new Positive;
type Token_t is record
Is_Valid... |
-- This package is intended to set up and tear down the test environment.
-- Once created by GNATtest, this package will never be overwritten
-- automatically. Contents of this package can be modified in any way
-- except for sections surrounded by a 'read only' marker.
with Ada.Directories; use Ada.Directories;
... |
with GESTE;
with GESTE.Grid;
pragma Style_Checks (Off);
package Game_Assets.character is
-- character
Width : constant := 2;
Height : constant := 4;
Tile_Width : constant := 16;
Tile_Height : constant := 16;
-- Down1
package Down1 is
Width : constant := 2;
Height : con... |
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Characters.Conversions;
with Ada.Command_Line;
with Ada.Text_IO;
with Ada.Wide_Wide_Text_IO;
with LLVM.Core;
with Program.Compilations;
with Prog... |
------------------------------------------------------------------------------
-- --
-- FLORIST (FSU Implementation of POSIX.5) COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
----------------------------------------
-- Copyright (C) 2019 Dmitriy Shadrin --
-- All rights reserved. --
----------------------------------------
with Pal;
with Logging_Message;
with ConfigTree;
with Ada.Strings.Unbounded;
with Ada.Containers.Vectors;
package Sinks is
use all type Logging_Messag... |
--------------------------------------------------------------
--
-- This is a highlevel binding to the lm-sensors interface
--
---------------------------------------------------------------
with Ada.Strings.Unbounded;
private with Ada.Finalization;
private with Interfaces.C;
package Sensors is
Binding_Version : c... |
with
openGL.Palette;
package openGL.Light
--
-- Models a light.
--
is
type Item is tagged private;
type Items is array (Positive range <>) of Item;
--------------
--- Attributes
--
type Id_t is new Natural;
type Kind_t is (Diffuse, Direct);
null_Id : constant Id_t;
function Id... |
with Ada.Integer_Text_IO;
with Ada.Numerics.Elementary_Functions;
-- Copyright 2021 Melwyn Francis Carlo
procedure A044 is
use Ada.Integer_Text_IO;
use Ada.Numerics.Elementary_Functions;
Max_N : constant Integer := 5E3;
Min_Pd : Integer := 1E7;
P1, P2, P1pp2, P1mp2 : Integer;
Sqrt_term : Floa... |
-- Copyright (c) 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 required... |
-- -----------------------------------------------------------------------------
-- 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 ... |
generic
type Real is digits <>;
package Generic_Quaternions is
type Quaternion is record
A, B, C, D : Real;
end record;
function "abs" (Left : Quaternion) return Real;
function Conj (Left : Quaternion) return Quaternion;
function "-" (Left : Quaternion) return Quaternion;
function "+" (Left, ... |
with Ada.Command_Line;
with Ada.Text_IO;
with Code_Count; use Code_Count;
-- CC
procedure Cc is
CM : Code_Count.CodeMate;
TM : Code_Count.TotalCodeMate;
begin
if Ada.Command_Line.Argument_Count < 1 then
Ada.Text_IO.Put_Line("command use: ./cc <file 1> <file 1>");
else
for ... |
-----------------------------------------------------------------------
-- gif2ada -- Read a GIF image and write an Ada package with it for UI.Images
-- Copyright (C) 2018 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
... |
package body Tkmrpc.Contexts.esa
is
pragma Warnings
(Off, "* already use-visible through previous use type clause");
use type Types.esa_id_type;
use type Types.ae_id_type;
use type Types.ea_id_type;
use type Types.sp_id_type;
pragma Warnings
(On, "* already use-visible through previous use ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- -*- Mode: Ada -*-
-- Filename : multiboot.adb
-- Description : Provides access to the multiboot information from GRUB
-- Legacy and GRUB 2.
-- Author : Luke A. Guest
-- Created On : Sat Jun 16 12:27:30 2012
-- Licence : See LICENCE... |
with Interfaces;
with Offmt_Lib.Fmt_Data.Unsigned_Generic;
package Offmt_Lib.Fmt_Data.Unsigned_16
is new Offmt_Lib.Fmt_Data.Unsigned_Generic (Interfaces.Unsigned_16);
|
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with GNAT.Regpat;
package body CLIC.Config.Info is
----------
-- List --
----------
function List (This : CLIC.Config.Instance;
Filter : String := ".*";
Show_Origin : Boolean := False)
... |
-----------------------------------------------------------------------
-- awa-tags-modules -- Module awa-tags
-- Copyright (C) 2013 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in... |
separate(Formatter.Get)
procedure Format_Real(Data : in Contents;
In_The_String : in out String;
Location : in out Natural;
Width : in Natural := 0;
Precision : in Natu... |
--
--
--
generic
type Index_Type is (<>);
package Sets is
type Set_Type is private;
Null_Set : constant Set_Type;
procedure Set_Range (First : in Index_Type;
Last : in Index_Type);
-- All sets will be of size N
-- Set the set size
function Set_New return Set_Type;
... |
with Interfaces;
package Tkmrpc.Results is
type Result_Type is new Interfaces.Unsigned_64;
Ok : constant Result_Type := 16#0000000000000000#;
Invalid_Operation : constant Result_Type := 16#0000000000000101#;
Invalid_Id : constant Result_Type := 16#0000000000000102#;
Invalid_State... |
pragma Ada_2012;
pragma Style_Checks (Off);
pragma Warnings ("U");
with Interfaces.C; use Interfaces.C;
with arm_math_types_h;
with sys_ustdint_h;
package complex_math_functions_h is
procedure arm_cmplx_conj_f32
(pSrc : access arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
... |
with Ada.Numerics.Float_Random;
with RandInt;
with Logger;
with External; use External;
with Receiver;
package Node is
package RAF renames Ada.Numerics.Float_Random;
package LOG renames Logger;
package RAD renames RandInt;
package REC renames Receiver;
type NodeObj;
type pNodeObj is access N... |
with Lv; use Lv;
with Lv.Style;
with Lv.Area;
package Lv.Objx.Cont is
subtype Instance is Obj_T;
type Layout_T is
(Layout_Off,
Layout_Center,
Layout_Col_L, -- Column left align
Layout_Col_M, -- Column middle align
Layout_Col_R, -- Column right align
Layout_Row_T, -- R... |
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
----------------------------------------------------------------
with League.JSON.Values;
package body Hello_World is
function "+" (Text : Wide_Wide_String)
return League.Strings.Universal_String
rename... |
package Atomic6_Pkg is
type Int is new Integer;
pragma Atomic (Int);
Counter1 : Int;
Counter2 : Int;
Timer1 : Integer;
pragma Atomic (Timer1);
Timer2 : Integer;
pragma Atomic (Timer2);
type Arr1 is array (1..8) of Int;
Counter : Arr1;
type Arr2 is array (1..8) of Integer;
pragma Atomic_Com... |
with SDL;
with SDL.Log;
with SDL.Timers;
procedure Timers is
function Ticks return String is
(SDL.Timers.Milliseconds'Image (SDL.Timers.Ticks));
begin
SDL.Log.Set (Category => SDL.Log.Application, Priority => SDL.Log.Debug);
SDL.Log.Put_Debug ("Ticks: " & Ticks);
SDL.Timers.Wait_Delay (200);
SDL.Lo... |
-- Copyright (c) 2021 Devin Hill
-- zlib License -- see LICENSE for details.
with System;
with Ada.Unchecked_Conversion;
package body GBA.BIOS.Extended_Interface is
procedure Register_RAM_Reset
( Clear_External_WRAM
, Clear_Internal_WRAM
, Clear_Palette
, Clear_VRAM
, Clear_OAM
, Reset_S... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Numerics.Generic_Elementary_Functions;
procedure RungeKutta is
type Floaty is digits 15;
type Floaty_Array is array (Natural range <>) of Floaty;
package FIO is new Ada.Text_IO.Float_IO(Floaty); use FIO;
type Derivative is access function(t, y : Floaty) return Flo... |
with DDS.Typed_DataWriter_Generic;
with DDS.Typed_DataReader_Generic;
with DDS.Entity_Impl;
with DDS.Topic;
with DDS.DomainParticipant;
with DDS.Subscriber;
with DDS.Publisher;
with DDS.Request_Reply.impl;
private with RTIDDS.Low_Level.ndds_connext_c_connext_c_requester_h;
generic
with package Request_DataWriters i... |
with Memory.RAM; use Memory.RAM;
with Memory.SPM; use Memory.SPM;
package body Test.SPM is
procedure Run_Tests is
ram : constant RAM_Pointer := Create_RAM(latency => 100,
word_size => 8);
spm : SPM_Pointer := Create_SPM(ram, 1024, 1... |
-----------------------------------------------------------------------
-- ado-drivers-tests -- Unit tests for database drivers
-- Copyright (C) 2014 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use th... |
with Cairo;
with Cairo.Image_Surface; use Cairo.Image_Surface;
package Screen_Parameters is
subtype Width is Natural range 0 .. 799;
subtype Height is Natural range 0 .. 479;
subtype Color is ARGB32_Data;
end Screen_Parameters;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
with Oriented; use Oriented;
--with Ada.Unchecked_Deallocation;
procedure Oriented_Test is
Void_Obj : Object;
Obj2 : Object;
Obj_A : Object_Access;
Obj_A2 : Object_Access;
X : aliased Integer;
X_Ref : access Integer;
X1_Ref : access Integ... |
-- generic_list.adb -*- Ada -*-
--
-- This package defines a generic list and list iterator.
--
-- Author: Eric Gustafson
-- Date: 25 August 1998
--
-- ------------------------------------------------------------
--
-- $Revision$
--
-- $Log$
-- -----------------------------------------------------------... |
-- Copyright 2016 Steven Stewart-Gallus
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agr... |
package FLTK.Widgets.Valuators is
type Valuator is new Widget with private;
type Valuator_Reference (Data : not null access Valuator'Class) is
limited null record with Implicit_Dereference => Data;
package Forge is
function Create
(X, Y, W, H : in Integer;
... |
-----------------------------------------------------------------------
-- wiki-filters -- Wiki filters
-- Copyright (C) 2015, 2016, 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 exce... |
-- 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... |
--
-- 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.Strings.Fixed;
package body Erro... |
package body aspiradora is
procedure moverse(a : in out t_aspiradora) is
begin
a.direccion := direccion.direccion_opuesta(a.direccion);
end moverse;
function limpiar(a : in out t_aspiradora) return t_estado_casillero is
begin
return estado_casillero.Limpio;
end limpiar;
procedure no_... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
package body Collada
is
function get_Matrix (From : in Float_array; Which : in Positive) return Matrix_4x4
is
First : constant Positive := (Which - 1) * 16 + 1;
the_Vector : constant math.Vector_16 := math.Vector_16 (From (First .. First + 15));
begin
return math.to_Matrix_4x4 (... |
with STM32GD.Board; use STM32GD.Board;
with HAL;
procedure Main is
package Button_IRQ is new HAL.Pin_IRQ (Pin => BUTTON);
begin
Init;
LED.Set;
Text_IO.Put_Line ("Hello, World!");
STM32GD.Clear_Event;
Button_IRQ.Configure_Trigger (Rising => True);
loop
Text_IO.Put_Line ("Waiting for button.... |
--@Author Arkadiusz Lewandowski
--@LICENSING: MIT
--@DESCRIPTION: Railway package body for FORMAL VERIFICATION in ADA|SPARK
-- Train cannot move if his next step could potentialy be a crash
-- Open_Route is procedure which establishes availability of a route and sets signalisation
-- into proper colors.
-- Move_Train i... |
-- 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... |
------------------------------------------------------------------------------
-- --
-- GNAT EXAMPLE --
-- --
-- ... |
-- Profiles
--pragma Profile(Ravenscar); -- Safety-Critical Policy
pragma Task_Dispatching_Policy (FIFO_Within_Priorities); -- Fixed Priority Scheduling
pragma Locking_Policy (Ceiling_Locking); -- ICCP
-- Standard Packages
-- Project-Defined Packages
with Task_Implementatio... |
with Ada.Text_IO; use Ada.Text_IO;
with Data_Type;
with Generic_List;
with Generic_List.Output;
procedure Main is
-- Create instance of generic list package
-- Create instance of generic list output package
-- My_List : List.List_T; -- Object of generic list type
Element : Data_Type.Record_T;
begin
... |
package body Morse is
Dot_Duration : constant Time_Span := Milliseconds(100);
Dash_Duration : constant Time_Span := Milliseconds(200);
procedure Blink_Morse(LED: Led_No; Led_Color : Color; Duration : Time_Span) is
Timeout : Time := Clock;
begin
Led_Set(LED, Led_Color);
Timeout := Tim... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- { dg-do run }
-- { dg-options "-O2" }
with Ada.Command_Line; use Ada.Command_Line;
procedure Opt65 is
procedure Check_Version_And_Help (Version_String : String) is
Help_Switch_Present : Boolean := False;
Next_Arg : Natural := 1;
begin
while Next_Arg <= Argument_Count loop
... |
-----------------------------------------------------------------------
-- helios-commands-agent -- Helios agent commands
-- Copyright (C) 2017, 2018, 2019 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.Exceptions.Finally;
with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
with System;
package body Ada.Containers.Limited_Doubly_Linked_Lists is
use type Base.Node_Access;
-- diff
use type System.Address;
function Upcast is new Unchecked_Conversion (Cursor, Base.Node_Access);
function ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
--------------------------------------------------------------------------
-- Arbitrary Precision Math Library: Constants
-- Joe Wingbermuehle 20020320 <> 20020327
--------------------------------------------------------------------------
with Arbitrary.Trig; use Arbitrary.Trig;
package body Arbitrary.Const is
----... |
with Ada.Numerics.Discrete_Random;
package body Alea is
subtype Intervalle is Integer range Lower_Bound..Upper_Bound;
package Generateur_P is
new Ada.Numerics.Discrete_Random (Intervalle);
use Generateur_P;
Generateur : Generateur_P.Generator;
procedure Get_Random_Number (Resultat : out Intege... |
with Tkmrpc.Servers.Cfg;
with Tkmrpc.Response.Cfg.Tkm_Version.Convert;
package body Tkmrpc.Operation_Handlers.Cfg.Tkm_Version is
-------------------------------------------------------------------------
procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type) is
pragma Unreferenced (Req);... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
----------------------------------------------------------------
with Markdown.ATX_Headings;
with Markdown.Blockquotes;
with Markdown.Fenced_Code_Blocks;
with Markdown.HTML_Blocks;
with Markdown.Indented_Code_Blocks;
w... |
-- 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... |
-- { dg-do compile { target i?86-*-* x86_64-*-* } }
-- { dg-options "-O3 -msse2 -fdump-tree-vect-details" }
package body Vect18 is
procedure Comp (X, Y : Sarray; R : in out Sarray) is
Tmp : Long_Float := R(4);
begin
for I in 1 .. 3 loop
R(I+1) := R(I) + X(I) + Y(I);
end loop;
R(... |
-----------------------------------------------------------------------
-- wiki-streams-builders -- Wiki writer to a string builder
-- Copyright (C) 2011, 2012, 2013, 2015, 2016 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "Licen... |
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Unchecked_Deallocation;
use Ada.Text_IO, Ada.Integer_Text_IO;
package body Int_Binary_Tree is
type Compare_Result_Type is ( Less_Than, Equal, Greater_Than );
type Traced_Node_Type is
record
Node : Tree_Node_Ptr;
Parent : Tree_Node_Ptr;
... |
with STM32GD.Board; use STM32GD.Board;
with Drivers.Si7006;
procedure Main is
package Si7006 is new Drivers.Si7006 (I2C => I2C);
Temperature : Si7006.Temperature_Type;
Humidity : Si7006.Humidity_Type;
Now : RTC.Date_Time_Type;
Wait_Time : RTC.Second_Delta_Type := 5;
begin
Init;
Tex... |
-- ----------------------------------------------------------------- --
-- --
-- This is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the ... |
-- { dg-do run }
with Atomic7_Pkg2; use Atomic7_Pkg2;
procedure Atomic7_1 is
I : Integer := Stamp;
pragma Atomic (I);
J : Integer := Stamp;
begin
if I /= 1 then
raise Program_Error;
end if;
end;
|
generic
with function f(x:float) return float;
package Adaptive_Quad is
function AQuad(a, b, eps: float) return float;
end Adaptive_Quad; |
-- AOC 2020, Day 3
with Ada.Text_IO; use Ada.Text_IO;
with Day; use Day;
procedure main is
f : constant Forest := load_map("input.txt");
slope : constant Natural := 3;
begin
put_line("Part 1: " & Natural'Image(trees_hit(f, slope)));
put_line("Part 2: " & Natural'Image(many_trees_hit(f)));
end main;
|
with Extraction.Node_Edge_Types;
package body Extraction.Source_Files_From_Projects is
use type VFS.File_Array_Access;
use type VFS.Filesystem_String;
procedure Extract_Nodes
(Project : GPR.Project_Type; Graph : Graph_Operations.Graph_Context)
is
Source_Files : VFS.File_Array_Access :=
... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2018, AdaCore --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- Reference Implementation --
-- ... |
-------------------------------------------------------------------------------
-- Title : Blinky example for Cortex-M0
--
-- File : main.adb
-- Author : Vitor Finotti
-- Created on : 2019-04-24 19:46:32
-- Description :
--
--
--
-------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.