content stringlengths 23 1.05M |
|---|
-- gamma(1+x) = x! for x=0,1,2 ...
-- Calls 2 important Test procedures from Factorial, then quick test.
with Factorial;
with text_io; use text_io;
with ada.numerics.generic_elementary_functions;
procedure Factorial_tst_1 is
type Real is digits 15;
package F is new Factorial (Real); use F;
package Math is n... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018-2021, AdaCore --
-- --
-- ... |
package Globals_Example1 is
type Itype is new Integer;
type Ftype is new Float;
type Record_With_Integer_Rtype is record
Attribute : Itype;
end record;
type Record_With_Float_Rtype is record
Attribute : Ftype;
end record;
end Globals_Example1;
|
with Ada.Streams;
with Interfaces;
with System;
package ACO.Messages is
pragma Preelaborate;
use Interfaces;
type Id_Type is mod 2**11;
type Id_Array is array (Natural range <>) of Id_Type;
type Function_Code is mod 2**4;
type Node_Nr is mod 2**7;
Not_A_Slave : constant Node_Nr := 0;
su... |
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; ... |
-- The Village of Vampire by YT, このソースコードはNYSLです
with Ada.Containers.Indefinite_Doubly_Linked_Lists;
with Ada.Containers.Ordered_Maps;
with Ada.Strings.Unbounded;
package Tabula.Villages.Lists is
package User_Lists is
new Ada.Containers.Indefinite_Doubly_Linked_Lists (String);
type Village_Summary is record
T... |
-- 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... |
-- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../License.txt
private with Ada.Characters.Latin_1;
private with Definitions;
package Information is
procedure display_usage;
procedure display_unknown_command (first_word : String);
procedure display_unknown_command (... |
package openGL.Renderer.lean.forge
--
-- Provides constructors for the lean renderer.
--
is
function to_Renderer return Renderer.lean.item;
function new_Renderer return Renderer.lean.view;
end openGL.Renderer.lean.forge;
|
with SPARKNaCl.PDebug;
with SPARKNaCl.Debug;
with SPARKNaCl.Utils;
with SPARKNaCl.Car;
with Ada.Text_IO; use Ada.Text_IO;
package body SPARKNaCl.Tests
is
GF_2 : constant Normal_GF := (2, others => 0);
P : constant Normal_GF := (0 => 16#FFED#,
15 => 16#7FFF#,
... |
-- 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... |
-- File: pal_finder.adb
-- Name: Andrew Albanese
-- Date: 1/24/2018
-- Purpose: a program that reads a series of strings
-- and prints one of five messages that indicates whether
-- each string is a palindrome or can be converted into
-- a palindrome.
WITH Ada.Text_IO; USE Ada.Text_IO;
WITH Ada.Float_Text_IO; USE... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
WITH Ada.Text_Io; USE Ada.Text_Io;
WITH Ada.Integer_Text_Io; USE Ada.Integer_Text_Io;
procedure Ver_Num_Apariciones_Opcional is
-- salida: 11 enteros(SE)
-- post: corresponden a cada uno de los casos de pruebas dise�ados.
-- pre: { True }
function Num_Apariciones_Caracter (
S : String;
L ... |
-- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../License.txt
with Ada.Strings.Fixed;
with Ada.Strings.UTF_Encoding.Strings;
package body CommonText is
package AS renames Ada.Strings;
package UES renames Ada.Strings.UTF_Encoding.Strings;
-----------
-- USS -... |
with Ada.Text_IO, Generic_Divisors; use Ada.Text_IO;
procedure Amicable_Pairs is
function Same(P: Positive) return Positive is (P);
package Divisor_Sum is new Generic_Divisors
(Result_Type => Natural, None => 0, One => Same, Add => "+");
Num2 : Integer;
begin
for Num1 in 4 .. 20_000 loop
Num... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
with agar.core.event;
with agar.core.types;
with agar.gui.widget.label;
with agar.gui.widget.slider;
with agar.gui.widget;
with agar.gui.window;
package slider_callbacks is
package gui_event renames agar.core.event;
package gui_label renames agar.gui.widget.label;
package gui_slider renames agar.gui.widget.slide... |
--------------------------------------------------------------------------------
-- 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... |
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Streams;
with League.Strings;
with League.Base_Codecs;
with JWS;
procedure HS_256_Test is
function "+"
(Item : Wid... |
-- { dg-do run }
procedure Slice3 is
type Varray is array (1 .. 1) of Natural; -- SImode
type Sample is record
Maybe : Boolean;
Values : Varray;
end record;
pragma Pack (Sample);
function Match (X, Y: Sample; Length : Positive) return Boolean is
begin
return X.Values (1 .. Leng... |
package body Sb_Package is
use Real_Functions;
-----------------------------------------------
function Phi (R : in AD_Type) return AD_Type is
begin
return 0.5 * (1.0 + Tanh (50.0 * (R - 0.5)));
end Phi;
-----------------------------------------------
function KE (Q : in AD_Vector) return AD_... |
package body Employee_Data is
function Create
(Name : String;
Rate : Hourly_Rate_T)
return Employee_T is
begin
-- Return an employee object with appropriate data
return Employee_T'(others => <>);
end Create;
function Id
(Employee : Employee_T)
return Id_T is
begi... |
-----------------------------------------------------------------------
-- awa-mail-clients-aws_smtp -- Mail client implementation on top of AWS SMTP client
-- Copyright (C) 2012, 2016, 2017, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Vers... |
with Ada.Text_IO;
with Trendy_Terminal.Environments;
with Trendy_Terminal.IO;
with Trendy_Terminal.Platform;
with Trendy_Terminal.Example.Input; use Trendy_Terminal.Example.Input;
procedure Trendy_Terminal_Example is
Env : Trendy_Terminal.Environments.Environment;
begin
if not Env.Is_Available then
Ad... |
with System.System_Allocators;
package body System.Unbounded_Allocators is
procedure Initialize (Object : in out Unbounded_Allocator) is
begin
Object :=
Unbounded_Allocator (C.malloc.malloc.malloc_create_zone (0, 0));
end Initialize;
procedure Finalize (Object : in out Unbounded_Allocator) ... |
with
openGL.Images,
openGL.Viewport,
openGL.Tasks,
openGL.Errors,
GID,
GL.Binding,
GL.safe,
GL.Pointers,
ada.unchecked_Conversion,
ada.Calendar,
ada.Characters.handling,
System;
package body openGL.IO
is
use ada.Characters.handling,
ada.Streams.... |
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ... |
package body Aggr21_Pkg is
procedure Init (R : out Rec) is
begin
R := (A => 5, S => <>, N => 7);
end;
end Aggr21_Pkg;
|
package body UxAS.Comms.Transport.ZeroMQ_Socket_Configurations is
----------
-- Make --
----------
function Make
(Network_Name : String;
Socket_Address : String;
Is_Receive : Boolean;
Zmq_Socket_Type : ZMQ.Sockets.Socket_Type;
Number_Of... |
package GDNative.Objects is
------------
-- Object --
------------
type Object is abstract tagged null record;
function Initialize return Object is abstract;
----------
-- Node --
----------
type Node is abstract new Object with null record;
procedure Process (Self : in out Node; Delta_Time : in L... |
-- REPSPEC.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.
-- Unlim... |
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr>
-- MIT license. Please refer to the LICENSE file.
package body Apsepp_Scope_Debug_Test_Fixture is
----------------------------------------------------------------------------
Scope_Entry_Count_Var : Natural := 0;
Scope_Exit_Count_Var : Natural := 0;
... |
package Aliasing1 is
type Rec is record
I : Integer;
end record;
type Ptr is access all Integer;
R : Rec;
function F (P : Ptr) return Integer;
end Aliasing1;
|
limited with Incomplete1;
package Incomplete2 is
pragma Elaborate_Body;
generic
type T is private;
package G is end G;
package I1 is new G (Incomplete1.T); -- { dg-error "premature use" }
end Incomplete2;
|
with Tkmrpc.Operations.Ike;
with Tkmrpc.Operation_Handlers.Ike.Tkm_Version;
with Tkmrpc.Operation_Handlers.Ike.Tkm_Limits;
with Tkmrpc.Operation_Handlers.Ike.Tkm_Reset;
with Tkmrpc.Operation_Handlers.Ike.Nc_Reset;
with Tkmrpc.Operation_Handlers.Ike.Nc_Create;
with Tkmrpc.Operation_Handlers.Ike.Dh_Reset;
with Tkmrpc.Ope... |
with Ada.Real_Time; use Ada.Real_Time;
with Ada.Text_IO;use Ada.Text_IO;
procedure Periodic_overrun is
Interval : Time_Span := Milliseconds(30);
Next : Time;
Now :Time;
begin
Next := Clock + Interval;
loop
Put_Line("Delay 30 ms");
for I in Integer range 1 .. 10000 loop
Put_Line (Integer'Image(I));
e... |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- ... |
pragma License (Unrestricted);
-- Ada 2012
package Ada.Directories.Hierarchical_File_Names is
function Is_Simple_Name (Name : String) return Boolean
renames Ada.Hierarchical_File_Names.Is_Simple_Name;
function Is_Root_Directory_Name (Name : String) return Boolean
renames Ada.Hierarchical_File_Names... |
with Ada.Text_IO;
procedure RandomBet is
package IO renames Ada.Text_IO;
Max_Starting_Bet : constant := 255;
Max_Bet_Pool : constant := Max_Starting_Bet * 3;
type Offset_Array is Array (1 .. Max_Starting_Bet, 1 .. (Max_Bet_Pool - 1) / 2) of Natural;
type Memory_Record is record
Predecessor : Intege... |
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Element_Visitors;
with Program.Elements.Defining_Character_Literals;
with Program.Elements.Defining_Identifiers;
with Pro... |
-----------------------------------------------------------------------
-- wiki-helpers -- Helper operations for wiki parsers and renderer
-- Copyright (C) 2016, 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- y... |
with Ada.Streams.Stream_IO;
with Ada.Text_IO;
procedure Random is
Number : Integer;
Random_File : Ada.Streams.Stream_IO.File_Type;
begin
Ada.Streams.Stream_IO.Open (File => Random_File,
Mode => Ada.Streams.Stream_IO.In_File,
Name => "/dev/random");
... |
with Ada.Numerics.Discrete_Random;
with Ada.Streams.Stream_IO;
with Ada.Text_IO;
with Ada.Unchecked_Deallocation;
with Hashing;
with Ada.Containers.Vectors;
package body Benchmark_S_Graph_1 is
package Skill renames Graph_1.Api;
use Graph_1;
use Skill;
type State_Type is access Skill_State;
State : Sta... |
-- { dg-do compile }
package body Discr35 is
procedure Proc1 is
R : Rec2 := Null_Rec2;
begin
null;
end;
procedure Proc2 is
R : Rec2;
begin
R := Null_Rec2;
end;
end Discr35;
|
with Ada.Wide_Text_IO; use Ada.Wide_Text_IO;
with ASIS;
with ASIS.Text;
package FP_Translation is
type Traversal_State is
record
Span : ASIS.Text.Span;
Output_File : File_Type;
Trace : Boolean;
end record;
procedure Pre_Op
(Element : Asis.Element;
Contr... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
--
-- Checks if a string is a valid email address.
--
-- Strings for test are located in file <email.txt>
--
with Ada.Text_IO; use Ada.Text_IO;
with AdaPcre; use AdaPcre;
procedure Email is
Email_File : File_Type;
Email_Pattern : constant String :=
"^[A-z0-9._%-]+@[A-z0-9.-]+\.[A-z]{2,4}$";
Email... |
--------------------------------------------------------------------------------
-- --
-- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers. --
-- ... |
with C.elf;
with C.link;
with C.sys.types;
package body System.Storage_Map is
pragma Suppress (All_Checks);
use type C.signed_int;
use type C.signed_long; -- 64bit ssize_t
-- the type of dlpi_phdr is different between 32bit and 64bit.
function To_Address (Value : access constant C.elf.Elf32_Phdr)
... |
--------------------------------------------------------------------------------
-- 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... |
-- 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... |
package HAL.I2C with SPARK_Mode => Off is
type I2C_Status is
(Ok,
Err_Error,
Err_Timeout,
Busy);
type I2C_Data is array (Natural range <>) of Byte;
type I2C_Memory_Address_Size is
(Memory_Size_8b,
Memory_Size_16b);
subtype I2C_Address is UInt10;
type I2C_Port is lim... |
-- Copyright (c) 2020 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Characters.Latin_1;
with Ada.Directories;
with Ada.Streams.Stream_IO;
with Ada.Unchecked_Deallocation;
with AWS.Client;
with... |
-- FILE: oedipus.ads
-- LICENSE: MIT © 2021 Mae Morella
with Ada.Exceptions; use Ada.Exceptions;
package Oedipus is
-- defines the Complex type, which represents a complex number A + Bi
type Complex is private;
function Create_Complex (A, B : in Float) return Complex;
-- PRECOND: none
-- POSTCOND: Co... |
package body STM32GD.GPIO.Polled is
T : Boolean;
procedure Wait_For_Trigger is
begin
while Pin.Is_Set loop
null;
end loop;
T := True;
end Wait_For_Trigger;
procedure Clear_Trigger is
begin
T := False;
end Clear_Trigger;
function Triggered return Boolean is
... |
with gnatcoll.SQL.Postgres; use gnatcoll.SQL.Postgres;
with gnatcoll.SQL.Exec; use gnatcoll.SQL.Exec;
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
with Ada.Calendar; use Ada.Calendar;
with Ada.Calendar.Formatting; use Ada.Cal... |
package body GLOBE_3D.Options is
function Is_debug_mode return Boolean is
begin
return
show_normals or
show_portals or
full_check_objects or
filter_portal_depth;
end Is_debug_mode;
end GLOBE_3D.Options;
|
with Text_IO;
with Direct_IO;
with Strings_Package; use Strings_Package;
with LATIN_FILE_NAMES; use LATIN_FILE_NAMES;
with Inflections_Package; use Inflections_Package;
with Dictionary_Package; use Dictionary_Package;
with WORD_SUPPORT_PACKAGE; use WORD_SUPPORT_PACKAGE;
package ENGL... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
-----------------------------------------------------------------------
-- Sessions Tests - Unit tests for Servlet.Sessions
-- Copyright (C) 2010, 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 ... |
-- C87B41A.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... |
-- Generated by a script from an "avr tools device file" (atdf)
package SAM.Interrupt_Names is
Number_Of_Interrupts : constant := 136;
ac_interrupt : constant := 122;
adc0_other_interrupt : constant := 118;
adc0_resrdy_interrupt : constant := 119;
adc1_other_inte... |
-- { dg-do compile }
-- { dg-options "-O2" }
with Ada.Text_IO; use Ada.Text_IO;
with Assert;
package body Controlled_Record is
procedure Assert_Invariants (PA : Point_T) is
PB : Point_T;
begin
Assert.Assert (PB.Pos = PA.Pos);
end;
end Controlled_Record;
|
with
ada.unchecked_Deallocation;
package body openGL.Glyph
is
---------
-- Forge
--
procedure define (Self : in out Item; glyth_Slot : in freetype_c.FT_GlyphSlot.item)
is
begin
Self.Impl := new GlyphImpl.item;
Self.Impl.define (glyth_Slot);
end define;
procedure define (... |
procedure Numbers is
Mike, Alice: Integer;
John_Smith: Integer;
F: Float := 1.0;
procedure x2 (x3:Integer) is
x: Integer := 1;
begin
Mike := 1;
end x2;
begin
x2(Alice, 2, 3);
end Numbers; |
--//////////////////////////////////////////////////////////
-- SFML - Simple and Fast Multimedia Library
-- Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
-- 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... |
-----------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with Ada.Strings.Unbounded;
package kv.avm.Code_Buffers is
type Buffer_Type is tagged private;
procedure Put_Meta
(Self : in out Buffer_Type;
Data : in String);
procedure Put_Instruction
(Self : in out Buffer_Type;
Data : in String);
procedure Put_Comment
(Self :... |
------------------------------------------------------------------------------
-- Copyright (c) 2013, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- p... |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- ... |
with TEXT_IO; use TEXT_IO;
procedure PRIMES is
package INT_IO is new INTEGER_IO(INTEGER);
use INT_IO;
NUM_PRIMES : constant := 5;
COUNT : INTEGER := 0;
function IS_PRIME(P : INTEGER) return BOOLEAN is
begin
if P < 2 then
return FALSE;
end if;
for I in 2 .. P loop
... |
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Iterator_Interfaces;
package WebIDL.Interface_Members is
pragma Preelaborate;
type Interface_Member is limited interface;
-- Interfaces... |
private with Ada.Text_IO;
private with GNAT.OS_Lib;
private with CLIC.Subcommand.Instance;
private with CLIC.TTY;
package CLIC_Ex.Commands is
procedure Execute;
private
procedure Set_Global_Switches
(Config : in out CLIC.Subcommand.Switches_Configuration);
package Sub_Cmd is new CLIC.Subcommand.Inst... |
-----------------------------------------------------------------------
-- css-analysis-rules-types -- Rules for CSS pre-defined value types
-- Copyright (C) 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you m... |
-- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../License.txt
with Terminal_Interface.Curses;
package Display.Curses is
package TIC renames Terminal_Interface.Curses;
-- Initialize the curses screen.
-- Returns False if no color support (curses not used at all)
... |
-- parse_args-testable.ads
-- A testable version of the Argument_Parser type
-- Copyright (c) 2016, James Humphry
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appea... |
-----------------------------------------------------------------------
-- util-properties-bundles -- Generic name/value property management
-- Copyright (C) 2001 - 2020 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
--... |
--
-- This file is part of the coreboot project.
--
-- Copyright (C) 2016 secunet Security Networks AG
--
-- 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; version 2 of the License.
--
-- This ... |
with Ada.Text_Io; use Ada.Text_Io;
with Ada.Strings.Fixed;
with Interfaces; use Interfaces;
procedure Sieteri_Triangles is
subtype Practical_Order is Unsigned_32 range 0..4;
function Pow(X : Unsigned_32; N : Unsigned_32) return Unsigned_32 is
begin
if N = 0 then
return 1;
else
... |
with Alire.Project; use Alire.Project;
package Licensing_Alr is
Working_Release : constant Release := Set_Root_Project (
"licensing",
V ("0.0.0-alr_working_copy"));
-- An explicit dependency on alr is only needed if you want to compile this file.
-- To do so, include the "alr.gpr" project in y... |
package body Longest_Common_Prefix
with SPARK_Mode => On
is
function LCP (X, Y : Positive) return Natural is
L : Natural;
begin
L := 0;
while X + L <= A'Last
and then Y + L <= A'Last
and then A (X + L) = A (Y + L)
loop
pragma Loop_Invariant (for all K in 0 .. L -... |
--
-- Copyright 2021 (C) Holger Rodriguez
--
-- SPDX-License-Identifier: BSD-3-Clause
--
with LED_Control;
package body Execute.LEDs is
--------------------------------------------------------------------------
-- definition of the look up table for the procedures to execute
-- based on the command given... |
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 GNAT.Command_Line; use GNAT.Command_Line;
with GNAT.Strings; use GNAT.Strings;
package body Command_Line is
function Parse_Command_Line
(Input_Files : out Input_File_Vectors.Vector;
Recurse_Projects : out Boolean;
Directory_Prefix : out S_U.Unbounded_String;
Output_File :... |
package p_StepHandler.ReverseIPHandler is
type ReverseIPHandler is new T_StepHandler with private;
type Ptr_ReverseIPHandler is access all ReverseIPHandler;
function Make (Handler : in out ReverseIPHandler) return ReverseIPHandler;
procedure Handle (Self : in out ReverseIPHandler);
funct... |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- ... |
with Ada.Containers.Indefinite_Ordered_Maps;
use Ada;
package Utilities.Option_Lists is
package Option_Maps is
new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => String,
Element_Type => String);
subtype Option_List is Option_Maps.Map;
Empty_Lis... |
package Aggr10_Pkg is
type Name_Id is range 300_000_000 .. 399_999_999;
type Int is range -2 ** 31 .. +2 ** 31 - 1;
type Source_Id is range 5_000_000 .. 5_999_999;
type Name_Location is record
Name : Name_Id;
Location : Int;
Source : Source_Id;
Except : Boolean;
Found... |
-- Userdata_Example
-- A example of using the Ada values in Lua via UserData values
-- Copyright (c) 2015, James Humphry - see LICENSE for terms
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Long_Float_Text_IO; use Ada.Long_Float_Text_IO;
with Lua; use Lua;
with Lua.Util; use Lua.Util;
with Example_Userdata;
use Exam... |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- ... |
with Units.Numerics; use Units.Numerics;
with MS5611.Driver; use MS5611;
package body Barometer with SPARK_Mode,
Refined_State => (States_Beyond_Sensor_Template => null)
is
--overriding
procedure initialize (Self : in out Barometer_Tag) is
begin
Driver.Init;
Self.state := READY;
end initiali... |
-- Institution: Technische Universität München
-- Department: Realtime Computer Systems (RCS)
-- Project: StratoX
--
-- Authors: Emanuel Regnath (emanuel.regnath@tum.de)
with HIL.Devices;
with Ada.Real_Time;
-- @summary
-- Target-independent specification for HIL of Clocks
package HIL.Clock with
SPARK_Mo... |
-- { 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;
|
package itype is
generic
type T is private;
function G return not null access constant T;
end itype;
|
-- SPDX-FileCopyrightText: 2020-2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Element_Vectors;
with Program.Elements.Constraints;
with Program.Elements.Defining_Names;
with Program.Elements.Discrete_Ranges;
with Prog... |
package Lto7_Pkg is
type Iface_1 is interface;
procedure op1(this : Iface_1) is abstract;
type Iface_2 is interface;
procedure op2 (this : Iface_2) is abstract;
type Root is new Iface_1 with record
m_name : String(1..4);
end record;
procedure op1 (this : Root);
type DT is new Root and ... |
with Regions;
with Regions.Symbols;
package Regions.Tests is
procedure Test_Standard;
-- Create an empty Standard package and put into an empty environment.
-- Find a region with Standard symbol.
procedure Symbol_Exists
(Region : Regions.Region'Class;
Symbol : Regions.Symbols.Symbol;
E... |
package body AOC.AOC_2019.Day07 is
use Intcode;
type Phases is array (0 .. 4) of Element;
type Power_Func is access function (Phase_Permutations : Phases) return Element;
-- Uses Heap's algorithm
function Get_Max_Power (K : Natural; A : in out Phases; F : Power_Func) return Element is
M... |
with Ada.Containers.Hashed_Maps;
with Ada.Containers.Ordered_Sets;
with Ada.Strings.Wide_Fixed;
with Ada.Strings.Wide_Hash;
with Ada.Unchecked_Conversion;
with Asis.Compilation_Units;
with Asis.Declarations;
with Asis.Elements;
with Asis.Text;
with League.Characters.Latin;
with League.Strings.Hash;
package body Docu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.