CombinedText stringlengths 4 3.42M |
|---|
with C.string;
package body MPFR is
function Version return String is
S : constant C.char_const_ptr := C.mpfr.mpfr_get_version;
Length : constant Natural := Natural (C.string.strlen (S));
Result : String (1 .. Length);
for Result'Address use S.all'Address;
begin
return Result;
end Version;
function De... |
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
-- This spec has been automatically generated from STM32WB55x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.DMAMUX is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype C0CR_DMAREQ_ID_Fie... |
with Text_IO; use Text_IO;
procedure Nextdate is
type Month_Type is
(Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec);
subtype Day_Subtype is Integer range 1 .. 31;
type Date is
record
Day : Day_Subtype;
Month : Month_Type;
Year : Positive;
end record;
... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- ... |
----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding --
-- --
-- ... |
-- This file was generated by bmp2ada
with Giza.Bitmaps; use Giza.Bitmaps;
with Giza.Image.Bitmap;
package bmp_test_rgb24 is
pragma Style_Checks (Off);
Data : aliased constant Bitmap :=
(W => 50, H => 50, Length => 2500, Data => (
1 => (R => 255, G => 0, B => 0),
2 => (R => 255, G => ... |
-----------------------------------------------------------------------
-- search-tokens -- Search token representation
-- Copyright (C) 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 ... |
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Text_Io; use Ada.Text_Io;
procedure Upper_Case_String is
S : String := "alphaBETA";
begin
Put_Line(To_Upper(S));
Put_Line(To_Lower(S));
end Upper_Case_String;
|
package Array17_Pkg is
type Varray is array (Integer range <>) of Long_Float;
for Varray'Alignment use 16;
function "+" (X, Y : Varray) return Varray;
end Array17_Pkg;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
procedure P is type t; x: t; begin put('a'); end;
|
------------------------------------------------------------------------------
-- --
-- SPARK LIBRARY COMPONENTS --
-- --
-- ... |
package Benchmark.Matrix.MM is
type MM_Type is new Matrix_Type with private;
function Create_MM return Benchmark_Pointer;
overriding
procedure Run(benchmark : in MM_Type);
private
type MM_Type is new Matrix_Type with null record;
end Benchmark.Matrix.MM;
|
with Types; use Types;
with Communication; use Communication;
package Algorithm is
type Algorithm_Type is
(Pong);
Safety_Exception : exception;
Default_Velocity : Velocity := 320;
type Abstract_Algorithm is abstract tagged record
null;
end record;
type A... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Iterator_Interfaces;
with Program.Compilation_Units;
package Program.Compilation_Unit_Vectors is
pragma Pure;
type Compilation_Unit_Vector... |
generic
type Item is digits <>;
type Items_Array is array (Positive range <>) of Item;
function Generic_Max (List : Items_Array) return Item;
|
package body openGL.Culler
is
procedure Viewer_is (Self : in out Item'Class; Now : in Renderer.lean.view)
is
begin
Self.Viewer := Now.all'Access;
end Viewer_is;
function Viewer (Self : in Item'Class) return Renderer.lean.view
is
begin
return Self.Viewer;
end Viewer;
end openGL.... |
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT INTERFACE COMPONENTS --
-- --
-- ... |
with Ada.Text_IO;
use Ada.Text_IO;
with Dates;
use Dates;
procedure Exemple_Dates_Erreurs is
Une_Date : T_Date;
Mois_Suivant : T_Mois;
Autre_Date : T_Date;
begin
-- Initialiser une date
Initialiser (Une_Date, 1, OCTOBRE, 2018);
-- L'afficher
Afficher (Une_Date);
New_Line;
-- Affi... |
-----------------------------------------------------------------------
-- EL.Contexts.TLS -- EL context and Thread Local Support
-- Copyright (C) 2015 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use ... |
-- CE2404A.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... |
pragma License (Unrestricted);
-- implementation unit
package System.UTF_Conversions.From_32_To_8 is
pragma Pure;
pragma Suppress (All_Checks); -- for instantiation
procedure Convert is
new Convert_Procedure (
Wide_Wide_Character,
Wide_Wide_String,
Character,
String... |
-- This package was generated by the Ada_Drivers_Library project wizard script
package ADL_Config is
Vendor : constant String := "STMicro"; -- From board definition
Max_Mount_Points : constant := 2; -- From default value
Max_Mount_Name... |
with Ada.Text_IO;
with Gnat.Command_Line;
with Gnat.Strings;
procedure Test_GNAT_Command_Line is
package ATI renames Ada.Text_IO;
package GCL renames Gnat.Command_Line;
type Options_Record is record -- Initialized
Config : GCL.Command_Line_Configuration; -- Initialized
Debug : alias... |
---------------------------------
-- GID - Generic Image Decoder --
---------------------------------
--
-- Private child of GID, with helpers for identifying
-- image formats and reading header informations.
--
private package GID.Headers is
--
-- Crude image signature detection
--
procedure Load_... |
-- SipHash.General
-- Implementing SipHash over a general private type
-- Copyright (c) 2015, James Humphry - see LICENSE file for details
-- This generic function will calculate SipHash for any private type of definite
-- size
generic
type T is private;
type Hash_Type is mod <>;
function SipHash.General (m : T... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018, Fabien Chouteau --
-- --
-- ... |
package Cond_Expr2 is
function F (X : integer) return String;
end Cond_Expr2;
|
with STM32.F429Z; use STM32.F429Z;
use STM32.F429Z.Modules.GPIO;
with STM32.F4.GPIO.Ports; use STM32.F4.GPIO.Ports;
with Ada.Real_Time; use Ada.Real_Time;
procedure LED_Flasher_429disco is
Period: constant Time_Span := Milliseconds(250);
On_Time: constant Time_Span := Milliseconds(10);
Now: Time :=... |
with Interfaces; use Interfaces;
with Bounded_Image; use Bounded_Image;
package body Units with SPARK_Mode is
function average( signal : Unit_Array ) return Unit_Type is
function Sat_Add_Unit is new Saturated_Addition (Unit_Type);
avg : Unit_Type := 0.0;
begin
if signal'Length > 0 then
... |
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2018 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 fr... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
-- This file is generated by SWIG. Do *not* modify by hand.
--
with Interfaces.C.Extensions;
package LLVM_Target is
-- LLVMOpaqueTargetData
--
type LLVMOpaqueTargetData is new
Interfaces.C.Extensions.opaque_structure_def;
type LLVMOpaqueTargetData_array is
array (Interfaces.C.size_t range <>)... |
with Ada.Text_IO;
with Ada.Containers.Vectors;
with Ada.Numerics.Long_Elementary_Functions;
with PrimeInstances;
package body Problem_46 is
package IO renames Ada.Text_IO;
package Math renames Ada.Numerics.Long_Elementary_Functions;
package Positive_Primes renames PrimeInstances.Positive_Primes;
package Pos... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="... |
-- MIT License
--
-- Copyright (c) 2021 Glen Cornell <glen.m.cornell@gmail.com>
--
-- 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 rig... |
------------------------------------------------------------------------------
-- --
-- GNAT EXAMPLE --
-- --
-- ... |
with System.Storage_Elements;
with Ada.Containers.Formal_Hashed_Maps;
package body TLSF.Proof.Model.Context With
SPARK_Mode,
Refined_State => (State => Block_Models)
is
package SSE renames System.Storage_Elements;
package AC renames Ada.Containers;
function Hash (Addr : System.Address) return AC.Hash_Typ... |
-----------------------------------------------------------------------
-- volume_servlet -- Servlet example to compute some volumes
-- Copyright (C) 2010, 2015, 2018 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- y... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Formal_Object_Declarations is
function Create
(Names : not null Program.Elements.Defin... |
-----------------------------------------------------------------------
-- util-mail -- Mail Utility Library
-- 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 may not use this file excep... |
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Traceback; use GNAT.Traceback;
with GNAT.Traceback.Symbolic; use GNAT.Traceback.Symbolic;
procedure Test_Stack_Trace is
procedure Call_Stack is
Trace : Tracebacks_Array (1..1_000);
Length : Natural;
begin
Call_Chain (Trace, L... |
-- ---------------------------------------------------------------------------
-- --
-- BLACKBOARD constant and type definitions and management services --
-- --
-- ---------------------------------------------------------------------------
with APEX.Processes;
package APEX.Blackboards is
Max_Number_Of_Blackboards :... |
with
openGL.Model,
openGL.Font,
openGL.Geometry;
package openGL.Model.polygon.lit_colored
--
-- Models a lit, colored polygon.
--
is
type Item is new Model.polygon.item with private;
type View is access all Item'Class;
---------
--- Forge
--
function new_Polygon (Vertices : in Vect... |
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with System;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttaglist_h;
with glib;
with glib.Values;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttagsetter_h is
-- unsupport... |
--------------------------------------------------------------------------------
-- MIT License
--
-- Copyright (c) 2021 Zane Myers
--
-- 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 witho... |
-- Copyright 2011-2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- C O D E P E E R / S P A R K --
-- --
-- Copyright (C) 2015-2020, AdaCore --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
package FLTK.Widgets.Progress_Bars is
type Progress_Bar is new Widget with private;
type Progress_Bar_Reference (Data : not null access Progress_Bar'Class) is
limited null record with Implicit_Dereference => Data;
package Forge is
function Create
(X, Y, W, H : in Int... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
-----------------------------------------------------------------------
-- css-core-groups -- CSS rule to represent a group of CSS rules
-- Copyright (C) 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may n... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
-----------------------------------------------------------------------
-- awa-mail -- Mail module
-- Copyright (C) 2011, 2017, 2018, 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 exc... |
with Ada.Text_IO;
with AWS.Messages;
with AWS.MIME;
with GNAT.OS_Lib;
package body HTTPd.Callbacks is
-------------
-- Default --
-------------
function Default (Request : in AWS.Status.Data) return AWS.Response.Data is
URI : constant String := AWS.Status.URI (Request);
File... |
with Ada.Containers.Functional_Maps;
with Ada.Containers.Functional_Vectors;
with Common; use Common;
with Ada.Containers; use Ada.Containers;
generic
type Element_Type is private;
package Bounded_Stack with SPARK_Mode is
Capacity : constant Integer := 200;
Empty : constant Integer := 0;
subtype Exten... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
generic
type Value_T(<>) is private;
package My_Env_Versioned_Value_Set_G is
generic
with function Updated_Entity (Value : Value_T) return Boolean is <>;
package Update_G is end;
end;
|
-- Copyright (c) 2020-2021 Bartek thindil Jasicki <thindil@laeran.pl>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later vers... |
with Knights_Tour, Ada.Text_IO, Ada.Command_Line;
procedure Holy_Knight is
Size: Positive := Positive'Value(Ada.Command_Line.Argument(1));
package KT is new Knights_Tour(Size => Size);
Board: KT.Tour := (others => (others => Natural'Last));
Start_X, Start_Y: KT.Index:= 1; -- default start place (1,1)
... |
-- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../License.txt
with Ada.Strings.Unbounded;
with Ada.Strings;
package JohnnyText is
package AS renames Ada.Strings;
package SU renames Ada.Strings.Unbounded;
subtype Text is SU.Unbounded_String;
type Line_Markers i... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0... |
-- -----------------------------------------------------------------------------
-- 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 ... |
--
-- Copyright (C) 2017, AdaCore
--
-- This spec has been automatically generated from STM32F7x.svd
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package Interfaces.STM32.RCC is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Registers --
---------------
sub... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY COMPONENTS --
-- --
-- ... |
package Problem_69 is
-- Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the
-- number of numbers less than n which are relatively prime to n. For example, as 1, 2, 4, 5, 7,
-- and 8, are all less than nine and relatively prime to nine, φ(9)=6.
--
-- It can be se... |
with Ada.Containers.Vectors; use Ada.Containers;
with MathUtils;
package NeuralNet is
pragma Assertion_Policy (Pre => Check,
Post => Check,
Type_Invariant => Check);
type Activator is (RELU, LOGISTIC);
type LossFunction is (MSE);
type Shape is array... |
-- { dg-do run }
with Interfaces; use Interfaces;
procedure Exp0_Eval is
F_Count : Natural := 0;
function F return Integer is
begin
F_Count := F_Count + 1;
return 1;
end F;
function F return Unsigned_32 is
begin
F_Count := F_Count + 1;
return 1;
end F;
R : constant In... |
with Test_Solution; use Test_Solution;
package problem_15 is
type Int128 is range -2**127 .. 2**127 - 1;
function Solution_1 return Int128;
procedure Test_Solution_1;
function Get_Solutions return Solution_Case;
end problem_15;
|
-----------------------------------------------------------------------
-- security-auth-oauth -- OAuth based authentication
-- Copyright (C) 2013, 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... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
--*****************************************************************************
--*
--* PROJECT: BingAda
--*
--* FILE: q_bingo.ads
--*
--* AUTHOR: Javier Fuica Fernandez
--*
--*****************************************************************************
package Q_Bingo with Pure is... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-----------------------------------------------------------------------
-- akt-commands-set -- Set content in keystore
-- Copyright (C) 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file e... |
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... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0... |
with Ada.Text_IO;
package body Ada_Code is
package ATI renames Ada.Text_Io;
procedure Ada_Proc is
begin
ATI.Put_Line ("Ada_Proc: Begin");
ATI.Put_Line ("Ada_Proc: End");
end Ada_Proc;
procedure Ada_C_Caller is
procedure C_Func;
pragma Import (C, C_Func);
begin
ATI.... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
package Problem_54 is
procedure Solve;
end Problem_54;
|
package body collada.Library
is
function find_in (Self : Inputs; the_Semantic : in library.Semantic) return Input_t
is
begin
for i in Self'Range
loop
if Self (i).Semantic = the_Semantic
then
return Self (i);
end if;
end loop;
return null_Input;... |
with Ada.Streams;
Package Aids.Utilities is
Use Ada.Streams;
function Chunk_Image(Chunk: Stream_Element_Array) return String;
function Chunk_To_String(C: in Stream_Element_Array) return String;
function String_To_Chunk(S: in String) return Stream_Element_Array;
-- Returns the stream as a hex-str... |
with Ada.Streams; use Ada.Streams;
with SHA1;
with SHA2;
with HMAC_Generic;
package HMAC with
Pure,
Preelaborate
is
package HMAC_SHA_1 is new HMAC_Generic
(Element => Stream_Element, Index => Stream_Element_Offset,
Element_Array => Stream_Element_Array,
Digest_Length => SHA1.Digest_L... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0... |
with Ada.Directories;
with Ada.Numerics.Generic_Elementary_Functions;
with Ahven.Framework;
with Floats.Api;
package Test_Floats.Write is
package Skill renames Floats.Api;
use Floats;
use Floats.Api;
type Test is new Ahven.Framework.Test_Case with null record;
procedure Initialize (T : in out Test);
... |
------------------------------------------------------------------------------
--
-- package Debugging (body)
--
------------------------------------------------------------------------------
-- Update information:
--
-- 1996.04.05 (Jacob Sparre Andersen)
-- Written.
--
-- 1996.05.07 (Jacob S. A. and Jesper H. V... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.