hexsha
stringlengths
40
40
size
int64
3
1.05M
ext
stringlengths
1
11
lang
stringlengths
1
21
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
112
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
sequence
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
113
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
sequence
max_issues_count
float64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
113
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
sequence
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.05M
avg_line_length
float64
1
966k
max_line_length
int64
1
977k
alphanum_fraction
float64
0
1
4a8a7cfad3cadefcd990e1697ca1eb657c67e603
149
adb
Ada
tests/syntax_examples/src/forward_declaration.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
1
2022-03-08T13:00:47.000Z
2022-03-08T13:00:47.000Z
src/tools/Dependency_Graph_Extractor/tests/Syntax_Examples/src/forward_declaration.adb
selroc/Renaissance-Ada
39230b34aced4a9d83831be346ca103136c53715
[ "BSD-3-Clause" ]
null
null
null
src/tools/Dependency_Graph_Extractor/tests/Syntax_Examples/src/forward_declaration.adb
selroc/Renaissance-Ada
39230b34aced4a9d83831be346ca103136c53715
[ "BSD-3-Clause" ]
null
null
null
package body Forward_Declaration is procedure P is null; procedure Q; procedure Q is null; end Forward_Declaration;
12.416667
35
0.644295
c5e19e882d91f307b869affa75f1920f30f9da78
2,731
ads
Ada
tools/scitools/conf/understand/ada/ada05/s-tpinop.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
1
2020-01-20T21:26:46.000Z
2020-01-20T21:26:46.000Z
tools/scitools/conf/understand/ada/ada05/s-tpinop.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/ada/ada05/s-tpinop.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K _ P R I M I T I V E S . -- -- I N T E R R U P T _ O P E R A T I O N S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1998-2005 Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ with System.Interrupt_Management; with System.Tasking; package System.Task_Primitives.Interrupt_Operations is pragma Preelaborate; package IM renames System.Interrupt_Management; package ST renames System.Tasking; procedure Set_Interrupt_ID (Interrupt : IM.Interrupt_ID; T : ST.Task_Id); -- Associate an Interrupt_ID with a task. function Get_Interrupt_ID (T : ST.Task_Id) return IM.Interrupt_ID; -- Return the Interrupt_ID associated with a task. function Get_Task_Id (Interrupt : IM.Interrupt_ID) return ST.Task_Id; -- Return the Task_Id associated with an Interrupt. end System.Task_Primitives.Interrupt_Operations;
50.574074
78
0.46613
4acbf3cf86979c0746bfa5560ffdca0a2693e292
1,305
ads
Ada
source/oasis/program-elements-infix_operators.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/oasis/program-elements-infix_operators.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/oasis/program-elements-infix_operators.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
1
2019-10-16T09:05:27.000Z
2019-10-16T09:05:27.000Z
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Elements.Expressions; with Program.Elements.Operator_Symbols; package Program.Elements.Infix_Operators is pragma Pure (Program.Elements.Infix_Operators); type Infix_Operator is limited interface and Program.Elements.Expressions.Expression; type Infix_Operator_Access is access all Infix_Operator'Class with Storage_Size => 0; not overriding function Left (Self : Infix_Operator) return Program.Elements.Expressions.Expression_Access is abstract; not overriding function Operator (Self : Infix_Operator) return not null Program.Elements.Operator_Symbols.Operator_Symbol_Access is abstract; not overriding function Right (Self : Infix_Operator) return not null Program.Elements.Expressions.Expression_Access is abstract; type Infix_Operator_Text is limited interface; type Infix_Operator_Text_Access is access all Infix_Operator_Text'Class with Storage_Size => 0; not overriding function To_Infix_Operator_Text (Self : in out Infix_Operator) return Infix_Operator_Text_Access is abstract; end Program.Elements.Infix_Operators;
30.348837
78
0.738697
4a8991e809b981070439b2edf5076277e9ea52bd
3,716
adb
Ada
lib/zlib-1.2.3/contrib/ada/buffer_demo.adb
Surya361/minix-exp-lottery
de7535551e3f09764b977f1452cb4aefeee61b83
[ "BSD-3-Clause" ]
null
null
null
lib/zlib-1.2.3/contrib/ada/buffer_demo.adb
Surya361/minix-exp-lottery
de7535551e3f09764b977f1452cb4aefeee61b83
[ "BSD-3-Clause" ]
null
null
null
lib/zlib-1.2.3/contrib/ada/buffer_demo.adb
Surya361/minix-exp-lottery
de7535551e3f09764b977f1452cb4aefeee61b83
[ "BSD-3-Clause" ]
null
null
null
---------------------------------------------------------------- -- ZLib for Ada thick binding. -- -- -- -- Copyright (C) 2002-2004 Dmitriy Anisimkov -- -- -- -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- -- -- $Id: buffer_demo.adb,v 1.1 2005/09/23 22:39:01 beng Exp $ -- This demo program provided by Dr Steve Sangwine <sjs@essex.ac.uk> -- -- Demonstration of a problem with Zlib-Ada (already fixed) when a buffer -- of exactly the correct size is used for decompressed data, and the last -- few bytes passed in to Zlib are checksum bytes. -- This program compresses a string of text, and then decompresses the -- compressed text into a buffer of the same size as the original text. with Ada.Streams; use Ada.Streams; with Ada.Text_IO; with ZLib; use ZLib; procedure Buffer_Demo is EOL : Character renames ASCII.LF; Text : constant String := "Four score and seven years ago our fathers brought forth," & EOL & "upon this continent, a new nation, conceived in liberty," & EOL & "and dedicated to the proposition that `all men are created equal'."; Source : Stream_Element_Array (1 .. Text'Length); for Source'Address use Text'Address; begin Ada.Text_IO.Put (Text); Ada.Text_IO.New_Line; Ada.Text_IO.Put_Line ("Uncompressed size : " & Positive'Image (Text'Length) & " bytes"); declare Compressed_Data : Stream_Element_Array (1 .. Text'Length); L : Stream_Element_Offset; begin Compress : declare Compressor : Filter_Type; I : Stream_Element_Offset; begin Deflate_Init (Compressor); -- Compress the whole of T at once. Translate (Compressor, Source, I, Compressed_Data, L, Finish); pragma Assert (I = Source'Last); Close (Compressor); Ada.Text_IO.Put_Line ("Compressed size : " & Stream_Element_Offset'Image (L) & " bytes"); end Compress; -- Now we decompress the data, passing short blocks of data to Zlib -- (because this demonstrates the problem - the last block passed will -- contain checksum information and there will be no output, only a -- check inside Zlib that the checksum is correct). Decompress : declare Decompressor : Filter_Type; Uncompressed_Data : Stream_Element_Array (1 .. Text'Length); Block_Size : constant := 4; -- This makes sure that the last block contains -- only Adler checksum data. P : Stream_Element_Offset := Compressed_Data'First - 1; O : Stream_Element_Offset; begin Inflate_Init (Decompressor); loop Translate (Decompressor, Compressed_Data (P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)), P, Uncompressed_Data (Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last), O, No_Flush); Ada.Text_IO.Put_Line ("Total in : " & Count'Image (Total_In (Decompressor)) & ", out : " & Count'Image (Total_Out (Decompressor))); exit when P = L; end loop; Ada.Text_IO.New_Line; Ada.Text_IO.Put_Line ("Decompressed text matches original text : " & Boolean'Image (Uncompressed_Data = Source)); end Decompress; end; end Buffer_Demo;
34.728972
77
0.564855
0e2de14ff084aacb15b95e5fcdaaba9c29fb9f34
63,306
adb
Ada
tools/gen_keyboard.adb
Fabien-Chouteau/sdlada
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
[ "Zlib" ]
1
2021-10-30T14:41:56.000Z
2021-10-30T14:41:56.000Z
tools/gen_keyboard.adb
Fabien-Chouteau/sdlada
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
[ "Zlib" ]
null
null
null
tools/gen_keyboard.adb
Fabien-Chouteau/sdlada
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
[ "Zlib" ]
null
null
null
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2020, 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 from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- -- 3. This notice may not be removed or altered from any source -- distribution. -------------------------------------------------------------------------------------------------------------------- -- Gen_Keyboard -------------------------------------------------------------------------------------------------------------------- -- Generates the SDL.Events.Keyboards.ads file. -- Makefile should call this and redirect the output to the correct file in $TOP/gen_src/sdl-events-keyboards.ads. -------------------------------------------------------------------------------------------------------------------- with Ada.Unchecked_Conversion; with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Characters.Latin_1; with Utils; use Utils; with Scancodes; use Scancodes; procedure Gen_Keyboard is package Latin_1 renames Ada.Characters.Latin_1; function To_US (Str : in String) return Unbounded_String renames To_Unbounded_String; License : constant array (Positive range <>) of Unbounded_String := (To_US ("Copyright (c) 2013-2020, Luke A. Guest"), To_US (""), To_US ("This software is provided 'as-is', without any express or implied"), To_US ("warranty. In no event will the authors be held liable for any damages"), To_US ("arising from the use of this software."), To_US (""), To_US ("Permission is granted to anyone to use this software for any purpose,"), To_US ("including commercial applications, and to alter it and redistribute it"), To_US ("freely, subject to the following restrictions:"), To_US (""), To_US (" 1. The origin of this software must not be misrepresented; you must not"), To_US (" claim that you wrote the original software. If you use this software"), To_US (" in a product, an acknowledgment in the product documentation would be"), To_US (" appreciated but is not required."), To_US (""), To_US (" 2. Altered source versions must be plainly marked as such, and must not be"), To_US (" misrepresented as being the original software."), To_US (""), To_US (" 3. This notice may not be removed or altered from any source"), To_US (" distribution.")); Package_Description : constant array (Positive range <>) of Unbounded_String := (To_US ("SDL.Events.Keyboards"), To_US (""), To_US ("Keyboard specific events.")); type Mapping_States is (Output, New_Line, Comment); package Scan_Codes_IO is new Integer_IO (Scan_Codes); use Scan_Codes_IO; type Scan_Code_Mapping is record State : Mapping_States := Output; Name : Unbounded_String := Null_Unbounded_String; Code : Scan_Codes := Scan_Codes'Last; Comment : Unbounded_String := Null_Unbounded_String; end record; New_Line_Scan_Code : constant Scan_Code_Mapping := (New_Line, Null_Unbounded_String, Scan_Codes'Last, Null_Unbounded_String); type Scan_Code_Tables is array (Positive range <>) of Scan_Code_Mapping; Scan_Code_Table : constant Scan_Code_Tables := ((Output, To_US ("Scan_Code_Unknown"), 0, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_A"), 4, Null_Unbounded_String), (Output, To_US ("Scan_Code_B"), 5, Null_Unbounded_String), (Output, To_US ("Scan_Code_C"), 6, Null_Unbounded_String), (Output, To_US ("Scan_Code_D"), 7, Null_Unbounded_String), (Output, To_US ("Scan_Code_E"), 8, Null_Unbounded_String), (Output, To_US ("Scan_Code_F"), 9, Null_Unbounded_String), (Output, To_US ("Scan_Code_G"), 10, Null_Unbounded_String), (Output, To_US ("Scan_Code_H"), 11, Null_Unbounded_String), (Output, To_US ("Scan_Code_I"), 12, Null_Unbounded_String), (Output, To_US ("Scan_Code_J"), 13, Null_Unbounded_String), (Output, To_US ("Scan_Code_K"), 14, Null_Unbounded_String), (Output, To_US ("Scan_Code_L"), 15, Null_Unbounded_String), (Output, To_US ("Scan_Code_M"), 16, Null_Unbounded_String), (Output, To_US ("Scan_Code_N"), 17, Null_Unbounded_String), (Output, To_US ("Scan_Code_O"), 18, Null_Unbounded_String), (Output, To_US ("Scan_Code_P"), 19, Null_Unbounded_String), (Output, To_US ("Scan_Code_Q"), 20, Null_Unbounded_String), (Output, To_US ("Scan_Code_R"), 21, Null_Unbounded_String), (Output, To_US ("Scan_Code_S"), 22, Null_Unbounded_String), (Output, To_US ("Scan_Code_T"), 23, Null_Unbounded_String), (Output, To_US ("Scan_Code_U"), 24, Null_Unbounded_String), (Output, To_US ("Scan_Code_V"), 25, Null_Unbounded_String), (Output, To_US ("Scan_Code_W"), 26, Null_Unbounded_String), (Output, To_US ("Scan_Code_X"), 27, Null_Unbounded_String), (Output, To_US ("Scan_Code_Y"), 28, Null_Unbounded_String), (Output, To_US ("Scan_Code_Z"), 29, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_1"), 30, Null_Unbounded_String), (Output, To_US ("Scan_Code_2"), 31, Null_Unbounded_String), (Output, To_US ("Scan_Code_3"), 32, Null_Unbounded_String), (Output, To_US ("Scan_Code_4"), 33, Null_Unbounded_String), (Output, To_US ("Scan_Code_5"), 34, Null_Unbounded_String), (Output, To_US ("Scan_Code_6"), 35, Null_Unbounded_String), (Output, To_US ("Scan_Code_7"), 36, Null_Unbounded_String), (Output, To_US ("Scan_Code_8"), 37, Null_Unbounded_String), (Output, To_US ("Scan_Code_9"), 38, Null_Unbounded_String), (Output, To_US ("Scan_Code_0"), 39, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Return"), 40, Null_Unbounded_String), (Output, To_US ("Scan_Code_Escape"), 41, Null_Unbounded_String), (Output, To_US ("Scan_Code_Backspace"), 42, Null_Unbounded_String), (Output, To_US ("Scan_Code_Tab"), 43, Null_Unbounded_String), (Output, To_US ("Scan_Code_Space"), 44, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Minus"), 45, Null_Unbounded_String), (Output, To_US ("Scan_Code_Equals"), 46, Null_Unbounded_String), (Output, To_US ("Scan_Code_Left_Bracket"), 47, Null_Unbounded_String), (Output, To_US ("Scan_Code_Right_Bracket"), 48, Null_Unbounded_String), (Output, To_US ("Scan_Code_Back_Slash"), 49, Null_Unbounded_String), (Output, To_US ("Scan_Code_Non_US_Hash"), 50, Null_Unbounded_String), (Output, To_US ("Scan_Code_Semi_Colon"), 51, Null_Unbounded_String), (Output, To_US ("Scan_Code_Apostrophe"), 52, Null_Unbounded_String), (Output, To_US ("Scan_Code_Grave"), 53, Null_Unbounded_String), (Output, To_US ("Scan_Code_Comma"), 54, Null_Unbounded_String), (Output, To_US ("Scan_Code_Period"), 55, Null_Unbounded_String), (Output, To_US ("Scan_Code_Slash"), 56, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Caps_Lock"), 57, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_F1"), 58, Null_Unbounded_String), (Output, To_US ("Scan_Code_F2"), 59, Null_Unbounded_String), (Output, To_US ("Scan_Code_F3"), 60, Null_Unbounded_String), (Output, To_US ("Scan_Code_F4"), 61, Null_Unbounded_String), (Output, To_US ("Scan_Code_F5"), 62, Null_Unbounded_String), (Output, To_US ("Scan_Code_F6"), 63, Null_Unbounded_String), (Output, To_US ("Scan_Code_F7"), 64, Null_Unbounded_String), (Output, To_US ("Scan_Code_F8"), 65, Null_Unbounded_String), (Output, To_US ("Scan_Code_F9"), 66, Null_Unbounded_String), (Output, To_US ("Scan_Code_F10"), 67, Null_Unbounded_String), (Output, To_US ("Scan_Code_F11"), 68, Null_Unbounded_String), (Output, To_US ("Scan_Code_F12"), 69, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Print_Screen"), 70, Null_Unbounded_String), (Output, To_US ("Scan_Code_Scroll_Lock"), 71, Null_Unbounded_String), (Output, To_US ("Scan_Code_Pause"), 72, Null_Unbounded_String), (Output, To_US ("Scan_Code_Insert"), 73, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Home"), 74, Null_Unbounded_String), (Output, To_US ("Scan_Code_Page_Up"), 75, Null_Unbounded_String), (Output, To_US ("Scan_Code_Delete"), 76, Null_Unbounded_String), (Output, To_US ("Scan_Code_End"), 77, Null_Unbounded_String), (Output, To_US ("Scan_Code_Page_Down"), 78, Null_Unbounded_String), (Output, To_US ("Scan_Code_Right"), 79, Null_Unbounded_String), (Output, To_US ("Scan_Code_Left"), 80, Null_Unbounded_String), (Output, To_US ("Scan_Code_Down"), 81, Null_Unbounded_String), (Output, To_US ("Scan_Code_Up"), 82, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Num_Lock_Clear"), 83, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_KP_Divide"), 84, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Multiply"), 85, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Minus"), 86, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Plus"), 87, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Enter"), 88, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_1"), 89, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_2"), 90, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_3"), 91, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_4"), 92, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_5"), 93, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_6"), 94, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_7"), 95, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_8"), 96, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_9"), 97, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_0"), 98, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Period"), 99, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Non_US_Back_Slash"), 100, Null_Unbounded_String), (Output, To_US ("Scan_Code_Application"), 101, Null_Unbounded_String), (Output, To_US ("Scan_Code_Power"), 102, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Equals"), 103, Null_Unbounded_String), (Output, To_US ("Scan_Code_F13"), 104, Null_Unbounded_String), (Output, To_US ("Scan_Code_F14"), 105, Null_Unbounded_String), (Output, To_US ("Scan_Code_F15"), 106, Null_Unbounded_String), (Output, To_US ("Scan_Code_F16"), 107, Null_Unbounded_String), (Output, To_US ("Scan_Code_F17"), 108, Null_Unbounded_String), (Output, To_US ("Scan_Code_F18"), 109, Null_Unbounded_String), (Output, To_US ("Scan_Code_F19"), 110, Null_Unbounded_String), (Output, To_US ("Scan_Code_F20"), 111, Null_Unbounded_String), (Output, To_US ("Scan_Code_F21"), 112, Null_Unbounded_String), (Output, To_US ("Scan_Code_F22"), 113, Null_Unbounded_String), (Output, To_US ("Scan_Code_F23"), 114, Null_Unbounded_String), (Output, To_US ("Scan_Code_F24"), 115, Null_Unbounded_String), (Output, To_US ("Scan_Code_Execute"), 116, Null_Unbounded_String), (Output, To_US ("Scan_Code_Help"), 117, Null_Unbounded_String), (Output, To_US ("Scan_Code_Menu"), 118, Null_Unbounded_String), (Output, To_US ("Scan_Code_Select"), 119, Null_Unbounded_String), (Output, To_US ("Scan_Code_Stop"), 120, Null_Unbounded_String), (Output, To_US ("Scan_Code_Again"), 121, Null_Unbounded_String), (Output, To_US ("Scan_Code_Undo"), 122, Null_Unbounded_String), (Output, To_US ("Scan_Code_Cut"), 123, Null_Unbounded_String), (Output, To_US ("Scan_Code_Copy"), 124, Null_Unbounded_String), (Output, To_US ("Scan_Code_Paste"), 125, Null_Unbounded_String), (Output, To_US ("Scan_Code_Find"), 126, Null_Unbounded_String), (Output, To_US ("Scan_Code_Mute"), 127, Null_Unbounded_String), (Output, To_US ("Scan_Code_Volume_Up"), 128, Null_Unbounded_String), (Output, To_US ("Scan_Code_Volume_Down"), 129, Null_Unbounded_String), (Comment, Null_Unbounded_String, Scan_Codes'Last, To_US ("Scan_Code_Locking_Caps_Lock : constant Scan_Codes := 130;")), (Comment, Null_Unbounded_String, Scan_Codes'Last, To_US ("Scan_Code_Locking_Num_Lock : constant Scan_Codes := 131;")), (Comment, Null_Unbounded_String, Scan_Codes'Last, To_US ("Scan_Code_Locking_Scroll_Lock : constant Scan_Codes := 132;")), (Output, To_US ("Scan_Code_KP_Comma"), 133, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Equals_AS400"), 134, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_International_1"), 135, To_US ("Used on Asian keyboards.")), (Output, To_US ("Scan_Code_International_2"), 136, Null_Unbounded_String), (Output, To_US ("Scan_Code_International_3"), 137, To_US ("Yen")), (Output, To_US ("Scan_Code_International_4"), 138, Null_Unbounded_String), (Output, To_US ("Scan_Code_International_5"), 139, Null_Unbounded_String), (Output, To_US ("Scan_Code_International_6"), 140, Null_Unbounded_String), (Output, To_US ("Scan_Code_International_7"), 141, Null_Unbounded_String), (Output, To_US ("Scan_Code_International_8"), 142, Null_Unbounded_String), (Output, To_US ("Scan_Code_International_9"), 143, Null_Unbounded_String), (Output, To_US ("Scan_Code_Language_1"), 144, To_US ("Hangul/En")), (Output, To_US ("Scan_Code_Language_2"), 145, To_US ("Hanja con")), (Output, To_US ("Scan_Code_Language_3"), 146, To_US ("Katakana.")), (Output, To_US ("Scan_Code_Language_4"), 147, To_US ("Hiragana.")), (Output, To_US ("Scan_Code_Language_5"), 148, To_US ("Zenkaku/H")), (Output, To_US ("Scan_Code_Language_6"), 149, To_US ("Reserved.")), (Output, To_US ("Scan_Code_Language_7"), 150, To_US ("Reserved.")), (Output, To_US ("Scan_Code_Language_8"), 151, To_US ("Reserved.")), (Output, To_US ("Scan_Code_Language_9"), 152, To_US ("Reserved.")), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Alt_Erase"), 153, To_US ("Erase-ease.")), (Output, To_US ("Scan_Code_Sys_Req"), 154, Null_Unbounded_String), (Output, To_US ("Scan_Code_Cancel"), 155, Null_Unbounded_String), (Output, To_US ("Scan_Code_Clear"), 156, Null_Unbounded_String), (Output, To_US ("Scan_Code_Prior"), 157, Null_Unbounded_String), (Output, To_US ("Scan_Code_Return_2"), 158, Null_Unbounded_String), (Output, To_US ("Scan_Code_Separator"), 159, Null_Unbounded_String), (Output, To_US ("Scan_Code_Out"), 160, Null_Unbounded_String), (Output, To_US ("Scan_Code_Oper"), 161, Null_Unbounded_String), (Output, To_US ("Scan_Code_Clear_Again"), 162, Null_Unbounded_String), (Output, To_US ("Scan_Code_CR_Sel"), 163, Null_Unbounded_String), (Output, To_US ("Scan_Code_EX_Sel"), 164, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_KP_00"), 176, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_000"), 177, Null_Unbounded_String), (Output, To_US ("Scan_Code_Thousands_Separator"), 178, Null_Unbounded_String), (Output, To_US ("Scan_Code_Decimal_Separator"), 179, Null_Unbounded_String), (Output, To_US ("Scan_Code_Currency_Unit"), 180, Null_Unbounded_String), (Output, To_US ("Scan_Code_Currency_Subunit"), 181, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Left_Parenthesis"), 182, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Right_Parentheesis"), 183, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Left_Brace"), 184, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Right_Brace"), 185, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Tab"), 186, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Backspace"), 187, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_A"), 188, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_B"), 189, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_C"), 190, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_D"), 191, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_E"), 192, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_F"), 193, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_XOR"), 194, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Power"), 195, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Percent"), 196, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Less"), 197, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Greater"), 198, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Ampersand"), 199, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Double_Ampersand"), 200, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Vertical_Bar"), 201, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Double_Vertical_Bar"), 202, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Colon"), 203, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Hash"), 204, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Space"), 205, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_At"), 206, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Exclamation"), 207, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Memory_Store"), 208, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Memory_Recall"), 209, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Memory_Clear"), 210, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Memory_Add"), 211, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Memory_Subtract"), 212, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Memory_Multiply"), 213, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Memory_Divide"), 214, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Plus_Minus"), 215, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Clear"), 216, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Clear_Entry"), 217, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Binary"), 218, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Octal"), 219, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Decimal"), 220, Null_Unbounded_String), (Output, To_US ("Scan_Code_KP_Hexadecimal"), 221, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Left_Control"), 224, Null_Unbounded_String), (Output, To_US ("Scan_Code_Left_Shift"), 225, Null_Unbounded_String), (Output, To_US ("Scan_Code_Left_Alt"), 226, To_US ("Alt, option, etc.")), (Output, To_US ("Scan_Code_Left_GUI"), 227, To_US ("Windows, Command (Apple), Meta, etc.")), (Output, To_US ("Scan_Code_Right_Control"), 228, Null_Unbounded_String), (Output, To_US ("Scan_Code_Right_Shift"), 229, Null_Unbounded_String), (Output, To_US ("Scan_Code_Right_Alt"), 230, To_US ("Alt gr, option, etc.")), (Output, To_US ("Scan_Code_Right_GUI"), 231, To_US ("Windows, Command (Apple), Meta, etc.")), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Mode"), 257, Null_Unbounded_String), (New_Line_Scan_Code), (Comment, Null_Unbounded_String, Scan_Codes'Last, To_US ("Usage page in USB document.")), (Output, To_US ("Scan_Code_Audio_Next"), 258, Null_Unbounded_String), (Output, To_US ("Scan_Code_Audio_Previous"), 259, Null_Unbounded_String), (Output, To_US ("Scan_Code_Audio_Stop"), 260, Null_Unbounded_String), (Output, To_US ("Scan_Code_Audio_Play"), 261, Null_Unbounded_String), (Output, To_US ("Scan_Code_Audio_Mute"), 262, Null_Unbounded_String), (Output, To_US ("Scan_Code_Media_Select"), 263, Null_Unbounded_String), (Output, To_US ("Scan_Code_WWW"), 264, Null_Unbounded_String), (Output, To_US ("Scan_Code_Mail"), 265, Null_Unbounded_String), (Output, To_US ("Scan_Code_Calculator"), 266, Null_Unbounded_String), (Output, To_US ("Scan_Code_Computer"), 267, Null_Unbounded_String), (Output, To_US ("Scan_Code_AC_Search"), 268, Null_Unbounded_String), (Output, To_US ("Scan_Code_AC_Home"), 269, Null_Unbounded_String), (Output, To_US ("Scan_Code_AC_Back"), 270, Null_Unbounded_String), (Output, To_US ("Scan_Code_AC_Forward"), 271, Null_Unbounded_String), (Output, To_US ("Scan_Code_AC_Stop"), 272, Null_Unbounded_String), (Output, To_US ("Scan_Code_AC_Refresh"), 273, Null_Unbounded_String), (Output, To_US ("Scan_Code_AC_Bookmarks"), 274, Null_Unbounded_String), (New_Line_Scan_Code), (Comment, Null_Unbounded_String, Scan_Codes'Last, To_US ("Walther keys (for Mac?).")), (Output, To_US ("Scan_Code_Brightness_Up"), 275, Null_Unbounded_String), (Output, To_US ("Scan_Code_Brightness_Down"), 276, Null_Unbounded_String), (Output, To_US ("Scan_Code_Display_Switch"), 277, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Illumination_Toggle"), 278, Null_Unbounded_String), (Output, To_US ("Scan_Code_Illumination_Down"), 279, Null_Unbounded_String), (Output, To_US ("Scan_Code_Illumination_Up"), 280, Null_Unbounded_String), (Output, To_US ("Scan_Code_Eject"), 281, Null_Unbounded_String), (Output, To_US ("Scan_Code_Sleep"), 282, Null_Unbounded_String), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Application_1"), 283, Null_Unbounded_String), (Output, To_US ("Scan_Code_Application_2"), 284, Null_Unbounded_String), (New_Line_Scan_Code), (Comment, Null_Unbounded_String, Scan_Codes'Last, To_US ("All other scan codes go here.")), (New_Line_Scan_Code), (Output, To_US ("Scan_Code_Total"), 512, Null_Unbounded_String)); type Key_Codes is mod 2 ** 32 with Convention => C, Size => 32; Internal_To_Key_Code_Mask : constant Key_Codes := 16#2000_0000#; package Key_Codes_IO is new Modular_IO (Key_Codes); use Key_Codes_IO; function Convert is new Ada.Unchecked_Conversion (Source => Scan_Codes, Target => Key_Codes); function To_Key_Code (Code : in Scan_Codes) return Key_Codes is (Internal_To_Key_Code_Mask or Convert (Code)); type Key_Code_Mapping is record State : Mapping_States := Output; Name : Unbounded_String := Null_Unbounded_String; Code : Key_Codes := Key_Codes'Last; end record; New_Line_Code : constant Key_Code_Mapping := (New_Line, Null_Unbounded_String, Key_Codes'Last); type Key_Code_Tables is array (Positive range <>) of Key_Code_Mapping; Key_Code_Table : constant Key_Code_Tables := ((Output, To_US ("Code_Return"), Character'Pos (Latin_1.CR)), (Output, To_US ("Code_Escape"), Character'Pos (Latin_1.ESC)), (Output, To_US ("Code_Backspace"), Character'Pos (Latin_1.BS)), (Output, To_US ("Code_Tab"), Character'Pos (Latin_1.HT)), (Output, To_US ("Code_Space"), Character'Pos (Latin_1.Space)), (Output, To_US ("Code_Exclamation"), Character'Pos (Latin_1.Exclamation)), (Output, To_US ("Code_Double_Quote"), Character'Pos (Latin_1.Quotation)), (Output, To_US ("Code_Hash"), Character'Pos (Latin_1.Number_Sign)), (Output, To_US ("Code_Percent"), Character'Pos (Latin_1.Percent_Sign)), (Output, To_US ("Code_Dollar"), Character'Pos (Latin_1.Dollar_Sign)), (Output, To_US ("Code_Ampersand"), Character'Pos (Latin_1.Ampersand)), (Output, To_US ("Code_Quote"), Character'Pos (Latin_1.Apostrophe)), (Output, To_US ("Code_Left_Parenthesis"), Character'Pos (Latin_1.Left_Parenthesis)), (Output, To_US ("Code_Right_Parenthesis"), Character'Pos (Latin_1.Right_Parenthesis)), (Output, To_US ("Code_Asterisk"), Character'Pos (Latin_1.Asterisk)), (Output, To_US ("Code_Plus"), Character'Pos (Latin_1.Plus_Sign)), (Output, To_US ("Code_Comma"), Character'Pos (Latin_1.Comma)), (Output, To_US ("Code_Minus"), Character'Pos (Latin_1.Minus_Sign)), (Output, To_US ("Code_Period"), Character'Pos (Latin_1.Full_Stop)), (Output, To_US ("Code_Slash"), Character'Pos (Latin_1.Solidus)), (Output, To_US ("Code_0"), Character'Pos ('0')), (Output, To_US ("Code_1"), Character'Pos ('1')), (Output, To_US ("Code_2"), Character'Pos ('2')), (Output, To_US ("Code_3"), Character'Pos ('3')), (Output, To_US ("Code_4"), Character'Pos ('4')), (Output, To_US ("Code_5"), Character'Pos ('5')), (Output, To_US ("Code_6"), Character'Pos ('6')), (Output, To_US ("Code_7"), Character'Pos ('7')), (Output, To_US ("Code_8"), Character'Pos ('8')), (Output, To_US ("Code_9"), Character'Pos ('9')), (Output, To_US ("Code_Colon"), Character'Pos (Latin_1.Colon)), (Output, To_US ("Code_Semi_Colon"), Character'Pos (Latin_1.Semicolon)), (Output, To_US ("Code_Less"), Character'Pos (Latin_1.Less_Than_Sign)), (Output, To_US ("Code_Equals"), Character'Pos (Latin_1.Equals_Sign)), (Output, To_US ("Code_Greater"), Character'Pos (Latin_1.Greater_Than_Sign)), (Output, To_US ("Code_Question"), Character'Pos (Latin_1.Question)), (Output, To_US ("Code_At"), Character'Pos (Latin_1.Commercial_At)), (New_Line_Code), (Comment, To_US ("Skip the uppercase letters."), Key_Codes'Last), (New_Line_Code), (Output, To_US ("Code_Left_Bracket"), Character'Pos (Latin_1.Left_Square_Bracket)), (Output, To_US ("Code_Back_Slash"), Character'Pos (Latin_1.Reverse_Solidus)), (Output, To_US ("Code_Right_Bracket"), Character'Pos (Latin_1.Right_Square_Bracket)), (Output, To_US ("Code_Caret"), Character'Pos (Latin_1.Circumflex)), (Output, To_US ("Code_Underscore"), Character'Pos (Latin_1.Low_Line)), (Output, To_US ("Code_Back_Quote"), Character'Pos (Latin_1.Grave)), (Output, To_US ("Code_A"), Character'Pos ('a')), (Output, To_US ("Code_B"), Character'Pos ('b')), (Output, To_US ("Code_C"), Character'Pos ('c')), (Output, To_US ("Code_D"), Character'Pos ('d')), (Output, To_US ("Code_E"), Character'Pos ('e')), (Output, To_US ("Code_F"), Character'Pos ('f')), (Output, To_US ("Code_G"), Character'Pos ('g')), (Output, To_US ("Code_H"), Character'Pos ('h')), (Output, To_US ("Code_I"), Character'Pos ('i')), (Output, To_US ("Code_J"), Character'Pos ('j')), (Output, To_US ("Code_K"), Character'Pos ('k')), (Output, To_US ("Code_L"), Character'Pos ('l')), (Output, To_US ("Code_M"), Character'Pos ('m')), (Output, To_US ("Code_N"), Character'Pos ('n')), (Output, To_US ("Code_O"), Character'Pos ('o')), (Output, To_US ("Code_P"), Character'Pos ('p')), (Output, To_US ("Code_Q"), Character'Pos ('q')), (Output, To_US ("Code_R"), Character'Pos ('r')), (Output, To_US ("Code_S"), Character'Pos ('s')), (Output, To_US ("Code_T"), Character'Pos ('t')), (Output, To_US ("Code_U"), Character'Pos ('u')), (Output, To_US ("Code_V"), Character'Pos ('v')), (Output, To_US ("Code_W"), Character'Pos ('w')), (Output, To_US ("Code_X"), Character'Pos ('x')), (Output, To_US ("Code_Y"), Character'Pos ('y')), (Output, To_US ("Code_Z"), Character'Pos ('z')), (New_Line_Code), (Output, To_US ("Code_Caps_Lock"), To_Key_Code (Scan_Code_Caps_Lock)), (Output, To_US ("Code_F1"), To_Key_Code (Scan_Code_F1)), (Output, To_US ("Code_F2"), To_Key_Code (Scan_Code_F2)), (Output, To_US ("Code_F3"), To_Key_Code (Scan_Code_F3)), (Output, To_US ("Code_F4"), To_Key_Code (Scan_Code_F4)), (Output, To_US ("Code_F5"), To_Key_Code (Scan_Code_F5)), (Output, To_US ("Code_F6"), To_Key_Code (Scan_Code_F6)), (Output, To_US ("Code_F7"), To_Key_Code (Scan_Code_F7)), (Output, To_US ("Code_F8"), To_Key_Code (Scan_Code_F8)), (Output, To_US ("Code_F9"), To_Key_Code (Scan_Code_F9)), (Output, To_US ("Code_F10"), To_Key_Code (Scan_Code_F10)), (Output, To_US ("Code_F11"), To_Key_Code (Scan_Code_F11)), (Output, To_US ("Code_F12"), To_Key_Code (Scan_Code_F12)), (New_Line_Code), (Output, To_US ("Code_Print_Screen"), To_Key_Code (Scan_Code_Print_Screen)), (Output, To_US ("Code_Scroll_Lock"), To_Key_Code (Scan_Code_Scroll_Lock)), (Output, To_US ("Code_Pause"), To_Key_Code (Scan_Code_Pause)), (Output, To_US ("Code_Insert"), To_Key_Code (Scan_Code_Insert)), (Output, To_US ("Code_Home"), To_Key_Code (Scan_Code_Home)), (Output, To_US ("Code_Page_Up"), To_Key_Code (Scan_Code_Page_Up)), (Output, To_US ("Code_Delete"), Character'Pos (Latin_1.DEL)), (Output, To_US ("Code_End"), To_Key_Code (Scan_Code_End)), (Output, To_US ("Code_Page_Down"), To_Key_Code (Scan_Code_Page_Down)), (Output, To_US ("Code_Right"), To_Key_Code (Scan_Code_Right)), (Output, To_US ("Code_Left"), To_Key_Code (Scan_Code_Left)), (Output, To_US ("Code_Down"), To_Key_Code (Scan_Code_Down)), (Output, To_US ("Code_Up"), To_Key_Code (Scan_Code_Up)), (New_Line_Code), (Output, To_US ("Code_Num_Lock_Clear"), To_Key_Code (Scan_Code_Num_Lock_Clear)), (Output, To_US ("Code_KP_Divide"), To_Key_Code (Scan_Code_KP_Divide)), (Output, To_US ("Code_KP_Multiply"), To_Key_Code (Scan_Code_KP_Multiply)), (Output, To_US ("Code_KP_Minus"), To_Key_Code (Scan_Code_KP_Minus)), (Output, To_US ("Code_KP_Plus"), To_Key_Code (Scan_Code_KP_Plus)), (Output, To_US ("Code_KP_Enter"), To_Key_Code (Scan_Code_KP_Enter)), (Output, To_US ("Code_KP_1"), To_Key_Code (Scan_Code_KP_1)), (Output, To_US ("Code_KP_2"), To_Key_Code (Scan_Code_KP_2)), (Output, To_US ("Code_KP_3"), To_Key_Code (Scan_Code_KP_3)), (Output, To_US ("Code_KP_4"), To_Key_Code (Scan_Code_KP_4)), (Output, To_US ("Code_KP_5"), To_Key_Code (Scan_Code_KP_5)), (Output, To_US ("Code_KP_6"), To_Key_Code (Scan_Code_KP_6)), (Output, To_US ("Code_KP_7"), To_Key_Code (Scan_Code_KP_7)), (Output, To_US ("Code_KP_8"), To_Key_Code (Scan_Code_KP_8)), (Output, To_US ("Code_KP_9"), To_Key_Code (Scan_Code_KP_9)), (Output, To_US ("Code_KP_0"), To_Key_Code (Scan_Code_KP_0)), (Output, To_US ("Code_KP_Period"), To_Key_Code (Scan_Code_KP_Period)), (New_Line_Code), (Output, To_US ("Code_Application"), To_Key_Code (Scan_Code_Application)), (Output, To_US ("Code_Power"), To_Key_Code (Scan_Code_Power)), (Output, To_US ("Code_KP_Equals"), To_Key_Code (Scan_Code_KP_Equals)), (Output, To_US ("Code_F13"), To_Key_Code (Scan_Code_F13)), (Output, To_US ("Code_F14"), To_Key_Code (Scan_Code_F14)), (Output, To_US ("Code_F15"), To_Key_Code (Scan_Code_F15)), (Output, To_US ("Code_F16"), To_Key_Code (Scan_Code_F16)), (Output, To_US ("Code_F17"), To_Key_Code (Scan_Code_F17)), (Output, To_US ("Code_F18"), To_Key_Code (Scan_Code_F18)), (Output, To_US ("Code_F19"), To_Key_Code (Scan_Code_F19)), (Output, To_US ("Code_F20"), To_Key_Code (Scan_Code_F20)), (Output, To_US ("Code_F21"), To_Key_Code (Scan_Code_F21)), (Output, To_US ("Code_F22"), To_Key_Code (Scan_Code_F22)), (Output, To_US ("Code_F23"), To_Key_Code (Scan_Code_F23)), (Output, To_US ("Code_F24"), To_Key_Code (Scan_Code_F24)), (Output, To_US ("Code_Execute"), To_Key_Code (Scan_Code_Execute)), (Output, To_US ("Code_Help"), To_Key_Code (Scan_Code_Help)), (Output, To_US ("Code_Menu"), To_Key_Code (Scan_Code_Menu)), (Output, To_US ("Code_Select"), To_Key_Code (Scan_Code_Select)), (Output, To_US ("Code_Stop"), To_Key_Code (Scan_Code_Stop)), (Output, To_US ("Code_Again"), To_Key_Code (Scan_Code_Again)), (Output, To_US ("Code_Undo"), To_Key_Code (Scan_Code_Undo)), (Output, To_US ("Code_Cut"), To_Key_Code (Scan_Code_Cut)), (Output, To_US ("Code_Copy"), To_Key_Code (Scan_Code_Copy)), (Output, To_US ("Code_Paste"), To_Key_Code (Scan_Code_Paste)), (Output, To_US ("Code_Find"), To_Key_Code (Scan_Code_Find)), (Output, To_US ("Code_Mute"), To_Key_Code (Scan_Code_Mute)), (Output, To_US ("Code_Volume_Up"), To_Key_Code (Scan_Code_Volume_Up)), (Output, To_US ("Code_Volume_Down"), To_Key_Code (Scan_Code_Volume_Down)), (Output, To_US ("Code_KP_Comma"), To_Key_Code (Scan_Code_KP_Comma)), (Output, To_US ("Code_KP_Equals_AS400"), To_Key_Code (Scan_Code_KP_Equals_AS400)), (New_Line_Code), (Output, To_US ("Code_Alt_Erase"), To_Key_Code (Scan_Code_Alt_Erase)), (Output, To_US ("Code_Sys_Req"), To_Key_Code (Scan_Code_Sys_Req)), (Output, To_US ("Code_Cancel"), To_Key_Code (Scan_Code_Cancel)), (Output, To_US ("Code_Clear"), To_Key_Code (Scan_Code_Clear)), (Output, To_US ("Code_Prior"), To_Key_Code (Scan_Code_Prior)), (Output, To_US ("Code_Return_2"), To_Key_Code (Scan_Code_Return_2)), (Output, To_US ("Code_Separator"), To_Key_Code (Scan_Code_Separator)), (Output, To_US ("Code_Out"), To_Key_Code (Scan_Code_Out)), (Output, To_US ("Code_Oper"), To_Key_Code (Scan_Code_Oper)), (Output, To_US ("Code_Clear_Again"), To_Key_Code (Scan_Code_Clear_Again)), (Output, To_US ("Code_CR_Sel"), To_Key_Code (Scan_Code_CR_Sel)), (Output, To_US ("Code_Ex_Sel"), To_Key_Code (Scan_Code_EX_Sel)), (New_Line_Code), (Output, To_US ("Code_KP_00"), To_Key_Code (Scan_Code_KP_00)), (Output, To_US ("Code_KP_000"), To_Key_Code (Scan_Code_KP_000)), (Output, To_US ("Code_Thousands_Separator"), To_Key_Code (Scan_Code_Thousands_Separator)), (Output, To_US ("Code_Decimal_Separator"), To_Key_Code (Scan_Code_Decimal_Separator)), (Output, To_US ("Code_Currency_Unit"), To_Key_Code (Scan_Code_Currency_Unit)), (Output, To_US ("Code_Currency_Subunit"), To_Key_Code (Scan_Code_Currency_Subunit)), (Output, To_US ("Code_KP_Left_Parenthesis"), To_Key_Code (Scan_Code_KP_Left_Parenthesis)), (Output, To_US ("Code_KP_Right_Parentheesis"), To_Key_Code (Scan_Code_KP_Right_Parentheesis)), (Output, To_US ("Code_KP_Left_Brace"), To_Key_Code (Scan_Code_KP_Left_Brace)), (Output, To_US ("Code_KP_Right_Brace"), To_Key_Code (Scan_Code_KP_Right_Brace)), (Output, To_US ("Code_KP_Tab"), To_Key_Code (Scan_Code_KP_Tab)), (Output, To_US ("Code_KP_Backspace"), To_Key_Code (Scan_Code_KP_Backspace)), (Output, To_US ("Code_KP_A"), To_Key_Code (Scan_Code_KP_A)), (Output, To_US ("Code_KP_B"), To_Key_Code (Scan_Code_KP_B)), (Output, To_US ("Code_KP_C"), To_Key_Code (Scan_Code_KP_C)), (Output, To_US ("Code_KP_D"), To_Key_Code (Scan_Code_KP_D)), (Output, To_US ("Code_KP_E"), To_Key_Code (Scan_Code_KP_E)), (Output, To_US ("Code_KP_F"), To_Key_Code (Scan_Code_KP_F)), (Output, To_US ("Code_KP_XOR"), To_Key_Code (Scan_Code_KP_XOR)), (Output, To_US ("Code_KP_Power"), To_Key_Code (Scan_Code_KP_Power)), (Output, To_US ("Code_KP_Percent"), To_Key_Code (Scan_Code_KP_Percent)), (Output, To_US ("Code_KP_Less"), To_Key_Code (Scan_Code_KP_Less)), (Output, To_US ("Code_KP_Greater"), To_Key_Code (Scan_Code_KP_Greater)), (Output, To_US ("Code_KP_Ampersand"), To_Key_Code (Scan_Code_KP_Ampersand)), (Output, To_US ("Code_KP_Double_Ampersand"), To_Key_Code (Scan_Code_KP_Double_Ampersand)), (Output, To_US ("Code_KP_Vertical_Bar"), To_Key_Code (Scan_Code_KP_Vertical_Bar)), (Output, To_US ("Code_KP_Double_Vertical_Bar"), To_Key_Code (Scan_Code_KP_Double_Vertical_Bar)), (Output, To_US ("Code_KP_Colon"), To_Key_Code (Scan_Code_KP_Colon)), (Output, To_US ("Code_KP_Hash"), To_Key_Code (Scan_Code_KP_Hash)), (Output, To_US ("Code_KP_Space"), To_Key_Code (Scan_Code_KP_Space)), (Output, To_US ("Code_KP_At"), To_Key_Code (Scan_Code_KP_At)), (Output, To_US ("Code_KP_Exclamation"), To_Key_Code (Scan_Code_KP_Exclamation)), (Output, To_US ("Code_KP_Memory_Store"), To_Key_Code (Scan_Code_KP_Memory_Store)), (Output, To_US ("Code_KP_Memory_Recall"), To_Key_Code (Scan_Code_KP_Memory_Recall)), (Output, To_US ("Code_KP_Memory_Clear"), To_Key_Code (Scan_Code_KP_Memory_Clear)), (Output, To_US ("Code_KP_Memory_Add"), To_Key_Code (Scan_Code_KP_Memory_Add)), (Output, To_US ("Code_KP_Memory_Subtract"), To_Key_Code (Scan_Code_KP_Memory_Subtract)), (Output, To_US ("Code_KP_Memory_Multiply"), To_Key_Code (Scan_Code_KP_Memory_Multiply)), (Output, To_US ("Code_KP_Memory_Divide"), To_Key_Code (Scan_Code_KP_Memory_Divide)), (Output, To_US ("Code_KP_Plus_Minus"), To_Key_Code (Scan_Code_KP_Plus_Minus)), (Output, To_US ("Code_KP_Clear"), To_Key_Code (Scan_Code_KP_Clear)), (Output, To_US ("Code_KP_Clear_Entry"), To_Key_Code (Scan_Code_KP_Clear_Entry)), (Output, To_US ("Code_KP_Binary"), To_Key_Code (Scan_Code_KP_Binary)), (Output, To_US ("Code_KP_Octal"), To_Key_Code (Scan_Code_KP_Octal)), (Output, To_US ("Code_KP_Decimal"), To_Key_Code (Scan_Code_KP_Decimal)), (Output, To_US ("Code_KP_Hexadecimal"), To_Key_Code (Scan_Code_KP_Hexadecimal)), (New_Line_Code), (Output, To_US ("Code_Left_Control"), To_Key_Code (Scan_Code_Left_Control)), (Output, To_US ("Code_Left_Shift"), To_Key_Code (Scan_Code_Left_Shift)), (Output, To_US ("Code_Left_Alt"), To_Key_Code (Scan_Code_Left_Alt)), (Output, To_US ("Code_Left_GUI"), To_Key_Code (Scan_Code_Left_GUI)), (Output, To_US ("Code_Right_Control"), To_Key_Code (Scan_Code_Right_Control)), (Output, To_US ("Code_Right_Shift"), To_Key_Code (Scan_Code_Right_Shift)), (Output, To_US ("Code_Right_Alt"), To_Key_Code (Scan_Code_Right_Alt)), (Output, To_US ("Code_Right_GUI"), To_Key_Code (Scan_Code_Right_GUI)), (New_Line_Code), (Output, To_US ("Code_Mode"), To_Key_Code (Scan_Code_Mode)), (New_Line_Code), (Output, To_US ("Code_Audio_Next"), To_Key_Code (Scan_Code_Audio_Next)), (Output, To_US ("Code_Audio_Previous"), To_Key_Code (Scan_Code_Audio_Previous)), (Output, To_US ("Code_Audio_Stop"), To_Key_Code (Scan_Code_Audio_Stop)), (Output, To_US ("Code_Audio_Play"), To_Key_Code (Scan_Code_Audio_Play)), (Output, To_US ("Code_Audio_Mute"), To_Key_Code (Scan_Code_Audio_Mute)), (Output, To_US ("Code_Media_Select"), To_Key_Code (Scan_Code_Media_Select)), (Output, To_US ("Code_WWW"), To_Key_Code (Scan_Code_WWW)), (Output, To_US ("Code_Mail"), To_Key_Code (Scan_Code_Mail)), (Output, To_US ("Code_Calculator"), To_Key_Code (Scan_Code_Calculator)), (Output, To_US ("Code_Computer"), To_Key_Code (Scan_Code_Computer)), (Output, To_US ("Code_AC_Search"), To_Key_Code (Scan_Code_AC_Search)), (Output, To_US ("Code_AC_Home"), To_Key_Code (Scan_Code_AC_Home)), (Output, To_US ("Code_AC_Back"), To_Key_Code (Scan_Code_AC_Back)), (Output, To_US ("Code_AC_Forward"), To_Key_Code (Scan_Code_AC_Forward)), (Output, To_US ("Code_AC_Stop"), To_Key_Code (Scan_Code_AC_Stop)), (Output, To_US ("Code_AC_Refresh"), To_Key_Code (Scan_Code_AC_Refresh)), (Output, To_US ("Code_AC_Bookmarks"), To_Key_Code (Scan_Code_AC_Bookmarks)), (New_Line_Code), (Output, To_US ("Code_Brightness_Down"), To_Key_Code (Scan_Code_Brightness_Down)), (Output, To_US ("Code_Brightness_Up"), To_Key_Code (Scan_Code_Brightness_Up)), (Output, To_US ("Code_Display_Switch"), To_Key_Code (Scan_Code_Display_Switch)), (Output, To_US ("Code_Illumination_Toggle"), To_Key_Code (Scan_Code_Illumination_Toggle)), (Output, To_US ("Code_Illumination_Down"), To_Key_Code (Scan_Code_Illumination_Down)), (Output, To_US ("Code_Illumination_Up"), To_Key_Code (Scan_Code_Illumination_Up)), (Output, To_US ("Code_Eject"), To_Key_Code (Scan_Code_Eject)), (Output, To_US ("Code_Sleep"), To_Key_Code (Scan_Code_Sleep))); begin Comment (Indent => 0, Text => "Automatically generated, do not edit."); Comment_Dash (117); for Line of License loop Comment (Indent => 0, Text => To_String (Line)); end loop; Comment_Dash (117); for Line of Package_Description loop Comment (Indent => 0, Text => To_String (Line)); end loop; Comment_Dash (117); Put_Line ("package SDL.Events.Keyboards is"); Put_Line (" -- Keyboard events."); Put_Line (" Key_Down : constant Event_Types := 16#0000_0300#;"); Put_Line (" Key_Up : constant Event_Types := Key_Down + 1;"); Put_Line (" Text_Editing : constant Event_Types := Key_Down + 2;"); Put_Line (" Text_Input : constant Event_Types := Key_Down + 3;"); New_Line; -- Output the scan codes. Comment_Dash (Total => 114, Indent => 3); Put_Line (" -- Scan codes."); Comment_Dash (Total => 114, Indent => 3); Put_Line (" type Scan_Codes is range 0 .. 512 with"); Put_Line (" Convention => C,"); Put_Line (" Size => 32;"); New_Line; for Code of Scan_Code_Table loop case Code.State is when Output => Output_Field (Text => To_String (Code.Name), Width => 33, Indent => 3); Put (": constant Scan_Codes := "); Put (Code.Code, Width => 0); Put (Latin_1.Semicolon); if Code.Comment /= Null_Unbounded_String then Put (" -- " & To_String (Code.Comment)); end if; New_Line; when New_Line => New_Line; when Comment => Comment (Indent => 3, Text => To_String (Code.Comment)); end case; end loop; New_Line; Put_Line (" function Value (Name : in String) return SDL.Events.Keyboards.Scan_Codes with"); Put_Line (" Inline => True;"); New_Line; Put_Line (" function Image (Scan_Code : in SDL.Events.Keyboards.Scan_Codes) return String with"); Put_Line (" Inline => True;"); New_Line; Comment_Dash (Total => 114, Indent => 3); Comment (Indent => 3, Text => "Key codes."); Comment_Dash (Total => 114, Indent => 3); Put_Line (" type Key_Codes is mod 2 ** 32 with"); Put_Line (" Convention => C,"); Put_Line (" Size => 32;"); New_Line; for Code of Key_Code_Table loop case Code.State is when Output => Output_Field (Text => To_String (Code.Name), Width => 33, Indent => 3); Put (": constant Key_Codes := "); Put (Code.Code, Width => 12, Base => 16); Put (Latin_1.Semicolon); New_Line; when New_Line => New_Line; when Comment => Comment (Indent => 3, Text => To_String (Code.Name)); end case; end loop; New_Line; Put_Line (" function Value (Name : in String) return SDL.Events.Keyboards.Key_Codes with"); Put_Line (" Inline => True;"); New_Line; Put_Line (" function Image (Key_Code : in SDL.Events.Keyboards.Key_Codes) return String with"); Put_Line (" Inline => True;"); New_Line; Put_Line (" function To_Key_Code (Scan_Code : in SDL.Events.Keyboards.Scan_Codes) return " & "SDL.Events.Keyboards.Key_Codes with"); Put_Line (" Inline => True;"); New_Line; Put_Line (" function To_Scan_Code (Key_Code : in SDL.Events.Keyboards.Key_Codes) return " & "SDL.Events.Keyboards.Scan_Codes with"); Put_Line (" Inline => True;"); New_Line; Comment_Dash (Total => 114, Indent => 3); Comment (Indent => 3, Text => "Key modifiers."); Comment_Dash (Total => 114, Indent => 3); Put_Line (" type Key_Modifiers is mod 2 ** 16 with"); Put_Line (" Convention => C,"); Put_Line (" Size => 16;"); New_Line; Put_Line (" Modifier_None : constant Key_Modifiers := 16#00_00#;"); Put_Line (" Modifier_Left_Shift : constant Key_Modifiers := 16#00_01#;"); Put_Line (" Modifier_Right_Shift : constant Key_Modifiers := 16#00_02#;"); Put_Line (" Modifier_Left_Control : constant Key_Modifiers := 16#00_40#;"); Put_Line (" Modifier_Right_Control : constant Key_Modifiers := 16#00_80#;"); Put_Line (" Modifier_Left_Alt : constant Key_Modifiers := 16#01_00#;"); Put_Line (" Modifier_Right_Alt : constant Key_Modifiers := 16#02_00#;"); Put_Line (" Modifier_Left_GUI : constant Key_Modifiers := 16#04_00#;"); Put_Line (" Modifier_Right_GUI : constant Key_Modifiers := 16#08_00#;"); Put_Line (" Modifier_Num : constant Key_Modifiers := 16#10_00#;"); Put_Line (" Modifier_Caps : constant Key_Modifiers := 16#20_00#;"); Put_Line (" Modifier_Mode : constant Key_Modifiers := 16#40_00#;"); Put_Line (" Modifier_Control : constant Key_Modifiers := Modifier_Left_Control or Modifier_Right_Control;"); Put_Line (" Modifier_Shift : constant Key_Modifiers := Modifier_Left_Shift or Modifier_Right_Shift;"); Put_Line (" Modifier_Alt : constant Key_Modifiers := Modifier_Left_Alt or Modifier_Right_Alt;"); Put_Line (" Modifier_GUI : constant Key_Modifiers := Modifier_Left_GUI or Modifier_Right_GUI;"); Put_Line (" Modifier_Reserved : constant Key_Modifiers := 16#80_00#;"); New_Line; Put_Line (" type Key_Syms is"); Put_Line (" record"); Put_Line (" Scan_Code : Scan_Codes;"); Put_Line (" Key_Code : Key_Codes;"); Put_Line (" Modifiers : Key_Modifiers;"); Put_Line (" Unused : Interfaces.Unsigned_32;"); Put_Line (" end record with"); Put_Line (" Convention => C;"); New_Line; Put_Line (" type Keyboard_Events is"); Put_Line (" record"); Put_Line (" Event_Type : Event_Types; -- Will be set to Key_Up/Down."); Put_Line (" Time_Stamp : Time_Stamps;"); New_Line; Put_Line (" ID : SDL.Video.Windows.ID;"); Put_Line (" State : Button_State;"); Put_Line (" Repeat : Interfaces.Unsigned_8;"); Put_Line (" Padding_2 : Padding_8;"); Put_Line (" Padding_3 : Padding_8;"); Put_Line (" Key_Sym : Key_Syms;"); Put_Line (" end record with"); Put_Line (" Convention => C;"); New_Line; Comment_Dash (Total => 114, Indent => 3); Comment (Indent => 3, Text => "Text editing events."); Comment_Dash (Total => 114, Indent => 3); Put_Line (" Max_UTF8_Elements : constant := 31;"); Put_Line (" Max_UTF8_Element_Storage_Bits : constant := ((Max_UTF8_Elements + 1) * 8) - 1;"); New_Line; Put_Line (" subtype UTF8_Text_Buffers is Interfaces.C.char_array (0 .. Max_UTF8_Elements);"); New_Line; Put_Line (" type Cursor_Positions is range -2 ** 31 .. 2 ** 31 - 1 with"); Put_Line (" Convention => C,"); Put_Line (" Size => 32;"); New_Line; Put_Line (" type Text_Lengths is range -2 ** 31 .. 2 ** 31 - 1 with"); Put_Line (" Convention => C,"); Put_Line (" Size => 32;"); New_Line; Put_Line (" type Text_Editing_Events is"); Put_Line (" record"); Put_Line (" Event_Type : Event_Types; -- Will be set to Text_Editing."); Put_Line (" Time_Stamp : Time_Stamps;"); New_Line; Put_Line (" ID : SDL.Video.Windows.ID;"); Put_Line (" Text : UTF8_Text_Buffers;"); Put_Line (" Start : Cursor_Positions; -- TODO: Find out why this needs to be a signed value!"); Put_Line (" Length : Text_Lengths; -- TODO: Again, signed, why?"); Put_Line (" end record with"); Put_Line (" Convention => C;"); New_Line; Comment_Dash (Total => 114, Indent => 3); Comment (Indent => 3, Text => "Text input events."); Comment_Dash (Total => 114, Indent => 3); Put_Line (" type Text_Input_Events is"); Put_Line (" record"); Put_Line (" Event_Type : Event_Types; -- Will be set to Text_Editing."); Put_Line (" Time_Stamp : Time_Stamps;"); New_Line; Put_Line (" ID : SDL.Video.Windows.ID;"); Put_Line (" Text : UTF8_Text_Buffers;"); Put_Line (" end record with"); Put_Line (" Convention => C;"); New_Line; Put_Line ("private"); Put_Line (" for Key_Syms use"); Put_Line (" record"); Put_Line (" Scan_Code at 0 * SDL.Word range 0 .. 31;"); Put_Line (" Key_Code at 1 * SDL.Word range 0 .. 31;"); Put_Line (" Modifiers at 2 * SDL.Word range 0 .. 15;"); Put_Line (" Unused at 3 * SDL.Word range 0 .. 31;"); Put_Line (" end record;"); New_Line; Put_Line (" for Keyboard_Events use"); Put_Line (" record"); Put_Line (" Event_Type at 0 * SDL.Word range 0 .. 31;"); Put_Line (" Time_Stamp at 1 * SDL.Word range 0 .. 31;"); New_Line; Put_Line (" ID at 2 * SDL.Word range 0 .. 31;"); Put_Line (" State at 3 * SDL.Word range 0 .. 7;"); Put_Line (" Repeat at 3 * SDL.Word range 8 .. 15;"); Put_Line (" Padding_2 at 3 * SDL.Word range 16 .. 23;"); Put_Line (" Padding_3 at 3 * SDL.Word range 24 .. 31;"); Put_Line (" end record;"); New_Line; Put_Line (" for Text_Editing_Events use"); Put_Line (" record"); Put_Line (" Event_Type at 0 * SDL.Word range 0 .. 31;"); Put_Line (" Time_Stamp at 1 * SDL.Word range 0 .. 31;"); New_Line; Put_Line (" ID at 2 * SDL.Word range 0 .. 31;"); Put_Line (" Text at 3 * SDL.Word range 0 .. Max_UTF8_Element_Storage_Bits; -- 31 characters."); Put_Line (" Start at 11 * SDL.Word range 0 .. 31;"); Put_Line (" Length at 12 * SDL.Word range 0 .. 31;"); Put_Line (" end record;"); New_Line; Put_Line (" for Text_Input_Events use"); Put_Line (" record"); Put_Line (" Event_Type at 0 * SDL.Word range 0 .. 31;"); Put_Line (" Time_Stamp at 1 * SDL.Word range 0 .. 31;"); New_Line; Put_Line (" ID at 2 * SDL.Word range 0 .. 31;"); Put_Line (" Text at 3 * SDL.Word range 0 .. Max_UTF8_Element_Storage_Bits; -- 31 characters."); Put_Line (" end record;"); Put_Line ("end SDL.Events.Keyboards;"); end Gen_Keyboard;
71.938636
119
0.542145
1819466047065a41833a75f9cc8b1423adb9cb30
711
ads
Ada
samples/client/petstore/ada/src/samples-petstore.ads
lucassales2/swagger-codegen
0bf7926a5eee9394e1aac564374db5efc2324852
[ "Apache-2.0" ]
14,570
2015-01-01T21:46:46.000Z
2022-03-31T22:28:15.000Z
samples/client/petstore/ada/src/samples-petstore.ads
lucassales2/swagger-codegen
0bf7926a5eee9394e1aac564374db5efc2324852
[ "Apache-2.0" ]
9,058
2015-01-08T15:49:17.000Z
2022-03-31T13:10:01.000Z
samples/client/petstore/ada/src/samples-petstore.ads
lucassales2/swagger-codegen
0bf7926a5eee9394e1aac564374db5efc2324852
[ "Apache-2.0" ]
6,907
2015-01-02T05:29:47.000Z
2022-03-31T00:55:45.000Z
-- Swagger Petstore -- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- ------------ EDIT NOTE ------------ -- This file was generated with swagger-codegen. You can modify it to implement -- the server. After you modify this file, you should add the following line -- to the .swagger-codegen-ignore file: -- -- src/samples-petstore.ads -- -- Then, you can drop this edit note comment. -- ------------ EDIT NOTE ------------ package Samples.Petstore is end Samples.Petstore;
47.4
274
0.675105
d0869a9df44bac1aa4c133706536a59734ddca0d
4,531
adb
Ada
3-mid/impact/applet/demo/2d/orbs/launch_orbs_hello_demo.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
20
2015-11-04T09:23:59.000Z
2022-01-14T10:21:42.000Z
3-mid/impact/applet/demo/2d/orbs/launch_orbs_hello_demo.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
2
2015-11-04T17:05:56.000Z
2015-12-08T03:16:13.000Z
3-mid/impact/applet/demo/2d/orbs/launch_orbs_hello_demo.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
with impact.d2.orbs.World, impact.d2.orbs.Solid, impact.d2.orbs.Shape, impact.d2.orbs.Fixture, impact.d2.Math, ada.text_IO; procedure launch_orbs_hello_Demo -- This is a simple example of building and running a simulation -- using Box2D. Here we create a large ground box and a small dynamic box. -- -- There are no graphics for this example. Box2D is meant to be used -- with your rendering engine in your game engine. is use impact.d2, impact.d2.orbs, impact.d2.orbs.World, impact.d2.orbs.Solid, impact.d2.orbs.Shape, impact.d2.Math, ada.text_IO; type Solid_view is access all Solid.item'Class; type World_view is access all b2World'Class; --- World -- gravity : b2Vec2 := (0.0, -10.0); doSleep : Boolean := True; -- Do we want to let bodies sleep ? world : World_view := new b2World' (to_b2World (gravity, doSleep)); -- Construct a world object, which will hold and simulate the rigid bodies. --- static Terrain -- groundBox : aliased Shape.Item := to_Circle (0.5); -- Define the ground box shape. groundBodyDef : Definition := (position => (0.0, 0.0), -- Define the ground body. others => <> ); groundBody : Solid.view := Solid.view (world.createBody (groundBodyDef)); -- -- Call the body factory which allocates memory for the ground body -- from a pool and creates the ground box shape (also from a pool). -- The body is also added to the world. --- dynamic Box -- dynamicBox : aliased Shape.Item := to_Circle (0.5); -- Define another box shape for our dynamic body. fixtureDef : orbs.fixture.Definition := (shape => dynamicBox, -- Define the dynamic body fixture. density => 1.0, -- Set the box density to be non-zero, so it will be dynamic. friction => 0.3, -- Override the default friction. restitution => 0.0, others => <>); solidDef : Definition := (position => (0.0, 0.0), kind => b2_dynamicBody, others => <> ); the_solid : Solid.view := Solid.view (world.createBody (solidDef)); -- Define the dynamic body. We set its position and call the body factory. --- misc -- unused : Fixture.view; begin unused := groundBody.CreateFixture (groundBox, 0.0); -- Add the ground fixture to the ground body. unused := the_solid .CreateFixture (fixtureDef); -- Add the shape to the body.. -- Prepare for simulation. Typically we use a time step of 1/60 of a -- second (60Hz) and 10 iterations. This provides a high quality simulation -- in most game scenarios. -- declare timeStep : float32 := 1.0 / 60.0; velocityIterations : int32 := 6; positionIterations : int32 := 2; begin -- This is our little game loop. -- for i in 1 .. 60 loop -- Instruct the world to perform a single step of simulation. -- It is generally best to keep the time step and iterations fixed. -- world.Step (timeStep, velocityIterations, positionIterations); -- Clear applied body forces. We didn't apply any forces, but you -- should know about this function. -- World.clearForces; -- Now print the position and angle of the body. put_Line ( "x: " & float32'Image (the_Solid.getPosition.x) & " y: " & float32'Image (the_Solid.getPosition.y) & " angle: " & float32'Image (the_Solid.getAngle)); end loop; end; World.destruct; -- When the world destructor is called, all bodies and joints are freed. This can -- create orphaned pointers, so be careful about your world management. end launch_orbs_hello_Demo;
40.455357
170
0.52527
dce9f7a7aeaba71dee73d94e1c428067db281f9e
11,670
adb
Ada
bb-runtimes/arm/stm32/setup_pll.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/arm/stm32/setup_pll.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/arm/stm32/setup_pll.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- Copyright (C) 2012-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Ada_2012; -- To work around pre-commit check? pragma Suppress (All_Checks); -- This initialization procedure mainly initializes the PLLs and -- all derived clocks. with Ada.Unchecked_Conversion; with Interfaces.STM32; use Interfaces, Interfaces.STM32; with Interfaces.STM32.FLASH; use Interfaces.STM32.FLASH; with Interfaces.STM32.RCC; use Interfaces.STM32.RCC; with System.BB.Parameters; use System.BB.Parameters; with System.BB.MCU_Parameters; with System.BB.Board_Parameters; use System.BB.Board_Parameters; with System.STM32; use System.STM32; procedure Setup_Pll is procedure Initialize_Clocks; procedure Reset_Clocks; ------------------------------ -- Clock Tree Configuration -- ------------------------------ HSE_Enabled : constant Boolean := True; -- use high-speed ext. clock HSE_Bypass : constant Boolean := False; -- don't bypass ext. resonator LSI_Enabled : constant Boolean := True; -- use low-speed internal clock Activate_PLL : constant Boolean := True; Activate_Overdrive : constant Boolean := True; Activate_PLLI2S : constant Boolean := False; pragma Compile_Time_Error (not (if Activate_PLL then HSE_Enabled), "PLL only supported with external clock"); pragma Compile_Time_Error (Activate_PLLI2S, "not yet implemented"); ----------------------- -- Initialize_Clocks -- ----------------------- procedure Initialize_Clocks is ------------------------------- -- Compute Clock Frequencies -- ------------------------------- PLLCLKIN : constant Integer := 1_000_000; PLLM_Value : constant Integer := HSE_Clock / PLLCLKIN; -- First divider M is set to produce a 1Mhz clock PLLN_Value : constant Integer := (PLLP_Value * Clock_Frequency) / PLLCLKIN; -- Compute N to to generate the required frequency PLLVC0 : constant Integer := PLLCLKIN * PLLN_Value; PLLCLKOUT : constant Integer := PLLVC0 / PLLP_Value; pragma Compile_Time_Error (PLLP_Value not in PLLP_Range, "Invalid PLLP clock configuration value"); pragma Compile_Time_Error (PLLQ_Value not in PLLQ_Range, "Invalid PLLQ clock configuration value"); PLLM : constant UInt6 := UInt6 (PLLM_Value); PLLN : constant UInt9 := UInt9 (PLLN_Value); -- PLLP and PLLQ are configured in System.BB.Board_Parameters PLLP : constant UInt2 := UInt2 (PLLP_Value / 2 - 1); PLLQ : constant UInt4 := UInt4 (PLLQ_Value); SW : constant SYSCLK_Source := (if Activate_PLL then SYSCLK_SRC_PLL else (if HSE_Enabled then SYSCLK_SRC_HSE else SYSCLK_SRC_HSI)); SW_Value : constant CFGR_SW_Field := SYSCLK_Source'Enum_Rep (SW); SYSCLK : constant Integer := (if Activate_PLL then PLLCLKOUT else HSICLK); HCLK : constant Integer := (if not AHB_PRE.Enabled then SYSCLK else (case AHB_PRE.Value is when DIV2 => SYSCLK / 2, when DIV4 => SYSCLK / 4, when DIV8 => SYSCLK / 8, when DIV16 => SYSCLK / 16, when DIV64 => SYSCLK / 64, when DIV128 => SYSCLK / 128, when DIV256 => SYSCLK / 256, when DIV512 => SYSCLK / 512)); PCLK1 : constant Integer := (if not APB1_PRE.Enabled then HCLK else (case APB1_PRE.Value is when DIV2 => HCLK / 2, when DIV4 => HCLK / 4, when DIV8 => HCLK / 8, when DIV16 => HCLK / 16)); PCLK2 : constant Integer := (if not APB2_PRE.Enabled then HCLK else (case APB2_PRE.Value is when DIV2 => HCLK / 2, when DIV4 => HCLK / 4, when DIV8 => HCLK / 8, when DIV16 => HCLK / 16)); function To_AHB is new Ada.Unchecked_Conversion (AHB_Prescaler, UInt4); function To_APB is new Ada.Unchecked_Conversion (APB_Prescaler, UInt3); begin -- Check configuration pragma Compile_Time_Error (PLLVC0 not in PLLVC0_Range or else PLLCLKOUT not in PLLOUT_Range, "Invalid clock configuration"); pragma Compile_Time_Error (SYSCLK /= Clock_Frequency, "Cannot generate requested clock"); -- Cannot be checked at compile time, depends on APB1_PRE and APB2_PRE pragma Assert (HCLK not in HCLK_Range or else PCLK1 not in PCLK1_Range or else PCLK2 not in PCLK2_Range, "Invalid AHB/APB prescalers configuration"); -- PWR clock enable RCC_Periph.APB1ENR.PWREN := 1; -- Reset the power interface RCC_Periph.APB1RSTR.PWRRST := 1; RCC_Periph.APB1RSTR.PWRRST := 0; -- PWR initialization -- Select higher supply power for stable operation at max. freq. -- See table "General operating conditions" of the STM32 datasheets -- to obtain the maximal operating frequency depending on the power -- scaling mode and the over-drive mode System.BB.MCU_Parameters.PWR_Initialize; if not HSE_Enabled then -- Setup internal clock and wait for HSI stabilisation. RCC_Periph.CR.HSION := 1; loop exit when RCC_Periph.CR.HSIRDY = 1; end loop; else -- Configure high-speed external clock, if enabled RCC_Periph.CR.HSEON := 1; RCC_Periph.CR.HSEBYP := (if HSE_Bypass then 1 else 0); loop exit when RCC_Periph.CR.HSERDY = 1; end loop; end if; -- Configure low-speed internal clock if enabled if LSI_Enabled then RCC_Periph.CSR.LSION := 1; loop exit when RCC_Periph.CSR.LSIRDY = 1; end loop; end if; -- Activate PLL if enabled if Activate_PLL then -- Disable the main PLL before configuring it RCC_Periph.CR.PLLON := 0; -- Configure the PLL clock source, multiplication and division -- factors RCC_Periph.PLLCFGR := (PLLM => PLLM, PLLN => PLLN, PLLP => PLLP, PLLQ => PLLQ, PLLSRC => (if HSE_Enabled then PLL_Source'Enum_Rep (PLL_SRC_HSE) else PLL_Source'Enum_Rep (PLL_SRC_HSI)), others => <>); RCC_Periph.CR.PLLON := 1; loop exit when RCC_Periph.CR.PLLRDY = 1; end loop; end if; -- Configure OverDrive mode if Activate_Overdrive then System.BB.MCU_Parameters.PWR_Overdrive_Enable; end if; -- Configure flash -- Must be done before increasing the frequency, otherwise the CPU -- won't be able to fetch new instructions. FLASH_Periph.ACR.ICEN := 0; FLASH_Periph.ACR.DCEN := 0; FLASH_Periph.ACR.ICRST := 1; FLASH_Periph.ACR.DCRST := 1; FLASH_Periph.ACR := (LATENCY => FLASH_Latency, ICEN => 1, DCEN => 1, PRFTEN => 1, others => <>); -- Configure derived clocks RCC_Periph.CFGR := (SW => SW_Value, HPRE => To_AHB (AHB_PRE), PPRE => (As_Array => True, Arr => (1 => To_APB (APB1_PRE), 2 => To_APB (APB2_PRE))), RTCPRE => 16#0#, I2SSRC => I2S_Clock_Selection'Enum_Rep (I2SSEL_PLL), MCO1 => MCO1_Clock_Selection'Enum_Rep (MCO1SEL_HSI), MCO1PRE => MCOx_Prescaler'Enum_Rep (MCOxPRE_DIV1), MCO2 => MCO2_Clock_Selection'Enum_Rep (MCO2SEL_SYSCLK), MCO2PRE => MCOx_Prescaler'Enum_Rep (MCOxPRE_DIV5), others => <>); if Activate_PLL then loop exit when RCC_Periph.CFGR.SWS = SYSCLK_Source'Enum_Rep (SYSCLK_SRC_PLL); end loop; -- Wait until voltage supply scaling has completed loop exit when System.BB.MCU_Parameters.Is_PWR_Stabilized; end loop; end if; end Initialize_Clocks; ------------------ -- Reset_Clocks -- ------------------ procedure Reset_Clocks is begin -- Switch on high speed internal clock RCC_Periph.CR.HSION := 1; -- Reset CFGR regiser RCC_Periph.CFGR := (others => <>); -- Reset HSEON, CSSON and PLLON bits RCC_Periph.CR.HSEON := 0; RCC_Periph.CR.CSSON := 0; RCC_Periph.CR.PLLON := 0; -- Reset PLL configuration register RCC_Periph.PLLCFGR := (others => <>); -- Reset HSE bypass bit RCC_Periph.CR.HSEBYP := 0; -- Disable all interrupts RCC_Periph.CIR := (others => <>); end Reset_Clocks; begin Reset_Clocks; Initialize_Clocks; end Setup_Pll;
36.93038
79
0.516624
4ace680dcfd55ceaa6b012d380f83bc3be77b2da
5,096
ads
Ada
source/amf/mof/cmof/amf-cmof-named_elements-collections.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/mof/cmof/amf-cmof-named_elements-collections.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/mof/cmof/amf-cmof-named_elements-collections.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Generic_Collections; package AMF.CMOF.Named_Elements.Collections is pragma Preelaborate; package CMOF_Named_Element_Collections is new AMF.Generic_Collections (CMOF_Named_Element, CMOF_Named_Element_Access); type Set_Of_CMOF_Named_Element is new CMOF_Named_Element_Collections.Set with null record; Empty_Set_Of_CMOF_Named_Element : constant Set_Of_CMOF_Named_Element; type Ordered_Set_Of_CMOF_Named_Element is new CMOF_Named_Element_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_CMOF_Named_Element : constant Ordered_Set_Of_CMOF_Named_Element; type Bag_Of_CMOF_Named_Element is new CMOF_Named_Element_Collections.Bag with null record; Empty_Bag_Of_CMOF_Named_Element : constant Bag_Of_CMOF_Named_Element; type Sequence_Of_CMOF_Named_Element is new CMOF_Named_Element_Collections.Sequence with null record; Empty_Sequence_Of_CMOF_Named_Element : constant Sequence_Of_CMOF_Named_Element; private Empty_Set_Of_CMOF_Named_Element : constant Set_Of_CMOF_Named_Element := (CMOF_Named_Element_Collections.Set with null record); Empty_Ordered_Set_Of_CMOF_Named_Element : constant Ordered_Set_Of_CMOF_Named_Element := (CMOF_Named_Element_Collections.Ordered_Set with null record); Empty_Bag_Of_CMOF_Named_Element : constant Bag_Of_CMOF_Named_Element := (CMOF_Named_Element_Collections.Bag with null record); Empty_Sequence_Of_CMOF_Named_Element : constant Sequence_Of_CMOF_Named_Element := (CMOF_Named_Element_Collections.Sequence with null record); end AMF.CMOF.Named_Elements.Collections;
55.391304
88
0.525314
4a74611ad6a4f0032df6a940af2a82c17d6eef63
11,988
ads
Ada
source/amf/ocl/amf-internals-ocl_state_exps.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/ocl/amf-internals-ocl_state_exps.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/ocl/amf-internals-ocl_state_exps.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Internals.OCL_Elements; with AMF.OCL.State_Exps; with AMF.UML.Comments.Collections; with AMF.UML.Dependencies.Collections; with AMF.UML.Elements.Collections; with AMF.UML.Named_Elements; with AMF.UML.Namespaces.Collections; with AMF.UML.Packages.Collections; with AMF.UML.States; with AMF.UML.String_Expressions; with AMF.UML.Types; with AMF.Visitors; package AMF.Internals.OCL_State_Exps is type OCL_State_Exp_Proxy is limited new AMF.Internals.OCL_Elements.OCL_Element_Proxy and AMF.OCL.State_Exps.OCL_State_Exp with null record; overriding function Get_Referred_State (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.States.UML_State_Access; -- Getter of StateExp::referredState. -- overriding procedure Set_Referred_State (Self : not null access OCL_State_Exp_Proxy; To : AMF.UML.States.UML_State_Access); -- Setter of StateExp::referredState. -- overriding function Get_Type (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Types.UML_Type_Access; -- Getter of TypedElement::type. -- -- The type of the TypedElement. -- This information is derived from the return result for this Operation. overriding procedure Set_Type (Self : not null access OCL_State_Exp_Proxy; To : AMF.UML.Types.UML_Type_Access); -- Setter of TypedElement::type. -- -- The type of the TypedElement. -- This information is derived from the return result for this Operation. overriding function Get_Client_Dependency (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; -- Getter of NamedElement::clientDependency. -- -- Indicates the dependencies that reference the client. overriding function Get_Name (Self : not null access constant OCL_State_Exp_Proxy) return AMF.Optional_String; -- Getter of NamedElement::name. -- -- The name of the NamedElement. overriding procedure Set_Name (Self : not null access OCL_State_Exp_Proxy; To : AMF.Optional_String); -- Setter of NamedElement::name. -- -- The name of the NamedElement. overriding function Get_Name_Expression (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access; -- Getter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding procedure Set_Name_Expression (Self : not null access OCL_State_Exp_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access); -- Setter of NamedElement::nameExpression. -- -- The string expression used to define the name of this named element. overriding function Get_Namespace (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Getter of NamedElement::namespace. -- -- Specifies the namespace that owns the NamedElement. overriding function Get_Qualified_Name (Self : not null access constant OCL_State_Exp_Proxy) return AMF.Optional_String; -- Getter of NamedElement::qualifiedName. -- -- A name which allows the NamedElement to be identified within a -- hierarchy of nested Namespaces. It is constructed from the names of the -- containing namespaces starting at the root of the hierarchy and ending -- with the name of the NamedElement itself. overriding function Get_Visibility (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Optional_UML_Visibility_Kind; -- Getter of NamedElement::visibility. -- -- Determines where the NamedElement appears within different Namespaces -- within the overall model, and its accessibility. overriding procedure Set_Visibility (Self : not null access OCL_State_Exp_Proxy; To : AMF.UML.Optional_UML_Visibility_Kind); -- Setter of NamedElement::visibility. -- -- Determines where the NamedElement appears within different Namespaces -- within the overall model, and its accessibility. overriding function Get_Owned_Comment (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Comments.Collections.Set_Of_UML_Comment; -- Getter of Element::ownedComment. -- -- The Comments owned by this element. overriding function Get_Owned_Element (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element; -- Getter of Element::ownedElement. -- -- The Elements owned by this element. overriding function Get_Owner (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Elements.UML_Element_Access; -- Getter of Element::owner. -- -- The Element that owns this element. overriding function All_Namespaces (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace; -- Operation NamedElement::allNamespaces. -- -- The query allNamespaces() gives the sequence of namespaces in which the -- NamedElement is nested, working outwards. overriding function All_Owning_Packages (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package; -- Operation NamedElement::allOwningPackages. -- -- The query allOwningPackages() returns all the directly or indirectly -- owning packages. overriding function Is_Distinguishable_From (Self : not null access constant OCL_State_Exp_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean; -- Operation NamedElement::isDistinguishableFrom. -- -- The query isDistinguishableFrom() determines whether two NamedElements -- may logically co-exist within a Namespace. By default, two named -- elements are distinguishable if (a) they have unrelated types or (b) -- they have related types but different names. overriding function Namespace (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access; -- Operation NamedElement::namespace. -- -- Missing derivation for NamedElement::/namespace : Namespace overriding function Qualified_Name (Self : not null access constant OCL_State_Exp_Proxy) return League.Strings.Universal_String; -- Operation NamedElement::qualifiedName. -- -- When there is a name, and all of the containing namespaces have a name, -- the qualified name is constructed from the names of the containing -- namespaces. overriding function Separator (Self : not null access constant OCL_State_Exp_Proxy) return League.Strings.Universal_String; -- Operation NamedElement::separator. -- -- The query separator() gives the string that is used to separate names -- when constructing a qualified name. overriding function All_Owned_Elements (Self : not null access constant OCL_State_Exp_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element; -- Operation Element::allOwnedElements. -- -- The query allOwnedElements() gives all of the direct and indirect owned -- elements of an element. overriding function Must_Be_Owned (Self : not null access constant OCL_State_Exp_Proxy) return Boolean; -- Operation Element::mustBeOwned. -- -- The query mustBeOwned() indicates whether elements of this type must -- have an owner. Subclasses of Element that do not require an owner must -- override this operation. overriding procedure Enter_Element (Self : not null access constant OCL_State_Exp_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); overriding procedure Leave_Element (Self : not null access constant OCL_State_Exp_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); overriding procedure Visit_Element (Self : not null access constant OCL_State_Exp_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); end AMF.Internals.OCL_State_Exps;
44.731343
79
0.633967
d08355d0e1f2a5082278c14cb7ccab1ba14ec7a0
6,181
adb
Ada
llvm-gcc-4.2-2.9/gcc/ada/a-dirval-mingw.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/a-dirval-mingw.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/a-dirval-mingw.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . D I R E C T O R I E S . V A L I D I T Y -- -- -- -- B o d y -- -- (Windows Version) -- -- -- -- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the Windows version of this package with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; package body Ada.Directories.Validity is Invalid_Character : constant array (Character) of Boolean := (NUL .. US | '\' => True, '/' | ':' | '*' | '?' => True, '"' | '<' | '>' | '|' => True, DEL .. NBSP => True, others => False); --------------------------------- -- Is_Path_Name_Case_Sensitive -- --------------------------------- function Is_Path_Name_Case_Sensitive return Boolean is begin return False; end Is_Path_Name_Case_Sensitive; ------------------------ -- Is_Valid_Path_Name -- ------------------------ function Is_Valid_Path_Name (Name : String) return Boolean is Start : Positive := Name'First; Last : Natural; begin -- A path name cannot be empty, cannot contain more than 256 characters, -- cannot contain invalid characters and each directory/file name need -- to be valid. if Name'Length = 0 or else Name'Length > 256 then return False; else -- A drive letter may be specified at the beginning if Name'Length >= 2 and then Name (Start + 1) = ':' and then (Name (Start) in 'A' .. 'Z' or else Name (Start) in 'a' .. 'z') then Start := Start + 2; end if; loop -- Look for the start of the next directory or file name while Start <= Name'Last and then (Name (Start) = '\' or Name (Start) = '/') loop Start := Start + 1; end loop; -- If all directories/file names are OK, return True exit when Start > Name'Last; Last := Start; -- Look for the end of the directory/file name while Last < Name'Last loop exit when Name (Last + 1) = '\' or Name (Last + 1) = '/'; Last := Last + 1; end loop; -- Check if the directory/file name is valid if not Is_Valid_Simple_Name (Name (Start .. Last)) then return False; end if; -- Move to the next name Start := Last + 1; end loop; end if; -- If Name follows the rules, it is valid return True; end Is_Valid_Path_Name; -------------------------- -- Is_Valid_Simple_Name -- -------------------------- function Is_Valid_Simple_Name (Name : String) return Boolean is Only_Spaces : Boolean; begin -- A file name cannot be empty, cannot contain more than 256 characters, -- and cannot contain invalid characters. if Name'Length = 0 or else Name'Length > 256 then return False; -- Name length is OK else Only_Spaces := True; for J in Name'Range loop if Invalid_Character (Name (J)) then return False; elsif Name (J) /= ' ' then Only_Spaces := False; end if; end loop; -- If no invalid chars, and not all spaces, file name is valid return not Only_Spaces; end if; end Is_Valid_Simple_Name; ------------- -- OpenVMS -- ------------- function OpenVMS return Boolean is begin return False; end OpenVMS; end Ada.Directories.Validity;
37.23494
79
0.455428
186017bf70ff439eb7a05125a5533959f49e6fc0
876
ads
Ada
Ada/src/fakelib/utilities-option_lists.ads
fintatarta/fakedsp
ba1d722b177b02af94c046f3229823a76ceb7fef
[ "MIT" ]
null
null
null
Ada/src/fakelib/utilities-option_lists.ads
fintatarta/fakedsp
ba1d722b177b02af94c046f3229823a76ceb7fef
[ "MIT" ]
null
null
null
Ada/src/fakelib/utilities-option_lists.ads
fintatarta/fakedsp
ba1d722b177b02af94c046f3229823a76ceb7fef
[ "MIT" ]
null
null
null
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_List : constant Option_List := Option_Maps.Empty_Map; type Case_Action is (Force_Lower, Force_Upper, Keep); function Parse (Input : String; Entry_Separator : Character := ','; Key_Separator : Character := '='; Trim_Key : Boolean := True; Trim_Value : Boolean := True; Key_Case : Case_Action := Force_Lower; Default_Value : String := "") return Option_List; end Utilities.Option_Lists;
35.04
73
0.562785
0e66790c2992656b9c34700ec7dd3919599eaec0
8,248
adb
Ada
source/nodes/program-nodes-object_declarations.adb
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-object_declarations.adb
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-object_declarations.adb
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
1
2019-10-16T09:05:27.000Z
2019-10-16T09:05:27.000Z
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- package body Program.Nodes.Object_Declarations is function Create (Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Colon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Aliased_Token : Program.Lexical_Elements .Lexical_Element_Access; Constant_Token : Program.Lexical_Elements .Lexical_Element_Access; Object_Subtype : not null Program.Elements.Definitions .Definition_Access; Assignment_Token : Program.Lexical_Elements .Lexical_Element_Access; Initialization_Expression : Program.Elements.Expressions .Expression_Access; With_Token : Program.Lexical_Elements .Lexical_Element_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Object_Declaration is begin return Result : Object_Declaration := (Names => Names, Colon_Token => Colon_Token, Aliased_Token => Aliased_Token, Constant_Token => Constant_Token, Object_Subtype => Object_Subtype, Assignment_Token => Assignment_Token, Initialization_Expression => Initialization_Expression, With_Token => With_Token, Aspects => Aspects, Semicolon_Token => Semicolon_Token, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Names : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access; Object_Subtype : not null Program.Elements.Definitions .Definition_Access; Initialization_Expression : Program.Elements.Expressions .Expression_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Aliased : Boolean := False; Has_Constant : Boolean := False) return Implicit_Object_Declaration is begin return Result : Implicit_Object_Declaration := (Names => Names, Object_Subtype => Object_Subtype, Initialization_Expression => Initialization_Expression, Aspects => Aspects, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Has_Aliased => Has_Aliased, Has_Constant => Has_Constant, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Names (Self : Base_Object_Declaration) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Vector_Access is begin return Self.Names; end Names; overriding function Object_Subtype (Self : Base_Object_Declaration) return not null Program.Elements.Definitions.Definition_Access is begin return Self.Object_Subtype; end Object_Subtype; overriding function Initialization_Expression (Self : Base_Object_Declaration) return Program.Elements.Expressions.Expression_Access is begin return Self.Initialization_Expression; end Initialization_Expression; overriding function Aspects (Self : Base_Object_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access is begin return Self.Aspects; end Aspects; overriding function Colon_Token (Self : Object_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Colon_Token; end Colon_Token; overriding function Aliased_Token (Self : Object_Declaration) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Aliased_Token; end Aliased_Token; overriding function Constant_Token (Self : Object_Declaration) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Constant_Token; end Constant_Token; overriding function Assignment_Token (Self : Object_Declaration) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Assignment_Token; end Assignment_Token; overriding function With_Token (Self : Object_Declaration) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.With_Token; end With_Token; overriding function Semicolon_Token (Self : Object_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Semicolon_Token; end Semicolon_Token; overriding function Has_Aliased (Self : Object_Declaration) return Boolean is begin return Self.Aliased_Token.Assigned; end Has_Aliased; overriding function Has_Constant (Self : Object_Declaration) return Boolean is begin return Self.Constant_Token.Assigned; end Has_Constant; overriding function Is_Part_Of_Implicit (Self : Implicit_Object_Declaration) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Object_Declaration) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Object_Declaration) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; overriding function Has_Aliased (Self : Implicit_Object_Declaration) return Boolean is begin return Self.Has_Aliased; end Has_Aliased; overriding function Has_Constant (Self : Implicit_Object_Declaration) return Boolean is begin return Self.Has_Constant; end Has_Constant; procedure Initialize (Self : in out Base_Object_Declaration'Class) is begin for Item in Self.Names.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; Set_Enclosing_Element (Self.Object_Subtype, Self'Unchecked_Access); if Self.Initialization_Expression.Assigned then Set_Enclosing_Element (Self.Initialization_Expression, Self'Unchecked_Access); end if; for Item in Self.Aspects.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; null; end Initialize; overriding function Is_Object_Declaration (Self : Base_Object_Declaration) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Object_Declaration; overriding function Is_Declaration (Self : Base_Object_Declaration) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Declaration; overriding procedure Visit (Self : not null access Base_Object_Declaration; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Object_Declaration (Self); end Visit; overriding function To_Object_Declaration_Text (Self : in out Object_Declaration) return Program.Elements.Object_Declarations .Object_Declaration_Text_Access is begin return Self'Unchecked_Access; end To_Object_Declaration_Text; overriding function To_Object_Declaration_Text (Self : in out Implicit_Object_Declaration) return Program.Elements.Object_Declarations .Object_Declaration_Text_Access is pragma Unreferenced (Self); begin return null; end To_Object_Declaration_Text; end Program.Nodes.Object_Declarations;
32.860558
79
0.705504
4a4e2a18c78b36c7a7d6e539d510d9bb9cdf38f2
3,298
ads
Ada
src/day-6/adventofcode-day_6.ads
persan/advent-of-code-2020
123f9352b44d75fa445783659e6bcbbcafbc0471
[ "MIT" ]
null
null
null
src/day-6/adventofcode-day_6.ads
persan/advent-of-code-2020
123f9352b44d75fa445783659e6bcbbcafbc0471
[ "MIT" ]
null
null
null
src/day-6/adventofcode-day_6.ads
persan/advent-of-code-2020
123f9352b44d75fa445783659e6bcbbcafbc0471
[ "MIT" ]
null
null
null
-- --- Day 6: Custom Customs --- -- -- As your flight approaches the regional airport where you'll switch to a much larger plane, -- customs declaration forms are distributed to the passengers. -- -- The form asks a series of 26 yes-or-no questions marked a through z. -- All you need to do is identify the questions for which anyone in your group answers "yes". -- Since your group is just you, this doesn't take very long. -- -- However, the person sitting next to you seems to be experiencing a language barrier and asks if you can help. -- For each of the people in their group, you write down the questions for which they answer "yes", one per line. For example: -- -- abcx -- abcy -- abcz -- -- In this group, there are 6 questions to which anyone answered "yes": a, b, c, x, y, and z. -- (Duplicate answers to the same question don't count extra; each question counts at most once.) -- -- Another group asks for your help, then another, -- and eventually you've collected answers from every group on the plane (your puzzle input). -- Each group's answers are separated by a blank line, -- and within each group, each person's answers are on a single line. For example: -- -- abc -- -- a -- b -- c -- -- ab -- ac -- -- a -- a -- a -- a -- -- b -- -- This list represents answers from five groups: -- -- The first group contains one person who answered "yes" to 3 questions: a, b, and c. -- The second group contains three people; combined, they answered "yes" to 3 questions: a, b, and c. -- The third group contains two people; combined, they answered "yes" to 3 questions: a, b, and c. -- The fourth group contains four people; combined, they answered "yes" to only 1 question, a. -- The last group contains one person who answered "yes" to only 1 question, b. -- -- In this example, the sum of these counts is 3 + 3 + 3 + 1 + 1 = 11. -- -- For each group, count the number of questions to which anyone answered "yes". What is the sum of those counts? -- ================================================================================================================= -- ================================================================================================================= with Ada.Containers.Vectors; package Adventofcode.Day_6 is type Question_Id is new Character range 'a' .. 'z'; type Reply_Type is array (Question_Id) of Boolean with Default_Component_Value => False; function "+" (L, R : Reply_Type) return Reply_Type is (L or R); function No_Replies return Reply_Type is (others => False); function Value (Item : String) return Reply_Type with Pre => (for all I in Item'Range => (Question_Id (Item (I)) in Question_Id) or else (Item (I) = ' ')); function Count (Item : Reply_Type) return Natural; function Image (Item : Reply_Type) return String; package Group_Replies_Impl is new Ada.Containers.Vectors (Natural, Reply_Type); type Group_Replie is new Group_Replies_Impl.Vector with null record; function Count (Replies : Group_Replie) return Natural; function "+" (L : Group_Replie; R : Reply_Type) return Group_Replie is (L & R); function No_Replies return Group_Replie is (Group_Replies_Impl.Vector with others => <>); end Adventofcode.Day_6;
39.73494
127
0.644027
dc976f5b875a6acc3dec47eb2cc55b276734ffa7
1,973
adb
Ada
Correlation/correlation.adb
veyselharun/ABench2020
1a6aace6ee05f2a3b30b707f42a47eb66910823e
[ "MIT" ]
null
null
null
Correlation/correlation.adb
veyselharun/ABench2020
1a6aace6ee05f2a3b30b707f42a47eb66910823e
[ "MIT" ]
null
null
null
Correlation/correlation.adb
veyselharun/ABench2020
1a6aace6ee05f2a3b30b707f42a47eb66910823e
[ "MIT" ]
1
2021-11-22T14:56:29.000Z
2021-11-22T14:56:29.000Z
-- -- ABench2020 Benchmark Suite -- -- Sample Correlation Coefficient Calculation Program -- -- Licensed under the MIT License. See LICENSE file in the ABench root -- directory for license information. -- -- Uncomment the line below to print the result. -- with Ada.Text_IO; use Ada.Text_IO; with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions; procedure Correlation is type Float_Array is array (1..10) of Float; function Calc_Coefficient (Sample_X, Sample_Y : in Float_Array) return Float is Coefficient : Float := 0.0; Sum_X, Sum_Y, Sum_XY : Float := 0.0; Square_Sum_X, Square_Sum_Y : Float := 0.0; Avg_X, Avg_Y : Float := 0.0; begin for I in Sample_X'First..Sample_X'Last loop Sum_X := Sum_X + Sample_X (I); end loop; Avg_X := Sum_X / Float(Sample_X'Length); for I in Sample_Y'First..Sample_Y'Last loop Sum_Y := Sum_Y + Sample_Y (I); end loop; Avg_Y := Sum_Y / Float(Sample_Y'Length); for I in Sample_X'First..Sample_X'Last loop Sum_XY := Sum_XY + ((Sample_X (I) - Avg_X) * (Sample_Y (I) - Avg_Y)); end loop; for I in Sample_X'First..Sample_X'Last loop Square_Sum_X := Square_Sum_X + ((Sample_X (I) - Avg_X) * (Sample_X (I) - Avg_X)); Square_Sum_Y := Square_Sum_Y + ((Sample_Y (I) - Avg_Y) * (Sample_Y (I) - Avg_Y)); end loop; Coefficient := Sum_XY / Sqrt (Square_Sum_X * Square_Sum_Y); return Coefficient; end; Result : Float; Sample_X : Float_Array := (15.0, 18.0, 21.0, 23.0, 27.0, 33.4, 4.7, 21.2, 15.0, 34.2); Sample_Y : Float_Array := (25.0, 12.1, 27.0, 31.0, 32.0, 1.1, 6.5, 23.0, 4.4, 6.2); begin Result := Calc_Coefficient (Sample_X, Sample_Y); -- Uncomment the line below to print the result. -- Put_Line (Float'Image (Result)); end;
32.883333
93
0.601115
0e3ee53a1589faedd7a041aa514d729a88982034
1,075
adb
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/opt37.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/opt37.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/opt37.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-compile } -- { dg-options "-O2 -gnato -fdump-tree-optimized" } package body Opt37 is function To_Unchecked (Bits : T_Bit_Array) return Unsigned32 is Value : Unsigned32 := 0; begin for I in Bits'Range loop Value := Value * 2 + Unsigned32 (Bits(I)); end loop; return Value; end; function To_Scalar (Bits : T_Bit_Array) return Positive is Tmp : Unsigned32; Value : Positive; begin Tmp := To_Unchecked (Bits); if Tmp in 0 .. Unsigned32 (Positive'last) then Value := Positive (Tmp); else Value := -Positive (Unsigned32'last - Tmp); if Value > Positive'first then Value := Value - 1; else raise Program_Error; end if; end if; return Value; end; function Func (Bit_Array : T_Bit_Array; Bit_Index : T_Bit_Index) return Positive is begin return To_Scalar (Bit_Array (Bit_Index .. Bit_Index + 1)); end; end Opt37; -- { dg-final { scan-tree-dump-not "alloca" "optimized" } }
25.595238
66
0.584186
4a43bebc08fd6f12367d0cbc82384620f90dff2f
5,429
adb
Ada
nehe_base_ada/nehe_base_ada.adb
Lucretia/old_nehe_ada95
d0378c3bfce202eb01bf00b57c128735dbe8582d
[ "BSD-3-Clause" ]
null
null
null
nehe_base_ada/nehe_base_ada.adb
Lucretia/old_nehe_ada95
d0378c3bfce202eb01bf00b57c128735dbe8582d
[ "BSD-3-Clause" ]
null
null
null
nehe_base_ada/nehe_base_ada.adb
Lucretia/old_nehe_ada95
d0378c3bfce202eb01bf00b57c128735dbe8582d
[ "BSD-3-Clause" ]
null
null
null
--------------------------------------------------------------------------------- -- Copyright 2004-2005 © Luke A. Guest -- -- This code is to be used for tutorial purposes only. -- You may not redistribute this code in any form without my express permission. --------------------------------------------------------------------------------- with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Text_Io; use Text_Io; with SDL.Types; use SDL.Types; with SDL.Keyboard; with SDL.Keysym; with SDL.Video; with SDL.Events; with SDL.Timer; with SDL.Active; use type SDL.Init_Flags; use type SDL.Active.Active_State; use type SDL.Video.Surface_Flags; use type SDL.Video.Surface_Ptr; use type SDL.Video.VideoInfo_ConstPtr; with Example; with GL; with GLU; -- A simple example of a cube drawn with a display list. procedure NeHe_Base_Ada is pragma Link_With("-lSDL"); use type GL.GLdouble; VideoFlags : SDL.Video.Surface_Flags := SDL.Video.OPENGL or SDL.Video.HWPALETTE or SDL.Video.RESIZABLE; Result : Boolean := False; TickCount : Integer := 0; procedure ReshapeGL(Width, Height : in GL.GLint) is AspectRatio : constant GL.GLdouble := GL.GLdouble(Width) / GL.GLdouble(Height); begin GL.glViewport(0, 0, GL.GLsizei(Width), GL.GLsizei(Height)); -- The Current Viewport GL.glMatrixMode(GL.GL_PROJECTION); -- The Projection Matrix GL.glLoadIdentity; -- The Projection Matrix GLU.gluPerspective(45.0, AspectRatio, 1.0, 100.0); -- Calculate The Aspect Ratio Of The Window GL.glMatrixMode(GL.GL_MODELVIEW); -- The Modelview Matrix GL.glLoadIdentity; -- Reset The Modelview Matrix end ReshapeGL; procedure CreateWindowGL(Result : out Boolean) is VideoInfo : SDL.Video.VideoInfo_ConstPtr; begin if SDL.Init(SDL.INIT_VIDEO or SDL.INIT_TIMER) = -1 then Put_Line("Error Initialising SDL"); Result := False; else VideoInfo := SDL.Video.GetVideoInfo; if VideoInfo = null then Put_Line("Error Retrieving video information"); Result := False; else if VideoInfo.hw_available = 1 then VideoFlags := VideoFlags or SDL.Video.HWSURFACE; else VideoFlags := VideoFlags or SDL.Video.SWSURFACE; end if; if VideoInfo.blit_hw = 1 then VideoFlags := VideoFlags or SDL.Video.HWACCEL; end if; SDL.Video.GL_SetAttribute(SDL.Video.GL_RED_SIZE, 5); SDL.Video.GL_SetAttribute(SDL.Video.GL_GREEN_SIZE, 5); SDL.Video.GL_SetAttribute(SDL.Video.GL_BLUE_SIZE, 5); SDL.Video.GL_SetAttribute(SDL.Video.GL_DEPTH_SIZE, 16); SDL.Video.GL_SetAttribute(SDL.Video.GL_DOUBLEBUFFER, 1); Example.SetSurface(SDL.Video.SetVideoMode(C.int(Example.GetWidth), C.int(Example.GetHeight), C.int(Example.GetBitsPerPixel), VideoFlags)); if Example.GetSurface = null then Put_Line("Error setting video mode"); Result := False; else SDL.Video.WM_Set_Caption_Title(Example.GetTitle); ReshapeGL(GL.GLint(Example.GetWidth), GL.GLint(Example.GetHeight)); end if; end if; end if; Result := True; end CreateWindowGL; procedure DestroyWindowGL is begin SDL.SDL_Quit; end DestroyWindowGL; procedure PollEvents is Event : aliased SDL.Events.Event; begin while SDL.Events.PollEvent(Event'Unchecked_Access) /= 0 loop case Event.the_type is when SDL.Events.QUIT => Put_Line("Quitting..."); Example.SetQuit(True); when SDL.Events.KEYDOWN => Example.SetKey(Event.Key.Keysym.sym, True); when SDL.Events.KEYUP => Example.SetKey(Event.Key.Keysym.sym, False); when SDL.Events.VIDEORESIZE => Example.SetSurface(SDL.Video.SetVideoMode(Event.Resize.w, Event.Resize.h, C.int(Example.GetBitsPerPixel), VideoFlags)); ReshapeGL(GL.GLint(Event.Resize.w), GL.GLint(Event.Resize.h)); when SDL.Events.ISACTIVEEVENT => if Event.Active.Gain = 0 then Example.SetActive(False); else Example.SetActive(True); end if; when others => null; end case; end loop; end PollEvents; begin Example.PrintUsage; CreateWindowGL(Result); if Result = True then if Example.Initialise = True then while Example.Quit = False loop PollEvents; if Example.IsActive = True then TickCount := Integer(SDL.Timer.GetTicks); Example.Update(TickCount); Example.SetLastTickCount(TickCount); Example.Draw; SDL.Video.GL_SwapBuffers; end if; end loop; Example.Uninitialise; end if; DestroyWindowGL; end if; end NeHe_Base_Ada;
25.251163
146
0.570639
dc73e541896065da1946fe5d29bfd4e91ee27508
6,162
adb
Ada
source/amf/mofext/amf-internals-tables-mof_metamodel.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/mofext/amf-internals-tables-mof_metamodel.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/mofext/amf-internals-tables-mof_metamodel.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ package body AMF.Internals.Tables.MOF_Metamodel is ---------------- -- MM_MOF_MOF -- ---------------- function MM_MOF_MOF return AMF.Internals.CMOF_Element is begin return Base + 8; end MM_MOF_MOF; ---------------- -- MC_MOF_Tag -- ---------------- function MC_MOF_Tag return AMF.Internals.CMOF_Element is begin return Base + 1; end MC_MOF_Tag; ------------------------------ -- MP_MOF_Tag_Element_A_Tag -- ------------------------------ function MP_MOF_Tag_Element_A_Tag return AMF.Internals.CMOF_Element is begin return Base + 2; end MP_MOF_Tag_Element_A_Tag; --------------------- -- MP_MOF_Tag_Name -- --------------------- function MP_MOF_Tag_Name return AMF.Internals.CMOF_Element is begin return Base + 3; end MP_MOF_Tag_Name; -------------------------------------- -- MP_MOF_Tag_Tag_Owner_A_Owned_Tag -- -------------------------------------- function MP_MOF_Tag_Tag_Owner_A_Owned_Tag return AMF.Internals.CMOF_Element is begin return Base + 4; end MP_MOF_Tag_Tag_Owner_A_Owned_Tag; ---------------------- -- MP_MOF_Tag_Value -- ---------------------- function MP_MOF_Tag_Value return AMF.Internals.CMOF_Element is begin return Base + 5; end MP_MOF_Tag_Value; ------------------------------ -- MP_MOF_A_Tag_Tag_Element -- ------------------------------ function MP_MOF_A_Tag_Tag_Element return AMF.Internals.CMOF_Element is begin return Base + 9; end MP_MOF_A_Tag_Tag_Element; -------------------------------------- -- MP_MOF_A_Owned_Tag_Tag_Tag_Owner -- -------------------------------------- function MP_MOF_A_Owned_Tag_Tag_Tag_Owner return AMF.Internals.CMOF_Element is begin return Base + 10; end MP_MOF_A_Owned_Tag_Tag_Tag_Owner; ---------------------------- -- MA_MOF_Tag_Element_Tag -- ---------------------------- function MA_MOF_Tag_Element_Tag return AMF.Internals.CMOF_Element is begin return Base + 6; end MA_MOF_Tag_Element_Tag; ------------------------------------ -- MA_MOF_Tag_Tag_Owner_Owned_Tag -- ------------------------------------ function MA_MOF_Tag_Tag_Owner_Owned_Tag return AMF.Internals.CMOF_Element is begin return Base + 7; end MA_MOF_Tag_Tag_Owner_Owned_Tag; ------------ -- MB_MOF -- ------------ function MB_MOF return AMF.Internals.AMF_Element is begin return Base; end MB_MOF; ------------ -- MB_MOF -- ------------ function ML_MOF return AMF.Internals.AMF_Element is begin return Base + 11; end ML_MOF; end AMF.Internals.Tables.MOF_Metamodel;
39
81
0.452775
cb403a8a6eb7efafcfd2e02e707511209eda64f3
4,465
ads
Ada
src/libriscv-sim-memory_bus.ads
Fabien-Chouteau/libriscv
eed3ddf24a9682a95f9d315650b753577853eb92
[ "BSD-3-Clause" ]
null
null
null
src/libriscv-sim-memory_bus.ads
Fabien-Chouteau/libriscv
eed3ddf24a9682a95f9d315650b753577853eb92
[ "BSD-3-Clause" ]
null
null
null
src/libriscv-sim-memory_bus.ads
Fabien-Chouteau/libriscv
eed3ddf24a9682a95f9d315650b753577853eb92
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, Fabien Chouteau -- -- -- -- 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, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ package LibRISCV.Sim.Memory_Bus with SPARK_Mode => On is type Instance (RAM_Base : Address; RAM_Size : Positive) is tagged private; subtype Class is Instance'Class; type Ptr is access all Class; type Access_Result is (Success, Failure); procedure Load_B (This : Instance; Addr : Address; Data : out Byte; Res : out Access_Result); procedure Load_H (This : Instance; Addr : Address; Data : out Halfword; Res : out Access_Result); procedure Load_W (This : Instance; Addr : Address; Data : out Word; Res : out Access_Result); procedure Store_B (This : in out Instance; Addr : Address; Data : Byte; Res : out Access_Result); procedure Store_H (This : in out Instance; Addr : Address; Data : Halfword; Res : out Access_Result); procedure Store_W (This : in out Instance; Addr : Address; Data : Word; Res : out Access_Result); -- Host Target Interface -- procedure Enable_HTIF (This : in out Instance); -- Enable the HTIF device. If this procedure is not called, the HTIF will -- not be simulated, even if tohost address is set. procedure Set_Tohost (This : in out Instance; Addr : Address); -- Define the address the HTIF tohost register. If this procedure is not -- called, the register is not simulated. private type RAM_Array is array (Positive range <>) of Byte; type Instance (RAM_Base : Address; RAM_Size : Positive) is tagged record RAM : RAM_Array (1 .. RAM_Size) := (others => 0); HTIF_Enabled : Boolean := False; Tohost_Set : Boolean := False; Tohost_Addr : Address := 0; end record; end LibRISCV.Sim.Memory_Bus;
43.77451
78
0.520493
cb89b74d1e33509cf6e9d2280e2fe0ff8b13d01e
14,814
ads
Ada
src/language_defs.ads
mapcode-foundation/mapcode-ada
6472841b55c7aeb6cb806a259942ac90651b4454
[ "Apache-2.0" ]
1
2020-07-26T07:59:45.000Z
2020-07-26T07:59:45.000Z
src/language_defs.ads
mapcode-foundation/mapcode-ada
6472841b55c7aeb6cb806a259942ac90651b4454
[ "Apache-2.0" ]
null
null
null
src/language_defs.ads
mapcode-foundation/mapcode-ada
6472841b55c7aeb6cb806a259942ac90651b4454
[ "Apache-2.0" ]
null
null
null
-- ----------------------------------------------------------------------------- -- Copyright (C) 2003-2019 Stichting Mapcode Foundation (http://www.mapcode.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/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- ----------------------------------------------------------------------------- -- Table of languages for mapcodes with Language_Utils; use Language_Utils; package Language_Defs is -- The supported languages -- The language names in Roman are the Mixed_Str images of these enums type Language_List is ( Roman, Greek, Cyrillic, Hebrew, Devanagari, Malayalam, Georgian, Katakana, Thai, Lao, Armenian, Bengali, Gurmukhi, Tibetan, Arabic, Korean, Burmese, Khmer, Sinhalese, Thaana, Chinese, Tifinagh, Tamil, Amharic, Telugu, Odia, Kannada, Gujarati); -- The table of the languages Langs : constant array (Language_List) of Language_Desc := ( -- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 Roman => Build_Desc (To_Unicode ("Roman"), (16#0041#, 16#0042#, 16#0043#, 16#0044#, 16#0045#, 16#0046#, 16#0047#, 16#0048#, 16#0049#, 16#004A#, 16#004B#, 16#004C#, 16#004D#, 16#004E#, 16#004F#, 16#0050#, 16#0051#, 16#0052#, 16#0053#, 16#0054#, 16#0055#, 16#0056#, 16#0057#, 16#0058#, 16#0059#, 16#005A#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Greek => Build_Desc ( (16#0949#, 16#0955#, 16#0955#, 16#0951#, 16#0957#, 16#0953#, 16#0954#, 16#0940#), (16#0391#, 16#0392#, 16#039E#, 16#0394#, 16#0388#, 16#0395#, 16#0393#, 16#0397#, 16#0399#, 16#03A0#, 16#039A#, 16#039B#, 16#039C#, 16#039D#, 16#039F#, 16#03A1#, 16#0398#, 16#03A8#, 16#03A3#, 16#03A4#, 16#0389#, 16#03A6#, 16#03A9#, 16#03A7#, 16#03A5#, 16#0396#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Cyrillic => Build_Desc ( (16#1082#, 16#1080#, 16#1088#, 16#1080#, 16#1083#, 16#1083#, 16#1080#, 16#1094#, 16#1072#), (16#0410#, 16#0412#, 16#0421#, 16#0414#, 16#0415#, 16#0416#, 16#0413#, 16#041D#, 16#0049#, 16#041F#, 16#041A#, 16#041B#, 16#041C#, 16#0417#, 16#041E#, 16#0420#, 16#0424#, 16#042F#, 16#0426#, 16#0422#, 16#042D#, 16#0427#, 16#0428#, 16#0425#, 16#0423#, 16#0411#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Hebrew => Build_Desc ( (16#1506#, 16#1460#, 16#1489#, 16#1456#, 16#1512#, 16#1460#, 16#1497#, 16#1514#), (16#05D0#, 16#05D1#, 16#05D2#, 16#05D3#, 16#05E3#, 16#05D4#, 16#05D6#, 16#05D7#, 16#05D5#, 16#05D8#, 16#05D9#, 16#05DA#, 16#05DB#, 16#05DC#, 16#05E1#, 16#05DD#, 16#05DE#, 16#05E0#, 16#05E2#, 16#05E4#, 16#05E5#, 16#05E6#, 16#05E7#, 16#05E8#, 16#05E9#, 16#05EA#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Devanagari => Build_Desc ( (16#2342#, 16#2375#, 16#2357#, 16#2344#, 16#2366#, 16#2327#, 16#2352#, 16#2368#), (16#0905#, 16#0915#, 16#0917#, 16#0918#, 16#090F#, 16#091A#, 16#091C#, 16#091F#, 16#0049#, 16#0920#, 16#0923#, 16#0924#, 16#0926#, 16#0927#, 16#004F#, 16#0928#, 16#092A#, 16#092D#, 16#092E#, 16#0930#, 16#092B#, 16#0932#, 16#0935#, 16#0938#, 16#0939#, 16#092C#, 16#0966#, 16#0967#, 16#0968#, 16#0969#, 16#096A#, 16#096B#, 16#096C#, 16#096D#, 16#096E#, 16#096F#) ), Malayalam => Build_Desc ( (16#3374#, 16#3378#, 16#3375#, 16#3390#, 16#3379#, 16#3330#), (16#0D12#, 16#0D15#, 16#0D16#, 16#0D17#, 16#0D0B#, 16#0D1A#, 16#0D1C#, 16#0D1F#, 16#0049#, 16#0D21#, 16#0D24#, 16#0D25#, 16#0D26#, 16#0D27#, 16#0D20#, 16#0D28#, 16#0D2E#, 16#0D30#, 16#0D31#, 16#0D32#, 16#0D09#, 16#0D34#, 16#0D35#, 16#0D36#, 16#0D38#, 16#0D39#, 16#0D66#, 16#0D67#, 16#0D68#, 16#0D69#, 16#0D6A#, 16#0D6B#, 16#0D6C#, 16#0D6D#, 16#0D6E#, 16#0D6F#) ), Georgian => Build_Desc ( (16#4325#, 16#4304#, 16#4320#, 16#4311#, 16#4323#, 16#4314#, 16#4312#), (16#10A0#, 16#10A1#, 16#10A3#, 16#10A6#, 16#10A4#, 16#10A9#, 16#10AB#, 16#10AC#, 16#0049#, 16#10AE#, 16#10B0#, 16#10B1#, 16#10B2#, 16#10B4#, 16#10AD#, 16#10B5#, 16#10B6#, 16#10B7#, 16#10B8#, 16#10B9#, 16#10A8#, 16#10BA#, 16#10BB#, 16#10BD#, 16#10BE#, 16#10BF#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Katakana => Build_Desc ( (16#12459#, 16#12479#, 16#12459#, 16#12490#), (16#30A2#, 16#30AB#, 16#30AD#, 16#30AF#, 16#30AA#, 16#30B1#, 16#30B3#, 16#30B5#, 16#0049#, 16#30B9#, 16#30C1#, 16#30C8#, 16#30CA#, 16#30CC#, 16#004F#, 16#30D2#, 16#30D5#, 16#30D8#, 16#30DB#, 16#30E1#, 16#30A8#, 16#30E2#, 16#30E8#, 16#30E9#, 16#30ED#, 16#30F2#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Thai => Build_Desc ( (16#3616#, 16#3634#, 16#3625#, 16#3634#, 16#3652#, 16#3607#, 16#3618#), (16#0E30#, 16#0E01#, 16#0E02#, 16#0E04#, 16#0E32#, 16#0E07#, 16#0E08#, 16#0E09#, 16#0049#, 16#0E0A#, 16#0E11#, 16#0E14#, 16#0E16#, 16#0E17#, 16#004F#, 16#0E18#, 16#0E1A#, 16#0E1C#, 16#0E21#, 16#0E23#, 16#0E2C#, 16#0E25#, 16#0E27#, 16#0E2D#, 16#0E2E#, 16#0E2F#, 16#0E50#, 16#0E51#, 16#0E52#, 16#0E53#, 16#0E54#, 16#0E55#, 16#0E56#, 16#0E57#, 16#0E58#, 16#0E59#) ), Lao => Build_Desc ( (16#3742#, 16#3762#, 16#3754#, 16#3762#, 16#3749#, 16#3762#, 16#3751#), (16#0EB0#, 16#0E81#, 16#0E82#, 16#0E84#, 16#0EC3#, 16#0E87#, 16#0E88#, 16#0E8A#, 16#0EC4#, 16#0E8D#, 16#0E94#, 16#0E97#, 16#0E99#, 16#0E9A#, 16#004F#, 16#0E9C#, 16#0E9E#, 16#0EA1#, 16#0EA2#, 16#0EA3#, 16#0EBD#, 16#0EA7#, 16#0EAA#, 16#0EAB#, 16#0EAD#, 16#0EAF#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Armenian => Build_Desc ( (16#1392#, 16#1377#, 16#1397#, 16#1381#, 16#1408#, 16#1381#, 16#1398#), (16#0556#, 16#0532#, 16#0533#, 16#0534#, 16#0535#, 16#0538#, 16#0539#, 16#053A#, 16#053B#, 16#053D#, 16#053F#, 16#0540#, 16#0541#, 16#0543#, 16#0555#, 16#0547#, 16#0548#, 16#054A#, 16#054D#, 16#054E#, 16#0545#, 16#054F#, 16#0550#, 16#0551#, 16#0552#, 16#0553#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Bengali => Build_Desc ( (16#2476#, 16#2494#, 16#2434#, 16#2482#, 16#2494#), (16#099C#, 16#0998#, 16#0995#, 16#0996#, 16#09AE#, 16#0997#, 16#0999#, 16#099A#, 16#0049#, 16#099D#, 16#09A0#, 16#09A1#, 16#09A2#, 16#09A3#, 16#004F#, 16#09A4#, 16#09A5#, 16#09A6#, 16#09A8#, 16#09AA#, 16#099F#, 16#09AC#, 16#09AD#, 16#09AF#, 16#09B2#, 16#09B9#, 16#09E6#, 16#09E7#, 16#09E8#, 16#09E9#, 16#09EA#, 16#09EB#, 16#09EC#, 16#09ED#, 16#09EE#, 16#09EF#) ), Gurmukhi => Build_Desc ( (16#2583#, 16#2625#, 16#2608#, 16#2606#, 16#2625#, 16#2582#, 16#2624#), (16#0A05#, 16#0A15#, 16#0A17#, 16#0A18#, 16#0A0F#, 16#0A1A#, 16#0A1C#, 16#0A1F#, 16#0049#, 16#0A20#, 16#0A23#, 16#0A24#, 16#0A26#, 16#0A27#, 16#004F#, 16#0A28#, 16#0A2A#, 16#0A2D#, 16#0A2E#, 16#0A30#, 16#0A2B#, 16#0A32#, 16#0A35#, 16#0A38#, 16#0A39#, 16#0A21#, 16#0A66#, 16#0A67#, 16#0A68#, 16#0A69#, 16#0A6A#, 16#0A6B#, 16#0A6C#, 16#0A6D#, 16#0A6E#, 16#0A6F#) ), Tibetan => Build_Desc ( (16#3921#, 16#3926#, 16#3956#, 16#3851#, 16#3909#, 16#3923#, 16#3851#), (16#0F58#, 16#0F40#, 16#0F41#, 16#0F42#, 16#0F64#, 16#0F44#, 16#0F45#, 16#0F46#, 16#0049#, 16#0F47#, 16#0F49#, 16#0F55#, 16#0F50#, 16#0F4F#, 16#004F#, 16#0F51#, 16#0F53#, 16#0F54#, 16#0F56#, 16#0F5E#, 16#0F60#, 16#0F5F#, 16#0F61#, 16#0F62#, 16#0F63#, 16#0F66#, 16#0F20#, 16#0F21#, 16#0F22#, 16#0F23#, 16#0F24#, 16#0F25#, 16#0F26#, 16#0F27#, 16#0F28#, 16#0F29#) ), Arabic => Build_Desc ( (16#1575#, 16#1604#, 16#1593#, 16#1614#, 16#1585#, 16#1614#, 16#1576#, 16#1616#, 16#1610#, 16#1614#, 16#1617#, 16#1577#), (16#0628#, 16#062A#, 16#062D#, 16#062E#, 16#062B#, 16#062F#, 16#0630#, 16#0631#, 16#0627#, 16#0632#, 16#0633#, 16#0634#, 16#0635#, 16#0636#, 16#0647#, 16#0637#, 16#0638#, 16#0639#, 16#063A#, 16#0641#, 16#0642#, 16#062C#, 16#0644#, 16#0645#, 16#0646#, 16#0648#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Korean => Build_Desc ( (16#51312#, 16#49440#, 16#44544#, 16#54620#, 16#44544#), (16#1112#, 16#1100#, 16#1102#, 16#1103#, 16#1166#, 16#1105#, 16#1107#, 16#1109#, 16#1175#, 16#1110#, 16#1111#, 16#1161#, 16#1162#, 16#1163#, 16#110B#, 16#1164#, 16#1165#, 16#1167#, 16#1169#, 16#1172#, 16#1174#, 16#110C#, 16#110E#, 16#110F#, 16#116D#, 16#116E#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Burmese => Build_Desc ( (16#4121#, 16#4156#, 16#4116#, 16#4154#, 16#4121#, 16#4140#, 16#4129#, 16#4096#, 16#4153#, 16#4097#, 16#4123#, 16#4140#), (16#1005#, 16#1000#, 16#1001#, 16#1002#, 16#1013#, 16#1003#, 16#1004#, 16#101A#, 16#0049#, 16#1007#, 16#100C#, 16#100D#, 16#100E#, 16#1010#, 16#101D#, 16#1011#, 16#1012#, 16#101E#, 16#1014#, 16#1015#, 16#1016#, 16#101F#, 16#1017#, 16#1018#, 16#100F#, 16#101C#, 16#1040#, 16#1041#, 16#1042#, 16#1043#, 16#1044#, 16#1045#, 16#1046#, 16#1047#, 16#1048#, 16#1049#) ), Khmer => Build_Desc ( (16#6050#, 16#6016#, 16#6098#, 16#6047#, 16#6042#, 16#6017#, 16#6098#, 16#6040#, 16#6082#, 16#6042#), (16#1789#, 16#1780#, 16#1781#, 16#1782#, 16#1785#, 16#1783#, 16#1784#, 16#1787#, 16#179A#, 16#1788#, 16#178A#, 16#178C#, 16#178D#, 16#178E#, 16#004F#, 16#1791#, 16#1792#, 16#1793#, 16#1794#, 16#1795#, 16#179F#, 16#1796#, 16#1798#, 16#179B#, 16#17A0#, 16#17A2#, 16#17E0#, 16#17E1#, 16#17E2#, 16#17E3#, 16#17E4#, 16#17E5#, 16#17E6#, 16#17E7#, 16#17E8#, 16#17E9#) ), Sinhalese => Build_Desc ( (16#3523#, 16#3538#, 16#3458#, 16#3524#, 16#3517#, 16#3461#, 16#3482#, 16#3530#, 16#3522#, 16#3515#, 16#3512#, 16#3535#, 16#3517#, 16#3535#, 16#3520#), (16#0D85#, 16#0D9A#, 16#0D9C#, 16#0D9F#, 16#0D89#, 16#0DA2#, 16#0DA7#, 16#0DA9#, 16#0049#, 16#0DAC#, 16#0DAD#, 16#0DAF#, 16#0DB1#, 16#0DB3#, 16#004F#, 16#0DB4#, 16#0DB6#, 16#0DB8#, 16#0DB9#, 16#0DBA#, 16#0D8B#, 16#0DBB#, 16#0DBD#, 16#0DC0#, 16#0DC3#, 16#0DC4#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Thaana => Build_Desc ( (16#1932#, 16#1959#, 16#1922#, 16#1958#), (16#0794#, 16#0780#, 16#0781#, 16#0782#, 16#0797#, 16#0783#, 16#0784#, 16#0785#, 16#0049#, 16#0786#, 16#0787#, 16#0788#, 16#0789#, 16#078A#, 16#004F#, 16#078B#, 16#078C#, 16#078D#, 16#078E#, 16#078F#, 16#079C#, 16#0790#, 16#0791#, 16#0792#, 16#0793#, 16#07B1#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Chinese => Build_Desc ( (16#12549#, 16#12550#, 16#12551#, 16#12552#), (16#3123#, 16#3105#, 16#3108#, 16#3106#, 16#3114#, 16#3107#, 16#3109#, 16#310A#, 16#0049#, 16#310B#, 16#310C#, 16#310D#, 16#310E#, 16#310F#, 16#004F#, 16#3115#, 16#3116#, 16#3110#, 16#3111#, 16#3112#, 16#3113#, 16#3129#, 16#3117#, 16#3128#, 16#3118#, 16#3119#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Tifinagh => Build_Desc ( (16#11612#, 16#11593#, 16#11580#, 16#11593#, 16#11599#, 16#11568#, 16#11606#), (16#2D49#, 16#2D31#, 16#2D33#, 16#2D37#, 16#2D53#, 16#2D3C#, 16#2D3D#, 16#2D40#, 16#2D4F#, 16#2D43#, 16#2D44#, 16#2D45#, 16#2D47#, 16#2D4D#, 16#2D54#, 16#2D4E#, 16#2D55#, 16#2D56#, 16#2D59#, 16#2D5A#, 16#2D62#, 16#2D5B#, 16#2D5C#, 16#2D5F#, 16#2D61#, 16#2D63#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Tamil => Build_Desc ( (16#2980#, 16#2990#, 16#3007#, 16#2996#, 16#3021#), (16#0B99#, 16#0B95#, 16#0B9A#, 16#0B9F#, 16#0B86#, 16#0BA4#, 16#0BA8#, 16#0BAA#, 16#0049#, 16#0BAE#, 16#0BAF#, 16#0BB0#, 16#0BB2#, 16#0BB5#, 16#004F#, 16#0BB4#, 16#0BB3#, 16#0BB1#, 16#0B85#, 16#0B88#, 16#0B93#, 16#0B89#, 16#0B8E#, 16#0B8F#, 16#0B90#, 16#0B92#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Amharic => Build_Desc ( (16#4771#, 16#4635#, 16#4653#, 16#4763#), (16#121B#, 16#1260#, 16#1264#, 16#12F0#, 16#121E#, 16#134A#, 16#1308#, 16#1200#, 16#0049#, 16#12E8#, 16#12AC#, 16#1208#, 16#1293#, 16#1350#, 16#12D0#, 16#1354#, 16#1240#, 16#1244#, 16#122C#, 16#1220#, 16#12C8#, 16#1226#, 16#1270#, 16#1276#, 16#1338#, 16#12DC#, 16#1372#, 16#1369#, 16#136A#, 16#136B#, 16#136C#, 16#136D#, 16#136E#, 16#136F#, 16#1370#, 16#1371#) ), Telugu => Build_Desc ( (16#3108#, 16#3142#, 16#3122#, 16#3137#, 16#3095#, 16#3137#), (16#0C1E#, 16#0C15#, 16#0C17#, 16#0C19#, 16#0C2B#, 16#0C1A#, 16#0C1C#, 16#0C1F#, 16#0049#, 16#0C20#, 16#0C21#, 16#0C23#, 16#0C24#, 16#0C25#, 16#004F#, 16#0C26#, 16#0C27#, 16#0C28#, 16#0C2A#, 16#0C2C#, 16#0C2D#, 16#0C2E#, 16#0C30#, 16#0C32#, 16#0C33#, 16#0C35#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Odia => Build_Desc ( (16#2835#, 16#2849#, 16#2876#, 16#2879#, 16#2822#), (16#0B1D#, 16#0B15#, 16#0B16#, 16#0B17#, 16#0B23#, 16#0B18#, 16#0B1A#, 16#0B1C#, 16#0049#, 16#0B1F#, 16#0B21#, 16#0B22#, 16#0B24#, 16#0B25#, 16#0B20#, 16#0B26#, 16#0B27#, 16#0B28#, 16#0B2A#, 16#0B2C#, 16#0B39#, 16#0B2E#, 16#0B2F#, 16#0B30#, 16#0B33#, 16#0B38#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Kannada => Build_Desc ( (16#3221#, 16#3240#, 16#3277#, 16#3240#, 16#3233#), (16#0C92#, 16#0C95#, 16#0C96#, 16#0C97#, 16#0C8E#, 16#0C99#, 16#0C9A#, 16#0C9B#, 16#0049#, 16#0C9C#, 16#0CA0#, 16#0CA1#, 16#0CA3#, 16#0CA4#, 16#004F#, 16#0CA6#, 16#0CA7#, 16#0CA8#, 16#0CAA#, 16#0CAB#, 16#0C87#, 16#0CAC#, 16#0CAD#, 16#0CB0#, 16#0CB2#, 16#0CB5#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ), Gujarati => Build_Desc ( (16#2711#, 16#2753#, 16#2716#, 16#2736#, 16#2750#, 16#2724#, 16#2752#), (16#0AB3#, 16#0A97#, 16#0A9C#, 16#0AA1#, 16#0A87#, 16#0AA6#, 16#0AAC#, 16#0A95#, 16#0049#, 16#0A9A#, 16#0A9F#, 16#0AA4#, 16#0AAA#, 16#0AA0#, 16#004F#, 16#0AB0#, 16#0AB5#, 16#0A9E#, 16#0AAE#, 16#0AAB#, 16#0A89#, 16#0AB7#, 16#0AA8#, 16#0A9D#, 16#0AA2#, 16#0AAD#, 16#0030#, 16#0031#, 16#0032#, 16#0033#, 16#0034#, 16#0035#, 16#0036#, 16#0037#, 16#0038#, 16#0039#) ) ); end Language_Defs;
161.021739
367
0.584582
c5944c3112fbe80d4626859a4e6b7d7a7eb30858
11,002
adb
Ada
Lab1-2/lab1-2.adb
gabemgem/LITEC
42679504cbd28425b3f33c09f50492bb60f827bb
[ "Unlicense" ]
null
null
null
Lab1-2/lab1-2.adb
gabemgem/LITEC
42679504cbd28425b3f33c09f50492bb60f827bb
[ "Unlicense" ]
null
null
null
Lab1-2/lab1-2.adb
gabemgem/LITEC
42679504cbd28425b3f33c09f50492bb60f827bb
[ "Unlicense" ]
null
null
null
M:lab1_2 F:G$SYSCLK_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$UART0_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$Sys_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$putchar$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$getchar$0$0({2}DF,SC:U),C,0,0,0,0,0 F:G$getchar_nw$0$0({2}DF,SC:U),C,0,0,0,0,0 F:G$main$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$Port_Init$0$0({2}DF,SV:S),Z,0,0,0,0,0 F:G$Interrupt_Init$0$0({2}DF,SV:S),Z,0,0,0,0,0 F:G$Timer_Init$0$0({2}DF,SV:S),Z,0,0,0,0,0 F:G$Timer0_ISR$0$0({2}DF,SV:S),Z,0,0,1,1,0 F:G$random$0$0({2}DF,SC:U),Z,0,0,0,0,0 T:Flab1_2$tm[({0}S:S$tm_sec$0$0({1}SC:U),Z,0,0)({1}S:S$tm_min$0$0({1}SC:U),Z,0,0)({2}S:S$tm_hour$0$0({1}SC:U),Z,0,0)({3}S:S$tm_mday$0$0({1}SC:U),Z,0,0)({4}S:S$tm_mon$0$0({1}SC:U),Z,0,0)({5}S:S$tm_year$0$0({2}SI:S),Z,0,0)({7}S:S$tm_wday$0$0({1}SC:U),Z,0,0)({8}S:S$tm_yday$0$0({2}SI:S),Z,0,0)({10}S:S$tm_isdst$0$0({1}SC:U),Z,0,0)({11}S:S$tm_hundredth$0$0({1}SC:U),Z,0,0)] S:Llab1_2.getchar$c$1$10({1}SC:U),R,0,0,[] S:Llab1_2.getchar_nw$c$1$12({1}SC:U),R,0,0,[] S:G$Counts$0$0({2}SI:U),E,0,0 S:G$correct$0$0({1}SC:U),E,0,0 S:G$option$0$0({1}SC:U),E,0,0 S:G$attempt$0$0({1}SC:U),E,0,0 S:G$temp$0$0({1}SC:U),E,0,0 S:G$say$0$0({1}SC:U),E,0,0 S:G$input$0$0({1}SC:U),E,0,0 S:Llab1_2.aligned_alloc$size$1$39({2}SI:U),E,0,0 S:Llab1_2.aligned_alloc$alignment$1$39({2}SI:U),E,0,0 S:G$P0$0$0({1}SC:U),I,0,0 S:G$SP$0$0({1}SC:U),I,0,0 S:G$DPL$0$0({1}SC:U),I,0,0 S:G$DPH$0$0({1}SC:U),I,0,0 S:G$P4$0$0({1}SC:U),I,0,0 S:G$P5$0$0({1}SC:U),I,0,0 S:G$P6$0$0({1}SC:U),I,0,0 S:G$PCON$0$0({1}SC:U),I,0,0 S:G$TCON$0$0({1}SC:U),I,0,0 S:G$TMOD$0$0({1}SC:U),I,0,0 S:G$TL0$0$0({1}SC:U),I,0,0 S:G$TL1$0$0({1}SC:U),I,0,0 S:G$TH0$0$0({1}SC:U),I,0,0 S:G$TH1$0$0({1}SC:U),I,0,0 S:G$CKCON$0$0({1}SC:U),I,0,0 S:G$PSCTL$0$0({1}SC:U),I,0,0 S:G$P1$0$0({1}SC:U),I,0,0 S:G$TMR3CN$0$0({1}SC:U),I,0,0 S:G$TMR3RLL$0$0({1}SC:U),I,0,0 S:G$TMR3RLH$0$0({1}SC:U),I,0,0 S:G$TMR3L$0$0({1}SC:U),I,0,0 S:G$TMR3H$0$0({1}SC:U),I,0,0 S:G$P7$0$0({1}SC:U),I,0,0 S:G$SCON$0$0({1}SC:U),I,0,0 S:G$SCON0$0$0({1}SC:U),I,0,0 S:G$SBUF$0$0({1}SC:U),I,0,0 S:G$SBUF0$0$0({1}SC:U),I,0,0 S:G$SPI0CFG$0$0({1}SC:U),I,0,0 S:G$SPI0DAT$0$0({1}SC:U),I,0,0 S:G$ADC1$0$0({1}SC:U),I,0,0 S:G$SPI0CKR$0$0({1}SC:U),I,0,0 S:G$CPT0CN$0$0({1}SC:U),I,0,0 S:G$CPT1CN$0$0({1}SC:U),I,0,0 S:G$P2$0$0({1}SC:U),I,0,0 S:G$EMI0TC$0$0({1}SC:U),I,0,0 S:G$EMI0CF$0$0({1}SC:U),I,0,0 S:G$PRT0CF$0$0({1}SC:U),I,0,0 S:G$P0MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT1CF$0$0({1}SC:U),I,0,0 S:G$P1MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT2CF$0$0({1}SC:U),I,0,0 S:G$P2MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT3CF$0$0({1}SC:U),I,0,0 S:G$P3MDOUT$0$0({1}SC:U),I,0,0 S:G$IE$0$0({1}SC:U),I,0,0 S:G$SADDR0$0$0({1}SC:U),I,0,0 S:G$ADC1CN$0$0({1}SC:U),I,0,0 S:G$ADC1CF$0$0({1}SC:U),I,0,0 S:G$AMX1SL$0$0({1}SC:U),I,0,0 S:G$P3IF$0$0({1}SC:U),I,0,0 S:G$SADEN1$0$0({1}SC:U),I,0,0 S:G$EMI0CN$0$0({1}SC:U),I,0,0 S:G$_XPAGE$0$0({1}SC:U),I,0,0 S:G$P3$0$0({1}SC:U),I,0,0 S:G$OSCXCN$0$0({1}SC:U),I,0,0 S:G$OSCICN$0$0({1}SC:U),I,0,0 S:G$P74OUT$0$0({1}SC:U),I,0,0 S:G$FLSCL$0$0({1}SC:U),I,0,0 S:G$FLACL$0$0({1}SC:U),I,0,0 S:G$IP$0$0({1}SC:U),I,0,0 S:G$SADEN0$0$0({1}SC:U),I,0,0 S:G$AMX0CF$0$0({1}SC:U),I,0,0 S:G$AMX0SL$0$0({1}SC:U),I,0,0 S:G$ADC0CF$0$0({1}SC:U),I,0,0 S:G$P1MDIN$0$0({1}SC:U),I,0,0 S:G$ADC0L$0$0({1}SC:U),I,0,0 S:G$ADC0H$0$0({1}SC:U),I,0,0 S:G$SMB0CN$0$0({1}SC:U),I,0,0 S:G$SMB0STA$0$0({1}SC:U),I,0,0 S:G$SMB0DAT$0$0({1}SC:U),I,0,0 S:G$SMB0ADR$0$0({1}SC:U),I,0,0 S:G$ADC0GTL$0$0({1}SC:U),I,0,0 S:G$ADC0GTH$0$0({1}SC:U),I,0,0 S:G$ADC0LTL$0$0({1}SC:U),I,0,0 S:G$ADC0LTH$0$0({1}SC:U),I,0,0 S:G$T2CON$0$0({1}SC:U),I,0,0 S:G$T4CON$0$0({1}SC:U),I,0,0 S:G$RCAP2L$0$0({1}SC:U),I,0,0 S:G$RCAP2H$0$0({1}SC:U),I,0,0 S:G$TL2$0$0({1}SC:U),I,0,0 S:G$TH2$0$0({1}SC:U),I,0,0 S:G$SMB0CR$0$0({1}SC:U),I,0,0 S:G$PSW$0$0({1}SC:U),I,0,0 S:G$REF0CN$0$0({1}SC:U),I,0,0 S:G$DAC0L$0$0({1}SC:U),I,0,0 S:G$DAC0H$0$0({1}SC:U),I,0,0 S:G$DAC0CN$0$0({1}SC:U),I,0,0 S:G$DAC1L$0$0({1}SC:U),I,0,0 S:G$DAC1H$0$0({1}SC:U),I,0,0 S:G$DAC1CN$0$0({1}SC:U),I,0,0 S:G$PCA0CN$0$0({1}SC:U),I,0,0 S:G$PCA0MD$0$0({1}SC:U),I,0,0 S:G$PCA0CPM0$0$0({1}SC:U),I,0,0 S:G$PCA0CPM1$0$0({1}SC:U),I,0,0 S:G$PCA0CPM2$0$0({1}SC:U),I,0,0 S:G$PCA0CPM3$0$0({1}SC:U),I,0,0 S:G$PCA0CPM4$0$0({1}SC:U),I,0,0 S:G$ACC$0$0({1}SC:U),I,0,0 S:G$XBR0$0$0({1}SC:U),I,0,0 S:G$XBR1$0$0({1}SC:U),I,0,0 S:G$XBR2$0$0({1}SC:U),I,0,0 S:G$RCAP4L$0$0({1}SC:U),I,0,0 S:G$RCAP4H$0$0({1}SC:U),I,0,0 S:G$EIE1$0$0({1}SC:U),I,0,0 S:G$EIE2$0$0({1}SC:U),I,0,0 S:G$ADC0CN$0$0({1}SC:U),I,0,0 S:G$PCA0L$0$0({1}SC:U),I,0,0 S:G$PCA0CPL0$0$0({1}SC:U),I,0,0 S:G$PCA0CPL1$0$0({1}SC:U),I,0,0 S:G$PCA0CPL2$0$0({1}SC:U),I,0,0 S:G$PCA0CPL3$0$0({1}SC:U),I,0,0 S:G$PCA0CPL4$0$0({1}SC:U),I,0,0 S:G$RSTSRC$0$0({1}SC:U),I,0,0 S:G$B$0$0({1}SC:U),I,0,0 S:G$SCON1$0$0({1}SC:U),I,0,0 S:G$SBUF1$0$0({1}SC:U),I,0,0 S:G$SADDR1$0$0({1}SC:U),I,0,0 S:G$TL4$0$0({1}SC:U),I,0,0 S:G$TH4$0$0({1}SC:U),I,0,0 S:G$EIP1$0$0({1}SC:U),I,0,0 S:G$EIP2$0$0({1}SC:U),I,0,0 S:G$SPI0CN$0$0({1}SC:U),I,0,0 S:G$PCA0H$0$0({1}SC:U),I,0,0 S:G$PCA0CPH0$0$0({1}SC:U),I,0,0 S:G$PCA0CPH1$0$0({1}SC:U),I,0,0 S:G$PCA0CPH2$0$0({1}SC:U),I,0,0 S:G$PCA0CPH3$0$0({1}SC:U),I,0,0 S:G$PCA0CPH4$0$0({1}SC:U),I,0,0 S:G$WDTCN$0$0({1}SC:U),I,0,0 S:G$TMR0$0$0({2}SI:U),I,0,0 S:G$TMR1$0$0({2}SI:U),I,0,0 S:G$TMR2$0$0({2}SI:U),I,0,0 S:G$RCAP2$0$0({2}SI:U),I,0,0 S:G$TMR3$0$0({2}SI:U),I,0,0 S:G$TMR3RL$0$0({2}SI:U),I,0,0 S:G$TMR4$0$0({2}SI:U),I,0,0 S:G$RCAP4$0$0({2}SI:U),I,0,0 S:G$ADC0$0$0({2}SI:U),I,0,0 S:G$ADC0GT$0$0({2}SI:U),I,0,0 S:G$ADC0LT$0$0({2}SI:U),I,0,0 S:G$DAC0$0$0({2}SI:U),I,0,0 S:G$DAC1$0$0({2}SI:U),I,0,0 S:G$PCA0$0$0({2}SI:U),I,0,0 S:G$PCA0CP0$0$0({2}SI:U),I,0,0 S:G$PCA0CP1$0$0({2}SI:U),I,0,0 S:G$PCA0CP2$0$0({2}SI:U),I,0,0 S:G$PCA0CP3$0$0({2}SI:U),I,0,0 S:G$PCA0CP4$0$0({2}SI:U),I,0,0 S:G$P0_0$0$0({1}SX:U),J,0,0 S:G$P0_1$0$0({1}SX:U),J,0,0 S:G$P0_2$0$0({1}SX:U),J,0,0 S:G$P0_3$0$0({1}SX:U),J,0,0 S:G$P0_4$0$0({1}SX:U),J,0,0 S:G$P0_5$0$0({1}SX:U),J,0,0 S:G$P0_6$0$0({1}SX:U),J,0,0 S:G$P0_7$0$0({1}SX:U),J,0,0 S:G$IT0$0$0({1}SX:U),J,0,0 S:G$IE0$0$0({1}SX:U),J,0,0 S:G$IT1$0$0({1}SX:U),J,0,0 S:G$IE1$0$0({1}SX:U),J,0,0 S:G$TR0$0$0({1}SX:U),J,0,0 S:G$TF0$0$0({1}SX:U),J,0,0 S:G$TR1$0$0({1}SX:U),J,0,0 S:G$TF1$0$0({1}SX:U),J,0,0 S:G$P1_0$0$0({1}SX:U),J,0,0 S:G$P1_1$0$0({1}SX:U),J,0,0 S:G$P1_2$0$0({1}SX:U),J,0,0 S:G$P1_3$0$0({1}SX:U),J,0,0 S:G$P1_4$0$0({1}SX:U),J,0,0 S:G$P1_5$0$0({1}SX:U),J,0,0 S:G$P1_6$0$0({1}SX:U),J,0,0 S:G$P1_7$0$0({1}SX:U),J,0,0 S:G$RI$0$0({1}SX:U),J,0,0 S:G$RI0$0$0({1}SX:U),J,0,0 S:G$TI$0$0({1}SX:U),J,0,0 S:G$TI0$0$0({1}SX:U),J,0,0 S:G$RB8$0$0({1}SX:U),J,0,0 S:G$RB80$0$0({1}SX:U),J,0,0 S:G$TB8$0$0({1}SX:U),J,0,0 S:G$TB80$0$0({1}SX:U),J,0,0 S:G$REN$0$0({1}SX:U),J,0,0 S:G$REN0$0$0({1}SX:U),J,0,0 S:G$SM2$0$0({1}SX:U),J,0,0 S:G$SM20$0$0({1}SX:U),J,0,0 S:G$MCE0$0$0({1}SX:U),J,0,0 S:G$SM1$0$0({1}SX:U),J,0,0 S:G$SM10$0$0({1}SX:U),J,0,0 S:G$SM0$0$0({1}SX:U),J,0,0 S:G$SM00$0$0({1}SX:U),J,0,0 S:G$S0MODE$0$0({1}SX:U),J,0,0 S:G$P2_0$0$0({1}SX:U),J,0,0 S:G$P2_1$0$0({1}SX:U),J,0,0 S:G$P2_2$0$0({1}SX:U),J,0,0 S:G$P2_3$0$0({1}SX:U),J,0,0 S:G$P2_4$0$0({1}SX:U),J,0,0 S:G$P2_5$0$0({1}SX:U),J,0,0 S:G$P2_6$0$0({1}SX:U),J,0,0 S:G$P2_7$0$0({1}SX:U),J,0,0 S:G$EX0$0$0({1}SX:U),J,0,0 S:G$ET0$0$0({1}SX:U),J,0,0 S:G$EX1$0$0({1}SX:U),J,0,0 S:G$ET1$0$0({1}SX:U),J,0,0 S:G$ES0$0$0({1}SX:U),J,0,0 S:G$ES$0$0({1}SX:U),J,0,0 S:G$ET2$0$0({1}SX:U),J,0,0 S:G$EA$0$0({1}SX:U),J,0,0 S:G$P3_0$0$0({1}SX:U),J,0,0 S:G$P3_1$0$0({1}SX:U),J,0,0 S:G$P3_2$0$0({1}SX:U),J,0,0 S:G$P3_3$0$0({1}SX:U),J,0,0 S:G$P3_4$0$0({1}SX:U),J,0,0 S:G$P3_5$0$0({1}SX:U),J,0,0 S:G$P3_6$0$0({1}SX:U),J,0,0 S:G$P3_7$0$0({1}SX:U),J,0,0 S:G$PX0$0$0({1}SX:U),J,0,0 S:G$PT0$0$0({1}SX:U),J,0,0 S:G$PX1$0$0({1}SX:U),J,0,0 S:G$PT1$0$0({1}SX:U),J,0,0 S:G$PS0$0$0({1}SX:U),J,0,0 S:G$PS$0$0({1}SX:U),J,0,0 S:G$PT2$0$0({1}SX:U),J,0,0 S:G$SMBTOE$0$0({1}SX:U),J,0,0 S:G$SMBFTE$0$0({1}SX:U),J,0,0 S:G$AA$0$0({1}SX:U),J,0,0 S:G$SI$0$0({1}SX:U),J,0,0 S:G$STO$0$0({1}SX:U),J,0,0 S:G$STA$0$0({1}SX:U),J,0,0 S:G$ENSMB$0$0({1}SX:U),J,0,0 S:G$BUSY$0$0({1}SX:U),J,0,0 S:G$CPRL2$0$0({1}SX:U),J,0,0 S:G$CT2$0$0({1}SX:U),J,0,0 S:G$TR2$0$0({1}SX:U),J,0,0 S:G$EXEN2$0$0({1}SX:U),J,0,0 S:G$TCLK$0$0({1}SX:U),J,0,0 S:G$RCLK$0$0({1}SX:U),J,0,0 S:G$EXF2$0$0({1}SX:U),J,0,0 S:G$TF2$0$0({1}SX:U),J,0,0 S:G$P$0$0({1}SX:U),J,0,0 S:G$F1$0$0({1}SX:U),J,0,0 S:G$OV$0$0({1}SX:U),J,0,0 S:G$RS0$0$0({1}SX:U),J,0,0 S:G$RS1$0$0({1}SX:U),J,0,0 S:G$F0$0$0({1}SX:U),J,0,0 S:G$AC$0$0({1}SX:U),J,0,0 S:G$CY$0$0({1}SX:U),J,0,0 S:G$CCF0$0$0({1}SX:U),J,0,0 S:G$CCF1$0$0({1}SX:U),J,0,0 S:G$CCF2$0$0({1}SX:U),J,0,0 S:G$CCF3$0$0({1}SX:U),J,0,0 S:G$CCF4$0$0({1}SX:U),J,0,0 S:G$CR$0$0({1}SX:U),J,0,0 S:G$CF$0$0({1}SX:U),J,0,0 S:G$ADLJST$0$0({1}SX:U),J,0,0 S:G$AD0LJST$0$0({1}SX:U),J,0,0 S:G$ADWINT$0$0({1}SX:U),J,0,0 S:G$AD0WINT$0$0({1}SX:U),J,0,0 S:G$ADSTM0$0$0({1}SX:U),J,0,0 S:G$AD0CM0$0$0({1}SX:U),J,0,0 S:G$ADSTM1$0$0({1}SX:U),J,0,0 S:G$AD0CM1$0$0({1}SX:U),J,0,0 S:G$ADBUSY$0$0({1}SX:U),J,0,0 S:G$AD0BUSY$0$0({1}SX:U),J,0,0 S:G$ADCINT$0$0({1}SX:U),J,0,0 S:G$AD0INT$0$0({1}SX:U),J,0,0 S:G$ADCTM$0$0({1}SX:U),J,0,0 S:G$AD0TM$0$0({1}SX:U),J,0,0 S:G$ADCEN$0$0({1}SX:U),J,0,0 S:G$AD0EN$0$0({1}SX:U),J,0,0 S:G$SPIEN$0$0({1}SX:U),J,0,0 S:G$MSTEN$0$0({1}SX:U),J,0,0 S:G$SLVSEL$0$0({1}SX:U),J,0,0 S:G$TXBSY$0$0({1}SX:U),J,0,0 S:G$RXOVRN$0$0({1}SX:U),J,0,0 S:G$MODF$0$0({1}SX:U),J,0,0 S:G$WCOL$0$0({1}SX:U),J,0,0 S:G$SPIF$0$0({1}SX:U),J,0,0 S:G$PB0$0$0({1}SX:U),J,0,0 S:G$PB1$0$0({1}SX:U),J,0,0 S:G$SS$0$0({1}SX:U),J,0,0 S:G$BILED1$0$0({1}SX:U),J,0,0 S:G$BILED2$0$0({1}SX:U),J,0,0 S:G$LED1$0$0({1}SX:U),J,0,0 S:G$LED0$0$0({1}SX:U),J,0,0 S:G$SYSCLK_Init$0$0({2}DF,SV:S),C,0,0 S:G$UART0_Init$0$0({2}DF,SV:S),C,0,0 S:G$Sys_Init$0$0({2}DF,SV:S),C,0,0 S:G$getchar_nw$0$0({2}DF,SC:U),C,0,0 S:G$_print_format$0$0({2}DF,SI:S),C,0,0 S:G$printf_small$0$0({2}DF,SV:S),C,0,0 S:G$printf$0$0({2}DF,SI:S),C,0,0 S:G$vprintf$0$0({2}DF,SI:S),C,0,0 S:G$sprintf$0$0({2}DF,SI:S),C,0,0 S:G$vsprintf$0$0({2}DF,SI:S),C,0,0 S:G$puts$0$0({2}DF,SI:S),C,0,0 S:G$getchar$0$0({2}DF,SC:U),C,0,0 S:G$putchar$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast_f$0$0({2}DF,SV:S),C,0,0 S:G$printf_tiny$0$0({2}DF,SV:S),C,0,0 S:G$atof$0$0({2}DF,SF:S),C,0,0 S:G$atoi$0$0({2}DF,SI:S),C,0,0 S:G$atol$0$0({2}DF,SL:S),C,0,0 S:G$_uitoa$0$0({2}DF,SV:S),C,0,0 S:G$_itoa$0$0({2}DF,SV:S),C,0,0 S:G$_ultoa$0$0({2}DF,SV:S),C,0,0 S:G$_ltoa$0$0({2}DF,SV:S),C,0,0 S:G$rand$0$0({2}DF,SI:S),C,0,0 S:G$srand$0$0({2}DF,SV:S),C,0,0 S:G$calloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$malloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$realloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$aligned_alloc$0$0({2}DF,DG,SV:S),C,0,0 S:G$free$0$0({2}DF,SV:S),C,0,0 S:G$abs$0$0({2}DF,SI:S),C,0,0 S:G$labs$0$0({2}DF,SL:S),C,0,0 S:G$mblen$0$0({2}DF,SI:S),C,0,0 S:G$mbtowc$0$0({2}DF,SI:S),C,0,0 S:G$wctomb$0$0({2}DF,SI:S),C,0,0 S:G$time$0$0({2}DF,SL:U),C,0,0 S:G$gmtime$0$0({2}DF,DG,STtm:S),C,0,0 S:G$localtime$0$0({2}DF,DG,STtm:S),C,0,0 S:G$mktime$0$0({2}DF,SL:U),C,0,0 S:G$asctime$0$0({2}DF,DG,SC:U),C,0,0 S:G$ctime$0$0({2}DF,DG,SC:U),C,0,0 S:G$main$0$0({2}DF,SV:S),C,0,0 S:Flab1_2$__str_0$0$0({8}DA8d,SC:S),D,0,0 S:Flab1_2$__str_1$0$0({43}DA43d,SC:S),D,0,0 S:Flab1_2$__str_2$0$0({34}DA34d,SC:S),D,0,0 S:Flab1_2$__str_3$0$0({10}DA10d,SC:S),D,0,0
30.991549
369
0.558717
d0c8f249280c61fe5d25a2b044203e8181802cfc
7,926
adb
Ada
src/gnat/widechar.adb
jquorning/dynamo
10d68571476c270b8e45a9c5ef585fa9139b0d05
[ "Apache-2.0" ]
15
2015-01-18T23:04:19.000Z
2022-03-01T20:27:08.000Z
src/gnat/widechar.adb
jquorning/dynamo
10d68571476c270b8e45a9c5ef585fa9139b0d05
[ "Apache-2.0" ]
16
2018-06-10T07:09:30.000Z
2022-03-26T18:28:40.000Z
src/gnat/widechar.adb
jquorning/dynamo
10d68571476c270b8e45a9c5ef585fa9139b0d05
[ "Apache-2.0" ]
3
2015-11-11T18:00:14.000Z
2022-01-30T23:08:45.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- W I D E C H A R -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Note: this package uses the generic subprograms in System.WCh_Cnv, which -- completely encapsulate the set of wide character encoding methods, so no -- modifications are required when adding new encoding methods. with Opt; use Opt; with System.WCh_Cnv; use System.WCh_Cnv; with System.WCh_Con; use System.WCh_Con; package body Widechar is --------------------------- -- Is_Start_Of_Wide_Char -- --------------------------- function Is_Start_Of_Wide_Char (S : Source_Buffer_Ptr; P : Source_Ptr) return Boolean is begin case Wide_Character_Encoding_Method is -- For Hex mode, just test for an ESC character. The ESC character -- cannot appear in any other context in a legal Ada program. when WCEM_Hex => return S (P) = ASCII.ESC; -- For brackets, just test ["x where x is a hex character. This is -- sufficient test, since this sequence cannot otherwise appear in a -- legal Ada program. when WCEM_Brackets => return P <= S'Last - 2 and then S (P) = '[' and then S (P + 1) = '"' and then (S (P + 2) in '0' .. '9' or else S (P + 2) in 'a' .. 'f' or else S (P + 2) in 'A' .. 'F'); -- All other encoding methods use the upper bit set in the first -- character to uniquely represent a wide character. when WCEM_Upper | WCEM_Shift_JIS | WCEM_EUC | WCEM_UTF8 => return S (P) >= Character'Val (16#80#); end case; end Is_Start_Of_Wide_Char; ----------------- -- Length_Wide -- ----------------- function Length_Wide return Nat is begin return WC_Longest_Sequence; end Length_Wide; --------------- -- Scan_Wide -- --------------- procedure Scan_Wide (S : Source_Buffer_Ptr; P : in out Source_Ptr; C : out Char_Code; Err : out Boolean) is P_Init : constant Source_Ptr := P; Chr : Character; function In_Char return Character; -- Function to obtain characters of wide character escape sequence ------------- -- In_Char -- ------------- function In_Char return Character is begin P := P + 1; return S (P - 1); end In_Char; function WC_In is new Char_Sequence_To_UTF_32 (In_Char); -- Start of processing for Scan_Wide begin Chr := In_Char; -- Scan out the wide character. If the first character is a bracket, -- we allow brackets encoding regardless of the standard encoding -- method being used, but otherwise we use this standard method. if Chr = '[' then C := Char_Code (WC_In (Chr, WCEM_Brackets)); else C := Char_Code (WC_In (Chr, Wide_Character_Encoding_Method)); end if; Err := False; Wide_Char_Byte_Count := Wide_Char_Byte_Count + Nat (P - P_Init - 1); exception when Constraint_Error => C := Char_Code (0); P := P - 1; Err := True; end Scan_Wide; -------------- -- Set_Wide -- -------------- procedure Set_Wide (C : Char_Code; S : in out String; P : in out Natural) is procedure Out_Char (C : Character); -- Procedure to store one character of wide character sequence -------------- -- Out_Char -- -------------- procedure Out_Char (C : Character) is begin P := P + 1; S (P) := C; end Out_Char; procedure WC_Out is new UTF_32_To_Char_Sequence (Out_Char); -- Start of processing for Set_Wide begin WC_Out (UTF_32_Code (C), Wide_Character_Encoding_Method); end Set_Wide; --------------- -- Skip_Wide -- --------------- procedure Skip_Wide (S : String; P : in out Natural) is P_Init : constant Natural := P; function Skip_Char return Character; -- Function to skip one character of wide character escape sequence --------------- -- Skip_Char -- --------------- function Skip_Char return Character is begin P := P + 1; return S (P - 1); end Skip_Char; function WC_Skip is new Char_Sequence_To_UTF_32 (Skip_Char); Discard : UTF_32_Code; pragma Warnings (Off, Discard); -- Start of processing for Skip_Wide begin Discard := WC_Skip (Skip_Char, Wide_Character_Encoding_Method); Wide_Char_Byte_Count := Wide_Char_Byte_Count + Nat (P - P_Init - 1); end Skip_Wide; --------------- -- Skip_Wide -- --------------- procedure Skip_Wide (S : Source_Buffer_Ptr; P : in out Source_Ptr) is P_Init : constant Source_Ptr := P; function Skip_Char return Character; -- Function to skip one character of wide character escape sequence --------------- -- Skip_Char -- --------------- function Skip_Char return Character is begin P := P + 1; return S (P - 1); end Skip_Char; function WC_Skip is new Char_Sequence_To_UTF_32 (Skip_Char); Discard : UTF_32_Code; pragma Warnings (Off, Discard); -- Start of processing for Skip_Wide begin Discard := WC_Skip (Skip_Char, Wide_Character_Encoding_Method); Wide_Char_Byte_Count := Wide_Char_Byte_Count + Nat (P - P_Init - 1); end Skip_Wide; end Widechar;
32.752066
78
0.49672
dc9814c9159e101ee2091061d5d15b7b95bb8bd0
963
ads
Ada
mat/regtests/mat-testsuite.ads
stcarrez/mat
fb242feb5662b8130680cd06e50da7ef40b95bd7
[ "Apache-2.0" ]
7
2015-01-18T23:04:30.000Z
2021-04-06T14:07:56.000Z
mat/regtests/mat-testsuite.ads
stcarrez/mat
fb242feb5662b8130680cd06e50da7ef40b95bd7
[ "Apache-2.0" ]
null
null
null
mat/regtests/mat-testsuite.ads
stcarrez/mat
fb242feb5662b8130680cd06e50da7ef40b95bd7
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- mat-testsuite - MAT Testsuite -- 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 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package MAT.Testsuite is function Suite return Util.Tests.Access_Test_Suite; end MAT.Testsuite;
37.038462
76
0.630322
0e9d413501e79d695c27465118d343e6a28af865
5,029
ads
Ada
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/g-crc32.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/g-crc32.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/g-crc32.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . C R C 3 2 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-2021, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides routines for computing a commonly used checksum -- called CRC-32. This is a checksum based on treating the binary data -- as a polynomial over a binary field, and the exact specifications of -- the CRC-32 algorithm are as follows: -- Name : "CRC-32" -- Width : 32 -- Poly : 04C11DB7 -- Init : FFFFFFFF -- RefIn : True -- RefOut : True -- XorOut : FFFFFFFF -- Check : CBF43926 -- Note that this is the algorithm used by PKZip, Ethernet and FDDI -- For more information about this algorithm see: -- ftp://ftp.rocksoft.com/papers/crc_v3.txt -- "A Painless Guide to CRC Error Detection Algorithms", Ross N. Williams -- "Computation of Cyclic Redundancy Checks via Table Look-Up", Communications -- of the ACM, Vol. 31 No. 8, pp.1008-1013 Aug. 1988. Sarwate, D.V. with Ada.Streams; with Interfaces; with System.CRC32; package GNAT.CRC32 is subtype CRC32 is System.CRC32.CRC32; -- Used to represent CRC32 values, which are 32 bit bit-strings procedure Initialize (C : out CRC32) renames System.CRC32.Initialize; -- Initialize CRC value by assigning the standard Init value (16#FFFF_FFFF) procedure Update (C : in out CRC32; Value : Character) renames System.CRC32.Update; -- Evolve CRC by including the contribution from Character'Pos (Value) procedure Update (C : in out CRC32; Value : String); -- For each character in the Value string call above routine procedure Wide_Update (C : in out CRC32; Value : Wide_Character); -- Evolve CRC by including the contribution from Wide_Character'Pos (Value) -- with the bytes being included in the natural memory order. procedure Wide_Update (C : in out CRC32; Value : Wide_String); -- For each character in the Value string call above routine procedure Update (C : in out CRC32; Value : Ada.Streams.Stream_Element); -- Evolve CRC by including the contribution from Value procedure Update (C : in out CRC32; Value : Ada.Streams.Stream_Element_Array); -- For each element in the Value array call above routine function Get_Value (C : CRC32) return Interfaces.Unsigned_32 renames System.CRC32.Get_Value; -- Get_Value computes the CRC32 value by performing an XOR with the -- standard XorOut value (16#FFFF_FFFF). Note that this does not -- change the value of C, so it may be used to retrieve intermediate -- values of the CRC32 value during a sequence of Update calls. pragma Inline (Update); pragma Inline (Wide_Update); end GNAT.CRC32;
44.901786
79
0.496918
c5339aba452de6014fa264bc1c97dd59211eab22
1,639
adb
Ada
day01/src/day1.adb
jwarwick/aoc_2019_ada
2168249071d235ec76d8424967811d03e9415f5c
[ "MIT" ]
null
null
null
day01/src/day1.adb
jwarwick/aoc_2019_ada
2168249071d235ec76d8424967811d03e9415f5c
[ "MIT" ]
null
null
null
day01/src/day1.adb
jwarwick/aoc_2019_ada
2168249071d235ec76d8424967811d03e9415f5c
[ "MIT" ]
null
null
null
-- AoC 2019, Day 1 with Ada.Text_IO; with Ada.Containers.Vectors; package body Day1 is package TIO renames Ada.Text_IO; package Module_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Mass); modules : Module_Vectors.Vector; procedure load_modules(filename : in String) is file : TIO.File_Type; begin TIO.open(File => file, Mode => TIO.In_File, Name => filename); while not TIO.end_of_file(file) loop modules.append(Mass'Value(TIO.get_line(file))); end loop; TIO.close(file); end load_modules; function fuel_required(weight : in Mass) return Integer is begin return Integer(Float'Floor(Float(weight) / 3.0) - 2.0); end fuel_required; function fuel_for_modules return Mass is total : Mass := 0; begin for m of modules loop total := total + Mass(fuel_required(m)); end loop; return total; end fuel_for_modules; function recursive_fuel_required(weight : in Mass) return Mass is total : Mass := weight; remaining : Integer := Integer(weight); begin while remaining > 0 loop remaining := fuel_required(Mass(remaining)); if remaining > 0 then total := total + Mass(remaining); end if; end loop; return total; end recursive_fuel_required; function total_fuel return Mass is module_fuel : Mass; all_fuel : Mass; total : Mass := 0; begin for m of modules loop module_fuel := Mass(fuel_required(m)); all_fuel := recursive_fuel_required(module_fuel); total := total + all_fuel; end loop; return total; end total_fuel; end day1;
25.609375
67
0.672971
0e91ac4c1797fbffde39db2f05814c9ba63454ba
844
ads
Ada
contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/varsize_limit/pck.ads
TheSledgeHammer/2.11BSD
fe61f0b9aaa273783cd027c7b5ec77e95ead2153
[ "BSD-3-Clause" ]
3
2021-05-04T17:09:06.000Z
2021-10-04T07:19:26.000Z
contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/varsize_limit/pck.ads
TheSledgeHammer/2.11BSD
fe61f0b9aaa273783cd027c7b5ec77e95ead2153
[ "BSD-3-Clause" ]
null
null
null
contrib/gnu/gdb/dist/gdb/testsuite/gdb.ada/varsize_limit/pck.ads
TheSledgeHammer/2.11BSD
fe61f0b9aaa273783cd027c7b5ec77e95ead2153
[ "BSD-3-Clause" ]
null
null
null
-- 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. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. with System; package Pck is procedure Do_Nothing (A : System.Address); function Ident (S : String) return String; end Pck;
40.190476
73
0.735782
c582fa511606496fb7039988ea417551fad9b61f
6,396
ads
Ada
source/nls/machine-apple-darwin/s-naenen.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
33
2015-04-04T09:19:36.000Z
2021-11-10T05:33:34.000Z
source/nls/machine-apple-darwin/s-naenen.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
8
2017-11-14T13:05:07.000Z
2018-08-09T15:28:49.000Z
source/nls/machine-apple-darwin/s-naenen.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
9
2015-02-03T17:09:53.000Z
2021-11-12T01:16:05.000Z
pragma License (Unrestricted); -- implementation unit specialized for Darwin with Ada.IO_Exceptions; with Ada.Streams; with C.icucore; package System.Native_Environment_Encoding is -- Platform-depended text encoding. pragma Preelaborate; use type C.char_array; use type C.size_t; -- max length of one multi-byte character Max_Substitute_Length : constant := 6; -- UTF-8 -- encoding identifier type Encoding_Id is access constant C.char; for Encoding_Id'Storage_Size use 0; function Get_Image (Encoding : Encoding_Id) return String; function Get_Default_Substitute (Encoding : Encoding_Id) return Ada.Streams.Stream_Element_Array; function Get_Min_Size_In_Stream_Elements (Encoding : Encoding_Id) return Ada.Streams.Stream_Element_Offset; UTF_8_Name : aliased constant C.char_array (0 .. 5) := "UTF-8" & C.char'Val (0); UTF_8 : constant Encoding_Id := UTF_8_Name (0)'Access; UTF_16_Names : aliased constant array (Bit_Order) of aliased C.char_array (0 .. 8) := ( High_Order_First => "UTF-16BE" & C.char'Val (0), Low_Order_First => "UTF-16LE" & C.char'Val (0)); UTF_16 : constant Encoding_Id := UTF_16_Names (Default_Bit_Order)(0)'Access; UTF_16BE : constant Encoding_Id := UTF_16_Names (High_Order_First)(0)'Access; UTF_16LE : constant Encoding_Id := UTF_16_Names (Low_Order_First)(0)'Access; UTF_32_Names : aliased constant array (Bit_Order) of aliased C.char_array (0 .. 8) := ( High_Order_First => "UTF-32BE" & C.char'Val (0), Low_Order_First => "UTF-32LE" & C.char'Val (0)); UTF_32 : constant Encoding_Id := UTF_32_Names (Default_Bit_Order)(0)'Access; UTF_32BE : constant Encoding_Id := UTF_32_Names (High_Order_First)(0)'Access; UTF_32LE : constant Encoding_Id := UTF_32_Names (Low_Order_First)(0)'Access; function Get_Current_Encoding return Encoding_Id; -- Returns UTF-8. In POSIX, The system encoding is assumed as UTF-8. pragma Inline (Get_Current_Encoding); -- subsidiary types to converter type Subsequence_Status_Type is ( Finished, Success, Overflow, -- the output buffer is not large enough Illegal_Sequence, -- a input character could not be mapped to the output Truncated); -- the input buffer is broken off at a multi-byte character pragma Discard_Names (Subsequence_Status_Type); type Continuing_Status_Type is new Subsequence_Status_Type range Success .. Subsequence_Status_Type'Last; type Finishing_Status_Type is new Subsequence_Status_Type range Finished .. Overflow; type Status_Type is new Subsequence_Status_Type range Finished .. Illegal_Sequence; type Substituting_Status_Type is new Status_Type range Finished .. Overflow; subtype True_Only is Boolean range True .. True; -- converter Half_Buffer_Length : constant := 64 / (C.icucore.UChar'Size / Standard'Storage_Unit); subtype Buffer_Type is C.icucore.UChar_array (0 .. 2 * Half_Buffer_Length - 1); type Converter is record -- about "From" From_uconv : C.icucore.UConverter_ptr := null; -- intermediate Buffer : Buffer_Type; Buffer_First : aliased C.icucore.UChar_const_ptr; Buffer_Limit : aliased C.icucore.UChar_ptr; -- Last + 1 -- about "To" To_uconv : C.icucore.UConverter_ptr := null; Substitute_Length : Ada.Streams.Stream_Element_Offset; Substitute : Ada.Streams.Stream_Element_Array ( 1 .. Max_Substitute_Length); end record; pragma Suppress_Initialization (Converter); Disable_Controlled : constant Boolean := False; procedure Open (Object : in out Converter; From, To : Encoding_Id); procedure Close (Object : in out Converter); function Is_Open (Object : Converter) return Boolean; pragma Inline (Is_Open); function Min_Size_In_From_Stream_Elements_No_Check (Object : Converter) return Ada.Streams.Stream_Element_Offset; function Substitute_No_Check (Object : Converter) return Ada.Streams.Stream_Element_Array; procedure Set_Substitute_No_Check ( Object : in out Converter; Substitute : Ada.Streams.Stream_Element_Array); -- convert subsequence procedure Convert_No_Check ( Object : Converter; Item : Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : Boolean; Status : out Subsequence_Status_Type); procedure Convert_No_Check ( Object : Converter; Item : Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Status : out Continuing_Status_Type); procedure Convert_No_Check ( Object : Converter; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : True_Only; Status : out Finishing_Status_Type); -- convert all character sequence -- procedure Convert_No_Check ( -- Object : Converter; -- Item : Ada.Streams.Stream_Element_Array; -- Last : out Ada.Streams.Stream_Element_Offset; -- Out_Item : out Ada.Streams.Stream_Element_Array; -- Out_Last : out Ada.Streams.Stream_Element_Offset; -- Finish : True_Only; -- Status : out Status_Type); -- convert all character sequence with substitute procedure Convert_No_Check ( Object : Converter; Item : Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Finish : True_Only; Status : out Substituting_Status_Type); procedure Put_Substitute ( Object : Converter; Out_Item : out Ada.Streams.Stream_Element_Array; Out_Last : out Ada.Streams.Stream_Element_Offset; Is_Overflow : out Boolean); -- exceptions Name_Error : exception renames Ada.IO_Exceptions.Name_Error; Use_Error : exception renames Ada.IO_Exceptions.Use_Error; end System.Native_Environment_Encoding;
34.203209
79
0.703565
0e3f7d7dab78515185b68ebe212f13becc0ebf14
13,707
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/g-socthi-vxworks.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/ada/g-socthi-vxworks.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/g-socthi-vxworks.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . S O C K E T S . T H I N -- -- -- -- B o d y -- -- -- -- Copyright (C) 2002-2013, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides a target dependent thin interface to the sockets -- layer for use by the GNAT.Sockets package (g-socket.ads). This package -- should not be directly with'ed by an applications program. -- This version is for VxWorks with GNAT.OS_Lib; use GNAT.OS_Lib; with GNAT.Task_Lock; with Interfaces.C; use Interfaces.C; package body GNAT.Sockets.Thin is Non_Blocking_Sockets : aliased Fd_Set; -- When this package is initialized with Process_Blocking_IO set -- to True, sockets are set in non-blocking mode to avoid blocking -- the whole process when a thread wants to perform a blocking IO -- operation. But the user can also set a socket in non-blocking -- mode by purpose. In order to make a difference between these -- two situations, we track the origin of non-blocking mode in -- Non_Blocking_Sockets. If S is in Non_Blocking_Sockets, it has -- been set in non-blocking mode by the user. Quantum : constant Duration := 0.2; -- When SOSC.Thread_Blocking_IO is False, we set sockets in -- non-blocking mode and we spend a period of time Quantum between -- two attempts on a blocking operation. ----------------------- -- Local Subprograms -- ----------------------- -- All these require comments ??? function Syscall_Accept (S : C.int; Addr : System.Address; Addrlen : not null access C.int) return C.int; pragma Import (C, Syscall_Accept, "accept"); function Syscall_Connect (S : C.int; Name : System.Address; Namelen : C.int) return C.int; pragma Import (C, Syscall_Connect, "connect"); function Syscall_Recv (S : C.int; Msg : System.Address; Len : C.int; Flags : C.int) return C.int; pragma Import (C, Syscall_Recv, "recv"); function Syscall_Recvfrom (S : C.int; Msg : System.Address; Len : C.int; Flags : C.int; From : System.Address; Fromlen : not null access C.int) return C.int; pragma Import (C, Syscall_Recvfrom, "recvfrom"); function Syscall_Recvmsg (S : C.int; Msg : System.Address; Flags : C.int) return C.int; pragma Import (C, Syscall_Recvmsg, "recvmsg"); function Syscall_Sendmsg (S : C.int; Msg : System.Address; Flags : C.int) return C.int; pragma Import (C, Syscall_Sendmsg, "sendmsg"); function Syscall_Send (S : C.int; Msg : System.Address; Len : C.int; Flags : C.int) return C.int; pragma Import (C, Syscall_Send, "send"); function Syscall_Sendto (S : C.int; Msg : System.Address; Len : C.int; Flags : C.int; To : System.Address; Tolen : C.int) return C.int; pragma Import (C, Syscall_Sendto, "sendto"); function Syscall_Socket (Domain : C.int; Typ : C.int; Protocol : C.int) return C.int; pragma Import (C, Syscall_Socket, "socket"); function Non_Blocking_Socket (S : C.int) return Boolean; procedure Set_Non_Blocking_Socket (S : C.int; V : Boolean); -------------- -- C_Accept -- -------------- function C_Accept (S : C.int; Addr : System.Address; Addrlen : not null access C.int) return C.int is R : C.int; Val : aliased C.int := 1; Res : C.int; pragma Unreferenced (Res); begin loop R := Syscall_Accept (S, Addr, Addrlen); exit when SOSC.Thread_Blocking_IO or else R /= Failure or else Non_Blocking_Socket (S) or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; if not SOSC.Thread_Blocking_IO and then R /= Failure then -- A socket inherits the properties of its server especially -- the FIONBIO flag. Do not use Socket_Ioctl as this subprogram -- tracks sockets set in non-blocking mode by user. Set_Non_Blocking_Socket (R, Non_Blocking_Socket (S)); Res := C_Ioctl (R, SOSC.FIONBIO, Val'Access); -- Is it OK to ignore result ??? end if; return R; end C_Accept; --------------- -- C_Connect -- --------------- function C_Connect (S : C.int; Name : System.Address; Namelen : C.int) return C.int is Res : C.int; begin Res := Syscall_Connect (S, Name, Namelen); if SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) or else Errno /= SOSC.EINPROGRESS then return Res; end if; declare WSet : aliased Fd_Set; Now : aliased Timeval; begin Reset_Socket_Set (WSet'Access); loop Insert_Socket_In_Set (WSet'Access, S); Now := Immediat; Res := C_Select (S + 1, No_Fd_Set_Access, WSet'Access, No_Fd_Set_Access, Now'Unchecked_Access); exit when Res > 0; if Res = Failure then return Res; end if; delay Quantum; end loop; end; Res := Syscall_Connect (S, Name, Namelen); if Res = Failure and then Errno = SOSC.EISCONN then return Thin_Common.Success; else return Res; end if; end C_Connect; ------------------ -- Socket_Ioctl -- ------------------ function Socket_Ioctl (S : C.int; Req : SOSC.IOCTL_Req_T; Arg : access C.int) return C.int is begin if not SOSC.Thread_Blocking_IO and then Req = SOSC.FIONBIO then if Arg.all /= 0 then Set_Non_Blocking_Socket (S, True); end if; end if; return C_Ioctl (S, Req, Arg); end Socket_Ioctl; ------------ -- C_Recv -- ------------ function C_Recv (S : C.int; Msg : System.Address; Len : C.int; Flags : C.int) return C.int is Res : C.int; begin loop Res := Syscall_Recv (S, Msg, Len, Flags); exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; return Res; end C_Recv; ---------------- -- C_Recvfrom -- ---------------- function C_Recvfrom (S : C.int; Msg : System.Address; Len : C.int; Flags : C.int; From : System.Address; Fromlen : not null access C.int) return C.int is Res : C.int; begin loop Res := Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen); exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; return Res; end C_Recvfrom; --------------- -- C_Recvmsg -- --------------- function C_Recvmsg (S : C.int; Msg : System.Address; Flags : C.int) return System.CRTL.ssize_t is Res : C.int; begin loop Res := Syscall_Recvmsg (S, Msg, Flags); exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; return System.CRTL.ssize_t (Res); end C_Recvmsg; --------------- -- C_Sendmsg -- --------------- function C_Sendmsg (S : C.int; Msg : System.Address; Flags : C.int) return System.CRTL.ssize_t is Res : C.int; begin loop Res := Syscall_Sendmsg (S, Msg, Flags); exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; return System.CRTL.ssize_t (Res); end C_Sendmsg; -------------- -- C_Sendto -- -------------- function C_Sendto (S : C.int; Msg : System.Address; Len : C.int; Flags : C.int; To : System.Address; Tolen : C.int) return C.int is use System; Res : C.int; begin loop if To = Null_Address then -- In violation of the standard sockets API, VxWorks does not -- support sendto(2) calls on connected sockets with a null -- destination address, so use send(2) instead in that case. Res := Syscall_Send (S, Msg, Len, Flags); -- Normal case where destination address is non-null else Res := Syscall_Sendto (S, Msg, Len, Flags, To, Tolen); end if; exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; return Res; end C_Sendto; -------------- -- C_Socket -- -------------- function C_Socket (Domain : C.int; Typ : C.int; Protocol : C.int) return C.int is R : C.int; Val : aliased C.int := 1; Res : C.int; pragma Unreferenced (Res); begin R := Syscall_Socket (Domain, Typ, Protocol); if not SOSC.Thread_Blocking_IO and then R /= Failure then -- Do not use Socket_Ioctl as this subprogram tracks sockets set -- in non-blocking mode by user. Res := C_Ioctl (R, SOSC.FIONBIO, Val'Access); -- Is it OK to ignore result ??? Set_Non_Blocking_Socket (R, False); end if; return R; end C_Socket; -------------- -- Finalize -- -------------- procedure Finalize is begin null; end Finalize; ------------------------- -- Host_Error_Messages -- ------------------------- package body Host_Error_Messages is separate; ---------------- -- Initialize -- ---------------- procedure Initialize is begin Reset_Socket_Set (Non_Blocking_Sockets'Access); end Initialize; ------------------------- -- Non_Blocking_Socket -- ------------------------- function Non_Blocking_Socket (S : C.int) return Boolean is R : Boolean; begin Task_Lock.Lock; R := (Is_Socket_In_Set (Non_Blocking_Sockets'Access, S) /= 0); Task_Lock.Unlock; return R; end Non_Blocking_Socket; ----------------------------- -- Set_Non_Blocking_Socket -- ----------------------------- procedure Set_Non_Blocking_Socket (S : C.int; V : Boolean) is begin Task_Lock.Lock; if V then Insert_Socket_In_Set (Non_Blocking_Sockets'Access, S); else Remove_Socket_From_Set (Non_Blocking_Sockets'Access, S); end if; Task_Lock.Unlock; end Set_Non_Blocking_Socket; -------------------- -- Signalling_Fds -- -------------------- package body Signalling_Fds is separate; -------------------------- -- Socket_Error_Message -- -------------------------- function Socket_Error_Message (Errno : Integer) return String is separate; end GNAT.Sockets.Thin;
28.088115
78
0.51149
dc715c8814c2077a7f8a9b60bf1f13b7c7c1e848
5,839
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c41306c.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c41306c.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c41306c.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- C41306C.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. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT IF F IS A FUNCTION RETURNING AN ACCESS VALUE DESIGNATING -- A TASK OF A TYPE HAVING -- AN ENTRY E , AN ENTRY CALL OF THE FORM -- -- F.E -- -- IS PERMITTED. -- RM 02/02/82 -- ABW 07/16/82 -- EG 05/28/85 WITH REPORT; USE REPORT; PROCEDURE C41306C IS BEGIN TEST ( "C41306C" , "CHECK THAT IF F IS A FUNCTION RETURNING" & " AN ACCESS VALUE DESIGNATING" & " A TASK OF A TYPE HAVING AN ENTRY E , AN" & " ENTRY CALL OF THE FORM F.E IS PERMITTED" ); ------------------------------------------------------------------- DECLARE X : INTEGER := 0 ; TASK TYPE T IS ENTRY E ; END T ; TYPE A_T IS ACCESS T ; TASK BODY T IS BEGIN ACCEPT E DO X := IDENT_INT(17) ; END E ; END T ; FUNCTION F1 RETURN A_T IS A_T_VAR1 : A_T := NEW T ; BEGIN RETURN A_T_VAR1 ; END F1 ; FUNCTION F2 (A, B : BOOLEAN) RETURN A_T IS A_T_VAR2 : A_T := NEW T; BEGIN IF A AND B THEN NULL; END IF; RETURN A_T_VAR2; END F2; BEGIN F1.E ; -- THE ELABOR. OF F1 (BODY) ACTIVATES THE TASK, -- WHICH PROCEEDS TO WAIT FOR ENTRY E TO -- BE CALLED. -- THE CALLED ENTRY CAUSES X TO BE SET TO 17 . IF X /= 17 THEN FAILED( "WRONG VALUE FOR GLOBAL VARIABLE (1)" ); END IF; X := 0; F2(TRUE, TRUE).E; -- THE ELABORATION OF F2 (BODY) ACTIVATES -- THE TASK, WHICH PROCEEDS TO WAIT FOR -- ENTRY E TO BE CALLED. -- THE CALLED ENTRY CAUSES X TO BE SET TO -- 17. IF X /= 17 THEN FAILED ("WRONG VALUE FOR GLOBAL VARIABLE (2)"); END IF; END ; ------------------------------------------------------------------- DECLARE X : INTEGER := 0 ; TASK TYPE T IS ENTRY E ; END T ; TYPE A_T IS ACCESS T ; TASK BODY T IS BEGIN ACCEPT E DO X := IDENT_INT(17) ; END E ; END T ; FUNCTION F3 RETURN A_T IS BEGIN RETURN NEW T ; END F3; FUNCTION F4 (C, D : BOOLEAN) RETURN A_T IS BEGIN IF C AND D THEN NULL; END IF; RETURN NEW T; END F4; BEGIN F3.E ; -- THE ELABOR. OF F3 (BODY) ACTIVATES THE TASK, -- WHICH PROCEEDS TO WAIT FOR ENTRY E TO -- BE CALLED. -- THE CALLED ENTRY CAUSES X TO BE SET TO 17 . IF X /= 17 THEN FAILED( "WRONG VALUE FOR GLOBAL VARIABLE (3)" ); END IF; X := 0; F4(TRUE, TRUE).E; -- THE ELABORATION OF F4 (BODY) ACTIVATES -- THE TASK WHICH PROCEEDS TO WAIT FOR -- ENTRY E TO BE CALLED. -- THE CALLED ENTRY CAUSES X TO BE SET TO -- 17. IF X /= 17 THEN FAILED ("WRONG VALUE FOR GLOBAL VARIABLE (4)"); END IF; END ; ------------------------------------------------------------------- DECLARE X : INTEGER := 0 ; TASK TYPE T IS ENTRY E ; END T ; TYPE A_T IS ACCESS T ; TASK BODY T IS BEGIN ACCEPT E DO X := IDENT_INT(17) ; END E ; END T ; BEGIN DECLARE F3 : A_T := NEW T; BEGIN F3.E; -- THE CALLED ENTRY CAUSES X TO BE SET TO 17 . IF X /= 17 THEN FAILED( "WRONG VALUE FOR GLOBAL VARIABLE (5)" ); END IF; END; END ; ------------------------------------------------------------------- RESULT; END C41306C;
27.032407
79
0.429526
4a8db361b484a094c751ffdbd5ae240ed8ed6049
260
ads
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/frunaligned1.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/frunaligned1.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/frunaligned1.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
package FRUnaligned1 is type r is array (1 .. 72) of Boolean; pragma Pack (r); type s is record x : Boolean; y : r; end record; for s use record x at 0 range 0 .. 0; y at 0 range 1 .. 72; end record; end FRUnaligned1;
20
40
0.569231
18e41506e43f295edaac16be37ac51b6bd57e1d7
92,760
adb
Ada
submissions/M2/Design_Analysis/lab1/dct_prj/solution6/.autopilot/db/Loop_Xpose_Col_Outer.bind.adb
maanjum95/SynthesisDigitalSystems_Lab
afc942decf7595eb1557ff78074693de2eea1780
[ "MIT" ]
null
null
null
submissions/M2/Design_Analysis/lab1/dct_prj/solution6/.autopilot/db/Loop_Xpose_Col_Outer.bind.adb
maanjum95/SynthesisDigitalSystems_Lab
afc942decf7595eb1557ff78074693de2eea1780
[ "MIT" ]
null
null
null
submissions/M2/Design_Analysis/lab1/dct_prj/solution6/.autopilot/db/Loop_Xpose_Col_Outer.bind.adb
maanjum95/SynthesisDigitalSystems_Lab
afc942decf7595eb1557ff78074693de2eea1780
[ "MIT" ]
null
null
null
<?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="0" object_id="_0"> <name>Loop_Xpose_Col_Outer</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>col_outbuf_i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>buf_2d_out</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>1</direction> <if_type>1</if_type> <array_size>64</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>28</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>3</id> <name>_ln0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>41</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.73</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>5</id> <name>indvar_flatten</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second class_id="12" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="13" tracking_level="0" version="0"> <first class_id="14" tracking_level="0" version="0"> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>87</item> <item>88</item> <item>89</item> <item>90</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>6</id> <name>j_1_i</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>91</item> <item>92</item> <item>93</item> <item>94</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>7</id> <name>i_3_i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>95</item> <item>96</item> <item>97</item> <item>98</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>8</id> <name>icmp_ln92</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>99</item> <item>101</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.71</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>9</id> <name>add_ln92</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>102</item> <item>104</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.85</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>10</id> <name>_ln92</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>105</item> <item>106</item> <item>107</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>12</id> <name>j</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName>j</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>42</item> <item>44</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.80</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>15</id> <name>icmp_ln94</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>94</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>94</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>45</item> <item>47</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.72</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>16</id> <name>select_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>48</item> <item>50</item> <item>51</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.18</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>17</id> <name>select_ln95_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>52</item> <item>53</item> <item>54</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.18</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>18</id> <name>zext_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>55</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>12</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>19</id> <name>tmp</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>57</item> <item>58</item> <item>60</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>20</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>20</id> <name>zext_ln95_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>61</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>21</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>24</id> <name>zext_ln95_2</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>62</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>22</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>25</id> <name>tmp_3</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>63</item> <item>64</item> <item>65</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>13</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>26</id> <name>zext_ln95_3</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>66</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>14</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>27</id> <name>add_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>67</item> <item>68</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.85</m_delay> <m_topoIndex>15</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>28</id> <name>zext_ln95_4</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>69</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>16</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>29</id> <name>col_outbuf_i_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>70</item> <item>72</item> <item>73</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>17</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>30</id> <name>add_ln95_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>74</item> <item>75</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.85</m_delay> <m_topoIndex>23</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>31</id> <name>zext_ln95_5</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>76</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>24</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>32</id> <name>buf_2d_out_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>77</item> <item>78</item> <item>79</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>25</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>33</id> <name>col_outbuf_i_load</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>80</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.29</m_delay> <m_topoIndex>18</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>34</id> <name>buf_2d_out_addr_write_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>81</item> <item>82</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.29</m_delay> <m_topoIndex>26</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>36</id> <name>i</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>94</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct</second> </first> <second>130</second> </item> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>94</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>83</item> <item>84</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.80</m_delay> <m_topoIndex>19</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>37</id> <name>_ln0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>85</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>27</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>39</id> <name>_ln0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>28</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_31"> <Value> <Obj> <type>2</type> <id>43</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_32"> <Value> <Obj> <type>2</type> <id>46</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_33"> <Value> <Obj> <type>2</type> <id>49</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_34"> <Value> <Obj> <type>2</type> <id>59</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_35"> <Value> <Obj> <type>2</type> <id>71</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_36"> <Value> <Obj> <type>2</type> <id>86</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_37"> <Value> <Obj> <type>2</type> <id>100</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>64</content> </item> <item class_id_reference="16" object_id="_38"> <Value> <Obj> <type>2</type> <id>103</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_39"> <Obj> <type>3</type> <id>4</id> <name>newFuncRoot</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>3</item> </node_objs> </item> <item class_id_reference="18" object_id="_40"> <Obj> <type>3</type> <id>11</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>6</count> <item_version>0</item_version> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> <item>10</item> </node_objs> </item> <item class_id_reference="18" object_id="_41"> <Obj> <type>3</type> <id>38</id> <name>Xpose_Col_Inner_Loop</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>20</count> <item_version>0</item_version> <item>12</item> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> <item>36</item> <item>37</item> </node_objs> </item> <item class_id_reference="18" object_id="_42"> <Obj> <type>3</type> <id>40</id> <name>dct_2d.exit.exitStub</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>39</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>60</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_43"> <id>41</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>3</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_44"> <id>42</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>12</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_45"> <id>44</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>12</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_46"> <id>45</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_47"> <id>47</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_48"> <id>48</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_49"> <id>50</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_50"> <id>51</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_51"> <id>52</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_52"> <id>53</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_53"> <id>54</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_54"> <id>55</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_55"> <id>58</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_56"> <id>60</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_57"> <id>61</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_58"> <id>62</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_59"> <id>64</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_60"> <id>65</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_61"> <id>66</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_62"> <id>67</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_63"> <id>68</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_64"> <id>69</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>28</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_65"> <id>70</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_66"> <id>72</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_67"> <id>73</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_68"> <id>74</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_69"> <id>75</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_70"> <id>76</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_71"> <id>77</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>32</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_72"> <id>78</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>32</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_73"> <id>79</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>32</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_74"> <id>80</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_75"> <id>81</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_76"> <id>82</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_77"> <id>83</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>36</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_78"> <id>84</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>36</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_79"> <id>85</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_80"> <id>87</id> <edge_type>1</edge_type> <source_obj>86</source_obj> <sink_obj>5</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_81"> <id>88</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>5</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_82"> <id>89</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>5</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_83"> <id>90</id> <edge_type>2</edge_type> <source_obj>38</source_obj> <sink_obj>5</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_84"> <id>91</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>6</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_85"> <id>92</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>6</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_86"> <id>93</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>6</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_87"> <id>94</id> <edge_type>2</edge_type> <source_obj>38</source_obj> <sink_obj>6</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_88"> <id>95</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_89"> <id>96</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_90"> <id>97</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>7</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_91"> <id>98</id> <edge_type>2</edge_type> <source_obj>38</source_obj> <sink_obj>7</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_92"> <id>99</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_93"> <id>101</id> <edge_type>1</edge_type> <source_obj>100</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_94"> <id>102</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>9</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_95"> <id>104</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>9</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_96"> <id>105</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>10</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_97"> <id>106</id> <edge_type>2</edge_type> <source_obj>38</source_obj> <sink_obj>10</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_98"> <id>107</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>10</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_99"> <id>139</id> <edge_type>2</edge_type> <source_obj>4</source_obj> <sink_obj>11</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_100"> <id>140</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_101"> <id>141</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>38</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_102"> <id>142</id> <edge_type>2</edge_type> <source_obj>38</source_obj> <sink_obj>11</sink_obj> <is_back_edge>1</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_103"> <mId>1</mId> <mTag>Loop_Xpose_Col_Outer</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>4</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>66</mMinLatency> <mMaxLatency>66</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_104"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>4</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_105"> <mId>3</mId> <mTag>Xpose_Col_Outer_Loop_Xpose_Col_Inner_Loop</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>11</item> <item>38</item> </basic_blocks> <mII>1</mII> <mDepth>2</mDepth> <mMinTripCount>64</mMinTripCount> <mMaxTripCount>64</mMaxTripCount> <mMinLatency>64</mMinLatency> <mMaxLatency>64</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_106"> <mId>4</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>40</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_107"> <states class_id="25" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_108"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_109"> <id>3</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_110"> <id>2</id> <operations> <count>18</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_111"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_112"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_113"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_114"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_115"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_116"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_117"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_118"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_119"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_120"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_121"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_122"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_123"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_124"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_125"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_126"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_127"> <id>33</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_128"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_129"> <id>3</id> <operations> <count>15</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_130"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_131"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_132"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_133"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_134"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_135"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_136"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_137"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_138"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_139"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_140"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_141"> <id>33</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_142"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_143"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_144"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_145"> <id>4</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_146"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_147"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>-1</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_148"> <inState>3</inState> <outState>2</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_149"> <inState>2</inState> <outState>4</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>8</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_150"> <inState>2</inState> <outState>3</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>8</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>28</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>3</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>5</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>6</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>7</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>9</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>10</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>12</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>24</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>34</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>3</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>4</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>38</first> <second> <first>1</first> <second>2</second> </second> </item> <item> <first>40</first> <second> <first>2</first> <second>2</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="44" tracking_level="1" version="0" object_id="_151"> <region_name>Xpose_Col_Outer_Loop_Xpose_Col_Inner_Loop</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>11</item> <item>38</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>1</interval> <pipe_depth>2</pipe_depth> </item> </regions> <dp_fu_nodes class_id="45" tracking_level="0" version="0"> <count>24</count> <item_version>0</item_version> <item class_id="46" tracking_level="0" version="0"> <first>46</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>53</first> <second> <count>2</count> <item_version>0</item_version> <item>33</item> <item>33</item> </second> </item> <item> <first>59</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>66</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>77</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>88</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>99</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>106</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>112</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>118</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>124</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>130</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>138</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>146</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>150</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>158</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>162</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>168</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>173</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>179</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>186</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>190</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>193</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>199</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="48" tracking_level="0" version="0"> <count>22</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>add_ln92_fu_112</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>add_ln95_1_fu_193</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>add_ln95_fu_162</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>buf_2d_out_addr_gep_fu_59</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>col_outbuf_i_addr_gep_fu_46</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>i_3_i_phi_fu_99</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>i_fu_173</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>icmp_ln92_fu_106</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>icmp_ln94_fu_124</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>indvar_flatten_phi_fu_77</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>j_1_i_phi_fu_88</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>j_fu_118</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>select_ln95_1_fu_138</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>select_ln95_fu_130</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>tmp_3_fu_150</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>tmp_fu_179</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>zext_ln95_1_fu_186</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>zext_ln95_2_fu_190</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>zext_ln95_3_fu_158</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>zext_ln95_4_fu_168</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>zext_ln95_5_fu_199</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>zext_ln95_fu_146</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="50" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="51" tracking_level="0" version="0"> <first class_id="52" tracking_level="0" version="0"> <first>buf_2d_out</first> <second>0</second> </first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first> <first>col_outbuf_i</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>33</item> <item>33</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>9</count> <item_version>0</item_version> <item> <first>73</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>84</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>95</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>204</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>208</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>213</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>218</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>224</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>229</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>9</count> <item_version>0</item_version> <item> <first>add_ln92_reg_208</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>col_outbuf_i_addr_reg_224</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>i_3_i_reg_95</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>i_reg_229</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>icmp_ln92_reg_204</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>indvar_flatten_reg_73</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>j_1_i_reg_84</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>select_ln95_1_reg_218</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>select_ln95_reg_213</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>3</count> <item_version>0</item_version> <item> <first>73</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>84</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>95</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>3</count> <item_version>0</item_version> <item> <first>i_3_i_reg_95</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>indvar_flatten_reg_73</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>j_1_i_reg_84</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="53" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="54" tracking_level="0" version="0"> <first>buf_2d_out(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>store</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> </second> </item> <item> <first>col_outbuf_i(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>2</count> <item_version>0</item_version> <item>33</item> <item>33</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="55" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="56" tracking_level="0" version="0"> <first>1</first> <second>RAM</second> </item> <item> <first>2</first> <second>RAM</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
25.716662
93
0.58964
0e0acbc2d60e84f05b8d6aa6da9dd0dadef88440
10,622
ads
Ada
tools/scitools/conf/understand/ada/ada95/s-taspri.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
1
2020-01-20T21:26:46.000Z
2020-01-20T21:26:46.000Z
tools/scitools/conf/understand/ada/ada95/s-taspri.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/ada/ada95/s-taspri.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K _ P R I M I T I V E S -- -- -- -- S p e c -- -- -- -- $Revision: 2 $ -- -- -- -- Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU Library General Public License as published by the -- -- Free Software Foundation; either version 2, or (at your option) any -- -- later version. GNARL is distributed in the hope that it will be use- -- -- ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- -- -- eral Library Public License for more details. You should have received -- -- a copy of the GNU Library General Public License along with GNARL; see -- -- file COPYING.LIB. If not, write to the Free Software Foundation, 675 -- -- Mass Ave, Cambridge, MA 02139, USA. -- -- -- ------------------------------------------------------------------------------ with Interfaces.C; -- Used for Size_t; with Interfaces.C.Pthreads; -- Used for, size_t, -- pthread_mutex_t, -- pthread_cond_t, -- pthread_t with Interfaces.C.POSIX_RTE; -- Used for, Signal, -- siginfo_ptr, with System.Task_Clock; -- Used for, Stimespec with Unchecked_Conversion; pragma Elaborate_All (Interfaces.C.Pthreads); package System.Task_Primitives is -- Low level Task size and state definition type LL_Task_Procedure_Access is access procedure (Arg : System.Address); type Pre_Call_State is new System.Address; type Task_Storage_Size is new Interfaces.C.size_t; type Machine_Exceptions is new Interfaces.C.POSIX_RTE.Signal; type Error_Information is new Interfaces.C.POSIX_RTE.siginfo_ptr; -- type Lock is new Interfaces.C.Pthreads.pthread_mutex_t; -- type Condition_Variable is new Interfaces.C.Pthreads.pthread_cond_t; -- These definitions has to be private ??? type Lock is private; type Condition_Variable is private; -- The above types should both be limited. They are not due to a hack in -- ATCB allocation which allocates a block of the correct size and then -- assigns an initialized ATCB to it. This won't work with limited types. -- When allocation is done with new, these can become limited once again. -- ??? type Task_Control_Block is record LL_Entry_Point : LL_Task_Procedure_Access; LL_Arg : System.Address; Thread : Interfaces.C.Pthreads.pthread_t; Stack_Size : Task_Storage_Size; Stack_Limit : System.Address; end record; type TCB_Ptr is access all Task_Control_Block; -- Task ATCB related and variables. function Address_To_TCB_Ptr is new Unchecked_Conversion (System.Address, TCB_Ptr); procedure Initialize_LL_Tasks (T : TCB_Ptr); -- Initialize GNULLI. T points to the Task Control Block that should -- be initialized for use by the environment task. function Self return TCB_Ptr; -- Return a pointer to the Task Control Block of the calling task. procedure Initialize_Lock (Prio : System.Priority; L : in out Lock); -- Initialize a lock object. Prio is the ceiling priority associated -- with the lock. procedure Finalize_Lock (L : in out Lock); -- Finalize a lock object, freeing any resources allocated by the -- corresponding Initialize_Lock. procedure Write_Lock (L : in out Lock; Ceiling_Violation : out Boolean); -- Lock a lock object for write access to a critical section. After -- this operation returns, the calling task owns the lock, and -- no other Write_Lock or Read_Lock operation on the same object will -- return the owner executes an Unlock operation on the same object. procedure Read_Lock (L : in out Lock; Ceiling_Violation : out Boolean); -- Lock a lock object for read access to a critical section. After -- this operation returns, the calling task owns the lock, and -- no other Write_Lock operation on the same object will return until -- the owner(s) execute Unlock operation(s) on the same object. -- A Read_Lock to an owned lock object may return while the lock is -- still owned, though an implementation may also implement -- Read_Lock to have the same semantics. procedure Unlock (L : in out Lock); -- Unlock a locked lock object. The results are undefined if the -- calling task does not own the lock. Lock/Unlock operations must -- be nested, that is, the argument to Unlock must be the object -- most recently locked. procedure Initialize_Cond (Cond : in out Condition_Variable); -- Initialize a condition variable object. procedure Finalize_Cond (Cond : in out Condition_Variable); -- Finalize a condition variable object, recovering any resources -- allocated for it by Initialize_Cond. procedure Cond_Wait (Cond : in out Condition_Variable; L : in out Lock); -- Wait on a condition variable. The mutex object L is unlocked -- atomically, such that another task that is able to lock the mutex -- can be assured that the wait has actually commenced, and that -- a Cond_Signal operation will cause the waiting task to become -- eligible for execution once again. Before Cond_Wait returns, -- the waiting task will again lock the mutex. The waiting task may become -- eligible for execution at any time, but will become eligible for -- execution when a Cond_Signal operation is performed on the -- same condition variable object. The effect of more than one -- task waiting on the same condition variable is unspecified. procedure Cond_Timed_Wait (Cond : in out Condition_Variable; L : in out Lock; Abs_Time : System.Task_Clock.Stimespec; Timed_Out : out Boolean); -- Wait on a condition variable, as for Cond_Wait, above. In addition, -- the waiting task will become eligible for execution again -- when the absolute time specified by Timed_Out arrives. procedure Cond_Signal (Cond : in out Condition_Variable); -- Wake up a task waiting on the condition variable object specified -- by Cond, making it eligible for execution once again. procedure Set_Priority (T : TCB_Ptr; Prio : System.Priority); -- Set the priority of the task specified by T to P. procedure Set_Own_Priority (Prio : System.Priority); -- Set the priority of the calling task to P. function Get_Priority (T : TCB_Ptr) return System.Priority; -- Return the priority of the task specified by T. function Get_Own_Priority return System.Priority; -- Return the priority of the calling task. procedure Create_LL_Task (Priority : System.Priority; Stack_Size : Task_Storage_Size; LL_Entry_Point : LL_Task_Procedure_Access; Arg : System.Address; T : TCB_Ptr); -- Create a new low-level task with priority Priority. A new thread -- of control is created with a stack size of at least Stack_Size, -- and the procedure LL_Entry_Point is called with the argument Arg -- from this new thread of control. The Task Control Block pointed -- to by T is initialized to refer to this new task. procedure Exit_LL_Task; -- Exit a low-level task. The resources allocated for the task -- by Create_LL_Task are recovered. The task no longer executes, and -- the effects of further operations on task are unspecified. procedure Abort_Task (T : TCB_Ptr); -- Abort the task specified by T (the target task). This causes -- the target task to asynchronously execute the handler procedure -- installed by the target task using Install_Abort_Handler. The -- effect of this operation is unspecified if there is no abort -- handler procedure for the target task. procedure Test_Abort; -- ??? Obsolete? This is intended to allow implementation of -- abortion and ATC in the absence of an asynchronous Abort_Task, -- but I think that we decided that GNARL can handle this on -- its own by making sure that there is an Undefer_Abortion at -- every abortion synchronization point. type Abort_Handler_Pointer is access procedure (Context : Pre_Call_State); procedure Install_Abort_Handler (Handler : Abort_Handler_Pointer); -- Install an abort handler procedure. This procedure is called -- asynchronously by the calling task whenever a call to Abort_Task -- specifies the calling task as the target. If the abort handler -- procedure is asynchronously executed during a GNULLI operation -- and then calls some other GNULLI operation, the effect is unspecified. procedure Install_Error_Handler (Handler : System.Address); -- Install an error handler for the calling task. The handler will -- be called synchronously if an error is encountered during the -- execution of the calling task. procedure LL_Assert (B : Boolean; M : String); -- If B is False, print the string M to the console and halt the -- program. Task_Wrapper_Frame : constant Integer := 72; -- This is the size of the frame for the Pthread_Wrapper procedure. type Proc is access procedure (Addr : System.Address); procedure Test_And_Set (Flag_Add : System.Address; Result : out Boolean); -- Flag_Add is the address of a variable of type Boolean private type Lock is new Interfaces.C.Pthreads.pthread_mutex_t; -- type Condition_Variable is new Interfaces.C.Pthreads.pthread_cond_t; type Condition_Variable is record CV : Interfaces.C.Pthreads.pthread_cond_t; Someone_Is_Waiting : Boolean; end record; end System.Task_Primitives;
45.393162
78
0.651949
0e1b216240f7c061db096c8290caeeb7fe425dbd
5,029
adb
Ada
tests/syntax_examples/src/basic_subprogram_calls.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
1
2022-03-08T13:00:47.000Z
2022-03-08T13:00:47.000Z
src/tools/Dependency_Graph_Extractor/tests/Syntax_Examples/src/basic_subprogram_calls.adb
selroc/Renaissance-Ada
39230b34aced4a9d83831be346ca103136c53715
[ "BSD-3-Clause" ]
null
null
null
src/tools/Dependency_Graph_Extractor/tests/Syntax_Examples/src/basic_subprogram_calls.adb
selroc/Renaissance-Ada
39230b34aced4a9d83831be346ca103136c53715
[ "BSD-3-Clause" ]
null
null
null
with Basic_Subprogram_Calls.Child; with Other_Basic_Subprogram_Calls; with Subprogram_Unit; with Subprogram_Unit_2; package body Basic_Subprogram_Calls is function F7 return Integer; function F8 return Integer is begin return 42; end F8; function F9 return Integer; function F9 return Integer is begin return 42; end F9; function F12 return Integer is separate; procedure P4 is separate; function F13(I : Integer) return Integer renames F2; function F14 return Integer renames F12; procedure P5(I : Integer := F14) renames P3; procedure P6 renames P4; procedure Test is I : Integer := F10; begin I := F1; I := F2(42); I := F3; I := F3(42); I := F4; I := F5(42); I := F6; I := F6(42); I := F7; I := F8; I := F9; declare J : Integer; begin J := F1; end; Label: declare J : Integer; begin J := F2(F12); end Label; P1; P2(42); P3; P3(F11); P4; end Test; function F1 return Integer is begin return 42; end F1; function F2(I : Integer) return Integer is begin return I; end F2; function F3(I : Integer := 42) return Integer is begin return I; end F3; function F7 return Integer is begin return 42; end F7; procedure P1 is begin null; end P1; procedure P2(I : Integer) is begin null; end P2; procedure P3(I : Integer := F1) is J : Integer; begin J := F13(I); J := F14; P5; P5(J); P6; J := Nested.Nested_F1; Nested.Nested_P1; declare use Nested; begin J := Nested.Nested_F1; Nested.Nested_P1; end; P7; P8; J := Child.Child_F1; Child.Child_P1; J := Other_Basic_Subprogram_Calls.Other_F1; Other_Basic_Subprogram_Calls.Other_P1; declare use Child; use Other_Basic_Subprogram_Calls; begin J := Child_F1; Child_P1; J := Other_F1; Other_P1; end; end P3; package body Nested is function Nested_F1 return Integer is begin return 42; end Nested_F1; procedure Nested_P1 is I : Integer := 42; S : String := I'Image; F : access function return Integer := Other_Basic_Subprogram_Calls.Other_F1'Access; P : access procedure := Other_Basic_Subprogram_Calls.Other_P1'Access; begin P := Nested_P1'Access; P := Nested_P1'Access; P := P1'Access; P := P7'Access; F := F1'Access; F := F4'Access; F := F14'Access; F := F12'Access; end Nested_P1; end Nested; package Nested_Renamed renames Nested; procedure P8 is null; function F_Overload(I: Integer) return Integer is begin return I; end F_Overload; function F_Overload(B: Boolean) return Integer is begin return 42; end F_Overload; function F_Overload(I: Integer) return Boolean is begin return True; end F_Overload; procedure P_Overload(I : Integer) is begin null; end P_Overload; procedure P_Overload(B : in out Boolean) is I : Integer; begin B := F_Overload(42); I := F_Overload(B); I := F_Overload(I); P_Overload(B); P_Overload(I); Nested_Renamed.Nested_P1; I := Nested_Renamed.Nested_F1; end P_Overload; procedure Test3 is A : array (1 .. 5) of Integer; type PAT is array (Integer range <>) of access procedure; function F1 return access PAT is begin return new PAT(1 .. 5); end F1; function F2(I : Integer) return access PAT is begin return new PAT(1 .. I); end F2; begin A(3) := 42; F1(2) := Other_Basic_Subprogram_Calls.Other_P1'Access; F2(42)(2) := Other_Basic_Subprogram_Calls.Other_P1'Access; F2(42)(2) := F1(3); A(2) := A(3); end Test3; function F_Internal return Integer is separate; procedure Test4 is Exception_Declaration_Name : exception; begin Statement_Identifier_Name: begin Test3; exception when Choice_Parameter_Specification_Name: Exception_Declaration_Name => raise; end Statement_Identifier_Name; <<Label_Statement_Identifier_Name>> Test3; end Test4; X : aliased Integer := F9; Y : array (1 .. 5) of access Integer; procedure AnonSubp(F : access function(X, Y: Integer) return Integer) is null; function AnonReturn return access Integer is begin return X'Access; end AnonReturn; begin Subprogram_Unit; Subprogram_Unit_2; end Basic_Subprogram_Calls;
20.035857
92
0.566315
0ec89c2f3ab5440370b76fbc543a8f3a9c354e99
1,705
adb
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/renaming2.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/renaming2.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/renaming2.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-do run } -- { dg-options "-gnatws" } with Text_IO; procedure renaming2 is type RealNodeData; type RefRealNodeData is access RealNodeData; type ExpressionEntry; type RefExpression is access ExpressionEntry; type RefDefUseEntry is access Natural; type ExpressionEntry is record Number : RefDefUseEntry; Id : Integer; end record; type RealNodeData is record Node : RefExpression; Id : Integer; end record; for ExpressionEntry use record Number at 0 range 0 .. 63; Id at 8 range 0 .. 31; end record ; for RealNodeData use record Node at 0 range 0 .. 63; Id at 8 range 0 .. 31; end record ; U_Node : RefDefUseEntry := new Natural'(1); E_Node : RefExpression := new ExpressionEntry'(Number => U_Node, Id => 2); R_Node : RefRealNodeData := new RealNodeData'(Node => E_Node, Id => 3); procedure test_routine (NodeRealData : RefRealNodeData) is OldHead : RefDefUseEntry renames NodeRealData.all.Node.all.Number; OldHead1 : constant RefDefUseEntry := OldHead; begin NodeRealData.all.Node := new ExpressionEntry'(Number => null, Id => 4); declare OldHead2 : constant RefDefUseEntry := OldHead; begin if OldHead1 /= OldHead2 then Text_IO.Put_Line (" OldHead changed !!!"); end if; end; end; begin test_routine (R_Node); end;
27.5
77
0.538416
d0de16d09775570eac2d7a01842fd65d53acf8ad
99
ada
Ada
Hello World Programs/Ada/helloworld.ada
samlaubscher/HacktoberFest2020-Contributions
b86e06bd93d68e703e8a9d8415db0a8d63c75c4b
[ "MIT" ]
256
2020-09-30T19:31:34.000Z
2021-11-20T18:09:15.000Z
Hello World Programs/Ada/helloworld.ada
samlaubscher/HacktoberFest2020-Contributions
b86e06bd93d68e703e8a9d8415db0a8d63c75c4b
[ "MIT" ]
293
2020-09-30T19:14:54.000Z
2021-06-06T02:34:47.000Z
Hello World Programs/Ada/helloworld.ada
samlaubscher/HacktoberFest2020-Contributions
b86e06bd93d68e703e8a9d8415db0a8d63c75c4b
[ "MIT" ]
1,620
2020-09-30T18:37:44.000Z
2022-03-03T20:54:22.000Z
with Text_IO; procedure Hello_World is begin Text_IO.Put_Line("Hello World!"); end Hello_World;
14.142857
35
0.777778
0ec1ca94a8c34dfd16c5492ff24c13bf3c341617
11,848
adb
Ada
llvm-gcc-4.2-2.9/gcc/ada/a-calend-mingw.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/a-calend-mingw.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/a-calend-mingw.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . C A L E N D A R -- -- -- -- B o d y -- -- -- -- Copyright (C) 1997-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the Windows NT/95 version -- Why do we need separate version ??? -- Do we need *this* much code duplication??? with System.OS_Primitives; -- used for Clock with System.OS_Interface; package body Ada.Calendar is use System.OS_Interface; ------------------------------ -- Use of Pragma Unsuppress -- ------------------------------ -- This implementation of Calendar takes advantage of the permission in -- Ada 95 of using arithmetic overflow checks to check for out of bounds -- time values. This means that we must catch the constraint error that -- results from arithmetic overflow, so we use pragma Unsuppress to make -- sure that overflow is enabled, using software overflow checking if -- necessary. That way, compiling Calendar with options to suppress this -- checking will not affect its correctness. ------------------------ -- Local Declarations -- ------------------------ Ada_Year_Min : constant := 1901; Ada_Year_Max : constant := 2099; -- Win32 time constants epoch_1970 : constant := 16#19D_B1DE_D53E_8000#; -- win32 UTC epoch system_time_ns : constant := 100; -- 100 ns per tick Sec_Unit : constant := 10#1#E9; --------- -- "+" -- --------- function "+" (Left : Time; Right : Duration) return Time is pragma Unsuppress (Overflow_Check); begin return (Left + Time (Right)); exception when Constraint_Error => raise Time_Error; end "+"; function "+" (Left : Duration; Right : Time) return Time is pragma Unsuppress (Overflow_Check); begin return (Time (Left) + Right); exception when Constraint_Error => raise Time_Error; end "+"; --------- -- "-" -- --------- function "-" (Left : Time; Right : Duration) return Time is pragma Unsuppress (Overflow_Check); begin return Left - Time (Right); exception when Constraint_Error => raise Time_Error; end "-"; function "-" (Left : Time; Right : Time) return Duration is pragma Unsuppress (Overflow_Check); begin return Duration (Left) - Duration (Right); exception when Constraint_Error => raise Time_Error; end "-"; --------- -- "<" -- --------- function "<" (Left, Right : Time) return Boolean is begin return Duration (Left) < Duration (Right); end "<"; ---------- -- "<=" -- ---------- function "<=" (Left, Right : Time) return Boolean is begin return Duration (Left) <= Duration (Right); end "<="; --------- -- ">" -- --------- function ">" (Left, Right : Time) return Boolean is begin return Duration (Left) > Duration (Right); end ">"; ---------- -- ">=" -- ---------- function ">=" (Left, Right : Time) return Boolean is begin return Duration (Left) >= Duration (Right); end ">="; ----------- -- Clock -- ----------- -- The Ada.Calendar.Clock function gets the time from the soft links -- interface which will call the appropriate function depending wether -- tasking is involved or not. function Clock return Time is begin return Time (System.OS_Primitives.Clock); end Clock; --------- -- Day -- --------- function Day (Date : Time) return Day_Number is DY : Year_Number; DM : Month_Number; DD : Day_Number; DS : Day_Duration; begin Split (Date, DY, DM, DD, DS); return DD; end Day; ----------- -- Month -- ----------- function Month (Date : Time) return Month_Number is DY : Year_Number; DM : Month_Number; DD : Day_Number; DS : Day_Duration; begin Split (Date, DY, DM, DD, DS); return DM; end Month; ------------- -- Seconds -- ------------- function Seconds (Date : Time) return Day_Duration is DY : Year_Number; DM : Month_Number; DD : Day_Number; DS : Day_Duration; begin Split (Date, DY, DM, DD, DS); return DS; end Seconds; ----------- -- Split -- ----------- procedure Split (Date : Time; Year : out Year_Number; Month : out Month_Number; Day : out Day_Number; Seconds : out Day_Duration) is Date_Int : aliased Long_Long_Integer; Date_Loc : aliased Long_Long_Integer; Timbuf : aliased SYSTEMTIME; Int_Date : Long_Long_Integer; Sub_Seconds : Duration; begin -- We take the sub-seconds (decimal part) of Date and this is added -- to compute the Seconds. This way we keep the precision of the -- high-precision clock that was lost with the Win32 API calls -- below. if Date < 0.0 then -- this is a Date before Epoch (January 1st, 1970) Sub_Seconds := Duration (Date) - Duration (Long_Long_Integer (Date + Duration'(0.5))); Int_Date := Long_Long_Integer (Date - Sub_Seconds); -- For Date = -86400.1 we are 2 days before Epoch at 0.1 seconds -- from day 1 before Epoch. It means that it is 23h 59m 59.9s. -- here we adjust for that. if Sub_Seconds < 0.0 then Int_Date := Int_Date - 1; Sub_Seconds := 1.0 + Sub_Seconds; end if; else -- this is a Date after Epoch (January 1st, 1970) Sub_Seconds := Duration (Date) - Duration (Long_Long_Integer (Date - Duration'(0.5))); Int_Date := Long_Long_Integer (Date - Sub_Seconds); end if; -- Date_Int is the number of seconds from Epoch Date_Int := Long_Long_Integer (Int_Date * Sec_Unit / system_time_ns) + epoch_1970; if not FileTimeToLocalFileTime (Date_Int'Access, Date_Loc'Access) then raise Time_Error; end if; if not FileTimeToSystemTime (Date_Loc'Access, Timbuf'Access) then raise Time_Error; end if; if Timbuf.wYear not in Ada_Year_Min .. Ada_Year_Max then raise Time_Error; end if; Seconds := Duration (Timbuf.wHour) * 3_600.0 + Duration (Timbuf.wMinute) * 60.0 + Duration (Timbuf.wSecond) + Sub_Seconds; Day := Integer (Timbuf.wDay); Month := Integer (Timbuf.wMonth); Year := Integer (Timbuf.wYear); end Split; ------------- -- Time_Of -- ------------- function Time_Of (Year : Year_Number; Month : Month_Number; Day : Day_Number; Seconds : Day_Duration := 0.0) return Time is Timbuf : aliased SYSTEMTIME; Now : aliased Long_Long_Integer; Loc : aliased Long_Long_Integer; Int_Secs : Integer; Secs : Integer; Add_One_Day : Boolean := False; Date : Time; begin -- The following checks are redundant with respect to the constraint -- error checks that should normally be made on parameters, but we -- decide to raise Constraint_Error in any case if bad values come -- in (as a result of checks being off in the caller, or for other -- erroneous or bounded error cases). if not Year 'Valid or else not Month 'Valid or else not Day 'Valid or else not Seconds'Valid then raise Constraint_Error; end if; if Seconds = 0.0 then Int_Secs := 0; else Int_Secs := Integer (Seconds - 0.5); end if; -- Timbuf.wMillisec is to keep the msec. We can't use that because the -- high-resolution clock has a precision of 1 Microsecond. -- Anyway the sub-seconds part is not needed to compute the number -- of seconds in UTC. if Int_Secs = 86_400 then Secs := 0; Add_One_Day := True; else Secs := Int_Secs; end if; Timbuf.wMilliseconds := 0; Timbuf.wSecond := WORD (Secs mod 60); Timbuf.wMinute := WORD ((Secs / 60) mod 60); Timbuf.wHour := WORD (Secs / 3600); Timbuf.wDay := WORD (Day); Timbuf.wMonth := WORD (Month); Timbuf.wYear := WORD (Year); if not SystemTimeToFileTime (Timbuf'Access, Loc'Access) then raise Time_Error; end if; if not LocalFileTimeToFileTime (Loc'Access, Now'Access) then raise Time_Error; end if; -- Here we have the UTC now translate UTC to Epoch time (UNIX style -- time based on 1 january 1970) and add there the sub-seconds part. declare Sub_Sec : constant Duration := Seconds - Duration (Int_Secs); begin Date := Time ((Now - epoch_1970) * system_time_ns / Sec_Unit) + Sub_Sec; end; if Add_One_Day then Date := Date + Duration (86400.0); end if; return Date; end Time_Of; ---------- -- Year -- ---------- function Year (Date : Time) return Year_Number is DY : Year_Number; DM : Month_Number; DD : Day_Number; DS : Day_Duration; begin Split (Date, DY, DM, DD, DS); return DY; end Year; begin System.OS_Primitives.Initialize; end Ada.Calendar;
29.768844
78
0.529034
18e589979dfa5831813c2db3967b0859b6bb180b
1,810
ads
Ada
orka_plugin_atmosphere/src/orka-features-atmosphere-earth.ads
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
52
2016-07-30T23:00:28.000Z
2022-02-05T11:54:55.000Z
orka_plugin_atmosphere/src/orka-features-atmosphere-earth.ads
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
79
2016-08-01T18:36:48.000Z
2022-02-27T12:14:20.000Z
orka_plugin_atmosphere/src/orka-features-atmosphere-earth.ads
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
4
2018-04-28T22:36:26.000Z
2020-11-14T23:00:29.000Z
-- SPDX-License-Identifier: BSD-3-Clause -- -- Copyright (c) 2017 Eric Bruneton -- 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, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- 3. Neither the name of the copyright holders nor the names of its -- contributors may be used to endorse or promote products derived from -- this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -- THE POSSIBILITY OF SUCH DAMAGE. package Orka.Features.Atmosphere.Earth is pragma Preelaborate; function Data (Luminance : Luminance_Type) return Model_Data; end Orka.Features.Atmosphere.Earth;
50.277778
79
0.761878
d0d6683d74efd650723e12ac5dffa2eebad210ff
874
adb
Ada
gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
1
2020-10-14T03:24:35.000Z
2020-10-14T03:24:35.000Z
gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
null
null
null
gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
null
null
null
-- Copyright 2014-2021 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. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. with Pck; use Pck; procedure Foo is A1 : Packed_Array := Make (1, 2); A2 : Packed_Array renames A1; begin Do_Nothing (A2'Address); -- STOP end Foo;
34.96
73
0.723112
dc48238880629589ecdc635b43f697d2ccbee6d1
1,106
ads
Ada
tests/ships-test_data-tests-modules_container-test_data.ads
thindil/steamsky
d5d7fea622f7994c91017c4cd7ba5e188153556c
[ "TCL", "MIT" ]
80
2017-04-08T23:14:07.000Z
2022-02-10T22:30:51.000Z
tests/ships-test_data-tests-modules_container-test_data.ads
thindil/steamsky
d5d7fea622f7994c91017c4cd7ba5e188153556c
[ "TCL", "MIT" ]
89
2017-06-24T08:18:26.000Z
2021-11-12T04:37:36.000Z
tests/ships-test_data-tests-modules_container-test_data.ads
thindil/steamsky
d5d7fea622f7994c91017c4cd7ba5e188153556c
[ "TCL", "MIT" ]
9
2018-04-14T16:37:25.000Z
2020-03-21T14:33:49.000Z
-- 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.Containers.Vectors.Test_Data; with Ada.Containers.Vectors.Test_Data.Tests; package Ships.Test_Data.Tests.Modules_Container.Test_Data is -- begin read only type Test is new AUnit.Test_Fixtures.Test_Fixture -- end read only with null record; procedure Set_Up(Gnattest_T: in out Test); procedure Tear_Down(Gnattest_T: in out Test); -- begin read only package Gnattest_Data_Inst is new GNATtest_Generated.GNATtest_Standard.Ships .Modules_Container .Test_Data (Test); package Gnattest_Tests_Inst is new Gnattest_Data_Inst.Tests; type New_Test is new Gnattest_Tests_Inst.Test with null record; -- end read only procedure User_Set_Up(Gnattest_T: in out New_Test); procedure User_Tear_Down(Gnattest_T: in out New_Test); end Ships.Test_Data.Tests.Modules_Container.Test_Data;
33.515152
79
0.77396
c5cb54279032559b865be27ea6c17c7dc1506205
9,096
adb
Ada
3-mid/opengl/private/gl/applet/test/linkage/launch_gl_linkage_test.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
20
2015-11-04T09:23:59.000Z
2022-01-14T10:21:42.000Z
3-mid/opengl/private/gl/applet/test/linkage/launch_gl_linkage_test.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
2
2015-11-04T17:05:56.000Z
2015-12-08T03:16:13.000Z
3-mid/opengl/private/gl/applet/test/linkage/launch_gl_linkage_test.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
with GL.safe, GL.lean, GL.desk, interfaces.C, System; procedure launch_GL_linkage_Test -- -- This test is only intended to check that all GL functions link correctly. -- It is not meant to be run. -- -- todo: Add missing calls for each profile. is use GL; begin -- Make a call to each core function -- declare Result : GLenum; Status : GLboolean; begin glActiveTexture (0); glBindTexture (0, 0); glBlendFunc (0, 0); glClear (0); glClearColor (0.0, 0.0, 0.0, 0.0); glClearDepthf (0.0); glClearStencil (0); glColorMask (0, 0, 0, 0); glCullFace (0); glDepthFunc (0); glDepthMask (0); glDepthRangef (0.0, 0.0); glDisable (0); glDrawArrays (0, 0, 0); glEnable (0); glFinish; glFlush; glFrontFace (0); Result := glGetError; glHint (0, 0); Status := glIsEnabled (0); glLineWidth (0.0); glPixelStorei (0, 0); glPolygonOffset (0.0, 0.0); glScissor (0, 0, 0, 0); glStencilFunc (0, 0, 0); glStencilMask (0); glStencilOp (0, 0, 0); glTexParameteri (0, 0, 0); glViewport (0, 0, 0, 0); end; -- Make a call to each 'Safe' function -- declare use safe; Result : access GLubyte; begin Result := glGetString (0); glDrawElements (0, 0, 0, null); glGenTextures (0, null); glGetBooleanv (0, null); glGetFloatv (0, null); glGetIntegerv (0, null); glGetTexParameteriv (0, 0, null); glReadPixels (0, 0, 0, 0, 0, 0, null); glTexImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); glTexSubImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); end; -- Make a call to each 'Lean' function -- declare use lean, System; a_GLenum : GLenum; a_GLuint : GLuint; a_GLboolean : GLboolean; a_C_int : interfaces.C.int; GLubyte_access : access GLubyte; begin glAttachShader (0, 0); glBindAttribLocation (0, 0, null); glBindBuffer (0, 0); glBindFramebuffer (0, 0); glBindRenderbuffer (0, 0); glBlendColor (0.0, 0.0, 0.0, 0.0); glBlendEquation (0); glBlendEquationSeparate (0, 0); glBlendFuncSeparate (0, 0, 0, 0); glBufferData (0, 0, null, 0); glBufferSubData (0, 0, 0, null); a_GLenum := glCheckFramebufferStatus (0); glCompileShader (0); glCompressedTexImage2D (0, 0, 0, 0, 0, 0, 0, null); glCompressedTexSubImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); glCopyTexImage2D (0, 0, 0, 0, 0, 0, 0, 0); glCopyTexSubImage2D (0, 0, 0, 0, 0, 0, 0, 0); a_GLuint := glCreateProgram; a_GLuint := glCreateShader (0); glDeleteBuffers (0, null); glDeleteFramebuffers (0, null); glDeleteProgram (0); glDeleteRenderbuffers (0, null); glDeleteShader (0); glDeleteTextures (0, null); glDetachShader (0, 0); glDisableVertexAttribArray(0); glDrawElements (0, 0, 0, null); glEnableVertexAttribArray (0); glFramebufferRenderbuffer (0, 0, 0, 0); glFramebufferTexture2D (0, 0, 0, 0, 0); glGenBuffers (0, null); glGenFramebuffers (0, null); glGenRenderbuffers (0, null); glGenTextures (0, null); glGenerateMipmap (0); glGetActiveAttrib (0, 0, 0, null, null, null, null); glGetActiveUniform (0, 0, 0, null, null, null, null); glGetAttachedShaders (0, 0, null, null); a_C_int := glGetAttribLocation (0, null); glGetBooleanv (0, null); glGetBufferParameteriv (0, 0, null); glGetFloatv (0, null); glGetFramebufferAttachmentParameteriv (0, 0, 0, null); glGetIntegerv (0, null); glGetProgramiv (0, 0, null); glGetProgramInfoLog (0, 0, null, null); glGetRenderbufferParameteriv (0, 0, null); glGetShaderiv (0, 0, null); glGetShaderInfoLog (0, 0, null, null); glGetShaderPrecisionFormat(0, 0, null, null); glGetShaderSource (0, 0, null, null); GLubyte_access := glGetString(0); glGetTexParameterfv (0, 0, null_Address); glGetTexParameteriv (0, 0, null); glGetUniformfv (0, 0, null_Address); glGetUniformiv (0, 0, null); a_C_int := glGetUniformLocation (0, null); glGetVertexAttribfv (0, 0, null_Address); glGetVertexAttribiv (0, 0, null); glGetVertexAttribPointerv (0, 0, null); a_GLboolean := glIsBuffer (0); a_GLboolean := glIsFramebuffer (0); a_GLboolean := glIsProgram (0); a_GLboolean := glIsRenderbuffer(0); a_GLboolean := glIsShader (0); a_GLboolean := glIsTexture (0); glLinkProgram (0); glReadPixels (0, 0, 0, 0, 0, 0, null); glReleaseShaderCompiler; glRenderbufferStorage (0, 0, 0, 0); glSampleCoverage (0.0, 0); glShaderBinary (0, null, 0, null, 0); glShaderSource (0, 0, null, null); glStencilFuncSeparate (0, 0, 0, 0); glStencilMaskSeparate (0, 0); glStencilOpSeparate (0, 0, 0, 0); glTexImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); glTexParameterf (0, 0, 0.0); glTexParameterfv (0, 0, null_Address); glTexParameteriv (0, 0, null); glTexSubImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); glUniform1f (0, 0.0); glUniform1fv (0, 0, null_Address); glUniform1i (0, 0); glUniform1iv (0, 0, null); glUniform2f (0, 0.0, 0.0); glUniform2fv (0, 0, null_Address); glUniform2i (0, 0, 0); glUniform2iv (0, 0, null); glUniform3f (0, 0.0, 0.0, 0.0); glUniform3fv (0, 0, null_Address); glUniform3i (0, 0, 0, 0); glUniform3iv (0, 0, null); glUniform4f (0, 0.0, 0.0, 0.0, 0.0); glUniform4fv (0, 0, null_Address); glUniform4i (0, 0, 0, 0, 0); glUniform4iv (0, 0, null); glUniformMatrix2fv (0, 0, 0, null_Address); glUniformMatrix3fv (0, 0, 0, null_Address); glUniformMatrix4fv (0, 0, 0, null_Address); glUseProgram (0); glValidateProgram (0); glVertexAttrib1f (0, 0.0); glVertexAttrib1fv (0, null_Address); glVertexAttrib2f (0, 0.0, 0.0); glVertexAttrib2fv (0, null_Address); glVertexAttrib3f (0, 0.0, 0.0, 0.0); glVertexAttrib3fv (0, null_Address); glVertexAttrib4f (0, 0.0, 0.0, 0.0, 0.0); glVertexAttrib4fv (0, null_Address); glVertexAttribPointer (0, 0, 0, 0, 0, null); end; -- Make a call to each 'desk' function -- declare use desk; a_GLboolean : GLboolean; begin glActiveTexture (0); glBindTexture (0, 0); glBlendColor (0.0, 0.0, 0.0, 0.0); glBlendEquation (0); glBlendEquationSeparate (0, 0); glBlendFunc (0, 0); glClearStencil (0); glClearDepth (0.0); glColorMask (0, 0, 0, 0); glCompressedTexImage2D (0, 0, 0, 0, 0, 0, 0, null); glCompressedTexSubImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); glCopyTexImage2D (0, 0, 0, 0, 0, 0, 0, 0); glCopyTexSubImage2D (0, 0, 0, 0, 0, 0, 0, 0); glDeleteTextures (0, null); glDepthMask (0); glDisable (0); glDrawArrays (0, 0, 0); glGetBooleanv (0, null); glGetFloatv (0, null); glGetIntegerv (0, null); glGetTexParameterfv (0, 0, null); glGetTexParameteriv (0, 0, null); a_GLboolean := glIsTexture(0); glLineWidth (0.0); glPixelStorei (0, 0); glPolygonOffset (0.0, 0.0); glReadPixels (0, 0, 0, 0, 0, 0, null); glSampleCoverage (0.0, 0); glStencilMask (0); glStencilOp (0, 0, 0); glTexImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); glTexParameterf (0, 0, 0.0); glTexParameterfv (0, 0, null); glTexParameteri (0, 0, 0); glTexParameteriv (0, 0, null); glTexSubImage2D (0, 0, 0, 0, 0, 0, 0, 0, null); end; end launch_GL_linkage_Test;
36.825911
77
0.501099
d0b3722371a248d3c7aed8e7873d442c3caabe0b
2,251
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b03a.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b03a.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b03a.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- C87B03A.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. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT OVERLOADING RESOLUTION USES THE RULE THAT: -- -- THE EXPRESSION IN A NUMBER DECLARATION MUST BE EITHER OF THE TYPE -- UNIVERSAL_INTEGER OR UNIVERSAL_REAL. -- TRH 16 JUNE 82 WITH REPORT; USE REPORT; PROCEDURE C87B03A IS BEGIN TEST ("C87B03A","OVERLOADED EXPRESSIONS IN NUMBER DECLARATIONS"); DECLARE FUNCTION "+" (X, Y : INTEGER) RETURN INTEGER RENAMES STANDARD."-"; FUNCTION "+" (X, Y : FLOAT) RETURN FLOAT RENAMES STANDARD."-"; I1 : CONSTANT := 1 + 1; I2 : CONSTANT INTEGER := 1 + 1; R1 : CONSTANT := 1.0 + 1.0; R2 : CONSTANT FLOAT := 1.0 + 1.0; BEGIN IF I1 /= 2 OR I2 /= 0 OR R1 /= 2.0 OR R2 /= 0.0 THEN FAILED ("OVERLOADED EXPRESSIONS IN NUMBER DECLARATIONS" & " RESOLVED INCORRECTLY"); END IF; END; RESULT; END C87B03A;
36.306452
79
0.60773
4a6f522f9bb7dea5f65eebf0ad5f4622613f3d97
1,992
adb
Ada
src/keystore-passwords-unsafe.adb
My-Colaborations/ada-keystore
6ab222c2df81f32309c5a7b4f94a475214ef5ce3
[ "Apache-2.0" ]
25
2019-05-07T20:35:50.000Z
2021-11-30T10:35:47.000Z
src/keystore-passwords-unsafe.adb
My-Colaborations/ada-keystore
6ab222c2df81f32309c5a7b4f94a475214ef5ce3
[ "Apache-2.0" ]
12
2019-12-16T23:30:00.000Z
2021-09-26T18:52:41.000Z
src/keystore-passwords-unsafe.adb
My-Colaborations/ada-keystore
6ab222c2df81f32309c5a7b4f94a475214ef5ce3
[ "Apache-2.0" ]
3
2019-12-18T21:30:04.000Z
2021-01-06T08:30:36.000Z
----------------------------------------------------------------------- -- keystore-passwords-unsafe -- Unsafe password provider -- 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 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body Keystore.Passwords.Unsafe is type Provider (Len : Natural) is limited new Keystore.Passwords.Provider with record Password : String (1 .. Len); end record; -- Get the password through the Getter operation. overriding procedure Get_Password (From : in Provider; Getter : not null access procedure (Password : in Secret_Key)); -- ------------------------------ -- Create a unsafe command line base password provider. -- ------------------------------ function Create (Password : in String) return Provider_Access is begin return new Provider '(Len => Password'Length, Password => Password); end Create; -- ------------------------------ -- Get the password through the Getter operation. -- ------------------------------ overriding procedure Get_Password (From : in Provider; Getter : not null access procedure (Password : in Secret_Key)) is begin Getter (Keystore.Create (From.Password)); end Get_Password; end Keystore.Passwords.Unsafe;
40.653061
92
0.587851
cb6da6e543b73853280e0f0c7b5835f96a4435a4
2,357
ads
Ada
software/libsparklemma/src/spark-mod64_arithmetic_lemmas.ads
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
12
2017-06-08T14:19:57.000Z
2022-03-09T02:48:59.000Z
software/libsparklemma/src/spark-mod64_arithmetic_lemmas.ads
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
6
2017-06-08T13:13:50.000Z
2020-05-15T09:32:43.000Z
software/libsparklemma/src/spark-mod64_arithmetic_lemmas.ads
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
3
2017-06-30T14:05:06.000Z
2022-02-17T12:20:45.000Z
------------------------------------------------------------------------------ -- -- -- SPARK LIBRARY COMPONENTS -- -- -- -- S P A R K . M O D 6 4 _ A R I T H M E T I C _ L E M M A S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2016, AdaCore -- -- -- -- SPARK is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. SPARK is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- ------------------------------------------------------------------------------ pragma SPARK_Mode; with SPARK.Mod_Arithmetic_Lemmas; pragma Elaborate_All (SPARK.Mod_Arithmetic_Lemmas); with Interfaces; package SPARK.Mod64_Arithmetic_Lemmas is new SPARK.Mod_Arithmetic_Lemmas (Interfaces.Unsigned_64);
67.342857
78
0.397115
4a1d2dff12f366c95966b04ab5fb4772918b0bbd
1,504
ads
Ada
sources/flac.ads
HeisenbugLtd/flac-ada
54ee813e05ec91207cbf3dcb3a36449ecb48db5d
[ "WTFPL" ]
5
2020-07-05T18:45:12.000Z
2020-12-18T22:58:55.000Z
sources/flac.ads
HeisenbugLtd/flac-ada
54ee813e05ec91207cbf3dcb3a36449ecb48db5d
[ "WTFPL" ]
null
null
null
sources/flac.ads
HeisenbugLtd/flac-ada
54ee813e05ec91207cbf3dcb3a36449ecb48db5d
[ "WTFPL" ]
null
null
null
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. (gh+flacada@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 Hocevar. See the LICENSE file for more details. ------------------------------------------------------------------------------ pragma License (Unrestricted); ------------------------------------------------------------------------------ -- FLAC/Ada root package ------------------------------------------------------------------------------ package Flac with Pure => True, SPARK_Mode => On is type Main_Error_Type is (None, Open_Error, Not_A_Flac_File); -- General kind of error. type Sub_Error_Type is (None, -- No error. Header_Not_Found, -- No valid flac header Corrupt_Meta_Data, -- Unexpected length of meta data Invalid_Meta_Data, -- Meta data does not pan out Corrupt_Stream_Info, -- Expected stream info block not found Invalid_Stream_Info -- Stream info block does not pan out ); -- More specific error (if applicable). type Error_Type is record Main : Main_Error_Type; Sub : Sub_Error_Type; end record; No_Error : constant Error_Type := Error_Type'(Main => None, Sub => None); end Flac;
36.682927
78
0.50133
4ab0513e112f0fb70ee7435d9798e686fb800faf
638
ads
Ada
src/Command_Line/project_processor-configuration.ads
fintatarta/eugen
2c384838ff0e81b51172310ce5d0e47d71ffd4fd
[ "MIT" ]
null
null
null
src/Command_Line/project_processor-configuration.ads
fintatarta/eugen
2c384838ff0e81b51172310ce5d0e47d71ffd4fd
[ "MIT" ]
null
null
null
src/Command_Line/project_processor-configuration.ads
fintatarta/eugen
2c384838ff0e81b51172310ce5d0e47d71ffd4fd
[ "MIT" ]
null
null
null
with Project_Processor.Processors; with Project_Processor.Parsers; package Project_Processor.Configuration is procedure Initialize; type Processing_Call is record Name : Processors.Processor_ID; Parameters : Processors.Processor_Parameter_Access; end record; procedure For_All_Calls (Callback : not null access procedure (Call : Processing_Call)); function Input_Data return String; function Input_Format return Parsers.Parser_ID; function Parser_Parameters return Parsers.Parser_Parameter_Access; Bad_Command_Line : exception; end Project_Processor.Configuration;
26.583333
73
0.763323
18320ef19d3beaa401c6a3bca812bf7a1d5855bf
6,179
adb
Ada
src/ncurses-5.5/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
erwinchang/minicom
3fe2ba7d8e8475c199b493a2b99cd3c690f6ea4f
[ "MIT" ]
null
null
null
src/ncurses-5.5/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
erwinchang/minicom
3fe2ba7d8e8475c199b493a2b99cd3c690f6ea4f
[ "MIT" ]
null
null
null
src/ncurses-5.5/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
erwinchang/minicom
3fe2ba7d8e8475c199b493a2b99cd3c690f6ea4f
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.User -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998,2004 Free Software Foundation, Inc. -- -- -- -- 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, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: -- $Revision: 1.13 $ -- $Date: 2004/08/21 21:37:00 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with Interfaces.C; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; package body Terminal_Interface.Curses.Forms.Field_Types.User is use type Interfaces.C.int; procedure Set_Field_Type (Fld : in Field; Typ : in User_Defined_Field_Type) is function Allocate_Arg (T : User_Defined_Field_Type'Class) return Argument_Access; function Set_Fld_Type (F : Field := Fld; Cft : C_Field_Type := C_Generic_Type; Arg1 : Argument_Access) return C_Int; pragma Import (C, Set_Fld_Type, "set_field_type"); Res : Eti_Error; function Allocate_Arg (T : User_Defined_Field_Type'Class) return Argument_Access is Ptr : constant Field_Type_Access := new User_Defined_Field_Type'Class'(T); begin return new Argument'(Usr => System.Null_Address, Typ => Ptr, Cft => Null_Field_Type); end Allocate_Arg; begin Res := Set_Fld_Type (Arg1 => Allocate_Arg (Typ)); if Res /= E_Ok then Eti_Exception (Res); end if; end Set_Field_Type; function To_Argument_Access is new Ada.Unchecked_Conversion (System.Address, Argument_Access); function Generic_Field_Check (Fld : Field; Usr : System.Address) return C_Int is Result : Boolean; Udf : constant User_Defined_Field_Type_Access := User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); begin Result := Field_Check (Fld, Udf.all); return C_Int (Boolean'Pos (Result)); end Generic_Field_Check; function Generic_Char_Check (Ch : C_Int; Usr : System.Address) return C_Int is Result : Boolean; Udf : constant User_Defined_Field_Type_Access := User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); begin Result := Character_Check (Character'Val (Ch), Udf.all); return C_Int (Boolean'Pos (Result)); end Generic_Char_Check; -- ----------------------------------------------------------------------- -- function C_Generic_Type return C_Field_Type is Res : Eti_Error; T : C_Field_Type; begin if M_Generic_Type = Null_Field_Type then T := New_Fieldtype (Generic_Field_Check'Access, Generic_Char_Check'Access); if T = Null_Field_Type then raise Form_Exception; else Res := Set_Fieldtype_Arg (T, Make_Arg'Access, Copy_Arg'Access, Free_Arg'Access); if Res /= E_Ok then Eti_Exception (Res); end if; end if; M_Generic_Type := T; end if; pragma Assert (M_Generic_Type /= Null_Field_Type); return M_Generic_Type; end C_Generic_Type; end Terminal_Interface.Curses.Forms.Field_Types.User;
45.77037
78
0.492151
1817448e5fc84a7271dc625d1cacc8ffbc204087
2,133
ads
Ada
src/gen-artifacts-query.ads
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
src/gen-artifacts-query.ads
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
src/gen-artifacts-query.ads
Letractively/ada-gen
d06d03821057f9177f2350e32dd09e467df08612
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- gen-artifacts-query -- Query artifact for Code Generator -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with DOM.Core; with Gen.Model.Packages; -- The <b>Gen.Artifacts.Query</b> package is an artifact for the generation of -- data structures returned by queries. package Gen.Artifacts.Query is -- ------------------------------ -- Query artifact -- ------------------------------ type Artifact is new Gen.Artifacts.Artifact with private; -- After the configuration file is read, processes the node whose root -- is passed in <b>Node</b> and initializes the <b>Model</b> with the information. overriding procedure Initialize (Handler : in out Artifact; Path : in String; Node : in DOM.Core.Node; Model : in out Gen.Model.Packages.Model_Definition'Class; Context : in out Generator'Class); -- Prepare the model after all the configuration files have been read and before -- actually invoking the generation. overriding procedure Prepare (Handler : in out Artifact; Model : in out Gen.Model.Packages.Model_Definition'Class; Context : in out Generator'Class); private type Artifact is new Gen.Artifacts.Artifact with null record; end Gen.Artifacts.Query;
41.019231
86
0.610877
0e5b512aae0462f4dc2add00d92bb309f1c21abd
4,980
adb
Ada
applet/aide/source/palettes/aide-palette-of_source_entities.adb
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
3
2017-04-29T14:25:22.000Z
2017-09-29T10:15:28.000Z
applet/aide/source/palettes/aide-palette-of_source_entities.adb
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
null
null
null
applet/aide/source/palettes/aide-palette-of_source_entities.adb
charlie5/aIDE
fab406dbcd9b72a4cb215ffebb05166c788d6365
[ "MIT" ]
null
null
null
with AdaM.Comment, AdaM.raw_Source, AdaM.a_Type.enumeration_type, Glib, Glib.Error, Glib.Object, Gtk.Builder, Gtk.Handlers, Pango.Font; with Ada.Text_IO; use Ada.Text_IO; package body aIDE.Palette.of_source_entities is use Glib, Glib.Error, Glib.Object, Gtk.Builder, Gtk.Button, Gtk.Window; -- Events -- procedure on_raw_source_Button_clicked (the_Button : access Gtk_Button_Record'Class; Self : in aIDE.Palette.of_source_entities.view) is pragma Unreferenced (the_Button); new_Source : constant AdaM.raw_Source.view := AdaM.raw_Source.new_Source; begin Self.Target.append (new_Source.all'Access); Self.Top.Hide; Self.Invoked_by.freshen; end on_raw_source_Button_clicked; procedure on_comment_Button_clicked (the_Button : access Gtk_Button_Record'Class; Self : in aIDE.Palette.of_source_entities.view) is pragma Unreferenced (the_Button); new_Comment : constant AdaM.Comment.view := AdaM.Comment.new_Comment; begin Self.Target.append (new_Comment.all'Access); Self.Top.Hide; Self.Invoked_by.freshen; end on_comment_Button_clicked; procedure on_enumeration_type_Button_clicked (the_Button : access Gtk_Button_Record'Class; Self : in aIDE.Palette.of_source_entities.view) is pragma Unreferenced (the_Button); new_Enumeration : constant AdaM.a_Type.enumeration_type.view := AdaM.a_Type.enumeration_type.new_Type (""); begin Self.Target.append (new_Enumeration.all'Access); Self.Top.Hide; Self.Invoked_by.freshen; end on_enumeration_type_Button_clicked; package Button_Callbacks is new Gtk.Handlers.User_Callback (Gtk_Button_Record, aIDE.Palette.of_source_entities.view); -- Forge -- function to_source_entities_Palette return View is Self : constant Palette.of_source_entities.view := new Palette.of_source_entities.item; the_Builder : Gtk_Builder; Error : aliased GError; Result : Guint; pragma Unreferenced (Result); begin gtk_New (the_Builder); Result := the_Builder.add_from_File ("glade/source_entity_options.glade", Error'Access); if Error /= null then Put_Line ("Error: 'adam.Palette.of_source_Entities' ~ " & Get_Message (Error)); Error_Free (Error); end if; Self.Top := gtk_Window (the_Builder.get_Object ("top_Window")); Self.new_type_Frame := gtk_Frame (the_Builder.get_Object ("new_type_Frame")); Self.raw_source_Button := gtk_Button (the_Builder.get_Object ("raw_source_Button")); Self.comment_Button := gtk_Button (the_Builder.get_Object ("comment_Button")); Self.enumeration_type_Button := gtk_Button (the_Builder.get_Object ("new_enumeration_Button")); Self.close_Button := gtk_Button (the_Builder.get_Object ("close_Button")); Button_Callbacks.connect (Self.raw_source_Button, "clicked", on_raw_source_Button_clicked'Access, Self); Button_Callbacks.connect (Self.comment_Button, "clicked", on_comment_Button_clicked'Access, Self); Button_Callbacks.connect (Self.enumeration_type_Button, "clicked", on_enumeration_type_Button_clicked'Access, Self); Self.Top.modify_Font (Font_Desc => Pango.Font.From_String ("Courier 10")); Self.freshen; return Self; end to_source_entities_Palette; -- Attributes -- function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget is begin return gtk.Widget.Gtk_Widget (Self.Top); end top_Widget; procedure show (Self : in out Item; Invoked_by : in aIDE.Editor.view; -- Target : in AdaM.Source.Entities_view; Target : in AdaM.Entity.Entities_view; Allowed : in Filter) is begin Self.Invoked_by := Invoked_by; Self.Target := Target; case Allowed is when declare_Region => Self.new_type_Frame.show; when begin_Region => Self.new_type_Frame.hide; end case; Self.Top.show; end show; procedure freshen (Self : in out Item) is begin null; end freshen; end aIDE.Palette.of_source_entities;
28.457143
113
0.588554
d0caa79cfd0c819f43bc591779da9843615fb488
18,284
ads
Ada
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-soflin.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-soflin.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-soflin.ads
djamal2727/Main-Bearing-Analytical-Model
2f00c2219c71be0175c6f4f8f1d4cca231d97096
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . S O F T _ L I N K S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains a set of subprogram access variables that access -- some low-level primitives that are different depending whether tasking is -- involved or not (e.g. the Get/Set_Jmpbuf_Address that needs to provide a -- different value for each task). To avoid dragging in the tasking runtimes -- all the time, we use a system of soft links where the links are -- initialized to non-tasking versions, and then if the tasking support is -- initialized, they are set to the real tasking versions. pragma Compiler_Unit_Warning; with Ada.Exceptions; with System.Parameters; with System.Secondary_Stack; with System.Stack_Checking; package System.Soft_Links is pragma Preelaborate; package SST renames System.Secondary_Stack; subtype EOA is Ada.Exceptions.Exception_Occurrence_Access; subtype EO is Ada.Exceptions.Exception_Occurrence; function Current_Target_Exception return EO; pragma Import (Ada, Current_Target_Exception, "__gnat_current_target_exception"); -- Import this subprogram from the private part of Ada.Exceptions -- First we have the access subprogram types used to establish the links. -- The approach is to establish variables containing access subprogram -- values, which by default point to dummy no tasking versions of routines. type No_Param_Proc is access procedure; pragma Favor_Top_Level (No_Param_Proc); pragma Suppress_Initialization (No_Param_Proc); -- Some uninitialized objects of that type are initialized by the Binder -- so it is important that such objects are not reset to null during -- elaboration. type Addr_Param_Proc is access procedure (Addr : Address); pragma Favor_Top_Level (Addr_Param_Proc); type EO_Param_Proc is access procedure (Excep : EO); pragma Favor_Top_Level (EO_Param_Proc); type Get_Address_Call is access function return Address; pragma Favor_Top_Level (Get_Address_Call); type Set_Address_Call is access procedure (Addr : Address); pragma Favor_Top_Level (Set_Address_Call); type Set_Address_Call2 is access procedure (Self_ID : Address; Addr : Address); pragma Favor_Top_Level (Set_Address_Call2); type Get_Integer_Call is access function return Integer; pragma Favor_Top_Level (Get_Integer_Call); type Set_Integer_Call is access procedure (Len : Integer); pragma Favor_Top_Level (Set_Integer_Call); type Get_EOA_Call is access function return EOA; pragma Favor_Top_Level (Get_EOA_Call); type Set_EOA_Call is access procedure (Excep : EOA); pragma Favor_Top_Level (Set_EOA_Call); type Set_EO_Call is access procedure (Excep : EO); pragma Favor_Top_Level (Set_EO_Call); type Get_Stack_Call is access function return SST.SS_Stack_Ptr; pragma Favor_Top_Level (Get_Stack_Call); type Set_Stack_Call is access procedure (Stack : SST.SS_Stack_Ptr); pragma Favor_Top_Level (Set_Stack_Call); type Special_EO_Call is access procedure (Excep : EO := Current_Target_Exception); pragma Favor_Top_Level (Special_EO_Call); type Timed_Delay_Call is access procedure (Time : Duration; Mode : Integer); pragma Favor_Top_Level (Timed_Delay_Call); type Get_Stack_Access_Call is access function return Stack_Checking.Stack_Access; pragma Favor_Top_Level (Get_Stack_Access_Call); type Task_Name_Call is access function return String; pragma Favor_Top_Level (Task_Name_Call); -- Suppress checks on all these types, since we know the corresponding -- values can never be null (the soft links are always initialized). pragma Suppress (Access_Check, No_Param_Proc); pragma Suppress (Access_Check, Addr_Param_Proc); pragma Suppress (Access_Check, EO_Param_Proc); pragma Suppress (Access_Check, Get_Address_Call); pragma Suppress (Access_Check, Set_Address_Call); pragma Suppress (Access_Check, Set_Address_Call2); pragma Suppress (Access_Check, Get_Integer_Call); pragma Suppress (Access_Check, Set_Integer_Call); pragma Suppress (Access_Check, Get_EOA_Call); pragma Suppress (Access_Check, Set_EOA_Call); pragma Suppress (Access_Check, Get_Stack_Call); pragma Suppress (Access_Check, Set_Stack_Call); pragma Suppress (Access_Check, Timed_Delay_Call); pragma Suppress (Access_Check, Get_Stack_Access_Call); pragma Suppress (Access_Check, Task_Name_Call); -- The following one is not related to tasking/no-tasking but to the -- traceback decorators for exceptions. type Traceback_Decorator_Wrapper_Call is access function (Traceback : System.Address; Len : Natural) return String; pragma Favor_Top_Level (Traceback_Decorator_Wrapper_Call); -- Declarations for the no tasking versions of the required routines procedure Abort_Defer_NT; -- Defer task abort (non-tasking case, does nothing) procedure Abort_Undefer_NT; -- Undefer task abort (non-tasking case, does nothing) procedure Abort_Handler_NT; -- Handle task abort (non-tasking case, does nothing). Currently, no port -- makes use of this, but we retain the interface for possible future use. function Check_Abort_Status_NT return Integer; -- Returns Boolean'Pos (True) iff abort signal should raise -- Standard'Abort_Signal. procedure Task_Lock_NT; -- Lock out other tasks (non-tasking case, does nothing) procedure Task_Unlock_NT; -- Release lock set by Task_Lock (non-tasking case, does nothing) procedure Task_Termination_NT (Excep : EO); -- Handle task termination routines for the environment task (non-tasking -- case, does nothing). procedure Adafinal_NT; -- Shuts down the runtime system (non-tasking case) Abort_Defer : No_Param_Proc := Abort_Defer_NT'Access; pragma Suppress (Access_Check, Abort_Defer); -- Defer task abort (task/non-task case as appropriate) Abort_Undefer : No_Param_Proc := Abort_Undefer_NT'Access; pragma Suppress (Access_Check, Abort_Undefer); -- Undefer task abort (task/non-task case as appropriate) Abort_Handler : No_Param_Proc := Abort_Handler_NT'Access; -- Handle task abort (task/non-task case as appropriate) Check_Abort_Status : Get_Integer_Call := Check_Abort_Status_NT'Access; -- Called when Abort_Signal is delivered to the process. Checks to -- see if signal should result in raising Standard'Abort_Signal. Lock_Task : No_Param_Proc := Task_Lock_NT'Access; -- Locks out other tasks. Preceding a section of code by Task_Lock and -- following it by Task_Unlock creates a critical region. This is used -- for ensuring that a region of non-tasking code (such as code used to -- allocate memory) is tasking safe. Note that it is valid for calls to -- Task_Lock/Task_Unlock to be nested, and this must work properly, i.e. -- only the corresponding outer level Task_Unlock will actually unlock. -- This routine also prevents against asynchronous aborts (abort is -- deferred). Unlock_Task : No_Param_Proc := Task_Unlock_NT'Access; -- Releases lock previously set by call to Lock_Task. In the nested case, -- all nested locks must be released before other tasks competing for the -- tasking lock are released. -- -- In the non nested case, this routine terminates the protection against -- asynchronous aborts introduced by Lock_Task (unless abort was already -- deferred before the call to Lock_Task (e.g in a protected procedures). -- -- Note: the recommended protocol for using Lock_Task and Unlock_Task -- is as follows: -- -- Locked_Processing : begin -- System.Soft_Links.Lock_Task.all; -- ... -- System.Soft_Links.Unlock_Task.all; -- -- exception -- when others => -- System.Soft_Links.Unlock_Task.all; -- raise; -- end Locked_Processing; -- -- This ensures that the lock is not left set if an exception is raised -- explicitly or implicitly during the critical locked region. Task_Termination_Handler : EO_Param_Proc := Task_Termination_NT'Access; -- Handle task termination routines (task/non-task case as appropriate) Finalize_Library_Objects : No_Param_Proc; pragma Export (C, Finalize_Library_Objects, "__gnat_finalize_library_objects"); -- Will be initialized by the binder Adafinal : No_Param_Proc := Adafinal_NT'Access; -- Performs the finalization of the Ada Runtime function Get_Jmpbuf_Address_NT return Address; procedure Set_Jmpbuf_Address_NT (Addr : Address); Get_Jmpbuf_Address : Get_Address_Call := Get_Jmpbuf_Address_NT'Access; Set_Jmpbuf_Address : Set_Address_Call := Set_Jmpbuf_Address_NT'Access; function Get_Sec_Stack_NT return SST.SS_Stack_Ptr; procedure Set_Sec_Stack_NT (Stack : SST.SS_Stack_Ptr); Get_Sec_Stack : Get_Stack_Call := Get_Sec_Stack_NT'Access; Set_Sec_Stack : Set_Stack_Call := Set_Sec_Stack_NT'Access; function Get_Current_Excep_NT return EOA; Get_Current_Excep : Get_EOA_Call := Get_Current_Excep_NT'Access; function Get_Stack_Info_NT return Stack_Checking.Stack_Access; Get_Stack_Info : Get_Stack_Access_Call := Get_Stack_Info_NT'Access; -------------------------- -- Master_Id Soft-Links -- -------------------------- -- Soft-Links are used for procedures that manipulate Master_Ids because -- a Master_Id must be generated for access to limited class-wide types, -- whose root may be extended with task components. function Current_Master_NT return Integer; procedure Enter_Master_NT; procedure Complete_Master_NT; Current_Master : Get_Integer_Call := Current_Master_NT'Access; Enter_Master : No_Param_Proc := Enter_Master_NT'Access; Complete_Master : No_Param_Proc := Complete_Master_NT'Access; ---------------------- -- Delay Soft-Links -- ---------------------- -- Soft-Links are used for procedures that manipulate time to avoid -- dragging the tasking run time when using delay statements. Timed_Delay : Timed_Delay_Call; -------------------------- -- Task Name Soft-Links -- -------------------------- function Task_Name_NT return String; Task_Name : Task_Name_Call := Task_Name_NT'Access; ------------------------------------- -- Exception Tracebacks Soft-Links -- ------------------------------------- Library_Exception : EO; -- Library-level finalization routines use this common reference to store -- the first library-level exception which occurs during finalization. Library_Exception_Set : Boolean := False; -- Used in conjunction with Library_Exception, set when an exception has -- been stored. Traceback_Decorator_Wrapper : Traceback_Decorator_Wrapper_Call; -- Wrapper to the possible user specified traceback decorator to be -- called during automatic output of exception data. -- The null value of this wrapper corresponds to the null value of the -- current actual decorator. This is ensured first by the null initial -- value of the corresponding variables, and then by Set_Trace_Decorator -- in g-exctra.adb. pragma Atomic (Traceback_Decorator_Wrapper); -- Since concurrent read/write operations may occur on this variable. -- See the body of Tailored_Exception_Traceback in -- Ada.Exceptions.Exception_Data for a more detailed description of the -- potential problems. procedure Save_Library_Occurrence (E : EOA); -- When invoked, this routine saves an exception occurrence into a hidden -- reference. Subsequent calls will have no effect. ------------------------ -- Task Specific Data -- ------------------------ -- Here we define a single type that encapsulates the various task -- specific data. This type is used to store the necessary data into the -- Task_Control_Block or into a global variable in the non tasking case. type TSD is record Pri_Stack_Info : aliased Stack_Checking.Stack_Info; -- Information on stack (Base/Limit/Size) used by System.Stack_Checking. -- If this TSD does not belong to the environment task, the Size field -- must be initialized to the tasks requested stack size before the task -- can do its first stack check. Jmpbuf_Address : System.Address; -- Address of jump buffer used to store the address of the current -- longjmp/setjmp buffer for exception management. These buffers are -- threaded into a stack, and the address here is the top of the stack. -- A null address means that no exception handler is currently active. Sec_Stack_Ptr : SST.SS_Stack_Ptr; -- Pointer of the allocated secondary stack Current_Excep : aliased EO; -- Exception occurrence that contains the information for the current -- exception. Note that any exception in the same task destroys this -- information, so the data in this variable must be copied out before -- another exception can occur. -- -- Also act as a list of the active exceptions in the case of the GCC -- exception mechanism, organized as a stack with the most recent first. end record; procedure Create_TSD (New_TSD : in out TSD; Sec_Stack : SST.SS_Stack_Ptr; Sec_Stack_Size : System.Parameters.Size_Type); pragma Inline (Create_TSD); -- Called from s-tassta when a new thread is created to perform -- any required initialization of the TSD. procedure Destroy_TSD (Old_TSD : in out TSD); pragma Inline (Destroy_TSD); -- Called from s-tassta just before a thread is destroyed to perform -- any required finalization. function Get_GNAT_Exception return Ada.Exceptions.Exception_Id; pragma Inline (Get_GNAT_Exception); -- This function obtains the Exception_Id from the Exception_Occurrence -- referenced by the Current_Excep field of the task specific data, i.e. -- the call is equivalent to -- Exception_Identity (Get_Current_Exception.all) -- Export the Get/Set routines for the various Task Specific Data (TSD) -- elements as callable subprograms instead of objects of access to -- subprogram types. function Get_Jmpbuf_Address_Soft return Address; procedure Set_Jmpbuf_Address_Soft (Addr : Address); pragma Inline (Get_Jmpbuf_Address_Soft); pragma Inline (Set_Jmpbuf_Address_Soft); function Get_Sec_Stack_Soft return SST.SS_Stack_Ptr; procedure Set_Sec_Stack_Soft (Stack : SST.SS_Stack_Ptr); pragma Inline (Get_Sec_Stack_Soft); pragma Inline (Set_Sec_Stack_Soft); -- The following is a dummy record designed to mimic Communication_Block as -- defined in s-tpobop.ads: -- type Communication_Block is record -- Self : Task_Id; -- An access type -- Enqueued : Boolean := True; -- Cancelled : Boolean := False; -- end record; -- The record is used in the construction of the predefined dispatching -- primitive _disp_asynchronous_select in order to avoid the import of -- System.Tasking.Protected_Objects.Operations. Note that this package -- is always imported in the presence of interfaces since the dispatch -- table uses entities from here. type Dummy_Communication_Block is record Comp_1 : Address; -- Address and access have the same size Comp_2 : Boolean; Comp_3 : Boolean; end record; private NT_TSD : TSD; -- The task specific data for the main task when the Ada tasking run-time -- is not used. It relies on the default initialization of NT_TSD. It is -- placed here and not the body to ensure the default initialization does -- not clobber the secondary stack initialization that occurs as part of -- System.Soft_Links.Initialization. end System.Soft_Links;
43.846523
79
0.674852
c51250af0ec3cb66fa4e343836491c4bc5f19f43
313
ada
Ada
Task/Sorting-algorithms-Merge-sort/Ada/sorting-algorithms-merge-sort-1.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Sorting-algorithms-Merge-sort/Ada/sorting-algorithms-merge-sort-1.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
null
null
null
Task/Sorting-algorithms-Merge-sort/Ada/sorting-algorithms-merge-sort-1.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
generic type Element_Type is private; type Index_Type is (<>); type Collection_Type is array(Index_Type range <>) of Element_Type; with function "<"(Left, Right : Element_Type) return Boolean is <>; package Mergesort is function Sort(Item : Collection_Type) return Collection_Type; end MergeSort;
31.3
70
0.744409
d0e21407b010e68baeb771401cbfcdd02ea651c2
3,714
ads
Ada
src/Ada/ewok-dma.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/Ada/ewok-dma.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/Ada/ewok-dma.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok.tasks_shared; use ewok.tasks_shared; with ewok.dma_shared; with ewok.exported.dma; with soc.dma; with soc.dma.interfaces; with soc.interrupts; with c.socinfo; package ewok.dma with spark_mode => off is type t_status is (DMA_UNUSED, DMA_USED, DMA_CONFIGURED); type t_registered_dma is record config : soc.dma.interfaces.t_dma_config; task_id : ewok.tasks_shared.t_task_id := ID_UNUSED; status : t_status := DMA_UNUSED; devinfo : c.socinfo.t_device_soc_infos_access := NULL; end record; registered_dma : array (ewok.dma_shared.t_registered_dma_index) of t_registered_dma; procedure get_registered_dma_entry (index : out ewok.dma_shared.t_registered_dma_index; success : out boolean); function has_same_dma_channel (index : ewok.dma_shared.t_registered_dma_index; user_config : ewok.exported.dma.t_dma_user_config) return boolean; function stream_is_already_used (user_config : ewok.exported.dma.t_dma_user_config) return boolean; procedure enable_dma_stream (index : in ewok.dma_shared.t_registered_dma_index); procedure disable_dma_stream (index : in ewok.dma_shared.t_registered_dma_index); procedure enable_dma_irq (index : in ewok.dma_shared.t_registered_dma_index); function is_config_complete (config : soc.dma.interfaces.t_dma_config) return boolean; function sanitize_dma (user_config : ewok.exported.dma.t_dma_user_config; caller_id : ewok.tasks_shared.t_task_id; to_configure : ewok.exported.dma.t_config_mask; mode : ewok.tasks_shared.t_task_mode) return boolean; function sanitize_dma_shm (shm : ewok.exported.dma.t_dma_shm_info; caller_id : ewok.tasks_shared.t_task_id; mode : ewok.tasks_shared.t_task_mode) return boolean; procedure reconfigure_stream (user_config : in out ewok.exported.dma.t_dma_user_config; index : in ewok.dma_shared.t_registered_dma_index; to_configure : in ewok.exported.dma.t_config_mask; caller_id : in ewok.tasks_shared.t_task_id; success : out boolean); procedure init_stream (user_config : in ewok.exported.dma.t_dma_user_config; caller_id : in ewok.tasks_shared.t_task_id; index : out ewok.dma_shared.t_registered_dma_index; success : out boolean); procedure init; procedure clear_dma_interrupts (caller_id : in ewok.tasks_shared.t_task_id; interrupt : in soc.interrupts.t_interrupt); procedure get_status_register (caller_id : in ewok.tasks_shared.t_task_id; interrupt : in soc.interrupts.t_interrupt; status : out soc.dma.t_dma_stream_int_status; success : out boolean); end ewok.dma;
32.578947
79
0.688207
cb70553e92d378a557d1548a37c32d1e156e379a
38,264
ads
Ada
awa/plugins/awa-blogs/src/model/awa-blogs-models.ads
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
awa/plugins/awa-blogs/src/model/awa-blogs-models.ads
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
awa/plugins/awa-blogs/src/model/awa-blogs-models.ads
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- AWA.Blogs.Models -- AWA.Blogs.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- 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 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- pragma Warnings (Off); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with ADO.Queries; with ADO.Queries.Loaders; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Objects.Enums; with Util.Beans.Basic.Lists; with AWA.Comments.Models; with AWA.Events; with AWA.Users.Models; with AWA.Workspaces.Models; with Util.Beans.Methods; pragma Warnings (On); package AWA.Blogs.Models is pragma Style_Checks ("-mr"); type Post_Status_Type is (POST_DRAFT, POST_PUBLISHED, POST_SCHEDULED); for Post_Status_Type use (POST_DRAFT => 0, POST_PUBLISHED => 1, POST_SCHEDULED => 2); package Post_Status_Type_Objects is new Util.Beans.Objects.Enums (Post_Status_Type); type Blog_Ref is new ADO.Objects.Object_Ref with null record; type Post_Ref is new ADO.Objects.Object_Ref with null record; -- Create an object key for Blog. function Blog_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Blog from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Blog_Key (Id : in String) return ADO.Objects.Object_Key; Null_Blog : constant Blog_Ref; function "=" (Left, Right : Blog_Ref'Class) return Boolean; -- Set the blog identifier procedure Set_Id (Object : in out Blog_Ref; Value : in ADO.Identifier); -- Get the blog identifier function Get_Id (Object : in Blog_Ref) return ADO.Identifier; -- Set the blog name procedure Set_Name (Object : in out Blog_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Blog_Ref; Value : in String); -- Get the blog name function Get_Name (Object : in Blog_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Blog_Ref) return String; -- Get the version function Get_Version (Object : in Blog_Ref) return Integer; -- Set the blog uuid procedure Set_Uid (Object : in out Blog_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Uid (Object : in out Blog_Ref; Value : in String); -- Get the blog uuid function Get_Uid (Object : in Blog_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Uid (Object : in Blog_Ref) return String; -- Set the blog creation date procedure Set_Create_Date (Object : in out Blog_Ref; Value : in Ada.Calendar.Time); -- Get the blog creation date function Get_Create_Date (Object : in Blog_Ref) return Ada.Calendar.Time; -- Set the date when the blog was updated procedure Set_Update_Date (Object : in out Blog_Ref; Value : in Ada.Calendar.Time); -- Get the date when the blog was updated function Get_Update_Date (Object : in Blog_Ref) return Ada.Calendar.Time; -- Set The blog base URL. procedure Set_Url (Object : in out Blog_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Url (Object : in out Blog_Ref; Value : in String); -- Get The blog base URL. function Get_Url (Object : in Blog_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Url (Object : in Blog_Ref) return String; -- Set the workspace that this blog belongs to procedure Set_Workspace (Object : in out Blog_Ref; Value : in AWA.Workspaces.Models.Workspace_Ref'Class); -- Get the workspace that this blog belongs to function Get_Workspace (Object : in Blog_Ref) return AWA.Workspaces.Models.Workspace_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Blog_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Blog_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Blog_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Blog_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Blog_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Blog_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition BLOG_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Blog_Ref); -- Copy of the object. procedure Copy (Object : in Blog_Ref; Into : in out Blog_Ref); package Blog_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Blog_Ref, "=" => "="); subtype Blog_Vector is Blog_Vectors.Vector; procedure List (Object : in out Blog_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class); -- Create an object key for Post. function Post_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Post from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Post_Key (Id : in String) return ADO.Objects.Object_Key; Null_Post : constant Post_Ref; function "=" (Left, Right : Post_Ref'Class) return Boolean; -- Set the post identifier procedure Set_Id (Object : in out Post_Ref; Value : in ADO.Identifier); -- Get the post identifier function Get_Id (Object : in Post_Ref) return ADO.Identifier; -- Set the post title procedure Set_Title (Object : in out Post_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Title (Object : in out Post_Ref; Value : in String); -- Get the post title function Get_Title (Object : in Post_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Title (Object : in Post_Ref) return String; -- Set the post text content procedure Set_Text (Object : in out Post_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Text (Object : in out Post_Ref; Value : in String); -- Get the post text content function Get_Text (Object : in Post_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Text (Object : in Post_Ref) return String; -- Set the post creation date procedure Set_Create_Date (Object : in out Post_Ref; Value : in Ada.Calendar.Time); -- Get the post creation date function Get_Create_Date (Object : in Post_Ref) return Ada.Calendar.Time; -- Set the post URI procedure Set_Uri (Object : in out Post_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Uri (Object : in out Post_Ref; Value : in String); -- Get the post URI function Get_Uri (Object : in Post_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Uri (Object : in Post_Ref) return String; -- function Get_Version (Object : in Post_Ref) return Integer; -- Set the post publication date procedure Set_Publish_Date (Object : in out Post_Ref; Value : in ADO.Nullable_Time); -- Get the post publication date function Get_Publish_Date (Object : in Post_Ref) return ADO.Nullable_Time; -- Set the post status procedure Set_Status (Object : in out Post_Ref; Value : in AWA.Blogs.Models.Post_Status_Type); -- Get the post status function Get_Status (Object : in Post_Ref) return AWA.Blogs.Models.Post_Status_Type; -- procedure Set_Allow_Comments (Object : in out Post_Ref; Value : in Boolean); -- function Get_Allow_Comments (Object : in Post_Ref) return Boolean; -- Set the number of times the post was read. procedure Set_Read_Count (Object : in out Post_Ref; Value : in Integer); -- Get the number of times the post was read. function Get_Read_Count (Object : in Post_Ref) return Integer; -- procedure Set_Author (Object : in out Post_Ref; Value : in AWA.Users.Models.User_Ref'Class); -- function Get_Author (Object : in Post_Ref) return AWA.Users.Models.User_Ref'Class; -- procedure Set_Blog (Object : in out Post_Ref; Value : in AWA.Blogs.Models.Blog_Ref'Class); -- function Get_Blog (Object : in Post_Ref) return AWA.Blogs.Models.Blog_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Post_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Post_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Post_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Post_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Post_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Post_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition POST_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Post_Ref); -- Copy of the object. procedure Copy (Object : in Post_Ref; Into : in out Post_Ref); Query_Blog_Tag_Cloud : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The Admin_Post_Info describes a post in the administration interface. -- -------------------- type Admin_Post_Info is new Util.Beans.Basic.Bean with record -- the post identifier. Id : ADO.Identifier; -- the post title. Title : Ada.Strings.Unbounded.Unbounded_String; -- the post uri. Uri : Ada.Strings.Unbounded.Unbounded_String; -- the post publish date. Date : Ada.Calendar.Time; -- the post status. Status : AWA.Blogs.Models.Post_Status_Type; -- the number of times the post was read. Read_Count : Natural; -- the user name. Username : Ada.Strings.Unbounded.Unbounded_String; -- the number of comments for this post. Comment_Count : Natural; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Admin_Post_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Admin_Post_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Admin_Post_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Admin_Post_Info); package Admin_Post_Info_Vectors renames Admin_Post_Info_Beans.Vectors; subtype Admin_Post_Info_List_Bean is Admin_Post_Info_Beans.List_Bean; type Admin_Post_Info_List_Bean_Access is access all Admin_Post_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Admin_Post_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Admin_Post_Info_Vector is Admin_Post_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Admin_Post_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Blog_Admin_Post_List : constant ADO.Queries.Query_Definition_Access; Query_Blog_Admin_Post_List_Date : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The list of blogs. -- -------------------- type Blog_Info is new Util.Beans.Basic.Bean with record -- the blog identifier. Id : ADO.Identifier; -- the blog title. Title : Ada.Strings.Unbounded.Unbounded_String; -- the blog uuid. Uid : Ada.Strings.Unbounded.Unbounded_String; -- the blog creation date. Create_Date : Ada.Calendar.Time; -- the number of posts published. Post_Count : Integer; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Blog_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Blog_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Blog_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Blog_Info); package Blog_Info_Vectors renames Blog_Info_Beans.Vectors; subtype Blog_Info_List_Bean is Blog_Info_Beans.List_Bean; type Blog_Info_List_Bean_Access is access all Blog_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Blog_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Blog_Info_Vector is Blog_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Blog_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Blog_List : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The comment information. -- -------------------- type Comment_Info is new Util.Beans.Basic.Bean with record -- the comment identifier. Id : ADO.Identifier; -- the post identifier. Post_Id : ADO.Identifier; -- the post title. Title : Ada.Strings.Unbounded.Unbounded_String; -- the comment author's name. Author : Ada.Strings.Unbounded.Unbounded_String; -- the comment author's email. Email : Ada.Strings.Unbounded.Unbounded_String; -- the comment date. Date : Ada.Calendar.Time; -- the comment status. Status : AWA.Comments.Models.Status_Type; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Comment_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Comment_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Comment_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Comment_Info); package Comment_Info_Vectors renames Comment_Info_Beans.Vectors; subtype Comment_Info_List_Bean is Comment_Info_Beans.List_Bean; type Comment_Info_List_Bean_Access is access all Comment_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Comment_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Comment_Info_Vector is Comment_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Comment_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Comment_List : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The month statistics. -- -------------------- type Month_Stat_Info is new Util.Beans.Basic.Bean with record -- the post identifier. Year : Natural; -- the post title. Month : Natural; -- the post uri. Count : Natural; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Month_Stat_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Month_Stat_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Month_Stat_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Month_Stat_Info); package Month_Stat_Info_Vectors renames Month_Stat_Info_Beans.Vectors; subtype Month_Stat_Info_List_Bean is Month_Stat_Info_Beans.List_Bean; type Month_Stat_Info_List_Bean_Access is access all Month_Stat_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Month_Stat_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Month_Stat_Info_Vector is Month_Stat_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Month_Stat_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Post_Publish_Stats : constant ADO.Queries.Query_Definition_Access; Query_Post_Access_Stats : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The Post_Info describes a post to be displayed in the blog page -- -------------------- type Post_Info is new Util.Beans.Basic.Bean with record -- the post identifier. Id : ADO.Identifier; -- the post title. Title : Ada.Strings.Unbounded.Unbounded_String; -- the post uri. Uri : Ada.Strings.Unbounded.Unbounded_String; -- the post publish date. Date : Ada.Calendar.Time; -- the user name. Username : Ada.Strings.Unbounded.Unbounded_String; -- the post text. Text : Ada.Strings.Unbounded.Unbounded_String; -- the post allows to add comments. Allow_Comments : Boolean; -- the number of comments for this post. Comment_Count : Natural; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Post_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Post_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Post_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Post_Info); package Post_Info_Vectors renames Post_Info_Beans.Vectors; subtype Post_Info_List_Bean is Post_Info_Beans.List_Bean; type Post_Info_List_Bean_Access is access all Post_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Post_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Post_Info_Vector is Post_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Post_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Blog_Post_List : constant ADO.Queries.Query_Definition_Access; Query_Blog_Post_Tag_List : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- load the blog instance. -- -------------------- type Blog_Bean is abstract new AWA.Blogs.Models.Blog_Ref and Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with null record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Blog_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Blog_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Create (Bean : in out Blog_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Create_Default (Bean : in out Blog_Bean; Event : in AWA.Events.Module_Event'Class) is abstract; procedure Load (Bean : in out Blog_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; -- -------------------- -- load the post for the administrator -- -------------------- type Post_Bean is abstract new AWA.Blogs.Models.Post_Ref and Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with null record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Post_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Post_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Save (Bean : in out Post_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Delete (Bean : in out Post_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Load (Bean : in out Post_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Load_Admin (Bean : in out Post_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; type Post_List_Bean is abstract limited new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record Tag : Ada.Strings.Unbounded.Unbounded_String; Page : Integer; Count : Integer; Page_Size : Integer; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Post_List_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Post_List_Bean; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Post_List_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Post_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; -- -------------------- -- Statistics about the blog or a post. -- -------------------- type Stat_List_Bean is abstract limited new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record -- the blog identifier. Blog_Id : ADO.Identifier; -- the post identifier. Post_Id : ADO.Identifier; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Stat_List_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Stat_List_Bean; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Stat_List_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Stat_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; private BLOG_NAME : aliased constant String := "awa_blog"; COL_0_1_NAME : aliased constant String := "id"; COL_1_1_NAME : aliased constant String := "name"; COL_2_1_NAME : aliased constant String := "version"; COL_3_1_NAME : aliased constant String := "uid"; COL_4_1_NAME : aliased constant String := "create_date"; COL_5_1_NAME : aliased constant String := "update_date"; COL_6_1_NAME : aliased constant String := "url"; COL_7_1_NAME : aliased constant String := "workspace_id"; BLOG_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 8, Table => BLOG_NAME'Access, Members => ( 1 => COL_0_1_NAME'Access, 2 => COL_1_1_NAME'Access, 3 => COL_2_1_NAME'Access, 4 => COL_3_1_NAME'Access, 5 => COL_4_1_NAME'Access, 6 => COL_5_1_NAME'Access, 7 => COL_6_1_NAME'Access, 8 => COL_7_1_NAME'Access ) ); BLOG_TABLE : constant ADO.Schemas.Class_Mapping_Access := BLOG_DEF'Access; Null_Blog : constant Blog_Ref := Blog_Ref'(ADO.Objects.Object_Ref with null record); type Blog_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => BLOG_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; Version : Integer; Uid : Ada.Strings.Unbounded.Unbounded_String; Create_Date : Ada.Calendar.Time; Update_Date : Ada.Calendar.Time; Url : Ada.Strings.Unbounded.Unbounded_String; Workspace : AWA.Workspaces.Models.Workspace_Ref; end record; type Blog_Access is access all Blog_Impl; overriding procedure Destroy (Object : access Blog_Impl); overriding procedure Find (Object : in out Blog_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Blog_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Blog_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Blog_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Blog_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Blog_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Blog_Ref'Class; Impl : out Blog_Access); POST_NAME : aliased constant String := "awa_post"; COL_0_2_NAME : aliased constant String := "id"; COL_1_2_NAME : aliased constant String := "title"; COL_2_2_NAME : aliased constant String := "text"; COL_3_2_NAME : aliased constant String := "create_date"; COL_4_2_NAME : aliased constant String := "uri"; COL_5_2_NAME : aliased constant String := "version"; COL_6_2_NAME : aliased constant String := "publish_date"; COL_7_2_NAME : aliased constant String := "status"; COL_8_2_NAME : aliased constant String := "allow_comments"; COL_9_2_NAME : aliased constant String := "read_count"; COL_10_2_NAME : aliased constant String := "author_id"; COL_11_2_NAME : aliased constant String := "blog_id"; POST_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 12, Table => POST_NAME'Access, Members => ( 1 => COL_0_2_NAME'Access, 2 => COL_1_2_NAME'Access, 3 => COL_2_2_NAME'Access, 4 => COL_3_2_NAME'Access, 5 => COL_4_2_NAME'Access, 6 => COL_5_2_NAME'Access, 7 => COL_6_2_NAME'Access, 8 => COL_7_2_NAME'Access, 9 => COL_8_2_NAME'Access, 10 => COL_9_2_NAME'Access, 11 => COL_10_2_NAME'Access, 12 => COL_11_2_NAME'Access ) ); POST_TABLE : constant ADO.Schemas.Class_Mapping_Access := POST_DEF'Access; Null_Post : constant Post_Ref := Post_Ref'(ADO.Objects.Object_Ref with null record); type Post_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => POST_DEF'Access) with record Title : Ada.Strings.Unbounded.Unbounded_String; Text : Ada.Strings.Unbounded.Unbounded_String; Create_Date : Ada.Calendar.Time; Uri : Ada.Strings.Unbounded.Unbounded_String; Version : Integer; Publish_Date : ADO.Nullable_Time; Status : AWA.Blogs.Models.Post_Status_Type; Allow_Comments : Boolean; Read_Count : Integer; Author : AWA.Users.Models.User_Ref; Blog : AWA.Blogs.Models.Blog_Ref; end record; type Post_Access is access all Post_Impl; overriding procedure Destroy (Object : access Post_Impl); overriding procedure Find (Object : in out Post_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Post_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Post_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Post_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Post_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Post_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Post_Ref'Class; Impl : out Post_Access); package File_1 is new ADO.Queries.Loaders.File (Path => "blog-tags.xml", Sha1 => "9B2B599473F75F92CB5AB5045675E4CCEF926543"); package Def_Blog_Tag_Cloud is new ADO.Queries.Loaders.Query (Name => "blog-tag-cloud", File => File_1.File'Access); Query_Blog_Tag_Cloud : constant ADO.Queries.Query_Definition_Access := Def_Blog_Tag_Cloud.Query'Access; package File_2 is new ADO.Queries.Loaders.File (Path => "blog-admin-post-list.xml", Sha1 => "05BD01CF2BA5242266B1259502A7B26EC7ACC26D"); package Def_Adminpostinfo_Blog_Admin_Post_List is new ADO.Queries.Loaders.Query (Name => "blog-admin-post-list", File => File_2.File'Access); Query_Blog_Admin_Post_List : constant ADO.Queries.Query_Definition_Access := Def_Adminpostinfo_Blog_Admin_Post_List.Query'Access; package Def_Adminpostinfo_Blog_Admin_Post_List_Date is new ADO.Queries.Loaders.Query (Name => "blog-admin-post-list-date", File => File_2.File'Access); Query_Blog_Admin_Post_List_Date : constant ADO.Queries.Query_Definition_Access := Def_Adminpostinfo_Blog_Admin_Post_List_Date.Query'Access; package File_3 is new ADO.Queries.Loaders.File (Path => "blog-list.xml", Sha1 => "BB41EBE10B232F150560185E9A955BDA9FB7F77F"); package Def_Bloginfo_Blog_List is new ADO.Queries.Loaders.Query (Name => "blog-list", File => File_3.File'Access); Query_Blog_List : constant ADO.Queries.Query_Definition_Access := Def_Bloginfo_Blog_List.Query'Access; package File_4 is new ADO.Queries.Loaders.File (Path => "blog-comment-list.xml", Sha1 => "44E136D659FBA9859F2F077995D82161C743CAF3"); package Def_Commentinfo_Comment_List is new ADO.Queries.Loaders.Query (Name => "comment-list", File => File_4.File'Access); Query_Comment_List : constant ADO.Queries.Query_Definition_Access := Def_Commentinfo_Comment_List.Query'Access; package File_5 is new ADO.Queries.Loaders.File (Path => "blog-stat.xml", Sha1 => "933526108281E4E7755E68427D69738611F833F3"); package Def_Monthstatinfo_Post_Publish_Stats is new ADO.Queries.Loaders.Query (Name => "post-publish-stats", File => File_5.File'Access); Query_Post_Publish_Stats : constant ADO.Queries.Query_Definition_Access := Def_Monthstatinfo_Post_Publish_Stats.Query'Access; package Def_Monthstatinfo_Post_Access_Stats is new ADO.Queries.Loaders.Query (Name => "post-access-stats", File => File_5.File'Access); Query_Post_Access_Stats : constant ADO.Queries.Query_Definition_Access := Def_Monthstatinfo_Post_Access_Stats.Query'Access; package File_6 is new ADO.Queries.Loaders.File (Path => "blog-post-list.xml", Sha1 => "8DB9E20EB0AEBC97698E1BF002F64FB5279E2245"); package Def_Postinfo_Blog_Post_List is new ADO.Queries.Loaders.Query (Name => "blog-post-list", File => File_6.File'Access); Query_Blog_Post_List : constant ADO.Queries.Query_Definition_Access := Def_Postinfo_Blog_Post_List.Query'Access; package Def_Postinfo_Blog_Post_Tag_List is new ADO.Queries.Loaders.Query (Name => "blog-post-tag-list", File => File_6.File'Access); Query_Blog_Post_Tag_List : constant ADO.Queries.Query_Definition_Access := Def_Postinfo_Blog_Post_Tag_List.Query'Access; end AWA.Blogs.Models;
37.7357
94
0.634199
0eb2231a215be28b6412feacad4ac5f627686ce5
1,069
ads
Ada
src/pbkdf2_generic.ads
AntonMeep/pbkdf2
cf7a84bf94d72ac33574eed761a197f25ad37050
[ "0BSD" ]
null
null
null
src/pbkdf2_generic.ads
AntonMeep/pbkdf2
cf7a84bf94d72ac33574eed761a197f25ad37050
[ "0BSD" ]
2
2022-03-17T09:18:38.000Z
2022-03-24T14:42:02.000Z
src/pbkdf2_generic.ads
AntonMeep/pbkdf2
cf7a84bf94d72ac33574eed761a197f25ad37050
[ "0BSD" ]
null
null
null
generic type Element is mod <>; type Index is range <>; type Element_Array is array (Index range <>) of Element; Hash_Length : Index; type Hash_Context is private; with function Hash_Initialize (Input : Element_Array) return Hash_Context; with procedure Hash_Update (Ctx : in out Hash_Context; Input : Element_Array); with function Hash_Finalize (Ctx : Hash_Context) return Element_Array; package PBKDF2_Generic with Pure, Preelaborate is pragma Compile_Time_Error (Element'Modulus /= 256, "'Element' type must be mod 2**8, i.e. represent a byte"); function PBKDF2 (Password : String; Salt : String; Iterations : Positive; Derived_Key_Length : Index) return Element_Array; function PBKDF2 (Password : Element_Array; Salt : Element_Array; Iterations : Positive; Derived_Key_Length : Index) return Element_Array; private function Write_Big_Endian (Input : Index) return Element_Array; procedure XOR_In_Place (L : in out Element_Array; R : Element_Array); end PBKDF2_Generic;
34.483871
77
0.720299
0e77a1d63b019f1e02f5ffe15be9a7a8c803c129
213
ads
Ada
thirdparty/glut/progs/ada/ada_sphere_procs.ads
ShiroixD/pag_zad_2
cdb6ccf48402cf4dbf1284827a4e281d3b12a64b
[ "MIT" ]
1
2019-01-11T13:55:53.000Z
2019-01-11T13:55:53.000Z
thirdparty/glut/progs/ada/ada_sphere_procs.ads
ShiroixD/pag_zad_2
cdb6ccf48402cf4dbf1284827a4e281d3b12a64b
[ "MIT" ]
1
2018-08-10T19:11:58.000Z
2018-08-10T19:12:17.000Z
thirdparty/glut/progs/ada/ada_sphere_procs.ads
ShiroixD/pag_zad_2
cdb6ccf48402cf4dbf1284827a4e281d3b12a64b
[ "MIT" ]
null
null
null
with GL; use GL; with Glut; use Glut; package ada_sphere_procs is procedure display; procedure reshape (w : Integer; h : Integer); procedure menu (value : Integer); procedure init; end ada_sphere_procs;
19.363636
47
0.732394
0e4f954f707c49009e09253594f3537c2bd289b4
121
adb
Ada
tests/typing/bad/testfile-function-1.adb
xuedong/mini-ada
59a8b966cf50ba22a3b5a7cb449f671e4da32e44
[ "MIT" ]
null
null
null
tests/typing/bad/testfile-function-1.adb
xuedong/mini-ada
59a8b966cf50ba22a3b5a7cb449f671e4da32e44
[ "MIT" ]
1
2019-03-10T19:13:21.000Z
2019-03-10T19:19:46.000Z
tests/typing/bad/testfile-function-1.adb
xuedong/mini-ada
59a8b966cf50ba22a3b5a7cb449f671e4da32e44
[ "MIT" ]
null
null
null
with Ada.Text_IO; use Ada.Text_IO; procedure Test is function F return integer is begin return 0; end; begin f; end;
20.166667
52
0.743802
4af168fbdf88d49176c0d98bccbda94a87221eaf
437
ada
Ada
Task/Return-multiple-values/Ada/return-multiple-values.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Return-multiple-values/Ada/return-multiple-values.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
null
null
null
Task/Return-multiple-values/Ada/return-multiple-values.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
with Ada.Text_IO; use Ada.Text_IO; procedure MultiReturn is procedure SumAndDiff (x, y : Integer; sum, diff : out Integer) is begin sum := x + y; diff := x - y; end SumAndDiff; inta : Integer := 5; intb : Integer := 3; thesum, thediff : Integer; begin SumAndDiff (inta, intb, thesum, thediff); Put_Line ("Sum:" & Integer'Image (thesum)); Put_Line ("Diff:" & Integer'Image (thediff)); end MultiReturn;
29.133333
74
0.638444
dca1abb8473227ef848ca59c05cd5ea6e19d9577
844
adb
Ada
src/lab-code/car-blinker/car-blinker-rav-ql/src/main.adb
hannesb0/rtpl18
6cd1ff776b98695713de88586391139447edb320
[ "MIT" ]
null
null
null
src/lab-code/car-blinker/car-blinker-rav-ql/src/main.adb
hannesb0/rtpl18
6cd1ff776b98695713de88586391139447edb320
[ "MIT" ]
null
null
null
src/lab-code/car-blinker/car-blinker-rav-ql/src/main.adb
hannesb0/rtpl18
6cd1ff776b98695713de88586391139447edb320
[ "MIT" ]
null
null
null
pragma Profile(Ravenscar); pragma Reviewable; with Bcontrol;use Bcontrol; with Control; use Control; --with Gio; --with Reg_Het; with System; use System; with Ada.Real_Time;use Ada.Real_Time; procedure Main is --pragma Priority(Priority'Last); Stop : Boolean := False; S: String(1..5) := (others => ASCII.NUL); --CMD : BControl.Command_Type := (1 => 'b', 2 => 'l', 3 => 's'); CMD : BControl.Command_Type; begin -- Init; -- Gio.Gio_Set_Direction(Reg_Het.hetPort1'Access, 16#FFFFFFFF#); loop --Control.Put_Line("Before Get_Line"); S := Control.Get_Line; Control.Put_Line("Got Data"); Control.Put_Line(S); --CMD := Bcontrol.Command_Type(S(1..3)); CMD := BControl.Command_Type'Value(S(1..3)); Bcontrol.Command.Send(CMD); end loop; -- Blinker_Control.Blink_Stop; end;
23.444444
67
0.643365
0e6dd3240c1c44ed1443b074237807b4d35e9acb
52,253
adb
Ada
llvm-gcc-4.2-2.9/gcc/ada/a-textio.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/a-textio.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/a-textio.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . T E X T _ I O -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Streams; use Ada.Streams; with Interfaces.C_Streams; use Interfaces.C_Streams; with System.File_IO; with System.CRTL; with Unchecked_Conversion; with Unchecked_Deallocation; pragma Elaborate_All (System.File_IO); -- Needed because of calls to Chain_File in package body elaboration package body Ada.Text_IO is package FIO renames System.File_IO; subtype AP is FCB.AFCB_Ptr; function To_FCB is new Unchecked_Conversion (File_Mode, FCB.File_Mode); function To_TIO is new Unchecked_Conversion (FCB.File_Mode, File_Mode); use type FCB.File_Mode; use type System.CRTL.size_t; ------------------- -- AFCB_Allocate -- ------------------- function AFCB_Allocate (Control_Block : Text_AFCB) return FCB.AFCB_Ptr is pragma Unreferenced (Control_Block); begin return new Text_AFCB; end AFCB_Allocate; ---------------- -- AFCB_Close -- ---------------- procedure AFCB_Close (File : access Text_AFCB) is begin -- If the file being closed is one of the current files, then close -- the corresponding current file. It is not clear that this action -- is required (RM A.10.3(23)) but it seems reasonable, and besides -- ACVC test CE3208A expects this behavior. if File_Type (File) = Current_In then Current_In := null; elsif File_Type (File) = Current_Out then Current_Out := null; elsif File_Type (File) = Current_Err then Current_Err := null; end if; Terminate_Line (File_Type (File)); end AFCB_Close; --------------- -- AFCB_Free -- --------------- procedure AFCB_Free (File : access Text_AFCB) is type FCB_Ptr is access all Text_AFCB; FT : FCB_Ptr := FCB_Ptr (File); procedure Free is new Unchecked_Deallocation (Text_AFCB, FCB_Ptr); begin Free (FT); end AFCB_Free; ----------- -- Close -- ----------- procedure Close (File : in out File_Type) is begin FIO.Close (AP (File)); end Close; --------- -- Col -- --------- -- Note: we assume that it is impossible in practice for the column -- to exceed the value of Count'Last, i.e. no check is required for -- overflow raising layout error. function Col (File : File_Type) return Positive_Count is begin FIO.Check_File_Open (AP (File)); return File.Col; end Col; function Col return Positive_Count is begin return Col (Current_Out); end Col; ------------ -- Create -- ------------ procedure Create (File : in out File_Type; Mode : File_Mode := Out_File; Name : String := ""; Form : String := "") is Dummy_File_Control_Block : Text_AFCB; pragma Warnings (Off, Dummy_File_Control_Block); -- Yes, we know this is never assigned a value, only the tag -- is used for dispatching purposes, so that's expected. begin FIO.Open (File_Ptr => AP (File), Dummy_FCB => Dummy_File_Control_Block, Mode => To_FCB (Mode), Name => Name, Form => Form, Amethod => 'T', Creat => True, Text => True); File.Self := File; end Create; ------------------- -- Current_Error -- ------------------- function Current_Error return File_Type is begin return Current_Err; end Current_Error; function Current_Error return File_Access is begin return Current_Err.Self'Access; end Current_Error; ------------------- -- Current_Input -- ------------------- function Current_Input return File_Type is begin return Current_In; end Current_Input; function Current_Input return File_Access is begin return Current_In.Self'Access; end Current_Input; -------------------- -- Current_Output -- -------------------- function Current_Output return File_Type is begin return Current_Out; end Current_Output; function Current_Output return File_Access is begin return Current_Out.Self'Access; end Current_Output; ------------ -- Delete -- ------------ procedure Delete (File : in out File_Type) is begin FIO.Delete (AP (File)); end Delete; ----------------- -- End_Of_File -- ----------------- function End_Of_File (File : File_Type) return Boolean is ch : int; begin FIO.Check_Read_Status (AP (File)); if File.Before_LM then if File.Before_LM_PM then return Nextc (File) = EOF; end if; else ch := Getc (File); if ch = EOF then return True; elsif ch /= LM then Ungetc (ch, File); return False; else -- ch = LM File.Before_LM := True; end if; end if; -- Here we are just past the line mark with Before_LM set so that we -- do not have to try to back up past the LM, thus avoiding the need -- to back up more than one character. ch := Getc (File); if ch = EOF then return True; elsif ch = PM and then File.Is_Regular_File then File.Before_LM_PM := True; return Nextc (File) = EOF; -- Here if neither EOF nor PM followed end of line else Ungetc (ch, File); return False; end if; end End_Of_File; function End_Of_File return Boolean is begin return End_Of_File (Current_In); end End_Of_File; ----------------- -- End_Of_Line -- ----------------- function End_Of_Line (File : File_Type) return Boolean is ch : int; begin FIO.Check_Read_Status (AP (File)); if File.Before_LM then return True; else ch := Getc (File); if ch = EOF then return True; else Ungetc (ch, File); return (ch = LM); end if; end if; end End_Of_Line; function End_Of_Line return Boolean is begin return End_Of_Line (Current_In); end End_Of_Line; ----------------- -- End_Of_Page -- ----------------- function End_Of_Page (File : File_Type) return Boolean is ch : int; begin FIO.Check_Read_Status (AP (File)); if not File.Is_Regular_File then return False; elsif File.Before_LM then if File.Before_LM_PM then return True; end if; else ch := Getc (File); if ch = EOF then return True; elsif ch /= LM then Ungetc (ch, File); return False; else -- ch = LM File.Before_LM := True; end if; end if; -- Here we are just past the line mark with Before_LM set so that we -- do not have to try to back up past the LM, thus avoiding the need -- to back up more than one character. ch := Nextc (File); return ch = PM or else ch = EOF; end End_Of_Page; function End_Of_Page return Boolean is begin return End_Of_Page (Current_In); end End_Of_Page; -------------- -- EOF_Char -- -------------- function EOF_Char return Integer is begin return EOF; end EOF_Char; ----------- -- Flush -- ----------- procedure Flush (File : File_Type) is begin FIO.Flush (AP (File)); end Flush; procedure Flush is begin Flush (Current_Out); end Flush; ---------- -- Form -- ---------- function Form (File : File_Type) return String is begin return FIO.Form (AP (File)); end Form; --------- -- Get -- --------- procedure Get (File : File_Type; Item : out Character) is ch : int; begin FIO.Check_Read_Status (AP (File)); if File.Before_LM then File.Before_LM := False; File.Col := 1; if File.Before_LM_PM then File.Line := 1; File.Page := File.Page + 1; File.Before_LM_PM := False; else File.Line := File.Line + 1; end if; end if; loop ch := Getc (File); if ch = EOF then raise End_Error; elsif ch = LM then File.Line := File.Line + 1; File.Col := 1; elsif ch = PM and then File.Is_Regular_File then File.Page := File.Page + 1; File.Line := 1; else Item := Character'Val (ch); File.Col := File.Col + 1; return; end if; end loop; end Get; procedure Get (Item : out Character) is begin Get (Current_In, Item); end Get; procedure Get (File : File_Type; Item : out String) is ch : int; J : Natural; begin FIO.Check_Read_Status (AP (File)); if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; File.Col := 1; if File.Before_LM_PM then File.Line := 1; File.Page := File.Page + 1; File.Before_LM_PM := False; else File.Line := File.Line + 1; end if; end if; J := Item'First; while J <= Item'Last loop ch := Getc (File); if ch = EOF then raise End_Error; elsif ch = LM then File.Line := File.Line + 1; File.Col := 1; elsif ch = PM and then File.Is_Regular_File then File.Page := File.Page + 1; File.Line := 1; else Item (J) := Character'Val (ch); J := J + 1; File.Col := File.Col + 1; end if; end loop; end Get; procedure Get (Item : out String) is begin Get (Current_In, Item); end Get; ------------------- -- Get_Immediate -- ------------------- -- More work required here ??? procedure Get_Immediate (File : File_Type; Item : out Character) is ch : int; end_of_file : int; procedure getc_immediate (stream : FILEs; ch : out int; end_of_file : out int); pragma Import (C, getc_immediate, "getc_immediate"); begin FIO.Check_Read_Status (AP (File)); if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; ch := LM; else getc_immediate (File.Stream, ch, end_of_file); if ferror (File.Stream) /= 0 then raise Device_Error; elsif end_of_file /= 0 then raise End_Error; end if; end if; Item := Character'Val (ch); end Get_Immediate; procedure Get_Immediate (Item : out Character) is begin Get_Immediate (Current_In, Item); end Get_Immediate; procedure Get_Immediate (File : File_Type; Item : out Character; Available : out Boolean) is ch : int; end_of_file : int; avail : int; procedure getc_immediate_nowait (stream : FILEs; ch : out int; end_of_file : out int; avail : out int); pragma Import (C, getc_immediate_nowait, "getc_immediate_nowait"); begin FIO.Check_Read_Status (AP (File)); -- If we are logically before an end of line, but physically after it, -- then we just return the end of line character, no I/O is necessary. if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; Available := True; Item := Character'Val (LM); -- Normal case where a read operation is required else getc_immediate_nowait (File.Stream, ch, end_of_file, avail); if ferror (File.Stream) /= 0 then raise Device_Error; elsif end_of_file /= 0 then raise End_Error; elsif avail = 0 then Available := False; Item := ASCII.NUL; else Available := True; Item := Character'Val (ch); end if; end if; end Get_Immediate; procedure Get_Immediate (Item : out Character; Available : out Boolean) is begin Get_Immediate (Current_In, Item, Available); end Get_Immediate; -------------- -- Get_Line -- -------------- procedure Get_Line (File : File_Type; Item : out String; Last : out Natural) is ch : int; begin FIO.Check_Read_Status (AP (File)); Last := Item'First - 1; -- Immediate exit for null string, this is a case in which we do not -- need to test for end of file and we do not skip a line mark under -- any circumstances. if Last >= Item'Last then return; end if; -- Here we have at least one character, if we are immediately before -- a line mark, then we will just skip past it storing no characters. if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; -- Otherwise we need to read some characters else ch := Getc (File); -- If we are at the end of file now, it means we are trying to -- skip a file terminator and we raise End_Error (RM A.10.7(20)) if ch = EOF then raise End_Error; end if; -- Loop through characters. Don't bother if we hit a page mark, -- since in normal files, page marks can only follow line marks -- in any case and we only promise to treat the page nonsense -- correctly in the absense of such rogue page marks. loop -- Exit the loop if read is terminated by encountering line mark exit when ch = LM; -- Otherwise store the character, note that we know that ch is -- something other than LM or EOF. It could possibly be a page -- mark if there is a stray page mark in the middle of a line, -- but this is not an official page mark in any case, since -- official page marks can only follow a line mark. The whole -- page business is pretty much nonsense anyway, so we do not -- want to waste time trying to make sense out of non-standard -- page marks in the file! This means that the behavior of -- Get_Line is different from repeated Get of a character, but -- that's too bad. We only promise that page numbers etc make -- sense if the file is formatted in a standard manner. -- Note: we do not adjust the column number because it is quicker -- to adjust it once at the end of the operation than incrementing -- it each time around the loop. Last := Last + 1; Item (Last) := Character'Val (ch); -- All done if the string is full, this is the case in which -- we do not skip the following line mark. We need to adjust -- the column number in this case. if Last = Item'Last then File.Col := File.Col + Count (Item'Length); return; end if; -- Otherwise read next character. We also exit from the loop if -- we read an end of file. This is the case where the last line -- is not terminated with a line mark, and we consider that there -- is an implied line mark in this case (this is a non-standard -- file, but it is nice to treat it reasonably). ch := Getc (File); exit when ch = EOF; end loop; end if; -- We have skipped past, but not stored, a line mark. Skip following -- page mark if one follows, but do not do this for a non-regular -- file (since otherwise we get annoying wait for an extra character) File.Line := File.Line + 1; File.Col := 1; if File.Before_LM_PM then File.Line := 1; File.Before_LM_PM := False; File.Page := File.Page + 1; elsif File.Is_Regular_File then ch := Getc (File); if ch = PM and then File.Is_Regular_File then File.Line := 1; File.Page := File.Page + 1; else Ungetc (ch, File); end if; end if; end Get_Line; procedure Get_Line (Item : out String; Last : out Natural) is begin Get_Line (Current_In, Item, Last); end Get_Line; function Get_Line (File : File_Type) return String is Buffer : String (1 .. 500); Last : Natural; function Get_Rest (S : String) return String; -- This is a recursive function that reads the rest of the line and -- returns it. S is the part read so far. -------------- -- Get_Rest -- -------------- function Get_Rest (S : String) return String is -- Each time we allocate a buffer the same size as what we have -- read so far. This limits us to a logarithmic number of calls -- to Get_Rest and also ensures only a linear use of stack space. Buffer : String (1 .. S'Length); Last : Natural; begin Get_Line (File, Buffer, Last); declare R : constant String := S & Buffer (1 .. Last); begin if Last < Buffer'Last then return R; else return Get_Rest (R); end if; end; end Get_Rest; -- Start of processing for Get_Line begin Get_Line (File, Buffer, Last); if Last < Buffer'Last then return Buffer (1 .. Last); else return Get_Rest (Buffer (1 .. Last)); end if; end Get_Line; function Get_Line return String is begin return Get_Line (Current_In); end Get_Line; ---------- -- Getc -- ---------- function Getc (File : File_Type) return int is ch : int; begin ch := fgetc (File.Stream); if ch = EOF and then ferror (File.Stream) /= 0 then raise Device_Error; else return ch; end if; end Getc; ------------- -- Is_Open -- ------------- function Is_Open (File : File_Type) return Boolean is begin return FIO.Is_Open (AP (File)); end Is_Open; ---------- -- Line -- ---------- -- Note: we assume that it is impossible in practice for the line -- to exceed the value of Count'Last, i.e. no check is required for -- overflow raising layout error. function Line (File : File_Type) return Positive_Count is begin FIO.Check_File_Open (AP (File)); return File.Line; end Line; function Line return Positive_Count is begin return Line (Current_Out); end Line; ----------------- -- Line_Length -- ----------------- function Line_Length (File : File_Type) return Count is begin FIO.Check_Write_Status (AP (File)); return File.Line_Length; end Line_Length; function Line_Length return Count is begin return Line_Length (Current_Out); end Line_Length; ---------------- -- Look_Ahead -- ---------------- procedure Look_Ahead (File : File_Type; Item : out Character; End_Of_Line : out Boolean) is ch : int; begin FIO.Check_Read_Status (AP (File)); if File.Before_LM then End_Of_Line := True; Item := ASCII.NUL; else ch := Nextc (File); if ch = LM or else ch = EOF or else (ch = PM and then File.Is_Regular_File) then End_Of_Line := True; Item := ASCII.NUL; else End_Of_Line := False; Item := Character'Val (ch); end if; end if; end Look_Ahead; procedure Look_Ahead (Item : out Character; End_Of_Line : out Boolean) is begin Look_Ahead (Current_In, Item, End_Of_Line); end Look_Ahead; ---------- -- Mode -- ---------- function Mode (File : File_Type) return File_Mode is begin return To_TIO (FIO.Mode (AP (File))); end Mode; ---------- -- Name -- ---------- function Name (File : File_Type) return String is begin return FIO.Name (AP (File)); end Name; -------------- -- New_Line -- -------------- procedure New_Line (File : File_Type; Spacing : Positive_Count := 1) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not Spacing'Valid then raise Constraint_Error; end if; FIO.Check_Write_Status (AP (File)); for K in 1 .. Spacing loop Putc (LM, File); File.Line := File.Line + 1; if File.Page_Length /= 0 and then File.Line > File.Page_Length then Putc (PM, File); File.Line := 1; File.Page := File.Page + 1; end if; end loop; File.Col := 1; end New_Line; procedure New_Line (Spacing : Positive_Count := 1) is begin New_Line (Current_Out, Spacing); end New_Line; -------------- -- New_Page -- -------------- procedure New_Page (File : File_Type) is begin FIO.Check_Write_Status (AP (File)); if File.Col /= 1 or else File.Line = 1 then Putc (LM, File); end if; Putc (PM, File); File.Page := File.Page + 1; File.Line := 1; File.Col := 1; end New_Page; procedure New_Page is begin New_Page (Current_Out); end New_Page; ----------- -- Nextc -- ----------- function Nextc (File : File_Type) return int is ch : int; begin ch := fgetc (File.Stream); if ch = EOF then if ferror (File.Stream) /= 0 then raise Device_Error; end if; else if ungetc (ch, File.Stream) = EOF then raise Device_Error; end if; end if; return ch; end Nextc; ---------- -- Open -- ---------- procedure Open (File : in out File_Type; Mode : File_Mode; Name : String; Form : String := "") is Dummy_File_Control_Block : Text_AFCB; pragma Warnings (Off, Dummy_File_Control_Block); -- Yes, we know this is never assigned a value, only the tag -- is used for dispatching purposes, so that's expected. begin FIO.Open (File_Ptr => AP (File), Dummy_FCB => Dummy_File_Control_Block, Mode => To_FCB (Mode), Name => Name, Form => Form, Amethod => 'T', Creat => False, Text => True); File.Self := File; end Open; ---------- -- Page -- ---------- -- Note: we assume that it is impossible in practice for the page -- to exceed the value of Count'Last, i.e. no check is required for -- overflow raising layout error. function Page (File : File_Type) return Positive_Count is begin FIO.Check_File_Open (AP (File)); return File.Page; end Page; function Page return Positive_Count is begin return Page (Current_Out); end Page; ----------------- -- Page_Length -- ----------------- function Page_Length (File : File_Type) return Count is begin FIO.Check_Write_Status (AP (File)); return File.Page_Length; end Page_Length; function Page_Length return Count is begin return Page_Length (Current_Out); end Page_Length; --------- -- Put -- --------- procedure Put (File : File_Type; Item : Character) is begin FIO.Check_Write_Status (AP (File)); if File.Line_Length /= 0 and then File.Col > File.Line_Length then New_Line (File); end if; if fputc (Character'Pos (Item), File.Stream) = EOF then raise Device_Error; end if; File.Col := File.Col + 1; end Put; procedure Put (Item : Character) is begin FIO.Check_Write_Status (AP (Current_Out)); if Current_Out.Line_Length /= 0 and then Current_Out.Col > Current_Out.Line_Length then New_Line (Current_Out); end if; if fputc (Character'Pos (Item), Current_Out.Stream) = EOF then raise Device_Error; end if; Current_Out.Col := Current_Out.Col + 1; end Put; --------- -- Put -- --------- procedure Put (File : File_Type; Item : String) is begin FIO.Check_Write_Status (AP (File)); if Item'Length > 0 then -- If we have bounded lines, then do things character by -- character (this seems a rare case anyway!) if File.Line_Length /= 0 then for J in Item'Range loop Put (File, Item (J)); end loop; -- Otherwise we can output the entire string at once. Note that if -- there are LF or FF characters in the string, we do not bother to -- count them as line or page terminators. else FIO.Write_Buf (AP (File), Item'Address, Item'Length); File.Col := File.Col + Item'Length; end if; end if; end Put; procedure Put (Item : String) is begin Put (Current_Out, Item); end Put; -------------- -- Put_Line -- -------------- procedure Put_Line (File : File_Type; Item : String) is Ilen : Natural := Item'Length; Istart : Natural := Item'First; begin FIO.Check_Write_Status (AP (File)); -- If we have bounded lines, then just do a put and a new line. In -- this case we will end up doing things character by character in -- any case, and it is a rare situation. if File.Line_Length /= 0 then Put (File, Item); New_Line (File); return; end if; -- We setup a single string that has the necessary terminators and -- then write it with a single call. The reason for doing this is -- that it gives better behavior for the use of Put_Line in multi- -- tasking programs, since often the OS will treat the entire put -- operation as an atomic operation. -- We only do this if the message is 512 characters or less in length, -- since otherwise Put_Line would use an unbounded amount of stack -- space and could cause undetected stack overflow. If we have a -- longer string, then output the first part separately to avoid this. if Ilen > 512 then FIO.Write_Buf (AP (File), Item'Address, size_t (Ilen - 512)); Istart := Istart + Ilen - 512; Ilen := 512; end if; -- Now prepare the string with its terminator declare Buffer : String (1 .. Ilen + 2); Plen : size_t; begin Buffer (1 .. Ilen) := Item (Istart .. Item'Last); Buffer (Ilen + 1) := Character'Val (LM); if File.Page_Length /= 0 and then File.Line > File.Page_Length then Buffer (Ilen + 2) := Character'Val (PM); Plen := size_t (Ilen) + 2; File.Line := 1; File.Page := File.Page + 1; else Plen := size_t (Ilen) + 1; File.Line := File.Line + 1; end if; FIO.Write_Buf (AP (File), Buffer'Address, Plen); File.Col := 1; end; end Put_Line; procedure Put_Line (Item : String) is begin Put_Line (Current_Out, Item); end Put_Line; ---------- -- Putc -- ---------- procedure Putc (ch : int; File : File_Type) is begin if fputc (ch, File.Stream) = EOF then raise Device_Error; end if; end Putc; ---------- -- Read -- ---------- -- This is the primitive Stream Read routine, used when a Text_IO file -- is treated directly as a stream using Text_IO.Streams.Stream. procedure Read (File : in out Text_AFCB; Item : out Stream_Element_Array; Last : out Stream_Element_Offset) is Discard_ch : int; pragma Warnings (Off, Discard_ch); begin if File.Mode /= FCB.In_File then raise Mode_Error; end if; -- Deal with case where our logical and physical position do not match -- because of being after an LM or LM-PM sequence when in fact we are -- logically positioned before it. if File.Before_LM then -- If we are before a PM, then it is possible for a stream read -- to leave us after the LM and before the PM, which is a bit -- odd. The easiest way to deal with this is to unget the PM, -- so we are indeed positioned between the characters. This way -- further stream read operations will work correctly, and the -- effect on text processing is a little weird, but what can -- be expected if stream and text input are mixed this way? if File.Before_LM_PM then Discard_ch := ungetc (PM, File.Stream); File.Before_LM_PM := False; end if; File.Before_LM := False; Item (Item'First) := Stream_Element (Character'Pos (ASCII.LF)); if Item'Length = 1 then Last := Item'Last; else Last := Item'First + Stream_Element_Offset (fread (buffer => Item'Address, index => size_t (Item'First + 1), size => 1, count => Item'Length - 1, stream => File.Stream)); end if; return; end if; -- Now we do the read. Since this is a text file, it is normally in -- text mode, but stream data must be read in binary mode, so we -- temporarily set binary mode for the read, resetting it after. -- These calls have no effect in a system (like Unix) where there is -- no distinction between text and binary files. set_binary_mode (fileno (File.Stream)); Last := Item'First + Stream_Element_Offset (fread (Item'Address, 1, Item'Length, File.Stream)) - 1; if Last < Item'Last then if ferror (File.Stream) /= 0 then raise Device_Error; end if; end if; set_text_mode (fileno (File.Stream)); end Read; ----------- -- Reset -- ----------- procedure Reset (File : in out File_Type; Mode : File_Mode) is begin -- Don't allow change of mode for current file (RM A.10.2(5)) if (File = Current_In or else File = Current_Out or else File = Current_Error) and then To_FCB (Mode) /= File.Mode then raise Mode_Error; end if; Terminate_Line (File); FIO.Reset (AP (File), To_FCB (Mode)); File.Page := 1; File.Line := 1; File.Col := 1; File.Line_Length := 0; File.Page_Length := 0; File.Before_LM := False; File.Before_LM_PM := False; end Reset; procedure Reset (File : in out File_Type) is begin Terminate_Line (File); FIO.Reset (AP (File)); File.Page := 1; File.Line := 1; File.Col := 1; File.Line_Length := 0; File.Page_Length := 0; File.Before_LM := False; File.Before_LM_PM := False; end Reset; ------------- -- Set_Col -- ------------- procedure Set_Col (File : File_Type; To : Positive_Count) is ch : int; begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_File_Open (AP (File)); -- Output case if Mode (File) >= Out_File then -- Error if we attempt to set Col to a value greater than the -- maximum permissible line length. if File.Line_Length /= 0 and then To > File.Line_Length then raise Layout_Error; end if; -- If we are behind current position, then go to start of new line if To < File.Col then New_Line (File); end if; -- Loop to output blanks till we are at the required column while File.Col < To loop Put (File, ' '); end loop; -- Input case else -- If we are logically before a LM, but physically after it, the -- file position still reflects the position before the LM, so eat -- it now and adjust the file position appropriately. if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; File.Line := File.Line + 1; File.Col := 1; end if; -- Loop reading characters till we get one at the required Col value loop -- Read next character. The reason we have to read ahead is to -- skip formatting characters, the effect of Set_Col is to set -- us to a real character with the right Col value, and format -- characters don't count. ch := Getc (File); -- Error if we hit an end of file if ch = EOF then raise End_Error; -- If line mark, eat it and adjust file position elsif ch = LM then File.Line := File.Line + 1; File.Col := 1; -- If recognized page mark, eat it, and adjust file position elsif ch = PM and then File.Is_Regular_File then File.Page := File.Page + 1; File.Line := 1; File.Col := 1; -- Otherwise this is the character we are looking for, so put it -- back in the input stream (we have not adjusted the file -- position yet, so everything is set right after this ungetc). elsif To = File.Col then Ungetc (ch, File); return; -- Keep skipping characters if we are not there yet, updating the -- file position past the skipped character. else File.Col := File.Col + 1; end if; end loop; end if; end Set_Col; procedure Set_Col (To : Positive_Count) is begin Set_Col (Current_Out, To); end Set_Col; --------------- -- Set_Error -- --------------- procedure Set_Error (File : File_Type) is begin FIO.Check_Write_Status (AP (File)); Current_Err := File; end Set_Error; --------------- -- Set_Input -- --------------- procedure Set_Input (File : File_Type) is begin FIO.Check_Read_Status (AP (File)); Current_In := File; end Set_Input; -------------- -- Set_Line -- -------------- procedure Set_Line (File : File_Type; To : Positive_Count) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_File_Open (AP (File)); if To = File.Line then return; end if; if Mode (File) >= Out_File then if File.Page_Length /= 0 and then To > File.Page_Length then raise Layout_Error; end if; if To < File.Line then New_Page (File); end if; while File.Line < To loop New_Line (File); end loop; else while To /= File.Line loop Skip_Line (File); end loop; end if; end Set_Line; procedure Set_Line (To : Positive_Count) is begin Set_Line (Current_Out, To); end Set_Line; --------------------- -- Set_Line_Length -- --------------------- procedure Set_Line_Length (File : File_Type; To : Count) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_Write_Status (AP (File)); File.Line_Length := To; end Set_Line_Length; procedure Set_Line_Length (To : Count) is begin Set_Line_Length (Current_Out, To); end Set_Line_Length; ---------------- -- Set_Output -- ---------------- procedure Set_Output (File : File_Type) is begin FIO.Check_Write_Status (AP (File)); Current_Out := File; end Set_Output; --------------------- -- Set_Page_Length -- --------------------- procedure Set_Page_Length (File : File_Type; To : Count) is begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not To'Valid then raise Constraint_Error; end if; FIO.Check_Write_Status (AP (File)); File.Page_Length := To; end Set_Page_Length; procedure Set_Page_Length (To : Count) is begin Set_Page_Length (Current_Out, To); end Set_Page_Length; --------------- -- Skip_Line -- --------------- procedure Skip_Line (File : File_Type; Spacing : Positive_Count := 1) is ch : int; begin -- Raise Constraint_Error if out of range value. The reason for this -- explicit test is that we don't want junk values around, even if -- checks are off in the caller. if not Spacing'Valid then raise Constraint_Error; end if; FIO.Check_Read_Status (AP (File)); for L in 1 .. Spacing loop if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; else ch := Getc (File); -- If at end of file now, then immediately raise End_Error. Note -- that we can never be positioned between a line mark and a page -- mark, so if we are at the end of file, we cannot logically be -- before the implicit page mark that is at the end of the file. -- For the same reason, we do not need an explicit check for a -- page mark. If there is a FF in the middle of a line, the file -- is not in canonical format and we do not care about the page -- numbers for files other than ones in canonical format. if ch = EOF then raise End_Error; end if; -- If not at end of file, then loop till we get to an LM or EOF. -- The latter case happens only in non-canonical files where the -- last line is not terminated by LM, but we don't want to blow -- up for such files, so we assume an implicit LM in this case. loop exit when ch = LM or ch = EOF; ch := Getc (File); end loop; end if; -- We have got past a line mark, now, for a regular file only, -- see if a page mark immediately follows this line mark and -- if so, skip past the page mark as well. We do not do this -- for non-regular files, since it would cause an undesirable -- wait for an additional character. File.Col := 1; File.Line := File.Line + 1; if File.Before_LM_PM then File.Page := File.Page + 1; File.Line := 1; File.Before_LM_PM := False; elsif File.Is_Regular_File then ch := Getc (File); -- Page mark can be explicit, or implied at the end of the file if (ch = PM or else ch = EOF) and then File.Is_Regular_File then File.Page := File.Page + 1; File.Line := 1; else Ungetc (ch, File); end if; end if; end loop; end Skip_Line; procedure Skip_Line (Spacing : Positive_Count := 1) is begin Skip_Line (Current_In, Spacing); end Skip_Line; --------------- -- Skip_Page -- --------------- procedure Skip_Page (File : File_Type) is ch : int; begin FIO.Check_Read_Status (AP (File)); -- If at page mark already, just skip it if File.Before_LM_PM then File.Before_LM := False; File.Before_LM_PM := False; File.Page := File.Page + 1; File.Line := 1; File.Col := 1; return; end if; -- This is a bit tricky, if we are logically before an LM then -- it is not an error if we are at an end of file now, since we -- are not really at it. if File.Before_LM then File.Before_LM := False; File.Before_LM_PM := False; ch := Getc (File); -- Otherwise we do raise End_Error if we are at the end of file now else ch := Getc (File); if ch = EOF then raise End_Error; end if; end if; -- Now we can just rumble along to the next page mark, or to the -- end of file, if that comes first. The latter case happens when -- the page mark is implied at the end of file. loop exit when ch = EOF or else (ch = PM and then File.Is_Regular_File); ch := Getc (File); end loop; File.Page := File.Page + 1; File.Line := 1; File.Col := 1; end Skip_Page; procedure Skip_Page is begin Skip_Page (Current_In); end Skip_Page; -------------------- -- Standard_Error -- -------------------- function Standard_Error return File_Type is begin return Standard_Err; end Standard_Error; function Standard_Error return File_Access is begin return Standard_Err'Access; end Standard_Error; -------------------- -- Standard_Input -- -------------------- function Standard_Input return File_Type is begin return Standard_In; end Standard_Input; function Standard_Input return File_Access is begin return Standard_In'Access; end Standard_Input; --------------------- -- Standard_Output -- --------------------- function Standard_Output return File_Type is begin return Standard_Out; end Standard_Output; function Standard_Output return File_Access is begin return Standard_Out'Access; end Standard_Output; -------------------- -- Terminate_Line -- -------------------- procedure Terminate_Line (File : File_Type) is begin FIO.Check_File_Open (AP (File)); -- For file other than In_File, test for needing to terminate last line if Mode (File) /= In_File then -- If not at start of line definition need new line if File.Col /= 1 then New_Line (File); -- For files other than standard error and standard output, we -- make sure that an empty file has a single line feed, so that -- it is properly formatted. We avoid this for the standard files -- because it is too much of a nuisance to have these odd line -- feeds when nothing has been written to the file. -- We also avoid this for files opened in append mode, in -- accordance with (RM A.8.2(10)) elsif (File /= Standard_Err and then File /= Standard_Out) and then (File.Line = 1 and then File.Page = 1) and then Mode (File) = Out_File then New_Line (File); end if; end if; end Terminate_Line; ------------ -- Ungetc -- ------------ procedure Ungetc (ch : int; File : File_Type) is begin if ch /= EOF then if ungetc (ch, File.Stream) = EOF then raise Device_Error; end if; end if; end Ungetc; ----------- -- Write -- ----------- -- This is the primitive Stream Write routine, used when a Text_IO file -- is treated directly as a stream using Text_IO.Streams.Stream. procedure Write (File : in out Text_AFCB; Item : Stream_Element_Array) is function Has_Translated_Characters return Boolean; -- return True if Item array contains a character which will be -- translated under the text file mode. There is only one such -- character under DOS based systems which is character 10. text_translation_required : Boolean; pragma Import (C, text_translation_required, "__gnat_text_translation_required"); Siz : constant size_t := Item'Length; function Has_Translated_Characters return Boolean is begin for K in Item'Range loop if Item (K) = 10 then return True; end if; end loop; return False; end Has_Translated_Characters; Needs_Binary_Write : constant Boolean := text_translation_required and then Has_Translated_Characters; begin if File.Mode = FCB.In_File then raise Mode_Error; end if; -- Now we do the write. Since this is a text file, it is normally in -- text mode, but stream data must be written in binary mode, so we -- temporarily set binary mode for the write, resetting it after. This -- is done only if needed (i.e. there is some characters in Item which -- needs to be written using the binary mode). -- These calls have no effect in a system (like Unix) where there is -- no distinction between text and binary files. -- Since the character translation is done at the time the buffer is -- written (this is true under Windows) we first flush current buffer -- with text mode if needed. if Needs_Binary_Write then if fflush (File.Stream) = -1 then raise Device_Error; end if; set_binary_mode (fileno (File.Stream)); end if; if fwrite (Item'Address, 1, Siz, File.Stream) /= Siz then raise Device_Error; end if; -- At this point we need to flush the buffer using the binary mode then -- we reset to text mode. if Needs_Binary_Write then if fflush (File.Stream) = -1 then raise Device_Error; end if; set_text_mode (fileno (File.Stream)); end if; end Write; -- Use "preallocated" strings to avoid calling "new" during the -- elaboration of the run time. This is needed in the tasking case to -- avoid calling Task_Lock too early. A filename is expected to end with a -- null character in the runtime, here the null characters are added just -- to have a correct filename length. Err_Name : aliased String := "*stderr" & ASCII.Nul; In_Name : aliased String := "*stdin" & ASCII.Nul; Out_Name : aliased String := "*stdout" & ASCII.Nul; begin ------------------------------- -- Initialize Standard Files -- ------------------------------- -- Note: the names in these files are bogus, and probably it would be -- better for these files to have no names, but the ACVC test insist! -- We use names that are bound to fail in open etc. Standard_Err.Stream := stderr; Standard_Err.Name := Err_Name'Access; Standard_Err.Form := Null_Str'Unrestricted_Access; Standard_Err.Mode := FCB.Out_File; Standard_Err.Is_Regular_File := is_regular_file (fileno (stderr)) /= 0; Standard_Err.Is_Temporary_File := False; Standard_Err.Is_System_File := True; Standard_Err.Is_Text_File := True; Standard_Err.Access_Method := 'T'; Standard_Err.Self := Standard_Err; Standard_In.Stream := stdin; Standard_In.Name := In_Name'Access; Standard_In.Form := Null_Str'Unrestricted_Access; Standard_In.Mode := FCB.In_File; Standard_In.Is_Regular_File := is_regular_file (fileno (stdin)) /= 0; Standard_In.Is_Temporary_File := False; Standard_In.Is_System_File := True; Standard_In.Is_Text_File := True; Standard_In.Access_Method := 'T'; Standard_In.Self := Standard_In; Standard_Out.Stream := stdout; Standard_Out.Name := Out_Name'Access; Standard_Out.Form := Null_Str'Unrestricted_Access; Standard_Out.Mode := FCB.Out_File; Standard_Out.Is_Regular_File := is_regular_file (fileno (stdout)) /= 0; Standard_Out.Is_Temporary_File := False; Standard_Out.Is_System_File := True; Standard_Out.Is_Text_File := True; Standard_Out.Access_Method := 'T'; Standard_Out.Self := Standard_Out; FIO.Chain_File (AP (Standard_In)); FIO.Chain_File (AP (Standard_Out)); FIO.Chain_File (AP (Standard_Err)); FIO.Make_Unbuffered (AP (Standard_Out)); FIO.Make_Unbuffered (AP (Standard_Err)); end Ada.Text_IO;
27.004134
79
0.54816
0ea511ce661d4ab893faca9837f676845ea8347a
107,341
adb
Ada
fpga/wave/.autopilot/db/in_structure.bind.adb
dorin-ionita/RustHPC
903e5dd8f09213a5cc33f5e651d687e234944e84
[ "MIT" ]
2
2021-06-22T19:23:55.000Z
2021-07-03T16:47:01.000Z
fpga/wave/.autopilot/db/in_structure.bind.adb
dorin-ionita/RustHPC
903e5dd8f09213a5cc33f5e651d687e234944e84
[ "MIT" ]
60
2019-11-05T14:12:34.000Z
2021-06-21T22:31:17.000Z
fpga/wave/.autopilot/db/in_structure.bind.adb
dorin-ionita/wireless-models-experiments
903e5dd8f09213a5cc33f5e651d687e234944e84
[ "MIT" ]
null
null
null
<?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></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>in_structure</name> <ret_bitwidth>1</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>x</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>y</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>scenario_nr_struct</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>scenario_structure_c</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>80</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>37</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_5"> <Value> <Obj> <type>0</type> <id>5</id> <name>y_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>52</item> <item>53</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>6</id> <name>x_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>54</item> <item>55</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>7</id> <name>scenario_nr_struct_l</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/home/dorin</first> <second class_id="12" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="13" tracking_level="0" version="0"> <first class_id="14" tracking_level="0" version="0"> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>56</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>8</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>57</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>10</id> <name>i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>31</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>59</item> <item>60</item> <item>61</item> <item>62</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>11</id> <name>i_cast</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>63</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>12</id> <name>tmp</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>64</item> <item>65</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>13</id> <name>i_8</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>31</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>66</item> <item>68</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>14</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>69</item> <item>70</item> <item>71</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>16</id> <name>tmp_s</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>73</item> <item>74</item> <item>76</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>17</id> <name>tmp_283</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>77</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>18</id> <name>scenario_structure_c</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>78</item> <item>80</item> <item>81</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>19</id> <name>tmp_284</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>82</item> <item>84</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>20</id> <name>tmp_285</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>86</item> <item>88</item> <item>89</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>21</id> <name>scenario_structure_c_34</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>90</item> <item>91</item> <item>92</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>22</id> <name>tmp_286</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>93</item> <item>95</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>23</id> <name>tmp_287</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>96</item> <item>97</item> <item>98</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>24</id> <name>scenario_structure_c_35</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>99</item> <item>100</item> <item>101</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>25</id> <name>tmp_288</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>34</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>102</item> <item>104</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>26</id> <name>tmp_289</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>105</item> <item>106</item> <item>107</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>27</id> <name>scenario_structure_c_36</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>108</item> <item>109</item> <item>110</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>28</id> <name>scenario_structure_c_37</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>111</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>29</id> <name>tmp_160</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>112</item> <item>113</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>30</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>114</item> <item>115</item> <item>116</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>32</id> <name>scenario_structure_c_38</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>117</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>33</id> <name>tmp_161</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>118</item> <item>119</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>34</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>120</item> <item>121</item> <item>122</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>36</id> <name>scenario_structure_c_39</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>123</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>37</id> <name>tmp_162</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>124</item> <item>125</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>38</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>126</item> <item>127</item> <item>128</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>40</id> <name>scenario_structure_c_40</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>129</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>41</id> <name>tmp_163</name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>130</item> <item>131</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>42</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>75</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>75</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>132</item> <item>133</item> <item>134</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>44</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>76</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>135</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>46</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>72</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>72</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>136</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>48</id> <name>p_0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>138</item> <item>139</item> <item>141</item> <item>142</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>49</id> <name></name> <fileName>wave2/.apc/main.c</fileName> <fileDirectory>/home/dorin</fileDirectory> <lineNumber>79</lineNumber> <contextFuncName>in_structure</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dorin</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>wave2/.apc/main.c</first> <second>in_structure</second> </first> <second>79</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>143</item> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_42"> <Value> <Obj> <type>2</type> <id>58</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>31</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_43"> <Value> <Obj> <type>2</type> <id>67</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>31</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_44"> <Value> <Obj> <type>2</type> <id>75</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_45"> <Value> <Obj> <type>2</type> <id>79</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_46"> <Value> <Obj> <type>2</type> <id>83</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>34</bitwidth> </Value> <const_type>0</const_type> <content>6</content> </item> <item class_id_reference="16" object_id="_47"> <Value> <Obj> <type>2</type> <id>87</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>30</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_48"> <Value> <Obj> <type>2</type> <id>94</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>34</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_49"> <Value> <Obj> <type>2</type> <id>103</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>34</bitwidth> </Value> <const_type>0</const_type> <content>3</content> </item> <item class_id_reference="16" object_id="_50"> <Value> <Obj> <type>2</type> <id>137</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_51"> <Value> <Obj> <type>2</type> <id>140</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_52"> <Obj> <type>3</type> <id>9</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>5</item> <item>6</item> <item>7</item> <item>8</item> </node_objs> </item> <item class_id_reference="18" object_id="_53"> <Obj> <type>3</type> <id>15</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>10</item> <item>11</item> <item>12</item> <item>13</item> <item>14</item> </node_objs> </item> <item class_id_reference="18" object_id="_54"> <Obj> <type>3</type> <id>31</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>15</count> <item_version>0</item_version> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> </node_objs> </item> <item class_id_reference="18" object_id="_55"> <Obj> <type>3</type> <id>35</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>32</item> <item>33</item> <item>34</item> </node_objs> </item> <item class_id_reference="18" object_id="_56"> <Obj> <type>3</type> <id>39</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>36</item> <item>37</item> <item>38</item> </node_objs> </item> <item class_id_reference="18" object_id="_57"> <Obj> <type>3</type> <id>43</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>3</count> <item_version>0</item_version> <item>40</item> <item>41</item> <item>42</item> </node_objs> </item> <item class_id_reference="18" object_id="_58"> <Obj> <type>3</type> <id>45</id> <name>._crit_edge3</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>44</item> </node_objs> </item> <item class_id_reference="18" object_id="_59"> <Obj> <type>3</type> <id>47</id> <name>._crit_edge1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>46</item> </node_objs> </item> <item class_id_reference="18" object_id="_60"> <Obj> <type>3</type> <id>50</id> <name>._crit_edge</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>48</item> <item>49</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>87</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_61"> <id>53</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>5</sink_obj> </item> <item class_id_reference="20" object_id="_62"> <id>55</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>6</sink_obj> </item> <item class_id_reference="20" object_id="_63"> <id>56</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_64"> <id>57</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_65"> <id>59</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_66"> <id>60</id> <edge_type>2</edge_type> <source_obj>9</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_67"> <id>61</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_68"> <id>62</id> <edge_type>2</edge_type> <source_obj>47</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_69"> <id>63</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_70"> <id>64</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_71"> <id>65</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_72"> <id>66</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>13</sink_obj> </item> <item class_id_reference="20" object_id="_73"> <id>68</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>13</sink_obj> </item> <item class_id_reference="20" object_id="_74"> <id>69</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_75"> <id>70</id> <edge_type>2</edge_type> <source_obj>50</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_76"> <id>71</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_77"> <id>74</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_78"> <id>76</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_79"> <id>77</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_80"> <id>78</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_81"> <id>80</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_82"> <id>81</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_83"> <id>82</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_84"> <id>84</id> <edge_type>1</edge_type> <source_obj>83</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_85"> <id>88</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_86"> <id>89</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_87"> <id>90</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_88"> <id>91</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_89"> <id>92</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_90"> <id>93</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_91"> <id>95</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_92"> <id>97</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_93"> <id>98</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_94"> <id>99</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_95"> <id>100</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_96"> <id>101</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_97"> <id>102</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_98"> <id>104</id> <edge_type>1</edge_type> <source_obj>103</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_99"> <id>106</id> <edge_type>1</edge_type> <source_obj>87</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_100"> <id>107</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_101"> <id>108</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_102"> <id>109</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_103"> <id>110</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_104"> <id>111</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_105"> <id>112</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_106"> <id>113</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_107"> <id>114</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_108"> <id>115</id> <edge_type>2</edge_type> <source_obj>47</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_109"> <id>116</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_110"> <id>117</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_111"> <id>118</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_112"> <id>119</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_113"> <id>120</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_114"> <id>121</id> <edge_type>2</edge_type> <source_obj>47</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_115"> <id>122</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_116"> <id>123</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_117"> <id>124</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_118"> <id>125</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_119"> <id>126</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_120"> <id>127</id> <edge_type>2</edge_type> <source_obj>45</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_121"> <id>128</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_122"> <id>129</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_123"> <id>130</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_124"> <id>131</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_125"> <id>132</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_126"> <id>133</id> <edge_type>2</edge_type> <source_obj>45</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_127"> <id>134</id> <edge_type>2</edge_type> <source_obj>50</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_128"> <id>135</id> <edge_type>2</edge_type> <source_obj>47</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_129"> <id>136</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_130"> <id>138</id> <edge_type>1</edge_type> <source_obj>137</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>139</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>141</id> <edge_type>1</edge_type> <source_obj>140</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>142</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>143</id> <edge_type>1</edge_type> <source_obj>48</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>144</id> <edge_type>2</edge_type> <source_obj>9</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>145</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>146</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>147</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>148</id> <edge_type>2</edge_type> <source_obj>31</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>149</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>150</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>151</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>152</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>153</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>154</id> <edge_type>2</edge_type> <source_obj>43</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>155</id> <edge_type>2</edge_type> <source_obj>45</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>156</id> <edge_type>2</edge_type> <source_obj>47</source_obj> <sink_obj>15</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_148"> <mId>1</mId> <mTag>in_structure</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>4</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_149"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>9</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_150"> <mId>3</mId> <mTag>Loop 1</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>7</count> <item_version>0</item_version> <item>15</item> <item>31</item> <item>35</item> <item>39</item> <item>43</item> <item>45</item> <item>47</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_151"> <mId>4</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>50</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_152"> <states class_id="25" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_153"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_154"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_155"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_156"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_157"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_158"> <id>2</id> <operations> <count>18</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_159"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_160"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_161"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_162"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_163"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_164"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_165"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_166"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_167"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_168"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_169"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_170"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_171"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_172"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_173"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_174"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_175"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_176"> <id>28</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_177"> <id>3</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_178"> <id>28</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_179"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_180"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_181"> <id>32</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_182"> <id>4</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_183"> <id>32</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_184"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_185"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_186"> <id>36</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_187"> <id>5</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_188"> <id>36</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_189"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_190"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_191"> <id>40</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_192"> <id>6</id> <operations> <count>7</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_193"> <id>40</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_194"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_195"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_196"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_197"> <id>46</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_198"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_199"> <id>49</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_200"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>25</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_201"> <inState>2</inState> <outState>3</outState> <condition> <id>26</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>12</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_202"> <inState>2</inState> <outState>6</outState> <condition> <id>27</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>12</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_203"> <inState>3</inState> <outState>4</outState> <condition> <id>29</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>29</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_204"> <inState>3</inState> <outState>6</outState> <condition> <id>30</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>29</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_205"> <inState>4</inState> <outState>5</outState> <condition> <id>32</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>33</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_206"> <inState>4</inState> <outState>6</outState> <condition> <id>33</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>33</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_207"> <inState>5</inState> <outState>6</outState> <condition> <id>35</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_208"> <inState>6</inState> <outState>2</outState> <condition> <id>38</id> <sop> <count>4</count> <item_version>0</item_version> <item> <count>2</count> <item_version>0</item_version> <item> <first> <first>12</first> <second>0</second> </first> <second>0</second> </item> <item> <first> <first>29</first> <second>0</second> </first> <second>1</second> </item> </item> <item> <count>2</count> <item_version>0</item_version> <item> <first> <first>12</first> <second>0</second> </first> <second>0</second> </item> <item> <first> <first>33</first> <second>0</second> </first> <second>1</second> </item> </item> <item> <count>2</count> <item_version>0</item_version> <item> <first> <first>12</first> <second>0</second> </first> <second>0</second> </item> <item> <first> <first>37</first> <second>0</second> </first> <second>1</second> </item> </item> <item> <count>2</count> <item_version>0</item_version> <item> <first> <first>12</first> <second>0</second> </first> <second>0</second> </item> <item> <first> <first>41</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>37</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>5</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>6</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>7</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>10</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>12</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>13</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>24</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>29</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>33</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>37</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>38</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>4</first> <second>1</second> </second> </item> <item> <first>41</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>48</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>5</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>9</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>31</first> <second> <first>1</first> <second>2</second> </second> </item> <item> <first>35</first> <second> <first>2</first> <second>3</second> </second> </item> <item> <first>39</first> <second> <first>3</first> <second>4</second> </second> </item> <item> <first>43</first> <second> <first>4</first> <second>5</second> </second> </item> <item> <first>45</first> <second> <first>5</first> <second>5</second> </second> </item> <item> <first>47</first> <second> <first>5</first> <second>5</second> </second> </item> <item> <first>50</first> <second> <first>5</first> <second>5</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="44" tracking_level="0" version="0"> <count>25</count> <item_version>0</item_version> <item class_id="45" tracking_level="0" version="0"> <first>34</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>40</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>46</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>53</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>60</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>67</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>74</first> <second> <count>8</count> <item_version>0</item_version> <item>28</item> <item>28</item> <item>32</item> <item>32</item> <item>36</item> <item>36</item> <item>40</item> <item>40</item> </second> </item> <item> <first>83</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>94</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>102</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>106</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>110</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>115</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>121</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>129</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>134</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>140</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>149</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>155</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>164</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>170</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>179</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>184</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>189</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>194</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="47" tracking_level="0" version="0"> <count>21</count> <item_version>0</item_version> <item class_id="48" tracking_level="0" version="0"> <first>i_8_fu_115</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>i_cast_fu_106</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>i_phi_fu_83</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>p_0_phi_fu_94</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>scenario_structure_c_34_gep_fu_53</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>scenario_structure_c_35_gep_fu_60</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>scenario_structure_c_36_gep_fu_67</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>scenario_structure_c_gep_fu_46</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>tmp_160_fu_179</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>tmp_161_fu_184</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>tmp_162_fu_189</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>tmp_163_fu_194</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>tmp_283_fu_129</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>tmp_284_fu_134</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>tmp_285_fu_140</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>tmp_286_fu_149</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>tmp_287_fu_155</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>tmp_288_fu_164</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>tmp_289_fu_170</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>tmp_fu_110</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>tmp_s_fu_121</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>3</count> <item_version>0</item_version> <item> <first>scenario_nr_struct_l_load_fu_102</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>x_read_read_fu_40</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>y_read_read_fu_34</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="49" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="50" tracking_level="0" version="0"> <first class_id="51" tracking_level="0" version="0"> <first>scenario_structure_c</first> <second>0</second> </first> <second> <count>8</count> <item_version>0</item_version> <item>28</item> <item>28</item> <item>32</item> <item>32</item> <item>36</item> <item>36</item> <item>40</item> <item>40</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>14</count> <item_version>0</item_version> <item> <first>79</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>90</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>199</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>205</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>211</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>216</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>220</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>225</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>230</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>235</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>240</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>245</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>249</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>253</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>14</count> <item_version>0</item_version> <item> <first>i_8_reg_220</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>i_reg_79</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>p_0_reg_90</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> <item> <first>scenario_nr_struct_l_reg_211</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>scenario_structure_c_34_reg_230</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>scenario_structure_c_35_reg_235</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>scenario_structure_c_36_reg_240</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>scenario_structure_c_reg_225</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>tmp_160_reg_245</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>tmp_161_reg_249</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>tmp_162_reg_253</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>tmp_reg_216</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>x_read_reg_205</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>y_read_reg_199</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>2</count> <item_version>0</item_version> <item> <first>79</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>90</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>2</count> <item_version>0</item_version> <item> <first>i_reg_79</first> <second> <count>1</count> <item_version>0</item_version> <item>10</item> </second> </item> <item> <first>p_0_reg_90</first> <second> <count>1</count> <item_version>0</item_version> <item>48</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="52" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="53" tracking_level="0" version="0"> <first>scenario_nr_struct</first> <second> <count>0</count> <item_version>0</item_version> </second> </item> <item> <first>scenario_structure_c(p0)</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>load</first> <second> <count>8</count> <item_version>0</item_version> <item>28</item> <item>28</item> <item>32</item> <item>32</item> <item>36</item> <item>36</item> <item>40</item> <item>40</item> </second> </item> </second> </item> <item> <first>x</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> </second> </item> <item> <first>y</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="54" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>4</first> <second>RAM</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
24.401228
73
0.573751
cb70d5beacdb93faa3b5e3c39d702131b54d5424
5,518
ads
Ada
llvm-gcc-4.2-2.9/gcc/ada/a-intnam-rtems.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/a-intnam-rtems.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/a-intnam-rtems.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- A D A . I N T E R R U P T S . N A M E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1991-2002 Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- -- The GNARL files that were developed for RTEMS are maintained by On-Line -- -- Applications Research Corporation (http://www.oarcorp.com) in coopera- -- -- tion with Ada Core Technologies Inc. and Florida State University. -- -- -- ------------------------------------------------------------------------------ -- This is a RTEMS version of this package -- -- The following signals are reserved by the run time: -- -- SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGTRAP, SIGABRT, SIGINT, -- SIGALRM, SIGEMT, SIGKILL -- -- The pragma Unreserve_All_Interrupts affects the following signal(s): -- -- SIGINT: made available for Ada handlers -- This target-dependent package spec contains names of interrupts -- supported by the local system. with System.OS_Interface; -- used for names of interrupts package Ada.Interrupts.Names is -- Beware that the mapping of names to signals may be -- many-to-one. There may be aliases. Also, for all -- signal names that are not supported on the current system -- the value of the corresponding constant will be zero. SIGHUP : constant Interrupt_ID := System.OS_Interface.SIGHUP; -- hangup SIGINT : constant Interrupt_ID := System.OS_Interface.SIGINT; -- interrupt (rubout) SIGQUIT : constant Interrupt_ID := System.OS_Interface.SIGQUIT; -- quit (ASCD FS) SIGILL : constant Interrupt_ID := System.OS_Interface.SIGILL; -- illegal instruction (not reset) SIGTRAP : constant Interrupt_ID := System.OS_Interface.SIGTRAP; -- trace trap (not reset) SIGIOT : constant Interrupt_ID := System.OS_Interface.SIGIOT; -- IOT instruction SIGABRT : constant Interrupt_ID := -- used by abort, System.OS_Interface.SIGABRT; -- replace SIGIOT in the future SIGEMT : constant Interrupt_ID := System.OS_Interface.SIGEMT; -- EMT instruction SIGFPE : constant Interrupt_ID := System.OS_Interface.SIGFPE; -- floating point exception SIGKILL : constant Interrupt_ID := System.OS_Interface.SIGKILL; -- kill (cannot be caught or ignored) SIGBUS : constant Interrupt_ID := System.OS_Interface.SIGBUS; -- bus error SIGSEGV : constant Interrupt_ID := System.OS_Interface.SIGSEGV; -- segmentation violation SIGSYS : constant Interrupt_ID := System.OS_Interface.SIGSYS; -- bad argument to system call SIGPIPE : constant Interrupt_ID := -- write on a pipe with System.OS_Interface.SIGPIPE; -- no one to read it SIGALRM : constant Interrupt_ID := System.OS_Interface.SIGALRM; -- alarm clock SIGTERM : constant Interrupt_ID := System.OS_Interface.SIGTERM; -- software termination signal from kill SIGUSR1 : constant Interrupt_ID := System.OS_Interface.SIGUSR1; -- user defined signal 1 SIGUSR2 : constant Interrupt_ID := System.OS_Interface.SIGUSR2; -- user defined signal 2 end Ada.Interrupts.Names;
47.162393
79
0.55473
4abf37ef5c874d654025c45666472e0d000ee9aa
2,297
ads
Ada
ada-execution_time.ads
mgrojo/adalib
dc1355a5b65c2843e702ac76252addb2caf3c56b
[ "BSD-3-Clause" ]
15
2018-07-08T07:09:19.000Z
2021-11-21T09:58:55.000Z
ada-execution_time.ads
mgrojo/adalib
dc1355a5b65c2843e702ac76252addb2caf3c56b
[ "BSD-3-Clause" ]
4
2019-11-17T20:04:33.000Z
2021-08-29T21:24:55.000Z
ada-execution_time.ads
mgrojo/adalib
dc1355a5b65c2843e702ac76252addb2caf3c56b
[ "BSD-3-Clause" ]
3
2020-04-23T11:17:11.000Z
2021-08-29T19:31:09.000Z
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual --------------------------------------------------------------------------- with Ada.Real_Time; with Ada.Task_Identification; package Ada.Execution_Time is type CPU_Time is private; CPU_Time_First : constant CPU_Time; CPU_Time_Last : constant CPU_Time; CPU_Time_Unit : constant := implementation_defined; CPU_Tick : constant Ada.Real_Time.Time_Span; function Clock (T : in Ada.Task_Identification.Task_Id := Ada.Task_Identification.Current_Task) return CPU_Time; function "+" (Left : in CPU_Time; Right : in Ada.Real_Time.Time_Span) return CPU_Time; function "+" (Left : in Ada.Real_Time.Time_Span; Right : in CPU_Time) return CPU_Time; function "-" (Left : in CPU_Time; Right : in Ada.Real_Time.Time_Span) return CPU_Time; function "-" (Left : in CPU_Time; Right : in CPU_Time) return Ada.Real_Time.Time_Span; function "<" (Left : in CPU_Time; Right : in CPU_Time) return Boolean; function "<=" (Left : in CPU_Time; Right : in CPU_Time) return Boolean; function ">" (Left : in CPU_Time; Right : in CPU_Time) return Boolean; function ">=" (Left : in CPU_Time; Right : in CPU_Time) return Boolean; procedure Split (T : in CPU_Time; SC : out Ada.Real_Time.Seconds_Count; TS : out Ada.Real_Time.Time_Span); function Time_Of (SC : in Ada.Real_Time.Seconds_Count; TS : in Ada.Real_Time.Time_Span := Ada.Real_Time.Time_Span_Zero) return CPU_Time; private pragma Import (Ada, CPU_Time); pragma Import (Ada, CPU_Time_First); pragma Import (Ada, CPU_Time_Last); pragma Import (Ada, CPU_Tick); end Ada.Execution_Time;
30.223684
75
0.598607
188240966a097e5828ceb477e87562a1c4a520ad
19,421
ads
Ada
arch/ARM/STM32/devices/stm32l5/stm32-device.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
2
2018-05-16T03:56:39.000Z
2019-07-31T13:53:56.000Z
arch/ARM/STM32/devices/stm32l5/stm32-device.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
null
null
null
arch/ARM/STM32/devices/stm32l5/stm32-device.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2017, AdaCore -- -- -- -- 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, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of STMicroelectronics nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- -- -- -- This file is based on: -- -- -- -- @file stm32l43[5|7]xx.h -- -- @author MCD Application Team -- -- @version V1.1.0 -- -- @date 19-June-2014 -- -- @brief CMSIS STM32F407xx Device Peripheral Access Layer Header File. -- -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ -- This file provides declarations for devices on the STM32F40xxx MCUs -- manufactured by ST Microelectronics. For example, an STM32F405. with STM32_SVD; use STM32_SVD; with STM32.GPIO; use STM32.GPIO; with STM32.DAC; use STM32.DAC; with STM32.SPI; use STM32.SPI; with STM32.I2C; use STM32.I2C; with System; package STM32.Device is pragma Elaborate_Body; Unknown_Device : exception; -- Raised by the routines below for a device passed as an actual parameter -- when that device is not present on the given hardware instance. procedure Enable_Clock (This : aliased in out GPIO_Port); procedure Enable_Clock (Point : GPIO_Point); procedure Enable_Clock (Points : GPIO_Points); procedure Disable_Clock (This : aliased in out GPIO_Port); procedure Disable_Clock (Point : GPIO_Point); procedure Disable_Clock (Points : GPIO_Points); procedure Reset (This : aliased in out GPIO_Port) with Inline; procedure Reset (Point : GPIO_Point) with Inline; procedure Reset (Points : GPIO_Points) with Inline; function GPIO_Port_Representation (Port : GPIO_Port) return UInt4 with Inline; function S_NS_Periph (Addr : System.Address) return System.Address with Inline; GPIO_A : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOA_Base); GPIO_B : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOB_Base); GPIO_C : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOC_Base); GPIO_D : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOD_Base); GPIO_E : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOE_Base); GPIO_F : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOF_Base); GPIO_G : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOG_Base); GPIO_H : aliased GPIO_Port with Import, Volatile, Address => S_NS_Periph (GPIOH_Base); PA0 : aliased GPIO_Point := (GPIO_A'Access, Pin_0); PA1 : aliased GPIO_Point := (GPIO_A'Access, Pin_1); PA2 : aliased GPIO_Point := (GPIO_A'Access, Pin_2); PA3 : aliased GPIO_Point := (GPIO_A'Access, Pin_3); PA4 : aliased GPIO_Point := (GPIO_A'Access, Pin_4); PA5 : aliased GPIO_Point := (GPIO_A'Access, Pin_5); PA6 : aliased GPIO_Point := (GPIO_A'Access, Pin_6); PA7 : aliased GPIO_Point := (GPIO_A'Access, Pin_7); PA8 : aliased GPIO_Point := (GPIO_A'Access, Pin_8); PA9 : aliased GPIO_Point := (GPIO_A'Access, Pin_9); PA10 : aliased GPIO_Point := (GPIO_A'Access, Pin_10); PA11 : aliased GPIO_Point := (GPIO_A'Access, Pin_11); PA12 : aliased GPIO_Point := (GPIO_A'Access, Pin_12); PA13 : aliased GPIO_Point := (GPIO_A'Access, Pin_13); PA14 : aliased GPIO_Point := (GPIO_A'Access, Pin_14); PA15 : aliased GPIO_Point := (GPIO_A'Access, Pin_15); PB0 : aliased GPIO_Point := (GPIO_B'Access, Pin_0); PB1 : aliased GPIO_Point := (GPIO_B'Access, Pin_1); PB2 : aliased GPIO_Point := (GPIO_B'Access, Pin_2); PB3 : aliased GPIO_Point := (GPIO_B'Access, Pin_3); PB4 : aliased GPIO_Point := (GPIO_B'Access, Pin_4); PB5 : aliased GPIO_Point := (GPIO_B'Access, Pin_5); PB6 : aliased GPIO_Point := (GPIO_B'Access, Pin_6); PB7 : aliased GPIO_Point := (GPIO_B'Access, Pin_7); PB8 : aliased GPIO_Point := (GPIO_B'Access, Pin_8); PB9 : aliased GPIO_Point := (GPIO_B'Access, Pin_9); PB10 : aliased GPIO_Point := (GPIO_B'Access, Pin_10); PB11 : aliased GPIO_Point := (GPIO_B'Access, Pin_11); PB12 : aliased GPIO_Point := (GPIO_B'Access, Pin_12); PB13 : aliased GPIO_Point := (GPIO_B'Access, Pin_13); PB14 : aliased GPIO_Point := (GPIO_B'Access, Pin_14); PB15 : aliased GPIO_Point := (GPIO_B'Access, Pin_15); PC0 : aliased GPIO_Point := (GPIO_C'Access, Pin_0); PC1 : aliased GPIO_Point := (GPIO_C'Access, Pin_1); PC2 : aliased GPIO_Point := (GPIO_C'Access, Pin_2); PC3 : aliased GPIO_Point := (GPIO_C'Access, Pin_3); PC4 : aliased GPIO_Point := (GPIO_C'Access, Pin_4); PC5 : aliased GPIO_Point := (GPIO_C'Access, Pin_5); PC6 : aliased GPIO_Point := (GPIO_C'Access, Pin_6); PC7 : aliased GPIO_Point := (GPIO_C'Access, Pin_7); PC8 : aliased GPIO_Point := (GPIO_C'Access, Pin_8); PC9 : aliased GPIO_Point := (GPIO_C'Access, Pin_9); PC10 : aliased GPIO_Point := (GPIO_C'Access, Pin_10); PC11 : aliased GPIO_Point := (GPIO_C'Access, Pin_11); PC12 : aliased GPIO_Point := (GPIO_C'Access, Pin_12); PC13 : aliased GPIO_Point := (GPIO_C'Access, Pin_13); PC14 : aliased GPIO_Point := (GPIO_C'Access, Pin_14); PC15 : aliased GPIO_Point := (GPIO_C'Access, Pin_15); PD0 : aliased GPIO_Point := (GPIO_D'Access, Pin_0); PD1 : aliased GPIO_Point := (GPIO_D'Access, Pin_1); PD2 : aliased GPIO_Point := (GPIO_D'Access, Pin_2); PD3 : aliased GPIO_Point := (GPIO_D'Access, Pin_3); PD4 : aliased GPIO_Point := (GPIO_D'Access, Pin_4); PD5 : aliased GPIO_Point := (GPIO_D'Access, Pin_5); PD6 : aliased GPIO_Point := (GPIO_D'Access, Pin_6); PD7 : aliased GPIO_Point := (GPIO_D'Access, Pin_7); PD8 : aliased GPIO_Point := (GPIO_D'Access, Pin_8); PD9 : aliased GPIO_Point := (GPIO_D'Access, Pin_9); PD10 : aliased GPIO_Point := (GPIO_D'Access, Pin_10); PD11 : aliased GPIO_Point := (GPIO_D'Access, Pin_11); PD12 : aliased GPIO_Point := (GPIO_D'Access, Pin_12); PD13 : aliased GPIO_Point := (GPIO_D'Access, Pin_13); PD14 : aliased GPIO_Point := (GPIO_D'Access, Pin_14); PD15 : aliased GPIO_Point := (GPIO_D'Access, Pin_15); PE0 : aliased GPIO_Point := (GPIO_E'Access, Pin_0); PE1 : aliased GPIO_Point := (GPIO_E'Access, Pin_1); PE2 : aliased GPIO_Point := (GPIO_E'Access, Pin_2); PE3 : aliased GPIO_Point := (GPIO_E'Access, Pin_3); PE4 : aliased GPIO_Point := (GPIO_E'Access, Pin_4); PE5 : aliased GPIO_Point := (GPIO_E'Access, Pin_5); PE6 : aliased GPIO_Point := (GPIO_E'Access, Pin_6); PE7 : aliased GPIO_Point := (GPIO_E'Access, Pin_7); PE8 : aliased GPIO_Point := (GPIO_E'Access, Pin_8); PE9 : aliased GPIO_Point := (GPIO_E'Access, Pin_9); PE10 : aliased GPIO_Point := (GPIO_E'Access, Pin_10); PE11 : aliased GPIO_Point := (GPIO_E'Access, Pin_11); PE12 : aliased GPIO_Point := (GPIO_E'Access, Pin_12); PE13 : aliased GPIO_Point := (GPIO_E'Access, Pin_13); PE14 : aliased GPIO_Point := (GPIO_E'Access, Pin_14); PE15 : aliased GPIO_Point := (GPIO_E'Access, Pin_15); PF0 : aliased GPIO_Point := (GPIO_F'Access, Pin_0); PF1 : aliased GPIO_Point := (GPIO_F'Access, Pin_1); PF2 : aliased GPIO_Point := (GPIO_F'Access, Pin_2); PF3 : aliased GPIO_Point := (GPIO_F'Access, Pin_3); PF4 : aliased GPIO_Point := (GPIO_F'Access, Pin_4); PF5 : aliased GPIO_Point := (GPIO_F'Access, Pin_5); PF6 : aliased GPIO_Point := (GPIO_F'Access, Pin_6); PF7 : aliased GPIO_Point := (GPIO_F'Access, Pin_7); PF8 : aliased GPIO_Point := (GPIO_F'Access, Pin_8); PF9 : aliased GPIO_Point := (GPIO_F'Access, Pin_9); PF10 : aliased GPIO_Point := (GPIO_F'Access, Pin_10); PF11 : aliased GPIO_Point := (GPIO_F'Access, Pin_11); PF12 : aliased GPIO_Point := (GPIO_F'Access, Pin_12); PF13 : aliased GPIO_Point := (GPIO_F'Access, Pin_13); PF14 : aliased GPIO_Point := (GPIO_F'Access, Pin_14); PF15 : aliased GPIO_Point := (GPIO_F'Access, Pin_15); PG0 : aliased GPIO_Point := (GPIO_G'Access, Pin_0); PG1 : aliased GPIO_Point := (GPIO_G'Access, Pin_1); PG2 : aliased GPIO_Point := (GPIO_G'Access, Pin_2); PG3 : aliased GPIO_Point := (GPIO_G'Access, Pin_3); PG4 : aliased GPIO_Point := (GPIO_G'Access, Pin_4); PG5 : aliased GPIO_Point := (GPIO_G'Access, Pin_5); PG6 : aliased GPIO_Point := (GPIO_G'Access, Pin_6); PG7 : aliased GPIO_Point := (GPIO_G'Access, Pin_7); PG8 : aliased GPIO_Point := (GPIO_G'Access, Pin_8); PG9 : aliased GPIO_Point := (GPIO_G'Access, Pin_9); PG10 : aliased GPIO_Point := (GPIO_G'Access, Pin_10); PG11 : aliased GPIO_Point := (GPIO_G'Access, Pin_11); PG12 : aliased GPIO_Point := (GPIO_G'Access, Pin_12); PG13 : aliased GPIO_Point := (GPIO_G'Access, Pin_13); PG14 : aliased GPIO_Point := (GPIO_G'Access, Pin_14); PG15 : aliased GPIO_Point := (GPIO_G'Access, Pin_15); PH0 : aliased GPIO_Point := (GPIO_H'Access, Pin_0); PH1 : aliased GPIO_Point := (GPIO_H'Access, Pin_1); PH2 : aliased GPIO_Point := (GPIO_H'Access, Pin_2); PH3 : aliased GPIO_Point := (GPIO_H'Access, Pin_3); PH4 : aliased GPIO_Point := (GPIO_H'Access, Pin_4); PH5 : aliased GPIO_Point := (GPIO_H'Access, Pin_5); PH6 : aliased GPIO_Point := (GPIO_H'Access, Pin_6); PH7 : aliased GPIO_Point := (GPIO_H'Access, Pin_7); PH8 : aliased GPIO_Point := (GPIO_H'Access, Pin_8); PH9 : aliased GPIO_Point := (GPIO_H'Access, Pin_9); PH10 : aliased GPIO_Point := (GPIO_H'Access, Pin_10); PH11 : aliased GPIO_Point := (GPIO_H'Access, Pin_11); PH12 : aliased GPIO_Point := (GPIO_H'Access, Pin_12); PH13 : aliased GPIO_Point := (GPIO_H'Access, Pin_13); PH14 : aliased GPIO_Point := (GPIO_H'Access, Pin_14); PH15 : aliased GPIO_Point := (GPIO_H'Access, Pin_15); GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function; GPIO_AF_MCO_0 : constant GPIO_Alternate_Function; GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function; GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function; GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function; GPIO_AF_TIM1_1 : constant GPIO_Alternate_Function; GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function; GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function; GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function; GPIO_AF_TIM9_3 : constant GPIO_Alternate_Function; GPIO_AF_TIM10_3 : constant GPIO_Alternate_Function; GPIO_AF_TIM11_3 : constant GPIO_Alternate_Function; GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function; GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function; GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function; GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function; GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function; GPIO_AF_I2S2_5 : constant GPIO_Alternate_Function; GPIO_AF_I2S2ext_5 : constant GPIO_Alternate_Function; GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function; GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function; GPIO_AF_I2Sext_6 : constant GPIO_Alternate_Function; GPIO_AF_I2S3ext_7 : constant GPIO_Alternate_Function; GPIO_AF_USART1_7 : constant GPIO_Alternate_Function; GPIO_AF_USART2_7 : constant GPIO_Alternate_Function; GPIO_AF_USART3_7 : constant GPIO_Alternate_Function; GPIO_AF_UART4_8 : constant GPIO_Alternate_Function; GPIO_AF_UART5_8 : constant GPIO_Alternate_Function; GPIO_AF_USART6_8 : constant GPIO_Alternate_Function; GPIO_AF_CAN1_9 : constant GPIO_Alternate_Function; GPIO_AF_CAN2_9 : constant GPIO_Alternate_Function; GPIO_AF_TIM12_9 : constant GPIO_Alternate_Function; GPIO_AF_TIM13_9 : constant GPIO_Alternate_Function; GPIO_AF_TIM14_9 : constant GPIO_Alternate_Function; GPIO_AF_OTG_FS_10 : constant GPIO_Alternate_Function; GPIO_AF_OTG_HS_10 : constant GPIO_Alternate_Function; GPIO_AF_ETH_11 : constant GPIO_Alternate_Function; GPIO_AF_FMC_12 : constant GPIO_Alternate_Function; GPIO_AF_OTG_FS_12 : constant GPIO_Alternate_Function; GPIO_AF_DCMI_13 : constant GPIO_Alternate_Function; GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function; DAC : aliased Digital_To_Analog_Converter with Import, Volatile, Address => DAC_Base; DAC_Channel_1_IO : GPIO_Point renames PA4; DAC_Channel_2_IO : GPIO_Point renames PA5; procedure Enable_Clock (This : aliased in out Digital_To_Analog_Converter); procedure Reset (This : aliased in out Digital_To_Analog_Converter); Internal_I2C_Port_1 : aliased Internal_I2C_Port with Import, Volatile, Address => S_NS_Periph (I2C1_Base); Internal_I2C_Port_2 : aliased Internal_I2C_Port with Import, Volatile, Address => S_NS_Periph (I2C2_Base); Internal_I2C_Port_3 : aliased Internal_I2C_Port with Import, Volatile, Address => S_NS_Periph (I2C3_Base); I2C_1 : aliased I2C_Port (Internal_I2C_Port_1'Access); I2C_2 : aliased I2C_Port (Internal_I2C_Port_2'Access); I2C_3 : aliased I2C_Port (Internal_I2C_Port_3'Access); type I2C_Port_Id is (I2C_Id_1, I2C_Id_2, I2C_Id_3); function As_Port_Id (Port : I2C_Port) return I2C_Port_Id with Inline; procedure Enable_Clock (This : I2C_Port); procedure Enable_Clock (This : I2C_Port_Id); procedure Reset (This : I2C_Port); procedure Reset (This : I2C_Port_Id); Internal_SPI_1 : aliased Internal_SPI_Port with Import, Volatile, Address => S_NS_Periph (SPI1_Base); Internal_SPI_2 : aliased Internal_SPI_Port with Import, Volatile, Address => S_NS_Periph (SPI2_Base); Internal_SPI_3 : aliased Internal_SPI_Port with Import, Volatile, Address => S_NS_Periph (SPI3_Base); SPI_1 : aliased SPI_Port (Internal_SPI_1'Access); SPI_2 : aliased SPI_Port (Internal_SPI_2'Access); SPI_3 : aliased SPI_Port (Internal_SPI_3'Access); procedure Enable_Clock (This : SPI_Port); procedure Reset (This : in out SPI_Port); private GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_MCO_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function := 0; GPIO_AF_TIM1_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function := 1; GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function := 2; GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_TIM9_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_TIM10_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_TIM11_3 : constant GPIO_Alternate_Function := 3; GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function := 4; GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_I2S2_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_I2S2ext_5 : constant GPIO_Alternate_Function := 5; GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_I2Sext_6 : constant GPIO_Alternate_Function := 6; GPIO_AF_I2S3ext_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_USART1_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_USART2_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_USART3_7 : constant GPIO_Alternate_Function := 7; GPIO_AF_UART4_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_UART5_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_USART6_8 : constant GPIO_Alternate_Function := 8; GPIO_AF_CAN1_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_CAN2_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_TIM12_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_TIM13_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_TIM14_9 : constant GPIO_Alternate_Function := 9; GPIO_AF_OTG_FS_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_OTG_HS_10 : constant GPIO_Alternate_Function := 10; GPIO_AF_ETH_11 : constant GPIO_Alternate_Function := 11; GPIO_AF_FMC_12 : constant GPIO_Alternate_Function := 12; GPIO_AF_OTG_FS_12 : constant GPIO_Alternate_Function := 12; GPIO_AF_DCMI_13 : constant GPIO_Alternate_Function := 13; GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function := 15; end STM32.Device;
55.173295
89
0.669636
187e6efa4a7c9a5ad726aadd15f7f5fe5c952aa4
5,355
adb
Ada
3-mid/opengl/source/lean/model/opengl-model-segment_line.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
1
2022-01-20T07:13:42.000Z
2022-01-20T07:13:42.000Z
3-mid/opengl/source/lean/model/opengl-model-segment_line.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
null
null
null
3-mid/opengl/source/lean/model/opengl-model-segment_line.adb
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
null
null
null
with openGL.Primitive.indexed, openGL.Primitive, ada.unchecked_Deallocation; package body openGL.Model.segment_line is function to_segment_line_Model (Color : in openGL.Color) return Item is Self : constant Item := (Model.item with +Color, site_Vectors.empty_Vector, others => <>); begin return Self; end to_segment_line_Model; function new_segment_line_Model (Color : in openGL.Color) return View is begin return new Item' (to_segment_line_Model (Color)); end new_segment_line_Model; overriding function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; Fonts : in Font.font_id_Map_of_font) return Geometry.views is pragma unreferenced (Textures, Fonts); use Geometry.colored, Primitive, Primitive.indexed, ada.Containers; vertex_Count : constant Index_t := Index_t (Self.Points.Length); indices_Count : constant long_Index_t := long_Index_t (vertex_Count); the_Indices : aliased Indices := (1 .. indices_Count => <>); begin if Self.Points.Length <= 2 then return (1..0 => <>); end if; for i in the_Indices'Range loop the_Indices (i) := Index_t (i); end loop; Self.Geometry := Geometry.colored.new_Geometry; Self.Geometry.is_Transparent (False); Self.Geometry.Vertices_are (Self.Vertices (1 .. Index_t (Self.vertex_Count))); Self.Geometry.add (Primitive.view (new_Primitive (Line_Strip, the_Indices))); return (1 => Self.Geometry.all'Access); end to_GL_Geometries; function Site (Self : in Item; for_End : in Integer) return Vector_3 is begin return Self.Vertices (Index_t (for_End)).Site; end Site; function segment_Count (Self : in Item) return Natural is begin return Natural (Self.Points.Length) - 1; end segment_Count; procedure add_1st_Segment (Self : in out Item; start_Site : in Vector_3; end_Site : in Vector_3) is use site_Vectors; begin pragma assert (Self.Points.Is_Empty); Self.Points.append (start_Site); Self.Points.append (end_Site); Self.vertex_Count := Self.vertex_Count + 1; Self.Vertices (Index_t (Self.vertex_Count)).Site := start_Site; Self.Vertices (Index_t (Self.vertex_Count)).Color := (Self.Color, opaque_Value); Self.vertex_Count := Self.vertex_Count + 1; Self.Vertices (Index_t (Self.vertex_Count)).Site := end_Site; Self.Vertices (Index_t (Self.vertex_Count)).Color := (Self.Color, opaque_Value); Self.needs_Rebuild := True; end add_1st_Segment; procedure add_Segment (Self : in out Item; end_Site : in Vector_3) is use type ada.Containers.Count_type; procedure deallocate is new ada.unchecked_Deallocation (Geometry.colored.Vertex_array, vertex_Array_view); begin pragma assert (not Self.Points.is_Empty); Self.Points.append (end_Site); if Self.Points.Length > Self.Vertices'Length then declare new_Vertices : constant vertex_Array_view := new Geometry.colored.Vertex_array (1 .. 2 * Self.Vertices'Length); begin new_Vertices (1 .. Self.Vertices'Length) := Self.Vertices.all; deallocate (Self.Vertices); Self.Vertices := new_Vertices; end; end if; Self.vertex_Count := Self.vertex_Count + 1; Self.Vertices (Index_t (Self.vertex_Count)).Site := end_Site; Self.Vertices (Index_t (Self.vertex_Count)).Color := (Self.Color, opaque_Value); Self.needs_Rebuild := True; end add_Segment; procedure Site_is (Self : in out Item; Now : in Vector_3; for_End : in Integer) is begin Self.Vertices (Index_t (for_End)).Site := Now; Self.Points.replace_Element (for_End, Now); set_Bounds (Self); Self.needs_Rebuild := True; end Site_is; procedure Color_is (Self : in out Item; Now : in Color; for_End : in Integer) is begin Self.Vertices (Index_t (for_End)).Color := (+Now, opaque_Value); Self.needs_Rebuild := True; end Color_is; function Segments (Self : in Item) return Segments_t is the_Segments : Segments_t (1 .. Integer (Self.Points.Length) - 1); begin for Each in the_Segments'Range loop the_Segments (Each) := (First => Self.Points.Element (Each), Last => Self.Points.Element (Each + 1)); end loop; return the_Segments; end Segments; function Angle_in_xz_plane (the_Segment : in Segment) return Radians is use real_Functions; the_Vector : constant Vector_3 := the_Segment.Last - the_Segment.First; begin return arcTan (the_Vector (3) / the_Vector (1)); end Angle_in_xz_plane; end openGL.Model.segment_line;
28.184211
117
0.601867
0e7bce383743d651ca2407d83811aba04c7860f3
8,214
ads
Ada
tools-src/gnu/gcc/gcc/ada/a-wtedit.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
tools-src/gnu/gcc/gcc/ada/a-wtedit.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
tools-src/gnu/gcc/gcc/ada/a-wtedit.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . E D I T I N G -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-1997 Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package Ada.Wide_Text_IO.Editing is type Picture is private; function Valid (Pic_String : in String; Blank_When_Zero : in Boolean := False) return Boolean; function To_Picture (Pic_String : in String; Blank_When_Zero : in Boolean := False) return Picture; function Pic_String (Pic : in Picture) return String; function Blank_When_Zero (Pic : in Picture) return Boolean; Max_Picture_Length : constant := 64; Picture_Error : exception; Default_Currency : constant Wide_String := "$"; Default_Fill : constant Wide_Character := ' '; Default_Separator : constant Wide_Character := ','; Default_Radix_Mark : constant Wide_Character := '.'; generic type Num is delta <> digits <>; Default_Currency : in Wide_String := Wide_Text_IO.Editing.Default_Currency; Default_Fill : in Wide_Character := Wide_Text_IO.Editing.Default_Fill; Default_Separator : in Wide_Character := Wide_Text_IO.Editing.Default_Separator; Default_Radix_Mark : in Wide_Character := Wide_Text_IO.Editing.Default_Radix_Mark; package Decimal_Output is function Length (Pic : in Picture; Currency : in Wide_String := Default_Currency) return Natural; function Valid (Item : Num; Pic : in Picture; Currency : in Wide_String := Default_Currency) return Boolean; function Image (Item : Num; Pic : in Picture; Currency : in Wide_String := Default_Currency; Fill : in Wide_Character := Default_Fill; Separator : in Wide_Character := Default_Separator; Radix_Mark : in Wide_Character := Default_Radix_Mark) return Wide_String; procedure Put (File : in File_Type; Item : Num; Pic : in Picture; Currency : in Wide_String := Default_Currency; Fill : in Wide_Character := Default_Fill; Separator : in Wide_Character := Default_Separator; Radix_Mark : in Wide_Character := Default_Radix_Mark); procedure Put (Item : Num; Pic : in Picture; Currency : in Wide_String := Default_Currency; Fill : in Wide_Character := Default_Fill; Separator : in Wide_Character := Default_Separator; Radix_Mark : in Wide_Character := Default_Radix_Mark); procedure Put (To : out Wide_String; Item : Num; Pic : in Picture; Currency : in Wide_String := Default_Currency; Fill : in Wide_Character := Default_Fill; Separator : in Wide_Character := Default_Separator; Radix_Mark : in Wide_Character := Default_Radix_Mark); end Decimal_Output; private MAX_PICSIZE : constant := 50; MAX_MONEYSIZE : constant := 10; Invalid_Position : constant := -1; subtype Pic_Index is Natural range 0 .. MAX_PICSIZE; type Picture_Record (Length : Pic_Index := 0) is record Expanded : String (1 .. Length); end record; type Format_Record is record Picture : Picture_Record; -- Read only Blank_When_Zero : Boolean; -- Read/write Original_BWZ : Boolean; -- The following components get written Star_Fill : Boolean := False; Radix_Position : Integer := Invalid_Position; Sign_Position, Second_Sign : Integer := Invalid_Position; Start_Float, End_Float : Integer := Invalid_Position; Start_Currency, End_Currency : Integer := Invalid_Position; Max_Leading_Digits : Integer := 0; Max_Trailing_Digits : Integer := 0; Max_Currency_Digits : Integer := 0; Floater : Wide_Character := '!'; -- Initialized to illegal value end record; type Picture is record Contents : Format_Record; end record; type Number_Attributes is record Negative : Boolean := False; Has_Fraction : Boolean := False; Start_Of_Int, End_Of_Int, Start_Of_Fraction, End_Of_Fraction : Integer := Invalid_Position; -- invalid value end record; function Parse_Number_String (Str : String) return Number_Attributes; -- Assumed format is 'IMAGE or Fixed_IO.Put format (depends on no -- trailing blanks...) procedure Precalculate (Pic : in out Format_Record); -- Precalculates fields from the user supplied data function Format_Number (Pic : Format_Record; Number : String; Currency_Symbol : Wide_String; Fill_Character : Wide_Character; Separator_Character : Wide_Character; Radix_Point : Wide_Character) return Wide_String; -- Formats number according to Pic function Expand (Picture : in String) return String; end Ada.Wide_Text_IO.Editing;
39.490385
78
0.529584
cb44fde89a588544cb6a516b4562c341f30ce856
3,641
ads
Ada
source/amf/uml/amf-umldi-uml_classifier_shapes-hash.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/uml/amf-umldi-uml_classifier_shapes-hash.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/uml/amf-umldi-uml_classifier_shapes-hash.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.UMLDI.UML_Classifier_Shapes.Hash is new AMF.Elements.Generic_Hash (UMLDI_UML_Classifier_Shape, UMLDI_UML_Classifier_Shape_Access);
72.82
96
0.407306
182cf14d61e00a018bed5c5b692acfcaf0ef608b
4,165
adb
Ada
problems/049/a049.adb
melwyncarlo/ProjectEuler
c4d30ed528ae6de82232f3d2044d608c6e8f1c37
[ "MIT" ]
null
null
null
problems/049/a049.adb
melwyncarlo/ProjectEuler
c4d30ed528ae6de82232f3d2044d608c6e8f1c37
[ "MIT" ]
null
null
null
problems/049/a049.adb
melwyncarlo/ProjectEuler
c4d30ed528ae6de82232f3d2044d608c6e8f1c37
[ "MIT" ]
null
null
null
with Ada.Text_IO; with Ada.Integer_Text_IO; -- Copyright 2021 Melwyn Francis Carlo procedure A049 is use Ada.Text_IO; use Ada.Integer_Text_IO; -- File Reference: http://www.naturalnumbers.org/primes.html N : constant Integer := 10; FT : File_Type; Last_Index : Natural; Prime_Num : String (1 .. 10); File_Name : constant String := "problems/003/PrimeNumbers_Upto_1000000"; Primes_Nums : array (Integer range 1 .. 1200, Integer range 1 .. N) of Integer := (others => (others => 0)); Primes_Digits_Occurrences : array (Integer range 1 .. 1200) of Integer := (others => 0); Prime_Digits : String (1 .. N) := (others => Character'Val (0)); Primes_Digits : array (Integer range 1 .. 1200) of String (1 .. N) := (others => (others => Character'Val (0))); Duplicate_Found : Boolean; I, J, K, L, M : Integer; begin I := 1; Open (FT, In_File, File_Name); while not End_Of_File (FT) loop Get_Line (FT, Prime_Num, Last_Index); if Integer'Value (Prime_Num (1 .. Last_Index)) >= 1000 then if Integer'Value (Prime_Num (1 .. Last_Index)) <= 9999 then Prime_Digits := "0000000000"; Prime_Digits (Integer'Value (Prime_Num (1 .. 1)) + 1) := '1'; Prime_Digits (Integer'Value (Prime_Num (2 .. 2)) + 1) := '1'; Prime_Digits (Integer'Value (Prime_Num (3 .. 3)) + 1) := '1'; Prime_Digits (Integer'Value (Prime_Num (4 .. 4)) + 1) := '1'; Duplicate_Found := False; for J in 1 .. I loop if Primes_Digits (J) = Prime_Digits then if Primes_Nums (J, N) = 0 then for K in 2 .. N loop if Primes_Nums (J, K) = 0 then Primes_Nums (J, K) := Integer'Value ( Prime_Num (1 .. Last_Index)); exit; end if; end loop; Primes_Digits_Occurrences (J) := Primes_Digits_Occurrences (J) + 1; end if; Duplicate_Found := True; exit; end if; end loop; if not Duplicate_Found then Primes_Digits_Occurrences (I) := 0; Primes_Nums (I, 1) := Integer'Value ( Prime_Num (1 .. Last_Index)); Primes_Digits (I) := Prime_Digits; I := I + 1; end if; end if; end if; end loop; Close (FT); J := 1; K := 1; L := 1; M := 1; J_Loop : while J <= I loop if Primes_Digits_Occurrences (J) >= 3 then K := 1; while K <= (N - 2) loop if Primes_Nums (J, K) = 0 then exit; end if; if Primes_Nums (J, K) /= 1487 then L := K + 1; while L <= (N - 1) loop if Primes_Nums (J, L) = 0 then exit; end if; M := L + 1; while M <= N loop if Primes_Nums (J, M) = 0 then exit; end if; if (Primes_Nums (J, M) - Primes_Nums (J, L)) = (Primes_Nums (J, L) - Primes_Nums (J, K)) then exit J_Loop; end if; M := M + 1; end loop; L := L + 1; end loop; end if; K := K + 1; end loop; end if; J := J + 1; end loop J_Loop; Put (Primes_Nums (J, K), Width => 0); Put (Primes_Nums (J, L), Width => 0); Put (Primes_Nums (J, M), Width => 0); end A049;
25.090361
78
0.416567
18f76d70d726d76adcbcc7df5ce49e5871c13740
3,399
ads
Ada
Ada95/samples/sample-header_handler.ads
neverware-mirrors/ncurses
931939e0d2765af13962820e59cb6629df3ee638
[ "X11" ]
269
2015-03-01T21:34:42.000Z
2022-03-30T23:07:18.000Z
Ada95/samples/sample-header_handler.ads
neverware-mirrors/ncurses
931939e0d2765af13962820e59cb6629df3ee638
[ "X11" ]
3
2020-10-09T15:00:37.000Z
2020-10-09T15:05:19.000Z
Ada95/samples/sample-header_handler.ads
neverware-mirrors/ncurses
931939e0d2765af13962820e59cb6629df3ee638
[ "X11" ]
97
2016-04-25T06:22:54.000Z
2022-03-30T23:07:19.000Z
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Header_Handler -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright 2020 Thomas E. Dickey -- -- Copyright 1998-2002,2003 Free Software Foundation, Inc. -- -- -- -- 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, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision: 1.11 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; -- This package handles the painting of the header line of the screen. -- package Sample.Header_Handler is procedure Init_Header_Handler; -- Initialize the handler for the headerlines. procedure Update_Header_Window; -- Update the information in the header window end Sample.Header_Handler;
61.8
78
0.444543
0e1beb570840570d6793946481f80e0baf6447d2
3,321
adb
Ada
gnoga_bar_codes.adb
jrcarter/Gnoga_Bar_Codes
1c10326ca1e5902e04788ca847fdca95a23c1db7
[ "BSD-3-Clause" ]
null
null
null
gnoga_bar_codes.adb
jrcarter/Gnoga_Bar_Codes
1c10326ca1e5902e04788ca847fdca95a23c1db7
[ "BSD-3-Clause" ]
null
null
null
gnoga_bar_codes.adb
jrcarter/Gnoga_Bar_Codes
1c10326ca1e5902e04788ca847fdca95a23c1db7
[ "BSD-3-Clause" ]
null
null
null
-- Widget for creating bar codes with Gnoga -- -- Copyright (C) 2018 by PragmAda Software Engineering -- -- Released under the terms of the 3-Clause BSD License. See https://opensource.org/licenses/BSD-3-Clause with Gnoga.Gui.Element.Canvas.Context_2D; with Gnoga.Types.Colors; package body Gnoga_Bar_Codes is procedure Create (Code : in out Bar_Code; Parent : in out Gnoga.Gui.Base.Base_Type'Class; Width : in Integer; Height : in Integer; ID : in String := "") is use type Gnoga.Gui.Element.Canvas.Canvas_Access; begin -- Create Code.Canvas := new Gnoga.Gui.Element.Canvas.Canvas_Type; Code.Canvas.Create (Parent => Parent, Width => Width, Height => Height, ID => ID); Code.Canvas.Dynamic; Code.Box := (Left => 0, Bottom => Height, Width => Width, Height => Height); end Create; Fit : Bar_Codes.Module_Box; procedure Generate (Code : in out Bar_Code; Kind : In Bar_Codes.Kind_Of_Code; Text : in String) is Rectangle : constant Gnoga.Types.Rectangle_Type := (X => 0, Y => 0, Width => Code.Box.Width, Height => Code.Box.Height); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; Last : Natural := Text'Last; Scale : Natural := 2; begin -- Generate Context.Get_Drawing_Context_2D (Canvas => Code.Canvas.all); Context.Fill_Color (Value => Gnoga.Types.Colors.White); Context.Fill_Rectangle (Rectangle => Rectangle); Truncate : loop exit Truncate when Last < Text'First; Fit := Bar_Codes.Fitting (Kind, Text (Text'First .. Last) ); case Kind is when Bar_Codes.Code_128 => null; when Bar_Codes.Code_QR => Scale := Code.Box.Width / Fit.Width; end case; exit Truncate when Scale * Fit.Width <= Rectangle.Width; Last := Last - 1; end loop Truncate; Fit := Bar_Codes.Fitting (Kind, Text (Text'First .. Last) ); Code.Kind := Kind; Code.Draw (Kind => Kind, Text => Text (Text'First .. Last) ); end Generate; procedure Filled_Rectangle (Code : in Bar_Code; Shape : in Bar_Codes.Module_Box) is use type Bar_Codes.Real; Scale_X : constant Positive := Code.Box.Width / Fit.Width; Scale_Y : constant Positive := Code.Box.Height / Fit.Height; Rectangle : Gnoga.Types.Rectangle_Type; Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; begin -- Filled_Rectangle Context.Get_Drawing_Context_2D (Canvas => Code.Canvas.all); Context.Fill_Color (Value => Gnoga.Types.Colors.Black); case Code.Kind is when Bar_Codes.Code_128 => -- And all other 1D bar codes Rectangle := (X => 2 * Shape.Left, Y => 0, Width => 2 * Shape.Width, Height => Code.Box.Height); when Bar_Codes.Code_QR => -- And all other 2D bar codes Rectangle := (X => Scale_X * Shape.Left, Y => Code.Box.Bottom - Scale_Y * Shape.Bottom - Scale_Y * Shape.Height, Width => Scale_X * Shape.Width, Height => Scale_Y * Shape.Height); end case; Context.Fill_Rectangle (Rectangle => Rectangle); end Filled_Rectangle; end Gnoga_Bar_Codes;
38.616279
127
0.616682
4ad63bfb87b138c823cb80143c918ad4fddd1809
54,046
ads
Ada
awa/plugins/awa-wikis/src/model/awa-wikis-models.ads
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
awa/plugins/awa-wikis/src/model/awa-wikis-models.ads
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
awa/plugins/awa-wikis/src/model/awa-wikis-models.ads
fuzzysloth/ada-awa
f9b921eeea29841667a028f2fc4528e4385d247a
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- AWA.Wikis.Models -- AWA.Wikis.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- Copyright (C) 2016 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 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- pragma Warnings (Off); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with ADO.Queries; with ADO.Queries.Loaders; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Objects.Enums; with Util.Beans.Basic.Lists; with AWA.Images.Models; with AWA.Storages.Models; with AWA.Users.Models; with AWA.Workspaces.Models; with Util.Beans.Methods; pragma Warnings (On); package AWA.Wikis.Models is pragma Style_Checks ("-mr"); type Format_Type is (FORMAT_CREOLE, FORMAT_HTML, FORMAT_MARKDOWN, FORMAT_DOTCLEAR, FORMAT_MEDIAWIKI, FORMAT_PHPBB); for Format_Type use (FORMAT_CREOLE => 0, FORMAT_HTML => 1, FORMAT_MARKDOWN => 2, FORMAT_DOTCLEAR => 3, FORMAT_MEDIAWIKI => 4, FORMAT_PHPBB => 5); package Format_Type_Objects is new Util.Beans.Objects.Enums (Format_Type); type Wiki_Space_Ref is new ADO.Objects.Object_Ref with null record; type Wiki_Page_Ref is new ADO.Objects.Object_Ref with null record; type Wiki_Content_Ref is new ADO.Objects.Object_Ref with null record; -- -------------------- -- Permission is granted to display a wiki page if there is -- an ACL entry between the wiki space and the user. -- -------------------- -- Create an object key for Wiki_Space. function Wiki_Space_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Wiki_Space from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Wiki_Space_Key (Id : in String) return ADO.Objects.Object_Key; Null_Wiki_Space : constant Wiki_Space_Ref; function "=" (Left, Right : Wiki_Space_Ref'Class) return Boolean; -- Set the wiki space identifier procedure Set_Id (Object : in out Wiki_Space_Ref; Value : in ADO.Identifier); -- Get the wiki space identifier function Get_Id (Object : in Wiki_Space_Ref) return ADO.Identifier; -- Set the wiki name procedure Set_Name (Object : in out Wiki_Space_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Wiki_Space_Ref; Value : in String); -- Get the wiki name function Get_Name (Object : in Wiki_Space_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Wiki_Space_Ref) return String; -- Set whether the wiki is public procedure Set_Is_Public (Object : in out Wiki_Space_Ref; Value : in Boolean); -- Get whether the wiki is public function Get_Is_Public (Object : in Wiki_Space_Ref) return Boolean; -- function Get_Version (Object : in Wiki_Space_Ref) return Integer; -- Set the wiki creation date. procedure Set_Create_Date (Object : in out Wiki_Space_Ref; Value : in Ada.Calendar.Time); -- Get the wiki creation date. function Get_Create_Date (Object : in Wiki_Space_Ref) return Ada.Calendar.Time; -- Set the left panel side wiki text for every page. procedure Set_Left_Side (Object : in out Wiki_Space_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Left_Side (Object : in out Wiki_Space_Ref; Value : in String); -- Get the left panel side wiki text for every page. function Get_Left_Side (Object : in Wiki_Space_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Left_Side (Object : in Wiki_Space_Ref) return String; -- Set the right panel wiki text for every page. procedure Set_Right_Side (Object : in out Wiki_Space_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Right_Side (Object : in out Wiki_Space_Ref; Value : in String); -- Get the right panel wiki text for every page. function Get_Right_Side (Object : in Wiki_Space_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Right_Side (Object : in Wiki_Space_Ref) return String; -- Set the default wiki page format. procedure Set_Format (Object : in out Wiki_Space_Ref; Value : in AWA.Wikis.Models.Format_Type); -- Get the default wiki page format. function Get_Format (Object : in Wiki_Space_Ref) return AWA.Wikis.Models.Format_Type; -- procedure Set_Workspace (Object : in out Wiki_Space_Ref; Value : in AWA.Workspaces.Models.Workspace_Ref'Class); -- function Get_Workspace (Object : in Wiki_Space_Ref) return AWA.Workspaces.Models.Workspace_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Wiki_Space_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Wiki_Space_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Wiki_Space_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Wiki_Space_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Wiki_Space_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Wiki_Space_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition WIKI_SPACE_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Wiki_Space_Ref); -- Copy of the object. procedure Copy (Object : in Wiki_Space_Ref; Into : in out Wiki_Space_Ref); -- -------------------- -- The wiki page represents a page with its versions. -- It refers to the last version which is currently visible. -- It has an optional preview image which defines -- the thumbnail preview of the last/current wiki content. -- -------------------- -- Create an object key for Wiki_Page. function Wiki_Page_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Wiki_Page from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Wiki_Page_Key (Id : in String) return ADO.Objects.Object_Key; Null_Wiki_Page : constant Wiki_Page_Ref; function "=" (Left, Right : Wiki_Page_Ref'Class) return Boolean; -- Set the wiki page identifier procedure Set_Id (Object : in out Wiki_Page_Ref; Value : in ADO.Identifier); -- Get the wiki page identifier function Get_Id (Object : in Wiki_Page_Ref) return ADO.Identifier; -- Set the wiki page name procedure Set_Name (Object : in out Wiki_Page_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Wiki_Page_Ref; Value : in String); -- Get the wiki page name function Get_Name (Object : in Wiki_Page_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Wiki_Page_Ref) return String; -- Set the last page version number procedure Set_Last_Version (Object : in out Wiki_Page_Ref; Value : in Integer); -- Get the last page version number function Get_Last_Version (Object : in Wiki_Page_Ref) return Integer; -- Set whether the wiki page is public procedure Set_Is_Public (Object : in out Wiki_Page_Ref; Value : in Boolean); -- Get whether the wiki page is public function Get_Is_Public (Object : in Wiki_Page_Ref) return Boolean; -- Set the page title procedure Set_Title (Object : in out Wiki_Page_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Title (Object : in out Wiki_Page_Ref; Value : in String); -- Get the page title function Get_Title (Object : in Wiki_Page_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Title (Object : in Wiki_Page_Ref) return String; -- function Get_Version (Object : in Wiki_Page_Ref) return Integer; -- Set a read counter which indicates how many times the page was read. procedure Set_Read_Count (Object : in out Wiki_Page_Ref; Value : in Integer); -- Get a read counter which indicates how many times the page was read. function Get_Read_Count (Object : in Wiki_Page_Ref) return Integer; -- Set the wiki page preview. procedure Set_Preview (Object : in out Wiki_Page_Ref; Value : in AWA.Images.Models.Image_Ref'Class); -- Get the wiki page preview. function Get_Preview (Object : in Wiki_Page_Ref) return AWA.Images.Models.Image_Ref'Class; -- Set the wiki space that this page belongs to procedure Set_Wiki (Object : in out Wiki_Page_Ref; Value : in AWA.Wikis.Models.Wiki_Space_Ref'Class); -- Get the wiki space that this page belongs to function Get_Wiki (Object : in Wiki_Page_Ref) return AWA.Wikis.Models.Wiki_Space_Ref'Class; -- Set the current content (or last version) procedure Set_Content (Object : in out Wiki_Page_Ref; Value : in AWA.Wikis.Models.Wiki_Content_Ref'Class); -- Get the current content (or last version) function Get_Content (Object : in Wiki_Page_Ref) return AWA.Wikis.Models.Wiki_Content_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Wiki_Page_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Wiki_Page_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Wiki_Page_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Wiki_Page_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Wiki_Page_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Wiki_Page_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition WIKI_PAGE_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Wiki_Page_Ref); -- Copy of the object. procedure Copy (Object : in Wiki_Page_Ref; Into : in out Wiki_Page_Ref); -- Create an object key for Wiki_Content. function Wiki_Content_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Wiki_Content from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Wiki_Content_Key (Id : in String) return ADO.Objects.Object_Key; Null_Wiki_Content : constant Wiki_Content_Ref; function "=" (Left, Right : Wiki_Content_Ref'Class) return Boolean; -- Set the wiki page content identifier procedure Set_Id (Object : in out Wiki_Content_Ref; Value : in ADO.Identifier); -- Get the wiki page content identifier function Get_Id (Object : in Wiki_Content_Ref) return ADO.Identifier; -- Set the wiki content creation date procedure Set_Create_Date (Object : in out Wiki_Content_Ref; Value : in Ada.Calendar.Time); -- Get the wiki content creation date function Get_Create_Date (Object : in Wiki_Content_Ref) return Ada.Calendar.Time; -- Set the wiki text content procedure Set_Content (Object : in out Wiki_Content_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Content (Object : in out Wiki_Content_Ref; Value : in String); -- Get the wiki text content function Get_Content (Object : in Wiki_Content_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Content (Object : in Wiki_Content_Ref) return String; -- Set the format type used used by the wiki content procedure Set_Format (Object : in out Wiki_Content_Ref; Value : in AWA.Wikis.Models.Format_Type); -- Get the format type used used by the wiki content function Get_Format (Object : in Wiki_Content_Ref) return AWA.Wikis.Models.Format_Type; -- Set the content comment string procedure Set_Save_Comment (Object : in out Wiki_Content_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Save_Comment (Object : in out Wiki_Content_Ref; Value : in String); -- Get the content comment string function Get_Save_Comment (Object : in Wiki_Content_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Save_Comment (Object : in Wiki_Content_Ref) return String; -- function Get_Version (Object : in Wiki_Content_Ref) return Integer; -- Set the wiki page version procedure Set_Page_Version (Object : in out Wiki_Content_Ref; Value : in Integer); -- Get the wiki page version function Get_Page_Version (Object : in Wiki_Content_Ref) return Integer; -- Set the wiki page that this Wiki_Content belongs to procedure Set_Page (Object : in out Wiki_Content_Ref; Value : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- Get the wiki page that this Wiki_Content belongs to function Get_Page (Object : in Wiki_Content_Ref) return AWA.Wikis.Models.Wiki_Page_Ref'Class; -- Set the page version author procedure Set_Author (Object : in out Wiki_Content_Ref; Value : in AWA.Users.Models.User_Ref'Class); -- Get the page version author function Get_Author (Object : in Wiki_Content_Ref) return AWA.Users.Models.User_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Wiki_Content_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Wiki_Content_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Wiki_Content_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Wiki_Content_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Wiki_Content_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Wiki_Content_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition WIKI_CONTENT_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Wiki_Content_Ref); -- Copy of the object. procedure Copy (Object : in Wiki_Content_Ref; Into : in out Wiki_Content_Ref); Query_Page_Access_Stats : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The information about an image used in a wiki page. -- -------------------- type Wiki_Image_Bean is abstract new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record -- the image folder identifier. Folder_Id : ADO.Identifier; -- the image file identifier. Id : ADO.Identifier; -- the file creation date. Create_Date : Ada.Calendar.Time; -- the file storage URI. Uri : Ada.Strings.Unbounded.Unbounded_String; -- the file storage URI. Storage : AWA.Storages.Models.Storage_Type; -- the file mime type. Mime_Type : Ada.Strings.Unbounded.Unbounded_String; -- the file size. File_Size : Integer; -- the image width. Width : Integer; -- the image height. Height : Integer; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Wiki_Image_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Image_Bean; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Image_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Wiki_Image_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; -- Read in the object the data from the query result and prepare to read the next row. -- If there is no row, raise the ADO.NOT_FOUND exception. procedure Read (Into : in out Wiki_Image_Bean; Stmt : in out ADO.Statements.Query_Statement'Class); -- Run the query controlled by <b>Context</b> and load the result in <b>Object</b>. procedure Load (Object : in out Wiki_Image_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Wiki_Image : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The information about an image used in a wiki page. -- -------------------- type Wiki_Image_Info is new Util.Beans.Basic.Bean with record -- the image folder identifier. Folder_Id : ADO.Identifier; -- the image file identifier. Id : ADO.Identifier; -- the file creation date. Create_Date : Ada.Calendar.Time; -- the file storage URI. Uri : Ada.Strings.Unbounded.Unbounded_String; -- the file storage URI. Storage : AWA.Storages.Models.Storage_Type; -- the file mime type. Mime_Type : Ada.Strings.Unbounded.Unbounded_String; -- the file size. File_Size : Integer; -- the image width. Width : Integer; -- the image height. Height : Integer; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Image_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Image_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Wiki_Image_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Wiki_Image_Info); package Wiki_Image_Info_Vectors renames Wiki_Image_Info_Beans.Vectors; subtype Wiki_Image_Info_List_Bean is Wiki_Image_Info_Beans.List_Bean; type Wiki_Image_Info_List_Bean_Access is access all Wiki_Image_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Image_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Wiki_Image_Info_Vector is Wiki_Image_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Image_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Wiki_Image_Get_Data : constant ADO.Queries.Query_Definition_Access; Query_Wiki_Image_Width_Get_Data : constant ADO.Queries.Query_Definition_Access; Query_Wiki_Image_Height_Get_Data : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The list of wikis. -- -------------------- type Wiki_Info is new Util.Beans.Basic.Bean with record -- the wiki space identifier. Id : ADO.Identifier; -- the wiki name. Name : Ada.Strings.Unbounded.Unbounded_String; -- whether the wiki is public. Is_Public : Boolean; -- the wiki creation date. Create_Date : Ada.Calendar.Time; -- the number of pages in the wiki. Page_Count : Integer; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Wiki_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Wiki_Info); package Wiki_Info_Vectors renames Wiki_Info_Beans.Vectors; subtype Wiki_Info_List_Bean is Wiki_Info_Beans.List_Bean; type Wiki_Info_List_Bean_Access is access all Wiki_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Wiki_Info_Vector is Wiki_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Wiki_List : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The information about a wiki page. -- -------------------- type Wiki_Page_Info is new Util.Beans.Basic.Bean with record -- the wiki page identifier. Id : ADO.Identifier; -- the wiki page name. Name : Ada.Strings.Unbounded.Unbounded_String; -- the wiki page title. Title : Ada.Strings.Unbounded.Unbounded_String; -- whether the wiki is public. Is_Public : Boolean; -- the last version. Last_Version : Integer; -- the read count. Read_Count : Integer; -- the wiki creation date. Create_Date : Ada.Calendar.Time; -- the wiki page author. Author : Ada.Strings.Unbounded.Unbounded_String; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Page_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Page_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Wiki_Page_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Wiki_Page_Info); package Wiki_Page_Info_Vectors renames Wiki_Page_Info_Beans.Vectors; subtype Wiki_Page_Info_List_Bean is Wiki_Page_Info_Beans.List_Bean; type Wiki_Page_Info_List_Bean_Access is access all Wiki_Page_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Page_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Wiki_Page_Info_Vector is Wiki_Page_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Page_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Wiki_Page_List : constant ADO.Queries.Query_Definition_Access; Query_Wiki_Page_Tag_List : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The information about a wiki page version. -- -------------------- type Wiki_Version_Info is new Util.Beans.Basic.Bean with record -- the wiki page identifier. Id : ADO.Identifier; -- the wiki page version comment. Comment : Ada.Strings.Unbounded.Unbounded_String; -- the wiki page creation date. Create_Date : Ada.Calendar.Time; -- the page version. Page_Version : Integer; -- the wiki page author. Author : Ada.Strings.Unbounded.Unbounded_String; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Version_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Version_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Wiki_Version_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Wiki_Version_Info); package Wiki_Version_Info_Vectors renames Wiki_Version_Info_Beans.Vectors; subtype Wiki_Version_Info_List_Bean is Wiki_Version_Info_Beans.List_Bean; type Wiki_Version_Info_List_Bean_Access is access all Wiki_Version_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Version_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Wiki_Version_Info_Vector is Wiki_Version_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Wiki_Version_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Wiki_Version_List : constant ADO.Queries.Query_Definition_Access; -- -------------------- -- The information about a wiki page. -- -------------------- type Wiki_View_Info is abstract new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record -- the wiki page identifier. Id : ADO.Identifier; -- the wiki page name. Name : Ada.Strings.Unbounded.Unbounded_String; -- the wiki page title. Title : Ada.Strings.Unbounded.Unbounded_String; -- whether the wiki is public. Is_Public : Boolean; -- the last version. Version : Integer; -- the number of times the page was displayed. Read_Count : Integer; -- the wiki page creation date. Date : Ada.Calendar.Time; -- the wiki page format. Format : AWA.Wikis.Models.Format_Type; -- the wiki page content. Content : Ada.Strings.Unbounded.Unbounded_String; -- the wiki version comment. Save_Comment : Ada.Strings.Unbounded.Unbounded_String; -- the wiki page left side panel. Left_Side : Ada.Strings.Unbounded.Unbounded_String; -- the wiki page right side panel. Right_Side : Ada.Strings.Unbounded.Unbounded_String; -- the wiki side format. Side_Format : AWA.Wikis.Models.Format_Type; -- the wiki page author. Author : Ada.Strings.Unbounded.Unbounded_String; -- the acl Id if there is one. Acl_Id : ADO.Identifier; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Wiki_View_Info) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_View_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_View_Info; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Wiki_View_Info; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; -- Read in the object the data from the query result and prepare to read the next row. -- If there is no row, raise the ADO.NOT_FOUND exception. procedure Read (Into : in out Wiki_View_Info; Stmt : in out ADO.Statements.Query_Statement'Class); -- Run the query controlled by <b>Context</b> and load the result in <b>Object</b>. procedure Load (Object : in out Wiki_View_Info'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Wiki_Page : constant ADO.Queries.Query_Definition_Access; Query_Wiki_Page_Id : constant ADO.Queries.Query_Definition_Access; Query_Wiki_Page_Content : constant ADO.Queries.Query_Definition_Access; Query_Wiki_Page_Name_Count : constant ADO.Queries.Query_Definition_Access; type Wiki_Space_Bean is abstract new AWA.Wikis.Models.Wiki_Space_Ref and Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with null record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Wiki_Space_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Space_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Save (Bean : in out Wiki_Space_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Load (Bean : in out Wiki_Space_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; -- -------------------- -- setup the page bean when the wiki page is created. -- -------------------- type Wiki_Page_Bean is abstract new AWA.Wikis.Models.Wiki_Page_Ref and Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with null record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Wiki_Page_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Page_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Save (Bean : in out Wiki_Page_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Delete (Bean : in out Wiki_Page_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Load (Bean : in out Wiki_Page_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Setup (Bean : in out Wiki_Page_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; -- -------------------- -- Load the list items -- -------------------- type Wiki_Page_List_Bean is abstract limited new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record -- the page number being displayed (for pagination) Page : Integer; -- The number of wiki pages Count : Integer; -- the number of items in the page Page_Size : Integer; -- the tag to filter the list Tag : Ada.Strings.Unbounded.Unbounded_String; -- the wiki identifier Wiki_Id : ADO.Identifier; -- the sort list mode. Sort : Ada.Strings.Unbounded.Unbounded_String; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Wiki_Page_List_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Page_List_Bean; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Page_List_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Wiki_Page_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; type Wiki_Version_List_Bean is abstract limited new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record -- the page number. Page : Integer; -- the number of versions. Count : Integer; -- the number of wiki version per display page. Page_Size : Integer; -- the wiki identifier. Wiki_Id : ADO.Identifier; -- the wiki page id. Page_Id : ADO.Identifier; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Wiki_Version_List_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Version_List_Bean; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Version_List_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Wiki_Version_List_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; type Wiki_Page_Info_Bean is abstract limited new Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with record -- the wiki identifier. Wiki_Id : ADO.Identifier; -- the wiki page identifier. Page_Id : ADO.Identifier; end record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Wiki_Page_Info_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Wiki_Page_Info_Bean; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Wiki_Page_Info_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Load (Bean : in out Wiki_Page_Info_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; private WIKI_SPACE_NAME : aliased constant String := "awa_wiki_space"; COL_0_1_NAME : aliased constant String := "id"; COL_1_1_NAME : aliased constant String := "name"; COL_2_1_NAME : aliased constant String := "is_public"; COL_3_1_NAME : aliased constant String := "version"; COL_4_1_NAME : aliased constant String := "create_date"; COL_5_1_NAME : aliased constant String := "left_side"; COL_6_1_NAME : aliased constant String := "right_side"; COL_7_1_NAME : aliased constant String := "format"; COL_8_1_NAME : aliased constant String := "workspace_id"; WIKI_SPACE_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 9, Table => WIKI_SPACE_NAME'Access, Members => ( 1 => COL_0_1_NAME'Access, 2 => COL_1_1_NAME'Access, 3 => COL_2_1_NAME'Access, 4 => COL_3_1_NAME'Access, 5 => COL_4_1_NAME'Access, 6 => COL_5_1_NAME'Access, 7 => COL_6_1_NAME'Access, 8 => COL_7_1_NAME'Access, 9 => COL_8_1_NAME'Access ) ); WIKI_SPACE_TABLE : constant ADO.Schemas.Class_Mapping_Access := WIKI_SPACE_DEF'Access; Null_Wiki_Space : constant Wiki_Space_Ref := Wiki_Space_Ref'(ADO.Objects.Object_Ref with null record); type Wiki_Space_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => WIKI_SPACE_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; Is_Public : Boolean; Version : Integer; Create_Date : Ada.Calendar.Time; Left_Side : Ada.Strings.Unbounded.Unbounded_String; Right_Side : Ada.Strings.Unbounded.Unbounded_String; Format : AWA.Wikis.Models.Format_Type; Workspace : AWA.Workspaces.Models.Workspace_Ref; end record; type Wiki_Space_Access is access all Wiki_Space_Impl; overriding procedure Destroy (Object : access Wiki_Space_Impl); overriding procedure Find (Object : in out Wiki_Space_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Wiki_Space_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Wiki_Space_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Wiki_Space_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Wiki_Space_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Wiki_Space_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Wiki_Space_Ref'Class; Impl : out Wiki_Space_Access); WIKI_PAGE_NAME : aliased constant String := "awa_wiki_page"; COL_0_2_NAME : aliased constant String := "id"; COL_1_2_NAME : aliased constant String := "name"; COL_2_2_NAME : aliased constant String := "last_version"; COL_3_2_NAME : aliased constant String := "is_public"; COL_4_2_NAME : aliased constant String := "title"; COL_5_2_NAME : aliased constant String := "version"; COL_6_2_NAME : aliased constant String := "read_count"; COL_7_2_NAME : aliased constant String := "preview_id"; COL_8_2_NAME : aliased constant String := "wiki_id"; COL_9_2_NAME : aliased constant String := "content_id"; WIKI_PAGE_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 10, Table => WIKI_PAGE_NAME'Access, Members => ( 1 => COL_0_2_NAME'Access, 2 => COL_1_2_NAME'Access, 3 => COL_2_2_NAME'Access, 4 => COL_3_2_NAME'Access, 5 => COL_4_2_NAME'Access, 6 => COL_5_2_NAME'Access, 7 => COL_6_2_NAME'Access, 8 => COL_7_2_NAME'Access, 9 => COL_8_2_NAME'Access, 10 => COL_9_2_NAME'Access ) ); WIKI_PAGE_TABLE : constant ADO.Schemas.Class_Mapping_Access := WIKI_PAGE_DEF'Access; Null_Wiki_Page : constant Wiki_Page_Ref := Wiki_Page_Ref'(ADO.Objects.Object_Ref with null record); type Wiki_Page_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => WIKI_PAGE_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; Last_Version : Integer; Is_Public : Boolean; Title : Ada.Strings.Unbounded.Unbounded_String; Version : Integer; Read_Count : Integer; Preview : AWA.Images.Models.Image_Ref; Wiki : AWA.Wikis.Models.Wiki_Space_Ref; Content : AWA.Wikis.Models.Wiki_Content_Ref; end record; type Wiki_Page_Access is access all Wiki_Page_Impl; overriding procedure Destroy (Object : access Wiki_Page_Impl); overriding procedure Find (Object : in out Wiki_Page_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Wiki_Page_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Wiki_Page_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Wiki_Page_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Wiki_Page_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Wiki_Page_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Wiki_Page_Ref'Class; Impl : out Wiki_Page_Access); WIKI_CONTENT_NAME : aliased constant String := "awa_wiki_content"; COL_0_3_NAME : aliased constant String := "id"; COL_1_3_NAME : aliased constant String := "create_date"; COL_2_3_NAME : aliased constant String := "content"; COL_3_3_NAME : aliased constant String := "format"; COL_4_3_NAME : aliased constant String := "save_comment"; COL_5_3_NAME : aliased constant String := "version"; COL_6_3_NAME : aliased constant String := "page_version"; COL_7_3_NAME : aliased constant String := "page_id"; COL_8_3_NAME : aliased constant String := "author_id"; WIKI_CONTENT_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 9, Table => WIKI_CONTENT_NAME'Access, Members => ( 1 => COL_0_3_NAME'Access, 2 => COL_1_3_NAME'Access, 3 => COL_2_3_NAME'Access, 4 => COL_3_3_NAME'Access, 5 => COL_4_3_NAME'Access, 6 => COL_5_3_NAME'Access, 7 => COL_6_3_NAME'Access, 8 => COL_7_3_NAME'Access, 9 => COL_8_3_NAME'Access ) ); WIKI_CONTENT_TABLE : constant ADO.Schemas.Class_Mapping_Access := WIKI_CONTENT_DEF'Access; Null_Wiki_Content : constant Wiki_Content_Ref := Wiki_Content_Ref'(ADO.Objects.Object_Ref with null record); type Wiki_Content_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => WIKI_CONTENT_DEF'Access) with record Create_Date : Ada.Calendar.Time; Content : Ada.Strings.Unbounded.Unbounded_String; Format : AWA.Wikis.Models.Format_Type; Save_Comment : Ada.Strings.Unbounded.Unbounded_String; Version : Integer; Page_Version : Integer; Page : AWA.Wikis.Models.Wiki_Page_Ref; Author : AWA.Users.Models.User_Ref; end record; type Wiki_Content_Access is access all Wiki_Content_Impl; overriding procedure Destroy (Object : access Wiki_Content_Impl); overriding procedure Find (Object : in out Wiki_Content_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Wiki_Content_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Wiki_Content_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Wiki_Content_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Wiki_Content_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Wiki_Content_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Wiki_Content_Ref'Class; Impl : out Wiki_Content_Access); package File_1 is new ADO.Queries.Loaders.File (Path => "wiki-stat.xml", Sha1 => "9B2B599473F75F92CB5AB5045675E4CCEF926543"); package Def_Page_Access_Stats is new ADO.Queries.Loaders.Query (Name => "page-access-stats", File => File_1.File'Access); Query_Page_Access_Stats : constant ADO.Queries.Query_Definition_Access := Def_Page_Access_Stats.Query'Access; package File_2 is new ADO.Queries.Loaders.File (Path => "wiki-images-info.xml", Sha1 => "ACC06A1E40987526FBEB39D13B94AC44B833D516"); package Def_Wikiimagebean_Wiki_Image is new ADO.Queries.Loaders.Query (Name => "wiki-image", File => File_2.File'Access); Query_Wiki_Image : constant ADO.Queries.Query_Definition_Access := Def_Wikiimagebean_Wiki_Image.Query'Access; package File_3 is new ADO.Queries.Loaders.File (Path => "wiki-images.xml", Sha1 => "63109B4E802BF3B5AD1680973D6E7E348C4E57D2"); package Def_Wikiimageinfo_Wiki_Image_Get_Data is new ADO.Queries.Loaders.Query (Name => "wiki-image-get-data", File => File_3.File'Access); Query_Wiki_Image_Get_Data : constant ADO.Queries.Query_Definition_Access := Def_Wikiimageinfo_Wiki_Image_Get_Data.Query'Access; package Def_Wikiimageinfo_Wiki_Image_Width_Get_Data is new ADO.Queries.Loaders.Query (Name => "wiki-image-width-get-data", File => File_3.File'Access); Query_Wiki_Image_Width_Get_Data : constant ADO.Queries.Query_Definition_Access := Def_Wikiimageinfo_Wiki_Image_Width_Get_Data.Query'Access; package Def_Wikiimageinfo_Wiki_Image_Height_Get_Data is new ADO.Queries.Loaders.Query (Name => "wiki-image-height-get-data", File => File_3.File'Access); Query_Wiki_Image_Height_Get_Data : constant ADO.Queries.Query_Definition_Access := Def_Wikiimageinfo_Wiki_Image_Height_Get_Data.Query'Access; package File_4 is new ADO.Queries.Loaders.File (Path => "wiki-list.xml", Sha1 => "134AA901EAD20B164194D37CC198D8B6092FF0DF"); package Def_Wikiinfo_Wiki_List is new ADO.Queries.Loaders.Query (Name => "wiki-list", File => File_4.File'Access); Query_Wiki_List : constant ADO.Queries.Query_Definition_Access := Def_Wikiinfo_Wiki_List.Query'Access; package File_5 is new ADO.Queries.Loaders.File (Path => "wiki-pages.xml", Sha1 => "3D026597D06A525412B37B034831E5ABC1F9EFA5"); package Def_Wikipageinfo_Wiki_Page_List is new ADO.Queries.Loaders.Query (Name => "wiki-page-list", File => File_5.File'Access); Query_Wiki_Page_List : constant ADO.Queries.Query_Definition_Access := Def_Wikipageinfo_Wiki_Page_List.Query'Access; package Def_Wikipageinfo_Wiki_Page_Tag_List is new ADO.Queries.Loaders.Query (Name => "wiki-page-tag-list", File => File_5.File'Access); Query_Wiki_Page_Tag_List : constant ADO.Queries.Query_Definition_Access := Def_Wikipageinfo_Wiki_Page_Tag_List.Query'Access; package File_6 is new ADO.Queries.Loaders.File (Path => "wiki-history.xml", Sha1 => "AC42BF3C04729AEE8ADED975B16EBB859D1E7276"); package Def_Wikiversioninfo_Wiki_Version_List is new ADO.Queries.Loaders.Query (Name => "wiki-version-list", File => File_6.File'Access); Query_Wiki_Version_List : constant ADO.Queries.Query_Definition_Access := Def_Wikiversioninfo_Wiki_Version_List.Query'Access; package File_7 is new ADO.Queries.Loaders.File (Path => "wiki-page.xml", Sha1 => "AF1DAD113E5BB4F34507D92D188098C84BF1174A"); package Def_Wikiviewinfo_Wiki_Page is new ADO.Queries.Loaders.Query (Name => "wiki-page", File => File_7.File'Access); Query_Wiki_Page : constant ADO.Queries.Query_Definition_Access := Def_Wikiviewinfo_Wiki_Page.Query'Access; package Def_Wikiviewinfo_Wiki_Page_Id is new ADO.Queries.Loaders.Query (Name => "wiki-page-id", File => File_7.File'Access); Query_Wiki_Page_Id : constant ADO.Queries.Query_Definition_Access := Def_Wikiviewinfo_Wiki_Page_Id.Query'Access; package Def_Wikiviewinfo_Wiki_Page_Content is new ADO.Queries.Loaders.Query (Name => "wiki-page-content", File => File_7.File'Access); Query_Wiki_Page_Content : constant ADO.Queries.Query_Definition_Access := Def_Wikiviewinfo_Wiki_Page_Content.Query'Access; package Def_Wikiviewinfo_Wiki_Page_Name_Count is new ADO.Queries.Loaders.Query (Name => "wiki-page-name-count", File => File_7.File'Access); Query_Wiki_Page_Name_Count : constant ADO.Queries.Query_Definition_Access := Def_Wikiviewinfo_Wiki_Page_Name_Count.Query'Access; end AWA.Wikis.Models;
38.994228
148
0.64693
0e192ddcfea01ee82894e5b095481ccaa0be028f
17,480
ads
Ada
src/posix.ads
persan/midnightsun-ctf-LoveLacedLetter
456f782b5cd2205425aa23705ca8e8598e3104fc
[ "BSD-2-Clause" ]
null
null
null
src/posix.ads
persan/midnightsun-ctf-LoveLacedLetter
456f782b5cd2205425aa23705ca8e8598e3104fc
[ "BSD-2-Clause" ]
null
null
null
src/posix.ads
persan/midnightsun-ctf-LoveLacedLetter
456f782b5cd2205425aa23705ca8e8598e3104fc
[ "BSD-2-Clause" ]
null
null
null
with System.Storage_Elements; private with Ada.Unchecked_Conversion; package Posix is type File; type File_Status; type Memory_Map; -- subtype unsigned_long is Interfaces.C.unsigned_long; -- subtype unsigned is Interfaces.C.unsigned; -- subtype int is Interfaces.C.int; -- subtype long is Interfaces.C.long; -- subtype Unsigned_32 is Interfaces.Unsigned_32; type unsigned is mod 2 ** Integer'Size; type unsigned_long is mod 2 ** Long_Integer'Size; type int is new Integer; type long is new Long_Integer; type Unsigned_32 is mod 2 ** 32; for Unsigned_32'Size use 32; subtype Void_Ptr is System.Address; type S_FLag is new Unsigned_32; type O_FLag is new Unsigned_32; type Prot_FLag is new Unsigned_32; use type Void_Ptr; -- function Shift_Right -- (Value : Unsigned_32; -- Amount : Natural) return Unsigned_32 renames -- Interfaces.Shift_Right; -- -- function Shift_Right -- (Value : S_FLag; -- Amount : Natural) return S_FLag is -- (S_FLag (Shift_Right (Unsigned_32 (Value), Amount))); Nul : constant Character := Character'Val (0); type C_String is new String with Dynamic_Predicate => C_String'Length > 0 and then C_String (C_String'Last) = Nul; function "-" (Text : C_String) return String; -- Removes the last 'Nul' character and returns a normal String. function "+" (Text : String) return C_String; -- Appends a 'Nul' character to a standard String and returns a C_String. -- -- Non-primitive subprograms -- -- Write to standard out. May be used instead of Ada.Text_IO.Put (). procedure Put (Text : String) with Global => null; -- Write to standard out. May be used instead of Ada.Text_IO.Put_Line (). procedure Put_Line (Text : String) with Global => null; function Get_Line return String; -- -- Encoding of the file mode. -- S_IFMT : constant S_FLag := 0170000; --These bits determine file type. -- -- File types -- S_IFDIR : constant S_FLag := 0040000; -- Directory. S_IFCHR : constant S_FLag := 0020000; -- Character device. S_IFBLK : constant S_FLag := 0060000; -- Block device. S_IFREG : constant S_FLag := 0100000; -- Regular file. S_IFIFO : constant S_FLag := 0010000; -- FIFO. S_IFLNK : constant S_FLag := 0120000; -- Symbolic link. S_IFSOCK : constant S_FLag := 0140000; -- Socket. -- #define __S_ISUID 04000 /* Set user ID on execution. */ -- #define __S_ISGID 02000 /* Set group ID on execution. */ -- #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -- #define __S_IREAD 0400 /* Read by owner. */ -- #define __S_IWRITE 0200 /* Write by owner. */ -- #define __S_IEXEC 0100 /* Execute by owner. */ -- Read by owner. S_IRUSR : constant S_FLag := 0400; -- Write by owner. S_IWUSR : constant S_FLag := 0200; -- Execute by owner. S_IXUSR : constant S_FLag := 0100; -- Read, write, and execute by owner. S_IRWXU : constant S_FLag := S_IRUSR or S_IWUSR or S_IXUSR; -- Read by group. S_IRGRP : constant S_FLag := 3_200; -- Write by group. S_IWGRP : constant S_FLag := 1_600; -- Execute by group. S_IXGRP : constant S_FLag := 800; -- Read, write, and execute by group. S_IRWXG : constant S_FLag := 5_600; -- Read by others. S_IROTH : constant S_FLag := 25_600; -- Write by others. S_IWOTH : constant S_FLag := 12_800; -- Execute by others. S_IXOTH : constant S_FLag := 6_400; -- Read, write, and execute by others. S_IRWXO : constant S_FLag := 44_800; -- Open for reading only O_RDONLY : constant O_FLag := 16#00#; -- Open for write only O_WRONLY : constant O_FLag := 16#01#; -- Open for reading and writing O_RDWR : constant O_FLag := 16#02#; O_ACCMODE : constant O_FLag := 16#03#; O_CREAT : constant O_FLag := 0100; O_EXCL : constant O_FLag := 0200; O_NOCTTY : constant O_FLag := 0400; O_TRUNC : constant O_FLag := 01000; O_APPEND : constant O_FLag := 02000; O_NONBLOCK : constant O_FLag := 04000; O_SYNC : constant O_FLag := 04010000; O_ASYNC : constant O_FLag := 020000; -- Protections are chosen from these bits, OR'd together. The -- implementation does not necessarily support PROT_EXEC or PROT_WRITE -- without PROT_READ. The only guarantees are that no writing will be -- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. -- Page can be read. PROT_READ : constant Prot_FLag := 16#1#; -- Page can be written. PROT_WRITE : constant Prot_FLag := 16#2#; -- Page can be executed. PROT_EXEC : constant Prot_FLag := 16#4#; -- Page can not be accessed. PROT_NONE : constant Prot_FLag := 16#0#; -- Extend change to start of growsdown vma (mprotect only). PROT_GROWSDOWN : constant Prot_FLag := 16#01000000#; -- Extend change to start of growsup vma (mprotect only). PROT_GROWSUP : constant Prot_FLag := 16#02000000#; -- -- Sharing types (must choose one and only one of these). -- -- Share changes. MAP_SHARED : constant := 16#01#; -- Changes are private. MAP_PRIVATE : constant := 16#02#; -- Interpret addr exactly. MAP_FIXED : constant := 16#10#; -- Don't use a file. MAP_ANON : constant := 16#20#; MAP_HUGE_SHIFT : constant := 26; MAP_HUGE_MASK : constant := 16#3f#; MAP_FAILED : constant Void_Ptr; -- -- Flags to `msync'. -- -- Sync memory asynchronously. MS_ASYNC : constant := 1; -- Synchronous memory sync. MS_SYNC : constant := 4; -- Invalidate the caches. MS_INVALIDATE : constant := 2; subtype Device_Id_Type is unsigned_long; subtype Inode_Number_Type is unsigned_long; subtype Hard_Link_Count_Type is unsigned_long; subtype Mode_Type is unsigned; subtype User_Id_Type is unsigned; subtype Group_Id_Type is unsigned; subtype Size_Type is unsigned_long; subtype SSize_Type is long; subtype Block_Size_Type is long; subtype Block_Count_Type is long; subtype Time_Sec is long; subtype Time_Nano_Sec is long; Nil : Void_Ptr renames System.Null_Address; subtype Offset is long; subtype Byte is System.Storage_Elements.Storage_Element; subtype Byte_Array is System.Storage_Elements.Storage_Array; type Time is record Sec : aliased Time_Sec; Nano_Sec : aliased Time_Nano_Sec; end record with Convention => C_Pass_By_Copy; type File is tagged limited private with Default_Initial_Condition => Is_Closed (File); procedure Open (File : in out Posix.File; File_Name : in C_String; Flags : in O_FLag; S_Flags : in S_FLag) with Global => null, Pre => File.Is_Closed; -- To open a file for reading example: -- -- File : Posix.File; -- procedure Close (File : in out Posix.File) with Global => null, Pre => File.Is_Open, Post => File.Is_Closed; procedure Write (File : Posix.File; Bytes : Byte_Array) with Global => null, Pre => File.Is_Open; function Read (File : Posix.File; Bytes : in out Byte_Array) return SSize_Type with Global => null, Pre => File.Is_Open; function File_Descriptor (File : Posix.File) return Integer with Global => null, Pre => File.Is_Open; procedure Get_File_Status (File : in Posix.File; Status : in out File_Status) with Global => null, Pre => File.Is_Open; procedure Map_Memory (File : in Posix.File; Address : Void_Ptr; Len : Size_Type; Prot : Prot_FLag; Flags : int; Offset : Posix.Offset; Memory_Map : in out Posix.Memory_Map) with Global => null, Pre => not Has_Mapping (Memory_Map); function Is_Open (File : Posix.File) return Boolean with Global => null; function Is_Closed (File : Posix.File) return Boolean with Global => null; type File_Status is tagged limited private; function Is_Valid (Status : File_Status) return Boolean with Global => null; function Device_Id (Status : File_Status) return Device_Id_Type with Global => null, Pre => Status.Is_Valid; function Inode_Number (Status : File_Status) return Inode_Number_Type with Global => null, Pre => Status.Is_Valid; function Hard_Link_Count (Status : File_Status) return Hard_Link_Count_Type with Global => null, Pre => Status.Is_Valid; function Mode (Status : File_Status) return Mode_Type with Global => null, Pre => Status.Is_Valid; function User_Id (Status : File_Status) return User_Id_Type with Global => null, Pre => Status.Is_Valid; function Group_Id (Status : File_Status) return Group_Id_Type with Global => null, Pre => Status.Is_Valid; function Special_Device_Id (Status : File_Status) return Device_Id_Type with Global => null, Pre => Status.Is_Valid; function Size (Status : File_Status) return Offset with Global => null, Pre => Status.Is_Valid; -- The file size in bytes. function Block_Size (Status : File_Status) return Block_Size_Type with Global => null, Pre => Status.Is_Valid; -- Number of 512B blocks allocated function Block_Count (Status : File_Status) return Block_Size_Type with Global => null, Pre => Status.Is_Valid; function Last_Access_Time (Status : File_Status) return Time with Global => null, Pre => Status.Is_Valid; function Modification_Time (Status : File_Status) return Time with Global => null, Pre => Status.Is_Valid; -- Last status change time function Change_Time (Status : File_Status) return Time with Global => null, Pre => Status.Is_Valid; type Memory_Map is tagged limited private; function Has_Mapping (Map : Posix.Memory_Map) return Boolean with Global => null; function Mapping (Map : Posix.Memory_Map) return Void_Ptr with Global => null, Pre => Map.Has_Mapping; -- Returns 0 on success, otherwise -1. function Unmap_Memory (Map : in out Posix.Memory_Map) return Integer with Global => null, Post => (if Unmap_Memory'Result = 0 then not Map.Has_Mapping); -- Returns 0 on success, otherwise -1. function Memory_Unmap (Address : Void_Ptr; Length : Size_Type) return Integer with Global => null; -- -- Standard file descriptors. -- STDIN : constant File; -- Standard input. STDOUT : constant File; -- Standard output. STDERR : constant File; -- Standard error output. private package Px_Thin is -- Standard file descriptors. STDIN_FILENO : constant := 0; -- Standard input. STDOUT_FILENO : constant := 1; -- Standard output. STDERR_FILENO : constant := 2; -- Standard error output. type File_Status_T is record -- ID of device containing file Device_Id : aliased Device_Id_Type; Inode_Number : aliased Inode_Number_Type; Hard_Link_Count : aliased Hard_Link_Count_Type; -- Protection Mode : aliased Mode_Type; User_Id : aliased User_Id_Type; Group_Id : aliased Group_Id_Type; Padding_0 : aliased int; -- Device ID (if special file) Special_Device_Id : aliased Device_Id_Type; -- Total size, in bytes Size : aliased Offset; -- Blocksize for file system I/O Block_Size : aliased Block_Size_Type; -- Number of 512B blocks allocated Block_Count : aliased Block_Count_Type; -- Time of last access Access_Time : aliased Time; -- Time of last modification Modification_Time : aliased Time; -- Time of last status change Change_Time : aliased Time; Padding_1 : long; Padding_2 : long; Padding_3 : long; end record with Convention => C_Pass_By_Copy; function Get_File_Status (Fd : Integer; Status : access File_Status_T) return Integer with Import => True, Convention => C, External_Name => "fstat"; -- Establishes a connection between a file and a file descriptor. -- The file descriptor handle (a non-negative number) -- is returned upon success, otherwise -1. -- -- Applications shall specify exactly one of the first three flags: -- O_RDONLY, O_WRONLY and O_RDWR. And then any combination of O_APPEND, -- O_CREAT, O_DSYNC, O_EXCL, O_NOCTTY, O_NONBLOCK, O_RSYNC, -- O_SYNC, O_TRUNC. function Open (File_Name : C_String; Flags : O_FLag; S_Flags : S_FLag) return Integer with Import => True, Convention => C, External_Name => "open"; procedure Close (File_Descriptor : Integer) with Import => True, Convention => C, External_Name => "close"; function Write (File_Descriptor : Integer; Buffer : Byte_Array; Count : Size_Type) return SSize_Type with Import => True, Convention => C, External_Name => "write"; function Write (File_Descriptor : Integer; Buffer : String; Count : Size_Type) return SSize_Type with Import => True, Convention => C, External_Name => "write"; function Read (File_Descriptor : Integer; Buffer : in out Byte_Array; Count : Size_Type) return SSize_Type with Import => True, Convention => C, External_Name => "read"; function Mmap (Addr : Void_Ptr; Len : Size_Type; Prot : Prot_FLag; Flags : int; Fd : Integer; Offset : Posix.Offset) return Void_Ptr with Import => True, Convention => C, External_Name => "mmap"; function Munmap (Addr : Void_Ptr; Length : Size_Type) return Integer with Import => True, Convention => C, External_Name => "munmap"; end Px_Thin; type File is tagged limited record My_File_Descriptor : Integer; My_Is_Open : Boolean := False; end record; function Is_Open (File : Posix.File) return Boolean is (File.My_Is_Open); function Is_Closed (File : Posix.File) return Boolean is (not File.My_Is_Open); type File_Status is tagged limited record My_Status : aliased Px_Thin.File_Status_T; My_Is_Valid : Boolean := False; end record; function File_Descriptor (File : Posix.File) return Integer is (File.My_File_Descriptor); function Is_Valid (Status : File_Status) return Boolean is (Status.My_Is_Valid); function Device_Id (Status : File_Status) return Device_Id_Type is (Status.My_Status.Device_Id); function Inode_Number (Status : File_Status) return Inode_Number_Type is (Status.My_Status.Inode_Number); function Hard_Link_Count (Status : File_Status) return Hard_Link_Count_Type is (Status.My_Status.Hard_Link_Count); function Mode (Status : File_Status) return Mode_Type is (Status.My_Status.Mode); function User_Id (Status : File_Status) return User_Id_Type is (Status.My_Status.User_Id); function Group_Id (Status : File_Status) return Group_Id_Type is (Status.My_Status.Group_Id); function Special_Device_Id (Status : File_Status) return Device_Id_Type is (Status.My_Status.Special_Device_Id); function Size (Status : File_Status) return Offset is (Status.My_Status.Size); function Block_Size (Status : File_Status) return Block_Size_Type is (Status.My_Status.Block_Size); function Block_Count (Status : File_Status) return Block_Size_Type is (Status.My_Status.Block_Count); function Last_Access_Time (Status : File_Status) return Time is (Status.My_Status.Access_Time); function Modification_Time (Status : File_Status) return Time is (Status.My_Status.Modification_Time); function Change_Time (Status : File_Status) return Time is (Status.My_Status.Change_Time); function Conv is new Ada.Unchecked_Conversion (Source => long, Target => Void_Ptr); MAP_FAILED_VALUE : constant long := -1; MAP_FAILED : constant Void_Ptr := Conv (MAP_FAILED_VALUE); type Memory_Map is tagged limited record My_Mapping : Void_Ptr := MAP_FAILED; My_Length : Size_Type; end record; function Has_Mapping (Map : Posix.Memory_Map) return Boolean is (Map.My_Mapping /= MAP_FAILED); function Mapping (Map : Posix.Memory_Map) return Void_Ptr is (Map.My_Mapping); STDIN : constant File := ( My_File_Descriptor => Px_Thin.STDIN_FILENO, My_Is_Open => True ); STDOUT : constant File := ( My_File_Descriptor => Px_Thin.STDOUT_FILENO, My_Is_Open => True ); STDERR : constant File := ( My_File_Descriptor => Px_Thin.STDERR_FILENO, My_Is_Open => True ); end Posix;
28.102894
86
0.638787
dcd140ecbf8863875609cdd7a4b5d1103200d8c6
4,017
ads
Ada
source/web/tools/a2js/properties-common.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/web/tools/a2js/properties-common.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/web/tools/a2js/properties-common.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Asis; with League.Strings; with Engines.Contexts; package Properties.Common is function False (Engine : access Engines.Contexts.Context; Element : Asis.Element; Name : Engines.Boolean_Property) return Boolean is (False); function True (Engine : access Engines.Contexts.Context; Element : Asis.Element; Name : Engines.Boolean_Property) return Boolean is (True); function Empty (Engine : access Engines.Contexts.Context; Element : Asis.Element; Name : Engines.Text_Property) return League.Strings.Universal_String is (League.Strings.Empty_Universal_String); end Properties.Common;
57.385714
78
0.4354
c5d8c8b72912a7703952ed33f911320c775be4a0
9,602
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/g-mbdira.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/ada/g-mbdira.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/g-mbdira.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . M B B S _ D I S C R E T E _ R A N D O M -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Calendar; with Interfaces; use Interfaces; package body GNAT.MBBS_Discrete_Random is package Calendar renames Ada.Calendar; Fits_In_32_Bits : constant Boolean := Rst'Size < 31 or else (Rst'Size = 31 and then Rst'Pos (Rst'First) < 0); -- This is set True if we do not need more than 32 bits in the result. If -- we need 64-bits, we will only use the meaningful 48 bits of any 64-bit -- number generated, since if more than 48 bits are required, we split the -- computation into two separate parts, since the algorithm does not behave -- above 48 bits. -- The way this expression works is that obviously if the size is 31 bits, -- it fits in 32 bits. In the 32-bit case, it fits in 32-bit signed if the -- range has negative values. It is too conservative in the case that the -- programmer has set a size greater than the default, e.g. a size of 33 -- for an integer type with a range of 1..10, but an over-conservative -- result is OK. The important thing is that the value is only True if -- we know the result will fit in 32-bits signed. If the value is False -- when it could be True, the behavior will be correct, just a bit less -- efficient than it could have been in some unusual cases. -- -- One might assume that we could get a more accurate result by testing -- the lower and upper bounds of the type Rst against the bounds of 32-bit -- Integer. However, there is no easy way to do that. Why? Because in the -- relatively rare case where this expression has to be evaluated at run -- time rather than compile time (when the bounds are dynamic), we need a -- type to use for the computation. But the possible range of upper bound -- values for Rst (remembering the possibility of 64-bit modular types) is -- from -2**63 to 2**64-1, and no run-time type has a big enough range. ----------------------- -- Local Subprograms -- ----------------------- function Square_Mod_N (X, N : Int) return Int; pragma Inline (Square_Mod_N); -- Computes X**2 mod N avoiding intermediate overflow ----------- -- Image -- ----------- function Image (Of_State : State) return String is begin return Int'Image (Of_State.X1) & ',' & Int'Image (Of_State.X2) & ',' & Int'Image (Of_State.Q); end Image; ------------ -- Random -- ------------ function Random (Gen : Generator) return Rst is S : State renames Gen.Writable.Self.Gen_State; Temp : Int; TF : Flt; begin -- Check for flat range here, since we are typically run with checks -- off, note that in practice, this condition will usually be static -- so we will not actually generate any code for the normal case. if Rst'Last < Rst'First then raise Constraint_Error; end if; -- Continue with computation if non-flat range S.X1 := Square_Mod_N (S.X1, S.P); S.X2 := Square_Mod_N (S.X2, S.Q); Temp := S.X2 - S.X1; -- Following duplication is not an error, it is a loop unwinding if Temp < 0 then Temp := Temp + S.Q; end if; if Temp < 0 then Temp := Temp + S.Q; end if; TF := Offs + (Flt (Temp) * Flt (S.P) + Flt (S.X1)) * S.Scl; -- Pathological, but there do exist cases where the rounding implicit -- in calculating the scale factor will cause rounding to 'Last + 1. -- In those cases, returning 'First results in the least bias. if TF >= Flt (Rst'Pos (Rst'Last)) + 0.5 then return Rst'First; elsif not Fits_In_32_Bits then return Rst'Val (Interfaces.Integer_64 (TF)); else return Rst'Val (Int (TF)); end if; end Random; ----------- -- Reset -- ----------- procedure Reset (Gen : Generator; Initiator : Integer) is S : State renames Gen.Writable.Self.Gen_State; X1, X2 : Int; begin X1 := 2 + Int (Initiator) mod (K1 - 3); X2 := 2 + Int (Initiator) mod (K2 - 3); for J in 1 .. 5 loop X1 := Square_Mod_N (X1, K1); X2 := Square_Mod_N (X2, K2); end loop; -- Eliminate effects of small Initiators S := (X1 => X1, X2 => X2, P => K1, Q => K2, FP => K1F, Scl => Scal); end Reset; ----------- -- Reset -- ----------- procedure Reset (Gen : Generator) is S : State renames Gen.Writable.Self.Gen_State; Now : constant Calendar.Time := Calendar.Clock; X1 : Int; X2 : Int; begin X1 := Int (Calendar.Year (Now)) * 12 * 31 + Int (Calendar.Month (Now) * 31) + Int (Calendar.Day (Now)); X2 := Int (Calendar.Seconds (Now) * Duration (1000.0)); X1 := 2 + X1 mod (K1 - 3); X2 := 2 + X2 mod (K2 - 3); -- Eliminate visible effects of same day starts for J in 1 .. 5 loop X1 := Square_Mod_N (X1, K1); X2 := Square_Mod_N (X2, K2); end loop; S := (X1 => X1, X2 => X2, P => K1, Q => K2, FP => K1F, Scl => Scal); end Reset; ----------- -- Reset -- ----------- procedure Reset (Gen : Generator; From_State : State) is begin Gen.Writable.Self.Gen_State := From_State; end Reset; ---------- -- Save -- ---------- procedure Save (Gen : Generator; To_State : out State) is begin To_State := Gen.Gen_State; end Save; ------------------ -- Square_Mod_N -- ------------------ function Square_Mod_N (X, N : Int) return Int is begin return Int ((Integer_64 (X) ** 2) mod (Integer_64 (N))); end Square_Mod_N; ----------- -- Value -- ----------- function Value (Coded_State : String) return State is Last : constant Natural := Coded_State'Last; Start : Positive := Coded_State'First; Stop : Positive := Coded_State'First; Outs : State; begin while Stop <= Last and then Coded_State (Stop) /= ',' loop Stop := Stop + 1; end loop; if Stop > Last then raise Constraint_Error; end if; Outs.X1 := Int'Value (Coded_State (Start .. Stop - 1)); Start := Stop + 1; loop Stop := Stop + 1; exit when Stop > Last or else Coded_State (Stop) = ','; end loop; if Stop > Last then raise Constraint_Error; end if; Outs.X2 := Int'Value (Coded_State (Start .. Stop - 1)); Outs.Q := Int'Value (Coded_State (Stop + 1 .. Last)); Outs.P := Outs.Q * 2 + 1; Outs.FP := Flt (Outs.P); Outs.Scl := (RstL - RstF + 1.0) / (Flt (Outs.P) * Flt (Outs.Q)); -- Now do *some* sanity checks if Outs.Q < 31 or else Outs.X1 not in 2 .. Outs.P - 1 or else Outs.X2 not in 2 .. Outs.Q - 1 then raise Constraint_Error; end if; return Outs; end Value; end GNAT.MBBS_Discrete_Random;
33.929329
79
0.503541
d0d9e53c1a52fb0bafca59aa3503013d136ef2ab
1,214
ads
Ada
tier-1/xcb/source/thin/xcb-xcb_atom_error_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
2
2015-11-12T11:16:20.000Z
2021-08-24T22:32:04.000Z
tier-1/xcb/source/thin/xcb-xcb_atom_error_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
1
2018-06-05T05:19:35.000Z
2021-11-20T01:13:23.000Z
tier-1/xcb/source/thin/xcb-xcb_atom_error_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
null
null
null
-- This file is generated by SWIG. Please do not modify by hand. -- with xcb.xcb_value_error_t; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_atom_error_t is -- Item -- subtype Item is xcb.xcb_value_error_t.Item; -- Item_Array -- type Item_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_atom_error_t.Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_atom_error_t.Item, Element_Array => xcb.xcb_atom_error_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_atom_error_t.Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_atom_error_t.Pointer, Element_Array => xcb.xcb_atom_error_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_atom_error_t;
26.977778
79
0.670511
0e60765622f5bf0b48ec310efb06666df62e8fd2
3,296
ads
Ada
bb-runtimes/src/s-bcpcst__armvXm.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/src/s-bcpcst__armvXm.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/src/s-bcpcst__armvXm.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- SYSTEM.BB.CPU_PRIMITIVES.CONTEXT_SWITCH_TRIGGER -- -- -- -- S p e c -- -- -- -- Copyright (C) 1999-2002 Universidad Politecnica de Madrid -- -- Copyright (C) 2003-2004 The European Space Agency -- -- Copyright (C) 2017, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- -- The port of GNARL to bare board targets was initially developed by the -- -- Real-Time Systems Group at the Technical University of Madrid. -- -- -- ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); package System.BB.CPU_Primitives.Context_Switch_Trigger is pragma Preelaborate; procedure Initialize_Context_Switch; -- Procedure that performs the hardware initialization of the context -- switch features. This procedure will be called by Initialize_CPU, if -- necessary. procedure Trigger_Context_Switch; -- One some platforms, the context switch requires the triggering of an or -- Trap or an IRQ. end System.BB.CPU_Primitives.Context_Switch_Trigger;
63.384615
78
0.454187
d02445976a0bcfd63c4527fed366bc78ce54becb
1,924
ads
Ada
sources/md/markdown-visitors.ads
reznikmm/markdown
af47bd45427f1c016c0a2a11e86fa2d1b1c82315
[ "MIT" ]
null
null
null
sources/md/markdown-visitors.ads
reznikmm/markdown
af47bd45427f1c016c0a2a11e86fa2d1b1c82315
[ "MIT" ]
null
null
null
sources/md/markdown-visitors.ads
reznikmm/markdown
af47bd45427f1c016c0a2a11e86fa2d1b1c82315
[ "MIT" ]
null
null
null
-- 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; with Markdown.Link_Reference_Definitions; with Markdown.List_Items; with Markdown.Lists; with Markdown.Paragraphs; with Markdown.Thematic_Breaks; package Markdown.Visitors is type Visitor is limited interface; not overriding procedure ATX_Heading (Self : in out Visitor; Value : Markdown.ATX_Headings.ATX_Heading) is null; not overriding procedure Blockquote (Self : in out Visitor; Value : in out Markdown.Blockquotes.Blockquote) is null; not overriding procedure Fenced_Code_Block (Self : in out Visitor; Value : Markdown.Fenced_Code_Blocks.Fenced_Code_Block) is null; not overriding procedure HTML_Block (Self : in out Visitor; Value : Markdown.HTML_Blocks.HTML_Block) is null; not overriding procedure Indented_Code_Block (Self : in out Visitor; Value : Markdown.Indented_Code_Blocks.Indented_Code_Block) is null; not overriding procedure Link_Reference_Definition (Self : in out Visitor; Value : Markdown.Link_Reference_Definitions.Link_Reference_Definition) is null; not overriding procedure List_Item (Self : in out Visitor; Value : in out Markdown.List_Items.List_Item) is null; not overriding procedure List (Self : in out Visitor; Value : Markdown.Lists.List) is null; not overriding procedure Paragraph (Self : in out Visitor; Value : Markdown.Paragraphs.Paragraph) is null; not overriding procedure Thematic_Break (Self : in out Visitor; Value : Markdown.Thematic_Breaks.Thematic_Break) is null; end Markdown.Visitors;
30.539683
79
0.716736
4a68020d9fb1fd60d35ebf7f805533ef35c4d144
539
adb
Ada
ejercicios6/calcular_maximo_y_posicion.adb
iyan22/AprendeAda
18bd2a224e5bda30c43d9ceabe0c05278e069ebf
[ "MIT" ]
null
null
null
ejercicios6/calcular_maximo_y_posicion.adb
iyan22/AprendeAda
18bd2a224e5bda30c43d9ceabe0c05278e069ebf
[ "MIT" ]
null
null
null
ejercicios6/calcular_maximo_y_posicion.adb
iyan22/AprendeAda
18bd2a224e5bda30c43d9ceabe0c05278e069ebf
[ "MIT" ]
null
null
null
with Datos; use Datos; procedure Calcular_Maximo_Y_Posicion ( L : in Lista; Max, Pos_Max : out Integer ) is -- pre: -- post: Max contendra el mayor valor de L y Pos_max su posicion -- Si L es vacia entonces Pos_Max vale cero LCopia : Lista; Pos : Integer; begin LCopia := L; Max := 0; Pos := 1; Pos_Max := 0; while LCopia /= null loop if Max < LCopia.all.info then Max := LCopia.all.info; Pos_Max := Pos; end if; LCopia := LCopia.all.sig; Pos := Pos+1; end loop; end Calcular_Maximo_Y_Posicion;
20.730769
84
0.647495
18b73ae729c2e32c757a580c924314b09e46a376
2,737
adb
Ada
out/min4.adb
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
22
2017-04-24T10:00:45.000Z
2021-04-01T10:11:05.000Z
out/min4.adb
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
12
2017-03-26T18:34:21.000Z
2019-03-21T19:13:03.000Z
out/min4.adb
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
7
2017-10-14T13:33:33.000Z
2021-03-18T15:18:50.000Z
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure min4 is type stringptr is access all char_array; procedure PString(s : stringptr) is begin String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all)); end; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left)); end; function min2_0(a : in Integer; b : in Integer) return Integer is begin if a < b then return a; else return b; end if; end; begin PInt(min2_0(min2_0(min2_0(1, 2), 3), 4)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(1, 2), 4), 3)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(1, 3), 2), 4)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(1, 3), 4), 2)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(1, 4), 2), 3)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(1, 4), 3), 2)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(min2_0(min2_0(min2_0(2, 1), 3), 4)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(2, 1), 4), 3)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(2, 3), 1), 4)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(2, 3), 4), 1)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(2, 4), 1), 3)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(2, 4), 3), 1)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(min2_0(min2_0(min2_0(3, 1), 2), 4)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(3, 1), 4), 2)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(3, 2), 1), 4)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(3, 2), 4), 1)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(3, 4), 1), 2)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(3, 4), 2), 1)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(min2_0(min2_0(min2_0(4, 1), 2), 3)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(4, 1), 3), 2)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(4, 2), 1), 3)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(4, 2), 3), 1)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(4, 3), 1), 2)); PString(new char_array'( To_C(" "))); PInt(min2_0(min2_0(min2_0(4, 3), 2), 1)); PString(new char_array'( To_C("" & Character'Val(10)))); end;
35.089744
97
0.63354
d0fc77c88879cd1272d99ec1ee8da7730729155a
280
adb
Ada
gyak/gyak8/szoroz/szoroz.adb
balintsoos/LearnAda
9d2fc76209f6e15b4fa91b4b39107ae6cc7e7114
[ "MIT" ]
null
null
null
gyak/gyak8/szoroz/szoroz.adb
balintsoos/LearnAda
9d2fc76209f6e15b4fa91b4b39107ae6cc7e7114
[ "MIT" ]
null
null
null
gyak/gyak8/szoroz/szoroz.adb
balintsoos/LearnAda
9d2fc76209f6e15b4fa91b4b39107ae6cc7e7114
[ "MIT" ]
1
2021-07-16T16:15:11.000Z
2021-07-16T16:15:11.000Z
with Ada.Text_IO; use Ada.Text_IO; procedure Szoroz is pragma Suppress(Range_Check); pragma Suppress(Overflow_Check); I: Integer range 1..10000 := 1; begin for J in 1..100 loop Put_Line(Integer'Image(I)); I := I * 10; end loop; end;
23.333333
37
0.610714
0e5051c39d65e2a2a46881d904f2fc60cb438ca3
3,208
ads
Ada
tools/scitools/conf/understand/ada/ada95/a-except.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
1
2020-01-20T21:26:46.000Z
2020-01-20T21:26:46.000Z
tools/scitools/conf/understand/ada/ada95/a-except.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/ada/ada95/a-except.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
--********** --* Helen --* Added some declarations here to agree with Ada95 manual --******** ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- A D A . E X C E P T I O N S -- -- -- -- S p e c -- -- -- -- $Revision: 2 $ -- -- -- -- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -- -- -- ------------------------------------------------------------------------------ package Ada.Exceptions is type Exception_Id is private; Null_Id : constant Exception_Id; function Exception_Name(Id : Exception_Id) return String; type Exception_Occurrence is private; type Exception_Occurrence_Access is access all Exception_Occurrence; Null_Occurrence : constant Exception_Occurrence; procedure Raise_Exception (E : in Exception_Id; Message : in String := ""); function Exception_Message(X : Exception_Occurrence) return String; procedure Reraise_Occurrence (X : Exception_Occurrence); function Exception_Identity(X : Exception_Occurrence) return Exception_Id; function Exception_Name (X : Exception_Occurrence) return String; function Exception_Information (X : Exception_Occurrence) return String; procedure Save_Occurrence(Target : out Exception_Occurrence; Source : in Exception_Occurrence); function Save_Occurrence(Source : Exception_Occurrence) return Exception_Occurrence_Access; private -- Dummy definitions for now (body not implemented yet) ??? type Exception_Id is new Integer; Null_Id : constant Exception_Id := 0; type Exception_Occurrence is new Integer; Null_Occurrence : constant Exception_Occurrence := 0; end Ada.Exceptions;
50.920635
78
0.503741
4a6a0af9b1281230b42c09434a4bd90f60cdafc7
4,522
adb
Ada
llvm-gcc-4.2-2.9/gcc/ada/s-io.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/s-io.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/s-io.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . I O -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body System.IO is Current_Out : File_Type := Stdout; pragma Atomic (Current_Out); -- Current output file (modified by Set_Output) -------------- -- New_Line -- -------------- procedure New_Line (Spacing : Positive := 1) is begin for J in 1 .. Spacing loop Put (ASCII.LF); end loop; end New_Line; --------- -- Put -- --------- procedure Put (X : Integer) is procedure Put_Int (X : Integer); pragma Import (C, Put_Int, "put_int"); procedure Put_Int_Err (X : Integer); pragma Import (C, Put_Int_Err, "put_int_stderr"); begin case Current_Out is when Stdout => Put_Int (X); when Stderr => Put_Int_Err (X); end case; end Put; procedure Put (C : Character) is procedure Put_Char (C : Character); pragma Import (C, Put_Char, "put_char"); procedure Put_Char_Stderr (C : Character); pragma Import (C, Put_Char_Stderr, "put_char_stderr"); begin case Current_Out is when Stdout => Put_Char (C); when Stderr => Put_Char_Stderr (C); end case; end Put; procedure Put (S : String) is begin for J in S'Range loop Put (S (J)); end loop; end Put; -------------- -- Put_Line -- -------------- procedure Put_Line (S : String) is begin Put (S); New_Line; end Put_Line; --------------------- -- Standard_Output -- --------------------- function Standard_Output return File_Type is begin return Stdout; end Standard_Output; -------------------- -- Standard_Error -- -------------------- function Standard_Error return File_Type is begin return Stderr; end Standard_Error; ---------------- -- Set_Output -- ---------------- procedure Set_Output (File : File_Type) is begin Current_Out := File; end Set_Output; end System.IO;
34.257576
78
0.45732
0e6fd9c51ff3304e4f98d3b20c09c414c2e08c53
894
ads
Ada
src/arch/socs/stm32f429/Ada/soc-layout-stm32f4.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/arch/socs/stm32f429/Ada/soc-layout-stm32f4.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/arch/socs/stm32f429/Ada/soc-layout-stm32f4.ads
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- package soc.layout.stm32f4 with spark_mode => on is NB_MEM_BANK : constant := 1; end soc.layout.stm32f4;
28.83871
79
0.692394
d00cce1728edf3301be58d7df7d555b68f6ca055
1,143
adb
Ada
source/receiver/main/ints.adb
reznikmm/gps-tracker
23b7bfbac8ea3a09a2b2d89cb55b6627bb599ce5
[ "MIT" ]
null
null
null
source/receiver/main/ints.adb
reznikmm/gps-tracker
23b7bfbac8ea3a09a2b2d89cb55b6627bb599ce5
[ "MIT" ]
null
null
null
source/receiver/main/ints.adb
reznikmm/gps-tracker
23b7bfbac8ea3a09a2b2d89cb55b6627bb599ce5
[ "MIT" ]
null
null
null
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with ESP32.GPIO; package body Ints is protected body Signal is ------------- -- Handler -- ------------- procedure Handler is DIO_0 : constant ESP32.GPIO.GPIO_Pad := 26; DIO_1 : constant ESP32.GPIO.GPIO_Pad := 35; Set : constant ESP32.GPIO.GPIO_40_Set := ESP32.GPIO.Get_Interrupt_Status; begin -- Clear interrupt status. Should be first action in the handler ESP32.GPIO.Set_Interrupt_Status ((0 .. 39 => False)); Done := Set (DIO_0); Timeout := Set (DIO_1); Got := Done or Timeout; end Handler; ---------- -- Wait -- ---------- entry Wait (RX_Done : out Boolean; RX_Timeout : out Boolean) when Got is begin RX_Done := Done; RX_Timeout := Timeout; Got := False; Done := False; Timeout := False; end Wait; end Signal; end Ints;
24.847826
74
0.493438
d0971c57a0cdbba1adea643872e485141678326e
1,020
ads
Ada
src/aids-env.ads
OneWingedShark/ada-probe
82705d173b37fea0831a86836460a7923fb6d536
[ "MIT" ]
null
null
null
src/aids-env.ads
OneWingedShark/ada-probe
82705d173b37fea0831a86836460a7923fb6d536
[ "MIT" ]
null
null
null
src/aids-env.ads
OneWingedShark/ada-probe
82705d173b37fea0831a86836460a7923fb6d536
[ "MIT" ]
null
null
null
with Ada.Containers.Indefinite_Hashed_Maps; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.strings.Hash; -- Basic support for .env files in Ada everyone was waiting for package Aids.Env is Syntax_Error : exception; -- Indefinite hashed map can have unconstrained strinfs as keys or elements. package Env_Hashed_Map is new Ada.Containers.Indefinite_Hashed_Maps (Key_Type => String, Element_Type => String, Hash => Ada.Strings.Hash, Equivalent_Keys => "=" ); subtype Typ is Env_Hashed_Map.Map; function Slurp(File_Path: String) return Typ; -- Retrieve a value given some key. function Find(Env : in Typ; Key : in Unbounded_String; Value : out Unbounded_String ) return Boolean; function Find(Env : in Typ; Key : in String; Found : in out Boolean ) return String; end Aids.Env;
30.909091
80
0.603922
c5292a19abf4e10b1ab2f44ad4fb69a6b11fd86d
49
ads
Ada
samples/client/petstore/ada/src/samples-petstore.ads
motivateco/swagger-codegen
643ef64f04d65b13c1ce849820b273e74fd099fd
[ "Apache-2.0" ]
2
2018-02-15T08:27:12.000Z
2020-09-29T16:57:08.000Z
samples/client/petstore/ada/src/samples-petstore.ads
motivateco/swagger-codegen
643ef64f04d65b13c1ce849820b273e74fd099fd
[ "Apache-2.0" ]
25
2016-06-30T15:32:01.000Z
2021-08-05T16:06:30.000Z
samples/client/petstore/ada/src/samples-petstore.ads
motivateco/swagger-codegen
643ef64f04d65b13c1ce849820b273e74fd099fd
[ "Apache-2.0" ]
7
2016-06-26T22:45:00.000Z
2022-03-31T21:12:16.000Z
package Samples.Petstore is end Samples.Petstore;
24.5
27
0.857143
0e77084bc70a94fd7d1f8d4e48af067b6fdaef6b
3,596
ads
Ada
source/amf/dd/amf-dg-polylines-hash.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/dd/amf-dg-polylines-hash.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/dd/amf-dg-polylines-hash.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.DG.Polylines.Hash is new AMF.Elements.Generic_Hash (DG_Polyline, DG_Polyline_Access);
71.92
78
0.398776
c52b913555736c2dac2051417d9b847b626360d5
5,252
adb
Ada
src/cobs.adb
Fabien-Chouteau/COBS
155ce5c2ecb4fffdac31df9dccd1a0d0c5916c2b
[ "MIT" ]
null
null
null
src/cobs.adb
Fabien-Chouteau/COBS
155ce5c2ecb4fffdac31df9dccd1a0d0c5916c2b
[ "MIT" ]
null
null
null
src/cobs.adb
Fabien-Chouteau/COBS
155ce5c2ecb4fffdac31df9dccd1a0d0c5916c2b
[ "MIT" ]
null
null
null
package body COBS is ------------------------- -- Max_Encoding_Length -- ------------------------- function Max_Encoding_Length (Data_Len : Storage_Count) return Storage_Count is begin return Data_Len + (Data_Len / 254) + (if (Data_Len mod 254) > 0 then 1 else 0); end Max_Encoding_Length; ------------ -- Encode -- ------------ procedure Encode (Data : Storage_Array; Output : in out Storage_Array; Output_Last : out Storage_Offset; Success : out Boolean) is Code_Pointer : Storage_Offset := Output'First; Out_Pointer : Storage_Offset := Code_Pointer + 1; Code : Storage_Element := 1; Input : Storage_Element; begin for Index in Data'Range loop if Out_Pointer not in Output'Range then Success := False; return; end if; Input := Data (Index); if Input /= 0 then Output (Out_Pointer) := Input; Out_Pointer := Out_Pointer + 1; Code := Code + 1; end if; if Input = 0 or else Code = 16#FF# then Output (Code_Pointer) := Code; Code := 1; Code_Pointer := Out_Pointer; if Input = 0 or else Index /= Data'Last then Out_Pointer := Out_Pointer + 1; end if; end if; end loop; if Code_Pointer /= Out_Pointer then Output (Code_Pointer) := Code; end if; Output_Last := Out_Pointer - 1; Success := True; end Encode; ------------ -- Decode -- ------------ procedure Decode (Data : Storage_Array; Output : in out Storage_Array; Output_Last : out Storage_Offset; Success : out Boolean) is In_Index : Storage_Offset := Data'First; Out_Index : Storage_Offset := Output'First; procedure Push (D : Storage_Element); -- Push one element to the output function Pop return Storage_Element; -- Pop one element from the input ---------- -- Push -- ---------- procedure Push (D : Storage_Element) is begin Output (Out_Index) := D; Out_Index := Out_Index + 1; end Push; --------- -- Pop -- --------- function Pop return Storage_Element is Result : constant Storage_Element := Data (In_Index); begin In_Index := In_Index + 1; return Result; end Pop; Code : Storage_Element; begin while In_Index <= Data'Last loop Code := Pop; exit when Code = 0; if Code > 1 then -- Check input and output boundaries if Out_Index + Storage_Count (Code - 1) > Output'Last + 1 or else In_Index + Storage_Count (Code - 1) > Data'Last + 1 then Success := False; return; end if; for X in 1 .. (Code - 1) loop Push (Pop); end loop; end if; if Code /= 16#FF# and then In_Index <= Data'Last then Push (0); end if; end loop; Output_Last := Out_Index - 1; Success := True; end Decode; --------------------- -- Decode_In_Place -- --------------------- procedure Decode_In_Place (Data : in out Storage_Array; Last : out Storage_Offset; Success : out Boolean) is In_Index : Storage_Offset := Data'First; Out_Index : Storage_Offset := Data'First; procedure Push (D : Storage_Element); -- Push one element to the output function Pop return Storage_Element; -- Pop one element from the input ---------- -- Push -- ---------- procedure Push (D : Storage_Element) is begin Data (Out_Index) := D; Out_Index := Out_Index + 1; end Push; --------- -- Pop -- --------- function Pop return Storage_Element is Result : constant Storage_Element := Data (In_Index); begin In_Index := In_Index + 1; return Result; end Pop; Code : Storage_Element; begin while In_Index <= Data'Last loop Code := Pop; exit when Code = 0; if Code > 1 then -- Check input and output boundaries if Out_Index + Storage_Count (Code - 1) > Data'Last + 1 or else In_Index + Storage_Count (Code - 1) > Data'Last + 1 then Success := False; return; end if; for X in 1 .. (Code - 1) loop Push (Pop); end loop; end if; if Code /= 16#FF# and then In_Index <= Data'Last then Push (0); end if; end loop; Last := Out_Index - 1; Success := True; end Decode_In_Place; end COBS;
24.657277
69
0.472582
18bf47f9093ce03ad5370cd69c37bd032fe93f5f
2,988
ads
Ada
polynomial/clenshaw/a_legendre.ads
jscparker/math_packages
b112a90338014d5c2dfae3f7265ee30841fb6cfd
[ "ISC", "MIT" ]
30
2018-12-09T01:15:04.000Z
2022-03-20T16:14:54.000Z
polynomial/clenshaw/a_legendre.ads
jscparker/math_packages
b112a90338014d5c2dfae3f7265ee30841fb6cfd
[ "ISC", "MIT" ]
null
null
null
polynomial/clenshaw/a_legendre.ads
jscparker/math_packages
b112a90338014d5c2dfae3f7265ee30841fb6cfd
[ "ISC", "MIT" ]
null
null
null
-- package A_Legendre -- -- Data structure for Associated Legendre Polynomials. Used by package -- Clenshaw to generate the Associated Legendre functions via recurrance -- relations. -- -- The Norms of the functions are calculated separately from the functions. -- That's so that calculation of the norms can be moved outside the inner -- loop that generates the functions. Calculating the Norms may be -- excessively expensive in time. -- -- Function Norm is so slow it should be used to fill a table, rather -- than called excessively. -- -- Up to roughly order 900(?) is OK for k and m. Beyond that still more -- tricks are needed, but the tricks vary with l and m, so I don't bother -- with them. -- -- If you enter k < 0, or m < 0, then Constraint_error is raised. If you -- are using this data structure to make Spherical Harmonics, (which allow -- m < 0), then first set m = Abs (m); the sign of m influences only the -- Exp (i*m*Phi) part of the Spherical Harmonic. -- -- (un-normalized) Associated Legendre (m, k): ( l = k + m ) -- -- Q_0 (m, X) = (-1)**m * Sqrt(1-X*X)**m -- Q_1 (m, X) = X * (2*(m+1) - 1) * Q_0 (m, X) = Alpha*Q_0 -- Q_k (m, X) = X * ((2*(m+k) - 1) / k) * Q_k-1 (m, X) -- -((k + 2*m - 1) / k) * Q_k-2 (m, X) -- Alpha (k, m, X) = X * (2*(m+k) - 1) / k -- Beta (k, m, X) = -(k + 2*m - 1) / k -- -- Functions are orthogonal on the interval [-1,1] with -- weight function W(X) = 1. Orthogonality is respect integration, not -- summation of discrete data points. Normalizing integral: -- -- Integral (Q_k(m, X) * Q_k(m, X) * W(X)) -- = (k+2*m)! / ((k + m + 0.5) * k! * (2m-1)!!**2) -- -- The actual Assoc. Legendre Functions are usually defined with (2m-1)!! times -- the Q_0 given above, but this leads to overflow, so it's put in the Norm. -- The m values for the Assoc. Legendre Polys are always non-negative. When -- you use Assoc. Legendre Polys to make spherical, (where m is in -l..l) -- then use Abs(m) to make the Associated Legendre Functions. -- -- Data structure for instantiation of Clenshaw: -- generic type Real is digits <>; with function Sqrt (X : Real) return Real; with function Exp (X : Real) return Real; with function Log (X : Real) return Real; type Base_Poly_ID is range <>; -- Must include 0 in its range. This is checked??? package A_Legendre is function X_Lower_Bound return Real; -- -1.0 function X_Upper_Bound return Real; -- +1.0 function Alpha (k : Base_Poly_ID; m : Real; X : Real) return Real; function Beta (k : Base_Poly_ID; m : Real; X : Real) return Real; function Q_0 (m : Real; X : Real) return Real; function Normalization_Factor (k : Base_Poly_ID; m : Real) return Real; -- Multiply the Q's by this to normalize. function Normalization_Factor_0 (k : Base_Poly_ID; m : Real) return Real; -- Alternative norm; for testing. function Poly_Weight (X : Real) return Real; end A_Legendre;
37.35
79
0.64257
4ad8d4144a268e480c700d2c0cc1ae8e1ab3b04b
2,021
adb
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso/t7.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso/t7.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso/t7.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-do run } with Init7; use Init7; with Text_IO; use Text_IO; with Dump; procedure T7 is Verbose : constant Boolean := False; Local_R1 : R1; Local_R2 : R2; begin Local_R1.I := My_R1.I + 1; Local_R1.N.C1 := My_R1.N.C1 + 1; Local_R1.N.C2 := My_R1.N.C2 + 1; Local_R1.N.C3 := My_R1.N.C3 + 1; Put ("Local_R1 :"); Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } Local_R2.I := My_R2.I + 1; Local_R2.N.C1 := My_R2.N.C1 + 1; Local_R2.N.C2 := My_R2.N.C2 + 1; Local_R2.N.C3 := My_R2.N.C3 + 1; Put ("Local_R2 :"); Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } -- Local_R1 := (I => 16#12345678#, N => (16#AB0012#, 16#CD0034#, 16#EF0056#)); Put ("Local_R1 :"); Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } Local_R2 := (I => 16#12345678#, N => (16#AB0012#, 16#CD0034#, 16#EF0056#)); Put ("Local_R2 :"); Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } Local_R1.I := Local_R1.I + 1; Local_R1.N.C1 := Local_R1.N.C1 + 1; Local_R1.N.C2 := Local_R1.N.C2 + 1; Local_R1.N.C3 := Local_R1.N.C3 + 1; Put ("Local_R1 :"); Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" } Local_R2.I := Local_R2.I + 1; Local_R2.N.C1 := Local_R2.N.C1 + 1; Local_R2.N.C2 := Local_R2.N.C2 + 1; Local_R2.N.C3 := Local_R2.N.C3 + 1; Put ("Local_R2 :"); Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements); New_Line; -- { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" } end;
29.289855
83
0.613063
18e47eb749b311adad5f693a9817b415078588d4
21,948
adb
Ada
software/hal/hpl/STM32/drivers/i2c_stm32f7/stm32-i2c.adb
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
12
2017-06-08T14:19:57.000Z
2022-03-09T02:48:59.000Z
software/hal/hpl/STM32/drivers/i2c_stm32f7/stm32-i2c.adb
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
6
2017-06-08T13:13:50.000Z
2020-05-15T09:32:43.000Z
software/hal/hpl/STM32/drivers/i2c_stm32f7/stm32-i2c.adb
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
3
2017-06-30T14:05:06.000Z
2022-02-17T12:20:45.000Z
------------------------------------------------------------------------------ -- -- -- Standard Peripheral Library for STM32 Targets -- -- -- -- Copyright (C) 2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Real_Time; use Ada.Real_Time; with STM32_SVD.I2C; use STM32_SVD.I2C; with STM32_SVD.RCC; use STM32_SVD.RCC; with STM32.RCC; with HAL.I2C; use HAL.I2C; package body STM32.I2C is type I2C_Transfer_Mode is (Reload_Mode, -- Enable reload mode Autoend_Mode, -- Enable automatic end mode Softend_Mode); -- Enable software end mode type I2C_Request is (No_Start_Stop, -- Don't generate start or stop Generate_Stop, -- Generate a stop condition Generate_Start_Read, -- Generate a start read request Generate_Start_Write); -- Generate a start write request procedure Config_Transfer (Port : in out I2C_Port; Addr : I2C_Address; Size : Byte; Mode : I2C_Transfer_Mode; Request : I2C_Request); procedure Reset_Config (Port : in out I2C_Port); procedure Check_Nack (Port : in out I2C_Port; Timeout : Natural; Status : out HAL.I2C.I2C_Status); procedure Wait_Tx_Interrupt_Status (Port : in out I2C_Port; Timeout : Natural; Status : out I2C_Status); procedure Wait_Transfer_Complete_Reset_Flag (Port : in out I2C_Port; Timeout : Natural; Status : out I2C_Status); procedure Wait_Stop_Flag (Port : in out I2C_Port; Timeout : Natural; Status : out I2C_Status); ------------------ -- Port_Enabled -- ------------------ function Port_Enabled (Port : I2C_Port) return Boolean is begin return Port.Periph.CR1.PE; end Port_Enabled; --------------- -- Configure -- --------------- procedure Configure (Port : in out I2C_Port; Configuration : I2C_Configuration) is begin if Port.State /= Reset then return; end if; Port.Config := Configuration; STM32.RCC.Enable_Clock (STM32_SVD.I2C.I2C_Peripheral (Port.Periph.all)); STM32.RCC.Reset (STM32_SVD.I2C.I2C_Peripheral (Port.Periph.all)); -- Disable the I2C port Port.Periph.CR1.PE := False; -- Reset the timing register to 100_000 Hz Port.Periph.TIMINGR := (SCLL => 50, SCLH => 39, SDADEL => 1, SCLDEL => 9, PRESC => 4, others => <>); -- I2C Own Address Register configuration if Configuration.Own_Address /= 0 then Port.Periph.OAR1 := (OA1 => Configuration.Own_Address, OA1EN => True, OA1MODE => Configuration.Addressing_Mode = Addressing_Mode_10bit, others => <>); end if; -- CR2 configuration -- Enable AUTOEND by default, set NACK (should be disabled only in -- slave mode Port.Periph.CR2 := (AUTOEND => True, NACK => True, ADD10 => Configuration.Addressing_Mode = Addressing_Mode_10bit, others => <>); -- OAR2 configuration -- ??? Add support for dual addressing Port.Periph.OAR2 := (others => <>); -- CR1 configuration Port.Periph.CR1 := (GCEN => Configuration.General_Call_Enabled, NOSTRETCH => Configuration.Clock_Stretching_Enabled, others => <>); Port.State := Ready; -- Enable the port Port.Periph.CR1.PE := True; end Configure; ------------------- -- Is_Configured -- ------------------- function Is_Configured (Port : I2C_Port) return Boolean is begin return Port.State /= Reset; end Is_Configured; --------------------- -- Config_Transfer -- --------------------- procedure Config_Transfer (Port : in out I2C_Port; Addr : I2C_Address; Size : Byte; Mode : I2C_Transfer_Mode; Request : I2C_Request) is CR2 : CR2_Register := Port.Periph.CR2; begin CR2.SADD := UInt10 (Addr); CR2.NBYTES := Size; CR2.RELOAD := Mode = Reload_Mode; CR2.AUTOEND := Mode = Autoend_Mode; CR2.RD_WRN := False; CR2.START := False; CR2.STOP := False; case Request is when No_Start_Stop => null; when Generate_Stop => CR2.STOP := True; when Generate_Start_Read => CR2.RD_WRN := True; CR2.START := True; when Generate_Start_Write => CR2.START := True; end case; Port.Periph.CR2 := CR2; end Config_Transfer; ------------------ -- Reset_Config -- ------------------ procedure Reset_Config (Port : in out I2C_Port) is CR2 : CR2_Register := Port.Periph.CR2; begin CR2.SADD := 0; CR2.HEAD10R := False; CR2.NBYTES := 0; CR2.RELOAD := False; CR2.RD_WRN := False; Port.Periph.CR2 := CR2; end Reset_Config; ---------------- -- Check_Nack -- ---------------- procedure Check_Nack (Port : in out I2C_Port; Timeout : Natural; Status : out I2C_Status) is Start : constant Time := Clock; begin if Port.Periph.ISR.NACKF then if Port.State = Master_Busy_Tx or else Port.State = Mem_Busy_Tx or else Port.State = Mem_Busy_Rx then -- We generate a STOP condition if SOFTEND mode is enabled if not Port.Periph.CR2.AUTOEND then Port.Periph.CR2.STOP := True; end if; end if; while not Port.Periph.ISR.STOPF loop if Timeout > 0 and then Start + Milliseconds (Timeout) < Clock then Port.State := Ready; Status := Err_Timeout; return; end if; end loop; -- Clear the MACL amd STOP flags Port.Periph.ICR.NACKCF := True; Port.Periph.ICR.STOPCF := True; -- Clear CR2 Reset_Config (Port); Port.State := Ready; Status := Err_Error; else Status := Ok; end if; end Check_Nack; ------------------------------ -- Wait_Tx_Interrupt_Status -- ------------------------------ procedure Wait_Tx_Interrupt_Status (Port : in out I2C_Port; Timeout : Natural; Status : out I2C_Status) is Start : constant Time := Clock; begin while not Port.Periph.ISR.TXIS loop Check_Nack (Port, Timeout, Status); if Status /= Ok then Port.State := Ready; Status := Err_Error; return; end if; if Timeout > 0 and then Start + Milliseconds (Timeout) < Clock then Reset_Config (Port); Port.State := Ready; Status := Err_Timeout; return; end if; end loop; Status := Ok; end Wait_Tx_Interrupt_Status; --------------------------------------- -- Wait_Transfer_Complete_Reset_Flag -- --------------------------------------- procedure Wait_Transfer_Complete_Reset_Flag (Port : in out I2C_Port; Timeout : Natural; Status : out I2C_Status) is Start : constant Time := Clock; begin while not Port.Periph.ISR.TCR loop if Timeout > 0 and then Start + Milliseconds (Timeout) < Clock then Reset_Config (Port); Status := Err_Timeout; Port.State := Ready; return; end if; end loop; Status := Ok; end Wait_Transfer_Complete_Reset_Flag; -------------------- -- Wait_Stop_Flag -- -------------------- procedure Wait_Stop_Flag (Port : in out I2C_Port; Timeout : Natural; Status : out I2C_Status) is Start : constant Time := Clock; begin while not Port.Periph.ISR.STOPF loop Check_Nack (Port, Timeout, Status); if Status /= Ok then Port.State := Ready; Status := Err_Error; return; end if; if Timeout > 0 and then Start + Milliseconds (Timeout) < Clock then Reset_Config (Port); Status := Err_Timeout; Port.State := Ready; return; end if; end loop; -- Clear the stop flag Port.Periph.ICR.STOPCF := True; Status := Ok; end Wait_Stop_Flag; --------------------- -- Master_Transmit -- --------------------- overriding procedure Master_Transmit (Port : in out I2C_Port; Addr : I2C_Address; Data : I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) is Size_Temp : Natural := 0; Transmitted : Natural := 0; begin if Port.Periph.ISR.BUSY then Status := Busy; return; end if; if Data'Length = 0 then Status := Err_Error; return; end if; if Port.State /= Ready then Status := Busy; return; end if; Port.State := Master_Busy_Tx; -- Initiate the transfer if Data'Length > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, Generate_Start_Write); Size_Temp := 255; else Config_Transfer (Port, Addr, Data'Length, Autoend_Mode, Generate_Start_Write); Size_Temp := Data'Length; end if; -- Transfer the data while Transmitted <= Data'Length loop Wait_Tx_Interrupt_Status (Port, Timeout, Status); if Status /= Ok then return; end if; Port.Periph.TXDR.TXDATA := Data (Data'First + Transmitted); Transmitted := Transmitted + 1; if Transmitted = Size_Temp and then Transmitted < Data'Length then -- Wait for the Transfer complete reload flag Wait_Transfer_Complete_Reset_Flag (Port, Timeout, Status); if Status /= Ok then return; end if; if Data'Length - Transmitted > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, No_Start_Stop); Size_Temp := 255; else Config_Transfer (Port, Addr, Byte (Data'Length - Transmitted), Autoend_Mode, No_Start_Stop); Size_Temp := Data'Length - Transmitted; end if; end if; end loop; Wait_Stop_Flag (Port, Timeout, Status); if Status /= Ok then return; end if; -- Reset CR2 Reset_Config (Port); Port.State := Ready; Status := Ok; end Master_Transmit; -------------------- -- Master_Receive -- -------------------- overriding procedure Master_Receive (Port : in out I2C_Port; Addr : I2C_Address; Data : out I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) is Size_Temp : Natural := 0; Transmitted : Natural := 0; begin if Port.Periph.ISR.BUSY then Status := Busy; return; end if; if Port.State /= Ready then Status := Busy; return; end if; Port.State := Master_Busy_Rx; if Data'Length = 0 then Status := Err_Error; return; end if; -- Initiate the transfer if Data'Length > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, Generate_Start_Read); Size_Temp := 255; else Config_Transfer (Port, Addr, Data'Length, Autoend_Mode, Generate_Start_Read); Size_Temp := Data'Length; end if; -- Transfer the data while Transmitted < Data'Length loop while not Port.Periph.ISR.RXNE loop null; end loop; Data (Data'First + Transmitted) := Port.Periph.RXDR.RXDATA; Transmitted := Transmitted + 1; Size_Temp := Size_Temp - 1; if Size_Temp = 0 and then Transmitted < Data'Length then -- Wait for the Transfer complete reload flag while Port.Periph.ISR.TCR loop null; end loop; if Data'Length - Transmitted > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, No_Start_Stop); Size_Temp := 255; else Config_Transfer (Port, Addr, Byte (Data'Length - Transmitted), Autoend_Mode, No_Start_Stop); Size_Temp := Data'Length - Transmitted; end if; end if; end loop; Wait_Stop_Flag (Port, Timeout, Status); if Status /= Ok then return; end if; -- Reset CR2 Reset_Config (Port); Port.State := Ready; Status := Ok; end Master_Receive; --------------- -- Mem_Write -- --------------- overriding procedure Mem_Write (Port : in out I2C_Port; Addr : I2C_Address; Mem_Addr : Short; Mem_Addr_Size : I2C_Memory_Address_Size; Data : I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) is Size_Temp : Natural := 0; Transmitted : Natural := 0; begin if Port.Periph.ISR.BUSY then Status := Busy; return; end if; if Data'Length = 0 then Status := Err_Error; return; end if; if Port.State /= Ready then Status := Busy; return; end if; Port.State := Mem_Busy_Tx; -- Configure the memory transfer Config_Transfer (Port, Addr, (case Mem_Addr_Size is when Memory_Size_8b => 1, when Memory_Size_16b => 2), Reload_Mode, Generate_Start_Write); Wait_Tx_Interrupt_Status (Port, Timeout, Status); if Status /= Ok then Port.State := Ready; return; end if; case Mem_Addr_Size is when Memory_Size_8b => Port.Periph.TXDR.TXDATA := Byte (Mem_Addr); when Memory_Size_16b => declare MSB : constant Byte := Byte (Shift_Right (Mem_Addr, 8)); LSB : constant Byte := Byte (Mem_Addr and 16#FF#); begin Port.Periph.TXDR.TXDATA := MSB; Wait_Tx_Interrupt_Status (Port, Timeout, Status); if Status /= Ok then return; end if; Port.Periph.TXDR.TXDATA := LSB; end; end case; Wait_Transfer_Complete_Reset_Flag (Port, Timeout, Status); if Status /= Ok then return; end if; -- Initiate the transfer if Data'Length > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, No_Start_Stop); Size_Temp := 255; else Config_Transfer (Port, Addr, Data'Length, Autoend_Mode, No_Start_Stop); Size_Temp := Data'Length; end if; -- Transfer the data while Transmitted < Data'Length loop Wait_Tx_Interrupt_Status (Port, Timeout, Status); if Status /= Ok then return; end if; Port.Periph.TXDR.TXDATA := Data (Data'First + Transmitted); Transmitted := Transmitted + 1; if Transmitted = Size_Temp and then Transmitted < Data'Length then -- Wait for the Transfer complete reload flag Wait_Transfer_Complete_Reset_Flag (Port, Timeout, Status); if Status /= Ok then return; end if; if Data'Length - Transmitted > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, No_Start_Stop); Size_Temp := 255; else Config_Transfer (Port, Addr, Byte (Data'Length - Transmitted), Autoend_Mode, No_Start_Stop); Size_Temp := Data'Length - Transmitted; end if; end if; end loop; Wait_Stop_Flag (Port, Timeout, Status); if Status /= Ok then return; end if; -- Reset CR2 Reset_Config (Port); Port.State := Ready; Status := Ok; end Mem_Write; -------------- -- Mem_Read -- -------------- overriding procedure Mem_Read (Port : in out I2C_Port; Addr : I2C_Address; Mem_Addr : Short; Mem_Addr_Size : I2C_Memory_Address_Size; Data : out I2C_Data; Status : out I2C_Status; Timeout : Natural := 1000) is Size_Temp : Natural := 0; Transmitted : Natural := 0; begin if Port.Periph.ISR.BUSY then Status := Busy; return; end if; if Data'Length = 0 then Status := Err_Error; return; end if; if Port.State /= Ready then Status := Busy; return; end if; Port.State := Mem_Busy_Rx; -- Configure the memory transfer Config_Transfer (Port, Addr, (case Mem_Addr_Size is when Memory_Size_8b => 1, when Memory_Size_16b => 2), Softend_Mode, Generate_Start_Write); Wait_Tx_Interrupt_Status (Port, Timeout, Status); if Status /= Ok then return; end if; case Mem_Addr_Size is when Memory_Size_8b => Port.Periph.TXDR.TXDATA := Byte (Mem_Addr); when Memory_Size_16b => declare MSB : constant Byte := Byte (Shift_Right (Mem_Addr, 8)); LSB : constant Byte := Byte (Mem_Addr and 16#FF#); begin Port.Periph.TXDR.TXDATA := MSB; Wait_Tx_Interrupt_Status (Port, Timeout, Status); if Status /= Ok then return; end if; Port.Periph.TXDR.TXDATA := LSB; end; end case; -- Wait for transfer complete while not Port.Periph.ISR.TC loop null; end loop; -- Initiate the transfer if Data'Length > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, Generate_Start_Read); Size_Temp := 255; else Config_Transfer (Port, Addr, Data'Length, Autoend_Mode, Generate_Start_Read); Size_Temp := Data'Length; end if; -- Transfer the data while Transmitted < Data'Length loop while not Port.Periph.ISR.RXNE loop null; end loop; Data (Data'First + Transmitted) := Port.Periph.RXDR.RXDATA; Transmitted := Transmitted + 1; Size_Temp := Size_Temp - 1; if Size_Temp = 0 and then Transmitted < Data'Length then -- Wait for the Transfer complete reload flag while not Port.Periph.ISR.TCR loop null; end loop; if Data'Length - Transmitted > 255 then Config_Transfer (Port, Addr, 255, Reload_Mode, No_Start_Stop); Size_Temp := 255; else Config_Transfer (Port, Addr, Byte (Data'Length - Transmitted), Autoend_Mode, No_Start_Stop); Size_Temp := Data'Length - Transmitted; end if; end if; end loop; Wait_Stop_Flag (Port, Timeout, Status); if Status /= Ok then return; end if; -- Reset CR2 Reset_Config (Port); Port.State := Ready; Status := Ok; end Mem_Read; end STM32.I2C;
27.230769
78
0.510753
4ab502cd58202fcb9bb76b5b1ad10c5f0808b7b5
2,651
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c94001e.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c94001e.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c94001e.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- C94001E.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. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT A TASK IS ALSO COMPLETED IF AN EXCEPTION IS RAISED BY -- THE EXECUTION OF ITS SEQUENCE OF STATEMENTS. -- THIS MUST HOLD FOR BOTH CASES WHERE A HANDLER IS PRESENT OR NOT. -- VERSION WITH EXCEPTION HANDLER. -- WEI 3/ 4/82 -- JWC 6/28/85 RENAMED FROM C940AGA-B.ADA -- RLB 06/29/01 CORRECTED TO ALLOW AGGRESSIVE OPTIMIZATION. WITH REPORT; USE REPORT; PROCEDURE C94001E IS SUBTYPE ARG IS NATURAL RANGE 0..9; SPYNUMB : NATURAL := 0; PROCEDURE PSPY_NUMB (DIGT: IN ARG) IS BEGIN SPYNUMB := 10*SPYNUMB+DIGT; END PSPY_NUMB; BEGIN TEST ("C94001E", "TASK COMPLETION BY EXCEPTION"); BLOCK: DECLARE TASK T1; TASK BODY T1 IS TYPE I1 IS RANGE 0 .. 1; OBJ_I1 : I1; BEGIN OBJ_I1 := I1(IDENT_INT(2)); -- CONSTRAINT_ERROR. IF OBJ_I1 /= I1(IDENT_INT(0)) THEN PSPY_NUMB (1); ELSE PSPY_NUMB (2); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("OTHER EXCEPTION RAISED"); END T1; BEGIN NULL; END BLOCK; IF SPYNUMB /= 0 THEN FAILED ("TASK T1 NOT COMPLETED AFTER EXCEPTION"); COMMENT ("ACTUAL ORDER WAS:" & INTEGER'IMAGE(SPYNUMB)); END IF; RESULT; END C94001E;
32.329268
78
0.61788
0e606030a18aef3f3b7759bfa946376aeb9d4ccc
459
ads
Ada
resources/scripts/archive/archiveit.ads
VK9D/AttackSurfaceMappingTool
2d98de364508e8a10c09fbeebfa576e4671957d4
[ "Apache-2.0" ]
null
null
null
resources/scripts/archive/archiveit.ads
VK9D/AttackSurfaceMappingTool
2d98de364508e8a10c09fbeebfa576e4671957d4
[ "Apache-2.0" ]
null
null
null
resources/scripts/archive/archiveit.ads
VK9D/AttackSurfaceMappingTool
2d98de364508e8a10c09fbeebfa576e4671957d4
[ "Apache-2.0" ]
null
null
null
-- Copyright 2017 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. name = "ArchiveIt" type = "archive" function start() setratelimit(5) end function vertical(ctx, domain) scrape(ctx, {['url']=buildurl(domain)}) end function buildurl(domain) return "https://wayback.archive-it.org/all/timemap/cdx?matchType=domain&fl=original&collapse=urlkey&url=" .. domain end
25.5
119
0.734205
0ea3cc7499689f1eef5344c5657d0e5ecd4c037d
2,024
adb
Ada
awa/src/awa-events-dispatchers.adb
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
81
2015-01-18T23:02:30.000Z
2022-03-19T17:34:57.000Z
awa/src/awa-events-dispatchers.adb
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
20
2015-12-09T19:26:19.000Z
2022-03-23T14:32:43.000Z
awa/src/awa-events-dispatchers.adb
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
16
2015-06-29T02:44:06.000Z
2021-09-23T18:47:50.000Z
----------------------------------------------------------------------- -- awa-events-dispatchers -- AWA Event Dispatchers -- Copyright (C) 2012, 2017, 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 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with AWA.Events.Services; package body AWA.Events.Dispatchers is -- ------------------------------ -- Add the queue to the dispatcher. -- ------------------------------ procedure Add_Queue (Manager : in out Dispatcher; Queue : in AWA.Events.Queues.Queue_Ref; Added : out Boolean) is pragma Unreferenced (Manager, Queue); begin Added := False; end Add_Queue; -- ------------------------------ -- Dispatch the events from the queue. -- Increment the `Count` parameter to indicate the number of events -- that were dispatched. -- ------------------------------ procedure Dispatch (Manager : in Dispatcher; Queue : in AWA.Events.Queues.Queue_Ref; Count : in out Natural) is procedure Process (Event : in Module_Event'Class); procedure Process (Event : in Module_Event'Class) is begin Count := Count + 1; Manager.Manager.Dispatch (Queue, Event); end Process; begin Queue.Dequeue (Process'Access); end Dispatch; end AWA.Events.Dispatchers;
38.188679
76
0.568676
4ab71a4116b396c462485968f651b2e676f25fe3
39,159
ads
Ada
tools-src/gnu/gcc/gcc/ada/opt.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
tools-src/gnu/gcc/gcc/ada/opt.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
tools-src/gnu/gcc/gcc/ada/opt.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- O P T -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains global switches set by the initialization -- routine from the command line and referenced throughout the compiler, -- the binder or gnatmake. The comments indicate which options are used by -- which programs (GNAT, GNATBIND, GNATMAKE). with Hostparm; use Hostparm; with Types; use Types; with System.WCh_Con; use System.WCh_Con; package Opt is ---------------------------------------------- -- Settings of Modes for Current Processing -- ---------------------------------------------- -- The following mode values represent the current state of processing. -- The values set here are the default values. Unless otherwise noted, -- the value may be reset in Switch with an appropropiate switch. In -- some cases, the values can also be modified by pragmas, and in the -- case of some binder variables, Gnatbind.Scan_Bind_Arg may modify -- the default values. Ada_Bind_File : Boolean := True; -- GNATBIND -- Set True if binder file to be generated in Ada rather than C Ada_95 : Boolean := True; -- GNAT -- Set True if operating in Ada 95 mode -- Set False if operating in Ada 83 mode Ada_83 : Boolean := False; -- GNAT -- Set True if operating in Ada 83 mode -- Set False if operating in Ada 95 mode Ada_Final_Suffix : constant String := "final"; -- GNATBIND -- The suffix of the name of the finalization procedure. This variable -- may be modified by Gnatbind.Scan_Bind_Arg. Ada_Final_Name : String_Ptr := new String'("ada" & Ada_Final_Suffix); -- GNATBIND -- The name of the procedure that performs the finalization at the end of -- execution. This variable may be modified by Gnatbind.Scan_Bind_Arg. Ada_Init_Suffix : constant String := "init"; -- GNATBIND -- The suffix of the name of the initialization procedure. This variable -- may be modified by Gnatbind.Scan_Bind_Arg. Ada_Init_Name : String_Ptr := new String'("ada" & Ada_Init_Suffix); -- GNATBIND -- The name of the procedure that performs initialization at the start -- of execution. This variable may be modified by Gnatbind.Scan_Bind_Arg. Ada_Main_Name_Suffix : constant String := "main"; -- GNATBIND -- The suffix for Ada_Main_Name. Defined as a constant here so that it -- can be referenced in a uniform manner to create either the default -- value of Ada_Main_Name (declared below), or the non-default name -- set by Gnatbind.Scan_Bind_Arg. Ada_Main_Name : String_Ptr := new String'("ada_" & Ada_Main_Name_Suffix); -- GNATBIND -- The name of the Ada package generated by the binder (when in Ada mode). -- This variable may be modified by Gnatbind.Scan_Bind_Arg. Address_Clause_Overlay_Warnings : Boolean := True; -- GNAT -- Set False to disable address clause warnings All_Errors_Mode : Boolean := False; -- GNAT -- Flag set to force display of multiple errors on a single line and -- also repeated error messages for references to undefined identifiers -- and certain other repeated error messages. All_Sources : Boolean := False; -- GNATBIND -- Set to True to require all source files to be present. This flag is -- directly modified by gnatmake to affect the shared binder routines. Alternate_Main_Name : String_Ptr := null; -- Set to non null when Bind_Alternate_Main_Name is True. This value -- is modified as needed by Gnatbind.Scan_Bind_Arg. Assertions_Enabled : Boolean := False; -- GNAT -- Enable assertions made using pragma Assert. Back_Annotate_Rep_Info : Boolean := False; -- GNAT -- If set True (by use of -gnatB), enables back annotation of -- representation information by gigi, even in -gnatc mode. Bind_Alternate_Main_Name : Boolean := False; -- GNATBIND -- Set to True if main should be called Alternate_Main_Name.all. This -- variable may be set to True by Gnatbind.Scan_Bind_Arg. Bind_Main_Program : Boolean := True; -- GNATBIND -- Set to False if not binding main Ada program. Bind_For_Library : Boolean := False; -- GNATBIND -- Set to True if the binder needs to generate a file designed for -- building a library. May be set to True by Gnatbind.Scan_Bind_Arg. Bind_Only : Boolean := False; -- GNATMAKE -- Set to True to skip compile and link steps -- (except when Compile_Only and/or Link_Only are True). Brief_Output : Boolean := False; -- GNAT, GNATBIND -- Force brief error messages to standard error, even if verbose mode is -- set (so that main error messages go to standard output). Check_Object_Consistency : Boolean := False; -- GNATBIND, GNATMAKE -- Set to True to check whether every object file is consistent with -- with its corresponding ada library information (ali) file. An object -- file is inconsistent with the corresponding ali file if the object -- file does not exist or if it has an older time stamp than the ali file. -- Default above is for GNATBIND. GNATMAKE overrides this default to -- True (see Make.Initialize) since we do not need to check source -- consistencies in gnatmake in this sense. Check_Only : Boolean := False; -- GNATBIND -- Set to True to do checks only, no output of binder file. Check_Readonly_Files : Boolean := False; -- GNATMAKE -- Set to True to check readonly files during the make process. Check_Source_Files : Boolean := True; -- GNATBIND -- Set to True to enable consistency checking for any source files that -- are present (i.e. date must match the date in the library info file). -- Set to False for object file consistency check only. This flag is -- directly modified by gnatmake, to affect the shared binder routines. Check_Switches : Boolean := False; -- GNATMAKE -- Set to True to check compiler options during the make process. Check_Unreferenced : Boolean := False; -- GNAT -- Set to True to enable checking for unreferenced variables Check_Withs : Boolean := False; -- GNAT -- Set to True to enable checking for unused withs, and also the case -- of withing a package and using none of the entities in the package. Compile_Only : Boolean := False; -- GNATMAKE -- Set to True to skip bind and link steps (except when Bind_Only is True) Compress_Debug_Names : Boolean := False; -- GNATMAKE -- Set to True if the option to compress debug information is set (-gnatC) Config_File : Boolean := True; -- GNAT -- Set to False to inhibit reading and processing of gnat.adc file Config_File_Name : String_Ptr := null; -- GNAT -- File name of configuration pragmas file (given by switch -gnatec) Constant_Condition_Warnings : Boolean := False; -- GNAT -- Set to True to activate warnings on constant conditions subtype Debug_Level_Value is Nat range 0 .. 3; Debugger_Level : Debug_Level_Value := 0; -- GNATBIND -- The value given to the -g parameter. -- The default value for -g with no value is 2 -- This is usually ignored by GNATBIND, except in the VMS version -- where it is passed as an argument to __gnat_initialize to trigger -- the activation of the remote debugging interface (is this true???). Debug_Generated_Code : Boolean := False; -- GNAT -- Set True (-gnatD switch) to debug generated expanded code instead -- of the original source code. Causes debugging information to be -- written with respect to the generated code file that is written. Display_Compilation_Progress : Boolean := False; -- GNATMAKE -- Set True (-d switch) to display information on progress while compiling -- files. Internal switch to be used in conjunction with an IDE such as -- Glide. type Distribution_Stub_Mode_Type is -- GNAT (No_Stubs, -- Normal mode, no generation/compilation of distribution stubs Generate_Receiver_Stub_Body, -- The unit being compiled is the RCI body, and the compiler will -- generate the body for the receiver stubs and compile it. Generate_Caller_Stub_Body); -- The unit being compiled is the RCI spec, and the compiler will -- generate the body for the caller stubs and compile it. Distribution_Stub_Mode : Distribution_Stub_Mode_Type := No_Stubs; -- GNAT -- This enumeration variable indicates the five states of distribution -- annex stub generation/compilation. Do_Not_Execute : Boolean := False; -- GNATMAKE -- Set to True if no actual compilations should be undertaken. Dynamic_Elaboration_Checks : Boolean := False; -- GNAT -- Set True for dynamic elaboration checking mode, as set by the -gnatE -- switch or by the use of pragma Elaboration_Checks (Dynamic). Elab_Dependency_Output : Boolean := False; -- GNATBIND -- Set to True to output complete list of elaboration constraints Elab_Order_Output : Boolean := False; -- GNATBIND -- Set to True to output chosen elaboration order Elab_Warnings : Boolean := False; -- GNAT -- Set to True to generate full elaboration warnings (-gnatwl) type Exception_Mechanism_Type is (Setjmp_Longjmp, Front_End_ZCX, GCC_ZCX); Exception_Mechanism : Exception_Mechanism_Type := Setjmp_Longjmp; -- GNAT -- Set to the appropriate value depending on the default as given in -- system.ads (ZCX_By_Default, GCC_ZCX_Support, Front_End_ZCX_Support) -- and the use of -gnatL -gnatZ (and -gnatdX) Exception_Tracebacks : Boolean := False; -- GNATBIND -- Set to True to store tracebacks in exception occurrences (-E) Extensions_Allowed : Boolean := False; -- GNAT type External_Casing_Type is ( As_Is, -- External names cased as they appear in the Ada source Uppercase, -- External names forced to all uppercase letters Lowercase); -- External names forced to all lowercase letters External_Name_Imp_Casing : External_Casing_Type := Lowercase; -- The setting of this switch determines the casing of external names -- when the name is implicitly derived from an entity name (i.e. either -- no explicit External_Name or Link_Name argument is used, or, in the -- case of extended DEC pragmas, the external name is given using an -- identifier. The As_Is setting is not permitted here (since this would -- create Ada source programs that were case sensitive). External_Name_Exp_Casing : External_Casing_Type := As_Is; -- The setting of this switch determines the casing of an external name -- specified explicitly with a string literal. As_Is means the string -- literal is used as given with no modification to the casing. If -- Lowercase or Uppercase is set, then the string is forced to all -- lowercase or all uppercase letters as appropriate. Note that this -- setting has no effect if the external name is given using an identifier -- in the case of extended DEC import/export pragmas (in this case the -- casing is controlled by External_Name_Imp_Casing), and also has no -- effect if an explicit Link_Name is supplied (a link name is always -- used exactly as given). Float_Format : Character := ' '; -- GNAT -- A non-blank value indicates that a Float_Format pragma has been -- processed, in which case this variable is set to 'I' for IEEE or -- to 'V' for VAX. The setting of 'V' is only possible on OpenVMS -- versions of GNAT. Float_Format_Long : Character := ' '; -- GNAT -- A non-blank value indicates that a Long_Float pragma has been -- processed (this pragma is recognized only in OpenVMS versions -- of GNAT), in which case this variable is set to D or G for -- D_Float or G_Float. Force_ALI_Tree_File : Boolean := False; -- GNAT -- Force generation of ali file even if errors are encountered. -- Also forces generation of tree file if -gnatt is also set. Force_Compilations : Boolean := False; -- GNATMAKE -- Set to force recompilations even when the objects are up-to-date. Force_RM_Elaboration_Order : Boolean := False; -- GNATBIND -- True if binding with forced RM elaboration order (-f switch set) -- Note: this is considered an obsolescent option, to be removed in -- some future release. it is no longer documented. The proper way -- to get this effect is to use -gnatE and suppress elab checks. Full_List : Boolean := False; -- GNAT -- Set True to generate full source listing with embedded errors Global_Discard_Names : Boolean := False; -- GNAT -- Set true if a pragma Discard_Names applies to the current unit GNAT_Mode : Boolean := False; -- GNAT -- True if compiling in GNAT system mode (-g switch set) HLO_Active : Boolean := False; -- GNAT -- True if High Level Optimizer is activated Implementation_Unit_Warnings : Boolean := True; -- GNAT -- Set True to active warnings for use of implementation internal units. -- Can be controlled by use of -gnatwi/-gnatwI. Identifier_Character_Set : Character; -- GNAT -- This variable indicates the character set to be used for identifiers. -- The possible settings are: -- '1' Latin-1 -- '2' Latin-2 -- '3' Latin-3 -- '4' Latin-4 -- 'p' PC (US, IBM page 437) -- '8' PC (European, IBM page 850) -- 'f' Full upper set (all distinct) -- 'n' No upper characters (Ada/83 rules) -- 'w' Latin-1 plus wide characters allowed in identifiers -- -- The setting affects the set of letters allowed in identifiers and the -- upper/lower case equivalences. It does not affect the interpretation of -- character and string literals, which are always stored using the actual -- coding in the source program. This variable is initialized to the -- default value appropriate to the system (in Osint.Initialize), and then -- reset if a command line switch is used to change the setting. Ineffective_Inline_Warnings : Boolean := False; -- GNAT -- Set True to activate warnings if front-end inlining (-gnatN) is not -- able to actually inline a particular call (or all calls). Can be -- controlled by use of -gnatwp/-gnatwP. Init_Or_Norm_Scalars : Boolean := False; -- GNAT -- Set True if a pragma Initialize_Scalars applies to the current unit. -- Also set True if a pragma Normalize_Scalars applies. Initialize_Scalars : Boolean := False; -- GNAT -- Set True if a pragma Initialize_Scalars applies to the current unit. -- Note that Init_Or_Norm_Scalars is also set to True if this is True. Initialize_Scalars_Mode : Character := 'I'; -- GNATBIND -- Set to 'I' for -Sin (default), 'L' for -Slo, 'H' for -Shi, 'X' for -Sxx Initialize_Scalars_Val : String (1 .. 2); -- GNATBIND -- Valid only if Initialize_Scalars_Mode is set to 'X' (-Shh). Contains -- the two hex bytes from the -Shh switch. Inline_Active : Boolean := False; -- GNAT -- Set True to activate pragma Inline processing across modules. Default -- for now is not to inline across module boundaries. Front_End_Inlining : Boolean := False; -- GNAT -- Set True to activate inlining by front-end expansion. Inline_Processing_Required : Boolean := False; -- GNAT -- Set True if inline processing is required. Inline processing is -- required if an active Inline pragma is processed. The flag is set -- for a pragma Inline or Inline_Always that is actually active. In_Place_Mode : Boolean := False; -- GNATMAKE -- Set True to store ALI and object files in place ie in the object -- directory if these files already exist or in the source directory -- if not. Keep_Going : Boolean := False; -- GNATMAKE -- When True signals gnatmake to ignore compilation errors and keep -- processing sources until there is no more work. Link_Only : Boolean := False; -- GNATMAKE -- Set to True to skip compile and bind steps -- (except when Bind_Only is set to True). List_Units : Boolean := False; -- GNAT -- List units in the active library List_Dependencies : Boolean := False; -- GNATMAKE -- When True gnatmake verifies that the objects are up to date and -- outputs the list of object dependencies. This list can be used -- directly in a Makefile. List_Representation_Info : Int range 0 .. 3 := 0; -- GNAT -- Set true by -gnatR switch to list representation information. -- The settings are as follows: -- -- 0 = no listing of representation information (default as above) -- 1 = list rep info for user defined record and array types -- 2 = list rep info for all user defined types and objects -- 3 = like 2, but variable fields are decoded symbolically Locking_Policy : Character := ' '; -- GNAT -- Set to ' ' for the default case (no locking policy specified). -- Reset to first character (uppercase) of locking policy name if a -- valid pragma Locking_Policy is encountered. Look_In_Primary_Dir : Boolean := True; -- GNAT, GNATBIND, GNATMAKE -- Set to False if a -I- was present on the command line. -- When True we are allowed to look in the primary directory to locate -- other source or library files. Mapping_File_Name : String_Ptr := null; -- GNAT -- File name of mapping between unit names, file names and path names. -- (given by switch -gnatem) Maximum_Errors : Int := 9999; -- GNAT, GNATBIND -- Maximum number of errors before compilation is terminated Maximum_File_Name_Length : Int; -- GNAT, GNATBIND -- Maximum number of characters allowed in a file name, not counting the -- extension, as set by the appropriate switch. If no switch is given, -- then this value is initialized by Osint to the appropriate value. Maximum_Processes : Positive := 1; -- GNATMAKE -- Maximum number of processes that should be spawned to carry out -- compilations. Minimal_Recompilation : Boolean := False; -- GNATMAKE -- Set to True if minimal recompilation mode requested. No_Stdlib : Boolean := False; -- GNATMAKE -- Set to True if no default library search dirs added to search list. No_Stdinc : Boolean := False; -- GNATMAKE -- Set to True if no default source search dirs added to search list. No_Main_Subprogram : Boolean := False; -- GNATMAKE, GNATBIND -- Set to True if compilation/binding of a program without main -- subprogram requested. Normalize_Scalars : Boolean := False; -- GNAT -- Set True if a pragma Normalize_Scalars applies to the current unit. -- Note that Init_Or_Norm_Scalars is also set to True if this is True. No_Run_Time : Boolean := False; -- GNAT -- Set True if a valid pragma No_Run_Time is processed or if the -- flag Targparm.High_Integrity_Mode_On_Target is set True. type Operating_Mode_Type is (Check_Syntax, Check_Semantics, Generate_Code); Operating_Mode : Operating_Mode_Type := Generate_Code; -- GNAT -- Indicates the operating mode of the compiler. The default is generate -- code, which runs the parser, semantics and backend. Switches can be -- used to set syntax checking only mode, or syntax and semantics checking -- only mode. Operating_Mode can also be modified as a result of detecting -- errors during the compilation process. In particular if any error is -- detected then this flag is reset from Generate_Code to Check_Semantics -- after generating an error message. Output_File_Name_Present : Boolean := False; -- GNATBIND, GNAT -- Set to True when the output C file name is given with option -o -- for GNATBIND or when the object file name is given with option -- -gnatO for GNAT. Output_Linker_Option_List : Boolean := False; -- GNATBIND -- True if output of list of linker options is requested (-K switch set) Output_Object_List : Boolean := False; -- GNATBIND -- True if output of list of objects is requested (-O switch set) Pessimistic_Elab_Order : Boolean := False; -- GNATBIND -- True if pessimistic elaboration order is to be chosen (-p switch set) Polling_Required : Boolean := False; -- GNAT -- Set to True if polling for asynchronous abort is enabled by using -- the -gnatP option for GNAT. Print_Generated_Code : Boolean := False; -- GNAT -- Set to True to enable output of generated code in source form. This -- flag is set by the -gnatG switch. Propagate_Exceptions : Boolean := False; -- GNAT -- Indicates if subprogram descriptor exception tables should be -- built for imported subprograms. Set True if a Propagate_Exceptions -- pragma applies to the extended main unit. Queuing_Policy : Character := ' '; -- GNAT -- Set to ' ' for the default case (no queuing policy specified). Reset to -- Reset to first character (uppercase) of locking policy name if a valid -- Queuing_Policy pragma is encountered. Quiet_Output : Boolean := False; -- GNATMAKE -- Set to True if the list of compilation commands should not be output. Shared_Libgnat : Boolean; -- GNATBIND -- Set to True if a shared libgnat is requested by using the -shared -- option for GNATBIND and to False when using the -static option. The -- value of this switch is set by Gnatbind.Scan_Bind_Arg. Software_Overflow_Checking : Boolean; -- GNAT -- Set to True by Osint.Initialize if the target requires the software -- approach to integer arithmetic overflow checking (i.e. the use of -- double length arithmetic followed by a range check). Set to False -- if the target implements hardware overflow checking. Stack_Checking_Enabled : Boolean; -- GNAT -- Set to indicate if -fstack-check switch is set for the compilation. -- True means that the switch is set, so that stack checking is enabled. -- False means that the switch is not set (no stack checking). This -- value is obtained from the external imported value flag_stack_check -- in the gcc backend (see Frontend) and may be referenced throughout -- the compilation phases. Strict_Math : aliased Boolean := False; -- GNAT -- This switch is set True if the current unit is to be compiled in -- strict math mode. The effect is to cause certain library file name -- substitutions to implement strict math semantics. See the routine -- Adjust_File_Name_For_Configuration, and also the configuration -- in the body of Opt. -- -- Note: currently this switch is always False. Eventually it will be -- settable by a switch and a configuration pragma. Style_Check : Boolean := False; -- GNAT -- Set True to perform style checks. Activates checks carried out -- in package Style (see body of this package for details of checks) -- This flag is set True by either the -gnatg or -gnaty switches. System_Extend_Pragma_Arg : Node_Id := Empty; -- GNAT -- Set non-empty if and only if a correct Extend_System pragma was present -- in which case it points to the argument of the pragma, and the name can -- be located as Chars (Expression (System_Extend_Pragma_Arg)). Subunits_Missing : Boolean := False; -- This flag is set true if missing subunits are detected with code -- generation active. This causes code generation to be skipped. Suppress_Options : Suppress_Record; -- GNAT -- Flags set True to suppress corresponding check, i.e. add an implicit -- pragma Suppress at the outer level of each unit compiled. Note that -- these suppress actions can be overridden by the use of the Unsuppress -- pragma. This variable is initialized by Osint.Initialize. Table_Factor : Int := 1; -- Factor by which all initial table sizes set in Alloc are multiplied. -- Used in Table to calculate initial table sizes (the initial table -- size is the value in Alloc, used as the Table_Initial parameter -- value, multiplied by the factor given here. The default value is -- used if no -gnatT switch appears. Task_Dispatching_Policy : Character := ' '; -- GNAT -- Set to ' ' for the default case (no task dispatching policy specified). -- Reset to first character (uppercase) of task dispatching policy name -- if a valid Task_Dispatching_Policy pragma is encountered. Tasking_Used : Boolean := False; -- Set True if any tasking construct is encountered. Used to activate the -- output of the Q, L and T lines in ali files. Time_Slice_Set : Boolean := False; -- Set True if a pragma Time_Slice is processed in the main unit, or -- if the T switch is present to set a time slice value. Time_Slice_Value : Nat; -- Time slice value. Valid only if Time_Slice_Set is True, i.e. if a -- Time_Slice pragma has been processed. Set to the time slice value -- in microseconds. Negative values are stored as zero, and the value -- is not larger than 1_000_000_000 (1000 seconds). Values larger than -- this are reset to this maximum. Tolerate_Consistency_Errors : Boolean := False; -- GNATBIND -- Tolerate time stamp and other consistency errors. If this switch is -- set true, then inconsistencies result in warnings rather than errors. Tree_Output : Boolean := False; -- GNAT -- Set True to generate output tree file Try_Semantics : Boolean := False; -- GNAT -- Flag set to force attempt at semantic analysis, even if parser errors -- occur. This will probably cause blowups at this stage in the game. On -- the other hand, most such blowups will be caught cleanly and simply -- say compilation abandoned. Unique_Error_Tag : Boolean := Tag_Errors; -- GNAT -- Indicates if error messages are to be prefixed by the string error: -- Initialized from Tag_Errors, can be forced on with the -gnatU switch. Unreserve_All_Interrupts : Boolean := False; -- GNAT, GNATBIND -- Normally set False, set True if a valid Unreserve_All_Interrupts -- pragma appears anywhere in the main unit for GNAT, or if any ALI -- file has the corresponding attribute set in GNATBIND. Upper_Half_Encoding : Boolean := False; -- GNAT -- Normally set False, indicating that upper half ASCII characters are -- used in the normal way to represent themselves. If the wide character -- encoding method uses the upper bit for this encoding, then this flag -- is set True, and upper half characters in the source indicate the -- start of a wide character sequence. Usage_Requested : Boolean := False; -- GNAT, GNATBIND, GNATMAKE -- Set to True if h switch encountered requesting usage information Use_VADS_Size : Boolean := False; -- GNAT -- Set to True if a valid pragma Use_VADS_Size is processed Validity_Checks_On : Boolean := True; -- This flag determines if validity checking is on or off. The initial -- state is on, and the required default validity checks are active. The -- actual set of checks that is performed if Validity_Checks_On is set -- is defined by the switches in package Sem_Val. The Validity_Checks_On -- switch is controlled by pragma Validity_Checks (On | Off), and also -- some generated compiler code (typically code that has to do with -- validity check generation) is compiled with this switch set to False. Verbose_Mode : Boolean := False; -- GNAT, GNATBIND -- Set to True to get verbose mode (full error message text and location -- information sent to standard output, also header, copyright and summary) Warn_On_Biased_Rounding : Boolean := False; -- GNAT -- Set to True to generate warnings for static constants that are rounded -- in a manner inconsistent with unbiased rounding (round to even). Can -- be modified by use of -gnatwb/B. Warn_On_Hiding : Boolean := False; -- GNAT -- Set to True to generate warnings if a declared entity hides another -- entity. The default is that this warning is suppressed. Warn_On_Redundant_Constructs : Boolean := False; -- GNAT -- Set to True to generate warnings for redundant constructs (e.g. useless -- assignments/conversions). The default is that this warning is disabled. type Warning_Mode_Type is (Suppress, Normal, Treat_As_Error); Warning_Mode : Warning_Mode_Type := Normal; -- GNAT, GNATBIND -- Controls treatment of warning messages. If set to Suppress, warning -- messages are not generated at all. In Normal mode, they are generated -- but do not count as errors. In Treat_As_Error mode, warning messages -- are generated and are treated as errors. Wide_Character_Encoding_Method : WC_Encoding_Method := WCEM_Brackets; -- GNAT -- Method used for encoding wide characters in the source program. See -- description of type in unit System.WCh_Con for a list of the methods -- that are currently supported. Note that brackets notation is always -- recognized in source programs regardless of the setting of this -- variable. The default setting causes only the brackets notation -- to be recognized. If this is the main unit, this setting also -- controls the output of the W=? parameter in the ali file, which -- is used to provide the default for Wide_Text_IO files. Xref_Active : Boolean := True; -- GNAT -- Set if cross-referencing is enabled (i.e. xref info in ali files) Zero_Cost_Exceptions_Val : Boolean; Zero_Cost_Exceptions_Set : Boolean := False; -- GNAT -- These values are to record the setting of the zero cost exception -- handling mode set by argument switches (-gnatZ/-gnatL). If the -- value is set by one of these switches, then Zero_Cost_Exceptions_Set -- is set to True, and Zero_Cost_Exceptions_Val indicates the setting. -- This value is used to reset ZCX_By_Default_On_Target. ---------------------------- -- Configuration Settings -- ---------------------------- -- These are settings that are used to establish the mode at the start -- of each unit. The values defined below can be affected either by -- command line switches, or by the use of appropriate configuration -- pragmas in the gnat.adc file. Ada_83_Config : Boolean; -- GNAT -- This is the value of the configuration switch for Ada 83 mode, as set -- by the command line switch -gnat83, and possibly modified by the use -- of configuration pragmas Ada_95 and Ada_83 in the gnat.adc file. This -- switch is used to set the initial value for Ada_83 mode at the start -- of analysis of a unit. Note however, that the setting of this switch -- is ignored for internal and predefined units (which are always compiled -- in Ada 95 mode). Dynamic_Elaboration_Checks_Config : Boolean := False; -- GNAT -- Set True for dynamic elaboration checking mode, as set by the -gnatE -- switch or by the use of pragma Elaboration_Checking (Dynamic). Extensions_Allowed_Config : Boolean; -- GNAT -- This is the switch that indicates whether extensions are allowed. -- It can be set True either by use of the -gnatX switch, or by use -- of the configuration pragma Extensions_Allowed (On). It is always -- set to True for internal GNAT units, since extensions are always -- permitted in such units. External_Name_Exp_Casing_Config : External_Casing_Type; -- GNAT -- This is the value of the configuration switch that controls casing -- of external symbols for which an explicit external name is given. It -- can be set to Uppercase by the command line switch -gnatF, and further -- modified by the use of the configuration pragma External_Name_Casing -- in the gnat.adc file. This switch is used to set the initial value -- for External_Name_Exp_Casing at the start of analyzing each unit. -- Note however that the setting of this switch is ignored for internal -- and predefined units (which are always compiled with As_Is mode). External_Name_Imp_Casing_Config : External_Casing_Type; -- GNAT -- This is the value of the configuration switch that controls casing -- of external symbols where the external name is implicitly given. It -- can be set to Uppercase by the command line switch -gnatF, and further -- modified by the use of the configuration pragma External_Name_Casing -- in the gnat.adc file. This switch is used to set the initial value -- for External_Name_Imp_Casing at the start of analyzing each unit. -- Note however that the setting of this switch is ignored for internal -- and predefined units (which are always compiled with Lowercase mode). Polling_Required_Config : Boolean; -- GNAT -- This is the value of the configuration switch that controls polling -- mode. It can be set True by the command line switch -gnatP, and then -- further modified by the use of pragma Polling in the gnat.adc file. -- This switch is used to set the initial value for Polling_Required -- at the start of analyzing each unit. Use_VADS_Size_Config : Boolean; -- GNAT -- This is the value of the configuration switch that controls the use -- of VADS_Size instead of Size whereever the attribute Size is used. -- It can be set True by the use of the pragma Use_VADS_Size in the -- gnat.adc file. This switch is used to set the initial value for -- Use_VADS_Size at the start of analyzing each unit. Note however that -- the setting of this switch is ignored for internal and predefined -- units (which are always compiled with the standard Size semantics). type Config_Switches_Type is private; -- Type used to save values of the switches set from Config values procedure Save_Opt_Config_Switches (Save : out Config_Switches_Type); -- This procedure saves the current values of the switches which are -- initialized from the above Config values, and then resets these -- switches according to the Config value settings. procedure Set_Opt_Config_Switches (Internal_Unit : Boolean); -- This procedure sets the switches to the appropriate initial values. -- The parameter Internal_Unit is True for an internal or predefined -- unit, and affects the way the switches are set (see above). procedure Restore_Opt_Config_Switches (Save : Config_Switches_Type); -- This procedure restores a set of switch values previously saved -- by a call to Save_Opt_Switches. procedure Register_Opt_Config_Switches; -- This procedure is called after processing the gnat.adc file to record -- the values of the Config switches, as possibly modified by the use -- of command line switches and configuration pragmas. ------------------------ -- Other Global Flags -- ------------------------ Expander_Active : Boolean := False; -- A flag that indicates if expansion is active (True) or deactivated -- (False). When expansion is deactivated all calls to expander routines -- have no effect. Note that the initial setting of False is merely to -- prevent saving of an undefined value for an initial call to the -- Expander_Mode_Save_And_Set procedure. For more information on the -- use of this flag, see package Expander. Indeed this flag might more -- logically be in the spec of Expander, but it is referenced by Errout, -- and it really seems wrong for Errout to depend on Expander. ----------------------- -- Tree I/O Routines -- ----------------------- procedure Tree_Read; -- Reads switch settings from current tree file using Tree_Read procedure Tree_Write; -- Writes out switch settings to current tree file using Tree_Write private type Config_Switches_Type is record Ada_83 : Boolean; Dynamic_Elaboration_Checks : Boolean; Extensions_Allowed : Boolean; External_Name_Exp_Casing : External_Casing_Type; External_Name_Imp_Casing : External_Casing_Type; Polling_Required : Boolean; Use_VADS_Size : Boolean; end record; end Opt;
43.753073
79
0.67752
0e92c188986cf46ecaf2f9b45918c41850dc7454
6,735
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-wchjis.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-wchjis.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-wchjis.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . W C H _ J I S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; package body System.WCh_JIS is type Byte is mod 256; EUC_Hankaku_Kana : constant Byte := 16#8E#; -- Prefix byte in EUC for Hankaku Kana (small Katakana). Such characters -- in EUC are represented by a prefix byte followed by the code, which -- is in the upper half (the corresponding JIS internal code is in the -- range 16#0080# - 16#00FF#). function EUC_To_JIS (EUC1, EUC2 : Character) return Wide_Character is EUC1B : constant Byte := Character'Pos (EUC1); EUC2B : constant Byte := Character'Pos (EUC2); begin if EUC2B not in 16#A0# .. 16#FE# then raise Constraint_Error; end if; if EUC1B = EUC_Hankaku_Kana then return Wide_Character'Val (EUC2B); else if EUC1B not in 16#A0# .. 16#FE# then raise Constraint_Error; else return Wide_Character'Val (256 * Natural (EUC1B and 16#7F#) + Natural (EUC2B and 16#7F#)); end if; end if; end EUC_To_JIS; ---------------- -- JIS_To_EUC -- ---------------- procedure JIS_To_EUC (J : Wide_Character; EUC1 : out Character; EUC2 : out Character) is JIS1 : constant Natural := Wide_Character'Pos (J) / 256; JIS2 : constant Natural := Wide_Character'Pos (J) rem 256; begin -- Special case of small Katakana if JIS1 = 0 then -- The value must be in the range 16#80# to 16#FF# so that the upper -- bit is set in both bytes. if JIS2 < 16#80# then raise Constraint_Error; end if; EUC1 := Character'Val (EUC_Hankaku_Kana); EUC2 := Character'Val (JIS2); -- The upper bit of both characters must be clear, or this is not -- a valid character for representation in EUC form. elsif JIS1 > 16#7F# or else JIS2 > 16#7F# then raise Constraint_Error; -- Result is just the two characters with upper bits set else EUC1 := Character'Val (JIS1 + 16#80#); EUC2 := Character'Val (JIS2 + 16#80#); end if; end JIS_To_EUC; ---------------------- -- JIS_To_Shift_JIS -- ---------------------- procedure JIS_To_Shift_JIS (J : Wide_Character; SJ1 : out Character; SJ2 : out Character) is JIS1 : Byte; JIS2 : Byte; begin -- The following is the required algorithm, it's hard to make any -- more intelligent comments. This was copied from a public domain -- C program called etos.c (author unknown). JIS1 := Byte (Natural (Wide_Character'Pos (J) / 256)); JIS2 := Byte (Natural (Wide_Character'Pos (J) rem 256)); if JIS1 > 16#5F# then JIS1 := JIS1 + 16#80#; end if; if (JIS1 mod 2) = 0 then SJ1 := Character'Val ((JIS1 - 16#30#) / 2 + 16#88#); SJ2 := Character'Val (JIS2 + 16#7E#); else if JIS2 >= 16#60# then JIS2 := JIS2 + 16#01#; end if; SJ1 := Character'Val ((JIS1 - 16#31#) / 2 + 16#89#); SJ2 := Character'Val (JIS2 + 16#1F#); end if; end JIS_To_Shift_JIS; ---------------------- -- Shift_JIS_To_JIS -- ---------------------- function Shift_JIS_To_JIS (SJ1, SJ2 : Character) return Wide_Character is SJIS1 : Byte; SJIS2 : Byte; JIS1 : Byte; JIS2 : Byte; begin -- The following is the required algorithm, it's hard to make any -- more intelligent comments. This was copied from a public domain -- C program called stoj.c written by shige@csk.JUNET. SJIS1 := Character'Pos (SJ1); SJIS2 := Character'Pos (SJ2); if SJIS1 >= 16#E0# then SJIS1 := SJIS1 - 16#40#; end if; if SJIS2 >= 16#9F# then JIS1 := (SJIS1 - 16#88#) * 2 + 16#30#; JIS2 := SJIS2 - 16#7E#; else if SJIS2 >= 16#7F# then SJIS2 := SJIS2 - 16#01#; end if; JIS1 := (SJIS1 - 16#89#) * 2 + 16#31#; JIS2 := SJIS2 - 16#1F#; end if; if JIS1 not in 16#20# .. 16#7E# or else JIS2 not in 16#20# .. 16#7E# then raise Constraint_Error; else return Wide_Character'Val (256 * Natural (JIS1) + Natural (JIS2)); end if; end Shift_JIS_To_JIS; end System.WCh_JIS;
35.447368
78
0.486414
0eb6e7ea315946f9674b90f9c9b3801aef37f5e7
31,639
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-cohama.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-cohama.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-cohama.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . H A S H E D _ M A P S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; with Ada.Containers.Hash_Tables.Generic_Operations; pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Operations); with Ada.Containers.Hash_Tables.Generic_Keys; pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Keys); with Ada.Containers.Helpers; use Ada.Containers.Helpers; with System; use type System.Address; package body Ada.Containers.Hashed_Maps is pragma Warnings (Off, "variable ""Busy*"" is not referenced"); pragma Warnings (Off, "variable ""Lock*"" is not referenced"); -- See comment in Ada.Containers.Helpers ----------------------- -- Local Subprograms -- ----------------------- function Copy_Node (Source : Node_Access) return Node_Access; pragma Inline (Copy_Node); function Equivalent_Key_Node (Key : Key_Type; Node : Node_Access) return Boolean; pragma Inline (Equivalent_Key_Node); procedure Free (X : in out Node_Access); function Find_Equal_Key (R_HT : Hash_Table_Type; L_Node : Node_Access) return Boolean; function Hash_Node (Node : Node_Access) return Hash_Type; pragma Inline (Hash_Node); function Next (Node : Node_Access) return Node_Access; pragma Inline (Next); function Read_Node (Stream : not null access Root_Stream_Type'Class) return Node_Access; pragma Inline (Read_Node); procedure Set_Next (Node : Node_Access; Next : Node_Access); pragma Inline (Set_Next); function Vet (Position : Cursor) return Boolean; procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Access); pragma Inline (Write_Node); -------------------------- -- Local Instantiations -- -------------------------- package HT_Ops is new Hash_Tables.Generic_Operations (HT_Types => HT_Types, Hash_Node => Hash_Node, Next => Next, Set_Next => Set_Next, Copy_Node => Copy_Node, Free => Free); package Key_Ops is new Hash_Tables.Generic_Keys (HT_Types => HT_Types, Next => Next, Set_Next => Set_Next, Key_Type => Key_Type, Hash => Hash, Equivalent_Keys => Equivalent_Key_Node); function Is_Equal is new HT_Ops.Generic_Equal (Find_Equal_Key); procedure Read_Nodes is new HT_Ops.Generic_Read (Read_Node); procedure Write_Nodes is new HT_Ops.Generic_Write (Write_Node); --------- -- "=" -- --------- function "=" (Left, Right : Map) return Boolean is begin return Is_Equal (Left.HT, Right.HT); end "="; ------------ -- Adjust -- ------------ procedure Adjust (Container : in out Map) is begin HT_Ops.Adjust (Container.HT); end Adjust; ------------ -- Assign -- ------------ procedure Assign (Target : in out Map; Source : Map) is procedure Insert_Item (Node : Node_Access); pragma Inline (Insert_Item); procedure Insert_Items is new HT_Ops.Generic_Iteration (Insert_Item); ----------------- -- Insert_Item -- ----------------- procedure Insert_Item (Node : Node_Access) is begin Target.Insert (Key => Node.Key, New_Item => Node.Element); end Insert_Item; -- Start of processing for Assign begin if Target'Address = Source'Address then return; end if; Target.Clear; if Target.Capacity < Source.Length then Target.Reserve_Capacity (Source.Length); end if; Insert_Items (Source.HT); end Assign; -------------- -- Capacity -- -------------- function Capacity (Container : Map) return Count_Type is begin return HT_Ops.Capacity (Container.HT); end Capacity; ----------- -- Clear -- ----------- procedure Clear (Container : in out Map) is begin HT_Ops.Clear (Container.HT); end Clear; ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong map"; end if; pragma Assert (Vet (Position), "Position cursor in Constant_Reference is bad"); declare HT : Hash_Table_Type renames Container'Unrestricted_Access.all.HT; TC : constant Tamper_Counts_Access := HT.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Constant_Reference; function Constant_Reference (Container : aliased Map; Key : Key_Type) return Constant_Reference_Type is HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; Node : constant Node_Access := Key_Ops.Find (HT, Key); begin if Checks and then Node = null then raise Constraint_Error with "key not in map"; end if; declare TC : constant Tamper_Counts_Access := HT.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => Node.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Map; Key : Key_Type) return Boolean is begin return Find (Container, Key) /= No_Element; end Contains; ---------- -- Copy -- ---------- function Copy (Source : Map; Capacity : Count_Type := 0) return Map is C : Count_Type; begin if Capacity < Source.Length then if Checks and then Capacity /= 0 then raise Capacity_Error with "Requested capacity is less than Source length"; end if; C := Source.Length; else C := Capacity; end if; return Target : Map do Target.Reserve_Capacity (C); Target.Assign (Source); end return; end Copy; --------------- -- Copy_Node -- --------------- function Copy_Node (Source : Node_Access) return Node_Access is Target : constant Node_Access := new Node_Type'(Key => Source.Key, Element => Source.Element, Next => null); begin return Target; end Copy_Node; ------------ -- Delete -- ------------ procedure Delete (Container : in out Map; Key : Key_Type) is X : Node_Access; begin Key_Ops.Delete_Key_Sans_Free (Container.HT, Key, X); if Checks and then X = null then raise Constraint_Error with "attempt to delete key not in map"; end if; Free (X); end Delete; procedure Delete (Container : in out Map; Position : in out Cursor) is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of Delete equals No_Element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor of Delete designates wrong map"; end if; TC_Check (Container.HT.TC); pragma Assert (Vet (Position), "bad cursor in Delete"); HT_Ops.Delete_Node_Sans_Free (Container.HT, Position.Node); Free (Position.Node); Position.Container := null; end Delete; ------------- -- Element -- ------------- function Element (Container : Map; Key : Key_Type) return Element_Type is HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; Node : constant Node_Access := Key_Ops.Find (HT, Key); begin if Checks and then Node = null then raise Constraint_Error with "no element available because key not in map"; end if; return Node.Element; end Element; function Element (Position : Cursor) return Element_Type is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of function Element equals No_Element"; end if; pragma Assert (Vet (Position), "bad cursor in function Element"); return Position.Node.Element; end Element; ------------------------- -- Equivalent_Key_Node -- ------------------------- function Equivalent_Key_Node (Key : Key_Type; Node : Node_Access) return Boolean is begin return Equivalent_Keys (Key, Node.Key); end Equivalent_Key_Node; --------------------- -- Equivalent_Keys -- --------------------- function Equivalent_Keys (Left, Right : Cursor) return Boolean is begin if Checks and then Left.Node = null then raise Constraint_Error with "Left cursor of Equivalent_Keys equals No_Element"; end if; if Checks and then Right.Node = null then raise Constraint_Error with "Right cursor of Equivalent_Keys equals No_Element"; end if; pragma Assert (Vet (Left), "Left cursor of Equivalent_Keys is bad"); pragma Assert (Vet (Right), "Right cursor of Equivalent_Keys is bad"); return Equivalent_Keys (Left.Node.Key, Right.Node.Key); end Equivalent_Keys; function Equivalent_Keys (Left : Cursor; Right : Key_Type) return Boolean is begin if Checks and then Left.Node = null then raise Constraint_Error with "Left cursor of Equivalent_Keys equals No_Element"; end if; pragma Assert (Vet (Left), "Left cursor in Equivalent_Keys is bad"); return Equivalent_Keys (Left.Node.Key, Right); end Equivalent_Keys; function Equivalent_Keys (Left : Key_Type; Right : Cursor) return Boolean is begin if Checks and then Right.Node = null then raise Constraint_Error with "Right cursor of Equivalent_Keys equals No_Element"; end if; pragma Assert (Vet (Right), "Right cursor of Equivalent_Keys is bad"); return Equivalent_Keys (Left, Right.Node.Key); end Equivalent_Keys; ------------- -- Exclude -- ------------- procedure Exclude (Container : in out Map; Key : Key_Type) is X : Node_Access; begin Key_Ops.Delete_Key_Sans_Free (Container.HT, Key, X); Free (X); end Exclude; -------------- -- Finalize -- -------------- procedure Finalize (Container : in out Map) is begin HT_Ops.Finalize (Container.HT); end Finalize; procedure Finalize (Object : in out Iterator) is begin if Object.Container /= null then Unbusy (Object.Container.HT.TC); end if; end Finalize; ---------- -- Find -- ---------- function Find (Container : Map; Key : Key_Type) return Cursor is HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; Node : constant Node_Access := Key_Ops.Find (HT, Key); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node, Hash_Type'Last); end Find; -------------------- -- Find_Equal_Key -- -------------------- function Find_Equal_Key (R_HT : Hash_Table_Type; L_Node : Node_Access) return Boolean is R_Index : constant Hash_Type := Key_Ops.Index (R_HT, L_Node.Key); R_Node : Node_Access := R_HT.Buckets (R_Index); begin while R_Node /= null loop if Equivalent_Keys (L_Node.Key, R_Node.Key) then return L_Node.Element = R_Node.Element; end if; R_Node := R_Node.Next; end loop; return False; end Find_Equal_Key; ----------- -- First -- ----------- function First (Container : Map) return Cursor is Pos : Hash_Type; Node : constant Node_Access := HT_Ops.First (Container.HT, Pos); begin if Node = null then return No_Element; end if; return Cursor'(Container'Unrestricted_Access, Node, Pos); end First; function First (Object : Iterator) return Cursor is begin return Object.Container.First; end First; ---------- -- Free -- ---------- procedure Free (X : in out Node_Access) is procedure Deallocate is new Ada.Unchecked_Deallocation (Node_Type, Node_Access); begin if X /= null then X.Next := X; -- detect mischief (in Vet) Deallocate (X); end if; end Free; ------------------------ -- Get_Element_Access -- ------------------------ function Get_Element_Access (Position : Cursor) return not null Element_Access is begin return Position.Node.Element'Access; end Get_Element_Access; ----------------- -- Has_Element -- ----------------- function Has_Element (Position : Cursor) return Boolean is begin pragma Assert (Vet (Position), "bad cursor in Has_Element"); return Position.Node /= null; end Has_Element; --------------- -- Hash_Node -- --------------- function Hash_Node (Node : Node_Access) return Hash_Type is begin return Hash (Node.Key); end Hash_Node; ------------- -- Include -- ------------- procedure Include (Container : in out Map; Key : Key_Type; New_Item : Element_Type) is Position : Cursor; Inserted : Boolean; begin Insert (Container, Key, New_Item, Position, Inserted); if not Inserted then TE_Check (Container.HT.TC); Position.Node.Key := Key; Position.Node.Element := New_Item; end if; end Include; ------------ -- Insert -- ------------ procedure Insert (Container : in out Map; Key : Key_Type; Position : out Cursor; Inserted : out Boolean) is function New_Node (Next : Node_Access) return Node_Access; pragma Inline (New_Node); procedure Local_Insert is new Key_Ops.Generic_Conditional_Insert (New_Node); -------------- -- New_Node -- -------------- function New_Node (Next : Node_Access) return Node_Access is begin return new Node_Type'(Key => Key, Element => <>, Next => Next); end New_Node; HT : Hash_Table_Type renames Container.HT; -- Start of processing for Insert begin if HT_Ops.Capacity (HT) = 0 then HT_Ops.Reserve_Capacity (HT, 1); end if; Local_Insert (HT, Key, Position.Node, Inserted); if Inserted and then HT.Length > HT_Ops.Capacity (HT) then HT_Ops.Reserve_Capacity (HT, HT.Length); end if; Position.Container := Container'Unrestricted_Access; end Insert; procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Type; Position : out Cursor; Inserted : out Boolean) is function New_Node (Next : Node_Access) return Node_Access; pragma Inline (New_Node); procedure Local_Insert is new Key_Ops.Generic_Conditional_Insert (New_Node); -------------- -- New_Node -- -------------- function New_Node (Next : Node_Access) return Node_Access is begin return new Node_Type'(Key, New_Item, Next); end New_Node; HT : Hash_Table_Type renames Container.HT; -- Start of processing for Insert begin if HT_Ops.Capacity (HT) = 0 then HT_Ops.Reserve_Capacity (HT, 1); end if; Local_Insert (HT, Key, Position.Node, Inserted); if Inserted and then HT.Length > HT_Ops.Capacity (HT) then HT_Ops.Reserve_Capacity (HT, HT.Length); end if; Position.Container := Container'Unrestricted_Access; end Insert; procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Type) is Position : Cursor; pragma Unreferenced (Position); Inserted : Boolean; begin Insert (Container, Key, New_Item, Position, Inserted); if Checks and then not Inserted then raise Constraint_Error with "attempt to insert key already in map"; end if; end Insert; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Map) return Boolean is begin return Container.HT.Length = 0; end Is_Empty; ------------- -- Iterate -- ------------- procedure Iterate (Container : Map; Process : not null access procedure (Position : Cursor)) is procedure Process_Node (Node : Node_Access; Position : Hash_Type); pragma Inline (Process_Node); procedure Local_Iterate is new HT_Ops.Generic_Iteration_With_Position (Process_Node); ------------------ -- Process_Node -- ------------------ procedure Process_Node (Node : Node_Access; Position : Hash_Type) is begin Process (Cursor'(Container'Unrestricted_Access, Node, Position)); end Process_Node; Busy : With_Busy (Container.HT.TC'Unrestricted_Access); -- Start of processing for Iterate begin Local_Iterate (Container.HT); end Iterate; function Iterate (Container : Map) return Map_Iterator_Interfaces.Forward_Iterator'Class is begin return It : constant Iterator := (Limited_Controlled with Container => Container'Unrestricted_Access) do Busy (Container.HT.TC'Unrestricted_Access.all); end return; end Iterate; --------- -- Key -- --------- function Key (Position : Cursor) return Key_Type is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of function Key equals No_Element"; end if; pragma Assert (Vet (Position), "bad cursor in function Key"); return Position.Node.Key; end Key; ------------ -- Length -- ------------ function Length (Container : Map) return Count_Type is begin return Container.HT.Length; end Length; ---------- -- Move -- ---------- procedure Move (Target : in out Map; Source : in out Map) is begin HT_Ops.Move (Target => Target.HT, Source => Source.HT); end Move; ---------- -- Next -- ---------- function Next (Node : Node_Access) return Node_Access is begin return Node.Next; end Next; function Next (Position : Cursor) return Cursor is Node : Node_Access := null; Pos : Hash_Type; -- Position of cursor's element in the map buckets. begin if Position.Node = null then return No_Element; end if; pragma Assert (Vet (Position), "bad cursor in function Next"); -- Initialize to current position, so that HT_Ops.Next can use it Pos := Position.Position; Node := HT_Ops.Next (Position.Container.HT, Position.Node, Pos); if Node = null then return No_Element; else return Cursor'(Position.Container, Node, Pos); end if; end Next; procedure Next (Position : in out Cursor) is begin Position := Next (Position); end Next; function Next (Object : Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong map"; end if; return Next (Position); end Next; ---------------------- -- Pseudo_Reference -- ---------------------- function Pseudo_Reference (Container : aliased Map'Class) return Reference_Control_Type is TC : constant Tamper_Counts_Access := Container.HT.TC'Unrestricted_Access; begin return R : constant Reference_Control_Type := (Controlled with TC) do Lock (TC.all); end return; end Pseudo_Reference; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Key : Key_Type; Element : Element_Type)) is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of Query_Element equals No_Element"; end if; pragma Assert (Vet (Position), "bad cursor in Query_Element"); declare M : Map renames Position.Container.all; HT : Hash_Table_Type renames M.HT'Unrestricted_Access.all; Lock : With_Lock (HT.TC'Unrestricted_Access); K : Key_Type renames Position.Node.Key; E : Element_Type renames Position.Node.Element; begin Process (K, E); end; end Query_Element; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Map) is begin Read_Nodes (Stream, Container.HT); end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Cursor) is begin raise Program_Error with "attempt to stream map cursor"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; --------------- -- Reference -- --------------- function Reference (Container : aliased in out Map; Position : Cursor) return Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong map"; end if; pragma Assert (Vet (Position), "Position cursor in function Reference is bad"); declare HT : Hash_Table_Type renames Container'Unrestricted_Access.all.HT; TC : constant Tamper_Counts_Access := HT.TC'Unrestricted_Access; begin return R : constant Reference_Type := (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Reference; function Reference (Container : aliased in out Map; Key : Key_Type) return Reference_Type is HT : Hash_Table_Type renames Container.HT; Node : constant Node_Access := Key_Ops.Find (HT, Key); begin if Checks and then Node = null then raise Constraint_Error with "key not in map"; end if; declare TC : constant Tamper_Counts_Access := HT.TC'Unrestricted_Access; begin return R : constant Reference_Type := (Element => Node.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Reference; --------------- -- Read_Node -- --------------- function Read_Node (Stream : not null access Root_Stream_Type'Class) return Node_Access is Node : Node_Access := new Node_Type; begin Key_Type'Read (Stream, Node.Key); Element_Type'Read (Stream, Node.Element); return Node; exception when others => Free (Node); raise; end Read_Node; ------------- -- Replace -- ------------- procedure Replace (Container : in out Map; Key : Key_Type; New_Item : Element_Type) is Node : constant Node_Access := Key_Ops.Find (Container.HT, Key); begin if Checks and then Node = null then raise Constraint_Error with "attempt to replace key not in map"; end if; TE_Check (Container.HT.TC); Node.Key := Key; Node.Element := New_Item; end Replace; --------------------- -- Replace_Element -- --------------------- procedure Replace_Element (Container : in out Map; Position : Cursor; New_Item : Element_Type) is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of Replace_Element equals No_Element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor of Replace_Element designates wrong map"; end if; TE_Check (Position.Container.HT.TC); pragma Assert (Vet (Position), "bad cursor in Replace_Element"); Position.Node.Element := New_Item; end Replace_Element; ---------------------- -- Reserve_Capacity -- ---------------------- procedure Reserve_Capacity (Container : in out Map; Capacity : Count_Type) is begin HT_Ops.Reserve_Capacity (Container.HT, Capacity); end Reserve_Capacity; -------------- -- Set_Next -- -------------- procedure Set_Next (Node : Node_Access; Next : Node_Access) is begin Node.Next := Next; end Set_Next; -------------------- -- Update_Element -- -------------------- procedure Update_Element (Container : in out Map; Position : Cursor; Process : not null access procedure (Key : Key_Type; Element : in out Element_Type)) is begin if Checks and then Position.Node = null then raise Constraint_Error with "Position cursor of Update_Element equals No_Element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor of Update_Element designates wrong map"; end if; pragma Assert (Vet (Position), "bad cursor in Update_Element"); declare HT : Hash_Table_Type renames Container.HT; Lock : With_Lock (HT.TC'Unrestricted_Access); K : Key_Type renames Position.Node.Key; E : Element_Type renames Position.Node.Element; begin Process (K, E); end; end Update_Element; --------- -- Vet -- --------- function Vet (Position : Cursor) return Boolean is begin if Position.Node = null then return Position.Container = null; end if; if Position.Container = null then return False; end if; if Position.Node.Next = Position.Node then return False; end if; declare HT : Hash_Table_Type renames Position.Container.HT; X : Node_Access; begin if HT.Length = 0 then return False; end if; if HT.Buckets = null or else HT.Buckets'Length = 0 then return False; end if; X := HT.Buckets (Key_Ops.Checked_Index (HT, Position.Node.Key)); for J in 1 .. HT.Length loop if X = Position.Node then return True; end if; if X = null then return False; end if; if X = X.Next then -- to prevent unnecessary looping return False; end if; X := X.Next; end loop; return False; end; end Vet; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Map) is begin Write_Nodes (Stream, Container.HT); end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor) is begin raise Program_Error with "attempt to stream map cursor"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; ---------------- -- Write_Node -- ---------------- procedure Write_Node (Stream : not null access Root_Stream_Type'Class; Node : Node_Access) is begin Key_Type'Write (Stream, Node.Key); Element_Type'Write (Stream, Node.Element); end Write_Node; end Ada.Containers.Hashed_Maps;
26.34388
79
0.571636
18b00ee80c861fb0ee68443301bbf9d1b0f0e359
2,359
ads
Ada
regtests/el-expressions-tests.ads
jquorning/ada-el
b0b07da093ac6109286404cb54a62a9a93816610
[ "Apache-2.0" ]
6
2015-01-18T23:04:00.000Z
2022-01-26T12:34:07.000Z
regtests/el-expressions-tests.ads
jquorning/ada-el
b0b07da093ac6109286404cb54a62a9a93816610
[ "Apache-2.0" ]
1
2022-01-30T20:46:16.000Z
2022-01-30T20:46:16.000Z
regtests/el-expressions-tests.ads
jquorning/ada-el
b0b07da093ac6109286404cb54a62a9a93816610
[ "Apache-2.0" ]
2
2021-01-06T08:27:49.000Z
2022-01-30T19:33:41.000Z
----------------------------------------------------------------------- -- EL testsuite - EL Testsuite -- Copyright (C) 2009, 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 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 agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with EL.Contexts.Default; package EL.Expressions.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with record Context : EL.Contexts.Default.Default_Context_Access; end record; -- Set up performed before each test case procedure Set_Up (T : in out Test); -- Tear down performed after each test case procedure Tear_Down (T : in out Test); procedure Test_Bean_Evaluation (T : in out Test); procedure Test_Parse_Error (T : in out Test); procedure Test_Method_Evaluation (T : in out Test); procedure Test_Invalid_Method (T : in out Test); procedure Test_Simple_Evaluation (T : in out Test); procedure Test_Function_Evaluation (T : in out Test); procedure Test_Object_Sizes (T : in out Test); -- Test to verify the Is_Valid operation procedure Test_Method_Is_Valid (T : in out Test); -- Test function namespace procedure Test_Function_Namespace (T : in out Test); -- Test the use of a value expression. procedure Test_Value_Expression (T : in out Test); -- Test the invalid value expression procedure Test_Invalid_Value_Expression (T : in out Test); procedure Check (T : in out Test; Expr : in String; Expect : in String); -- Test some reductions. procedure Test_Reduce_Expression (T : in out Test); procedure Test_Reduce_Expression_Variable (T : in out Test); end EL.Expressions.Tests;
36.292308
76
0.666808
4ab2f71633d10ca513e5d3ea84ce3ef5694471b9
615
adb
Ada
src/_test/harness/apsepp_test_suite.adb
thierr26/ada-apsepp
6eb87079ea57707db4ee1e2215fa170af66b1913
[ "MIT" ]
null
null
null
src/_test/harness/apsepp_test_suite.adb
thierr26/ada-apsepp
6eb87079ea57707db4ee1e2215fa170af66b1913
[ "MIT" ]
null
null
null
src/_test/harness/apsepp_test_suite.adb
thierr26/ada-apsepp
6eb87079ea57707db4ee1e2215fa170af66b1913
[ "MIT" ]
null
null
null
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr> -- MIT license. Please refer to the LICENSE file. package body Apsepp_Test_Suite is ---------------------------------------------------------------------------- overriding function Child_Array (Obj : Apsepp_T_S) return Test_Node_Array is (Test_Node_Class_E_T_C'Access, Test_Reporter_Class_Struct_Builder_E_T_C'Access, Scope_Bound_Locks_T_C'Access, Shared_Instance_T_C'Access, Scope_Debug_T_C'Access); ---------------------------------------------------------------------------- end Apsepp_Test_Suite;
32.368421
79
0.55122
dc5b8cc56533dd384a91975993d598ebd59f33b5
234
adb
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso2.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso2.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sso2.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-do compile } with Ada.Unchecked_Conversion; package body SSO2 is function Conv is new Ada.Unchecked_Conversion (Arr1, Arr2); procedure Proc (A1 : Arr1; A2 : out Arr2) is begin A2 := Conv (A1); end; end SSO2;
15.6
61
0.666667
2002aaa4f304a21c250d877f6efaca74cf14c48d
15,534
ads
Ada
SVD2ada/svd/stm32_svd-flash.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
SVD2ada/svd/stm32_svd-flash.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
SVD2ada/svd/stm32_svd-flash.ads
JCGobbi/Nucleo-STM32G474RE
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
[ "BSD-3-Clause" ]
null
null
null
pragma Style_Checks (Off); -- This spec has been automatically generated from STM32G474xx.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.Flash is pragma Preelaborate; --------------- -- Registers -- --------------- subtype ACR_LATENCY_Field is HAL.UInt4; -- Access control register type ACR_Register is record -- Latency LATENCY : ACR_LATENCY_Field := 16#0#; -- unspecified Reserved_4_7 : HAL.UInt4 := 16#0#; -- Prefetch enable PRFTEN : Boolean := False; -- Instruction cache enable ICEN : Boolean := True; -- Data cache enable DCEN : Boolean := True; -- Instruction cache reset ICRST : Boolean := False; -- Data cache reset DCRST : Boolean := False; -- Flash Power-down mode during Low-power run mode RUN_PD : Boolean := False; -- Flash Power-down mode during Low-power sleep mode SLEEP_PD : Boolean := False; -- unspecified Reserved_15_17 : HAL.UInt3 := 16#0#; -- Debug software enable DBG_SWEN : Boolean := False; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ACR_Register use record LATENCY at 0 range 0 .. 3; Reserved_4_7 at 0 range 4 .. 7; PRFTEN at 0 range 8 .. 8; ICEN at 0 range 9 .. 9; DCEN at 0 range 10 .. 10; ICRST at 0 range 11 .. 11; DCRST at 0 range 12 .. 12; RUN_PD at 0 range 13 .. 13; SLEEP_PD at 0 range 14 .. 14; Reserved_15_17 at 0 range 15 .. 17; DBG_SWEN at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; -- Status register type SR_Register is record -- End of operation EOP : Boolean := False; -- Operation error OPERR : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Programming error PROGERR : Boolean := False; -- Write protected error WRPERR : Boolean := False; -- Programming alignment error PGAERR : Boolean := False; -- Size error SIZERR : Boolean := False; -- Programming sequence error PGSERR : Boolean := False; -- Fast programming data miss error MISERR : Boolean := False; -- Fast programming error FASTERR : Boolean := False; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- PCROP read error RDERR : Boolean := False; -- Option validity error OPTVERR : Boolean := False; -- Read-only. Busy BSY : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record EOP at 0 range 0 .. 0; OPERR at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; PROGERR at 0 range 3 .. 3; WRPERR at 0 range 4 .. 4; PGAERR at 0 range 5 .. 5; SIZERR at 0 range 6 .. 6; PGSERR at 0 range 7 .. 7; MISERR at 0 range 8 .. 8; FASTERR at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; RDERR at 0 range 14 .. 14; OPTVERR at 0 range 15 .. 15; BSY at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; subtype CR_PNB_Field is HAL.UInt7; -- Flash control register type CR_Register is record -- Programming PG : Boolean := False; -- Page erase PER : Boolean := False; -- Bank 1 Mass erase MER1 : Boolean := False; -- Page number PNB : CR_PNB_Field := 16#0#; -- unspecified Reserved_10_15 : HAL.UInt6 := 16#0#; -- Start STRT : Boolean := False; -- Options modification start OPTSTRT : Boolean := False; -- Fast programming FSTPG : Boolean := False; -- unspecified Reserved_19_23 : HAL.UInt5 := 16#0#; -- End of operation interrupt enable EOPIE : Boolean := False; -- Error interrupt enable ERRIE : Boolean := False; -- PCROP read error interrupt enable RDERRIE : Boolean := False; -- Force the option byte loading OBL_LAUNCH : Boolean := False; -- SEC_PROT1 SEC_PROT1 : Boolean := False; -- unspecified Reserved_29_29 : HAL.Bit := 16#0#; -- Options Lock OPTLOCK : Boolean := True; -- FLASH_CR Lock LOCK : Boolean := True; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record PG at 0 range 0 .. 0; PER at 0 range 1 .. 1; MER1 at 0 range 2 .. 2; PNB at 0 range 3 .. 9; Reserved_10_15 at 0 range 10 .. 15; STRT at 0 range 16 .. 16; OPTSTRT at 0 range 17 .. 17; FSTPG at 0 range 18 .. 18; Reserved_19_23 at 0 range 19 .. 23; EOPIE at 0 range 24 .. 24; ERRIE at 0 range 25 .. 25; RDERRIE at 0 range 26 .. 26; OBL_LAUNCH at 0 range 27 .. 27; SEC_PROT1 at 0 range 28 .. 28; Reserved_29_29 at 0 range 29 .. 29; OPTLOCK at 0 range 30 .. 30; LOCK at 0 range 31 .. 31; end record; subtype ECCR_ADDR_ECC_Field is HAL.UInt19; -- Flash ECC register type ECCR_Register is record -- Read-only. ECC fail address ADDR_ECC : ECCR_ADDR_ECC_Field := 16#0#; -- unspecified Reserved_19_20 : HAL.UInt2 := 16#0#; -- Read-only. BK_ECC BK_ECC : Boolean := False; -- Read-only. SYSF_ECC SYSF_ECC : Boolean := False; -- unspecified Reserved_23_23 : HAL.Bit := 16#0#; -- ECCIE ECCIE : Boolean := False; -- unspecified Reserved_25_27 : HAL.UInt3 := 16#0#; -- ECC correction ECCC2 : Boolean := False; -- ECC2 detection ECCD2 : Boolean := False; -- ECC correction ECCC : Boolean := False; -- ECC detection ECCD : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ECCR_Register use record ADDR_ECC at 0 range 0 .. 18; Reserved_19_20 at 0 range 19 .. 20; BK_ECC at 0 range 21 .. 21; SYSF_ECC at 0 range 22 .. 22; Reserved_23_23 at 0 range 23 .. 23; ECCIE at 0 range 24 .. 24; Reserved_25_27 at 0 range 25 .. 27; ECCC2 at 0 range 28 .. 28; ECCD2 at 0 range 29 .. 29; ECCC at 0 range 30 .. 30; ECCD at 0 range 31 .. 31; end record; subtype OPTR_RDP_Field is HAL.UInt8; subtype OPTR_BOR_LEV_Field is HAL.UInt3; subtype OPTR_NRST_MODE_Field is HAL.UInt2; -- Flash option register type OPTR_Register is record -- Read protection level RDP : OPTR_RDP_Field := 16#0#; -- BOR reset Level BOR_LEV : OPTR_BOR_LEV_Field := 16#0#; -- unspecified Reserved_11_11 : HAL.Bit := 16#0#; -- nRST_STOP nRST_STOP : Boolean := False; -- nRST_STDBY nRST_STDBY : Boolean := False; -- nRST_SHDW nRST_SHDW : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#0#; -- Independent watchdog selection IDWG_SW : Boolean := False; -- Independent watchdog counter freeze in Stop mode IWDG_STOP : Boolean := False; -- Independent watchdog counter freeze in Standby mode IWDG_STDBY : Boolean := False; -- Window watchdog selection WWDG_SW : Boolean := False; -- unspecified Reserved_20_22 : HAL.UInt3 := 16#0#; -- Boot configuration nBOOT1 : Boolean := False; -- SRAM2 parity check enable SRAM2_PE : Boolean := False; -- SRAM2 Erase when system reset SRAM2_RST : Boolean := False; -- nSWBOOT0 nSWBOOT0 : Boolean := False; -- nBOOT0 nBOOT0 : Boolean := False; -- NRST_MODE NRST_MODE : OPTR_NRST_MODE_Field := 16#3#; -- IRHEN IRHEN : Boolean := True; -- unspecified Reserved_31_31 : HAL.Bit := 16#1#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OPTR_Register use record RDP at 0 range 0 .. 7; BOR_LEV at 0 range 8 .. 10; Reserved_11_11 at 0 range 11 .. 11; nRST_STOP at 0 range 12 .. 12; nRST_STDBY at 0 range 13 .. 13; nRST_SHDW at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; IDWG_SW at 0 range 16 .. 16; IWDG_STOP at 0 range 17 .. 17; IWDG_STDBY at 0 range 18 .. 18; WWDG_SW at 0 range 19 .. 19; Reserved_20_22 at 0 range 20 .. 22; nBOOT1 at 0 range 23 .. 23; SRAM2_PE at 0 range 24 .. 24; SRAM2_RST at 0 range 25 .. 25; nSWBOOT0 at 0 range 26 .. 26; nBOOT0 at 0 range 27 .. 27; NRST_MODE at 0 range 28 .. 29; IRHEN at 0 range 30 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype PCROP1SR_PCROP1_STRT_Field is HAL.UInt15; -- Flash Bank 1 PCROP Start address register type PCROP1SR_Register is record -- Bank 1 PCROP area start offset PCROP1_STRT : PCROP1SR_PCROP1_STRT_Field := 16#0#; -- unspecified Reserved_15_31 : HAL.UInt17 := 16#1FFFE#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PCROP1SR_Register use record PCROP1_STRT at 0 range 0 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; subtype PCROP1ER_PCROP1_END_Field is HAL.UInt15; -- Flash Bank 1 PCROP End address register type PCROP1ER_Register is record -- Bank 1 PCROP area end offset PCROP1_END : PCROP1ER_PCROP1_END_Field := 16#0#; -- unspecified Reserved_15_30 : HAL.UInt16 := 16#1FFE#; -- PCROP area preserved when RDP level decreased PCROP_RDP : Boolean := False; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PCROP1ER_Register use record PCROP1_END at 0 range 0 .. 14; Reserved_15_30 at 0 range 15 .. 30; PCROP_RDP at 0 range 31 .. 31; end record; subtype WRP1AR_WRP1A_STRT_Field is HAL.UInt7; subtype WRP1AR_WRP1A_END_Field is HAL.UInt7; -- Flash Bank 1 WRP area A address register type WRP1AR_Register is record -- Bank 1 WRP first area start offset WRP1A_STRT : WRP1AR_WRP1A_STRT_Field := 16#0#; -- unspecified Reserved_7_15 : HAL.UInt9 := 16#0#; -- Bank 1 WRP first area A end offset WRP1A_END : WRP1AR_WRP1A_END_Field := 16#0#; -- unspecified Reserved_23_31 : HAL.UInt9 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for WRP1AR_Register use record WRP1A_STRT at 0 range 0 .. 6; Reserved_7_15 at 0 range 7 .. 15; WRP1A_END at 0 range 16 .. 22; Reserved_23_31 at 0 range 23 .. 31; end record; subtype WRP1BR_WRP1B_STRT_Field is HAL.UInt7; subtype WRP1BR_WRP1B_END_Field is HAL.UInt7; -- Flash Bank 1 WRP area B address register type WRP1BR_Register is record -- Bank 1 WRP second area B end offset WRP1B_STRT : WRP1BR_WRP1B_STRT_Field := 16#0#; -- unspecified Reserved_7_15 : HAL.UInt9 := 16#0#; -- Bank 1 WRP second area B start offset WRP1B_END : WRP1BR_WRP1B_END_Field := 16#0#; -- unspecified Reserved_23_31 : HAL.UInt9 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for WRP1BR_Register use record WRP1B_STRT at 0 range 0 .. 6; Reserved_7_15 at 0 range 7 .. 15; WRP1B_END at 0 range 16 .. 22; Reserved_23_31 at 0 range 23 .. 31; end record; subtype SEC1R_SEC_SIZE1_Field is HAL.UInt8; -- securable area bank1 register type SEC1R_Register is record -- SEC_SIZE1 SEC_SIZE1 : SEC1R_SEC_SIZE1_Field := 16#0#; -- unspecified Reserved_8_15 : HAL.UInt8 := 16#FF#; -- BOOT_LOCK BOOT_LOCK : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#7F80#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SEC1R_Register use record SEC_SIZE1 at 0 range 0 .. 7; Reserved_8_15 at 0 range 8 .. 15; BOOT_LOCK at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Flash type FLASH_Peripheral is record -- Access control register ACR : aliased ACR_Register; -- Power down key register PDKEYR : aliased HAL.UInt32; -- Flash key register KEYR : aliased HAL.UInt32; -- Option byte key register OPTKEYR : aliased HAL.UInt32; -- Status register SR : aliased SR_Register; -- Flash control register CR : aliased CR_Register; -- Flash ECC register ECCR : aliased ECCR_Register; -- Flash option register OPTR : aliased OPTR_Register; -- Flash Bank 1 PCROP Start address register PCROP1SR : aliased PCROP1SR_Register; -- Flash Bank 1 PCROP End address register PCROP1ER : aliased PCROP1ER_Register; -- Flash Bank 1 WRP area A address register WRP1AR : aliased WRP1AR_Register; -- Flash Bank 1 WRP area B address register WRP1BR : aliased WRP1BR_Register; -- securable area bank1 register SEC1R : aliased SEC1R_Register; end record with Volatile; for FLASH_Peripheral use record ACR at 16#0# range 0 .. 31; PDKEYR at 16#4# range 0 .. 31; KEYR at 16#8# range 0 .. 31; OPTKEYR at 16#C# range 0 .. 31; SR at 16#10# range 0 .. 31; CR at 16#14# range 0 .. 31; ECCR at 16#18# range 0 .. 31; OPTR at 16#20# range 0 .. 31; PCROP1SR at 16#24# range 0 .. 31; PCROP1ER at 16#28# range 0 .. 31; WRP1AR at 16#2C# range 0 .. 31; WRP1BR at 16#30# range 0 .. 31; SEC1R at 16#70# range 0 .. 31; end record; -- Flash FLASH_Periph : aliased FLASH_Peripheral with Import, Address => FLASH_Base; end STM32_SVD.Flash;
33.696312
67
0.55871
dc43ad5ffed1f6cc0eaad04924fc9c9bd9e92fd8
2,012
ads
Ada
source/units/program-units.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/units/program-units.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/units/program-units.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- -- -- Trivial implementation compilation unit base class with Ada.Strings.Wide_Wide_Unbounded; with Program.Compilation_Units; with Program.Compilations; with Program.Elements; with Program.Element_Vectors; private package Program.Units is pragma Preelaborate; type Unit is abstract limited new Program.Compilation_Units.Compilation_Unit with private; procedure Initialize (Self : in out Unit'Class; Compilation : Program.Compilations.Compilation_Access; Full_Name : Text; Context_Clause : Program.Element_Vectors.Element_Vector_Access; Unit_Declaration : not null Program.Elements.Element_Access); private type Unit is abstract limited new Program.Compilation_Units.Compilation_Unit with record Compilation : Program.Compilations.Compilation_Access; Full_Name : Ada.Strings.Wide_Wide_Unbounded.Unbounded_Wide_Wide_String; Context_Clause : Program.Element_Vectors.Element_Vector_Access; Unit_Declaration : Program.Elements.Element_Access; end record; overriding function Compilation (Self : access Unit) return Program.Compilations.Compilation_Access; overriding function Full_Name (Self : access Unit) return Text; overriding function Context_Clause_Elements (Self : access Unit) return Program.Element_Vectors.Element_Vector_Access; overriding function Unit_Declaration (Self : access Unit) return not null Program.Elements.Element_Access; overriding function Is_Subunit_Unit (Self : Unit) return Boolean; overriding function Is_Library_Item_Unit (Self : Unit) return Boolean; overriding function Is_Library_Unit_Body_Unit (Self : Unit) return Boolean; overriding function Is_Library_Unit_Declaration_Unit (Self : Unit) return Boolean; end Program.Units;
31.4375
79
0.743042