CombinedText stringlengths 4 3.42M |
|---|
package body System_Function_Package is
function System_A(X : Integer) return Integer is
begin
delay To_Duration(Milliseconds(100));
return X + 1;
end System_A;
function System_B(Y : Integer) return Integer is
begin
delay To_Duration(Milliseconds(200));
return Y * 2;
end Syst... |
with Ada.Streams;
with Ada.Unchecked_Conversion;
package Tkmrpc.Request.Convert is
subtype Stream_Range is Ada.Streams.Stream_Element_Offset range
1 .. Request_Size;
subtype Stream_Type is Ada.Streams.Stream_Element_Array (Stream_Range);
function To_Stream is new Ada.Unchecked_Conversion (
Sourc... |
with System.Formatting.Decimal;
with System.Formatting.Fixed;
with System.Formatting.Float;
with System.Long_Long_Integer_Types;
package body Ada.Formatting is
pragma Suppress (All_Checks);
use type System.Long_Long_Integer_Types.Word_Unsigned;
use type System.Long_Long_Integer_Types.Long_Long_Unsigned;
su... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016-2017, AdaCore --
-- --
-- ... |
-- Copyright 2017-2019 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.
--
-- ... |
package body Sigint_Handler is
-------------
-- Handler --
-------------
protected body Handler is
----------
-- Wait --
----------
entry Wait when Call_Count > 0 is
begin
Call_Count := Call_Count - 1;
end Wait;
------------
-- Handle --
--... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ... |
-- 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... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- Copyright 2018-2020 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.
--
-- ... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="11">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0... |
-- Copyright 2017-2021 Jeff Foley. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local json = require("json")
name = "BinaryEdge"
type = "api"
function start()
setratelimit(1)
end
function check()
local c
local cfg = datasrc_config... |
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNATPP COMPONENTS --
-- --
-- ... |
-- { dg-do compile }
-- { dg-options "-O3" }
package body Loop_Optimization18 is
procedure Proc (Message : Byte_Array_Type) is
R : Rec (Conv (Message));
begin
for Division in 1 .. R.UB loop
R.L (Division) := 0;
end loop;
end;
end Loop_Optimization18;
|
-- { dg-do compile }
-- { dg-options "-O -gnatws" }
package body Array15 is
type Arr is array (Natural range <>) of Integer;
Table : Arr (1 .. 4);
N : Natural := 1;
procedure Zero is
begin
N := 0;
end;
function F (I : Integer) return Integer is
A1 : Arr := (1 => I);
A2 : Arr... |
-----------------------------------------------------------------------
-- gen-commands-distrib -- Distrib command for dynamo
-- 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 us... |
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
package body GDNative.Tokenizer is
----------------
-- Initialize --
----------------
function Initialize (Input : String; Separators : Character_Array) return Tokenizer_State is begin
return Tokenizer_State'(
Input_Length => Input'Length,
... |
-- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_configure_request_event_t is
-- Item
--
type Item is record
response_type : aliased Interfaces.Unsigned_8;
stack_mode : aliased Interfaces.Unsign... |
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017, AdaCore --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Constraints;
with Program.Lexical_Elements;
with Program.Elements.Expressions;
package Program.Elements.Delta_C... |
-- CA3011A3.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
Ada.Containers.Vectors,
Ada.Streams;
package AdaM.Declaration.of_renaming.a_package
is
type Item is new Declaration.item with private;
-- View
--
type View is access all Item'Class;
procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
... |
-----------------------------------------------------------------------
-- Util-strings-vectors -- Vector of strings
-- Copyright (C) 2011 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... |
-- Copyright 2008-2019 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 RUN-TIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Common UUID Handling Package --
-- - RFC 4122 Implementation - --
-- ... |
with OpenAL.Thin;
with Interfaces.C;
with Interfaces.C.Strings;
package body OpenAL.Global is
package C renames Interfaces.C;
package C_Strings renames Interfaces.C.Strings;
function Get_String (Parameter : Types.Enumeration_t) return C_Strings.chars_ptr;
pragma Import (C, Get_String, "alGetString");
... |
-- C61008A.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... |
package body Regions.Contexts is
procedure New_Profile
(Self : in out Context'Class;
Key : Profile_Key;
Result : out Profile_Id);
----------------------
-- Append_Parameter --
----------------------
procedure Append_Parameter
(Self : in out Context;
Origin : Pr... |
package body Separated is
procedure Watch_Me is separate;
function Look_Out return Float is (5.0);
end Separated;
|
pragma SPARK_Mode;
with Interfaces.C; use Interfaces.C;
with Proc_Types; use Proc_Types;
with Types; use Types;
-- @summary
-- This package exposes many Arduino runtime routines to Ada
--
-- @description
-- This package imports all of the necessary Arduino runtime library calls
-- that are needed.
--
package S... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016-2017, AdaCore --
-- --
-- ... |
-- 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... |
-----------------------------------------------------------------------
-- awa-commands-tests -- Test the AWA.Commands
-- 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 e... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
--
-- package Orbit_2
--
-- Package defines a data structure for the 2-body problem.
-- The problem demonstrates the importance of error control
-- with variable step size. Integrating highly elliptical
-- orbits (near collisions between inteacting bodies) with
-- variable step size method is orders of magnitude fa... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- 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... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Integer_Text_IO;
use Ada.Integer_Text_IO;
with Ada.Containers.Vectors;
with Ada.Numerics.Discrete_Random;
procedure Maze (Size : Integer) is
-- A grid is a 2d array of cells. A cell can either be Fresh (not
-- inspected), Front (Inspected but not set), Clear (inspec... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with agar.core.event;
with agar.core;
with agar.gui.widget;
with agar.gui.window;
with agar.gui;
with demo;
with slider_callbacks;
procedure slider is
package gui_event renames agar.core.event;
package gui_widget renames agar.gui.widget;
package gui_window renames agar.gui.window;
begin
demo.init ("slider", w... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with display; use display;
with stats; use stats;
with player; use player;
package body Cutscenes is
procedure Display_Settings is
input : Character;
begin
ClearDisplay;
WipeScreen;
SetText(1,22,"Please take these followin... |
<?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="... |
------------------------------------------------------------------------------
-- --
-- GNAT EXAMPLE --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- ... |
with Ada.Text_Io; use Ada.Text_Io;
with Ada.Integer_Text_Io; use Ada.Integer_Text_Io;
with Ada.Numerics.Discrete_Random;
procedure NumberReverse is
subtype RandRange is Integer range 1..9;
type NumArrayType is array (Integer range 1..9) of Integer;
package RandNumbers is new Ada.Numerics.Discrete_Random(Ran... |
with
openGL.Primitive,
openGL.Buffer,
openGL.Program,
openGL.Texture;
private
with
ada.Strings.unbounded;
package openGL.Geometry
--
-- Provides a base class for openGL geometry.
-- A Geometry is composed of up to 5 primitives.
-- Each primitive has its own set of GL indices and a facet ki... |
-- { dg-do run }
-- { dg-options "-O" }
with Opt62_Pkg; use Opt62_Pkg;
procedure Opt62 is
String5 : String(1..5) := "12345";
D: Der := (Unconstrained_Der with D2 => 5, S2 => String5);
begin
if D.Str1 /= "abcde" then
raise Program_Error;
end if;
end;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-- CE3201A.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 agar.core.event;
with agar.core.object;
with agar.core.tail_queue;
with agar.core;
with agar.gui.style;
with agar.gui.surface;
with agar.gui.widget;
with agar.gui.window;
with interfaces.c;
with sdl.keysym;
with sdl.video;
package agar.gui.view is
package c renames interfaces.c;
package window_tail_queue is ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
pragma License (Unrestricted);
-- extended unit
with Ada.Strings.Generic_Unbounded.Generic_Functions;
with Ada.Strings.Wide_Wide_Functions;
package Ada.Strings.Unbounded_Wide_Wide_Strings.Functions is
new Generic_Functions (Wide_Wide_Functions);
pragma Preelaborate (Ada.Strings.Unbounded_Wide_Wide_Strings.Functions... |
-- Copyright 2016,2017 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 o... |
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ... |
with Ada.Calendar;
with Ada.Strings.Fixed;
with Progress_Indicators.Spinners;
with SP.Terminal;
with Trendy_Terminal.VT100;
package body SP.Progress is
task body Update_Progress is
Spinner : PI.Spinners.Spinner := PI.Spinners.Make (PI.Spinners.Normal, 1);
SR : PI.Work_Trackers.Statu... |
with Ada.Text_IO;
use Ada.Text_IO;
with mycalendar;
use mycalendar;
procedure main is
--variables
today_weekday : weekday;
today_monthnum : monthnum;
today_daynum : daynum;
begin
-- GET DAY
Put ("What weekday is today (");
for w in weekday'Range loop
Put(weekday'Image(w)); Put("/");
end loop;
Put ("... |
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Text_IO; use Ada.Text_IO;
with player; use player;
with inventory_list; use inventory_list;
package body save_load_game is
SaveDir : String := "Saves/";
procedure newGame(player: out Player_Type; dungeon: out Integer) is
... |
with Units.Navigation;
procedure main with SPARK_Mode is
begin
null;
end main;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="11">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0... |
-- WORDS, a Latin dictionary, by Colonel William Whitaker (USAF, Retired)
--
-- Copyright William A. Whitaker (1936–2010)
--
-- This is a free program, which means it is proper to copy it and pass
-- it on to your friends. Consider it a developmental item for which
-- there is no charge. However, just for form, it is C... |
<?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... |
-- Abstract :
--
-- Image with auxiliary data for instantiations of parent.
--
-- Copyright (C) 2018 - 2019 Stephen Leake All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or modify it
-- under terms of the GNU General Public License as published by the Free
-- Softw... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
generic
N: positive;
package Generic_Perm is
subtype Element is Positive range 1 .. N;
type Permutation is array(Element) of Element;
procedure Set_To_First(P: out Permutation; Is_Last: out Boolean);
procedure Go_To_Next(P: in out Permutation; Is_Last: out Boolean);
end Generic_Perm;
|
package OpenAL is
pragma Pure (OpenAL);
end OpenAL;
|
-- { dg-do compile }
-- { dg-options "-gnatws" }
with Pack16_Pkg; use Pack16_Pkg;
procedure Pack16 is
type Sample_Table_T is array (1 .. N) of Integer;
type Clock_T is record
N_Ticks : Integer := 0;
end record;
type Sampling_Descriptor_T is record
Values : Sample_Table_T;
Valid : Bo... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- ... |
<?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="... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-----------------------------------------------------------------------
-- awa-comments-modules-tests -- Unit tests for comments service
-- 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 n... |
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- ... |
-- Copyright 2017-2020 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.
--
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
-- Copyright 2015-2017 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.
--
-- ... |
with Text_IO;
procedure Main is
task type Sieve is
entry Pass_On(Int: Integer);
end Sieve;
type Sieve_Ptr is access Sieve;
function Get_New_Sieve return Sieve_Ptr is
begin
return new Sieve;
end Get_New_Sieve;
task Odd;
task body Odd is
Limit : constant Positive := 1000;
... |
-- 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... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="17">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="... |
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
package body Adda.Defaults is
function Hash
(Element : in Integer)
return Hash_Type is
begin
return Hash_Type (Element);
end Hash;
end Adda.Defaults;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- ... |
-- Keepa API
-- The Keepa API offers numerous endpoints. Every request requires your API access key as a parameter. You can find and change your key in the keepa portal. All requests must be issued as a HTTPS GET and accept gzip encoding. If possible, use a Keep_Alive connection. Multiple requests can be made in pa... |
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.