hexsha
stringlengths
40
40
size
int64
3
1.05M
ext
stringclasses
163 values
lang
stringclasses
53 values
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
sequencelengths
1
10
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
sequencelengths
1
10
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
sequencelengths
1
10
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
29845ceebb2c9de72efe67ffee69818984ff196a
290
ads
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/static_initializer5.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/specs/static_initializer5.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/static_initializer5.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-do compile } with Static_Initializer5_Pkg; use Static_Initializer5_Pkg; package Static_Initializer5 is type Derived is new Rec with record Target : Boolean; end record; Null_Derived : constant Derived := (Null_Rec with Target => False); end Static_Initializer5;
20.714286
70
0.741379
3135bf1d1f37e4b4194229194718ad0ca6cab88a
3,215
adb
Ada
PMOO/ADA/LAB2/PARTE_1/listas.adb
usainzg/EHU
ada8fae57566e76a9a0bc3d6de906cde167828a7
[ "MIT" ]
null
null
null
PMOO/ADA/LAB2/PARTE_1/listas.adb
usainzg/EHU
ada8fae57566e76a9a0bc3d6de906cde167828a7
[ "MIT" ]
null
null
null
PMOO/ADA/LAB2/PARTE_1/listas.adb
usainzg/EHU
ada8fae57566e76a9a0bc3d6de906cde167828a7
[ "MIT" ]
null
null
null
with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; package body Listas is procedure Crear_Vacia ( L : out Lista) is begin L := null; end Crear_Vacia; procedure Colocar ( L : in out Lista; E : in Integer) is -- Algoritmo recursivo begin if L = null or else E<= L.Info then L := new Nodo'(E, L); -- Colocar al comienzo else Colocar (L.Sig, E); end if; end Colocar; procedure Obtener_Primero ( L : in Lista; P : out Integer) is begin if L = null then Put_Line("Lista_Vacia"); else P:= L.Info; end if; end Obtener_Primero; function Esta ( L : in Lista; N : in Integer) return Boolean is -- Algoritmo iterativo Auxi : Lista := L; begin while Auxi/=null and then N> Auxi.Info loop Auxi:= Auxi.Sig; end loop; return Auxi/=null and then N= Auxi.Info; end Esta; procedure Borrar_Primero ( L : in out Lista) is begin if L = null then Put_Line("Lista_Vacia"); else L := L.Sig; end if; end Borrar_Primero; procedure Crear_Sublista( L : in Lista; Sl : out Lista) is -- Algoritmo iterativo Cont: Natural:=0; AuxL: Lista:= L; AuxSl: Lista:= null; begin Sl:=null; while AuxL/= null and Cont < Cuantos loop if Filtro(AuxL.Info) then Cont:= Cont+1; if Sl=null then Sl:= new Nodo'(AuxL.Info, null); AuxSl:= Sl; else AuxSl.Sig:= new Nodo'(AuxL.Info, null); AuxSl:= AuxSl.Sig; end if; end if; AuxL:= Auxl.Sig; end loop; end Crear_Sublista; function Es_Vacia ( L : in Lista) return Boolean is begin return L = null; end Es_Vacia; function Igual ( L1, L2 : in Lista) return Boolean is -- Algoritmo recursivo begin if L1 = null and L2 = null then return True; elsif L1 = null or L2 = null then return False; else return L1.Info=L2.Info and then Igual(L1.Sig, L2.Sig); -- Llamada recursiva! end if; end Igual; procedure Copiar ( L1 : out Lista; L2 : in Lista) is -- Algoritmo recursivo begin if L2 = null then L1 := null; else Copiar(L1, L2.Sig); L1 := new Nodo'(L2.Info, L1); end if; end Copiar; end Listas;
26.791667
63
0.422395
2f5a306aed49171ebda004f750858b1e14f5ab0d
24,897
adb
Ada
src/are-generator-c.adb
stcarrez/resource-embedder
b1134306db459f87506703ba0a266c0b5e0045b9
[ "Apache-2.0" ]
7
2021-06-04T16:58:59.000Z
2021-06-14T08:51:11.000Z
src/are-generator-c.adb
stcarrez/resource-embedder
b1134306db459f87506703ba0a266c0b5e0045b9
[ "Apache-2.0" ]
2
2021-07-20T15:25:33.000Z
2021-08-20T18:39:58.000Z
src/are-generator-c.adb
stcarrez/resource-embedder
b1134306db459f87506703ba0a266c0b5e0045b9
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- are-generator-c -- Generator for C/C++ -- Copyright (C) 2021 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Ada.Text_IO; with Ada.Calendar.Conversions; with Interfaces.C; with Util.Log.Loggers; package body Are.Generator.C is use Ada.Text_IO; use Ada.Strings.Unbounded; function Get_Content_Type (Resource : in Are.Resource_Type; Context : in Are.Context_Type'Class) return String; function Get_Type_Name (Prefix : in String; Resource : in Are.Resource_Type; Context : in Are.Context_Type'Class) return String; function To_File_Name (Name : in String) return String; function To_C_Name (Prefix : in String; Name : in String) return String; function To_Define_Name (Name : in String; Postfix : in String := "_H_") return String; function To_Prefix_Name (Name : in String) return String; -- Generate the resource declaration list. procedure Generate_Resource_Declarations (Resource : in Are.Resource_Type; Into : in out Ada.Text_IO.File_Type; Content_Name : in String; Content_Type : in String; Var_Prefix : in String); -- Generate the resource content definition. procedure Generate_Resource_Contents (Resource : in out Are.Resource_Type; Into : in out Ada.Text_IO.File_Type); Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Are.Generator.C"); -- ------------------------------ -- Generate the C/C++ code for the resources that have been collected. -- ------------------------------ overriding procedure Generate (Generator : in out Generator_Type; Resources : in Resource_List; Context : in out Are.Context_Type'Class) is Resource : Resource_Access := Resources.Head; begin while Resource /= null loop if Context.Name_Index then Resource.Collect_Names (Context.Ignore_Case, Generator.Names); end if; Generator.Generate_Header (Resource.all, Context); Generator.Generate_Source (Resource.all, Context); Generator.Names.Clear; Resource := Resource.Next; end loop; end Generate; function Get_Content_Type (Resource : in Are.Resource_Type; Context : in Are.Context_Type'Class) return String is begin if Resource.Format = R_LINES then return Resource.Get_Content_Type_Name (Context, "const char* const*"); end if; if Resource.Format = R_STRING then return Resource.Get_Content_Type_Name (Context, "const char*"); end if; return Resource.Get_Content_Type_Name (Context, "const unsigned char *"); end Get_Content_Type; function Get_Type_Name (Prefix : in String; Resource : in Are.Resource_Type; Context : in Are.Context_Type'Class) return String is Type_Name : constant String := Resource.Get_Type_Name (Context, Prefix & "_content"); begin if Util.Strings.Index (Type_Name, ' ') > 0 then return Type_Name; else return "struct " & Type_Name; end if; end Get_Type_Name; -- ------------------------------ -- Given a package name, return the file name that correspond. -- ------------------------------ function To_File_Name (Name : in String) return String is Result : String (Name'Range); begin for J in Name'Range loop if Name (J) in 'A' .. 'Z' then Result (J) := Character'Val (Character'Pos (Name (J)) - Character'Pos ('A') + Character'Pos ('a')); elsif Name (J) = '.' then Result (J) := '-'; else Result (J) := Name (J); end if; end loop; return Result; end To_File_Name; -- ------------------------------ -- Given a package name, return the file name that correspond. -- ------------------------------ function To_Define_Name (Name : in String; Postfix : in String := "_H_") return String is Result : String (Name'Range); begin for J in Name'Range loop if Name (J) in 'a' .. 'z' then Result (J) := Character'Val (Character'Pos (Name (J)) - Character'Pos ('a') + Character'Pos ('A')); elsif Name (J) = '.' or Name (J) = ' ' then Result (J) := '_'; else Result (J) := Name (J); end if; end loop; return "_" & Result & Postfix; end To_Define_Name; -- ------------------------------ -- Given a package name, return a prefix to use for global variables. -- ------------------------------ function To_Prefix_Name (Name : in String) return String is Result : String (Name'Range); begin for J in Name'Range loop if Name (J) in 'A' .. 'Z' then Result (J) := Character'Val (Character'Pos (Name (J)) - Character'Pos ('A') + Character'Pos ('a')); elsif Name (J) = '.' or Name (J) = ' ' then Result (J) := '_'; else Result (J) := Name (J); end if; end loop; return Result; end To_Prefix_Name; function To_C_Name (Prefix : in String; Name : in String) return String is Result : Unbounded_String; begin Append (Result, Prefix); for C of Name loop if C = '-' or C = '.' then Append (Result, '_'); elsif C >= 'a' and C <= 'z' then Append (Result, C); elsif C >= 'A' and C <= 'Z' then Append (Result, C); elsif C >= '0' and C <= '9' then Append (Result, C); end if; end loop; return To_String (Result); end To_C_Name; -- ------------------------------ -- Generate the resource declaration list. -- ------------------------------ procedure Generate_Resource_Declarations (Resource : in Are.Resource_Type; Into : in out Ada.Text_IO.File_Type; Content_Name : in String; Content_Type : in String; Var_Prefix : in String) is Remain : Natural := Natural (Resource.Files.Length); begin Put (Into, "enum"); Put_Line (Into, " {"); for File in Resource.Files.Iterate loop Put (Into, " "); Put (Into, To_C_Name (Var_Prefix, File_Maps.Key (File))); Remain := Remain - 1; if Remain /= 0 then Put_Line (Into, ","); else New_Line (Into); end if; end loop; Put_Line (Into, "};"); New_Line (Into); Put (Into, "extern const "); Put (Into, Content_Type); Put (Into, " "); Put (Into, Content_Name); Put_Line (Into, "[];"); New_Line (Into); end Generate_Resource_Declarations; -- ------------------------------ -- Generate the resource content definition. -- ------------------------------ procedure Generate_Resource_Contents (Resource : in out Are.Resource_Type; Into : in out Ada.Text_IO.File_Type) is procedure Write_Binary (Name : in String; Content : in Are.File_Info); procedure Write_String (Content : in String); procedure Write_String (Name : in String; Content : in Are.File_Info); procedure Write_Lines (Name : in String; Content : in out Are.File_Info); procedure Write (File_Name : in String; Content : in out Are.File_Info); procedure Write_Binary (Name : in String; Content : in Are.File_Info) is Need_Sep : Boolean := False; Column : Natural := 0; begin Put (Into, "static const unsigned char "); Put (Into, Name); Put (Into, "[] = {"); if Content.Content = null or else Content.Content'Length = 0 then Put_Line (Into, "};"); elsif Content.Content'Length = 1 then Put (Into, Util.Strings.Image (Natural (Content.Content (Content.Content'First)))); Put_Line (Into, "};"); else New_Line (Into); Put (Into, " "); for C of Content.Content.all loop if Need_Sep then Put (Into, ","); Need_Sep := False; end if; if Column > 20 then New_Line (Into); Put (Into, " "); Column := 1; elsif Column > 0 then Put (Into, " "); end if; Put (Into, Util.Strings.Image (Natural (C))); Column := Column + 1; Need_Sep := True; end loop; New_Line (Into); Put_Line (Into, "};"); end if; New_Line (Into); end Write_Binary; procedure Write_String (Content : in String) is Need_Sep : Boolean := False; Column : Natural := 0; begin Column := 40; Put (Into, """"); for C of Content loop if Column > 80 then if not Need_Sep then Put (Into, """"); end if; New_Line (Into); Put (Into, " "); Column := 3; Need_Sep := True; end if; case C is when ASCII.CR => Put (Into, "\r"); Column := Column + 2; when ASCII.LF => Put (Into, "\n"); Column := Column + 2; when ASCII.HT => Put (Into, "\t"); Column := Column + 2; when '"' => Put (Into, "\"""); Column := Column + 2; when others => if Need_Sep then Put (Into, " """); Need_Sep := False; end if; Put (Into, C); end case; Column := Column + 1; end loop; if not Need_Sep then Put (Into, """"); end if; end Write_String; procedure Write_String (Name : in String; Content : in Are.File_Info) is begin Put (Into, "static const char "); Put (Into, Name); Put (Into, "[] = "); if Content.Content /= null and then Content.Content'Length > 0 then declare First : constant Natural := Natural (Content.Content'First); Last : constant Natural := Natural (Content.Content'Last); File_Content : String (First .. Last); for File_Content'Address use Content.Content.all'Address; begin Write_String (File_Content); end; else Put (Into, """"""); end if; Put_Line (Into, ";"); end Write_String; procedure Write_Lines (Name : in String; Content : in out Are.File_Info) is Lines : Util.Strings.Vectors.Vector; Count : Natural := 0; begin Are.Convert_To_Lines (Resource, Content, Lines); Put (Into, "static const char *const "); Put (Into, Name); Put (Into, "[] = {"); if Lines.Is_Empty then Put_Line (Into, "};"); else New_Line (Into); for Line of Lines loop if Count >= 1 then Put_Line (Into, ","); end if; Set_Col (Into, 3); Write_String (Line); Count := Count + 1; end loop; New_Line (Into); Put_Line (Into, "};"); end if; Content.Line_Count := Count; end Write_Lines; Index : Natural := 0; procedure Write (File_Name : in String; Content : in out Are.File_Info) is pragma Unreferenced (File_Name); Name : constant String := "C_" & Util.Strings.Image (Index); begin if Resource.Format = R_LINES then Write_Lines (Name, Content); elsif Resource.Format = R_STRING then Write_String (Name, Content); else Write_Binary (Name, Content); end if; end Write; begin for File in Resource.Files.Iterate loop Index := Index + 1; Resource.Files.Update_Element (File, Write'Access); New_Line (Into); end loop; end Generate_Resource_Contents; -- ------------------------------ -- Generate the package specification. -- ------------------------------ procedure Generate_Header (Generator : in out Generator_Type; Resource : in out Are.Resource_Type; Context : in out Are.Context_Type'Class) is pragma Unreferenced (Generator); Name : constant String := To_String (Resource.Name); Define : constant String := To_Define_Name (Name); Filename : constant String := To_File_Name (Name) & ".h"; Path : constant String := Context.Get_Output_Path (Filename); Prefix : constant String := To_Prefix_Name (Name); Def_Func : constant String := To_Prefix_Name (Name) & "_get_content"; Content_Name : constant String := Prefix & "_contents"; List_Names : constant String := Prefix & "_names"; Type_Name : constant String := Get_Type_Name (Prefix, Resource, Context); Content_Type : constant String := Get_Content_Type (Resource, Context); Func_Name : constant String := Resource.Get_Function_Name (Context, Def_Func); Type_Define : constant String := To_Define_Name (Type_Name, "_TYPE_"); File : Ada.Text_IO.File_Type; begin Log.Info ("Writing resource {0} in {1}", Name, Path); Ada.Text_IO.Create (File => File, Mode => Ada.Text_IO.Out_File, Name => Path); Put (File, "// "); Put_Line (File, Get_Title); Put (File, "#ifndef "); Put_Line (File, Define); Put (File, "#define "); Put_Line (File, Define); New_Line (File); Put_Line (File, "#include <time.h>"); New_Line (File); Put_Line (File, "#ifdef __cplusplus"); Put_Line (File, "extern ""C"" {"); Put_Line (File, "#endif"); New_Line (File); -- Declare the struct holding the data. if not Context.No_Type_Declaration then Log.Debug ("Writing struct {0} declaration", Type_Name); Put (File, "#ifndef "); Put_Line (File, Type_Define); Put (File, "#define "); Put_Line (File, Type_Define); New_Line (File); Put (File, Type_Name); Put_Line (File, " {"); Put (File, " "); Put (File, Content_Type); Put (File, " "); Put (File, Resource.Get_Member_Content_Name (Context, "content")); Put_Line (File, ";"); if Resource.Format = R_LINES then Put (File, " size_t "); Put (File, Resource.Get_Member_Length_Name (Context, "length")); Put_Line (File, ";"); else Put (File, " size_t "); Put (File, Resource.Get_Member_Length_Name (Context, "size")); Put_Line (File, ";"); Put (File, " time_t "); Put (File, Resource.Get_Member_Modtime_Name (Context, "modtime")); Put_Line (File, ";"); Put (File, " int "); Put (File, Resource.Get_Member_Format_Name (Context, "format")); Put_Line (File, ";"); end if; Put_Line (File, "};"); New_Line (File); Put_Line (File, "#endif"); New_Line (File); end if; if Context.List_Content then Put_Line (File, "// Sorted array of names composing the resource."); Put (File, "extern const char* const "); Put (File, List_Names); Put_Line (File, "[];"); Put (File, "static const int "); Put (File, List_Names); Put (File, "_length = "); Put (File, Util.Strings.Image (Natural (Resource.Files.Length))); Put_Line (File, ";"); New_Line (File); end if; if Context.Declare_Var then Generate_Resource_Declarations (Resource, File, Content_Name, Type_Name, Context.Var_Prefix.all); end if; if Context.Name_Index then Log.Debug ("Writing {0} declaration", Func_Name); Put_Line (File, "// Returns the data stream with the given name or null."); Put (File, "extern const "); Put (File, Type_Name); Put (File, "* "); Put (File, Func_Name); Put (File, "(const char* name);"); New_Line (File); New_Line (File); end if; Put_Line (File, "#ifdef __cplusplus"); Put_Line (File, "}"); Put_Line (File, "#endif"); New_Line (File); Put (File, "#endif /* "); Put (File, Define); Put_Line (File, " */"); Close (File); end Generate_Header; -- ------------------------------ -- Generate the package body. -- ------------------------------ procedure Generate_Source (Generator : in out Generator_Type; Resource : in out Are.Resource_Type; Context : in out Are.Context_Type'Class) is procedure Generate_Keyword_Table (Into : in out Ada.Text_IO.File_Type; Names : in Util.Strings.Vectors.Vector); Name : constant String := To_String (Resource.Name); Filename : constant String := To_File_Name (Name) & ".c"; Path : constant String := Context.Get_Output_Path (Filename); Prefix : constant String := To_Prefix_Name (Name); List_Names : constant String := Prefix & "_names"; Def_Func : constant String := Prefix & "_get_content"; Content_Name : constant String := Prefix & "_contents"; Type_Name : constant String := Get_Type_Name (Prefix, Resource, Context); Func_Name : constant String := Resource.Get_Function_Name (Context, Def_Func); Count : constant Natural := Natural (Resource.Files.Length); File : Ada.Text_IO.File_Type; -- ------------------------------ -- Generate the keyword table. -- ------------------------------ procedure Generate_Keyword_Table (Into : in out Ada.Text_IO.File_Type; Names : in Util.Strings.Vectors.Vector) is Index : Integer := 0; begin New_Line (Into); if not Context.List_Content then Put (Into, "static "); end if; Put (Into, "const char* const "); Put (Into, List_Names); Put_Line (Into, "[] = {"); for Name of Names loop if Index > 0 then Put_Line (Into, ","); end if; Put (Into, " """); Put (Into, Name); Put (Into, """"); Index := Index + 1; end loop; New_Line (Into); Put_Line (Into, "};"); New_Line (Into); end Generate_Keyword_Table; begin Log.Info ("Writing resource {0} in {1}", Name, Path); Ada.Text_IO.Create (File => File, Mode => Ada.Text_IO.Out_File, Name => Path); Put (File, "// "); Put_Line (File, Get_Title); Put_Line (File, "#include <string.h>"); Put (File, "#include """); Put (File, Filename (Filename'First .. Filename'Last - 1)); Put_Line (File, "h"""); New_Line (File); Generate_Resource_Contents (Resource, File); if Context.Name_Index then Generate_Keyword_Table (File, Generator.Names); end if; if Count >= 1 then Log.Debug ("Writing struct {0} contents[] with {1} entries", Type_Name, Util.Strings.Image (Count)); New_Line (File); if not Context.Declare_Var then Put (File, "static "); end if; Put (File, "const "); Put (File, Type_Name); Put (File, " "); Put (File, Content_Name); Put_Line (File, "[] = {"); declare Need_Sep : Boolean := False; Col : Natural := 0; Index : Natural := 1; begin for Content in Resource.Files.Iterate loop if Need_Sep then Put (File, ","); New_Line (File); end if; Put (File, " { "); Put (File, "C_"); Put (File, Util.Strings.Image (Index)); Index := Index + 1; Put (File, ","); declare use Ada.Calendar.Conversions; Data : constant File_Info := File_Maps.Element (Content); begin if Resource.Format = R_LINES then Put (File, Natural'Image (Data.Line_Count)); else Put (File, Ada.Directories.File_Size'Image (Data.Length)); Put (File, ","); Put (File, Interfaces.C.long'Image (To_Unix_Time (Data.Modtime))); end if; end; Put (File, " }"); Col := Col + 1; Need_Sep := True; end loop; end; New_Line (File); Put_Line (File, "};"); end if; if Context.Name_Index then Log.Debug ("Writing {0} implementation", Func_Name); Put_Line (File, "// Returns the data stream with the given name or null."); Put (File, "const "); Put (File, Type_Name); Put (File, "* "); Put (File, Func_Name); Put (File, "(const char* name)"); New_Line (File); Put_Line (File, "{"); if Count > 1 then Put_Line (File, " int low = 0;"); Put (File, " int high = "); Put (File, Util.Strings.Image (Count - 1)); Put_Line (File, ";"); Put_Line (File, " while (low <= high)"); Put_Line (File, " {"); Put_Line (File, " int mid = (low + high) / 2;"); Put_Line (File, " int cmp = strcmp(" & List_Names & "[mid], name);"); Put_Line (File, " if (cmp == 0)"); Put (File, " return &"); Put (File, Content_Name); Put_Line (File, "[mid];"); Put_Line (File, " else if (cmp < 0)"); Put_Line (File, " low = mid + 1;"); Put_Line (File, " else"); Put_Line (File, " high = mid - 1;"); Put_Line (File, " }"); Put_Line (File, " return 0;"); else Put (File, " return (strcmp("); Put (File, List_Names); Put (File, "[0], name) == 0 ? &"); Put (File, Content_Name); Put_Line (File, "[0] : 0);"); end if; Put_Line (File, "}"); New_Line (File); end if; Close (File); end Generate_Source; end Are.Generator.C;
36.240175
95
0.492348
39b04eb6a0b93ef782c53185ecbfdf3489d003de
1,906
adb
Ada
3-mid/impact/source/3d/dynamics/impact-d3-motion_state-default.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
20
2015-11-04T09:23:59.000Z
2022-01-14T10:21:42.000Z
3-mid/impact/source/3d/dynamics/impact-d3-motion_state-default.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
2
2015-11-04T17:05:56.000Z
2015-12-08T03:16:13.000Z
3-mid/impact/source/3d/dynamics/impact-d3-motion_state-default.adb
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
package body impact.d3.motion_State.default is function to_motion_State (startTrans, centerOfMassOffset : Transform_3d := impact.d3.Transform.getIdentity) return Item is Self : Item; begin Self.m_graphicsWorldTrans := startTrans; Self.m_centerOfMassOffset := centerOfMassOffset; Self.m_startWorldTrans := startTrans; return Self; end to_motion_State; -- impact.d3.motion_State.default(const impact.d3.Transform& startTrans = impact.d3.Transform::getIdentity(),const impact.d3.Transform& centerOfMassOffset = impact.d3.Transform::getIdentity()) -- : m_graphicsWorldTrans(startTrans), -- m_centerOfMassOffset(centerOfMassOffset), -- m_startWorldTrans(startTrans), -- m_userPointer(0) -- -- { -- } overriding procedure getWorldTransform (Self : in Item; worldTrans : out Transform_3d) is use linear_Algebra_3d, impact.d3.Transform; begin WorldTrans := inverse (Self.m_centerOfMassOffset) * Self.m_graphicsWorldTrans; end getWorldTransform; -- virtual void getWorldTransform(impact.d3.Transform& centerOfMassWorldTrans ) const -- { -- centerOfMassWorldTrans = m_centerOfMassOffset.inverse() * m_graphicsWorldTrans ; -- } overriding procedure setWorldTransform (Self : in out Item; worldTrans : in Transform_3d) is use linear_Algebra_3d, impact.d3.Transform; begin Self.m_graphicsWorldTrans := WorldTrans * Self.m_centerOfMassOffset; end setWorldTransform; -- virtual void setWorldTransform(const impact.d3.Transform& centerOfMassWorldTrans) -- { -- m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset ; -- } end impact.d3.motion_State.default;
31.766667
201
0.658447
23377b371c2f79cddde8c2c9f0ae3b8d1618ce05
1,293
adb
Ada
examples/exampleadd.adb
ray2501/AdaBaseXClient
016641d451a02015ca73cb25c5e9458f17b3904d
[ "MIT" ]
null
null
null
examples/exampleadd.adb
ray2501/AdaBaseXClient
016641d451a02015ca73cb25c5e9458f17b3904d
[ "MIT" ]
null
null
null
examples/exampleadd.adb
ray2501/AdaBaseXClient
016641d451a02015ca73cb25c5e9458f17b3904d
[ "MIT" ]
1
2021-07-08T01:14:51.000Z
2021-07-08T01:14:51.000Z
with Ada.Text_IO; with Ada.Exceptions; with AdaBaseXClient; use Ada.Exceptions; use AdaBaseXClient; procedure ExampleAdd is begin if (Connect ("localhost", 1_984) = False) then Ada.Text_IO.Put_Line ("Connect failed."); return; else if (Authenticate ("admin", "admin") = False) then Ada.Text_IO.Put_Line ("Authenticate failed."); Close; return; end if; end if; declare Response : String := Execute ("create db database"); begin Ada.Text_IO.Put_Line (Response); end; declare Response : String := Add ("world/World.xml", "<x>Hello World!</x>"); begin Ada.Text_IO.Put_Line (Response); end; declare Response : String := Add ("Universe.xml", "<x>Hello Universe!</x>"); begin Ada.Text_IO.Put_Line (Response); end; declare Response : String := Execute ("xquery /"); begin Ada.Text_IO.Put_Line (Response); end; declare Response : String := Execute ("drop db database"); begin Ada.Text_IO.Put_Line (Response); end; Close; exception when Error : BaseXException => Ada.Text_IO.Put ("Exception: "); Ada.Text_IO.Put_Line (Exception_Name (Error)); Ada.Text_IO.Put (Exception_Message (Error)); end ExampleAdd;
21.55
74
0.62181
12a8deb69b6a404d67094bc359c109f3ce9505b4
14,082
adb
Ada
Ada95/samples/sample-explanation.adb
mvaisakh/android_external_libncurses
d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f
[ "DOC", "Unlicense" ]
35
2015-03-07T13:26:22.000Z
2021-11-06T16:18:59.000Z
Ada95/samples/sample-explanation.adb
mvaisakh/android_external_libncurses
d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f
[ "DOC", "Unlicense" ]
3
2017-04-07T21:02:48.000Z
2017-04-08T17:59:35.000Z
Ada95/samples/sample-explanation.adb
mvaisakh/android_external_libncurses
d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f
[ "DOC", "Unlicense" ]
19
2015-06-16T06:13:44.000Z
2021-07-24T02:37:45.000Z
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Explanation -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998-2004,2006 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.20 $ -- $Date: 2006/06/25 14:30:22 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- Poor mans help system. This scans a sequential file for key lines and -- then reads the lines up to the next key. Those lines are presented in -- a window as help or explanation. -- with Ada.Text_IO; use Ada.Text_IO; with Ada.Unchecked_Deallocation; with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; with Sample.Keyboard_Handler; use Sample.Keyboard_Handler; with Sample.Manifest; use Sample.Manifest; with Sample.Function_Key_Setting; use Sample.Function_Key_Setting; with Sample.Helpers; use Sample.Helpers; package body Sample.Explanation is Help_Keys : constant String := "HELPKEYS"; In_Help : constant String := "INHELP"; File_Name : constant String := "explain.msg"; F : File_Type; type Help_Line; type Help_Line_Access is access Help_Line; pragma Controlled (Help_Line_Access); type String_Access is access String; pragma Controlled (String_Access); type Help_Line is record Prev, Next : Help_Line_Access; Line : String_Access; end record; procedure Explain (Key : in String; Win : in Window); procedure Release_String is new Ada.Unchecked_Deallocation (String, String_Access); procedure Release_Help_Line is new Ada.Unchecked_Deallocation (Help_Line, Help_Line_Access); function Search (Key : String) return Help_Line_Access; procedure Release_Help (Root : in out Help_Line_Access); procedure Explain (Key : in String) is begin Explain (Key, Null_Window); end Explain; procedure Explain (Key : in String; Win : in Window) is -- Retrieve the text associated with this key and display it in this -- window. If no window argument is passed, the routine will create -- a temporary window and use it. function Filter_Key return Real_Key_Code; procedure Unknown_Key; procedure Redo; procedure To_Window (C : in out Help_Line_Access; More : in out Boolean); Frame : Window := Null_Window; W : Window := Win; K : Real_Key_Code; P : Panel; Height : Line_Count; Width : Column_Count; Help : Help_Line_Access := Search (Key); Current : Help_Line_Access; Top_Line : Help_Line_Access; Has_More : Boolean := True; procedure Unknown_Key is begin Add (W, "Help message with ID "); Add (W, Key); Add (W, " not found."); Add (W, Character'Val (10)); Add (W, "Press the Function key labelled 'Quit' key to continue."); end Unknown_Key; procedure Redo is H : Help_Line_Access := Top_Line; begin if Top_Line /= null then for L in 0 .. (Height - 1) loop Add (W, L, 0, H.Line.all); exit when H.Next = null; H := H.Next; end loop; else Unknown_Key; end if; end Redo; function Filter_Key return Real_Key_Code is K : Real_Key_Code; begin loop K := Get_Key (W); if K in Special_Key_Code'Range then case K is when HELP_CODE => if not Find_Context (In_Help) then Push_Environment (In_Help, False); Explain (In_Help, W); Pop_Environment; Redo; end if; when EXPLAIN_CODE => if not Find_Context (Help_Keys) then Push_Environment (Help_Keys, False); Explain (Help_Keys, W); Pop_Environment; Redo; end if; when others => exit; end case; else exit; end if; end loop; return K; end Filter_Key; procedure To_Window (C : in out Help_Line_Access; More : in out Boolean) is L : Line_Position := 0; begin loop Add (W, L, 0, C.Line.all); L := L + 1; exit when C.Next = null or else L = Height; C := C.Next; end loop; if C.Next /= null then pragma Assert (L = Height); More := True; else More := False; end if; end To_Window; begin if W = Null_Window then Push_Environment ("HELP"); Default_Labels; Frame := New_Window (Lines - 2, Columns, 0, 0); if Has_Colors then Set_Background (Win => Frame, Ch => (Ch => ' ', Color => Help_Color, Attr => Normal_Video)); Set_Character_Attributes (Win => Frame, Attr => Normal_Video, Color => Help_Color); Erase (Frame); end if; Box (Frame); Set_Character_Attributes (Frame, (Reverse_Video => True, others => False)); Add (Frame, Lines - 3, 2, "Cursor Up/Down scrolls"); Set_Character_Attributes (Frame); -- Back to default. Window_Title (Frame, "Explanation"); W := Derived_Window (Frame, Lines - 4, Columns - 2, 1, 1); Refresh_Without_Update (Frame); Get_Size (W, Height, Width); Set_Meta_Mode (W); Set_KeyPad_Mode (W); Allow_Scrolling (W, True); Set_Echo_Mode (False); P := Create (Frame); Top (P); Update_Panels; else Clear (W); Refresh_Without_Update (W); end if; Current := Help; Top_Line := Help; if null = Help then Unknown_Key; loop K := Filter_Key; exit when K = QUIT_CODE; end loop; else To_Window (Current, Has_More); if Has_More then -- This means there are more lines available, so we have to go -- into a scroll manager. loop K := Filter_Key; if K in Special_Key_Code'Range then case K is when Key_Cursor_Down => if Current.Next /= null then Move_Cursor (W, Height - 1, 0); Scroll (W, 1); Current := Current.Next; Top_Line := Top_Line.Next; Add (W, Current.Line.all); end if; when Key_Cursor_Up => if Top_Line.Prev /= null then Move_Cursor (W, 0, 0); Scroll (W, -1); Top_Line := Top_Line.Prev; Current := Current.Prev; Add (W, Top_Line.Line.all); end if; when QUIT_CODE => exit; when others => null; end case; end if; end loop; else loop K := Filter_Key; exit when K = QUIT_CODE; end loop; end if; end if; Clear (W); if Frame /= Null_Window then Clear (Frame); Delete (P); Delete (W); Delete (Frame); Pop_Environment; end if; Update_Panels; Update_Screen; Release_Help (Help); end Explain; function Search (Key : String) return Help_Line_Access is Last : Natural; Buffer : String (1 .. 256); Root : Help_Line_Access := null; Current : Help_Line_Access; Tail : Help_Line_Access := null; function Next_Line return Boolean; function Next_Line return Boolean is H_End : constant String := "#END"; begin Get_Line (F, Buffer, Last); if Last = H_End'Length and then H_End = Buffer (1 .. Last) then return False; else return True; end if; end Next_Line; begin Reset (F); Outer : loop exit Outer when not Next_Line; if Last = (1 + Key'Length) and then Key = Buffer (2 .. Last) and then Buffer (1) = '#' then loop exit when not Next_Line; exit when Buffer (1) = '#'; Current := new Help_Line'(null, null, new String'(Buffer (1 .. Last))); if Tail = null then Release_Help (Root); Root := Current; else Tail.Next := Current; Current.Prev := Tail; end if; Tail := Current; end loop; exit Outer; end if; end loop Outer; return Root; end Search; procedure Release_Help (Root : in out Help_Line_Access) is Next : Help_Line_Access; begin loop exit when Root = null; Next := Root.Next; Release_String (Root.Line); Release_Help_Line (Root); Root := Next; end loop; end Release_Help; procedure Explain_Context is begin Explain (Context); end Explain_Context; procedure Notepad (Key : in String) is H : constant Help_Line_Access := Search (Key); T : Help_Line_Access := H; N : Line_Count := 1; L : Line_Position := 0; W : Window; P : Panel; begin if H /= null then loop T := T.Next; exit when T = null; N := N + 1; end loop; W := New_Window (N + 2, Columns, Lines - N - 2, 0); if Has_Colors then Set_Background (Win => W, Ch => (Ch => ' ', Color => Notepad_Color, Attr => Normal_Video)); Set_Character_Attributes (Win => W, Attr => Normal_Video, Color => Notepad_Color); Erase (W); end if; Box (W); Window_Title (W, "Notepad"); P := New_Panel (W); T := H; loop Add (W, L + 1, 1, T.Line.all, Integer (Columns - 2)); L := L + 1; T := T.Next; exit when T = null; end loop; T := H; Release_Help (T); Refresh_Without_Update (W); Notepad_To_Context (P); end if; end Notepad; begin Open (F, In_File, File_Name); end Sample.Explanation;
34.430318
78
0.469252
2f951005d26dba728253fef90024f299ee9cfe5d
3,567
adb
Ada
tools-src/gnu/gcc/gcc/ada/a-stunau.adb
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-stunau.adb
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-stunau.adb
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- A D A . S T R I N G S . U N B O U N D E D . A U X -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-1998, 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. -- -- -- ------------------------------------------------------------------------------ package body Ada.Strings.Unbounded.Aux is ---------------- -- Get_String -- ---------------- function Get_String (U : Unbounded_String) return String_Access is begin return U.Reference; end Get_String; ---------------- -- Set_String -- ---------------- procedure Set_String (UP : in out Unbounded_String; S : String) is begin if UP.Reference'Length = S'Length then UP.Reference.all := S; else declare subtype String_1 is String (1 .. S'Length); Tmp : String_Access; begin Tmp := new String'(String_1 (S)); Finalize (UP); UP.Reference := Tmp; end; end if; end Set_String; procedure Set_String (UP : in out Unbounded_String; S : String_Access) is begin Finalize (UP); UP.Reference := S; end Set_String; end Ada.Strings.Unbounded.Aux;
46.934211
78
0.432016
0680325f9f0b2ec73580b0cf03ed8a399391f4aa
4,571
adb
Ada
Milesian_calendar.adb
Louis-Aime/Milesian_calendar_Ada
c03b46cd48b921a5f1fa4abc60607197cdce9f14
[ "MIT" ]
null
null
null
Milesian_calendar.adb
Louis-Aime/Milesian_calendar_Ada
c03b46cd48b921a5f1fa4abc60607197cdce9f14
[ "MIT" ]
null
null
null
Milesian_calendar.adb
Louis-Aime/Milesian_calendar_Ada
c03b46cd48b921a5f1fa4abc60607197cdce9f14
[ "MIT" ]
null
null
null
-- Package body Milesian_calendar ---------------------------------------------------------------------------- -- Copyright Miletus 2016-2019 -- 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, 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: -- 1. The above copyright notice and this permission notice shall be included -- in all copies or substantial portions of the Software. -- 2. Changes with respect to any former version shall be documented. -- -- The software is provided "as is", without warranty of any kind, -- express of implied, including but not limited to the warranties of -- merchantability, fitness for a particular purpose and noninfringement. -- In no event shall the authors of 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. -- Inquiries: www.calendriermilesien.org ------------------------------------------------------------------------------- -- Version 3 (M2019-01-16): back to pure Gregorian intercalation rule -- as it was in 2016 version. with Cycle_Computations; package body Milesian_calendar is package Julian_Day_cycle is new Cycle_computations.Integer_cycle_computations (Num => Julian_Day'Base); use Julian_Day_cycle; subtype computation_month is integer range 0..12; function is_long_Milesian_year -- Milesian long year just before bissextile (y : Historical_year_number) return boolean is y1 : Historical_year_number'Base := y+1; begin return y1 mod 4 = 0 and then (y1 mod 100 /= 0 or else (y1 mod 400 = 0)); end is_long_Milesian_year; function valid (date : milesian_date) return boolean is -- whether the given date is an existing one -- on elaboration, the basic range checks on record fields have been done begin return date.day <= 30 or else (date.month mod 2 = 0 and (date.month /= 12 or else is_long_Milesian_year(date.year))); end valid; function JD_to_Milesian (jd : Julian_Day) return Milesian_Date is cc : Cycle_coordinates := Decompose_cycle (jd-1721050, 146097); -- intialise current day for the computations to 1/1m/000 yc : Historical_year_number'Base := cc.Cycle*400; -- year component for computations initialised to base 0 mc : computation_month; -- bimester and monthe rank for computations -- cc.Phase holds is rank of day within quadricentury begin cc := Decompose_cycle_ceiled (cc.Phase, 36524, 4); -- cc.Cycle is rank of century in quadricentury, -- cc.Phase is rank of day within century. -- rank of century is 0 to 3, Phase can be 36524 if rank is 3. yc := yc + (cc.Cycle) * 100; -- base century cc := Decompose_cycle (cc.Phase, 1461); -- quadriannum yc := yc + cc.Cycle * 4; cc := Decompose_cycle_ceiled (cc.Phase, 365, 4); -- year in quadriannum yc := yc + cc.Cycle; -- here we get the year cc := Decompose_cycle (cc.Phase, 61); -- cycle is rank of bimester in year; phase is rank of day in bimester mc := cc.Cycle * 2; -- 0 to 10 cc := Decompose_cycle_ceiled (cc.Phase, 30, 2); -- whether firt (0) or second (1) month in bimester, -- and rank of day, 0 .. 30 if last month. return (year => yc, month => mc + cc.Cycle + 1, day => integer(cc.Phase) + 1); -- final month number and day number computed in return command. end JD_to_Milesian; function Milesian_to_JD (md : milesian_date) return julian_day is yc : Julian_Day'Base := md.year + 4800; -- year starting at -4800 in order to be positive; -- as a variant: we could start at -4000, forbidding years before -4000. mc : computation_month := md.month - 1; begin if not valid (md) then raise Time_Error; end if; return Julian_Day'Base (yc*365) -32115 + Julian_Day'Base (yc/4 -yc/100 +yc/400 +mc*30 +mc/2 +md.day); -- integer divisions yield integer quotients. end Milesian_to_JD; end Milesian_calendar;
46.642857
80
0.656968
598c0a9319f21e9a41d7135ef88908e31f0de599
401
ads
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/ifaces.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/ifaces.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/ifaces.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
package Ifaces is type Iface_1 is interface; procedure op1(this : Iface_1) is abstract; -- type Iface_2 is interface; procedure op2 (this : Iface_2) is abstract; -- type Root is new Iface_1 with record m_name : String(1..4); end record; -- procedure op1 (this : Root); -- type DT is new Root and Iface_2 with null record; procedure op2 (this : DT); end;
22.277778
52
0.643392
596fdff36d80ca6095d22cfa106893ba5e41403d
801
ads
Ada
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/dot_all/pck.ads
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/dot_all/pck.ads
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/dot_all/pck.ads
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
-- Copyright 2008-2017 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- 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); end Pck;
34.826087
73
0.735331
41237f02d42ff4b2ab31867a2cf87c4a512f94ea
3,588
ads
Ada
tools/scitools/conf/understand/ada/ada12/s-powtab.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/ada12/s-powtab.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/ada/ada12/s-powtab.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . P O W T E N _ T A B L E -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2009 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. -- -- -- -- -- -- -- -- -- -- -- -- 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 powers of ten table used for real conversions package System.Powten_Table is pragma Pure; Maxpow : constant := 22; -- The number of entries in this table is chosen to include powers of ten -- that are exactly representable with long_long_float. Assuming that on -- all targets we have 53 bits of mantissa for the type, the upper bound is -- given by 53/(log 5). If the scaling factor for a string is greater than -- Maxpow, it can be obtained by several multiplications, which is less -- efficient than with a bigger table, but avoids anomalies at end points. Powten : constant array (0 .. Maxpow) of Long_Long_Float := (00 => 1.0E+00, 01 => 1.0E+01, 02 => 1.0E+02, 03 => 1.0E+03, 04 => 1.0E+04, 05 => 1.0E+05, 06 => 1.0E+06, 07 => 1.0E+07, 08 => 1.0E+08, 09 => 1.0E+09, 10 => 1.0E+10, 11 => 1.0E+11, 12 => 1.0E+12, 13 => 1.0E+13, 14 => 1.0E+14, 15 => 1.0E+15, 16 => 1.0E+16, 17 => 1.0E+17, 18 => 1.0E+18, 19 => 1.0E+19, 20 => 1.0E+20, 21 => 1.0E+21, 22 => 1.0E+22); end System.Powten_Table;
50.535211
79
0.385173
4dde02096e5aea435b9083fb957b01b91a0cb162
10,368
ads
Ada
arch/ARM/STM32/svd/stm32f103/stm32_svd-spi.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/svd/stm32f103/stm32_svd-spi.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
null
null
null
arch/ARM/STM32/svd/stm32f103/stm32_svd-spi.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
null
null
null
-- This spec has been automatically generated from STM32F103.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.SPI is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR1_BR_Field is HAL.UInt3; -- control register 1 type CR1_Register is record -- Clock phase CPHA : Boolean := False; -- Clock polarity CPOL : Boolean := False; -- Master selection MSTR : Boolean := False; -- Baud rate control BR : CR1_BR_Field := 16#0#; -- SPI enable SPE : Boolean := False; -- Frame format LSBFIRST : Boolean := False; -- Internal slave select SSI : Boolean := False; -- Software slave management SSM : Boolean := False; -- Receive only RXONLY : Boolean := False; -- Data frame format DFF : Boolean := False; -- CRC transfer next CRCNEXT : Boolean := False; -- Hardware CRC calculation enable CRCEN : Boolean := False; -- Output enable in bidirectional mode BIDIOE : Boolean := False; -- Bidirectional data mode enable BIDIMODE : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register use record CPHA at 0 range 0 .. 0; CPOL at 0 range 1 .. 1; MSTR at 0 range 2 .. 2; BR at 0 range 3 .. 5; SPE at 0 range 6 .. 6; LSBFIRST at 0 range 7 .. 7; SSI at 0 range 8 .. 8; SSM at 0 range 9 .. 9; RXONLY at 0 range 10 .. 10; DFF at 0 range 11 .. 11; CRCNEXT at 0 range 12 .. 12; CRCEN at 0 range 13 .. 13; BIDIOE at 0 range 14 .. 14; BIDIMODE at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- control register 2 type CR2_Register is record -- Rx buffer DMA enable RXDMAEN : Boolean := False; -- Tx buffer DMA enable TXDMAEN : Boolean := False; -- SS output enable SSOE : Boolean := False; -- unspecified Reserved_3_4 : HAL.UInt2 := 16#0#; -- Error interrupt enable ERRIE : Boolean := False; -- RX buffer not empty interrupt enable RXNEIE : Boolean := False; -- Tx buffer empty interrupt enable TXEIE : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register use record RXDMAEN at 0 range 0 .. 0; TXDMAEN at 0 range 1 .. 1; SSOE at 0 range 2 .. 2; Reserved_3_4 at 0 range 3 .. 4; ERRIE at 0 range 5 .. 5; RXNEIE at 0 range 6 .. 6; TXEIE at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- status register type SR_Register is record -- Read-only. Receive buffer not empty RXNE : Boolean := False; -- Read-only. Transmit buffer empty TXE : Boolean := True; -- Read-only. Channel side CHSIDE : Boolean := False; -- Read-only. Underrun flag UDR : Boolean := False; -- CRC error flag CRCERR : Boolean := False; -- Read-only. Mode fault MODF : Boolean := False; -- Read-only. Overrun flag OVR : Boolean := False; -- Read-only. Busy flag BSY : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record RXNE at 0 range 0 .. 0; TXE at 0 range 1 .. 1; CHSIDE at 0 range 2 .. 2; UDR at 0 range 3 .. 3; CRCERR at 0 range 4 .. 4; MODF at 0 range 5 .. 5; OVR at 0 range 6 .. 6; BSY at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype DR_DR_Field is HAL.UInt16; -- data register type DR_Register is record -- Data register DR : DR_DR_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DR_Register use record DR at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CRCPR_CRCPOLY_Field is HAL.UInt16; -- CRC polynomial register type CRCPR_Register is record -- CRC polynomial register CRCPOLY : CRCPR_CRCPOLY_Field := 16#7#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CRCPR_Register use record CRCPOLY at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype RXCRCR_RxCRC_Field is HAL.UInt16; -- RX CRC register type RXCRCR_Register is record -- Read-only. Rx CRC register RxCRC : RXCRCR_RxCRC_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for RXCRCR_Register use record RxCRC at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype TXCRCR_TxCRC_Field is HAL.UInt16; -- TX CRC register type TXCRCR_Register is record -- Read-only. Tx CRC register TxCRC : TXCRCR_TxCRC_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TXCRCR_Register use record TxCRC at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype I2SCFGR_DATLEN_Field is HAL.UInt2; subtype I2SCFGR_I2SSTD_Field is HAL.UInt2; subtype I2SCFGR_I2SCFG_Field is HAL.UInt2; -- I2S configuration register type I2SCFGR_Register is record -- Channel length (number of bits per audio channel) CHLEN : Boolean := False; -- Data length to be transferred DATLEN : I2SCFGR_DATLEN_Field := 16#0#; -- Steady state clock polarity CKPOL : Boolean := False; -- I2S standard selection I2SSTD : I2SCFGR_I2SSTD_Field := 16#0#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- PCM frame synchronization PCMSYNC : Boolean := False; -- I2S configuration mode I2SCFG : I2SCFGR_I2SCFG_Field := 16#0#; -- I2S Enable I2SE : Boolean := False; -- I2S mode selection I2SMOD : Boolean := False; -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for I2SCFGR_Register use record CHLEN at 0 range 0 .. 0; DATLEN at 0 range 1 .. 2; CKPOL at 0 range 3 .. 3; I2SSTD at 0 range 4 .. 5; Reserved_6_6 at 0 range 6 .. 6; PCMSYNC at 0 range 7 .. 7; I2SCFG at 0 range 8 .. 9; I2SE at 0 range 10 .. 10; I2SMOD at 0 range 11 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype I2SPR_I2SDIV_Field is HAL.UInt8; -- I2S prescaler register type I2SPR_Register is record -- I2S Linear prescaler I2SDIV : I2SPR_I2SDIV_Field := 16#A#; -- Odd factor for the prescaler ODD : Boolean := False; -- Master clock output enable MCKOE : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for I2SPR_Register use record I2SDIV at 0 range 0 .. 7; ODD at 0 range 8 .. 8; MCKOE at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Serial peripheral interface type SPI_Peripheral is record -- control register 1 CR1 : aliased CR1_Register; -- control register 2 CR2 : aliased CR2_Register; -- status register SR : aliased SR_Register; -- data register DR : aliased DR_Register; -- CRC polynomial register CRCPR : aliased CRCPR_Register; -- RX CRC register RXCRCR : aliased RXCRCR_Register; -- TX CRC register TXCRCR : aliased TXCRCR_Register; -- I2S configuration register I2SCFGR : aliased I2SCFGR_Register; -- I2S prescaler register I2SPR : aliased I2SPR_Register; end record with Volatile; for SPI_Peripheral use record CR1 at 16#0# range 0 .. 31; CR2 at 16#4# range 0 .. 31; SR at 16#8# range 0 .. 31; DR at 16#C# range 0 .. 31; CRCPR at 16#10# range 0 .. 31; RXCRCR at 16#14# range 0 .. 31; TXCRCR at 16#18# range 0 .. 31; I2SCFGR at 16#1C# range 0 .. 31; I2SPR at 16#20# range 0 .. 31; end record; -- Serial peripheral interface SPI1_Periph : aliased SPI_Peripheral with Import, Address => System'To_Address (16#40013000#); -- Serial peripheral interface SPI2_Periph : aliased SPI_Peripheral with Import, Address => System'To_Address (16#40003800#); -- Serial peripheral interface SPI3_Periph : aliased SPI_Peripheral with Import, Address => System'To_Address (16#40003C00#); end STM32_SVD.SPI;
31.609756
65
0.55353
31d797d91461fbac0936583b9ba9c64a4168c389
811
adb
Ada
gdb/testsuite/gdb.ada/fun_in_declare/pck.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/fun_in_declare/pck.adb
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
null
null
null
gdb/testsuite/gdb.ada/fun_in_declare/pck.adb
greyblue9/binutils-gdb
05377632b124fe7600eea7f4ee0e9a35d1b0cbdc
[ "BSD-3-Clause" ]
null
null
null
-- Copyright 2008-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/>. package body Pck is procedure Do_Nothing is begin null; end Do_Nothing; end Pck;
36.863636
73
0.731196
a167c2fad6b1515d58dae6dc751c8aacc24e089b
2,937
adb
Ada
src/extraction-renamings.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
null
null
null
src/extraction-renamings.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
null
null
null
src/extraction-renamings.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
null
null
null
with Extraction.Node_Edge_Types; with Extraction.Utilities; package body Extraction.Renamings is use type LALCO.Ada_Node_Kind_Type; function Is_Renaming (Node : LAL.Ada_Node'Class) return Boolean; function Is_Renaming (Node : LAL.Ada_Node'Class) return Boolean is begin return Node.Kind in LALCO.Ada_Package_Renaming_Decl | LALCO.Ada_Generic_Package_Renaming_Decl | LALCO.Ada_Subp_Renaming_Decl | LALCO.Ada_Generic_Subp_Renaming_Decl or else (Node.Kind = LALCO.Ada_Exception_Decl and then not Node.As_Exception_Decl.F_Renames.Is_Null) or else (Node.Kind = LALCO.Ada_Object_Decl and then not Node.As_Object_Decl.F_Renaming_Clause.Is_Null); end Is_Renaming; function Get_Renamed_Name (Basic_Decl : LAL.Basic_Decl'Class) return LAL.Name; function Get_Renamed_Name (Basic_Decl : LAL.Basic_Decl'Class) return LAL.Name is begin case LALCO.Ada_Basic_Decl (Basic_Decl.Kind) is when LALCO.Ada_Package_Renaming_Decl => return Basic_Decl.As_Package_Renaming_Decl.F_Renames.F_Renamed_Object; when LALCO.Ada_Generic_Package_Renaming_Decl => return Basic_Decl.As_Generic_Package_Renaming_Decl.F_Renames; when LALCO.Ada_Subp_Renaming_Decl => return Basic_Decl.As_Subp_Renaming_Decl.F_Renames.F_Renamed_Object; when LALCO.Ada_Generic_Subp_Renaming_Decl => return Basic_Decl.As_Generic_Subp_Renaming_Decl.F_Renames; when LALCO.Ada_Exception_Decl => return Basic_Decl.As_Exception_Decl.F_Renames.F_Renamed_Object; when LALCO.Ada_Object_Decl => return Basic_Decl.As_Object_Decl.F_Renaming_Clause.F_Renamed_Object; when others => raise Internal_Extraction_Error with "Cases in Is_Renaming and Get_Renamed_Name do not match"; end case; end Get_Renamed_Name; procedure Extract_Edges (Node : LAL.Ada_Node'Class; Graph : Graph_Operations.Graph_Context) is begin if Utilities.Is_Relevant_Basic_Decl (Node) and then Is_Renaming (Node) and then not Utilities.Get_Referenced_Decl (Get_Renamed_Name (Node.As_Basic_Decl)) .Is_Null -- Ignore builtins. then declare Renaming_Decl : constant LAL.Basic_Decl := Node.As_Basic_Decl; Renamed_Name : constant LAL.Defining_Name := Utilities.Get_Referenced_Defining_Name (Get_Renamed_Name (Renaming_Decl)); Renamed_Decl : constant LAL.Basic_Decl := Utilities.Get_Referenced_Decl (Get_Renamed_Name (Renaming_Decl)); begin Graph.Write_Edge (Renaming_Decl, Renamed_Name, Renamed_Decl, Node_Edge_Types.Edge_Type_Renames); end; end if; end Extract_Edges; end Extraction.Renamings;
39.16
79
0.69016
2fc634d67fb250889ead8a03a018f008f545b027
927
ads
Ada
build_gnu/binutils/gdb/testsuite/gdb.ada/sym_print_name/pck.ads
jed-frey/e200-gcc
df1421b421a8ec8729d70791129f5283dee5f9ea
[ "BSD-3-Clause" ]
1
2017-05-31T21:42:12.000Z
2017-05-31T21:42:12.000Z
build_gnu/binutils/gdb/testsuite/gdb.ada/sym_print_name/pck.ads
jed-frey/e200-gcc
df1421b421a8ec8729d70791129f5283dee5f9ea
[ "BSD-3-Clause" ]
null
null
null
build_gnu/binutils/gdb/testsuite/gdb.ada/sym_print_name/pck.ads
jed-frey/e200-gcc
df1421b421a8ec8729d70791129f5283dee5f9ea
[ "BSD-3-Clause" ]
1
2019-12-17T22:04:07.000Z
2019-12-17T22:04:07.000Z
-- Copyright 2008-2014 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- 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/>. package Pck is package First is IntegerVar : Integer := 48; end First; package Second is IntegerVar : Integer := 74; end Second; procedure Do_Nothing (Val : in out Integer); end Pck;
34.333333
73
0.716289
29b28d9be0e646286747ba0d2c8b9b98199e22ab
158,173
adb
Ada
hls_video_processor/solution1/.autopilot/db/brightness_color_adj.bind.adb
bopopescu/hdmi-led
73b04e0b07a51840ffc014c9f7b1575493be80b4
[ "MIT" ]
1
2021-04-27T01:33:32.000Z
2021-04-27T01:33:32.000Z
hls_video_processor/solution1/.autopilot/db/brightness_color_adj.bind.adb
bopopescu/hdmi-led
73b04e0b07a51840ffc014c9f7b1575493be80b4
[ "MIT" ]
null
null
null
hls_video_processor/solution1/.autopilot/db/brightness_color_adj.bind.adb
bopopescu/hdmi-led
73b04e0b07a51840ffc014c9f7b1575493be80b4
[ "MIT" ]
2
2020-07-09T12:12:30.000Z
2021-05-23T22:00:42.000Z
<?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>brightness_color_adj</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>8</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>src_data_stream_0_V</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>src.data_stream[0].V</originalName> <rtlName></rtlName> <coreName>FIFO</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>3</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>src_data_stream_1_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>src.data_stream[1].V</originalName> <rtlName></rtlName> <coreName>FIFO</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>3</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>src_data_stream_2_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>src.data_stream[2].V</originalName> <rtlName></rtlName> <coreName>FIFO</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>3</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>dst_data_stream_0_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>dst.data_stream[0].V</originalName> <rtlName></rtlName> <coreName>FIFO</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>1</direction> <if_type>3</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="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>dst_data_stream_1_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>dst.data_stream[1].V</originalName> <rtlName></rtlName> <coreName>FIFO</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>1</direction> <if_type>3</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="_6"> <Value> <Obj> <type>1</type> <id>6</id> <name>dst_data_stream_2_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>dst.data_stream[2].V</originalName> <rtlName></rtlName> <coreName>FIFO</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>1</direction> <if_type>3</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="_7"> <Value> <Obj> <type>1</type> <id>7</id> <name>brightness_index_V</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> <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="_8"> <Value> <Obj> <type>1</type> <id>8</id> <name>color_correct_V</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> <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> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>44</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_9"> <Value> <Obj> <type>0</type> <id>18</id> <name>color_correct_V_read</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>2</count> <item_version>0</item_version> <item>85</item> <item>86</item> </oprand_edges> <opcode>read</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>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>19</id> <name>brightness_index_V_r</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> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>88</item> <item>89</item> </oprand_edges> <opcode>read</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>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>20</id> <name>tmp</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>270</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>C:\Users\byronxu\Documents\6.S193</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>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>270</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>90</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>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>21</id> <name>lut_perceptual_brigh_3</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>270</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>270</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>91</item> <item>93</item> <item>94</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>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>22</id> <name>scale_b_2</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>270</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>270</second> </item> </second> </item> </inlineStackInfo> <originalName>scale_b</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>95</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>3.25</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>23</id> <name>scale_r_cast</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>270</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>270</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>96</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>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>24</id> <name>lut_perceptual_brigh_4</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>271</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>271</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>97</item> <item>98</item> <item>99</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>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>25</id> <name>scale_g</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>271</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>271</second> </item> </second> </item> </inlineStackInfo> <originalName>scale_g</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>100</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>3.25</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>26</id> <name>scale_g_cast2</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>271</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>271</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>101</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>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>27</id> <name>lut_perceptual_brigh_5</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>272</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>272</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>102</item> <item>103</item> <item>104</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>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>28</id> <name>scale_b</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>272</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>272</second> </item> </second> </item> </inlineStackInfo> <originalName>scale_b</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>105</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>3.25</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>29</id> <name>scale_b_cast1</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>272</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>272</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>106</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="_21"> <Value> <Obj> <type>0</type> <id>30</id> <name>scale_g2</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>270</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>270</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>107</item> <item>108</item> <item>109</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.96</m_delay> <m_topoIndex>13</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>31</id> <name>scale_b2</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>270</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>270</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>110</item> <item>111</item> <item>112</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.96</m_delay> <m_topoIndex>14</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>32</id> <name>scale_g2_cast</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>279</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>279</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>113</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>15</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>33</id> <name>scale_b2_cast</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>279</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>279</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>114</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="_25"> <Value> <Obj> <type>0</type> <id>34</id> <name></name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>279</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>279</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>115</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>1.76</m_delay> <m_topoIndex>17</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>36</id> <name>t_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>r.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>5</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>117</item> <item>118</item> <item>119</item> <item>120</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>18</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>37</id> <name>exitcond4</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>279</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>279</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>121</item> <item>123</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>1.36</m_delay> <m_topoIndex>19</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>39</id> <name>r_V</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>279</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>279</second> </item> </second> </item> </inlineStackInfo> <originalName>r.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>5</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>124</item> <item>126</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>1.78</m_delay> <m_topoIndex>20</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>40</id> <name></name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>279</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>279</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>127</item> <item>128</item> <item>129</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>21</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>44</id> <name></name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>280</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>280</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>130</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>1.76</m_delay> <m_topoIndex>22</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>46</id> <name>t_V_3</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>c.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>132</item> <item>133</item> <item>134</item> <item>135</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>24</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>47</id> <name>exitcond</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>280</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>280</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>136</item> <item>138</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>1.42</m_delay> <m_topoIndex>25</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>49</id> <name>c_V</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>280</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>280</second> </item> </second> </item> </inlineStackInfo> <originalName>c.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>139</item> <item>141</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>1.82</m_delay> <m_topoIndex>26</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>50</id> <name></name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>280</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>280</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>142</item> <item>143</item> <item>144</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="_35"> <Value> <Obj> <type>0</type> <id>57</id> <name>tmp_32</name> <fileName>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>679</lineNumber> <contextFuncName>read</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>3</count> <item_version>0</item_version> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>operator&amp;gt;&amp;gt;</second> </first> <second>711</second> </item> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>read</second> </first> <second>679</second> </item> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>287</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>146</item> <item>147</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.88</m_delay> <m_topoIndex>28</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>58</id> <name>tmp_33</name> <fileName>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>679</lineNumber> <contextFuncName>read</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>3</count> <item_version>0</item_version> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>operator&amp;gt;&amp;gt;</second> </first> <second>711</second> </item> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>read</second> </first> <second>679</second> </item> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>287</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>148</item> <item>149</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.88</m_delay> <m_topoIndex>29</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>59</id> <name>tmp_31</name> <fileName>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>679</lineNumber> <contextFuncName>read</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>3</count> <item_version>0</item_version> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>operator&amp;gt;&amp;gt;</second> </first> <second>711</second> </item> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>read</second> </first> <second>679</second> </item> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>287</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>150</item> <item>151</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.88</m_delay> <m_topoIndex>30</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>61</id> <name>tmp_s</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>291</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>291</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>152</item> <item>153</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>5.74</m_delay> <m_topoIndex>31</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>62</id> <name>tmp_19</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>291</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>291</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>155</item> <item>156</item> <item>158</item> <item>160</item> </oprand_edges> <opcode>partselect</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>33</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>63</id> <name>tmp_20</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>291</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>291</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>161</item> </oprand_edges> <opcode>sext</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>37</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>64</id> <name>tmp_21</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>292</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>292</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>162</item> <item>163</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>5.74</m_delay> <m_topoIndex>32</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>65</id> <name>tmp_22</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>292</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>292</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>164</item> <item>165</item> <item>166</item> <item>167</item> </oprand_edges> <opcode>partselect</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>35</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>66</id> <name>tmp_23</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>292</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>292</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>168</item> </oprand_edges> <opcode>sext</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>38</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>67</id> <name>tmp_24</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>293</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>293</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>169</item> <item>170</item> </oprand_edges> <opcode>mul</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>5.74</m_delay> <m_topoIndex>34</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>68</id> <name>tmp_25</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>293</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>293</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>171</item> <item>172</item> <item>173</item> <item>174</item> </oprand_edges> <opcode>partselect</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>36</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>69</id> <name>tmp_26</name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>293</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>293</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>175</item> </oprand_edges> <opcode>sext</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>39</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>72</id> <name></name> <fileName>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>703</lineNumber> <contextFuncName>write</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>3</count> <item_version>0</item_version> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>operator&amp;lt;&amp;lt;</second> </first> <second>717</second> </item> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>write</second> </first> <second>703</second> </item> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>295</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>177</item> <item>178</item> <item>179</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.88</m_delay> <m_topoIndex>40</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>73</id> <name></name> <fileName>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>703</lineNumber> <contextFuncName>write</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>3</count> <item_version>0</item_version> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>operator&amp;lt;&amp;lt;</second> </first> <second>717</second> </item> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>write</second> </first> <second>703</second> </item> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>295</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>180</item> <item>181</item> <item>182</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.88</m_delay> <m_topoIndex>41</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>74</id> <name></name> <fileName>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>703</lineNumber> <contextFuncName>write</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>3</count> <item_version>0</item_version> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>operator&amp;lt;&amp;lt;</second> </first> <second>717</second> </item> <item> <first> <first>C:/Xilinx/Vivado/2018.3/common/technology/autopilot/hls/hls_video_core.h</first> <second>write</second> </first> <second>703</second> </item> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>295</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>183</item> <item>184</item> <item>185</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.88</m_delay> <m_topoIndex>42</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>77</id> <name></name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>280</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>280</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>186</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>43</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>80</id> <name></name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>279</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>279</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>187</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>44</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>82</id> <name></name> <fileName>hls_video_processor/hls_video_processor.cpp</fileName> <fileDirectory>C:\Users\byronxu\Documents\6.S193</fileDirectory> <lineNumber>298</lineNumber> <contextFuncName>brightness_color_adjust</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\byronxu\Documents\6.S193</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_processor/hls_video_processor.cpp</first> <second>brightness_color_adjust</second> </first> <second>298</second> </item> </second> </item> </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>23</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_53"> <Value> <Obj> <type>2</type> <id>92</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="_54"> <Value> <Obj> <type>2</type> <id>116</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>5</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_55"> <Value> <Obj> <type>2</type> <id>122</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>5</bitwidth> </Value> <const_type>0</const_type> <content>30</content> </item> <item class_id_reference="16" object_id="_56"> <Value> <Obj> <type>2</type> <id>125</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>5</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_57"> <Value> <Obj> <type>2</type> <id>131</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>6</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_58"> <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>6</bitwidth> </Value> <const_type>0</const_type> <content>60</content> </item> <item class_id_reference="16" object_id="_59"> <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>6</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_60"> <Value> <Obj> <type>2</type> <id>157</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>32</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_61"> <Value> <Obj> <type>2</type> <id>159</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>32</bitwidth> </Value> <const_type>0</const_type> <content>31</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_62"> <Obj> <type>3</type> <id>35</id> <name>_ifconv</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>17</count> <item_version>0</item_version> <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> <item>31</item> <item>32</item> <item>33</item> <item>34</item> </node_objs> </item> <item class_id_reference="18" object_id="_63"> <Obj> <type>3</type> <id>41</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>36</item> <item>37</item> <item>39</item> <item>40</item> </node_objs> </item> <item class_id_reference="18" object_id="_64"> <Obj> <type>3</type> <id>45</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>1</count> <item_version>0</item_version> <item>44</item> </node_objs> </item> <item class_id_reference="18" object_id="_65"> <Obj> <type>3</type> <id>51</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>46</item> <item>47</item> <item>49</item> <item>50</item> </node_objs> </item> <item class_id_reference="18" object_id="_66"> <Obj> <type>3</type> <id>78</id> <name>operator&gt;&gt;.exit</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>16</count> <item_version>0</item_version> <item>57</item> <item>58</item> <item>59</item> <item>61</item> <item>62</item> <item>63</item> <item>64</item> <item>65</item> <item>66</item> <item>67</item> <item>68</item> <item>69</item> <item>72</item> <item>73</item> <item>74</item> <item>77</item> </node_objs> </item> <item class_id_reference="18" object_id="_67"> <Obj> <type>3</type> <id>81</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>1</count> <item_version>0</item_version> <item>80</item> </node_objs> </item> <item class_id_reference="18" object_id="_68"> <Obj> <type>3</type> <id>83</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>1</count> <item_version>0</item_version> <item>82</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="_69"> <id>86</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_70"> <id>89</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_71"> <id>90</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="_72"> <id>91</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_73"> <id>93</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_74"> <id>94</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_75"> <id>95</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_76"> <id>96</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_77"> <id>97</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_78"> <id>98</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_79"> <id>99</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_80"> <id>100</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_81"> <id>101</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="_82"> <id>102</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_83"> <id>103</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_84"> <id>104</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_85"> <id>105</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="_86"> <id>106</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="_87"> <id>107</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_88"> <id>108</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_89"> <id>109</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_90"> <id>110</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_91"> <id>111</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_92"> <id>112</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_93"> <id>113</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>32</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_94"> <id>114</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_95"> <id>115</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_96"> <id>117</id> <edge_type>1</edge_type> <source_obj>116</source_obj> <sink_obj>36</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_97"> <id>118</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>36</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_98"> <id>119</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>36</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_99"> <id>120</id> <edge_type>2</edge_type> <source_obj>81</source_obj> <sink_obj>36</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_100"> <id>121</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_101"> <id>123</id> <edge_type>1</edge_type> <source_obj>122</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_102"> <id>124</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_103"> <id>126</id> <edge_type>1</edge_type> <source_obj>125</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_104"> <id>127</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_105"> <id>128</id> <edge_type>2</edge_type> <source_obj>45</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_106"> <id>129</id> <edge_type>2</edge_type> <source_obj>83</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_107"> <id>130</id> <edge_type>2</edge_type> <source_obj>51</source_obj> <sink_obj>44</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_108"> <id>132</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_109"> <id>133</id> <edge_type>2</edge_type> <source_obj>45</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_110"> <id>134</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>46</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_111"> <id>135</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>46</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_112"> <id>136</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_113"> <id>138</id> <edge_type>1</edge_type> <source_obj>137</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_114"> <id>139</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_115"> <id>141</id> <edge_type>1</edge_type> <source_obj>140</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_116"> <id>142</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>50</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_117"> <id>143</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>50</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_118"> <id>144</id> <edge_type>2</edge_type> <source_obj>81</source_obj> <sink_obj>50</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_119"> <id>147</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>57</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_120"> <id>149</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_121"> <id>151</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_122"> <id>152</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_123"> <id>153</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_124"> <id>156</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_125"> <id>158</id> <edge_type>1</edge_type> <source_obj>157</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_126"> <id>160</id> <edge_type>1</edge_type> <source_obj>159</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_127"> <id>161</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>63</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_128"> <id>162</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_129"> <id>163</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_130"> <id>165</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>65</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_131"> <id>166</id> <edge_type>1</edge_type> <source_obj>157</source_obj> <sink_obj>65</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_132"> <id>167</id> <edge_type>1</edge_type> <source_obj>159</source_obj> <sink_obj>65</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_133"> <id>168</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>66</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_134"> <id>169</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_135"> <id>170</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_136"> <id>172</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_137"> <id>173</id> <edge_type>1</edge_type> <source_obj>157</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_138"> <id>174</id> <edge_type>1</edge_type> <source_obj>159</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_139"> <id>175</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_140"> <id>178</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>72</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_141"> <id>179</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>72</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_142"> <id>181</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_143"> <id>182</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_144"> <id>184</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_145"> <id>185</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_146"> <id>186</id> <edge_type>2</edge_type> <source_obj>51</source_obj> <sink_obj>77</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_147"> <id>187</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>80</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_148"> <id>354</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>41</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_149"> <id>355</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>83</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_150"> <id>356</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_151"> <id>357</id> <edge_type>2</edge_type> <source_obj>45</source_obj> <sink_obj>51</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_152"> <id>358</id> <edge_type>2</edge_type> <source_obj>51</source_obj> <sink_obj>81</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_153"> <id>359</id> <edge_type>2</edge_type> <source_obj>51</source_obj> <sink_obj>78</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_154"> <id>360</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>51</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_155"> <id>361</id> <edge_type>2</edge_type> <source_obj>81</source_obj> <sink_obj>41</sink_obj> <is_back_edge>1</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_156"> <mId>1</mId> <mTag>brightness_color_adj</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>7</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>14492</mMinLatency> <mMaxLatency>14492</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_157"> <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>35</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="_158"> <mId>3</mId> <mTag>loop_height</mTag> <mType>1</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>4</item> <item>5</item> <item>6</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>30</mMinTripCount> <mMaxTripCount>30</mMaxTripCount> <mMinLatency>14490</mMinLatency> <mMaxLatency>14490</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_159"> <mId>4</mId> <mTag>Region 1</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>41</item> <item>45</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="_160"> <mId>5</mId> <mTag>loop_width</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>51</item> <item>78</item> </basic_blocks> <mII>8</mII> <mDepth>8</mDepth> <mMinTripCount>60</mMinTripCount> <mMaxTripCount>60</mMaxTripCount> <mMinLatency>480</mMinLatency> <mMaxLatency>480</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_161"> <mId>6</mId> <mTag>Region 2</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>81</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="_162"> <mId>7</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>83</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="_163"> <states class_id="25" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_164"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_165"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_166"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_167"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_168"> <id>22</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_169"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_170"> <id>25</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_171"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_172"> <id>28</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_173"> <id>2</id> <operations> <count>18</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_174"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_175"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_176"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_177"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_178"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_179"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_180"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_181"> <id>22</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_182"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_183"> <id>25</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_184"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_185"> <id>28</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_186"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_187"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_188"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_189"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_190"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_191"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_192"> <id>3</id> <operations> <count>9</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_193"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_194"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_195"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_196"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_197"> <id>40</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_198"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_199"> <id>43</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_200"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_201"> <id>82</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_202"> <id>4</id> <operations> <count>5</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_203"> <id>46</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_204"> <id>47</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_205"> <id>48</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_206"> <id>49</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_207"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_208"> <id>5</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_209"> <id>55</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_210"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_211"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_212"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_213"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_214"> <id>60</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_215"> <id>6</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_216"> <id>61</id> <stage>3</stage> <latency>3</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_217"> <id>7</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_218"> <id>61</id> <stage>2</stage> <latency>3</latency> </item> <item class_id_reference="28" object_id="_219"> <id>64</id> <stage>3</stage> <latency>3</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_220"> <id>8</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_221"> <id>61</id> <stage>1</stage> <latency>3</latency> </item> <item class_id_reference="28" object_id="_222"> <id>62</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_223"> <id>64</id> <stage>2</stage> <latency>3</latency> </item> <item class_id_reference="28" object_id="_224"> <id>67</id> <stage>3</stage> <latency>3</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_225"> <id>9</id> <operations> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_226"> <id>64</id> <stage>1</stage> <latency>3</latency> </item> <item class_id_reference="28" object_id="_227"> <id>65</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_228"> <id>67</id> <stage>2</stage> <latency>3</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_229"> <id>10</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_230"> <id>67</id> <stage>1</stage> <latency>3</latency> </item> <item class_id_reference="28" object_id="_231"> <id>68</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_232"> <id>11</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_233"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_234"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_235"> <id>54</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_236"> <id>63</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_237"> <id>66</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_238"> <id>69</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_239"> <id>70</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_240"> <id>71</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_241"> <id>72</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_242"> <id>73</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_243"> <id>74</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_244"> <id>75</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_245"> <id>76</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_246"> <id>77</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_247"> <id>12</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_248"> <id>79</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_249"> <id>80</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>13</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_250"> <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="_251"> <inState>2</inState> <outState>3</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="_252"> <inState>3</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>37</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_253"> <inState>12</inState> <outState>3</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="_254"> <inState>5</inState> <outState>6</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="_255"> <inState>6</inState> <outState>7</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="_256"> <inState>7</inState> <outState>8</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="_257"> <inState>8</inState> <outState>9</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="_258"> <inState>9</inState> <outState>10</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="_259"> <inState>10</inState> <outState>11</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="_260"> <inState>11</inState> <outState>4</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="_261"> <inState>4</inState> <outState>12</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>47</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_262"> <inState>4</inState> <outState>5</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>47</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>44</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>18</first> <second class_id="39" tracking_level="0" version="0"> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>23</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>24</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>26</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>29</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>2</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>2</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>57</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>5</first> <second>2</second> </second> </item> <item> <first>62</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>63</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>6</first> <second>2</second> </second> </item> <item> <first>65</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>67</first> <second> <first>7</first> <second>2</second> </second> </item> <item> <first>68</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>77</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>80</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>82</first> <second> <first>2</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>35</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> <item> <first>41</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>45</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>51</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>78</first> <second> <first>4</first> <second>10</second> </second> </item> <item> <first>81</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>83</first> <second> <first>2</first> <second>2</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="44" tracking_level="1" version="0" object_id="_263"> <region_name>loop_width</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>51</item> <item>78</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>8</interval> <pipe_depth>8</pipe_depth> </item> <item class_id_reference="44" object_id="_264"> <region_name>hls_label_2</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>78</item> </basic_blocks> <nodes> <count>6</count> <item_version>0</item_version> <item>70</item> <item>71</item> <item>72</item> <item>73</item> <item>74</item> <item>75</item> </nodes> <anchor_node>70</anchor_node> <region_type>1</region_type> <interval>0</interval> <pipe_depth>0</pipe_depth> </item> </regions> <dp_fu_nodes class_id="45" tracking_level="0" version="0"> <count>37</count> <item_version>0</item_version> <item class_id="46" tracking_level="0" version="0"> <first>90</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>96</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>102</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>108</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>114</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>120</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>127</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>134</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>141</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>148</first> <second> <count>2</count> <item_version>0</item_version> <item>22</item> <item>22</item> </second> </item> <item> <first>154</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>161</first> <second> <count>2</count> <item_version>0</item_version> <item>25</item> <item>25</item> </second> </item> <item> <first>167</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>174</first> <second> <count>2</count> <item_version>0</item_version> <item>28</item> <item>28</item> </second> </item> <item> <first>184</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>195</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>202</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>209</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>213</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>217</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>221</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>229</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>237</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>241</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>245</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>251</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>257</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>263</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>269</first> <second> <count>3</count> <item_version>0</item_version> <item>61</item> <item>61</item> <item>61</item> </second> </item> <item> <first>273</first> <second> <count>3</count> <item_version>0</item_version> <item>64</item> <item>64</item> <item>64</item> </second> </item> <item> <first>277</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>287</first> <second> <count>3</count> <item_version>0</item_version> <item>67</item> <item>67</item> <item>67</item> </second> </item> <item> <first>291</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>301</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>311</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>315</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>319</first> <second> <count>1</count> <item_version>0</item_version> <item>69</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="48" tracking_level="0" version="0"> <count>23</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>c_V_fu_263</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>exitcond4_fu_245</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>exitcond_fu_257</first> <second> <count>1</count> <item_version>0</item_version> <item>47</item> </second> </item> <item> <first>lut_perceptual_brigh_3_gep_fu_141</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>lut_perceptual_brigh_4_gep_fu_154</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>lut_perceptual_brigh_5_gep_fu_167</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>r_V_fu_251</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>scale_b2_cast_fu_241</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>scale_b2_fu_229</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>scale_b_cast1_fu_217</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>scale_g2_cast_fu_237</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>scale_g2_fu_221</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>scale_g_cast2_fu_213</first> <second> <count>1</count> <item_version>0</item_version> <item>26</item> </second> </item> <item> <first>scale_r_cast_fu_209</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>t_V_3_phi_fu_195</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>t_V_phi_fu_184</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>tmp_19_fu_277</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>tmp_20_fu_311</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>tmp_22_fu_291</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>tmp_23_fu_315</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>tmp_25_fu_301</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>tmp_26_fu_319</first> <second> <count>1</count> <item_version>0</item_version> <item>69</item> </second> </item> <item> <first>tmp_fu_202</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>3</count> <item_version>0</item_version> <item> <first>grp_fu_269</first> <second> <count>3</count> <item_version>0</item_version> <item>61</item> <item>61</item> <item>61</item> </second> </item> <item> <first>grp_fu_273</first> <second> <count>3</count> <item_version>0</item_version> <item>64</item> <item>64</item> <item>64</item> </second> </item> <item> <first>grp_fu_287</first> <second> <count>3</count> <item_version>0</item_version> <item>67</item> <item>67</item> <item>67</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>8</count> <item_version>0</item_version> <item> <first>StgValue_79_write_fu_120</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>StgValue_80_write_fu_127</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>StgValue_81_write_fu_134</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>brightness_index_V_r_read_fu_90</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>color_correct_V_read_read_fu_96</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>tmp_31_read_fu_114</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>tmp_32_read_fu_102</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>tmp_33_read_fu_108</first> <second> <count>1</count> <item_version>0</item_version> <item>58</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="50" tracking_level="0" version="0"> <count>3</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>lut_perceptual_brigh</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>25</item> <item>25</item> </second> </item> <item> <first> <first>lut_perceptual_brigh_1</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>22</item> <item>22</item> </second> </item> <item> <first> <first>lut_perceptual_brigh_2</first> <second>0</second> </first> <second> <count>2</count> <item_version>0</item_version> <item>28</item> <item>28</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>17</count> <item_version>0</item_version> <item> <first>180</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>191</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>323</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>328</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>333</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>338</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>343</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>348</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>353</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>357</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>365</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>370</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>375</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>380</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>385</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>390</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>395</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>17</count> <item_version>0</item_version> <item> <first>c_V_reg_365</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>exitcond4_reg_353</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>lut_perceptual_brigh_3_reg_323</first> <second> <count>1</count> <item_version>0</item_version> <item>21</item> </second> </item> <item> <first>lut_perceptual_brigh_4_reg_328</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>lut_perceptual_brigh_5_reg_333</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>r_V_reg_357</first> <second> <count>1</count> <item_version>0</item_version> <item>39</item> </second> </item> <item> <first>scale_b2_cast_reg_348</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>scale_g2_cast_reg_343</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>scale_r_cast_reg_338</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>t_V_3_reg_191</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>t_V_reg_180</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>tmp_19_reg_385</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>tmp_22_reg_390</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>tmp_25_reg_395</first> <second> <count>1</count> <item_version>0</item_version> <item>68</item> </second> </item> <item> <first>tmp_31_reg_380</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> <item> <first>tmp_32_reg_370</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>tmp_33_reg_375</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>2</count> <item_version>0</item_version> <item> <first>180</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>191</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>2</count> <item_version>0</item_version> <item> <first>t_V_3_reg_191</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>t_V_reg_180</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="53" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="54" tracking_level="0" version="0"> <first>brightness_index_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> </second> </item> <item> <first>color_correct_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> </second> </item> <item> <first>dst_data_stream_0_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> </second> </item> <item> <first>dst_data_stream_1_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> </second> </item> <item> <first>dst_data_stream_2_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> </second> </item> <item> <first>src_data_stream_0_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> </second> </item> <item> <first>src_data_stream_1_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> </second> </item> <item> <first>src_data_stream_2_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>59</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="55" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="56" tracking_level="0" version="0"> <first>1</first> <second>FIFO</second> </item> <item> <first>2</first> <second>FIFO</second> </item> <item> <first>3</first> <second>FIFO</second> </item> <item> <first>4</first> <second>FIFO</second> </item> <item> <first>5</first> <second>FIFO</second> </item> <item> <first>6</first> <second>FIFO</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
27.130875
100
0.578335
59bfb849fd7d2946952a7b8c239f44c8d15bbfb1
1,734
ads
Ada
tier-1/xcb/source/thin/xcb-xcb_configure_window_value_list_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_configure_window_value_list_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_configure_window_value_list_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
null
null
null
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_configure_window_value_list_t is -- Item -- type Item is record x : aliased Interfaces.Integer_32; y : aliased Interfaces.Integer_32; width : aliased Interfaces.Unsigned_32; height : aliased Interfaces.Unsigned_32; border_width : aliased Interfaces.Unsigned_32; sibling : aliased xcb.xcb_window_t; stack_mode : aliased Interfaces.Unsigned_32; end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_configure_window_value_list_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_configure_window_value_list_t.Item, Element_Array => xcb.xcb_configure_window_value_list_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_configure_window_value_list_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_configure_window_value_list_t.Pointer, Element_Array => xcb.xcb_configure_window_value_list_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_configure_window_value_list_t;
29.389831
77
0.66782
0e9b4e67979e358ddfa296190b3807b1f85d5a0d
4,996
ads
Ada
source/amf/uml/amf-uml-types.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/uml/amf-uml-types.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/uml/amf-uml-types.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 <[email protected]> -- -- 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. ------------------------------------------------------------------------------ -- A type is a named element that is used as the type for a typed element. A -- type can be contained in a package. -- -- A type constrains the values represented by a typed element. ------------------------------------------------------------------------------ with AMF.UML.Packageable_Elements; limited with AMF.UML.Packages; package AMF.UML.Types is pragma Preelaborate; type UML_Type is limited interface and AMF.UML.Packageable_Elements.UML_Packageable_Element; type UML_Type_Access is access all UML_Type'Class; for UML_Type_Access'Storage_Size use 0; not overriding function Get_Package (Self : not null access constant UML_Type) return AMF.UML.Packages.UML_Package_Access is abstract; -- Getter of Type::package. -- -- Specifies the owning package of this classifier, if any. not overriding procedure Set_Package (Self : not null access UML_Type; To : AMF.UML.Packages.UML_Package_Access) is abstract; -- Setter of Type::package. -- -- Specifies the owning package of this classifier, if any. not overriding function Conforms_To (Self : not null access constant UML_Type; Other : AMF.UML.Types.UML_Type_Access) return Boolean is abstract; -- Operation Type::conformsTo. -- -- The query conformsTo() gives true for a type that conforms to another. -- By default, two types do not conform to each other. This query is -- intended to be redefined for specific conformance situations. end AMF.UML.Types;
55.511111
78
0.47538
2f89883a3ca7c397db3b53ce74299c77e1a99a03
3,107
adb
Ada
polynomial/clenshaw/chebychev_quadrature.adb
jscparker/math_packages
b112a90338014d5c2dfae3f7265ee30841fb6cfd
[ "ISC", "MIT" ]
30
2018-12-09T01:15:04.000Z
2022-03-20T16:14:54.000Z
polynomial/clenshaw/chebychev_quadrature.adb
jscparker/math_packages
b112a90338014d5c2dfae3f7265ee30841fb6cfd
[ "ISC", "MIT" ]
null
null
null
polynomial/clenshaw/chebychev_quadrature.adb
jscparker/math_packages
b112a90338014d5c2dfae3f7265ee30841fb6cfd
[ "ISC", "MIT" ]
null
null
null
----------------------------------------------------------------------- -- package body Chebychev_Quadrature. Coefficients for Chebychev-Gaussian quadrature. -- Copyright (C) 2018 Jonathan S. Parker -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------------------------- package body Chebychev_Quadrature is Pii : constant := 3.14159_26535_89793_23846_26433_83279_50288_41971_694; Gauss_Root : Gauss_Values := (others => 0.0); Gauss_Weight : Gauss_Values := (others => 0.0); -- Arrays initialized after the "begin" below. --------------------------- -- Construct_Gauss_Roots -- --------------------------- procedure Construct_Gauss_Roots is Factor : constant Real := Pii / Real (Gauss_Index'Last); begin for i in Gauss_Index loop Gauss_Root (i) := -Cos (Factor * (Real (i) - 0.5)); end loop; end Construct_Gauss_Roots; ----------------------------- -- Construct_Gauss_Weights -- ----------------------------- procedure Construct_Gauss_Weights is Factor : constant Real := Pii / Real (Gauss_Index'Last); begin for i in Gauss_Index loop Gauss_Weight (i) := 0.5 * Factor * Abs (Sin (Factor * (Real (i) - 0.5))); end loop; end Construct_Gauss_Weights; ---------------------- -- Find_Gauss_Nodes -- ---------------------- procedure Find_Gauss_Nodes (X_Starting : in Real; X_Final : in Real; X_gauss : out Gauss_Values) is Half_Delta_X : constant Real := (X_Final - X_Starting) * 0.5; X_Center : constant Real := X_Starting + Half_Delta_X; begin for i in Gauss_Index loop X_gauss(i) := X_Center + Gauss_Root(i) * Half_Delta_X; end loop; end Find_Gauss_Nodes; ------------------ -- Get_Integral -- ------------------ procedure Get_Integral (F_val : in Function_Values; X_Starting : in Real; X_Final : in Real; Area : out Real) is Sum : Real; Delta_X : constant Real := (X_Final - X_Starting); begin Area := 0.0; Sum := 0.0; for i in Gauss_Index loop Sum := Sum + Gauss_Weight (i) * F_val (i); end loop; Area := Sum * Delta_X; end Get_Integral; begin Construct_Gauss_Roots; Construct_Gauss_Weights; end Chebychev_Quadrature;
33.053191
85
0.584487
296c858815a92000ada9a23fd82cd35f1eea5982
1,288
ads
Ada
CompStats_Statistics.ads
salmoni/CompStats_Statistics_Ada
d008b2813f33fc781d95192321793f1a6ef6d847
[ "MIT" ]
null
null
null
CompStats_Statistics.ads
salmoni/CompStats_Statistics_Ada
d008b2813f33fc781d95192321793f1a6ef6d847
[ "MIT" ]
null
null
null
CompStats_Statistics.ads
salmoni/CompStats_Statistics_Ada
d008b2813f33fc781d95192321793f1a6ef6d847
[ "MIT" ]
null
null
null
package CompStats_Statistics is type Values_Array is array (Integer range <>) of Float; function Get_Count (Values : in Values_Array) return Integer; function Get_Minimum (Values : in Values_Array) return Float; function Get_Maximum (Values : Values_Array) return Float; function Get_Range (Values : Values_Array) return Float; function Get_Sum (Values : Values_Array) return Float; function Get_Mean (Values : Values_Array) return Float; function Get_Sum_Of_Squares (Values: Values_Array) return Float; function Get_Population_Variance (Values: Values_Array) return Float; function Get_Sample_Variance (Values: Values_Array) return Float; function Get_Population_Standard_Deviation (Values: Values_Array) return Float; function Get_Sample_Standard_Deviation (Values: Values_Array) return Float; function Get_Standard_Error_Of_Mean (Values: Values_Array) return Float; function Get_Coefficient_Of_Variation (Values: Values_Array) return Float; function Get_Unique_Values (Values : Values_Array) return Values_Array; -- function Get_Slice (Values : Values_Array) return Integer; private function Is_Value_In_Array (Values : Values_Array; Value : Float) return Boolean; end CompStats_Statistics;
30.666667
85
0.771739
2fb9ff1def04c83aad942f6a35f6b6997e114ad8
2,978
adb
Ada
bb-runtimes/examples/tms570-leds/src/tms570-gpio.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/examples/tms570-leds/src/tms570-gpio.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/examples/tms570-leds/src/tms570-gpio.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ package body TMS570.GPIO is --------- -- Set -- --------- function Set (This : GPIO_Register; Pin : GPIO_Pin_Number) return Boolean is begin return (This.DIN and Pin) /= 0; end Set; ------------- -- Set_Pin -- ------------- procedure Set_Pin (This : in out GPIO_Register; Pin : GPIO_Pin_Number) is begin This.DSET := Pin; end Set_Pin; --------------- -- Clear_Pin -- --------------- procedure Clear_Pin (This : in out GPIO_Register; Pin : GPIO_Pin_Number) is begin This.DCLR := Pin; end Clear_Pin; ---------------- -- Toggle_Pin -- ---------------- procedure Toggle_Pin (This : in out GPIO_Register; Pin : GPIO_Pin_Number) is begin if Set (This, Pin) then Clear_Pin (This, Pin); else Set_Pin (This, Pin); end if; end Toggle_Pin; end TMS570.GPIO;
37.225
79
0.435191
a1aaefbb7e6dc96ea996dd5646793a3eb7c17b52
836
adb
Ada
src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/info_locals_renaming/pck.adb
alrooney/unum-sdk
bbccb10b0cd3500feccbbef22e27ea111c3d18eb
[ "Apache-2.0" ]
31
2018-08-01T21:25:24.000Z
2022-02-14T07:52:34.000Z
src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/info_locals_renaming/pck.adb
alrooney/unum-sdk
bbccb10b0cd3500feccbbef22e27ea111c3d18eb
[ "Apache-2.0" ]
40
2018-12-03T19:48:52.000Z
2021-03-10T06:34:26.000Z
src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/info_locals_renaming/pck.adb
alrooney/unum-sdk
bbccb10b0cd3500feccbbef22e27ea111c3d18eb
[ "Apache-2.0" ]
20
2018-11-16T21:19:22.000Z
2021-10-18T23:08:24.000Z
-- Copyright 2012-2016 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/>. package body Pck is procedure Increment (I : in out Integer) is begin I := I + 1; end Increment; end Pck;
38
73
0.721292
2fd05a6b68493645e1efc71c249b68afb96b512a
292
ads
Ada
source/base/incr-nodes-hash.ads
reznikmm/increment
0edff267d468f005f28b5d2c0c0fe23f4ff3164c
[ "MIT" ]
5
2017-10-20T08:40:59.000Z
2021-05-15T16:55:39.000Z
source/base/incr-nodes-hash.ads
reznikmm/increment
0edff267d468f005f28b5d2c0c0fe23f4ff3164c
[ "MIT" ]
null
null
null
source/base/incr-nodes-hash.ads
reznikmm/increment
0edff267d468f005f28b5d2c0c0fe23f4ff3164c
[ "MIT" ]
null
null
null
-- Copyright (c) 2015-2017 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Ada.Containers; function Incr.Nodes.Hash (Self : Node_Access) return Ada.Containers.Hash_Type;
29.2
78
0.589041
59f9ca89b3f610f8400d8ba4e8c3e2fc74b63063
485
ada
Ada
Task/Pascals-triangle/Ada/pascals-triangle-3.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Pascals-triangle/Ada/pascals-triangle-3.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
null
null
null
Task/Pascals-triangle/Ada/pascals-triangle-3.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Command_Line, Pascal; use Pascal; procedure Triangle is Number_Of_Rows: Positive := Integer'Value(Ada.Command_Line.Argument(1)); Row: Pascal.Row := First_Row(Number_Of_Rows); begin loop -- print one row for J in 1 .. Length(Row) loop Ada.Integer_Text_IO.Put(Row(J), 5); end loop; Ada.Text_IO.New_Line; exit when Length(Row) >= Number_Of_Rows; Row := Next_Row(Row); end loop; end Triangle;
25.526316
76
0.676289
29de380ebb1db937c00e9e9aa631fe22930452c5
45,515
adb
Ada
src/asf-components-base.adb
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
12
2015-01-18T23:02:20.000Z
2022-03-25T15:30:30.000Z
src/asf-components-base.adb
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
3
2021-01-06T09:44:02.000Z
2022-02-04T20:20:53.000Z
src/asf-components-base.adb
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
4
2016-04-12T05:29:00.000Z
2022-01-24T23:53:59.000Z
----------------------------------------------------------------------- -- asf-components-base -- Component tree -- Copyright (C) 2009 - 2021 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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.Strings; with Util.Log.Loggers; with Ada.Exceptions; with Ada.Unchecked_Deallocation; with ASF.Views.Nodes; with ASF.Contexts.Writer; with ASF.Contexts.Writer.String; with ASF.Components.Utils; with ASF.Components.Core; with ASF.Components.Core.Views; with ASF.Events.Faces; with EL.Variables; with EL.Contexts.Default; with ASF.Applications.Messages; with ASF.Applications.Messages.Factory; package body ASF.Components.Base is -- The logger Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ASF.Components.Base"); procedure Free_Component is new Ada.Unchecked_Deallocation (Object => UIComponent'Class, Name => UIComponent_Access); procedure Free_Attribute is new Ada.Unchecked_Deallocation (Object => UIAttribute, Name => UIAttribute_Access); -- Get the UIAttribute associated with the given name. -- Returns null if there is no UIAttribute with such name. function Get_Attribute (UI : in UIComponent; Name : in String) return UIAttribute_Access; -- ------------------------------ -- Get the parent component. -- Returns null if the node is the root element. -- ------------------------------ function Get_Parent (UI : UIComponent) return UIComponent_Access is begin return UI.Parent; end Get_Parent; -- ------------------------------ -- Return a client-side identifier for this component, generating -- one if necessary. -- ------------------------------ function Get_Client_Id (UI : UIComponent) return Unbounded_String is begin return UI.Id; end Get_Client_Id; -- ------------------------------ -- Returns True if the client-side identifier was generated automatically. -- ------------------------------ function Is_Generated_Id (UI : in UIComponent) return Boolean is begin return UI.Id_Generated; end Is_Generated_Id; -- ------------------------------ -- Returns True if the component has a client-side identifier matching the given name. -- ------------------------------ function Is_Client_Id (UI : in UIComponent; Id : in String) return Boolean is begin return UI.Id = Id; end Is_Client_Id; -- ------------------------------ -- Get the list of children. -- ------------------------------ function Get_Children (UI : UIComponent) return UIComponent_List is Result : UIComponent_List; begin Result.Child := UI.First_Child; return Result; end Get_Children; -- ------------------------------ -- Get the number of children. -- ------------------------------ function Get_Children_Count (UI : UIComponent) return Natural is Result : Natural := 0; Child : UIComponent_Access := UI.First_Child; begin while Child /= null loop Result := Result + 1; Child := Child.Next; end loop; return Result; end Get_Children_Count; -- ------------------------------ -- Get the first child component. -- Returns null if the component has no children. -- ------------------------------ function Get_First_Child (UI : UIComponent) return UIComponent_Access is begin return UI.First_Child; end Get_First_Child; -- ------------------------------ -- Get the tag node that created this component. -- ------------------------------ function Get_Tag (UI : in UIComponent'Class) return access ASF.Views.Nodes.Tag_Node'Class is begin return UI.Tag; end Get_Tag; -- ------------------------------ -- Initialize the component when restoring the view. -- The default initialization gets the client ID and allocates it if necessary. -- ------------------------------ procedure Initialize (UI : in out UIComponent; Context : in out Faces_Context'Class) is -- Then, look in the static attributes Attr : constant access ASF.Views.Nodes.Tag_Attribute := UI.Get_Attribute ("id"); Id : Natural; begin if Attr = null then Context.Create_Unique_Id (Id); UI.Id := To_Unbounded_String ("id" & Util.Strings.Image (Id)); UI.Id_Generated := True; else UI.Id := EL.Objects.To_Unbounded_String (ASF.Views.Nodes.Get_Value (Attr.all, UI)); UI.Id_Generated := False; end if; end Initialize; procedure Append (UI : in UIComponent_Access; Child : in UIComponent_Access; Tag : access ASF.Views.Nodes.Tag_Node'Class) is begin Child.Tag := Tag; Child.Parent := UI; Child.Next := null; if UI.Last_Child = null then UI.First_Child := Child; else UI.Last_Child.Next := Child; end if; UI.Last_Child := Child; end Append; -- ------------------------------ -- Search within the component tree for the {@link UIComponent} with -- an <code>id</code> that matches the specified search expression. -- ------------------------------ function Find_Child (UI : in UIComponent'Class; Id : in String) return UIComponent_Access is Child : UIComponent_Access := UI.First_Child; begin while Child /= null loop if Child.Is_Client_Id (Id) then return Child; end if; if Child.First_Child /= null then declare Result : constant UIComponent_Access := Child.Find_Child (Id); begin if Result /= null then return Result; end if; end; end if; Child := Child.Next; end loop; return null; end Find_Child; -- ------------------------------ -- Get the number of facets that this component contains. -- ------------------------------ function Get_Facet_Count (UI : in UIComponent'Class) return Natural is begin if UI.Facets = null then return 0; else return Natural (UI.Facets.Length); end if; end Get_Facet_Count; -- ------------------------------ -- Get the facet identified by the given name. -- Returns null if there is no such facet. -- ------------------------------ function Get_Facet (UI : in UIComponent'Class; Name : in String) return UIComponent_Access is begin if UI.Facets = null then return null; else declare Pos : constant Component_Maps.Cursor := UI.Facets.Find (Name); begin if Component_Maps.Has_Element (Pos) then Log.Debug ("Get facet {0}", Name); return Component_Maps.Element (Pos); else Log.Debug ("Facet {0}, not found", Name); return null; end if; end; end if; end Get_Facet; -- ------------------------------ -- Add the facet represented by the root component <b>Facet</b> under the name <b>Name</b>. -- The facet component is added to the facet map and it get be retrieved later on by -- using the <b>Get_Facet</b> operation. The facet component will be destroyed when this -- component is deleted. -- ------------------------------ procedure Add_Facet (UI : in out UIComponent'Class; Name : in String; Facet : in UIComponent_Access; Tag : access ASF.Views.Nodes.Tag_Node'Class) is Pos : Component_Maps.Cursor; begin Log.Debug ("Adding facet {0}", Name); if UI.Facets = null then UI.Facets := new Component_Maps.Map; end if; Pos := UI.Facets.Find (Name); if Component_Maps.Has_Element (Pos) then declare Facet : UIComponent_Access := Component_Maps.Element (Pos); begin Free_Component (Facet); end; UI.Log_Error ("Facet {0} already part of the component tree.", Name); UI.Facets.Replace_Element (Pos, Facet); else UI.Facets.Insert (Name, Facet); end if; Facet.Tag := Tag; Facet.Parent := UI'Unchecked_Access; Facet.Next := null; end Add_Facet; -- ------------------------------ -- Search for and return the {@link UIComponent} with an <code>id</code> -- that matches the specified search expression (if any), according to -- the algorithm described below. -- o look first in the sub-tree representing the parent node. -- o if not found, move to the parent's node -- Returns null if the component was not found in the view. -- ------------------------------ function Find (UI : in UIComponent; Id : in String) return UIComponent_Access is Ignore : UIComponent_Access := null; Parent : UIComponent_Access := UI.Parent; Node : UIComponent_Access; Result : UIComponent_Access; begin while Parent /= null loop if Parent.Is_Client_Id (Id) then return Parent; end if; -- Search the children recursively but skip the previous sub-tree we come from. Node := Parent.First_Child; while Node /= null loop if Node /= Ignore then if Node.Is_Client_Id (Id) then return Node; end if; Result := Node.Find_Child (Id => Id); if Result /= null then return Result; end if; end if; Node := Node.Next; end loop; -- Move up to the parent and ignore this sub-tree now. Ignore := Parent; Parent := Parent.Parent; end loop; return null; end Find; function Get_Context (UI : in UIComponent) return ASF.Contexts.Faces.Faces_Context_Access is pragma Unreferenced (UI); begin return ASF.Contexts.Faces.Current; end Get_Context; -- ------------------------------ -- Check whether the component and its children must be rendered. -- ------------------------------ function Is_Rendered (UI : UIComponent; Context : Faces_Context'Class) return Boolean is Attr : constant EL.Objects.Object := UI.Get_Attribute (Context, RENDERED_NAME); begin if EL.Objects.Is_Null (Attr) then return True; end if; return EL.Objects.To_Boolean (Attr); end Is_Rendered; -- ------------------------------ -- Set whether the component is rendered. -- ------------------------------ procedure Set_Rendered (UI : in out UIComponent; Rendered : in Boolean) is begin null; end Set_Rendered; -- ------------------------------ -- Get the UIAttribute associated with the given name. -- Returns null if there is no UIAttribute with such name. -- ------------------------------ function Get_Attribute (UI : in UIComponent; Name : in String) return UIAttribute_Access is use type ASF.Views.Nodes.Tag_Attribute; Attribute : UIAttribute_Access := UI.Attributes; begin -- Look first in the dynamic attribute list (owned by this UIComponent) while Attribute /= null loop if Attribute.Definition.all = Name then return Attribute; end if; Attribute := Attribute.Next_Attr; end loop; return null; end Get_Attribute; function Get_Attribute (UI : UIComponent; Context : Faces_Context'Class; Name : String) return EL.Objects.Object is Attribute : constant UIAttribute_Access := Get_Attribute (UI, Name); begin if Attribute /= null then begin -- The attribute value can be a constant or an expression. if not EL.Objects.Is_Null (Attribute.Value) then return Attribute.Value; else return Attribute.Expr.Get_Value (Context.Get_ELContext.all); end if; exception when EL.Variables.No_Variable => UI.Tag.Error ("Variable not found in expression: {0}", Attribute.Expr.Get_Expression); return EL.Objects.Null_Object; when E : others => Log.Error ("Evaluation error for '" & Attribute.Expr.Get_Expression & "'", E); UI.Tag.Error ("Exception raised when evaluating expression: {0}", Attribute.Expr.Get_Expression); return EL.Objects.Null_Object; end; end if; -- Then, look in the static attributes declare Attr : constant access ASF.Views.Nodes.Tag_Attribute := UI.Get_Attribute (Name); begin if Attr = null then return EL.Objects.Null_Object; end if; return ASF.Views.Nodes.Get_Value (Attr.all, UI); end; end Get_Attribute; -- ------------------------------ -- Get the attribute tag -- ------------------------------ function Get_Attribute (UI : UIComponent; Name : String) return access ASF.Views.Nodes.Tag_Attribute is begin if UI.Tag = null then return null; else return UI.Tag.Get_Attribute (Name); end if; end Get_Attribute; -- ------------------------------ -- Get the attribute value as a boolean. -- If the attribute does not exist, returns the default. -- ------------------------------ function Get_Attribute (UI : in UIComponent; Name : in String; Context : in Faces_Context'Class; Default : in Boolean := False) return Boolean is Attr : constant Util.Beans.Objects.Object := UI.Get_Attribute (Context, Name); begin if Util.Beans.Objects.Is_Null (Attr) then return Default; else return Util.Beans.Objects.To_Boolean (Attr); end if; end Get_Attribute; -- ------------------------------ -- Get the attribute value as a boolean. -- If the attribute does not exist, returns the default. -- ------------------------------ function Get_Attribute (UI : in UIComponent; Name : in String; Context : in Faces_Context'Class; Default : in Integer := 0) return Integer is Attr : constant Util.Beans.Objects.Object := UI.Get_Attribute (Context, Name); begin if Util.Beans.Objects.Is_Null (Attr) then return Default; else return Util.Beans.Objects.To_Integer (Attr); end if; end Get_Attribute; -- ------------------------------ -- Get the attribute value as a string. -- If the attribute does not exist, returns the default. -- ------------------------------ function Get_Attribute (UI : in UIComponent; Name : in String; Context : in Faces_Context'Class; Default : in String := "") return String is Attr : constant Util.Beans.Objects.Object := UI.Get_Attribute (Context, Name); begin if Util.Beans.Objects.Is_Null (Attr) then return Default; else return Util.Beans.Objects.To_String (Attr); end if; end Get_Attribute; procedure Set_Attribute (UI : in out UIComponent; Name : in String; Value : in EL.Objects.Object) is begin null; end Set_Attribute; procedure Set_Attribute (UI : in out UIComponent; Def : access ASF.Views.Nodes.Tag_Attribute; Value : in EL.Expressions.Expression) is use type ASF.Views.Nodes.Tag_Attribute; Attribute : UIAttribute_Access := UI.Attributes; begin while Attribute /= null loop if Def.all = Attribute.Definition.all then -- Attr_Name = Name then Attribute.Expr := Value; Attribute.Value := EL.Objects.Null_Object; return; end if; Attribute := Attribute.Next_Attr; end loop; Attribute := new UIAttribute; Attribute.Definition := Def; Attribute.Value := EL.Objects.Null_Object; Attribute.Expr := Value; Attribute.Next_Attr := UI.Attributes; UI.Attributes := Attribute; end Set_Attribute; procedure Set_Attribute (UI : in out UIComponent; Def : access ASF.Views.Nodes.Tag_Attribute; Value : in EL.Objects.Object) is use type ASF.Views.Nodes.Tag_Attribute; Attribute : UIAttribute_Access := UI.Attributes; begin while Attribute /= null loop if Def.all = Attribute.Definition.all then Attribute.Value := Value; return; end if; Attribute := Attribute.Next_Attr; end loop; Attribute := new UIAttribute; Attribute.Definition := Def; Attribute.Value := Value; Attribute.Next_Attr := UI.Attributes; UI.Attributes := Attribute; end Set_Attribute; -- ------------------------------ -- Get the <b>label</b> attribute from the component. If the attribute is -- empty, returns the client id. -- ------------------------------ function Get_Label (UI : in UIComponent'Class; Context : in Faces_Context'Class) return Util.Beans.Objects.Object is Result : constant Util.Beans.Objects.Object := UI.Get_Attribute (Context, LABEL_NAME); begin if not Util.Beans.Objects.Is_Null (Result) then return Result; else return Util.Beans.Objects.To_Object (UI.Get_Client_Id); end if; end Get_Label; -- ------------------------------ -- Get the expression -- ------------------------------ function Get_Expression (UI : in UIComponent; Name : in String) return EL.Expressions.Expression is Attribute : constant UIAttribute_Access := Get_Attribute (UI, Name); begin if Attribute /= null then begin -- The attribute value can be a constant or an expression. if EL.Objects.Is_Null (Attribute.Value) then return Attribute.Expr; end if; exception when EL.Variables.No_Variable => UI.Tag.Error ("Variable not found in expression: {0}", Attribute.Expr.Get_Expression); when E : others => Log.Error ("Evaluation error for '" & Attribute.Expr.Get_Expression & "'", E); UI.Tag.Error ("Exception raised when evaluating expression: {0}", Attribute.Expr.Get_Expression); end; else -- Then, look in the static attributes declare Value : constant access ASF.Views.Nodes.Tag_Attribute := UI.Get_Attribute (Name); begin if Value /= null then return ASF.Views.Nodes.Get_Expression (Value.all); end if; end; end if; raise EL.Expressions.Invalid_Expression with "No value expression for: " & Name; end Get_Expression; -- ------------------------------ -- Get the value expression -- ------------------------------ function Get_Value_Expression (UI : in UIComponent; Name : in String) return EL.Expressions.Value_Expression is Attribute : constant UIAttribute_Access := Get_Attribute (UI, Name); begin if Attribute /= null then begin -- The attribute value can be a constant or an expression. if EL.Objects.Is_Null (Attribute.Value) then return EL.Expressions.Create_Expression (Attribute.Expr); end if; exception when EL.Variables.No_Variable => UI.Tag.Error ("Variable not found in expression: {0}", Attribute.Expr.Get_Expression); when E : others => Log.Error ("Evaluation error for '" & Attribute.Expr.Get_Expression & "'", E); UI.Tag.Error ("Exception raised when evaluating expression: {0}", Attribute.Expr.Get_Expression); end; else -- Then, look in the static attributes declare Value : constant access ASF.Views.Nodes.Tag_Attribute := UI.Get_Attribute (Name); begin if Value /= null then return ASF.Views.Nodes.Get_Value_Expression (Value.all); end if; end; end if; raise EL.Expressions.Invalid_Expression with "No value expression for: " & Name; end Get_Value_Expression; -- ------------------------------ -- Get the method expression -- Raise an Invalid_Expression if the method expression is invalid. -- ------------------------------ function Get_Method_Expression (UI : in UIComponent; Name : in String) return EL.Expressions.Method_Expression is Attribute : constant UIAttribute_Access := Get_Attribute (UI, Name); begin if Attribute /= null then begin -- The attribute value can be a constant or an expression. if EL.Objects.Is_Null (Attribute.Value) then return EL.Expressions.Create_Expression (Attribute.Expr); end if; exception when EL.Variables.No_Variable => UI.Tag.Error ("Variable not found in expression: {0}", Attribute.Expr.Get_Expression); when E : others => Log.Error ("Evaluation error for '" & Attribute.Expr.Get_Expression & "'", E); UI.Tag.Error ("Exception raised when evaluating expression: {0}", Attribute.Expr.Get_Expression); end; else -- Then, look in the static attributes declare Value : constant access ASF.Views.Nodes.Tag_Attribute := UI.Get_Attribute (Name); begin if Value /= null then return ASF.Views.Nodes.Get_Method_Expression (Value.all); end if; end; end if; raise EL.Expressions.Invalid_Expression with "No method expression for: " & Name; end Get_Method_Expression; -- ------------------------------ -- Add a message for the component. Look for the message attribute identified -- by <b>Name</b> on the <b>UI</b> component. Add this message in the faces context -- and associated with the component client id. Otherwise, add the default -- message whose bundle key is identified by <b>default</b>. -- ------------------------------ procedure Add_Message (UI : in UIComponent'Class; Name : in String; Default : in String; Context : in out Faces_Context'Class) is Args : constant ASF.Utils.Object_Array (1 .. 0) := (others => <>); begin UI.Add_Message (Name, Default, Args, Context); end Add_Message; -- ------------------------------ -- Add a message for the component. Look for the message attribute identified -- by <b>Name</b> on the <b>UI</b> component. Add this message in the faces context -- and associated with the component client id. Otherwise, add the default -- message whose bundle key is identified by <b>default</b>. -- ------------------------------ procedure Add_Message (UI : in UIComponent'Class; Name : in String; Default : in String; Arg1 : in Util.Beans.Objects.Object; Context : in out Faces_Context'Class) is Args : constant ASF.Utils.Object_Array (1 .. 1) := (1 => Arg1); begin UI.Add_Message (Name, Default, Args, Context); end Add_Message; -- ------------------------------ -- Add a message for the component. Look for the message attribute identified -- by <b>Name</b> on the <b>UI</b> component. Add this message in the faces context -- and associated with the component client id. Otherwise, add the default -- message whose bundle key is identified by <b>default</b>. -- ------------------------------ procedure Add_Message (UI : in UIComponent'Class; Name : in String; Default : in String; Arg1 : in Util.Beans.Objects.Object; Arg2 : in Util.Beans.Objects.Object; Context : in out Faces_Context'Class) is Args : constant ASF.Utils.Object_Array (1 .. 2) := (1 => Arg1, 2 => Arg2); begin UI.Add_Message (Name, Default, Args, Context); end Add_Message; -- ------------------------------ -- Add a message for the component. Look for the message attribute identified -- by <b>Name</b> on the <b>UI</b> component. Add this message in the faces context -- and associated with the component client id. Otherwise, use the default -- message whose bundle key is identified by <b>default</b>. The message is -- formatted with the arguments passed in <b>Args</b>. -- ------------------------------ procedure Add_Message (UI : in UIComponent'Class; Name : in String; Default : in String; Args : in ASF.Utils.Object_Array; Context : in out Faces_Context'Class) is Id : constant String := To_String (UI.Get_Client_Id); Msg : constant EL.Objects.Object := UI.Get_Attribute (Name => Name, Context => Context); Message : ASF.Applications.Messages.Message; begin if EL.Objects.Is_Null (Msg) then Message := ASF.Applications.Messages.Factory.Get_Message (Context => Context, Message_Id => Default, Args => Args); else -- The message is already localized, we just need to set and format it. ASF.Applications.Messages.Set_Severity (Message, ASF.Applications.Messages.ERROR); ASF.Applications.Messages.Format_Summary (Message, EL.Objects.To_String (Msg), Args); end if; Context.Add_Message (Client_Id => Id, Message => Message); end Add_Message; procedure Encode_Begin (UI : in UIComponent; Context : in out Faces_Context'Class) is begin null; end Encode_Begin; procedure Encode_Children (UI : in UIComponent; Context : in out Faces_Context'Class) is Child : UIComponent_Access; begin -- Do not render the children if the component is not rendered. if not UI.Is_Rendered (Context) then return; end if; Child := UI.First_Child; while Child /= null loop Child.Encode_All (Context); Child := Child.Next; end loop; end Encode_Children; -- ------------------------------ -- Encode the children components in a local buffer and after the rendering execute -- the <b>Process</b> procedure with the generated content. -- If this component is not rendered, do nothing. -- ------------------------------ procedure Wrap_Encode_Children (UI : in UIComponent; Context : in out ASF.Contexts.Faces.Faces_Context'Class; Process : not null access procedure (Content : in Unbounded_String)) is Child : UIComponent_Access := UI.First_Child; begin if not UI.Is_Rendered (Context) then return; elsif Child = null then Process (Null_Unbounded_String); else -- Replace temporarily the response writer by a local buffer. -- Make sure that if an exception is raised, the original response writer is restored. declare Writer : constant Contexts.Writer.Response_Writer_Access := Context.Get_Response_Writer; Buffer : aliased ASF.Contexts.Writer.String.String_Writer; begin Context.Set_Response_Writer (Buffer'Unchecked_Access); while Child /= null loop Child.Encode_All (Context); Child := Child.Next; end loop; Context.Set_Response_Writer (Writer); Process (Buffer.Get_Response); exception when others => Context.Set_Response_Writer (Writer); raise; end; end if; end Wrap_Encode_Children; procedure Wrap_Encode_Children (UI : in UIComponent; Context : in out ASF.Contexts.Faces.Faces_Context'Class; Process : not null access procedure (Content : in String)) is Child : UIComponent_Access := UI.First_Child; begin if not UI.Is_Rendered (Context) then return; elsif Child = null then Process (""); else -- Replace temporarily the response writer by a local buffer. -- Make sure that if an exception is raised, the original response writer is restored. declare Writer : constant Contexts.Writer.Response_Writer_Access := Context.Get_Response_Writer; Buffer : aliased ASF.Contexts.Writer.String.String_Writer; begin Context.Set_Response_Writer (Buffer'Unchecked_Access); while Child /= null loop Child.Encode_All (Context); Child := Child.Next; end loop; Context.Set_Response_Writer (Writer); Process (Ada.Strings.Unbounded.To_String (Buffer.Get_Response)); exception when others => Context.Set_Response_Writer (Writer); raise; end; end if; end Wrap_Encode_Children; procedure Encode_End (UI : in UIComponent; Context : in out Faces_Context'Class) is begin null; end Encode_End; procedure Encode_All (UI : in UIComponent'Class; Context : in out Faces_Context'Class) is begin UI.Encode_Begin (Context); UI.Encode_Children (Context); UI.Encode_End (Context); end Encode_All; procedure Decode (UI : in out UIComponent; Context : in out Faces_Context'Class) is begin null; end Decode; procedure Decode_Children (UI : in UIComponent'Class; Context : in out Faces_Context'Class) is Child : UIComponent_Access; begin Child := UI.First_Child; while Child /= null loop Child.Process_Decodes (Context); Child := Child.Next; end loop; end Decode_Children; procedure Process_Decodes (UI : in out UIComponent; Context : in out Faces_Context'Class) is begin -- Do not decode the component nor its children if the component is not rendered. if not UI.Is_Rendered (Context) then return; end if; UI.Decode_Children (Context); UIComponent'Class (UI).Decode (Context); end Process_Decodes; -- ------------------------------ -- Perform the component tree processing required by the <b>Process Validations</b> -- phase of the request processing lifecycle for all facets of this component, -- all children of this component, and this component itself, as follows: -- <ul> -- <li>If this component <b>rendered</b> property is false, skip further processing. -- <li>Call the <b>Process_Validators</b> of all facets and children. -- <ul> -- ------------------------------ procedure Process_Validators (UI : in out UIComponent; Context : in out Faces_Context'Class) is Child : UIComponent_Access; begin -- Do not process validation of the component nor its children -- if this component is not rendered. if not UI.Is_Rendered (Context) then return; end if; Child := UI.First_Child; while Child /= null loop Child.Process_Validators (Context); Child := Child.Next; end loop; end Process_Validators; procedure Process_Updates (UI : in out UIComponent; Context : in out Faces_Context'Class) is Child : UIComponent_Access; begin -- Do not decode the component nor its children if the component is not rendered. if not UI.Is_Rendered (Context) then return; end if; Child := UI.First_Child; while Child /= null loop Child.Process_Updates (Context); Child := Child.Next; end loop; end Process_Updates; -- ------------------------------ -- Queue an event for broadcast at the end of the current request -- processing lifecycle phase. The default implementation in -- delegates this call to the parent component. The <b>UIViewRoot</b> -- component is in charge of queueing events. The event object -- will be freed after being dispatched. -- ------------------------------ procedure Queue_Event (UI : in out UIComponent; Event : not null access ASF.Events.Faces.Faces_Event'Class) is begin if UI.Parent = null then Log.Error ("The component tree does not have a UIView root component. Event ignored."); else UI.Parent.Queue_Event (Event); end if; end Queue_Event; -- ------------------------------ -- Broadcast the event to the event listeners installed on this component. -- Listeners are called in the order in which they were added. -- ------------------------------ procedure Broadcast (UI : in out UIComponent; Event : not null access ASF.Events.Faces.Faces_Event'Class; Context : in out Faces_Context'Class) is pragma Unreferenced (UI, Event, Context); begin Log.Error ("Event dispatched to a component that cannot handle it"); end Broadcast; -- ------------------------------ -- Finalize the object. -- ------------------------------ overriding procedure Finalize (UI : in out UIComponent) is procedure Free is new Ada.Unchecked_Deallocation (Object => Component_Maps.Map, Name => Component_Map_Access); begin -- If this component has some facets, we have to delete them. if UI.Facets /= null then loop declare Iter : Component_Maps.Cursor := UI.Facets.First; Item : UIComponent_Access; begin exit when not Component_Maps.Has_Element (Iter); Item := Component_Maps.Element (Iter); Free_Component (Item); UI.Facets.Delete (Iter); end; end loop; Free (UI.Facets); end if; -- Release the dynamic attributes. declare A : UIAttribute_Access := UI.Attributes; begin while A /= null loop UI.Attributes := A.Next_Attr; Free_Attribute (A); A := UI.Attributes; end loop; end; -- And release the children of this component recursively. declare C : UIComponent_Access := UI.First_Child; begin while C /= null loop UI.First_Child := C.Next; Free_Component (C); C := UI.First_Child; end loop; end; end Finalize; -- ------------------------------ -- Iterate over the children of the component and execute -- the <b>Process</b> procedure. -- ------------------------------ procedure Iterate (UI : in UIComponent'Class) is Child : UIComponent_Access := UI.First_Child; begin while Child /= null loop Process (Child); Child := Child.Next; end loop; end Iterate; -- ------------------------------ -- Iterate over the attributes defined on the component and -- execute the <b>Process</b> procedure. -- ------------------------------ procedure Iterate_Attributes (UI : in UIComponent'Class) is Attribute : UIAttribute_Access := UI.Attributes; procedure Process_Tag_Attribute (Attr : in ASF.Views.Nodes.Tag_Attribute_Access); procedure Process_Tag_Attribute (Attr : in ASF.Views.Nodes.Tag_Attribute_Access) is A : UIAttribute; N : UIAttribute_Access := UI.Attributes; begin while N /= null loop if N.Definition = Attr then return; end if; N := N.Next_Attr; end loop; A.Definition := Attr; Process (ASF.Views.Nodes.Get_Name (Attr.all), A); end Process_Tag_Attribute; procedure Iterate_Tag_Attributes is new ASF.Views.Nodes.Iterate_Attributes (Process_Tag_Attribute); begin -- Iterate first over the component modified attributes. while Attribute /= null loop Process (ASF.Views.Nodes.Get_Name (Attribute.Definition.all), Attribute.all); Attribute := Attribute.Next_Attr; end loop; Iterate_Tag_Attributes (UI.Tag.all); end Iterate_Attributes; -- ------------------------------ -- Get the attribute value. -- ------------------------------ function Get_Value (Attr : UIAttribute; UI : UIComponent'Class) return EL.Objects.Object is procedure Handle_Exception (E : in Ada.Exceptions.Exception_Occurrence); procedure Handle_Exception (E : in Ada.Exceptions.Exception_Occurrence) is begin ASF.Views.Nodes.Error (Attr.Definition.all, "Evaluation error: {0}", Ada.Exceptions.Exception_Message (E)); end Handle_Exception; begin if not EL.Objects.Is_Null (Attr.Value) then return Attr.Value; elsif not Attr.Expr.Is_Null then declare Ctx : constant EL.Contexts.ELContext_Access := UI.Get_Context.Get_ELContext; Context : EL.Contexts.Default.Guarded_Context (Handle_Exception'Access, Ctx); begin return Attr.Expr.Get_Value (Context); end; else return ASF.Views.Nodes.Get_Value (Attr.Definition.all, UI); end if; end Get_Value; -- ------------------------------ -- Report an error message in the logs caused by an invalid configuration or -- setting on the component. -- ------------------------------ procedure Log_Error (UI : in UIComponent'Class; Message : in String; Arg1 : in String := ""; Arg2 : in String := ""; Arg3 : in String := "") is begin Log.Error (Utils.Get_Line_Info (UI) & ": " & Message, Arg1, Arg2, Arg3); end Log_Error; -- ------------------------------ -- Get the root component from the <b>UI</b> component tree. -- After the operation, the <b>UI</b> component tree will contain no -- nodes. -- If the <b>Root</b> pointer is not null, first deletes recursively -- the component tree. -- ------------------------------ procedure Steal_Root_Component (UI : in out UIComponent'Class; Root : in out UIComponent_Access) is procedure Move_Siblings (Tree : in UIComponent_Access); -- Move siblings of the component at end of children list. procedure Move_Siblings (Tree : in UIComponent_Access) is Node, Prev : UIComponent_Access; begin Node := Tree.Next; Tree.Next := null; if Tree.Last_Child = null then Tree.First_Child := Node; else Tree.Last_Child.Next := Node; end if; -- And reparent these left nodes. while Node /= null loop Prev := Node; Node.Parent := Tree; Node := Node.Next; end loop; Tree.Last_Child := Prev; end Move_Siblings; begin if Root /= null then Free_Component (Root); end if; if UI.First_Child = null then Root := null; elsif UI.First_Child.Next = null and then UI.First_Child.all in ASF.Components.Core.Views.UIView'Class then Root := UI.First_Child; Root.Parent := null; UI.First_Child := null; UI.Last_Child := null; else declare View : Core.Views.UIView_Access; Tree : UIComponent_Access := UI.First_Child; Node : UIComponent_Access := Tree; Prev : UIComponent_Access := null; begin while Node /= null and then not (Node.all in Core.Views.UIView'Class) loop Prev := Node; Node := Node.Next; end loop; if Node /= null then View := Core.Views.UIView'Class (Node.all)'Access; -- Move the left components below the <f:view> component. if Prev /= null then Prev.Next := null; -- Reparent the first left node to the real <f:view> root component -- and make it the root of the left tree before the <f:view>. Tree.Parent := View.all'Access; View.Set_Before_View (Tree); -- Move other left nodes at end of children list of our new left tree. -- This is necessary to correctly release them. Move_Siblings (Tree); Node := View.all'Access; end if; -- Move the right components below the <f:view> component. if Node.Next /= null then Tree := Node.Next; -- Reparent the first right node to the real <f:view> root component -- and make it the root of the right tree after the <f:view>. Tree.Parent := View.all'Access; View.Set_After_View (Tree); Move_Siblings (Tree); Node := View.all'Access; end if; else View := new Components.Core.Views.UIView; View.Set_Content_Type ("text/html"); Root := View.all'Access; Root.First_Child := UI.First_Child; Root.Last_Child := UI.Last_Child; Node := UI.First_Child; -- Reparent the children. while Node /= null loop Node.Parent := Root; Node := Node.Next; end loop; end if; Root := View.all'Access; Root.Parent := null; UI.First_Child := null; UI.Last_Child := null; end; end if; end Steal_Root_Component; -- ------------------------------ -- Get an iterator to scan the component children. -- ------------------------------ function First (UI : in UIComponent'Class) return Cursor is begin return Cursor '(Child => UI.First_Child); end First; -- ------------------------------ -- Returns True if the iterator points to a valid child. -- ------------------------------ function Has_Element (Pos : in Cursor) return Boolean is begin return Pos.Child /= null; end Has_Element; -- ------------------------------ -- Get the child component pointed to by the iterator. -- ------------------------------ function Element (Pos : in Cursor) return UIComponent_Access is begin return Pos.Child; end Element; -- ------------------------------ -- Move to the next child. -- ------------------------------ procedure Next (Pos : in out Cursor) is begin if Pos.Child /= null then Pos.Child := Pos.Child.Next; end if; end Next; end ASF.Components.Base;
37.491763
96
0.547578
29861f28fdc96f9faaa3d2f79e33cff735be319c
1,768
adb
Ada
source/library/program-gnat_unit_naming.adb
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/library/program-gnat_unit_naming.adb
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/library/program-gnat_unit_naming.adb
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
1
2019-10-16T09:05:27.000Z
2019-10-16T09:05:27.000Z
-- SPDX-FileCopyrightText: 2019 Max Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Ada.Strings.Wide_Wide_Fixed; with Ada.Wide_Wide_Characters.Handling; package body Program.GNAT_Unit_Naming is -------------------- -- Body_Text_Name -- -------------------- function Body_Text_Name (Self : GNAT_Unit_Naming; Name : Program.Text) return Program.Text is Lower_Text : constant Text := Ada.Wide_Wide_Characters.Handling.To_Lower (Name); Base_Name : constant Text := Ada.Strings.Wide_Wide_Fixed.Translate (Lower_Text, Self.Map); begin return Base_Name & ".adb"; end Body_Text_Name; --------------------------- -- Declaration_Text_Name -- --------------------------- overriding function Declaration_Text_Name (Self : GNAT_Unit_Naming; Name : Program.Text) return Program.Text is Lower_Text : constant Text := Ada.Wide_Wide_Characters.Handling.To_Lower (Name); Base_Name : constant Text := Ada.Strings.Wide_Wide_Fixed.Translate (Lower_Text, Self.Map); begin return Base_Name & ".ads"; end Declaration_Text_Name; ------------------------ -- Standard_Text_Name -- ------------------------ overriding function Standard_Text_Name (Self : GNAT_Unit_Naming) return Text is pragma Unreferenced (Self); begin return "_standard_.ads"; end Standard_Text_Name; ----------------------- -- Subunit_Text_Name -- ----------------------- overriding function Subunit_Text_Name (Self : GNAT_Unit_Naming; Name : Program.Text) return Text renames Body_Text_Name; end Program.GNAT_Unit_Naming;
26
69
0.585973
1d3e14f82db6c5b07a7d53a82f59173164819fa9
8,715
adb
Ada
src/xdg.adb
darkestkhan/xdg
37d9dcbdb1896dcdf1f9c35150ae730a117ed58b
[ "0BSD" ]
2
2015-01-05T22:35:41.000Z
2015-03-14T00:06:05.000Z
src/xdg.adb
darkestkhan/xdg
37d9dcbdb1896dcdf1f9c35150ae730a117ed58b
[ "0BSD" ]
null
null
null
src/xdg.adb
darkestkhan/xdg
37d9dcbdb1896dcdf1f9c35150ae730a117ed58b
[ "0BSD" ]
null
null
null
------------------------------------------------------------------------------ -- EMAIL: <[email protected]> -- -- License: ISC License (see COPYING file) -- -- -- -- Copyright © 2014 - 2015 darkestkhan -- ------------------------------------------------------------------------------ -- Permission to use, copy, modify, and/or distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- The software is provided "as is" and the author disclaims all warranties -- -- with regard to this software including all implied warranties of -- -- merchantability and fitness. In no event shall the author be liable for -- -- any special, direct, indirect, or consequential damages or any damages -- -- whatsoever resulting from loss of use, data or profits, whether in an -- -- action of contract, negligence or other tortious action, arising out of -- -- or in connection with the use or performance of this software. -- ------------------------------------------------------------------------------ with Ada.Directories; with Ada.Environment_Variables; private with XDG.Defaults; package body XDG is ---------------------------------------------------------------------------- package EV renames Ada.Environment_Variables; -- Directory separator is different for Windows and UNIX so use appropriate -- one. Sep: constant Character := XDG.Defaults.Separator; ---------------------------------------------------------------------------- generic Variable: String; Default : String; function Get_Home return String; function Get_Home return String is Home: constant String := EV.Value ("HOME"); begin if EV.Exists (Variable) then declare Value: constant String := EV.Value (Variable); begin if Value (Value'Last) = Sep then return Value; else return Value & Sep; end if; end; else if Home (Home'Last) = Sep then return Home & Default; else return Home & Sep & Default; end if; end if; end Get_Home; function Get_Data_Home is new Get_Home ("XDG_DATA_HOME", XDG.Defaults.Home); function Get_Config_Home is new Get_Home ("XDG_CONFIG_HOME", XDG.Defaults.Config); function Get_Cache_Home is new Get_Home ("XDG_CACHE_HOME", XDG.Defaults.Cache); function Data_Home return String renames Get_Data_Home; function Config_Home return String renames Get_Config_Home; function Cache_Home return String renames Get_Cache_Home; function Runtime_Dir return String is begin if EV.Exists ("XDG_RUNTIME_DIR") then declare Value: constant String := EV.Value ("XDG_RUNTIME_DIR"); begin if Value (Value'Last) = Sep then return Value; else return Value & Sep; end if; end; else return ""; end if; end Runtime_Dir; function Data_Dirs return String is begin if EV.Exists ("XDG_DATA_DIRS") then return EV.Value ("XDG_DATA_DIRS"); else return XDG.Defaults.Data_Dirs; end if; end Data_Dirs; function Config_Dirs return String is begin if EV.Exists ("XDG_CONFIG_DIRS") then return EV.Value ("XDG_CONFIG_DIRS"); else return XDG.Defaults.Config_Dirs; end if; end Config_Dirs; ---------------------------------------------------------------------------- generic with function XDG_Path return String; function XDG_Home (Directory: in String) return String; function XDG_Home (Directory: in String) return String is Path: constant String := XDG_Path; begin if Path (Path'Last) = Sep then if Directory (Directory'Last) = Sep then return Path & Directory; else return Path & Directory & Sep; end if; else if Directory (Directory'Last) = Sep then return Path & Sep & Directory; else return Path & Sep & Directory & Sep; end if; end if; end XDG_Home; function Data_Home_Path is new XDG_Home (Data_Home); function Config_Home_Path is new XDG_Home (Config_Home); function Cache_Home_Path is new XDG_Home (Cache_Home); function Data_Home (Directory: in String) return String renames Data_Home_Path; function Config_Home (Directory: in String) return String renames Config_Home_Path; function Cache_Home (Directory: in String) return String renames Cache_Home_Path; function Runtime_Dir (Directory: in String) return String is Path: constant String := Runtime_Dir; begin if Path'Length = 0 then raise No_Runtime_Dir; elsif Directory (Directory'Last) = Sep then return Path & Directory; else return Path & Directory & Sep; end if; end Runtime_Dir; ---------------------------------------------------------------------------- generic with function XDG_Path (Directory: in String) return String; procedure Create_Home (Directory: in String); procedure Create_Home (Directory: in String) is package AD renames Ada.Directories; Path: constant String := XDG_Path (Directory); begin AD.Create_Path (Path); end Create_Home; procedure Create_Data is new Create_Home (Data_Home); procedure Create_Config is new Create_Home (Config_Home); procedure Create_Cache is new Create_Home (Cache_Home); procedure Create_Runtime is new Create_Home (Runtime_Dir); procedure Create_Data_Home (Directory: in String) renames Create_Data; procedure Create_Config_Home (Directory: in String) renames Create_Config; procedure Create_Cache_Home (Directory: in String) renames Create_Cache; procedure Create_Runtime_Dir (Directory: in String) renames Create_Runtime; ---------------------------------------------------------------------------- generic with function XDG_Path (Directory: in String) return String; procedure Delete_Home (Directory: in String; Empty_Only: in Boolean := True); procedure Delete_Home (Directory: in String; Empty_Only: in Boolean := True) is package AD renames Ada.Directories; Path: constant String := XDG_Path (Directory); begin if Empty_Only then AD.Delete_Directory (Path); else AD.Delete_Tree (Path); end if; end Delete_Home; procedure Delete_Data is new Delete_Home (Data_Home); procedure Delete_Config is new Delete_Home (Config_Home); procedure Delete_Cache is new Delete_Home (Cache_Home); procedure Delete_Runtime is new Delete_Home (Runtime_Dir); procedure Delete_Data_Home ( Directory : in String; Empty_Only: in Boolean := True ) renames Delete_Data; procedure Delete_Config_Home ( Directory : in String; Empty_Only: in Boolean := True ) renames Delete_Config; procedure Delete_Cache_Home ( Directory : in String; Empty_Only: in Boolean := True ) renames Delete_Cache; procedure Delete_Runtime_Dir ( Directory : in String; Empty_Only: in Boolean := True ) renames Delete_Runtime; ---------------------------------------------------------------------------- generic with function XDG_Home (Directory: in String) return String; function Check_Home (Directory: in String) return Boolean; function Check_Home (Directory: in String) return Boolean is package AD renames Ada.Directories; use type AD.File_Kind; Path: constant String := XDG_Home (Directory); begin if AD.Exists (Path) and then AD.Kind (Path) /= AD.Directory then return False; else return True; end if; end Check_Home; function Check_Data_Home is new Check_Home (Data_Home); function Check_Config_Home is new Check_Home (Config_Home); function Check_Cache_Home is new Check_Home (Cache_Home); function Check_Runtime_Dir is new Check_Home (Runtime_Dir); function Is_Valid_Data_Home (Directory: in String) return Boolean renames Check_Data_Home; function Is_Valid_Config_Home (Directory: in String) return Boolean renames Check_Config_Home; function Is_Valid_Cache_Home (Directory: in String) return Boolean renames Check_Cache_Home; function Is_Valid_Runtime_Dir (Directory: in String) return Boolean renames Check_Runtime_Dir; ---------------------------------------------------------------------------- end XDG;
33.390805
79
0.618015
29085300f39d8d85b547a5b62e0d335427376724
6,256
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-conhel.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-conhel.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-conhel.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 E L P E R S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2015-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/>. -- ------------------------------------------------------------------------------ package body Ada.Containers.Helpers is package body Generic_Implementation is use type SAC.Atomic_Unsigned; ------------ -- Adjust -- ------------ procedure Adjust (Control : in out Reference_Control_Type) is begin if Control.T_Counts /= null then Lock (Control.T_Counts.all); end if; end Adjust; ---------- -- Busy -- ---------- procedure Busy (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Increment (T_Counts.Busy); end if; end Busy; -------------- -- Finalize -- -------------- procedure Finalize (Control : in out Reference_Control_Type) is begin if Control.T_Counts /= null then Unlock (Control.T_Counts.all); Control.T_Counts := null; end if; end Finalize; -- No need to protect against double Finalize here, because these types -- are limited. procedure Finalize (Busy : in out With_Busy) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Unbusy (Busy.T_Counts.all); end Finalize; procedure Finalize (Lock : in out With_Lock) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Unlock (Lock.T_Counts.all); end Finalize; ---------------- -- Initialize -- ---------------- procedure Initialize (Busy : in out With_Busy) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Generic_Implementation.Busy (Busy.T_Counts.all); end Initialize; procedure Initialize (Lock : in out With_Lock) is pragma Warnings (Off); pragma Assert (T_Check); -- not called if check suppressed pragma Warnings (On); begin Generic_Implementation.Lock (Lock.T_Counts.all); end Initialize; ---------- -- Lock -- ---------- procedure Lock (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Increment (T_Counts.Lock); SAC.Increment (T_Counts.Busy); end if; end Lock; -------------- -- TC_Check -- -------------- procedure TC_Check (T_Counts : Tamper_Counts) is begin if T_Check and then T_Counts.Busy > 0 then raise Program_Error with "attempt to tamper with cursors"; end if; -- The lock status (which monitors "element tampering") always -- implies that the busy status (which monitors "cursor tampering") -- is set too; this is a representation invariant. Thus if the busy -- bit is not set, then the lock bit must not be set either. pragma Assert (T_Counts.Lock = 0); end TC_Check; -------------- -- TE_Check -- -------------- procedure TE_Check (T_Counts : Tamper_Counts) is begin if T_Check and then T_Counts.Lock > 0 then raise Program_Error with "attempt to tamper with elements"; end if; end TE_Check; ------------ -- Unbusy -- ------------ procedure Unbusy (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Decrement (T_Counts.Busy); end if; end Unbusy; ------------ -- Unlock -- ------------ procedure Unlock (T_Counts : in out Tamper_Counts) is begin if T_Check then SAC.Decrement (T_Counts.Lock); SAC.Decrement (T_Counts.Busy); end if; end Unlock; ----------------- -- Zero_Counts -- ----------------- procedure Zero_Counts (T_Counts : out Tamper_Counts) is begin if T_Check then T_Counts := (others => <>); end if; end Zero_Counts; end Generic_Implementation; end Ada.Containers.Helpers;
33.454545
78
0.477302
5988461ba70f5f227bc010d759a69158075d83fa
1,208
ads
Ada
source/streams/machine-pc-linux-gnu/s-naioso.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
33
2015-04-04T09:19:36.000Z
2021-11-10T05:33:34.000Z
source/streams/machine-pc-linux-gnu/s-naioso.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
8
2017-11-14T13:05:07.000Z
2018-08-09T15:28:49.000Z
source/streams/machine-pc-linux-gnu/s-naioso.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 Linux with C.netdb; with C.sys.socket; package System.Native_IO.Sockets is pragma Preelaborate; type Port_Number is range 0 .. 16#ffff#; subtype Socket_Address is C.sys.socket.struct_sockaddr; procedure Close_Socket (Handle : Handle_Type; Raise_On_Error : Boolean); -- Close_Ordinary without Name -- client subtype End_Point is C.netdb.struct_addrinfo_ptr; function Resolve (Host_Name : String; Service : String) return End_Point; function Resolve (Host_Name : String; Port : Port_Number) return End_Point; procedure Connect (Handle : aliased out Handle_Type; Peer : End_Point); procedure Finalize (Item : End_Point); -- server subtype Listener is Handle_Type; Invalid_Listener : Listener renames Invalid_Handle; procedure Listen (Server : aliased out Listener; Port : Port_Number); procedure Accept_Socket ( Server : Listener; Handle : aliased out Handle_Type; Remote_Address : out Socket_Address); procedure Close_Listener (Server : Listener; Raise_On_Error : Boolean) renames Close_Socket; end System.Native_IO.Sockets;
26.26087
75
0.726821
0b2fff296efc8c23aa2c273ce85f5eb87d105ebb
949
ads
Ada
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/array_char_idx/pck.ads
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/array_char_idx/pck.ads
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/array_char_idx/pck.ads
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
-- Copyright 2012-2017 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- 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 type Char_Table is array (Character range Character'First .. Character'Last) of Natural; Global_Char_Table : Char_Table := (others => 0); procedure Do_Nothing (A : System.Address); end Pck;
39.541667
79
0.731296
29bf9b99ac6fcf31db01a5cb813b15d8f364c620
536
adb
Ada
memsim-master/src/parser-parse_offset.adb
strenkml/EE368
00f15bce9e65badddc613355643b1061fd4a8195
[ "MIT" ]
null
null
null
memsim-master/src/parser-parse_offset.adb
strenkml/EE368
00f15bce9e65badddc613355643b1061fd4a8195
[ "MIT" ]
null
null
null
memsim-master/src/parser-parse_offset.adb
strenkml/EE368
00f15bce9e65badddc613355643b1061fd4a8195
[ "MIT" ]
null
null
null
with Memory.Transform.Offset; use Memory.Transform.Offset; with Parser.Transform_Parser; separate (Parser) procedure Parse_Offset(parser : in out Parser_Type; result : out Memory_Pointer) is package Offset_Parser is new Transform_Parser( T_Type => Memory.Transform.Offset.Offset_Type, T_Pointer => Memory.Transform.Offset.Offset_Pointer, Create_Transform => Memory.Transform.Offset.Create_Offset ); begin Offset_Parser.Parse(parser, result); end Parse_Offset;
26.8
66
0.708955
29b6fb009bfd74eb25315ae304210781a730bea0
12,334
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/table.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/ada/table.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/table.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- T A B L E -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2016, 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 provides an implementation of dynamically resizable one -- dimensional arrays. The idea is to mimic the normal Ada semantics for -- arrays as closely as possible with the one additional capability of -- dynamically modifying the value of the Last attribute. -- Note that this interface should remain synchronized with those in -- GNAT.Table and GNAT.Dynamic_Tables to keep coherency between these -- three related units. with Types; use Types; package Table is pragma Elaborate_Body; generic type Table_Component_Type is private; type Table_Index_Type is range <>; Table_Low_Bound : Table_Index_Type; Table_Initial : Pos; Table_Increment : Nat; Table_Name : String; Release_Threshold : Nat := 0; package Table is -- Table_Component_Type and Table_Index_Type specify the type of the -- array, Table_Low_Bound is the lower bound. Table_Index_Type must be -- an integer type. The effect is roughly to declare: -- Table : array (Table_Index_Type range Table_Low_Bound .. <>) -- of Table_Component_Type; -- Note: since the upper bound can be one less than the lower -- bound for an empty array, the table index type must be able -- to cover this range, e.g. if the lower bound is 1, then the -- Table_Index_Type should be Natural rather than Positive. -- Table_Component_Type may be any Ada type, except that controlled -- types are not supported. Note however that default initialization -- will NOT occur for array components. -- The Table_Initial values controls the allocation of the table when -- it is first allocated, either by default, or by an explicit Init -- call. The value used is Opt.Table_Factor * Table_Initial. -- The Table_Increment value controls the amount of increase, if the -- table has to be increased in size. The value given is a percentage -- value (e.g. 100 = increase table size by 100%, i.e. double it). -- The Table_Name parameter is simply use in debug output messages it -- has no other usage, and is not referenced in non-debugging mode. -- The Last and Set_Last subprograms provide control over the current -- logical allocation. They are quite efficient, so they can be used -- freely (expensive reallocation occurs only at major granularity -- chunks controlled by the allocation parameters). -- Note: We do not make the table components aliased, since this would -- restrict the use of table for discriminated types. If it is necessary -- to take the access of a table element, use Unrestricted_Access. -- WARNING: On HPPA, the virtual addressing approach used in this unit -- is incompatible with the indexing instructions on the HPPA. So when -- using this unit, compile your application with -mdisable-indexing. -- WARNING: If the table is reallocated, then the address of all its -- components will change. So do not capture the address of an element -- and then use the address later after the table may be reallocated. -- One tricky case of this is passing an element of the table to a -- subprogram by reference where the table gets reallocated during -- the execution of the subprogram. The best rule to follow is never -- to pass a table element as a parameter except for the case of IN -- mode parameters with scalar values. type Table_Type is array (Table_Index_Type range <>) of Table_Component_Type; subtype Big_Table_Type is Table_Type (Table_Low_Bound .. Table_Index_Type'Last); -- We work with pointers to a bogus array type that is constrained -- with the maximum possible range bound. This means that the pointer -- is a thin pointer, which is more efficient. Since subscript checks -- in any case must be on the logical, rather than physical bounds, -- safety is not compromised by this approach. type Table_Ptr is access all Big_Table_Type; for Table_Ptr'Storage_Size use 0; -- The table is actually represented as a pointer to allow reallocation Table : aliased Table_Ptr := null; -- The table itself. The lower bound is the value of Low_Bound. -- Logically the upper bound is the current value of Last (although -- the actual size of the allocated table may be larger than this). -- The program may only access and modify Table entries in the range -- First .. Last. Locked : Boolean := False; -- Table expansion is permitted only if this switch is set to False. A -- client may set Locked to True, in which case any attempt to expand -- the table will cause an assertion failure. Note that while a table -- is locked, its address in memory remains fixed and unchanging. This -- feature is used to control table expansion during Gigi processing. -- Gigi assumes that tables other than the Uint and Ureal tables do -- not move during processing, which means that they cannot be expanded. -- The Locked flag is used to enforce this restriction. procedure Init; -- This procedure allocates a new table of size Initial (freeing any -- previously allocated larger table). It is not necessary to call -- Init when a table is first instantiated (since the instantiation does -- the same initialization steps). However, it is harmless to do so, and -- Init is convenient in reestablishing a table for new use. function Last return Table_Index_Type; pragma Inline (Last); -- Returns the current value of the last used entry in the table, which -- can then be used as a subscript for Table. Note that the only way to -- modify Last is to call the Set_Last procedure. Last must always be -- used to determine the logically last entry. procedure Release; -- Storage is allocated in chunks according to the values given in the -- Initial and Increment parameters. If Release_Threshold is 0 or the -- length of the table does not exceed this threshold then a call to -- Release releases all storage that is allocated, but is not logically -- part of the current array value; otherwise the call to Release leaves -- the current array value plus 0.1% of the current table length free -- elements located at the end of the table (this parameter facilitates -- reopening large tables and adding a few elements without allocating a -- chunk of memory). In both cases current array values are not affected -- by this call. procedure Free; -- Free all allocated memory for the table. A call to init is required -- before any use of this table after calling Free. First : constant Table_Index_Type := Table_Low_Bound; -- Export First as synonym for Low_Bound (parallel with use of Last) procedure Set_Last (New_Val : Table_Index_Type); pragma Inline (Set_Last); -- This procedure sets Last to the indicated value. If necessary the -- table is reallocated to accommodate the new value (i.e. on return -- the allocated table has an upper bound of at least Last). If Set_Last -- reduces the size of the table, then logically entries are removed -- from the table. If Set_Last increases the size of the table, then -- new entries are logically added to the table. procedure Increment_Last; pragma Inline (Increment_Last); -- Adds 1 to Last (same as Set_Last (Last + 1) procedure Decrement_Last; pragma Inline (Decrement_Last); -- Subtracts 1 from Last (same as Set_Last (Last - 1) procedure Append (New_Val : Table_Component_Type); pragma Inline (Append); -- Equivalent to: -- x.Increment_Last; -- x.Table (x.Last) := New_Val; -- i.e. the table size is increased by one, and the given new item -- stored in the newly created table element. procedure Append_All (New_Vals : Table_Type); -- Appends all components of New_Vals procedure Set_Item (Index : Table_Index_Type; Item : Table_Component_Type); pragma Inline (Set_Item); -- Put Item in the table at position Index. The table is expanded if -- current table length is less than Index and in that case Last is set -- to Index. Item will replace any value already present in the table -- at this position. type Saved_Table is private; -- Type used for Save/Restore subprograms function Save return Saved_Table; -- Resets table to empty, but saves old contents of table in returned -- value, for possible later restoration by a call to Restore. procedure Restore (T : Saved_Table); -- Given a Saved_Table value returned by a prior call to Save, restores -- the table to the state it was in at the time of the Save call. procedure Tree_Write; -- Writes out contents of table using Tree_IO procedure Tree_Read; -- Initializes table by reading contents previously written with the -- Tree_Write call (also using Tree_IO). private Last_Val : Int; -- Current value of Last. Note that we declare this in the private part -- because we don't want the client to modify Last except through one of -- the official interfaces (since a modification to Last may require a -- reallocation of the table). Max : Int; -- Subscript of the maximum entry in the currently allocated table type Saved_Table is record Last_Val : Int; Max : Int; Table : Table_Ptr; end record; end Table; end Table;
50.138211
79
0.620075
1dec349671d949c3334c31a81d12a54cfe6ac1c1
1,458
ada
Ada
Task/Guess-the-number-With-feedback/Ada/guess-the-number-with-feedback.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Guess-the-number-With-feedback/Ada/guess-the-number-with-feedback.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
null
null
null
Task/Guess-the-number-With-feedback/Ada/guess-the-number-with-feedback.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
with Ada.Numerics.Discrete_Random; with Ada.Text_IO; procedure Guess_Number_Feedback is procedure Guess_Number (Lower_Limit : Integer; Upper_Limit : Integer) is subtype Number is Integer range Lower_Limit .. Upper_Limit; package Number_IO is new Ada.Text_IO.Integer_IO (Number); package Number_RNG is new Ada.Numerics.Discrete_Random (Number); Generator : Number_RNG.Generator; My_Number : Number; Your_Guess : Number; begin Number_RNG.Reset (Generator); My_Number := Number_RNG.Random (Generator); Ada.Text_IO.Put_Line ("Guess my number!"); loop Ada.Text_IO.Put ("Your guess: "); Number_IO.Get (Your_Guess); exit when Your_Guess = My_Number; if Your_Guess > My_Number then Ada.Text_IO.Put_Line ("Wrong, too high!"); else Ada.Text_IO.Put_Line ("Wrong, too low!"); end if; end loop; Ada.Text_IO.Put_Line ("Well guessed!"); end Guess_Number; package Int_IO is new Ada.Text_IO.Integer_IO (Integer); Lower_Limit : Integer; Upper_Limit : Integer; begin loop Ada.Text_IO.Put ("Lower Limit: "); Int_IO.Get (Lower_Limit); Ada.Text_IO.Put ("Upper Limit: "); Int_IO.Get (Upper_Limit); exit when Lower_Limit < Upper_Limit; Ada.Text_IO.Put_Line ("Lower limit must be lower!"); end loop; Guess_Number (Lower_Limit, Upper_Limit); end Guess_Number_Feedback;
35.560976
75
0.663237
fb2eee97f6960f593776f70ab1274c1a7a57851d
8,068
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c94008c.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/c94008c.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c9/c94008c.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- C94008C.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 SELECT WITH TERMINATE ALTERNATIVE WORKS CORRECTLY WITH -- NESTED TASKS. -- THIS TEST CONTAINS RACE CONDITIONS AND USES A GENERIC INSTANCE THAT -- CONTAINS TASKS. -- JEAN-PIERRE ROSEN 24 FEBRUARY 1984 -- JRK 4/7/86 -- JBG 8/29/86 ELIMINATED SHARED VARIABLES; ADDED GENERIC UNIT -- PWN 11/30/94 REMOVED PRAGMA PRIORITY INSTANCES FOR ADA 9X. with Impdef; WITH REPORT; USE REPORT; WITH SYSTEM; USE SYSTEM; PROCEDURE C94008C IS -- GENERIC UNIT FOR DOING UPDATES OF SHARED VARIABLES GENERIC TYPE HOLDER_TYPE IS PRIVATE; TYPE VALUE_TYPE IS PRIVATE; INITIAL_VALUE : HOLDER_TYPE; WITH PROCEDURE SET (HOLDER : OUT HOLDER_TYPE; VALUE : IN HOLDER_TYPE) IS <>; WITH PROCEDURE UPDATE (HOLDER : IN OUT HOLDER_TYPE; VALUE : IN VALUE_TYPE) IS <>; PACKAGE SHARED IS PROCEDURE SET (VALUE : IN HOLDER_TYPE); PROCEDURE UPDATE (VALUE : IN VALUE_TYPE); FUNCTION GET RETURN HOLDER_TYPE; END SHARED; PACKAGE BODY SHARED IS TASK SHARE IS ENTRY SET (VALUE : IN HOLDER_TYPE); ENTRY UPDATE (VALUE : IN VALUE_TYPE); ENTRY READ (VALUE : OUT HOLDER_TYPE); END SHARE; TASK BODY SHARE IS VARIABLE : HOLDER_TYPE; BEGIN LOOP SELECT ACCEPT SET (VALUE : IN HOLDER_TYPE) DO SHARED.SET (VARIABLE, VALUE); END SET; OR ACCEPT UPDATE (VALUE : IN VALUE_TYPE) DO SHARED.UPDATE (VARIABLE, VALUE); END UPDATE; OR ACCEPT READ (VALUE : OUT HOLDER_TYPE) DO VALUE := VARIABLE; END READ; OR TERMINATE; END SELECT; END LOOP; END SHARE; PROCEDURE SET (VALUE : IN HOLDER_TYPE) IS BEGIN SHARE.SET (VALUE); END SET; PROCEDURE UPDATE (VALUE : IN VALUE_TYPE) IS BEGIN SHARE.UPDATE (VALUE); END UPDATE; FUNCTION GET RETURN HOLDER_TYPE IS VALUE : HOLDER_TYPE; BEGIN SHARE.READ (VALUE); RETURN VALUE; END GET; BEGIN SHARE.SET (INITIAL_VALUE); -- SET INITIAL VALUE END SHARED; PACKAGE EVENTS IS TYPE EVENT_TYPE IS RECORD TRACE : STRING (1..4) := "...."; LENGTH : NATURAL := 0; END RECORD; PROCEDURE UPDATE (VAR : IN OUT EVENT_TYPE; VAL : CHARACTER); PROCEDURE SET (VAR : OUT EVENT_TYPE; VAL : EVENT_TYPE); END EVENTS; PACKAGE COUNTER IS PROCEDURE UPDATE (VAR : IN OUT INTEGER; VAL : INTEGER); PROCEDURE SET (VAR : OUT INTEGER; VAL : INTEGER); END COUNTER; PACKAGE BODY COUNTER IS PROCEDURE UPDATE (VAR : IN OUT INTEGER; VAL : INTEGER) IS BEGIN VAR := VAR + VAL; END UPDATE; PROCEDURE SET (VAR : OUT INTEGER; VAL : INTEGER) IS BEGIN VAR := VAL; END SET; END COUNTER; PACKAGE BODY EVENTS IS PROCEDURE UPDATE (VAR : IN OUT EVENT_TYPE; VAL : CHARACTER) IS BEGIN VAR.LENGTH := VAR.LENGTH + 1; VAR.TRACE(VAR.LENGTH) := VAL; END UPDATE; PROCEDURE SET (VAR : OUT EVENT_TYPE; VAL : EVENT_TYPE) IS BEGIN VAR := VAL; END SET; END EVENTS; USE EVENTS, COUNTER; PACKAGE TRACE IS NEW SHARED (EVENT_TYPE, CHARACTER, ("....", 0)); PACKAGE TERMINATE_COUNT IS NEW SHARED (INTEGER, INTEGER, 0); FUNCTION ENTER_TERMINATE RETURN BOOLEAN IS BEGIN TERMINATE_COUNT.UPDATE (1); RETURN TRUE; END ENTER_TERMINATE; BEGIN -- C94008C TEST ("C94008C", "CHECK CORRECT OPERATION OF SELECT WITH " & "TERMINATE ALTERNATIVE"); DECLARE PROCEDURE EVENT (VAR : CHARACTER) RENAMES TRACE.UPDATE; TASK T1 IS ENTRY E1; END T1; TASK BODY T1 IS TASK T2 IS ENTRY E2; END T2; TASK BODY T2 IS TASK T3 IS ENTRY E3; END T3; TASK BODY T3 IS BEGIN SELECT ACCEPT E3; OR WHEN ENTER_TERMINATE => TERMINATE; END SELECT; EVENT ('D'); END T3; BEGIN -- T2 SELECT ACCEPT E2; OR WHEN ENTER_TERMINATE => TERMINATE; END SELECT; DELAY 10.0 * Impdef.One_Second; IF TERMINATE_COUNT.GET /= 1 THEN DELAY 20.0 * Impdef.One_Long_Second; END IF; IF TERMINATE_COUNT.GET /= 1 THEN FAILED ("30 SECOND DELAY NOT ENOUGH - 1 "); END IF; EVENT ('C'); T1.E1; T3.E3; END T2; BEGIN -- T1; SELECT ACCEPT E1; OR WHEN ENTER_TERMINATE => TERMINATE; END SELECT; EVENT ('B'); TERMINATE_COUNT.SET (0); T2.E2; SELECT ACCEPT E1; OR WHEN ENTER_TERMINATE => TERMINATE; END SELECT; SELECT ACCEPT E1; OR TERMINATE; -- ONLY THIS ONE EVER CHOSEN. END SELECT; FAILED ("TERMINATE NOT SELECTED IN T1"); END T1; BEGIN DELAY 10.0 * Impdef.One_Second; -- WAIT FOR T1, T2, AND T3 TO GET TO SELECT STMTS. IF TERMINATE_COUNT.GET /= 3 THEN DELAY 20.0 * Impdef.One_Long_Second; END IF; IF TERMINATE_COUNT.GET /= 3 THEN FAILED ("30 SECOND DELAY NOT ENOUGH - 2"); END IF; EVENT ('A'); T1.E1; EXCEPTION WHEN OTHERS => FAILED ("EXCEPTION IN MAIN BLOCK"); END; IF TRACE.GET.TRACE /= "ABCD" THEN FAILED ("INCORRECT ORDER OF EVENTS: " & TRACE.GET.TRACE); END IF; RESULT; END C94008C;
30.330827
92
0.501735
06895d7e37b20684e9cb33d3f192f54129d9c09c
8,788
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/exp_sel.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/exp_sel.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/exp_sel.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ S E L -- -- -- -- 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. 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 COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Einfo; use Einfo; with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Rtsfind; use Rtsfind; with Sinfo; use Sinfo; with Snames; use Snames; with Stand; use Stand; with Tbuild; use Tbuild; package body Exp_Sel is ----------------------- -- Build_Abort_Block -- ----------------------- function Build_Abort_Block (Loc : Source_Ptr; Abr_Blk_Ent : Entity_Id; Cln_Blk_Ent : Entity_Id; Blk : Node_Id) return Node_Id is begin return Make_Block_Statement (Loc, Identifier => New_Occurrence_Of (Abr_Blk_Ent, Loc), Declarations => No_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( Make_Implicit_Label_Declaration (Loc, Defining_Identifier => Cln_Blk_Ent, Label_Construct => Blk), Blk), Exception_Handlers => New_List (Build_Abort_Block_Handler (Loc)))); end Build_Abort_Block; ------------------------------- -- Build_Abort_Block_Handler -- ------------------------------- function Build_Abort_Block_Handler (Loc : Source_Ptr) return Node_Id is Stmt : Node_Id; begin -- With ZCX exceptions, aborts are not defered in handlers. With SJLJ, -- they are deferred at the beginning of Abort_Signal handlers. if ZCX_Exceptions then Stmt := Make_Null_Statement (Loc); else Stmt := Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE_Abort_Undefer), Loc), Parameter_Associations => No_List); end if; return Make_Implicit_Exception_Handler (Loc, Exception_Choices => New_List (New_Occurrence_Of (Stand.Abort_Signal, Loc)), Statements => New_List (Stmt)); end Build_Abort_Block_Handler; ------------- -- Build_B -- ------------- function Build_B (Loc : Source_Ptr; Decls : List_Id) return Entity_Id is B : constant Entity_Id := Make_Temporary (Loc, 'B'); begin Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => B, Object_Definition => New_Occurrence_Of (Standard_Boolean, Loc), Expression => New_Occurrence_Of (Standard_False, Loc))); return B; end Build_B; ------------- -- Build_C -- ------------- function Build_C (Loc : Source_Ptr; Decls : List_Id) return Entity_Id is C : constant Entity_Id := Make_Temporary (Loc, 'C'); begin Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => C, Object_Definition => New_Occurrence_Of (RTE (RE_Prim_Op_Kind), Loc))); return C; end Build_C; ------------------------- -- Build_Cleanup_Block -- ------------------------- function Build_Cleanup_Block (Loc : Source_Ptr; Blk_Ent : Entity_Id; Stmts : List_Id; Clean_Ent : Entity_Id) return Node_Id is Cleanup_Block : constant Node_Id := Make_Block_Statement (Loc, Identifier => New_Occurrence_Of (Blk_Ent, Loc), Declarations => No_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => Stmts), Is_Asynchronous_Call_Block => True); begin Set_Entry_Cancel_Parameter (Blk_Ent, Clean_Ent); return Cleanup_Block; end Build_Cleanup_Block; ------------- -- Build_K -- ------------- function Build_K (Loc : Source_Ptr; Decls : List_Id; Obj : Entity_Id) return Entity_Id is K : constant Entity_Id := Make_Temporary (Loc, 'K'); Tag_Node : Node_Id; begin if Tagged_Type_Expansion then Tag_Node := Unchecked_Convert_To (RTE (RE_Tag), Obj); else Tag_Node := Make_Attribute_Reference (Loc, Prefix => Obj, Attribute_Name => Name_Tag); end if; Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => K, Object_Definition => New_Occurrence_Of (RTE (RE_Tagged_Kind), Loc), Expression => Make_Function_Call (Loc, Name => New_Occurrence_Of (RTE (RE_Get_Tagged_Kind), Loc), Parameter_Associations => New_List (Tag_Node)))); return K; end Build_K; ------------- -- Build_S -- ------------- function Build_S (Loc : Source_Ptr; Decls : List_Id) return Entity_Id is S : constant Entity_Id := Make_Temporary (Loc, 'S'); begin Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => S, Object_Definition => New_Occurrence_Of (Standard_Integer, Loc))); return S; end Build_S; ------------------------ -- Build_S_Assignment -- ------------------------ function Build_S_Assignment (Loc : Source_Ptr; S : Entity_Id; Obj : Entity_Id; Call_Ent : Entity_Id) return Node_Id is Typ : constant Entity_Id := Etype (Obj); begin if Tagged_Type_Expansion then return Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (S, Loc), Expression => Make_Function_Call (Loc, Name => New_Occurrence_Of (RTE (RE_Get_Offset_Index), Loc), Parameter_Associations => New_List ( Unchecked_Convert_To (RTE (RE_Tag), Obj), Make_Integer_Literal (Loc, DT_Position (Call_Ent))))); -- VM targets else return Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (S, Loc), Expression => Make_Function_Call (Loc, Name => New_Occurrence_Of (RTE (RE_Get_Offset_Index), Loc), Parameter_Associations => New_List ( -- Obj_Typ Make_Attribute_Reference (Loc, Prefix => Obj, Attribute_Name => Name_Tag), -- Iface_Typ Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Typ, Loc), Attribute_Name => Name_Tag), -- Position Make_Integer_Literal (Loc, DT_Position (Call_Ent))))); end if; end Build_S_Assignment; end Exp_Sel;
33.287879
78
0.497269
2915db0428be9df191d57b285da3eac660a6d9d9
3,454
adb
Ada
bb-runtimes/tests/bsp_verification/src/basic_tasking.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/tests/bsp_verification/src/basic_tasking.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/tests/bsp_verification/src/basic_tasking.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT BSP Test -- -- -- -- Copyright (C) 2018, 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. -- -- -- ------------------------------------------------------------------------------ with Ada.Synchronous_Task_Control; use Ada.Synchronous_Task_Control; with Report; package body Basic_Tasking is Signal : Suspension_Object; task Consumer; protected Persistent_Signal is entry Wait; procedure Send; private Signal_Arrived : Boolean := False; end Persistent_Signal; -------------- -- Consumer -- -------------- task body Consumer is begin loop Suspend_Until_True (Signal); Persistent_Signal.Send; end loop; end Consumer; ----------------------- -- Persistent_Signal -- ----------------------- protected body Persistent_Signal is procedure Send is begin Signal_Arrived := True; end Send; entry Wait when Signal_Arrived is begin Signal_Arrived := False; end Wait; end Persistent_Signal; ---------- -- Test -- ---------- procedure Test is begin Report.Test ("basic_tasking", "Check the functionality of various constructs"); Set_True (Signal); Persistent_Signal.Wait; Report.Passed ("Suspension object successfully signalled"); Report.Passed ("Protected procedure successfully called"); Report.Passed ("Protected action completed successfully"); Report.Passed ("Protected entry successfully awaited and returned"); end Test; end Basic_Tasking;
37.543478
78
0.482918
29640cef9c4e310fee84a69a8c7edbc8f09e8010
13,408
adb
Ada
src/sqlite/ado-connections-sqlite.adb
My-Colaborations/ada-ado
cebf1f9b38c0c259c44935e8bca05a5bff12aace
[ "Apache-2.0" ]
null
null
null
src/sqlite/ado-connections-sqlite.adb
My-Colaborations/ada-ado
cebf1f9b38c0c259c44935e8bca05a5bff12aace
[ "Apache-2.0" ]
null
null
null
src/sqlite/ado-connections-sqlite.adb
My-Colaborations/ada-ado
cebf1f9b38c0c259c44935e8bca05a5bff12aace
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- ADO Sqlite Database -- SQLite Database connections -- Copyright (C) 2009, 2010, 2011, 2012, 2015, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Interfaces.C.Strings; with Util.Log; with Util.Log.Loggers; with Util.Processes.Tools; with Util.Properties; with ADO.Sessions; with ADO.Statements.Sqlite; with ADO.Schemas.Sqlite; package body ADO.Connections.Sqlite is use ADO.Statements.Sqlite; use Interfaces.C; pragma Linker_Options ("-lsqlite3"); Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ADO.Databases.Sqlite"); Driver_Name : aliased constant String := "sqlite"; Driver : aliased Sqlite_Driver; -- ------------------------------ -- Get the database driver which manages this connection. -- ------------------------------ overriding function Get_Driver (Database : in Database_Connection) return Driver_Access is pragma Unreferenced (Database); begin return Driver'Access; end Get_Driver; overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Query_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; overriding function Create_Statement (Database : in Database_Connection; Query : in String) return Query_Statement_Access is begin return Create_Statement (Database => Database.Server, Query => Query); end Create_Statement; -- ------------------------------ -- Create a delete statement. -- ------------------------------ overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Delete_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; -- ------------------------------ -- Create an insert statement. -- ------------------------------ overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Insert_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; -- ------------------------------ -- Create an update statement. -- ------------------------------ overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Update_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; -- ------------------------------ -- Start a transaction. -- ------------------------------ procedure Begin_Transaction (Database : in out Database_Connection) is begin if Database.Server = null then raise ADO.Sessions.Session_Error with "Database connection is closed"; end if; end Begin_Transaction; -- ------------------------------ -- Commit the current transaction. -- ------------------------------ procedure Commit (Database : in out Database_Connection) is begin if Database.Server = null then raise ADO.Sessions.Session_Error with "Database connection is closed"; end if; end Commit; -- ------------------------------ -- Rollback the current transaction. -- ------------------------------ procedure Rollback (Database : in out Database_Connection) is begin if Database.Server = null then raise ADO.Sessions.Session_Error with "Database connection is closed"; end if; end Rollback; -- ------------------------------ -- Closes the database connection -- ------------------------------ overriding procedure Close (Database : in out Database_Connection) is begin Log.Info ("Close connection {0}", Database.Name); Database.Server := null; end Close; -- ------------------------------ -- Load the database schema definition for the current database. -- ------------------------------ overriding procedure Load_Schema (Database : in Database_Connection; Schema : out ADO.Schemas.Schema_Definition) is begin ADO.Schemas.Sqlite.Load_Schema (Database, Schema); end Load_Schema; protected body Sqlite_Connections is procedure Open (Config : in Configuration'Class; Result : in out Ref.Ref'Class) is use Strings; URI : constant String := Config.Get_URI; Database : Database_Connection_Access; Pos : Database_List.Cursor := Database_List.First (List); DB : SQLite_Database; begin -- Look first in the database list. while Database_List.Has_Element (Pos) loop DB := Database_List.Element (Pos); if DB.URI = URI then Database := new Database_Connection; Database.URI := DB.URI; Database.Name := DB.Name; Database.Server := DB.Server; Result := Ref.Create (Database.all'Access); return; end if; Database_List.Next (Pos); end loop; -- Now we can open a new database connection. declare Name : constant String := Config.Get_Database; Filename : Strings.chars_ptr; Status : int; Handle : aliased access Sqlite3; Flags : int := Sqlite3_H.SQLITE_OPEN_FULLMUTEX + Sqlite3_H.SQLITE_OPEN_READWRITE; begin if Config.Is_On (CREATE_NAME) then Flags := Flags + Sqlite3_H.SQLITE_OPEN_CREATE; end if; Filename := Strings.New_String (Name); Status := Sqlite3_H.sqlite3_open_v2 (Filename, Handle'Address, Flags, Strings.Null_Ptr); Strings.Free (Filename); if Status /= Sqlite3_H.SQLITE_OK then declare Error : constant Strings.chars_ptr := Sqlite3_H.sqlite3_errstr (Status); Msg : constant String := Strings.Value (Error); begin Log.Error ("Cannot open SQLite database: {0}", Msg); raise ADO.Configs.Connection_Error with "Cannot open database: " & Msg; end; end if; Database := new Database_Connection; declare procedure Configure (Name : in String; Item : in Util.Properties.Value); function Escape (Value : in Util.Properties.Value) return String; function Escape (Value : in Util.Properties.Value) return String is S : constant String := Util.Properties.To_String (Value); begin if S'Length > 0 and then S (S'First) >= '0' and then S (S'First) <= '9' then return S; elsif S'Length > 0 and then S (S'First) = ''' then return S; else return "'" & S & "'"; end if; end Escape; procedure Configure (Name : in String; Item : in Util.Properties.Value) is SQL : constant String := "PRAGMA " & Name & "=" & Escape (Item); begin if Name /= CREATE_NAME then if Util.Strings.Index (Name, '.') = 0 then Log.Info ("Configure database with {0}", SQL); ADO.Statements.Sqlite.Execute (Database.Server, SQL); end if; end if; exception when SQL_Error => null; end Configure; begin Database.Server := Handle; Database.Name := To_Unbounded_String (Config.Get_Database); Database.URI := To_Unbounded_String (URI); Result := Ref.Create (Database.all'Access); DB.Server := Handle; DB.Name := Database.Name; DB.URI := Database.URI; Database_List.Prepend (Container => List, New_Item => DB); -- Configure the connection by setting up the SQLite 'pragma X=Y' SQL commands. -- Typical configuration includes: -- synchronous=OFF -- temp_store=MEMORY -- encoding='UTF-8' Config.Iterate (Process => Configure'Access); end; end; end Open; procedure Clear is DB : SQLite_Database; Result : int; begin while not Database_List.Is_Empty (List) loop DB := Database_List.First_Element (List); Database_List.Delete_First (List); if DB.Server /= null then Result := Sqlite3_H.sqlite3_close_v2 (DB.Server); if Result /= Sqlite3_H.SQLITE_OK then declare Error : constant Strings.chars_ptr := Sqlite3_H.sqlite3_errstr (Result); Msg : constant String := Strings.Value (Error); begin Log.Error ("Cannot close database {0}: {1}", To_String (DB.Name), Msg); end; end if; end if; end loop; end Clear; end Sqlite_Connections; -- ------------------------------ -- Initialize the database connection manager. -- ------------------------------ procedure Create_Connection (D : in out Sqlite_Driver; Config : in Configuration'Class; Result : in out Ref.Ref'Class) is begin D.Map.Open (Config, Result); end Create_Connection; -- ------------------------------ -- Create the database and initialize it with the schema SQL file. -- The `Admin` parameter describes the database connection with administrator access. -- The `Config` parameter describes the target database connection. -- ------------------------------ overriding procedure Create_Database (D : in out Sqlite_Driver; Admin : in Configs.Configuration'Class; Config : in Configs.Configuration'Class; Schema_Path : in String; Messages : out Util.Strings.Vectors.Vector) is pragma Unreferenced (D, Admin); Status : Integer; Database_Path : constant String := Config.Get_Database; Command : constant String := "sqlite3 --batch --init " & Schema_Path & " " & Database_Path; begin Log.Info ("Creating SQLite database {0}", Database_Path); Util.Processes.Tools.Execute (Command, Messages, Status); if Status = 0 then Log.Info ("Database schema created successfully."); elsif Status = 255 then Messages.Append ("Command not found: " & Command); Log.Error ("Command not found: {0}", Command); else Messages.Append ("Command " & Command & " failed with exit code " & Util.Strings.Image (Status)); Log.Error ("Command {0} failed with exit code {1}", Command, Util.Strings.Image (Status)); end if; end Create_Database; -- ------------------------------ -- Initialize the SQLite driver. -- ------------------------------ procedure Initialize is use type Util.Strings.Name_Access; begin Log.Debug ("Initializing sqlite driver"); if Driver.Name = null then Driver.Name := Driver_Name'Access; Register (Driver'Access); end if; end Initialize; -- ------------------------------ -- Deletes the SQLite driver. -- ------------------------------ overriding procedure Finalize (D : in out Sqlite_Driver) is begin Log.Debug ("Deleting the sqlite driver"); D.Map.Clear; end Finalize; end ADO.Connections.Sqlite;
38.19943
95
0.531548
599852f2880f881f05d598826d7f39a4dd84366d
1,090
ada
Ada
Task/Add-a-variable-to-a-class-instance-at-runtime/Ada/add-a-variable-to-a-class-instance-at-runtime.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Add-a-variable-to-a-class-instance-at-runtime/Ada/add-a-variable-to-a-class-instance-at-runtime.ada
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
null
null
null
Task/Add-a-variable-to-a-class-instance-at-runtime/Ada/add-a-variable-to-a-class-instance-at-runtime.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 Dynamic is package Abstract_Class is type Class is limited interface; function Boo (X : Class) return String is abstract; end Abstract_Class; use Abstract_Class; package Base_Class is type Base is new Class with null record; overriding function Boo (X : Base) return String; end Base_Class; package body Base_Class is function Boo (X : Base) return String is begin return "I am Class"; end Boo; end Base_Class; use Base_Class; E : aliased Base; -- An instance of Base begin -- Gone run-time declare type Monkey_Patch (Root : access Base) is new Class with record Foo : Integer := 1; end record; overriding function Boo (X : Monkey_Patch) return String; function Boo (X : Monkey_Patch) return String is begin -- Delegation to the base return X.Root.Boo; end Boo; EE : Monkey_Patch (E'Access); -- Extend E begin Put_Line (EE.Boo & " with" & Integer'Image (EE.Foo)); end; end Dynamic;
26.585366
69
0.644954
1d53f8d567820ccb1445d4a01d2d832b25768916
40,507
adb
Ada
sources/md/markdown-inline_parsers.adb
reznikmm/markdown
af47bd45427f1c016c0a2a11e86fa2d1b1c82315
[ "MIT" ]
null
null
null
sources/md/markdown-inline_parsers.adb
reznikmm/markdown
af47bd45427f1c016c0a2a11e86fa2d1b1c82315
[ "MIT" ]
null
null
null
sources/md/markdown-inline_parsers.adb
reznikmm/markdown
af47bd45427f1c016c0a2a11e86fa2d1b1c82315
[ "MIT" ]
null
null
null
-- SPDX-FileCopyrightText: 2020 Max Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- with Ada.Containers.Generic_Anonymous_Array_Sort; with Ada.Iterator_Interfaces; with League.Characters; with League.Regexps; with Markdown.Common_Patterns; with Markdown.Inline_Parsers.Autolinks; with Markdown.Inline_Parsers.Code_Spans; with Markdown.Inline_Parsers.Raw_HTML; package body Markdown.Inline_Parsers is function "+" (Text : Wide_Wide_String) return League.Regexps.Regexp_Pattern is (League.Regexps.Compile (League.Strings.To_Universal_String (Text))); Link_Title : Wide_Wide_String renames Markdown.Common_Patterns.Link_Title; -- Groups: 4 Link_Start_Pattern : constant League.Regexps.Regexp_Pattern := +("^\([\ \t\n\v\f\r\>]*"); Title_Pattern : constant League.Regexps.Regexp_Pattern := +("^[\ \t\n\v\f\r\>]*(" & Link_Title & ")?([\ \t\n\v\f\r\>]*\))?"); -- Groups: 1 2,3,4,5 6 Title_Close_Group : constant array (Positive range 1 .. 3) of Positive := (2, 3, 5); -- Close title group numbers package body Plain_Texts is function First (Self : Plain_Text'Class) return Position is (Self.From); procedure Initialize (Self : in out Plain_Text'Class; Text : League.String_Vectors.Universal_String_Vector; From : Position := (1, 1); To : Position := (Positive'Last, Positive'Last)) is begin Self.Data := Text; Self.From := From; if To.Line > Text.Length then Self.To := (Text.Length, Text (Text.Length).Length); else Self.To := To; end if; end Initialize; procedure Initialize (Self : in out Plain_Text'Class; Text : Plain_Text'Class; From : Position; To : Position := (Positive'Last, Positive'Last)) is begin Self.Data := Text.Data; Self.From := From; if To > Text.To then Self.To := Text.To; elsif To.Column = 1 then Self.To := (To.Line - 1, Text.Data (To.Line - 1).Length); else Self.To := (To.Line, To.Column - 1); end if; end Initialize; function Join (Self : Plain_Text'Class; From : Position; Char : Wide_Wide_Character) return League.Strings.Universal_String is Nested : Plain_Text; List : League.String_Vectors.Universal_String_Vector := Self.Data; begin Nested.Initialize (Self, From); if From.Line > 1 or Self.To.Line < Self.Data.Length then List := List.Slice (From.Line, Self.To.Line); end if; if From.Column > 1 then List.Replace (1, Nested.Line (From.Line)); end if; if Self.To.Column < List (List.Length).Length then List.Replace (List.Length, List (List.Length).Head_To (Self.To.Column)); end if; return List.Join (Char); end Join; function Last (Self : Plain_Text'Class) return Position is (Self.To); function Line (Self : Plain_Text'Class; Index : Positive) return League.Strings.Universal_String is use type League.Strings.Universal_String; function Space (Count : Positive) return League.Strings.Universal_String; ----------- -- Space -- ----------- function Space (Count : Positive) return League.Strings.Universal_String is Blank : constant Wide_Wide_String (1 .. 80) := (others => ' '); begin if Count <= Blank'Last then return League.Strings.To_Universal_String (Blank (1 .. Count)); else return Blank & Space (Count - Blank'Last); end if; end Space; Result : League.Strings.Universal_String := Self.Data (Index); begin if Index = Self.From.Line and Self.From.Column > 1 then Result := Space (Self.From.Column - 1) & Result.Tail_From (Self.From.Column); end if; if Index = Self.To.Line and Self.To.Column < Result.Length then Result := Result.Head_To (Self.To.Column); end if; return Result; end Line; ---------- -- Line -- ---------- function Line (Self : Plain_Text'Class; From : Position) return League.Strings.Universal_String is begin return Self.Data (From.Line).Tail_From (From.Column); end Line; function Lines (Self : Plain_Text'Class) return Positive is begin return Self.To.Line - Self.From.Line + 1; end Lines; procedure Step (Self : Plain_Text'Class; Value : Natural; Cursor : in out Position) is Line : League.Strings.Universal_String renames Self.Data (Cursor.Line); begin if Cursor.Column + Value > Line.Length then Cursor := (Cursor.Line + 1, 1); else Cursor.Column := Cursor.Column + Value; end if; end Step; end Plain_Texts; type Delimiter_Kind is ('*', '_', '[', ']'); subtype Emphasis_Kind is Delimiter_Kind range '*' .. '_'; type Delimiter (Kind : Delimiter_Kind := '*') is record From : Position; Is_Deleted : Boolean := False; case Kind is when '*' | '_' => Count : Positive; Is_Active : Boolean; Can_Open : Boolean; Can_Close : Boolean; when '[' => null; when ']' => To : Position; end case; end record; type Markup_Kind is (Emphasis, Link); type Markup (Kind : Markup_Kind := Emphasis) is record From : Position; Length : Positive; case Kind is when Link => URL : League.Strings.Universal_String; Title : League.String_Vectors.Universal_String_Vector; when Emphasis => null; end case; end record; type Markup_Index is new Positive; package Markup_Vectors is new Ada.Containers.Vectors (Markup_Index, Markup); procedure Find_Markup (Register : Markdown.Link_Registers.Link_Register'Class; Text : Plain_Texts.Plain_Text; Markup : in out Markup_Vectors.Vector); type Scanner_State is record Is_White_Space : Boolean := True; Is_Punctuation : Boolean := False; end record; procedure Read_Delimiter (Text : Plain_Texts.Plain_Text; Cursor : in out Position; State : in out Scanner_State; Item : out Delimiter; Is_Delimiter : out Boolean); procedure Read_Character (Text : Plain_Texts.Plain_Text; Cursor : in out Position; Result : in out League.Strings.Universal_String); function Get_State (Text : Plain_Texts.Plain_Text; Cursor : Position) return Scanner_State; function To_Annotation (Item : Markup; Pos : Positive) return Annotation; function To_Annotated_Text (Text : Plain_Texts.Plain_Text; Markup : Markup_Vectors.Vector) return Annotated_Text; function Count_Character (Line : League.Strings.Universal_String; From : Positive) return Positive; type Inline_Kind is new Positive; -- Top priority inline kinds. type Inline_Parser_State is array (Inline_Kind range <>) of Optional_Inline_State; Known_Inline : constant array (Inline_Kind range 1 .. 3) of access procedure (Text : Plain_Texts.Plain_Text; Cursor : Position; State : in out Optional_Inline_State) := (Markdown.Inline_Parsers.Code_Spans.Find'Access, Markdown.Inline_Parsers.Autolinks.Find'Access, Markdown.Inline_Parsers.Raw_HTML.Find'Access); procedure Parse_Inline (Text : Plain_Texts.Plain_Text; State : in out Inline_Parser_State; Result : out Optional_Inline_State); procedure Find_All_Inlines (Text : Plain_Texts.Plain_Text; Cursor : Position; State : out Inline_Parser_State); procedure Append (Self : in out Annotated_Text; Value : Annotated_Text); procedure Append (Self : in out Annotated_Text; Value : Annotated_Text) is Offset : constant Natural := Self.Plain_Text.Length; begin Self.Plain_Text.Append (Value.Plain_Text); for X of Value.Annotation loop declare Shifted : Annotation := X; begin Shifted.From := Shifted.From + Offset; Shifted.To := Shifted.To + Offset; Self.Annotation.Append (Shifted); end; end loop; end Append; --------------------- -- Count_Character -- --------------------- function Count_Character (Line : League.Strings.Universal_String; From : Positive) return Positive is use type League.Characters.Universal_Character; Char : constant League.Characters.Universal_Character := Line (From); Result : Positive := 1; begin for J in From + 1 .. Line.Length loop exit when Line (J) /= Char; Result := Result + 1; end loop; return Result; end Count_Character; --------------------- -- Delimiter_Lists -- --------------------- package Delimiter_Lists is type Delimiter_List is tagged private with Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Delimiter; type Delimiter_Index is new Positive; subtype Extended_Delimiter_Index is Delimiter_Index'Base range 0 .. Delimiter_Index'Last; function Has_Element (Cursor : Extended_Delimiter_Index) return Boolean is (Cursor > 0); package Delimiter_Iterator_Interfaces is new Ada.Iterator_Interfaces (Extended_Delimiter_Index, Has_Element); type Reference_Type (Element : not null access Delimiter) is null record with Implicit_Dereference => Element; function Reference (Self : aliased in out Delimiter_List'Class; Cursor : Delimiter_Index) return Reference_Type with Inline; function Iterate (Self : aliased Delimiter_List'Class) return Delimiter_Iterator_Interfaces.Reversible_Iterator'Class; type Delimiter_Filter_Kind is (Any_Element, Kind_Of, Emphasis_Close, Emphasis_Open); type Delimiter_Filter (Kind : Delimiter_Filter_Kind := Any_Element) is record case Kind is when Any_Element | Emphasis_Close => null; when Kind_Of => Given_Kind : Delimiter_Kind; when Emphasis_Open => Emphasis : Emphasis_Kind; end case; end record; function Each (Self : aliased Delimiter_List'Class; Filter : Delimiter_Filter := (Kind => Any_Element); From : Delimiter_Index := 1; To : Extended_Delimiter_Index := Delimiter_Index'Last) return Delimiter_Iterator_Interfaces.Reversible_Iterator'Class; procedure Append (Self : in out Delimiter_List'Class; Item : Delimiter); private package Delimiter_Vectors is new Ada.Containers.Vectors (Delimiter_Index, Delimiter); type Delimiter_List is tagged record Data : Delimiter_Vectors.Vector; end record; end Delimiter_Lists; package body Delimiter_Lists is type Iterator is limited new Delimiter_Iterator_Interfaces.Reversible_Iterator with record List : not null access constant Delimiter_List; Filter : Delimiter_Filter; First : Delimiter_Index; Last : Extended_Delimiter_Index; end record; overriding function First (Self : Iterator) return Extended_Delimiter_Index; overriding function Last (Self : Iterator) return Extended_Delimiter_Index; overriding function Next (Self : Iterator; Index : Extended_Delimiter_Index) return Extended_Delimiter_Index; overriding function Previous (Self : Iterator; Index : Extended_Delimiter_Index) return Extended_Delimiter_Index; function Check (Item : Delimiter; Filter : Delimiter_Filter) return Boolean; ------------ -- Append -- ------------ procedure Append (Self : in out Delimiter_List'Class; Item : Delimiter) is begin Self.Data.Append (Item); end Append; ----------- -- Check -- ----------- function Check (Item : Delimiter; Filter : Delimiter_Filter) return Boolean is begin if not Item.Is_Deleted then case Filter.Kind is when Emphasis_Open => if Item.Kind = Filter.Emphasis and then Item.Can_Open then return True; end if; when Emphasis_Close => if Item.Kind in Emphasis_Kind and then Item.Can_Close then return True; end if; when Kind_Of => if Item.Kind = Filter.Given_Kind then return True; end if; when Any_Element => return True; end case; end if; return False; end Check; ---------- -- Each -- ---------- function Each (Self : aliased Delimiter_List'Class; Filter : Delimiter_Filter := (Kind => Any_Element); From : Delimiter_Index := 1; To : Extended_Delimiter_Index := Delimiter_Index'Last) return Delimiter_Iterator_Interfaces.Reversible_Iterator'Class is begin return Iterator'(Self'Access, Filter, From, Delimiter_Index'Min (To, Self.Data.Last_Index)); end Each; ----------- -- First -- ----------- overriding function First (Self : Iterator) return Extended_Delimiter_Index is begin for J in Self.First .. Self.Last loop if Check (Self.List.Data (J), Self.Filter) then return J; end if; end loop; return 0; end First; function Iterate (Self : aliased Delimiter_List'Class) return Delimiter_Iterator_Interfaces.Reversible_Iterator'Class is (Self.Each); overriding function Last (Self : Iterator) return Extended_Delimiter_Index is (Self.Previous (Self.Last + 1)); ---------- -- Next -- ---------- overriding function Next (Self : Iterator; Index : Extended_Delimiter_Index) return Extended_Delimiter_Index is begin if Index > 0 then for J in Index + 1 .. Self.Last loop if Check (Self.List.Data (J), Self.Filter) then return J; end if; end loop; end if; return 0; end Next; -------------- -- Previous -- -------------- overriding function Previous (Self : Iterator; Index : Extended_Delimiter_Index) return Extended_Delimiter_Index is begin if Index > 0 then for J in reverse Self.First .. Index - 1 loop if Check (Self.List.Data (J), Self.Filter) then return J; end if; end loop; end if; return 0; end Previous; function Reference (Self : aliased in out Delimiter_List'Class; Cursor : Delimiter_Index) return Reference_Type is begin return (Element => Self.Data.Reference (Cursor).Element); end Reference; end Delimiter_Lists; procedure Process_Emphasis (DL : in out Delimiter_Lists.Delimiter_List; Markup : in out Markup_Vectors.Vector; From : Delimiter_Lists.Delimiter_Index := 1; To : Delimiter_Lists.Delimiter_Index := Delimiter_Lists.Delimiter_Index'Last); procedure Process_Links (Register : Markdown.Link_Registers.Link_Register'Class; Text : Plain_Texts.Plain_Text; DL : in out Delimiter_Lists.Delimiter_List; Markup : in out Markup_Vectors.Vector; Bottom : Delimiter_Lists.Delimiter_Index := 1); procedure Parse_Link_Ahead (Register : Markdown.Link_Registers.Link_Register'Class; Text : Plain_Texts.Plain_Text; DL : in out Delimiter_Lists.Delimiter_List; Open : Delimiter_Lists.Delimiter_Index; Close : Delimiter_Lists.Delimiter_Index; URL : out League.Strings.Universal_String; Title : out League.String_Vectors.Universal_String_Vector; Ok : out Boolean); ---------------------- -- Find_All_Inlines -- ---------------------- procedure Find_All_Inlines (Text : Plain_Texts.Plain_Text; Cursor : Position; State : out Inline_Parser_State) is begin for Kind in State'Range loop Known_Inline (Kind) (Text, Cursor, State (Kind)); end loop; end Find_All_Inlines; ------------------ -- Parse_Inline -- ------------------ procedure Parse_Inline (Text : Plain_Texts.Plain_Text; State : in out Inline_Parser_State; Result : out Optional_Inline_State) is begin Result := (Is_Set => False); for X of State loop if X.Is_Set then if Result.Is_Set then if X.Span.From < Result.Span.From then Result := X; end if; else Result := X; end if; end if; end loop; if Result.Is_Set then declare Next : Position := Result.Span.To; begin Text.Step (1, Next); for Kind in State'Range loop if State (Kind).Is_Set and then State (Kind).Span.From <= Result.Span.To then if Next <= Text.Last then Known_Inline (Kind) (Text, Next, State (Kind)); else State (Kind) := (Is_Set => False); end if; end if; end loop; end; end if; end Parse_Inline; ---------------------- -- Parse_Link_Ahead -- ---------------------- procedure Parse_Link_Ahead (Register : Markdown.Link_Registers.Link_Register'Class; Text : Plain_Texts.Plain_Text; DL : in out Delimiter_Lists.Delimiter_List; Open : Delimiter_Lists.Delimiter_Index; Close : Delimiter_Lists.Delimiter_Index; URL : out League.Strings.Universal_String; Title : out League.String_Vectors.Universal_String_Vector; Ok : out Boolean) is procedure To_Link_Label (Text : Plain_Texts.Plain_Text; Open : Position; Close : Position; Label : out League.Strings.Universal_String; Ok : out Boolean); procedure To_Inline_Link (Text : Plain_Texts.Plain_Text; From : Position; To : in out Position; Ok : out Boolean); -------------------- -- To_Inline_Link -- -------------------- procedure To_Inline_Link (Text : Plain_Texts.Plain_Text; From : Position; To : in out Position; Ok : out Boolean) is Start : Wide_Wide_Character; -- Title quote character pragma Unreferenced (Start); Skip : Positive := From.Column; Last : Natural; Line : League.Strings.Universal_String := Text.Line ((From.Line, Skip + 1)); Match : League.Regexps.Regexp_Match := Link_Start_Pattern.Find_Match (Line); Complete : Boolean; -- We have whole inline_link matched Has_Title : Boolean; -- Is title complete begin if not Match.Is_Matched then Ok := False; -- No '(' return; end if; Skip := Skip + Match.Last_Index; Line := Line.Tail_From (Match.Last_Index + 1); -- drop '(' Markdown.Common_Patterns.Parse_Link_Destination (Line, Last, URL); if Last > 0 then Skip := Skip + Last; Line := Line.Tail_From (Last + 1); -- drop link destination end if; Match := Title_Pattern.Find_Match (Line); Complete := Match.Last_Index (6) >= Match.First_Index (6); if not Complete and Match.Last_Index /= Line.Length then Ok := False; -- unmatched text before ')' return; elsif Last > 0 and Match.Last_Index (1) >= Match.First_Index (1) and Match.First_Index (1) = 1 then Ok := False; -- No space between destinationa and title return; end if; Has_Title := (for some J of Title_Close_Group => Match.Last_Index (J) >= Match.First_Index (J)); Line := Match.Capture (1); if Has_Title then Title.Append (Line.Slice (2, Line.Length - 1)); elsif not Line.Is_Empty then if Complete then Ok := False; -- No closing ', " or ')' in link title return; end if; Start := Line (1).To_Wide_Wide_Character; Title.Append (Line.Tail_From (2)); end if; if Complete then To.Column := Skip + Match.Last_Index; Ok := True; return; end if; -- for J in To.Line + 1 .. Text.Length loop -- Line := Text (J); -- end loop; Ok := False; end To_Inline_Link; ------------------- -- To_Link_Label -- ------------------- procedure To_Link_Label (Text : Plain_Texts.Plain_Text; Open : Position; Close : Position; Label : out League.Strings.Universal_String; Ok : out Boolean) is Line : constant League.Strings.Universal_String := Text.Line (Open.Line); begin if Open.Line = Close.Line then Label := Line.Slice (Open.Column, Close.Column); Ok := True; else Ok := False; end if; end To_Link_Label; Label : League.Strings.Universal_String; begin To_Inline_Link (Text, DL (Close).From, DL (Close).To, Ok); if not Ok then To_Link_Label (Text, DL (Open).From, DL (Close).From, Label, Ok); if Ok then Register.Resolve (Label, Ok, URL, Title); end if; end if; end Parse_Link_Ahead; ---------------------- -- Process_Emphasis -- ---------------------- procedure Process_Emphasis (DL : in out Delimiter_Lists.Delimiter_List; Markup : in out Markup_Vectors.Vector; From : Delimiter_Lists.Delimiter_Index := 1; To : Delimiter_Lists.Delimiter_Index := Delimiter_Lists.Delimiter_Index'Last) is use Delimiter_Lists; Openers_Bottom : array (Emphasis_Kind, Natural range 0 .. 2) of Extended_Delimiter_Index := (others => (others => 0)); begin for J in DL.Each ((Kind => Emphasis_Close), From, To) loop declare Closer : Delimiter renames DL (J); Found : Boolean := False; begin Each_Open_Emphasis : for K in reverse DL.Each ((Emphasis_Open, Closer.Kind), From => Delimiter_Index'Max (From, Openers_Bottom (Closer.Kind, Closer.Count mod 3)), To => J - 1) loop declare Opener : Delimiter renames DL (K); Count : Positive range 1 .. 2; begin while not Opener.Is_Deleted and then -- If one of the delimiters can both open and close -- emphasis, then the sum of the lengths of the -- delimiter runs containing the opening and closing -- delimiters must not be a multiple of 3 unless both -- lengths are multiples of 3. (not ((Opener.Can_Open and Opener.Can_Close) or (Closer.Can_Open and Closer.Can_Close)) or else (Opener.Count + Closer.Count) mod 3 /= 0 or else (Opener.Count mod 3 = 0 and Closer.Count mod 3 = 0)) loop Found := True; Count := Positive'Min (2, Positive'Min (Opener.Count, Closer.Count)); Markup.Append ((Emphasis, Opener.From + (Opener.Count - Count), Count)); Markup.Append ((Emphasis, Closer.From, Count)); for M in K + 1 .. J - 1 loop DL (M).Is_Deleted := True; end loop; if Opener.Count = Count then Opener.Is_Deleted := True; else Opener.Count := Opener.Count - Count; end if; if Closer.Count = Count then Closer.Is_Deleted := True; exit Each_Open_Emphasis; else Closer.Count := Closer.Count - Count; Closer.From := Closer.From + Count; end if; end loop; end; end loop Each_Open_Emphasis; if not Found then if not Closer.Can_Open then Closer.Is_Deleted := True; end if; Openers_Bottom (Closer.Kind, Closer.Count mod 3) := J; end if; end; end loop; end Process_Emphasis; ------------------- -- Process_Links -- ------------------- procedure Process_Links (Register : Markdown.Link_Registers.Link_Register'Class; Text : Plain_Texts.Plain_Text; DL : in out Delimiter_Lists.Delimiter_List; Markup : in out Markup_Vectors.Vector; Bottom : Delimiter_Lists.Delimiter_Index := 1) is use Delimiter_Lists; begin for J in DL.Each ((Kind_Of, ']')) loop declare Closer : Delimiter renames DL (J); begin for K in reverse DL.Each ((Kind_Of, '['), From => Bottom, To => J - 1) loop declare Opener : Delimiter renames DL (K); URL : League.Strings.Universal_String; Title : League.String_Vectors.Universal_String_Vector; Ok : Boolean; begin Parse_Link_Ahead (Register, Text, DL, K, J, URL, Title, Ok); if Ok then Markup.Append ((Link, Opener.From, 1, URL, Title)); Markup.Append ((Link, Closer.From, Closer.To.Column - Closer.From.Column + 1, URL, Title)); Process_Emphasis (DL, Markup, K + 1, J - 1); for M in DL.Each ((Kind_Of, '['), From => Bottom, To => J - 1) loop DL (M).Is_Deleted := True; end loop; end if; end; end loop; Closer.Is_Deleted := True; end; end loop; end Process_Links; ----------------- -- Find_Markup -- ----------------- procedure Find_Markup (Register : Markdown.Link_Registers.Link_Register'Class; Text : Plain_Texts.Plain_Text; Markup : in out Markup_Vectors.Vector) is State : Scanner_State; List : Delimiter_Lists.Delimiter_List; Cursor : Position := Text.First; Item : Delimiter; Is_Delimiter : Boolean; begin while Cursor <= Text.Last loop Read_Delimiter (Text, Cursor, State, Item, Is_Delimiter); if Is_Delimiter then List.Append (Item); end if; end loop; Process_Links (Register, Text, List, Markup); Process_Emphasis (List, Markup); end Find_Markup; --------------- -- Get_State -- --------------- function Get_State (Text : Plain_Texts.Plain_Text; Cursor : Position) return Scanner_State is Line : League.Strings.Universal_String; -- FIXME: use Zs and Pc, Pd, Pe, Pf, Pi, Po, or Ps begin if Cursor > Text.Last or else Text.Line (Cursor.Line).Is_Empty then return (Is_White_Space => True, Is_Punctuation => False); else Line := Text.Line (Cursor.Line); end if; if Line (Cursor.Column).To_Wide_Wide_Character in ' ' then return (Is_White_Space => True, Is_Punctuation => False); elsif Line (Cursor.Column).To_Wide_Wide_Character in '!' | '"' | '#' | '$' | '%' | '&' | ''' | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~' then return (Is_White_Space => False, Is_Punctuation => True); else return (Is_White_Space => False, Is_Punctuation => False); end if; end Get_State; ----------- -- Parse -- ----------- function Parse (Register : Markdown.Link_Registers.Link_Register'Class; Lines : League.String_Vectors.Universal_String_Vector) return Annotated_Text is Result : Annotated_Text; Text : Plain_Texts.Plain_Text; State : Inline_Parser_State := (Known_Inline'Range => <>); Cursor : Position; begin Text.Initialize (Lines); Cursor := Text.First; Find_All_Inlines (Text, Cursor, State); while Cursor <= Text.Last loop declare Markup : Markup_Vectors.Vector; Value : Optional_Inline_State; begin Parse_Inline (Text, State, Value); if Value.Is_Set then if Cursor /= Value.Span.From then declare Nested : Plain_Texts.Plain_Text; begin Nested.Initialize (Text, Cursor, Value.Span.From); Find_Markup (Register, Nested, Markup); Append (Result, To_Annotated_Text (Nested, Markup)); end; end if; Append (Result, Value.Value); Cursor := Value.Span.To; Text.Step (1, Cursor); else declare Nested : Plain_Texts.Plain_Text; begin Nested.Initialize (Text, Cursor); Find_Markup (Register, Nested, Markup); Append (Result, To_Annotated_Text (Nested, Markup)); Cursor := Text.Last; Text.Step (1, Cursor); end; end if; end; end loop; return Result; end Parse; -------------------- -- Read_Character -- -------------------- procedure Read_Character (Text : Plain_Texts.Plain_Text; Cursor : in out Position; Result : in out League.Strings.Universal_String) is Line : constant League.Strings.Universal_String := Text.Line (Cursor.Line); begin if Line.Is_Empty then Text.Step (1, Cursor); return; end if; case Line (Cursor.Column).To_Wide_Wide_Character is when '\' => Text.Step (1, Cursor); if Cursor > Text.Last then Result.Append ('\'); elsif Get_State (Text, Cursor).Is_Punctuation then Result.Append (Line (Cursor.Column)); Text.Step (1, Cursor); else Result.Append ('\'); end if; when others => Result.Append (Line (Cursor.Column)); Text.Step (1, Cursor); end case; end Read_Character; -------------------- -- Read_Delimiter -- -------------------- procedure Read_Delimiter (Text : Plain_Texts.Plain_Text; Cursor : in out Position; State : in out Scanner_State; Item : out Delimiter; Is_Delimiter : out Boolean) is function Get_Follow_State (Cursor : Position) return Scanner_State; ---------------------- -- Get_Follow_State -- ---------------------- function Get_Follow_State (Cursor : Position) return Scanner_State is begin if Cursor.Column = 1 then return (Is_White_Space => True, Is_Punctuation => False); else return Get_State (Text, Cursor); end if; end Get_Follow_State; Line : constant League.Strings.Universal_String := Text.Line (Cursor.Line); Follow : Scanner_State; begin if Line.Is_Empty then State := Get_State (Text, Cursor); Text.Step (1, Cursor); Is_Delimiter := False; return; end if; case Line (Cursor.Column).To_Wide_Wide_Character is when '*' => declare Next : Delimiter := (Kind => '*', From => Cursor, Count => Count_Character (Line, Cursor.Column), others => False); begin Text.Step (Next.Count, Cursor); Follow := Get_Follow_State (Cursor); -- Left flanking Next.Can_Open := not Follow.Is_White_Space and then (not Follow.Is_Punctuation or else (State.Is_White_Space or State.Is_Punctuation)); -- Right flanking Next.Can_Close := not State.Is_White_Space and then (not State.Is_Punctuation or else (Follow.Is_White_Space or Follow.Is_Punctuation)); State := Follow; Item := Next; Is_Delimiter := True; end; when '_' => declare Left_Flanking : Boolean; Right_Flanking : Boolean; Next : Delimiter := (Kind => '_', From => Cursor, Count => Count_Character (Line, Cursor.Column), others => False); begin Text.Step (Next.Count, Cursor); Follow := Get_Follow_State (Cursor); Left_Flanking := not Follow.Is_White_Space and then (not Follow.Is_Punctuation or else (State.Is_White_Space or State.Is_Punctuation)); -- Right flanking Right_Flanking := not State.Is_White_Space and then (not State.Is_Punctuation or else (Follow.Is_White_Space or Follow.Is_Punctuation)); Next.Can_Open := Left_Flanking and (not Right_Flanking or else State.Is_Punctuation); Next.Can_Close := Right_Flanking and (not Left_Flanking or else Follow.Is_Punctuation); State := Follow; Item := Next; Is_Delimiter := True; end; when '[' => State := Get_State (Text, Cursor); Item := (Kind => '[', From => Cursor, Is_Deleted => False); Text.Step (1, Cursor); Is_Delimiter := True; when ']' => State := Get_State (Text, Cursor); Item := (Kind => ']', From => Cursor, To => Cursor, Is_Deleted => False); Text.Step (1, Cursor); Is_Delimiter := True; when '\' => State := Get_State (Text, Cursor); Text.Step (2, Cursor); Is_Delimiter := False; when others => State := Get_State (Text, Cursor); Text.Step (1, Cursor); Is_Delimiter := False; end case; if Cursor.Column = 1 then State := (Is_White_Space => True, Is_Punctuation => False); end if; end Read_Delimiter; ----------------------- -- To_Annotated_Text -- ----------------------- function To_Annotated_Text (Text : Plain_Texts.Plain_Text; Markup : Markup_Vectors.Vector) return Annotated_Text is function Less (Left, Right : Positive) return Boolean; procedure Swap (Left, Right : Positive); Map : array (Positive range 1 .. Natural (Markup.Length)) of Markup_Index; Annotation_Map : array (Markup_Index range 1 .. Markup.Last_Index / 2) of Natural := (others => 0); ---------- -- Less -- ---------- function Less (Left, Right : Positive) return Boolean is L : Inline_Parsers.Markup renames Markup (Map (Left)); R : Inline_Parsers.Markup renames Markup (Map (Right)); begin return L.From.Line < R.From.Line or (L.From.Line = R.From.Line and L.From.Column < R.From.Column); end Less; ---------- -- Swap -- ---------- procedure Swap (Left, Right : Positive) is Temp : constant Markup_Index := Map (Left); begin Map (Left) := Map (Right); Map (Right) := Temp; end Swap; procedure Sort is new Ada.Containers.Generic_Anonymous_Array_Sort (Index_Type => Positive, Less => Less, Swap => Swap); Result : League.Strings.Universal_String; Cursor : Position := Text.First; Index : Positive := Map'First; Annotation : Annotation_Vectors.Vector; begin for J in 1 .. Map'Last loop Map (J) := Markup_Index (J); end loop; Sort (1, Map'Last); while Cursor <= Text.Last loop if Index in Map'Range and then Cursor = Markup (Map (Index)).From then declare Item : Inline_Parsers.Markup renames Markup (Map (Index)); begin if Map (Index) mod 2 = 1 then -- Open markup Annotation.Append (To_Annotation (Item, Result.Length + 1)); Annotation_Map ((Map (Index) + 1) / 2) := Annotation.Last_Index; else -- Close markup Annotation (Annotation_Map ((Map (Index)) / 2)).To := Result.Length; end if; Text.Step (Item.Length, Cursor); Index := Index + 1; end; else Read_Character (Text, Cursor, Result); end if; if Cursor <= Text.Last and Cursor.Column = 1 then Result.Append (' '); Annotation.Append ((Soft_Line_Break, Result.Length, Result.Length)); end if; end loop; return (Result, Annotation); end To_Annotated_Text; ------------------- -- To_Annotation -- ------------------- function To_Annotation (Item : Markup; Pos : Positive) return Annotation is begin if Item.Kind = Link then return (Link, Pos, Pos, Item.URL, Item.Title); elsif Item.Length = 1 then return (Emphasis, Pos, Pos); else return (Strong, Pos, Pos); end if; end To_Annotation; end Markdown.Inline_Parsers;
30.757024
79
0.52897
2f27bf735492bb05de49c2016097c72130dbceef
2,833
adb
Ada
st/src/main.adb
MatrixMike/AdaDemo1
cbf2ad5a05dc06a8ee11d0780c19f5fd74c8990a
[ "MIT" ]
1
2019-06-27T12:58:28.000Z
2019-06-27T12:58:28.000Z
st/src/main.adb
MatrixMike/AdaDemo1
cbf2ad5a05dc06a8ee11d0780c19f5fd74c8990a
[ "MIT" ]
null
null
null
st/src/main.adb
MatrixMike/AdaDemo1
cbf2ad5a05dc06a8ee11d0780c19f5fd74c8990a
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- 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. -- -- -- -- -- -- -- -- -- -- -- -- 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 file declares the main procedure for the demonstration. with Driver; pragma Unreferenced (Driver); -- The Driver package contains the task that actually controls the app so -- although it is not referenced directly in the main procedure, we need it -- in the closure of the context clauses so that it will be included in the -- executable. with Last_Chance_Handler; pragma Unreferenced (Last_Chance_Handler); -- The "last chance handler" is the user-defined routine that is called when -- an exception is propagated. We need it in the executable, therefore it -- must be somewhere in the closure of the context clauses. with System; procedure Main is pragma Priority (System.Priority'First); begin loop null; end loop; end Main;
56.66
78
0.43911
2f59c4737a3c2daa351b803d33c16c30fd118765
1,412
ads
Ada
tier-1/xcb/source/thin/xcb-xcb_timestamp_iterator_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_timestamp_iterator_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_timestamp_iterator_t.ads
charlie5/cBound
741be08197a61ad9c72553e3302f3b669902216d
[ "0BSD" ]
null
null
null
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces.C; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_timestamp_iterator_t is -- Item -- type Item is record data : access xcb.xcb_timestamp_t; the_rem : aliased Interfaces.C.int; index : aliased Interfaces.C.int; end record; -- Item_Array -- type Item_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_timestamp_iterator_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_timestamp_iterator_t.Item, Element_Array => xcb.xcb_timestamp_iterator_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_timestamp_iterator_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_timestamp_iterator_t.Pointer, Element_Array => xcb.xcb_timestamp_iterator_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_timestamp_iterator_t;
26.641509
77
0.665014
061d03b5110901bc16e4e7c92fb925a9300807f3
2,928
ads
Ada
aunit/aunit-options.ads
btmalone/alog
164a0a3e82aee414dc6125b64cd8ccc3a01876f9
[ "Apache-2.0" ]
null
null
null
aunit/aunit-options.ads
btmalone/alog
164a0a3e82aee414dc6125b64cd8ccc3a01876f9
[ "Apache-2.0" ]
3
2018-12-23T03:07:49.000Z
2019-06-03T20:16:30.000Z
aunit/aunit-options.ads
btmalone/alog
164a0a3e82aee414dc6125b64cd8ccc3a01876f9
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- A U N I T . O P T I O N S -- -- -- -- S p e c -- -- -- -- -- -- Copyright (C) 2009-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. -- -- -- -- -- -- -- -- -- -- -- -- 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 is maintained by AdaCore (http://www.adacore.com) -- -- -- ------------------------------------------------------------------------------ with AUnit.Test_Filters; package AUnit.Options is type AUnit_Options is record Global_Timer : Boolean := False; Test_Case_Timer : Boolean := False; Report_Successes : Boolean := True; Filter : AUnit.Test_Filters.Test_Filter_Access := null; end record; -- Options used to determine how a test should be run. Default_Options : constant AUnit_Options := (Global_Timer => False, Test_Case_Timer => False, Report_Successes => True, Filter => null); end AUnit.Options;
57.411765
78
0.329235
101f46243665b45c1300b47b0d428e8e05e3fe2a
1,226
ads
Ada
src/base/beans/util-beans-objects-to_access.ads
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
60
2015-01-18T23:05:34.000Z
2022-03-20T18:56:30.000Z
src/base/beans/util-beans-objects-to_access.ads
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
20
2016-09-15T16:41:30.000Z
2022-03-29T22:02:32.000Z
src/base/beans/util-beans-objects-to_access.ads
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
10
2015-02-13T04:00:45.000Z
2022-03-20T18:57:54.000Z
----------------------------------------------------------------------- -- Util.Beans.Objects.To_Access -- Conversion utility -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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. ----------------------------------------------------------------------- -- Convert the object to the corresponding access type. -- Returns null if the object is not a <b>TYPE_BEAN</b> or not of the given bean type. with Util.Beans.Basic; generic type T is limited new Util.Beans.Basic.Readonly_Bean with private; type T_Access is access all T'Class; function Util.Beans.Objects.To_Access (Value : in Object) return T_Access;
47.153846
87
0.657423
4d5263415ae6cdba7d7453263b5c1d764f9245a2
103
adb
Ada
src/fsmaker_main.adb
Fabien-Chouteau/fsmaker
3d96522852077c3865bb21ad3705f570733f1d7a
[ "MIT" ]
null
null
null
src/fsmaker_main.adb
Fabien-Chouteau/fsmaker
3d96522852077c3865bb21ad3705f570733f1d7a
[ "MIT" ]
null
null
null
src/fsmaker_main.adb
Fabien-Chouteau/fsmaker
3d96522852077c3865bb21ad3705f570733f1d7a
[ "MIT" ]
null
null
null
with FSmaker.Commands; procedure Fsmaker_Main is begin FSmaker.Commands.Execute; end Fsmaker_Main;
14.714286
28
0.815534
596c23fd327120dcb4d057a9583d241fe302bb60
9,732
ads
Ada
project/adl/boards/stm32_common/stm32f769disco/stm32-board.ads
corentingay/adaboy
68f08afa246c8255a42897376d375edcb4e2efc2
[ "MIT" ]
null
null
null
project/adl/boards/stm32_common/stm32f769disco/stm32-board.ads
corentingay/adaboy
68f08afa246c8255a42897376d375edcb4e2efc2
[ "MIT" ]
null
null
null
project/adl/boards/stm32_common/stm32f769disco/stm32-board.ads
corentingay/adaboy
68f08afa246c8255a42897376d375edcb4e2efc2
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, 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 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. -- -- -- ------------------------------------------------------------------------------ -- This file provides declarations for devices on the STM32F7 Discovery kits -- manufactured by ST Microelectronics. with Ada.Interrupts.Names; use Ada.Interrupts; with STM32.Device; use STM32.Device; with STM32.DMA; use STM32.DMA; with STM32.DMA.Interrupts; use STM32.DMA.Interrupts; with STM32.FMC; use STM32.FMC; with STM32.GPIO; use STM32.GPIO; with STM32.I2C; use STM32.I2C; use STM32; with Audio; with Framebuffer_OTM8009A; with Touch_Panel_FT6x06; with SDCard; package STM32.Board is pragma Elaborate_Body; subtype User_LED is GPIO_Point; Red_LED : User_LED renames PJ13; Green_LED : User_LED renames PJ5; Green2_LED : User_LED renames PA12; LED1 : User_LED renames Red_LED; LED2 : User_LED renames Green_LED; LED3 : User_LED renames Green2_LED; LCH_LED : User_LED renames Red_LED; All_LEDs : GPIO_Points := (Red_LED, Green_LED, Green2_LED); procedure Initialize_LEDs; -- MUST be called prior to any use of the LEDs procedure Turn_On (This : in out User_LED) renames STM32.GPIO.Set; procedure Turn_Off (This : in out User_LED) renames STM32.GPIO.Clear; procedure Toggle (This : in out User_LED) renames STM32.GPIO.Toggle; procedure All_LEDs_Off with Inline; procedure All_LEDs_On with Inline; procedure Toggle_LEDs (These : in out GPIO_Points) renames STM32.GPIO.Toggle; -- GPIO Pins for FMC FMC_A : constant GPIO_Points := (PF0, PF1, PF2, PF3, PF4, PF5, PF12, PF13, PF14, PF15, PG0, PG1, PG2); FMC_D : constant GPIO_Points := (PD14, PD15, PD0, PD1, PE7, PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PD8, PD9, PD10, PH8, PH9, PH10, PH11, PH12, PH13, PH14, PH15, PI0, PI1, PI2, PI3, PI6, PI7, PI9, PI10); FMC_NBL : constant GPIO_Points := (PE0, PE1, PI4, PI5); FMC_SDNWE : GPIO_Point renames PH5; FMC_SDNRAS : GPIO_Point renames PF11; FMC_SDNCAS : GPIO_Point renames PG15; FMC_SDCLK : GPIO_Point renames PG8; FMC_BA0 : GPIO_Point renames PG4; FMC_BA1 : GPIO_Point renames PG5; FMC_SDNE0 : GPIO_Point renames PH3; FMC_SDCKE0 : GPIO_Point renames PH2; FMC_NBL0 : GPIO_Point renames PE0; FMC_NBL1 : GPIO_Point renames PE1; FMC_NBL2 : GPIO_Point renames PI4; FMC_NBL3 : GPIO_Point renames PI5; SDRAM_PINS : constant GPIO_Points := FMC_A & FMC_D & FMC_SDNWE & FMC_SDNRAS & FMC_SDNCAS & FMC_SDCLK & FMC_BA0 & FMC_BA1 & FMC_SDNE0 & FMC_SDCKE0 & FMC_NBL; -- SDRAM CONFIGURATION Parameters SDRAM_Base : constant := 16#C000_0000#; SDRAM_Size : constant := 16#0100_0000#; -- 16MB SDRAM SDRAM_Bank : constant STM32.FMC.FMC_SDRAM_Cmd_Target_Bank := STM32.FMC.FMC_Bank1_SDRAM; SDRAM_Mem_Width : constant STM32.FMC.FMC_SDRAM_Memory_Bus_Width := STM32.FMC.FMC_SDMemory_Width_32b; SDRAM_Row_Bits : constant STM32.FMC.FMC_SDRAM_Row_Address_Bits := STM32.FMC.FMC_RowBits_Number_12b; SDRAM_CAS_Latency : constant STM32.FMC.FMC_SDRAM_CAS_Latency := STM32.FMC.FMC_CAS_Latency_2; SDRAM_CLOCK_Period : constant STM32.FMC.FMC_SDRAM_Clock_Configuration := STM32.FMC.FMC_SDClock_Period_2; SDRAM_Read_Burst : constant STM32.FMC.FMC_SDRAM_Burst_Read := STM32.FMC.FMC_Read_Burst_Single; SDRAM_Read_Pipe : constant STM32.FMC.FMC_SDRAM_Read_Pipe_Delay := STM32.FMC.FMC_ReadPipe_Delay_0; SDRAM_Refresh_Cnt : constant := 16#0603#; SDRAM_Min_Delay_In_ns : constant := 60; --------- -- I2C -- --------- I2C1_SCL : GPIO_Point renames PB8; I2C1_SDA : GPIO_Point renames PB9; I2C4_SCL : GPIO_Point renames PD12; I2C4_SDA : GPIO_Point renames PB7; procedure Initialize_I2C_GPIO (Port : in out I2C_Port) with -- I2C_2 and I2C_4 are not accessible on this board Pre => As_Port_Id (Port) = I2C_Id_1 or else As_Port_Id (Port) = I2C_Id_4; -------------------------------- -- Screen/Touch panel devices -- -------------------------------- LCD_Natural_Width : constant := Framebuffer_OTM8009A.LCD_Natural_Width; LCD_Natural_Height : constant := Framebuffer_OTM8009A.LCD_Natural_Height; Display : Framebuffer_OTM8009A.Frame_Buffer; Touch_Panel : Touch_Panel_FT6x06.Touch_Panel; ----------------- -- Touch Panel -- ----------------- TP_INT : GPIO_Point renames PI13; TP_Pins : constant GPIO_Points := (I2C4_SCL, I2C4_SDA); ----------- -- Audio -- ----------- Audio_I2C : I2C_Port renames I2C_4; Audio_I2C_SDA : STM32.GPIO.GPIO_Point renames STM32.Device.PB7; Audio_I2C_SDA_AF : STM32.GPIO_Alternate_Function renames STM32.Device.GPIO_AF_I2C4_4; Audio_I2C_SCL : STM32.GPIO.GPIO_Point renames STM32.Device.PD12; Audio_I2C_SCL_AF : STM32.GPIO_Alternate_Function renames STM32.Device.GPIO_AF_I2C4_11; -- Audio DMA configuration Audio_DMA : DMA_Controller renames DMA_2; Audio_Out_DMA_Interrupt : Ada.Interrupts.Interrupt_ID renames Ada.Interrupts.Names.DMA2_Stream1_Interrupt; Audio_DMA_Out_Stream : DMA_Stream_Selector renames Stream_1; Audio_DMA_Out_Channel : DMA_Channel_Selector renames Channel_0; Audio_DMA_In_Sream : DMA_Stream_Selector renames Stream_7; Audio_DMA_In_Channel : DMA_Channel_Selector renames Channel_0; Audio_Device : Audio.WM8994_Audio_Device (Audio_I2C'Access); ------------- -- SD Card -- ------------- SD_Detect_Pin : STM32.GPIO.GPIO_Point renames PI15; SD_DMA : DMA_Controller renames DMA_2; SD_DMA_Rx_Stream : DMA_Stream_Selector renames Stream_0; SD_DMA_Rx_Channel : DMA_Channel_Selector renames Channel_11; SD_DMA_Tx_Stream : DMA_Stream_Selector renames Stream_5; SD_DMA_Tx_Channel : DMA_Channel_Selector renames Channel_11; SD_Pins : constant GPIO_Points := (PB3, PB4); SD_Pins_AF : constant GPIO_Alternate_Function := GPIO_AF_SDMMC2_10; SD_Pins_2 : constant GPIO_Points := (PD6, PD7, PG9, PG10); SD_Pins_AF_2 : constant GPIO_Alternate_Function := GPIO_AF_SDMMC2_11; SD_Interrupt : Ada.Interrupts.Interrupt_ID renames Ada.Interrupts.Names.SDMMC2_Interrupt; SD_Rx_DMA_Int : DMA_Interrupt_Controller renames DMA2_Stream0; SD_Tx_DMA_Int : DMA_Interrupt_Controller renames DMA2_Stream5; SDCard_Device : aliased SDCard.SDCard_Controller (SDMMC_2'Access); ----------------- -- User button -- ----------------- User_Button_Point : GPIO_Point renames PA0; User_Button_Interrupt : constant Interrupt_ID := Names.EXTI0_Interrupt; procedure Configure_User_Button_GPIO; -- Configures the GPIO port/pin for the blue user button. Sufficient -- for polling the button, and necessary for having the button generate -- interrupts. end STM32.Board;
43.837838
89
0.611385
413cda5a8687659a3b0ba0d7958c84205cece290
12,709
ads
Ada
nt_console.ads
thieryw/snake_array_impl
33782e864f81ebbf818e349d8fda5f14e49da448
[ "MIT" ]
null
null
null
nt_console.ads
thieryw/snake_array_impl
33782e864f81ebbf818e349d8fda5f14e49da448
[ "MIT" ]
1
2018-06-03T19:08:34.000Z
2018-06-03T19:08:48.000Z
nt_console.ads
thieryw/snake_array_impl
33782e864f81ebbf818e349d8fda5f14e49da448
[ "MIT" ]
null
null
null
----------------------------------------------------------------------- -- -- File: nt_console.ads -- Description: Win95/NT console support -- Rev: 0.2 -- Date: 08-june-1999 -- Author: Jerry van Dijk -- Mail: [email protected] -- -- Copyright (c) Jerry van Dijk, 1997, 1998, 1999 -- Billie Holidaystraat 28 -- 2324 LK LEIDEN -- THE NETHERLANDS -- tel int + 31 71 531 43 65 -- -- Permission granted to use for any purpose, provided this copyright -- remains attached and unmodified. -- -- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -- ----------------------------------------------------------------------- package NT_Console is ---------------------- -- TYPE DEFINITIONS -- ---------------------- subtype X_Pos is Natural range 0 .. 79; subtype Y_Pos is Natural range 0 .. 24; type Color_Type is (Black, Blue, Green, Cyan, Red, Magenta, Brown, Gray, Light_Blue, Light_Green, Light_Cyan, Light_Red, Light_Magenta, Yellow, White); ---------------------- -- EXTENDED PC KEYS -- ---------------------- Key_Alt_Escape : constant Character := Character'Val (16#01#); Key_Control_At : constant Character := Character'Val (16#03#); Key_Alt_Backspace : constant Character := Character'Val (16#0E#); Key_BackTab : constant Character := Character'Val (16#0F#); Key_Alt_Q : constant Character := Character'Val (16#10#); Key_Alt_W : constant Character := Character'Val (16#11#); Key_Alt_E : constant Character := Character'Val (16#12#); Key_Alt_R : constant Character := Character'Val (16#13#); Key_Alt_T : constant Character := Character'Val (16#14#); Key_Alt_Y : constant Character := Character'Val (16#15#); Key_Alt_U : constant Character := Character'Val (16#16#); Key_Alt_I : constant Character := Character'Val (16#17#); Key_Alt_O : constant Character := Character'Val (16#18#); Key_Alt_P : constant Character := Character'Val (16#19#); Key_Alt_LBracket : constant Character := Character'Val (16#1A#); Key_Alt_RBracket : constant Character := Character'Val (16#1B#); Key_Alt_Return : constant Character := Character'Val (16#1C#); Key_Alt_A : constant Character := Character'Val (16#1E#); Key_Alt_S : constant Character := Character'Val (16#1F#); Key_Alt_D : constant Character := Character'Val (16#20#); Key_Alt_F : constant Character := Character'Val (16#21#); Key_Alt_G : constant Character := Character'Val (16#22#); Key_Alt_H : constant Character := Character'Val (16#23#); Key_Alt_J : constant Character := Character'Val (16#24#); Key_Alt_K : constant Character := Character'Val (16#25#); Key_Alt_L : constant Character := Character'Val (16#26#); Key_Alt_Semicolon : constant Character := Character'Val (16#27#); Key_Alt_Quote : constant Character := Character'Val (16#28#); Key_Alt_Backquote : constant Character := Character'Val (16#29#); Key_Alt_Backslash : constant Character := Character'Val (16#2B#); Key_Alt_Z : constant Character := Character'Val (16#2C#); Key_Alt_X : constant Character := Character'Val (16#2D#); Key_Alt_C : constant Character := Character'Val (16#2E#); Key_Alt_V : constant Character := Character'Val (16#2F#); Key_Alt_B : constant Character := Character'Val (16#30#); Key_Alt_N : constant Character := Character'Val (16#31#); Key_Alt_M : constant Character := Character'Val (16#32#); Key_Alt_Comma : constant Character := Character'Val (16#33#); Key_Alt_Period : constant Character := Character'Val (16#34#); Key_Alt_Slash : constant Character := Character'Val (16#35#); Key_Alt_KPStar : constant Character := Character'Val (16#37#); Key_F1 : constant Character := Character'Val (16#3B#); Key_F2 : constant Character := Character'Val (16#3C#); Key_F3 : constant Character := Character'Val (16#3D#); Key_F4 : constant Character := Character'Val (16#3E#); Key_F5 : constant Character := Character'Val (16#3F#); Key_F6 : constant Character := Character'Val (16#40#); Key_F7 : constant Character := Character'Val (16#41#); Key_F8 : constant Character := Character'Val (16#42#); Key_F9 : constant Character := Character'Val (16#43#); Key_F10 : constant Character := Character'Val (16#44#); Key_Home : constant Character := Character'Val (16#47#); Key_Up : constant Character := Character'Val (16#48#); Key_PageUp : constant Character := Character'Val (16#49#); Key_Alt_KPMinus : constant Character := Character'Val (16#4A#); Key_Left : constant Character := Character'Val (16#4B#); Key_Center : constant Character := Character'Val (16#4C#); Key_Right : constant Character := Character'Val (16#4D#); Key_Alt_KPPlus : constant Character := Character'Val (16#4E#); Key_End : constant Character := Character'Val (16#4F#); Key_Down : constant Character := Character'Val (16#50#); Key_PageDown : constant Character := Character'Val (16#51#); Key_Insert : constant Character := Character'Val (16#52#); Key_Delete : constant Character := Character'Val (16#53#); Key_Shift_F1 : constant Character := Character'Val (16#54#); Key_Shift_F2 : constant Character := Character'Val (16#55#); Key_Shift_F3 : constant Character := Character'Val (16#56#); Key_Shift_F4 : constant Character := Character'Val (16#57#); Key_Shift_F5 : constant Character := Character'Val (16#58#); Key_Shift_F6 : constant Character := Character'Val (16#59#); Key_Shift_F7 : constant Character := Character'Val (16#5A#); Key_Shift_F8 : constant Character := Character'Val (16#5B#); Key_Shift_F9 : constant Character := Character'Val (16#5C#); Key_Shift_F10 : constant Character := Character'Val (16#5D#); Key_Control_F1 : constant Character := Character'Val (16#5E#); Key_Control_F2 : constant Character := Character'Val (16#5F#); Key_Control_F3 : constant Character := Character'Val (16#60#); Key_Control_F4 : constant Character := Character'Val (16#61#); Key_Control_F5 : constant Character := Character'Val (16#62#); Key_Control_F6 : constant Character := Character'Val (16#63#); Key_Control_F7 : constant Character := Character'Val (16#64#); Key_Control_F8 : constant Character := Character'Val (16#65#); Key_Control_F9 : constant Character := Character'Val (16#66#); Key_Control_F10 : constant Character := Character'Val (16#67#); Key_Alt_F1 : constant Character := Character'Val (16#68#); Key_Alt_F2 : constant Character := Character'Val (16#69#); Key_Alt_F3 : constant Character := Character'Val (16#6A#); Key_Alt_F4 : constant Character := Character'Val (16#6B#); Key_Alt_F5 : constant Character := Character'Val (16#6C#); Key_Alt_F6 : constant Character := Character'Val (16#6D#); Key_Alt_F7 : constant Character := Character'Val (16#6E#); Key_Alt_F8 : constant Character := Character'Val (16#6F#); Key_Alt_F9 : constant Character := Character'Val (16#70#); Key_Alt_F10 : constant Character := Character'Val (16#71#); Key_Control_Left : constant Character := Character'Val (16#73#); Key_Control_Right : constant Character := Character'Val (16#74#); Key_Control_End : constant Character := Character'Val (16#75#); Key_Control_PageDown : constant Character := Character'Val (16#76#); Key_Control_Home : constant Character := Character'Val (16#77#); Key_Alt_1 : constant Character := Character'Val (16#78#); Key_Alt_2 : constant Character := Character'Val (16#79#); Key_Alt_3 : constant Character := Character'Val (16#7A#); Key_Alt_4 : constant Character := Character'Val (16#7B#); Key_Alt_5 : constant Character := Character'Val (16#7C#); Key_Alt_6 : constant Character := Character'Val (16#7D#); Key_Alt_7 : constant Character := Character'Val (16#7E#); Key_Alt_8 : constant Character := Character'Val (16#7F#); Key_Alt_9 : constant Character := Character'Val (16#80#); Key_Alt_0 : constant Character := Character'Val (16#81#); Key_Alt_Dash : constant Character := Character'Val (16#82#); Key_Alt_Equals : constant Character := Character'Val (16#83#); Key_Control_PageUp : constant Character := Character'Val (16#84#); Key_F11 : constant Character := Character'Val (16#85#); Key_F12 : constant Character := Character'Val (16#86#); Key_Shift_F11 : constant Character := Character'Val (16#87#); Key_Shift_F12 : constant Character := Character'Val (16#88#); Key_Control_F11 : constant Character := Character'Val (16#89#); Key_Control_F12 : constant Character := Character'Val (16#8A#); Key_Alt_F11 : constant Character := Character'Val (16#8B#); Key_Alt_F12 : constant Character := Character'Val (16#8C#); Key_Control_Up : constant Character := Character'Val (16#8D#); Key_Control_KPDash : constant Character := Character'Val (16#8E#); Key_Control_Center : constant Character := Character'Val (16#8F#); Key_Control_KPPlus : constant Character := Character'Val (16#90#); Key_Control_Down : constant Character := Character'Val (16#91#); Key_Control_Insert : constant Character := Character'Val (16#92#); Key_Control_Delete : constant Character := Character'Val (16#93#); Key_Control_KPSlash : constant Character := Character'Val (16#95#); Key_Control_KPStar : constant Character := Character'Val (16#96#); Key_Alt_EHome : constant Character := Character'Val (16#97#); Key_Alt_EUp : constant Character := Character'Val (16#98#); Key_Alt_EPageUp : constant Character := Character'Val (16#99#); Key_Alt_ELeft : constant Character := Character'Val (16#9B#); Key_Alt_ERight : constant Character := Character'Val (16#9D#); Key_Alt_EEnd : constant Character := Character'Val (16#9F#); Key_Alt_EDown : constant Character := Character'Val (16#A0#); Key_Alt_EPageDown : constant Character := Character'Val (16#A1#); Key_Alt_EInsert : constant Character := Character'Val (16#A2#); Key_Alt_EDelete : constant Character := Character'Val (16#A3#); Key_Alt_KPSlash : constant Character := Character'Val (16#A4#); Key_Alt_Tab : constant Character := Character'Val (16#A5#); Key_Alt_Enter : constant Character := Character'Val (16#A6#); -------------------- -- CURSOR CONTROL -- -------------------- function Cursor_Visible return Boolean; procedure Set_Cursor (Visible : in Boolean); function Where_X return X_Pos; function Where_Y return Y_Pos; procedure Goto_XY (X : in X_Pos := X_Pos'First; Y : in Y_Pos := Y_Pos'First); ------------------- -- COLOR CONTROL -- ------------------- function Get_Foreground return Color_Type; function Get_Background return Color_Type; procedure Set_Foreground (Color : in Color_Type := Gray); procedure Set_Background (Color : in Color_Type := Black); -------------------- -- SCREEN CONTROL -- -------------------- procedure Clear_Screen (Color : in Color_Type := Black); ------------------- -- SOUND CONTROL -- ------------------- procedure Bleep; ------------------- -- INPUT CONTROL -- ------------------- function Get_Key return Character; function Key_Available return Boolean; end NT_Console;
55.741228
72
0.592887
1d75de60cbfa7d44167ade1218c39a04e5a82456
5,318
ads
Ada
.emacs.d/elpa/wisi-2.2.1/emacs_wisi_common_parse.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-2.2.1/emacs_wisi_common_parse.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-2.2.1/emacs_wisi_common_parse.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
-- Abstract : -- -- Common utilities for Gen_Emacs_Wisi_*_Parse -- -- Copyright (C) 2018 - 2019 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or -- modify it under terms of the GNU General Public License as -- published by the Free Software Foundation; either version 3, 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 -- distributed with this program; see file COPYING. If not, write to -- the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, -- MA 02110-1335, USA. pragma License (GPL); with Ada.Strings.Unbounded; with System; with Wisi; with WisiToken.Parse.LR.Parser; package Emacs_Wisi_Common_Parse is Protocol_Version : constant String := "4"; -- Protocol_Version defines the data sent between elisp and the -- background process, except for the language-specific parameters, -- which are defined by the Language_Protocol_Version parameter to -- Parse_Stream, below. -- -- This value must match wisi-process-parse.el -- wisi-process-parse-protocol-version. -- -- See wisi-process-parse.el functions, and this package body, for -- the implementation of the protocol. -- -- Only changes once per wisi release. Increment as soon as required, -- record new version in NEWS-wisi.text. Prompt : constant String := ";;> "; Protocol_Error : exception; Finish : exception; procedure Usage (Name : in String); procedure Read_Input (A : System.Address; N : Integer); function Get_Command_Length return Integer; function Get_String (Source : in String; Last : in out Integer) return String; function Get_Integer (Source : in String; Last : in out Integer) return Integer; type Process_Start_Params is record Recover_Log_File_Name : Ada.Strings.Unbounded.Unbounded_String; -- log enabled if non-empty. end record; function Get_Process_Start_Params return Process_Start_Params; -- Get from Ada.Command_Line. Handles --help by outputing help, -- raising Finish. procedure Process_Stream (Name : in String; Language_Protocol_Version : in String; Partial_Parse_Active : in out Boolean; Params : in Process_Start_Params; Parser : in out WisiToken.Parse.LR.Parser.Parser; Parse_Data : in out Wisi.Parse_Data_Type'Class; Descriptor : in WisiToken.Descriptor); ---------- -- Parse command type Parse_Params is record Post_Parse_Action : Wisi.Post_Parse_Action_Type; Source_File_Name : Ada.Strings.Unbounded.Unbounded_String; Begin_Byte_Pos : Integer; -- Source file byte position of first char sent; start parse here. End_Byte_Pos : Integer; -- Byte position of last char sent. Goal_Byte_Pos : Integer; -- Byte position of end of desired parse region; terminate parse at -- or after here. Begin_Char_Pos : WisiToken.Buffer_Pos; -- Char position of first char sent. Begin_Line : WisiToken.Line_Number_Type; End_Line : WisiToken.Line_Number_Type; -- Line number of line containing Begin_Byte_Pos, End_Byte_Pos Begin_Indent : Integer; -- Indentation of Line_Begin Partial_Parse_Active : Boolean; Debug_Mode : Boolean; Parse_Verbosity : Integer; McKenzie_Verbosity : Integer; Action_Verbosity : Integer; McKenzie_Disable : Integer; Task_Count : Integer; Check_Limit : Integer; Enqueue_Limit : Integer; Max_Parallel : Integer; Byte_Count : Integer; -- Count of bytes of source file sent. end record; function Get_Parse_Params (Command_Line : in String; Last : in out Integer) return Parse_Params; ---------- -- Refactor command type Refactor_Params is record Refactor_Action : Positive; -- Language-specific Source_File_Name : Ada.Strings.Unbounded.Unbounded_String; Parse_Region : WisiToken.Buffer_Region; -- Source file byte region to parse. Edit_Begin : WisiToken.Buffer_Pos; -- Source file byte position at start of expression to refactor. Parse_Begin_Char_Pos : WisiToken.Buffer_Pos; -- Char position of first char sent. Parse_Begin_Line : WisiToken.Line_Number_Type; Parse_End_Line : WisiToken.Line_Number_Type; -- Line numbers of lines containing Parse_Begin_Byte_Pos, Parse_End_Byte_Pos Debug_Mode : Boolean; Parse_Verbosity : Integer; Action_Verbosity : Integer; Max_Parallel : Integer; Byte_Count : Integer; -- Count of bytes of source file sent. end record; function Get_Refactor_Params (Command_Line : in String; Last : in out Integer) return Refactor_Params; end Emacs_Wisi_Common_Parse;
34.309677
105
0.672433
1dfa4650bf73c4422958164d0020541c4253acf5
11,266
ads
Ada
src/common/keccak-generic_parallel_keccakf.ads
damaki/libkeccak
d06217e525f7927380690d6c37b485bdbe8aa96e
[ "BSD-3-Clause" ]
26
2015-09-20T17:52:38.000Z
2021-07-29T21:47:04.000Z
src/common/keccak-generic_parallel_keccakf.ads
damaki/libkeccak
d06217e525f7927380690d6c37b485bdbe8aa96e
[ "BSD-3-Clause" ]
3
2019-03-12T16:01:36.000Z
2020-05-23T13:06:43.000Z
src/common/keccak-generic_parallel_keccakf.ads
damaki/libkeccak
d06217e525f7927380690d6c37b485bdbe8aa96e
[ "BSD-3-Clause" ]
2
2019-04-15T18:02:19.000Z
2020-11-22T11:22:18.000Z
------------------------------------------------------------------------------- -- Copyright (c) 2019, Daniel King -- 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. -- * The name of the copyright holder may not 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 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. ------------------------------------------------------------------------------- with Keccak.Types; -- @summary -- Implements an optimized Keccak-f permutation based on SIMD instruction sets -- such as SSE, NEON, and AVX. -- -- @description -- This package provides a basis for parallel implementations of Keccak -- for processing N separate permutations in parallel, where N is the number -- of vector components in the SIMD instruction set used. -- -- When instantiating this package, subprograms and types are provided as -- formal generic parameters which implement each of the required operations -- for the target instruction set. -- -- @group Parallel Keccak-f generic Lane_Size_Log : in Positive; -- The binary logarithm of the lane size. -- -- This determines the Keccak-f state size. Allowed values are: -- * Lane_Size_Log = 3 => 8-bit lanes, Keccak-f[200] -- * Lane_Size_Log = 4 => 16-bit lanes, Keccak-f[400] -- * Lane_Size_Log = 5 => 32-bit lanes, Keccak-f[800] -- * Lane_Size_Log = 6 => 64-bit lanes, Keccak-f[1600] type Lane_Type is mod <>; -- Lane type e.g. Unsigned_64. type VXXI_Index is range <>; -- Index type into the vector component. type VXXI is private; -- Vector type. type VXXI_View is array (VXXI_Index) of Lane_Type; -- A view of the vector type, permitting individual access to each vector -- component. Vector_Width : Positive; -- Number of vector to components to actually use. -- -- Usually, this would be set to the actual number of vector components -- (e.g. 4 for a 4x 32-bit vector). However, you may use a smaller number -- if you don't want to use the full vector width. For example, you could -- set Vector_Width to 2 with a 4x 32-bit vector type, to obtain 2x -- parallelism (the upper 2 vector components would not be used). with function Load (X : in VXXI_View) return VXXI; with function Store (X : in VXXI) return VXXI_View; with function "xor" (A, State_Size_Bits : in VXXI) return VXXI; -- Calculates A xor State_Size_Bits per vector component. with function Rotate_Left (A : in VXXI; Amount : in Natural) return VXXI; -- Calculates Rotate_Left(A) per vector component. with function And_Not (A, State_Size_Bits : in VXXI) return VXXI; -- Calculates State_Size_Bits and (not A) per vector component. with function Shift_Left (A : in Lane_Type; Amount : in Natural) return Lane_Type; with function Shift_Right (A : in Lane_Type; Amount : in Natural) return Lane_Type; package Keccak.Generic_Parallel_KeccakF is Lane_Size_Bits : constant Positive := 2**Lane_Size_Log; -- Lane size (in bits, i.e. 8, 16, 32, or 64) State_Size_Bits : constant Positive := Lane_Size_Bits * 25; -- Keccak-f state size (in bits). Num_Parallel_Instances : constant Positive := Vector_Width; pragma Assert (Lane_Size_Bits mod 8 = 0, "Generic_Parallel_KeccakF only supports Lane_Size_Log in 3 .. 6"); pragma Assert (Vector_Width in 1 .. VXXI_View'Length, "Vector_Width exceeds vector type's width"); type Parallel_State is private; Initialized_State : constant Parallel_State; type Round_Index is range 0 .. 23; subtype Round_Count is Positive range 1 .. 24; procedure Init (S : out Parallel_State) with Global => null; -- Initialise the Keccak state to all zeroes. generic First_Round : Round_Index := 0; Num_Rounds : Round_Count := 24; procedure Permute_All (S : in out Parallel_State) with Global => null; -- Applies the Keccak-f permutation function to all N parallel states. -- -- This generic function is a Keccak-p permutation which is -- instantiated, with the number rounds, into a Keccak-f instance. procedure XOR_Bits_Into_State_Separate (S : in out Parallel_State; Data : in Types.Byte_Array; Data_Offset : in Natural; Bit_Len : in Natural) with Global => null, Pre => (Data'Length / Vector_Width <= Natural'Last / 8 and then Data'Length mod Vector_Width = 0 and then Data_Offset <= (Data'Length / Vector_Width) and then Bit_Len <= ((Data'Length / Vector_Width) - Data_Offset) * 8 and then Bit_Len <= State_Size_Bits); -- XOR separate data into each parallel Keccak instance. -- -- The @Data@ array contains the data to be XORed into all parallel -- instances. The bytes in @Data@ are split into equal chunks depending on -- the number of parallel instances. For example, for Keccak-f[1600]�2 the -- @Data@ array is split into 2 chunks as shown below: -- -- . DO BL DO BL -- |--->|<---->| |--->|<---->| -- +-----------------------------------------+ -- | | | Data -- +-----------------------------------------+ -- . | | | | -- . | XOR | | XOR | -- . | v | | v | -- . +-----------+ +-----------+ -- . | state 0 | | state 1 | -- . +-----------+ +-----------+ -- -- Where DO = Data_Offset and BL = Bit_Len -- -- The @Data_Offset@ determines the offset within each chunk to start -- reading data. @Bit_Len@ determines the number of bits to read from each -- chunk. -- -- The data is always XORed starting at the beginning of the Keccak state. -- -- @param S The parallel Keccak state to where the bits are XORed. -- -- @param Data The array containing the data to XOR into the parallel state. -- The size of this array must be a multiple of the number of parallel -- instances. For Example, for Keccak-f[1600]�4 then Data'Length -- must be a multiple of 4. -- -- @param Data_Offset Offset of the first byte(s) to read from the @Data@ -- array. -- -- @param Bit_Len The number of bits to XOR into each state. procedure XOR_Bits_Into_State_All (S : in out Parallel_State; Data : in Types.Byte_Array; Bit_Len : in Natural) with Global => null, Depends => (S =>+ (Data, Bit_Len)), Pre => (Data'Length <= Natural'Last / 8 and then Bit_Len <= Data'Length * 8 and then Bit_Len <= State_Size_Bits); -- XOR the same data into all parallel Keccak instances. -- -- The @Data@ array contains the data to be XORed into all parallel -- instances. For example, for Keccak-f[1600]�2 this would be as follows: -- -- . BL -- . |<--------->| -- . +----------------+ -- . | | Data -- . +----------------+ -- . /\ -- . XOR / \ XOR -- . v / \ v -- +-----------+-----------+ -- | state 0 | state 1 | -- +-----------+-----------+ -- -- Where BL = Bit_Len -- -- The data is always XORed starting at the beginning of the Keccak state. -- -- @param S The parallel Keccak state to where the bits are XORed. -- -- @param Data The array containing the data to XOR into each parallel state. -- -- @param Bit_Len The length of the data, in bits. procedure Extract_Bytes (S : in Parallel_State; Data : in out Types.Byte_Array; Data_Offset : in Natural; Byte_Len : in Natural) with Global => null, Pre => (Data'Length mod Vector_Width = 0 and then Data_Offset <= Data'Length / Vector_Width and then Byte_Len <= (Data'Length / Vector_Width) - Data_Offset and then Byte_Len <= State_Size_Bits / 8); -- Extract bytes from the Keccak state. -- -- The @Data@ array is split into N equal sized chunks, where N is the -- number of parallel instances. The bytes extracted from each Keccak -- state is then copied into the each chunk, offset by @Data_Offset@. -- An example is shown below for Keccak-f[1600]�2 (i.e. 2 parallel -- instances): -- -- . DO BL DO BL -- |--->|<---->| |--->|<---->| -- +-----------------------------------------+ -- | | | Data -- +-----------------------------------------+ -- . | ^ | | ^ | -- . | Read | | Read | -- . | | | | -- . +-----------+ +-----------+ -- . | state 0 | | state 1 | -- . +-----------+ +-----------+ -- -- The bytes are always read from the beginning of the Keccak state. -- -- @param S The Keccak state to read bytes from. -- -- @param Data Bytes extracted from the Keccak state are copied to this -- array, offset according to @Data_Offset@. -- -- @param Data_Offset The offset in the @Data@ array to mark the position -- of the first byte in each chunk. -- -- @param Byte_Len The number of bytes to read from each chunk. private type X_Coord is mod 5; type Y_Coord is mod 5; type Parallel_State is array (X_Coord, Y_Coord) of VXXI_View; Initialized_State : constant Parallel_State := (others => (others => (others => 0))); end Keccak.Generic_Parallel_KeccakF;
41.725926
88
0.577934
2fbaa67ea3a5994f6f163adc155a2c2176dc4002
3,731
adb
Ada
exercises/ex8/exercise8.adb
Sandbergo/distributed-elevator-controller
5b82858110b8e47e445e26aefd1d55a2dced9957
[ "MIT" ]
null
null
null
exercises/ex8/exercise8.adb
Sandbergo/distributed-elevator-controller
5b82858110b8e47e445e26aefd1d55a2dced9957
[ "MIT" ]
null
null
null
exercises/ex8/exercise8.adb
Sandbergo/distributed-elevator-controller
5b82858110b8e47e445e26aefd1d55a2dced9957
[ "MIT" ]
1
2019-03-13T11:46:35.000Z
2019-03-13T11:46:35.000Z
with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Numerics.Float_Random; use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Numerics.Float_Random; procedure exercise8 is Count_Failed : exception; -- Exception to be raised when counting fails Gen : Generator; -- Random number generator protected type Transaction_Manager (N : Positive) is entry Finished; entry Wait_Until_Aborted; function Commit return Boolean; procedure Signal_Abort; private Finished_Gate_Open : Boolean := False; Aborted : Boolean := False; Should_Commit : Boolean := True; end Transaction_Manager; protected body Transaction_Manager is ------------------------------------------ -- PART 3: Modify the Finished entry entry Finished when Finished_Gate_Open or Finished'Count = N is begin Finished_Gate_Open := Finished'Count /=0; if not Finished_Gate_Open then Aborted := False; end if; end Finished; ------------------------------------------ procedure Signal_Abort is begin Aborted := True; end Signal_Abort; function Commit return Boolean is begin return Should_Commit; end Commit; ------------------------------------------ -- PART 2: Create the Wait_Until_Aborted entry entry Wait_Until_Aborted when Aborted is begin if Wait_Until_Aborted'Count = 0 then Aborted := False; end if; end Wait_Until_Aborted; ------------------------------------------ end Transaction_Manager; function Unreliable_Slow_Add (x : Integer) return Integer is Error_Rate : Constant := 0.15; -- (between 0 and 1) begin if Random(Gen) > Error_Rate then delay Duration(Random(Gen) * 5.0); return X + 10; else delay Duration(Random(Gen) * 1.0); raise Count_Failed; end if; end Unreliable_Slow_Add; task type Transaction_Worker (Initial : Integer; Manager : access Transaction_Manager); task body Transaction_Worker is Num : Integer := Initial; Prev : Integer := Num; Round_Num : Integer := 0; begin Put_Line ("Worker" & Integer'Image(Initial) & " started"); loop Put_Line ("Worker" & Integer'Image(Initial) & " started round" & Integer'Image(Round_Num)); Round_Num := Round_Num + 1; ------------------------------------------ -- PART 1: Select-Then-Abort statement select Manager.Wait_Until_Aborted; Num := Prev + 5; Put_Line (" Worker" & Integer'Image(Initial) & " comitting" & Integer'Image(Num)); then abort begin Num := Unreliable_Slow_Add(Num); Put_Line (" Worker" & Integer'Image(Initial) & " comitting" & Integer'Image(Num)); exception when Count_Failed => Put_Line ("Oh no! Worker" & Integer'Image(Initial) & " failed! Oh no! "); Manager.Signal_Abort; end; Manager.Finished; end select; ------------------------------------------ Prev := Num; delay 0.5; end loop; end Transaction_Worker; Manager : aliased Transaction_Manager (3); Worker_1 : Transaction_Worker (0, Manager'Access); Worker_2 : Transaction_Worker (1, Manager'Access); Worker_3 : Transaction_Worker (2, Manager'Access); begin Reset(Gen); -- Seed the random number generator end exercise8;
33.017699
103
0.543018
a1ea43f5307df237050ded2a0b2ce001dabe4ff2
26,498
ads
Ada
software/hal/hpl/STM32/drivers/stm32-dma.ads
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/stm32-dma.ads
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/stm32-dma.ads
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
3
2017-06-30T14:05:06.000Z
2022-02-17T12:20:45.000Z
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, 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 stm32f4xx_hal_dma.h -- -- @author MCD Application Team -- -- @version V1.1.0 -- -- @date 19-June-2014 -- -- @brief Header file of DMA HAL module. -- -- Extended by Technical University of Munich, Martin Becker -- -- -- COPYRIGHT(c) 2014 STMicroelectronics -- ------------------------------------------------------------------------------ -- This file provides definitions for the DMA controllers on the STM32F4 (ARM -- Cortex M4F) microcontrollers from ST Microelectronics. -- See Application Note AN4031: "Using the STM32F2 and STM32F4 DMA controller" -- and Reference Manual RM0090: "STM32F405xx/07xx, STM32F415xx/17xx, -- STM32F42xxx and STM32F43xxx advanced ARM-based 32-bit MCUs" In the -- application note, see especially section four, titled "Tips and -- warnings while programming the DMA controller" -- The basic call sequence, given a Controller and a Stream, is as follows: -- 1) Configure -- Configures the Controller and Stream per application requirements. This -- is the primary setup call, specifying the static characteristics of all -- the transfers to be performed on the stream, such as the direction, the -- channel, and so forth. The Controller is disabled after the call. -- 2) Configure_Data_Flow -- Sets the dynamic parameters of a given transfer, i.e., the source and -- destination addresses and the number of data items to transfer. -- 3) Enable -- Enables transfers on the Controller and Stream. Transfers will begin -- immediately unless programmed otherwise. -- You can enable some or all DMA interrupts prior to the call to Enable, if -- required by your usage. -- Ensure all the status flags are cleared prior to the call to Enable, since -- a transfer will then begin. This can be accomplished by relying on the fact -- that the board has just powered-up, by a call to Reset, or by a call to -- Clear_All_Status. -- Note that there are convenience routines that do steps two and three: -- Start_Transfer -- Start_Transfer_with_Interrupts pragma Restrictions (No_Elaboration_Code); with System; use System; with Ada.Real_Time; use Ada.Real_Time; private with STM32_SVD.DMA; package STM32.DMA with SPARK_Mode => Off is type DMA_Controller is limited private; -- Do not change the order of the enumerals in the types in this package. -- The underlying canonical representation values are required. type DMA_Stream_Selector is (Stream_0, Stream_1, Stream_2, Stream_3, Stream_4, Stream_5, Stream_6, Stream_7); procedure Enable (Unit : DMA_Controller; Stream : DMA_Stream_Selector) with Inline; -- Before enabling a stream to start a new transfer, the event status flags -- corresponding to the stream must be cleared. Note that the unit may not -- be enabled by the time the call returns. procedure Disable (Unit : DMA_Controller; Stream : DMA_Stream_Selector) with Post => not Enabled (Unit, Stream), Inline; function Enabled (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Boolean with Inline; procedure Reset (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) with Post => not Enabled (Unit, Stream) and Operating_Mode (Unit, Stream) = Normal_Mode and Current_NDT (Unit, Stream) = 0 and Selected_Channel (Unit, Stream) = Channel_0 and Transfer_Direction (Unit, Stream) = Peripheral_To_Memory and not Double_Buffered (Unit, Stream) and not Circular_Mode (Unit, Stream) and Memory_Data_Width (Unit, Stream) = Bytes and Peripheral_Data_Width (Unit, Stream) = Bytes and Priority (Unit, Stream) = Priority_Low and Current_Memory_Buffer (Unit, Stream) = Memory_Buffer_0 and (for all Flag in DMA_Status_Flag => not Status (Unit, Stream, Flag)) and (for all Interrupt in DMA_Interrupt => not Interrupt_Enabled (Unit, Stream, Interrupt)); -- In addition, -- M_Burst = Memory_Burst_Single and -- P_Burst = Peripheral_Burst_Single and -- P_Inc_Offset_Size = 0 and -- M_Inc_Mode = False and -- P_Inc_Mode = False -- Also clears the FIFO control register bits except sets bits to show FIFO -- is empty, and to set the FIFO filling threshold selection to 1/2 full. procedure Configure_Data_Flow (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : Address; Destination : Address; Data_Count : Short) with Pre => not Enabled (Unit, Stream) and Valid_Addresses (Source, Destination) and Compatible_Alignments (Unit, Stream, Source, Destination); -- Sets the source and destination arguments within the specified stream, -- based on the direction previously specified by a call to procedure -- Configure. -- -- Sets the number of data items to be transferred (from 0 to 65535) on -- the specified stream in the next transfer. This is the volume of data to -- be transferred from source to destination. The number specified depends -- only on the peripheral data format, as specified by the record component -- Peripheral_Data_Format passed to a call to Configure. The value to be -- specified is computed as follows: -- -- If the peripheral data format is in units of bytes, the value is -- equal to the total number of bytes contained in the data to be sent. -- -- If the peripheral data format is in units of half-words, the value is -- 1/2 the total number of bytes contained in the data to be sent. -- -- If the peripheral data format is in units of words, the value is -- 1/4 the total number of bytes contained in the data to be sent. -- -- For example, to send a sequence of characters to a USART, the USART -- peripheral format will be in units of bytes so the Data_Count argument -- will be the number of characters (bytes) in the string to be sent. -- In contrast, on a memory-to-memory transfer the most efficient approach -- is to work in units of words. One would therefore specify word units for -- the source and destination formats and then specify 1/4 the total number -- of bytes involved (assuming a four-byte word). procedure Start_Transfer (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : Address; Destination : Address; Data_Count : Short) with Pre => Valid_Addresses (Source, Destination) and Compatible_Alignments (Unit, Stream, Source, Destination) and (for all Flag in DMA_Status_Flag => (not Status (Unit, Stream, Flag))); -- Convenience routine: disables the stream, calls Configure_Data_Flow, -- and then enables the stream to start the transfer. DMA interrupts are -- not enabled by this routine, but could be enabled prior to the call. -- The requirement to clear the flags first is due to the fact that -- the transfer begins immediately at the end of this routine. The -- value specified for Data_Count is as described for procedure -- Configure_Data_Flow. type DMA_Interrupt is (Direct_Mode_Error_Interrupt, Transfer_Error_Interrupt, Half_Transfer_Complete_Interrupt, Transfer_Complete_Interrupt, FIFO_Error_Interrupt); type Interrupt_Selections is array (DMA_Interrupt) of Boolean; procedure Start_Transfer_with_Interrupts (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : Address; Destination : Address; Data_Count : Short; Enabled_Interrupts : Interrupt_Selections := (others => True)) with Pre => Valid_Addresses (Source, Destination) and Compatible_Alignments (Unit, Stream, Source, Destination) and (for all Flag in DMA_Status_Flag => (not Status (Unit, Stream, Flag))); -- Convenience routine: disables the stream, calls Configure_Data_Flow, -- enables the selected DMA interrupts (by default, all of them), and -- then enables the stream to start the transfer. All the selected DMA -- interrupts are enabled, all the others are left unchanged. Interrupts -- are selected for enablement by having a True value in the array at their -- index location. The requirement to clear the flags first is due to the -- fact that the transfer begins immediately at the end of this routine. -- The value specified for Data_Count is as described for procedure -- Configure_Data_Flow. type DMA_Error_Code is (DMA_No_Error, DMA_Transfer_Error, DMA_FIFO_Error, DMA_Direct_Mode_Error, DMA_Timeout_Error, DMA_Device_Error); procedure Abort_Transfer (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Result : out DMA_Error_Code) with Post => not Enabled (Unit, Stream); -- Disables the specified stream and then waits until the request is -- effective. If a stream is disabled while a data transfer is ongoing, the -- current datum will be transferred and the stream will be disabled only -- after the transfer of this single datum completes. type DMA_Transfer_Level is (Full_Transfer, Half_Transfer); procedure Poll_For_Completion (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Expected_Level : DMA_Transfer_Level; Timeout : Time_Span; Result : out DMA_Error_Code); procedure Set_NDT (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Data_Count : Short) with Pre => not Enabled (Unit, Stream), Post => Current_NDT (Unit, Stream) = Data_Count, Inline; -- Sets the number of data items to be transferred on the stream. -- The Data_Count parameter specifies the number of data items to be -- transferred (from 0 to 65535) on the next transfer. The value is -- as described for procedure Configure_Data_Flow. function Items_Transferred (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Short; -- returns the number of items transfetred function Current_NDT (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Short with Inline; -- Returns the value of the NDT register. Should not be used directly, -- as the meaning changes depending on transfer mode. rather use -- Items_Transferred() function Circular_Mode (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Boolean with Inline; procedure Enable_Interrupt (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : DMA_Interrupt) with Post => Interrupt_Enabled (Unit, Stream, Source); -- The postcondition should not be relied upon completely because it is -- possible, under just the wrong conditions, for the interrupt to be -- disabled immediately, prior to return from this routine procedure Disable_Interrupt (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : DMA_Interrupt) with Post => not Interrupt_Enabled (Unit, Stream, Source); function Interrupt_Enabled (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : DMA_Interrupt) return Boolean with Inline; type DMA_Status_Flag is (FIFO_Error_Indicated, Direct_Mode_Error_Indicated, Transfer_Error_Indicated, Half_Transfer_Complete_Indicated, Transfer_Complete_Indicated); procedure Clear_Status (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector; Flag : DMA_Status_Flag) with Post => not Status (Unit, Stream, Flag), Inline; procedure Clear_All_Status (Unit : in out DMA_Controller; Stream : DMA_Stream_Selector) with Post => (for all Indicated in DMA_Status_Flag => not Status (Unit, Stream, Indicated)); function Status (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Flag : DMA_Status_Flag) return Boolean with Inline; -- Returns whether the specified status flag is indicated type DMA_Channel_Selector is (Channel_0, Channel_1, Channel_2, Channel_3, Channel_4, Channel_5, Channel_6, Channel_7); function Selected_Channel (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Channel_Selector with Inline; type DMA_Data_Transfer_Direction is (Peripheral_To_Memory, Memory_To_Peripheral, Memory_To_Memory); -- Note that only DMA_2 is able to do Memory_To_Memory transfers, and that -- in this direction the circular mode is not allowed and the internal FIFO -- must be enabled. function Transfer_Direction (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Data_Transfer_Direction with Inline; type DMA_Data_Transfer_Widths is (Bytes, HalfWords, Words); function Peripheral_Data_Width (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Data_Transfer_Widths with Inline; function Memory_Data_Width (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Data_Transfer_Widths with Inline; type DMA_Mode is (Normal_Mode, Peripheral_Flow_Control_Mode, Circular_Mode); function Operating_Mode (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Mode with Inline; type DMA_Priority_Level is (Priority_Low, Priority_Medium, Priority_High, Priority_Very_High); function Priority (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return DMA_Priority_Level with Inline; type Memory_Buffer_Target is (Memory_Buffer_0, Memory_Buffer_1); function Current_Memory_Buffer (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Memory_Buffer_Target with Inline; procedure Select_Current_Memory_Buffer (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Buffer : Memory_Buffer_Target) with Inline; procedure Set_Memory_Buffer (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Buffer : Memory_Buffer_Target; To : System.Address) with Inline; procedure Configure_Double_Buffered_Mode (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Buffer_0_Value : Address; Buffer_1_Value : Address; First_Buffer_Used : Memory_Buffer_Target) with Pre => not Enabled (Unit, Stream), Post => not Enabled (Unit, Stream) and Current_Memory_Buffer (Unit, Stream) = First_Buffer_Used; -- A convenience routine that in effect calls Set_Memory_Buffer -- once each for Buffer_1_Value and Buffer_2_Value, and then calls -- Select_Current_Memory_Buffer so that First_Buffer_Used is the -- buffer used first when the stream is enabled. procedure Enable_Double_Buffered_Mode (Unit : DMA_Controller; Stream : DMA_Stream_Selector) with Pre => Circular_Mode (Unit, Stream) and Transfer_Direction (Unit, Stream) /= Memory_To_Memory, Post => Double_Buffered (Unit, Stream); procedure Disable_Double_Buffered_Mode (Unit : DMA_Controller; Stream : DMA_Stream_Selector) with Post => not Double_Buffered (Unit, Stream); function Double_Buffered (Unit : DMA_Controller; Stream : DMA_Stream_Selector) return Boolean with Inline; type DMA_FIFO_Threshold_Level is (FIFO_Threshold_1_Quart_Full_Configuration, FIFO_Threshold_Half_Full_Configuration, FIFO_Threshold_3_Quarts_Full_Configuration, FIFO_Threshold_Full_Configuration); type DMA_FIFO_Filling_State is (FIFO_Less1QuarterFull, -- less than 1 quarter full but not empty FIFO_1QuarterFull, -- more than 1 quarter full FIFO_HalfFull, -- more than 1 half full FIFO_3QuartersFull, -- more than 3 quarters full FIFO_Empty, FIFO_Full); type DMA_Memory_Burst is (Memory_Burst_Single, Memory_Burst_Inc4, Memory_Burst_Inc8, Memory_Burst_Inc16); type DMA_Peripheral_Burst is (Peripheral_Burst_Single, Peripheral_Burst_Inc4, Peripheral_Burst_Inc8, Peripheral_Burst_Inc16); type DMA_Stream_Configuration is record -- These are the static, non-varying properties of the transactions -- occurring on the streams to which they are applied (by a call to -- Configure). Other, varying, properties are specified procedurally. -- -- You are not required to specify a value for every component because -- some are only referenced depending on the values for others. Note, -- however, that the default values specified do not represent a valid -- configuration as a whole. Channel : DMA_Channel_Selector := DMA_Channel_Selector'First; -- The channel in the multiplexed connections of controllers, streams, -- and peripherals. It is vital to note that not all peripherals can -- be connected to all streams. The possibilities are organized by -- channels, per controller, as specified by the ST Micro Reference -- Manual in the "DMA Request Mapping" tables. Direction : DMA_Data_Transfer_Direction := DMA_Data_Transfer_Direction'First; Increment_Peripheral_Address : Boolean := False; -- Whether the peripheral address value should be incremented -- automatically after each transfer Increment_Memory_Address : Boolean := False; -- Whether the memory address value should be incremented automatically -- after each transfer Peripheral_Data_Format : DMA_Data_Transfer_Widths := DMA_Data_Transfer_Widths'First; -- The units of data (the format) in which the peripheral side of the -- transaction is expressed. For example, a USART would work in terms -- of bytes. See the description in Configure_Data_Flow. Memory_Data_Format : DMA_Data_Transfer_Widths := DMA_Data_Transfer_Widths'First; -- The units of data (the format) in which the memory side of the -- transaction is expressed. See the description in Configure_Data_Flow. Operation_Mode : DMA_Mode := DMA_Mode'First; -- Note that the circular buffer mode cannot be used if memory-to-memory -- data transfer is configured on the selected Stream Priority : DMA_Priority_Level := DMA_Priority_Level'First; -- The relative priority of the given stream to all other streams FIFO_Enabled : Boolean := False; -- Specifies whether the internal FIFO will be used for the transactions -- occurring on the specified stream. By default the FIFO is disabled by -- the hardware, and so the unit works in the so-called "direct mode" -- instead. Per the Application Note, enabling the FIFO is highly -- advantageous. Note that the direct mode cannot be used if -- memory-to-memory data transfer is configured. The threshold and -- burst sizes are only considered if the FIFO is enabled, and the -- corresponding values are highly dependent upon one another! FIFO_Threshold : DMA_FIFO_Threshold_Level := DMA_FIFO_Threshold_Level'First; -- The threshold at which the FIFO is refilled. It is vital that the -- threshold and burst sizes, if specified, are compatible. See the -- Reference Manual and especially the Application Note. Memory_Burst_Size : DMA_Memory_Burst := DMA_Memory_Burst'First; -- Specifies the amount of data to be transferred in a single non- -- interruptible transaction. Note: The burst mode is possible only if -- the address increment mode is enabled. Peripheral_Burst_Size : DMA_Peripheral_Burst := DMA_Peripheral_Burst'First; -- Specifies the the amount of data to be transferred in -- a single non-interruptible transaction. Note :The burst mode is -- possible only if the address increment mode is enabled. end record; procedure Configure (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Config : DMA_Stream_Configuration) with Post => not Enabled (Unit, Stream); -- This is the primary stream configuration facility. All the static -- properties of the transfers for the given stream are specified here, -- and in some cases, nowhere else (such as the channel). The required -- relationships between the parameters specified in the record are -- not checked, other than by the hardware itself. -- -- Note that not all required properties are specified here. In particular, -- because they can vary per transfer, the source and destination -- addresses, as well as the number of data items to be transferred, -- are specified procedurally via calls to Configure_Data_Flow. function Valid_Addresses (Source, Destination : Address) return Boolean is (Source /= Null_Address and Destination /= Null_Address and Source /= Destination); -- Basic sanity checking for the values function Aligned (This : Address; Width : DMA_Data_Transfer_Widths) return Boolean with Inline; -- Returns whether the address is aligned on a word, half-word, or byte -- boundary function Compatible_Alignments (Unit : DMA_Controller; Stream : DMA_Stream_Selector; Source : Address; Destination : Address) return Boolean is (case Transfer_Direction (Unit, Stream) is when Peripheral_To_Memory | Memory_To_Memory => Aligned (Source, Peripheral_Data_Width (Unit, Stream)) and Aligned (Destination, Memory_Data_Width (Unit, Stream)), when Memory_To_Peripheral => Aligned (Source, Memory_Data_Width (Unit, Stream)) and Aligned (Destination, Peripheral_Data_Width (Unit, Stream))); -- Based on Ref Manual Table 44 and associated text, checks the alignments -- of the addresses against the Peripheral_Data_Format (P_Data_Size) and -- Memory_Data_Format (M_Data_Size) values for the given stream. We use an -- expression function because the semantics are meant to be part of the -- spec of the package, visible as a precondition. private type DMA_Controller is new STM32_SVD.DMA.DMA_Peripheral; end STM32.DMA;
41.274143
79
0.64118
4109896d2cba27c1b992e6dcbd3b249899cc90df
4,170
ads
Ada
source/amf/mof/cmof/amf-cmof.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.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.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, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ package AMF.CMOF is pragma Preelaborate; type CMOF_Parameter_Direction_Kind is (In_Parameter, In_Out_Parameter, Out_Parameter, Return_Parameter); type CMOF_Visibility_Kind is (Public_Visibility, Private_Visibility, Protected_Visibility, Package_Visibility); type Optional_CMOF_Visibility_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when False => Value : CMOF_Visibility_Kind; when True => null; end case; end record; type Optional_CMOF_Parameter_Direction_Kind (Is_Empty : Boolean := True) is record case Is_Empty is when False => Value : CMOF_Parameter_Direction_Kind; when True => null; end case; end record; end AMF.CMOF;
49.642857
78
0.436451
20b825fcc2408ed6c3c74f2c4329547155490e88
718
adb
Ada
tests/exec/print_int.adb
xuedong/mini-ada
59a8b966cf50ba22a3b5a7cb449f671e4da32e44
[ "MIT" ]
null
null
null
tests/exec/print_int.adb
xuedong/mini-ada
59a8b966cf50ba22a3b5a7cb449f671e4da32e44
[ "MIT" ]
1
2019-03-10T19:13:21.000Z
2019-03-10T19:19:46.000Z
tests/exec/print_int.adb
xuedong/mini-ada
59a8b966cf50ba22a3b5a7cb449f671e4da32e44
[ "MIT" ]
null
null
null
with Ada.Text_IO; use Ada.Text_IO; procedure Print_int is procedure PrintInt(N: Integer) is C: Integer := N rem 10; begin if N > 9 then PrintInt(N / 10); end if; Put(Character'Val(48 + C)); end; procedure PrintSInt(N: Integer) is C: Integer := N rem 10; begin if N >= 0 then Printint(N); return; end if; Put('-'); if N < -9 then Printint(- N / 10); end if; Put(Character'Val(48 - C)); end; begin PrintsInt(-2147483648); New_Line; for N in -17 .. 42 loop Printsint(N); New_Line; end loop; PrintsInt(2147483647); New_Line; end; -- Local Variables: -- compile-command: "gnatmake print_int.adb && ./print_int" -- End:
20.514286
60
0.587744
2f3d82b8c07e9540b2f58b7da06559d44ec7946f
16,956
ads
Ada
arch/ARM/STM32/svd/stm32l4x3/stm32_svd-dma.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/svd/stm32l4x3/stm32_svd-dma.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
null
null
null
arch/ARM/STM32/svd/stm32l4x3/stm32_svd-dma.ads
morbos/Ada_Drivers_Library
a4ab26799be60997c38735f4056160c4af597ef7
[ "BSD-3-Clause" ]
null
null
null
-- This spec has been automatically generated from STM32L4x3.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.DMA is pragma Preelaborate; --------------- -- Registers -- --------------- -- interrupt status register type ISR_Register is record -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF1 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF1 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF1 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF1 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF2 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF2 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF2 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF2 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF3 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF3 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF3 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF3 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF4 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF4 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF4 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF4 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF5 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF5 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF5 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF5 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF6 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF6 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF6 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF6 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF7 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF7 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF7 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF7 : Boolean; -- unspecified Reserved_28_31 : HAL.UInt4; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record GIF1 at 0 range 0 .. 0; TCIF1 at 0 range 1 .. 1; HTIF1 at 0 range 2 .. 2; TEIF1 at 0 range 3 .. 3; GIF2 at 0 range 4 .. 4; TCIF2 at 0 range 5 .. 5; HTIF2 at 0 range 6 .. 6; TEIF2 at 0 range 7 .. 7; GIF3 at 0 range 8 .. 8; TCIF3 at 0 range 9 .. 9; HTIF3 at 0 range 10 .. 10; TEIF3 at 0 range 11 .. 11; GIF4 at 0 range 12 .. 12; TCIF4 at 0 range 13 .. 13; HTIF4 at 0 range 14 .. 14; TEIF4 at 0 range 15 .. 15; GIF5 at 0 range 16 .. 16; TCIF5 at 0 range 17 .. 17; HTIF5 at 0 range 18 .. 18; TEIF5 at 0 range 19 .. 19; GIF6 at 0 range 20 .. 20; TCIF6 at 0 range 21 .. 21; HTIF6 at 0 range 22 .. 22; TEIF6 at 0 range 23 .. 23; GIF7 at 0 range 24 .. 24; TCIF7 at 0 range 25 .. 25; HTIF7 at 0 range 26 .. 26; TEIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- interrupt flag clear register type IFCR_Register is record -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF1 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF1 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF1 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF1 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF2 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF2 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF2 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF2 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF3 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF3 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF3 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF3 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF4 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF4 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF4 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF4 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF5 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF5 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF5 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF5 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF6 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF6 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF6 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF6 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF7 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF7 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF7 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF7 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for IFCR_Register use record CGIF1 at 0 range 0 .. 0; CTCIF1 at 0 range 1 .. 1; CHTIF1 at 0 range 2 .. 2; CTEIF1 at 0 range 3 .. 3; CGIF2 at 0 range 4 .. 4; CTCIF2 at 0 range 5 .. 5; CHTIF2 at 0 range 6 .. 6; CTEIF2 at 0 range 7 .. 7; CGIF3 at 0 range 8 .. 8; CTCIF3 at 0 range 9 .. 9; CHTIF3 at 0 range 10 .. 10; CTEIF3 at 0 range 11 .. 11; CGIF4 at 0 range 12 .. 12; CTCIF4 at 0 range 13 .. 13; CHTIF4 at 0 range 14 .. 14; CTEIF4 at 0 range 15 .. 15; CGIF5 at 0 range 16 .. 16; CTCIF5 at 0 range 17 .. 17; CHTIF5 at 0 range 18 .. 18; CTEIF5 at 0 range 19 .. 19; CGIF6 at 0 range 20 .. 20; CTCIF6 at 0 range 21 .. 21; CHTIF6 at 0 range 22 .. 22; CTEIF6 at 0 range 23 .. 23; CGIF7 at 0 range 24 .. 24; CTCIF7 at 0 range 25 .. 25; CHTIF7 at 0 range 26 .. 26; CTEIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype CCR_PSIZE_Field is HAL.UInt2; subtype CCR_MSIZE_Field is HAL.UInt2; subtype CCR_PL_Field is HAL.UInt2; -- channel x configuration register type CCR_Register is record -- Channel enable EN : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Data transfer direction DIR : Boolean := False; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral size PSIZE : CCR_PSIZE_Field := 16#0#; -- Memory size MSIZE : CCR_MSIZE_Field := 16#0#; -- Channel priority level PL : CCR_PL_Field := 16#0#; -- Memory to memory mode MEM2MEM : Boolean := False; -- unspecified Reserved_15_31 : HAL.UInt17 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record EN at 0 range 0 .. 0; TCIE at 0 range 1 .. 1; HTIE at 0 range 2 .. 2; TEIE at 0 range 3 .. 3; DIR at 0 range 4 .. 4; CIRC at 0 range 5 .. 5; PINC at 0 range 6 .. 6; MINC at 0 range 7 .. 7; PSIZE at 0 range 8 .. 9; MSIZE at 0 range 10 .. 11; PL at 0 range 12 .. 13; MEM2MEM at 0 range 14 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; subtype CNDTR_NDT_Field is HAL.UInt16; -- channel x number of data register type CNDTR_Register is record -- Number of data to transfer NDT : CNDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CNDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CSELR_C1S_Field is HAL.UInt4; subtype CSELR_C2S_Field is HAL.UInt4; subtype CSELR_C3S_Field is HAL.UInt4; subtype CSELR_C4S_Field is HAL.UInt4; subtype CSELR_C5S_Field is HAL.UInt4; subtype CSELR_C6S_Field is HAL.UInt4; subtype CSELR_C7S_Field is HAL.UInt4; -- channel selection register type CSELR_Register is record -- DMA channel 1 selection C1S : CSELR_C1S_Field := 16#0#; -- DMA channel 2 selection C2S : CSELR_C2S_Field := 16#0#; -- DMA channel 3 selection C3S : CSELR_C3S_Field := 16#0#; -- DMA channel 4 selection C4S : CSELR_C4S_Field := 16#0#; -- DMA channel 5 selection C5S : CSELR_C5S_Field := 16#0#; -- DMA channel 6 selection C6S : CSELR_C6S_Field := 16#0#; -- DMA channel 7 selection C7S : CSELR_C7S_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CSELR_Register use record C1S at 0 range 0 .. 3; C2S at 0 range 4 .. 7; C3S at 0 range 8 .. 11; C4S at 0 range 12 .. 15; C5S at 0 range 16 .. 19; C6S at 0 range 20 .. 23; C7S at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Direct memory access controller type DMA_Peripheral is record -- interrupt status register ISR : aliased ISR_Register; -- interrupt flag clear register IFCR : aliased IFCR_Register; -- channel x configuration register CCR1 : aliased CCR_Register; -- channel x number of data register CNDTR1 : aliased CNDTR_Register; -- channel x peripheral address register CPAR1 : aliased HAL.UInt32; -- channel x memory address register CMAR1 : aliased HAL.UInt32; -- channel x configuration register CCR2 : aliased CCR_Register; -- channel x number of data register CNDTR2 : aliased CNDTR_Register; -- channel x peripheral address register CPAR2 : aliased HAL.UInt32; -- channel x memory address register CMAR2 : aliased HAL.UInt32; -- channel x configuration register CCR3 : aliased CCR_Register; -- channel x number of data register CNDTR3 : aliased CNDTR_Register; -- channel x peripheral address register CPAR3 : aliased HAL.UInt32; -- channel x memory address register CMAR3 : aliased HAL.UInt32; -- channel x configuration register CCR4 : aliased CCR_Register; -- channel x number of data register CNDTR4 : aliased CNDTR_Register; -- channel x peripheral address register CPAR4 : aliased HAL.UInt32; -- channel x memory address register CMAR4 : aliased HAL.UInt32; -- channel x configuration register CCR5 : aliased CCR_Register; -- channel x number of data register CNDTR5 : aliased CNDTR_Register; -- channel x peripheral address register CPAR5 : aliased HAL.UInt32; -- channel x memory address register CMAR5 : aliased HAL.UInt32; -- channel x configuration register CCR6 : aliased CCR_Register; -- channel x number of data register CNDTR6 : aliased CNDTR_Register; -- channel x peripheral address register CPAR6 : aliased HAL.UInt32; -- channel x memory address register CMAR6 : aliased HAL.UInt32; -- channel x configuration register CCR7 : aliased CCR_Register; -- channel x number of data register CNDTR7 : aliased CNDTR_Register; -- channel x peripheral address register CPAR7 : aliased HAL.UInt32; -- channel x memory address register CMAR7 : aliased HAL.UInt32; -- channel selection register CSELR : aliased CSELR_Register; end record with Volatile; for DMA_Peripheral use record ISR at 16#0# range 0 .. 31; IFCR at 16#4# range 0 .. 31; CCR1 at 16#8# range 0 .. 31; CNDTR1 at 16#C# range 0 .. 31; CPAR1 at 16#10# range 0 .. 31; CMAR1 at 16#14# range 0 .. 31; CCR2 at 16#1C# range 0 .. 31; CNDTR2 at 16#20# range 0 .. 31; CPAR2 at 16#24# range 0 .. 31; CMAR2 at 16#28# range 0 .. 31; CCR3 at 16#30# range 0 .. 31; CNDTR3 at 16#34# range 0 .. 31; CPAR3 at 16#38# range 0 .. 31; CMAR3 at 16#3C# range 0 .. 31; CCR4 at 16#44# range 0 .. 31; CNDTR4 at 16#48# range 0 .. 31; CPAR4 at 16#4C# range 0 .. 31; CMAR4 at 16#50# range 0 .. 31; CCR5 at 16#58# range 0 .. 31; CNDTR5 at 16#5C# range 0 .. 31; CPAR5 at 16#60# range 0 .. 31; CMAR5 at 16#64# range 0 .. 31; CCR6 at 16#6C# range 0 .. 31; CNDTR6 at 16#70# range 0 .. 31; CPAR6 at 16#74# range 0 .. 31; CMAR6 at 16#78# range 0 .. 31; CCR7 at 16#80# range 0 .. 31; CNDTR7 at 16#84# range 0 .. 31; CPAR7 at 16#88# range 0 .. 31; CMAR7 at 16#8C# range 0 .. 31; CSELR at 16#A8# range 0 .. 31; end record; -- Direct memory access controller DMA1_Periph : aliased DMA_Peripheral with Import, Address => DMA1_Base; -- Direct memory access controller DMA2_Periph : aliased DMA_Peripheral with Import, Address => DMA2_Base; end STM32_SVD.DMA;
39.159353
67
0.537096
31a93f505bf8e74eac13b27c19eeb02a2f27a2ae
11,766
adb
Ada
source/amf/mof/xmi/amf-internals-xmi_readers.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/mof/xmi/amf-internals-xmi_readers.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/mof/xmi/amf-internals-xmi_readers.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-2014, Vadim Godunko <[email protected]> -- -- 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 Ada.Unchecked_Deallocation; with XML.SAX.Input_Sources; with XML.SAX.Parse_Exceptions.Internals; with XML.SAX.Simple_Readers; with AMF.CMOF.Associations; with AMF.CMOF.Properties.Collections; pragma Unreferenced (AMF.CMOF.Properties.Collections); -- XXX GNAT Pro 7.1.0w (20120405) reports unused package. with AMF.Internals.XMI_Entity_Resolvers; with AMF.Internals.XMI_Handlers; package body AMF.Internals.XMI_Readers is ------------------- -- Error_Handler -- ------------------- function Error_Handler (Self : XMI_Reader'Class) return AMF.XMI.Error_Handlers.XMI_Error_Handler_Access is begin return Self.Error_Handler; end Error_Handler; -------------------- -- Establish_Link -- -------------------- procedure Establish_Link (Extent : not null AMF.URI_Stores.URI_Store_Access; Attribute : not null AMF.CMOF.Properties.CMOF_Property_Access; One_Element : not null AMF.Elements.Element_Access; Other_Element : not null AMF.Elements.Element_Access) is use type AMF.CMOF.Properties.CMOF_Property_Access; Association : constant AMF.CMOF.Associations.CMOF_Association_Access := Attribute.Get_Association; begin -- This subprograms take in sense constraint of MOF meta models to -- handle potentially duplicated links: -- -- "[12] An Association has exactly 2 memberEnds, may never have a -- navigableOwnedEnd (they will always be owned by Classes) and may have -- at most one ownedEnd." if Association.Get_Owned_End.Length = 1 then -- One of the ends is owned by association, link must be created -- even when order of ends is reversed. if Association.Get_Member_End.Element (1) = Attribute then Extent.Create_Link (Association, One_Element, Other_Element); else Extent.Create_Link (Association, Other_Element, One_Element); end if; else -- None of ends are owned by association, link is created when -- specified attribute is a first end of the association to prevent -- duplicate links. if Association.Get_Member_End.Element (1) = Attribute then Extent.Create_Link (Association, One_Element, Other_Element); end if; end if; end Establish_Link; ------------------------------- -- Load_Referenced_Documents -- ------------------------------- function Load (Self : in out XMI_Reader'Class; Document_URI : League.Strings.Universal_String) return AMF.URI_Stores.URI_Store_Access is use type AMF.Elements.Element_Access; use type AMF.URI_Stores.URI_Store_Access; use type League.Strings.Universal_String; procedure Free is new Ada.Unchecked_Deallocation (XML.SAX.Input_Sources.SAX_Input_Source'Class, XML.SAX.Input_Sources.SAX_Input_Source_Access); Result : AMF.URI_Stores.URI_Store_Access; begin -- Insert requested document into the queue. Self.URI_Queue.Include (Document_URI); -- Load all referenced documents. declare Position : Universal_String_Sets.Cursor; URI : League.Strings.Universal_String; begin while not Self.URI_Queue.Is_Empty loop Position := Self.URI_Queue.First; URI := Universal_String_Sets.Element (Position); Self.URI_Queue.Delete (Position); -- Load document only when it is not loaded already. Some -- documents with circular dependencies can register loading of -- document when its loading was started but not completed yet. -- -- XXX This need to be reviewed for new architecture of XMI -- reader. declare Source : XML.SAX.Input_Sources.SAX_Input_Source_Access; Resolver : aliased AMF.Internals.XMI_Entity_Resolvers.XMI_Entity_Resolver; Reader : aliased XML.SAX.Simple_Readers.Simple_Reader; Handler : aliased AMF.Internals.XMI_Handlers.XMI_Handler (Self'Access); Success : Boolean := True; begin -- Resolve XMI document. Self.Resolver.Resolve_Document (URI, Source, Success); -- Load document when it was resolved successfuly. -- -- XXX It can be reasonable to report error here. if Success then Reader.Set_Content_Handler (Handler'Unchecked_Access); Reader.Set_Error_Handler (Handler'Unchecked_Access); Reader.Set_Entity_Resolver (Resolver'Unchecked_Access); Reader.Parse (Source); -- Register loaded extent. Documents.Insert (Source.System_Id, Handler.Extent); if Result = null then Result := Handler.Extent; end if; end if; -- Deallocate input source. Free (Source); end; end loop; end; -- Resolve cross-document links. declare Link : Cross_Document_Link; Element : AMF.Elements.Element_Access; Success : Boolean; Position : Cross_Document_Link_Vectors.Cursor := Self.Cross_Links.First; begin while Cross_Document_Link_Vectors.Has_Element (Position) loop Link := Cross_Document_Link_Vectors.Element (Position); Element := null; Success := True; -- Lookup for document and element in the document. declare Position : constant Universal_String_Extent_Maps.Cursor := Documents.Find (Link.Document_URI); begin if Universal_String_Extent_Maps.Has_Element (Position) then Element := Universal_String_Extent_Maps.Element (Position).Element (Link.Element_Id); end if; end; -- Establish link when element was resolved, otherwise report -- error. if Element /= null then Establish_Link (Link.Extent, Link.Attribute, Link.Element, Element); else Self.Error_Handler.Error (XML.SAX.Parse_Exceptions.Internals.Create (Public_Id => Link.Public_Id, System_Id => Link.System_Id, Line => Link.Line, Column => Link.Column, Message => "Unknown element '" & Link.Document_URI & '#' & Link.Element_Id & "'"), Success); if not Success then -- Error handling is not implemented. raise Program_Error; end if; end if; Cross_Document_Link_Vectors.Next (Position); end loop; end; return Result; end Load; ---------------------------------- -- Postpone_Cross_Document_Link -- ---------------------------------- procedure Postpone_Cross_Document_Link (Self : in out XMI_Reader'Class; Element : AMF.Elements.Element_Access; Attribute : AMF.CMOF.Properties.CMOF_Property_Access; Extent : AMF.URI_Stores.URI_Store_Access; Document_URI : League.Strings.Universal_String; Element_Id : League.Strings.Universal_String; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Line : Natural; Column : Natural) is begin -- Include document into the document queue. Self.URI_Queue.Include (Document_URI); Self.Cross_Links.Append ((Element => Element, Attribute => Attribute, Extent => Extent, Document_URI => Document_URI, Element_Id => Element_Id, Public_Id => Public_Id, System_Id => System_Id, Line => Line, Column => Column)); end Postpone_Cross_Document_Link; end AMF.Internals.XMI_Readers;
39.75
79
0.526772
2969d558e66ec96df6e9f15d52c4e3ba794584de
1,668
ads
Ada
llvm-gcc-4.2-2.9/gcc/ada/a-intnam.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.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/a-intnam.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . I N T E R R U P T S . N A M E S -- -- -- -- S p e c -- -- -- -- This specification is adapted from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ -- The standard implementation of this spec contains only dummy interrupt -- names. These dummy entries permit checking out code for correctness of -- semantics, even if interrupts are not supported. -- For specific implementations that fully support interrupts, this package -- spec is replaced by an implementation dependent version that defines the -- interrupts available on the system. package Ada.Interrupts.Names is DUMMY_INTERRUPT_1 : constant Interrupt_ID := 1; DUMMY_INTERRUPT_2 : constant Interrupt_ID := 2; end Ada.Interrupts.Names;
55.6
78
0.431655
fb905d46ee91ec3aeab7add31350006c7eb66e9c
4,351
ads
Ada
source/amf/mof/cmof/amf-cmof-enumerations.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-enumerations.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-enumerations.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, Vadim Godunko <[email protected]> -- -- 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. ------------------------------------------------------------------------------ -- An enumeration is a data type whose values are enumerated in the model as -- enumeration literals. ------------------------------------------------------------------------------ with AMF.CMOF.Data_Types; limited with AMF.CMOF.Enumeration_Literals.Collections; package AMF.CMOF.Enumerations is pragma Preelaborate; type CMOF_Enumeration is limited interface and AMF.CMOF.Data_Types.CMOF_Data_Type; type CMOF_Enumeration_Access is access all CMOF_Enumeration'Class; for CMOF_Enumeration_Access'Storage_Size use 0; not overriding function Get_Owned_Literal (Self : not null access constant CMOF_Enumeration) return AMF.CMOF.Enumeration_Literals.Collections.Ordered_Set_Of_CMOF_Enumeration_Literal is abstract; -- Getter of Enumeration::ownedLiteral. -- -- The ordered set of literals for this Enumeration. end AMF.CMOF.Enumerations;
61.28169
108
0.450011
298132069030cd7949c002de0d2146675d4726f7
2,542
ads
Ada
src/audio-riff.ads
Ada-Audio/audio_base
8646d0adc2be09c57dd16952a329c4342e5ddb3b
[ "MIT" ]
2
2021-01-08T04:28:27.000Z
2021-01-08T06:38:40.000Z
src/audio-riff.ads
Ada-Audio/audio_base
8646d0adc2be09c57dd16952a329c4342e5ddb3b
[ "MIT" ]
null
null
null
src/audio-riff.ads
Ada-Audio/audio_base
8646d0adc2be09c57dd16952a329c4342e5ddb3b
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- AUDIO -- -- -- -- Common RIFF information -- -- -- -- The MIT License (MIT) -- -- -- -- Copyright (c) 2015 -- 2020 Gustavo A. Hoffmann -- -- -- -- 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, 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 AUTHORS OR 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. -- ------------------------------------------------------------------------------ with Interfaces; use Interfaces; package Audio.RIFF with Pure is subtype FOURCC_String is String (1 .. 4); type RIFF_Chunk_Header is record ID : FOURCC_String; Size : Unsigned_32; end record; end Audio.RIFF;
57.772727
78
0.418961
59f048f574476486234b01b22dac86d4ccde465f
27,812
ads
Ada
src/gen/cups-cups_raster_h.ads
persan/a-cups
f011dc18384de9afd07a53b67295974d8005cf21
[ "Apache-2.0" ]
null
null
null
src/gen/cups-cups_raster_h.ads
persan/a-cups
f011dc18384de9afd07a53b67295974d8005cf21
[ "Apache-2.0" ]
null
null
null
src/gen/cups-cups_raster_h.ads
persan/a-cups
f011dc18384de9afd07a53b67295974d8005cf21
[ "Apache-2.0" ]
null
null
null
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with System; with CUPS.stdio_h; with Interfaces.C_Streams; with CUPS.cups_ppd_h; with CUPS.cups_cups_h; with Interfaces.C.Strings; private package CUPS.cups_raster_h is CUPS_RASTER_SYNC : constant := 16#52615333#; -- cups/raster.h:49 CUPS_RASTER_REVSYNC : constant := 16#33536152#; -- cups/raster.h:50 CUPS_RASTER_SYNCv1 : constant := 16#52615374#; -- cups/raster.h:52 CUPS_RASTER_REVSYNCv1 : constant := 16#74536152#; -- cups/raster.h:53 CUPS_RASTER_SYNCv2 : constant := 16#52615332#; -- cups/raster.h:55 CUPS_RASTER_REVSYNCv2 : constant := 16#32536152#; -- cups/raster.h:56 -- unsupported macro: CUPS_RASTER_SYNC_PWG CUPS_RASTER_SYNCv2 CUPS_RASTER_HAVE_COLORIMETRIC : constant := 1; -- cups/raster.h:67 CUPS_RASTER_HAVE_DEVICE : constant := 1; -- cups/raster.h:74 CUPS_RASTER_HAVE_PWGRASTER : constant := 1; -- cups/raster.h:80 -- * "$Id: raster.h 4027 2012-11-16 01:00:05Z msweet $" -- * -- * Raster file definitions for CUPS. -- * -- * Copyright 2007-2012 by Apple Inc. -- * Copyright 1997-2006 by Easy Software Products. -- * -- * This file is part of the CUPS Imaging library. -- * -- * These coded instructions, statements, and computer programs are the -- * property of Apple Inc. and are protected by Federal copyright -- * law. Distribution and use rights are outlined in the file "LICENSE.txt" -- * which should have been included with this file. If this file is -- * file is missing or damaged, see the license at "http://www.cups.org/". -- * -- * This file is subject to the Apple OS-Developed Software exception. -- -- * Include necessary headers... -- -- * Every non-PostScript printer driver that supports raster images -- * should use the application/vnd.cups-raster image file format. -- * Since both the PostScript RIP (pstoraster, based on GNU/GPL -- * Ghostscript) and Image RIP (imagetoraster, located in the filter -- * directory) use it, using this format saves you a lot of work. -- * Also, the PostScript RIP passes any printer options that are in -- * a PS file to your driver this way as well... -- -- * Constants... -- -- * The following definition can be used to determine if the -- * colorimetric colorspaces (CIEXYZ, CIELAB, and ICCn) are -- * defined... -- -- * The following definition can be used to determine if the -- * device colorspaces (DEVICEn) are defined... -- -- * The following definition can be used to determine if PWG Raster is supported. -- -- * Types... -- --*** AdvanceMedia attribute values *** type cups_adv_e is (CUPS_ADVANCE_NONE, CUPS_ADVANCE_FILE, CUPS_ADVANCE_JOB, CUPS_ADVANCE_SET, CUPS_ADVANCE_PAGE); pragma Convention (C, cups_adv_e); -- cups/raster.h:87 -- Never advance the roll -- Advance the roll after this file -- Advance the roll after this job -- Advance the roll after this set -- Advance the roll after this page subtype cups_adv_t is cups_adv_e; --*** Boolean type *** type cups_bool_e is (CUPS_FALSE, CUPS_TRUE); pragma Convention (C, cups_bool_e); -- cups/raster.h:96 -- Logical false -- Logical true subtype cups_bool_t is cups_bool_e; --*** cupsColorSpace attribute values *** subtype cups_cspace_e is unsigned; CUPS_CSPACE_W : constant cups_cspace_e := 0; CUPS_CSPACE_RGB : constant cups_cspace_e := 1; CUPS_CSPACE_RGBA : constant cups_cspace_e := 2; CUPS_CSPACE_K : constant cups_cspace_e := 3; CUPS_CSPACE_CMY : constant cups_cspace_e := 4; CUPS_CSPACE_YMC : constant cups_cspace_e := 5; CUPS_CSPACE_CMYK : constant cups_cspace_e := 6; CUPS_CSPACE_YMCK : constant cups_cspace_e := 7; CUPS_CSPACE_KCMY : constant cups_cspace_e := 8; CUPS_CSPACE_KCMYcm : constant cups_cspace_e := 9; CUPS_CSPACE_GMCK : constant cups_cspace_e := 10; CUPS_CSPACE_GMCS : constant cups_cspace_e := 11; CUPS_CSPACE_WHITE : constant cups_cspace_e := 12; CUPS_CSPACE_GOLD : constant cups_cspace_e := 13; CUPS_CSPACE_SILVER : constant cups_cspace_e := 14; CUPS_CSPACE_CIEXYZ : constant cups_cspace_e := 15; CUPS_CSPACE_CIELab : constant cups_cspace_e := 16; CUPS_CSPACE_RGBW : constant cups_cspace_e := 17; CUPS_CSPACE_SW : constant cups_cspace_e := 18; CUPS_CSPACE_SRGB : constant cups_cspace_e := 19; CUPS_CSPACE_ADOBERGB : constant cups_cspace_e := 20; CUPS_CSPACE_ICC1 : constant cups_cspace_e := 32; CUPS_CSPACE_ICC2 : constant cups_cspace_e := 33; CUPS_CSPACE_ICC3 : constant cups_cspace_e := 34; CUPS_CSPACE_ICC4 : constant cups_cspace_e := 35; CUPS_CSPACE_ICC5 : constant cups_cspace_e := 36; CUPS_CSPACE_ICC6 : constant cups_cspace_e := 37; CUPS_CSPACE_ICC7 : constant cups_cspace_e := 38; CUPS_CSPACE_ICC8 : constant cups_cspace_e := 39; CUPS_CSPACE_ICC9 : constant cups_cspace_e := 40; CUPS_CSPACE_ICCA : constant cups_cspace_e := 41; CUPS_CSPACE_ICCB : constant cups_cspace_e := 42; CUPS_CSPACE_ICCC : constant cups_cspace_e := 43; CUPS_CSPACE_ICCD : constant cups_cspace_e := 44; CUPS_CSPACE_ICCE : constant cups_cspace_e := 45; CUPS_CSPACE_ICCF : constant cups_cspace_e := 46; CUPS_CSPACE_DEVICE1 : constant cups_cspace_e := 48; CUPS_CSPACE_DEVICE2 : constant cups_cspace_e := 49; CUPS_CSPACE_DEVICE3 : constant cups_cspace_e := 50; CUPS_CSPACE_DEVICE4 : constant cups_cspace_e := 51; CUPS_CSPACE_DEVICE5 : constant cups_cspace_e := 52; CUPS_CSPACE_DEVICE6 : constant cups_cspace_e := 53; CUPS_CSPACE_DEVICE7 : constant cups_cspace_e := 54; CUPS_CSPACE_DEVICE8 : constant cups_cspace_e := 55; CUPS_CSPACE_DEVICE9 : constant cups_cspace_e := 56; CUPS_CSPACE_DEVICEA : constant cups_cspace_e := 57; CUPS_CSPACE_DEVICEB : constant cups_cspace_e := 58; CUPS_CSPACE_DEVICEC : constant cups_cspace_e := 59; CUPS_CSPACE_DEVICED : constant cups_cspace_e := 60; CUPS_CSPACE_DEVICEE : constant cups_cspace_e := 61; CUPS_CSPACE_DEVICEF : constant cups_cspace_e := 62; -- cups/raster.h:102 -- Luminance (DeviceGray, gamma 2.2 by default) -- Red, green, blue (DeviceRGB, sRGB by default) -- Red, green, blue, alpha (DeviceRGB, sRGB by default) -- Black (DeviceK) -- Cyan, magenta, yellow (DeviceCMY) -- Yellow, magenta, cyan @deprecated@ -- Cyan, magenta, yellow, black (DeviceCMYK) -- Yellow, magenta, cyan, black @deprecated@ -- Black, cyan, magenta, yellow @deprecated@ -- Black, cyan, magenta, yellow, light-cyan, light-magenta @deprecated@ -- Gold, magenta, yellow, black @deprecated@ -- Gold, magenta, yellow, silver @deprecated@ -- White ink (as black) @deprecated@ -- Gold foil @deprecated@ -- Silver foil @deprecated@ -- CIE XYZ @since CUPS 1.1.19/OS X 10.3@ -- CIE Lab @since CUPS 1.1.19/OS X 10.3@ -- Red, green, blue, white (DeviceRGB, sRGB by default) @since CUPS 1.2/OS X 10.5@ -- Luminance (gamma 2.2) @since CUPS 1.4.5@ -- Red, green, blue (sRGB) @since CUPS 1.4.5@ -- Red, green, blue (Adobe RGB) @since CUPS 1.4.5@ -- ICC-based, 1 color @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 2 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 3 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 4 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 5 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 6 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 7 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 8 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 9 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 10 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 11 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 12 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 13 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 14 colors @since CUPS 1.1.19/OS X 10.3@ -- ICC-based, 15 colors @since CUPS 1.1.19/OS X 10.3@ -- DeviceN, 1 color @since CUPS 1.4.5@ -- DeviceN, 2 colors @since CUPS 1.4.5@ -- DeviceN, 3 colors @since CUPS 1.4.5@ -- DeviceN, 4 colors @since CUPS 1.4.5@ -- DeviceN, 5 colors @since CUPS 1.4.5@ -- DeviceN, 6 colors @since CUPS 1.4.5@ -- DeviceN, 7 colors @since CUPS 1.4.5@ -- DeviceN, 8 colors @since CUPS 1.4.5@ -- DeviceN, 9 colors @since CUPS 1.4.5@ -- DeviceN, 10 colors @since CUPS 1.4.5@ -- DeviceN, 11 colors @since CUPS 1.4.5@ -- DeviceN, 12 colors @since CUPS 1.4.5@ -- DeviceN, 13 colors @since CUPS 1.4.5@ -- DeviceN, 14 colors @since CUPS 1.4.5@ -- DeviceN, 15 colors @since CUPS 1.4.5@ subtype cups_cspace_t is cups_cspace_e; --*** CutMedia attribute values *** type cups_cut_e is (CUPS_CUT_NONE, CUPS_CUT_FILE, CUPS_CUT_JOB, CUPS_CUT_SET, CUPS_CUT_PAGE); pragma Convention (C, cups_cut_e); -- cups/raster.h:160 -- Never cut the roll -- Cut the roll after this file -- Cut the roll after this job -- Cut the roll after this set -- Cut the roll after this page subtype cups_cut_t is cups_cut_e; --*** LeadingEdge attribute values *** type cups_edge_e is (CUPS_EDGE_TOP, CUPS_EDGE_RIGHT, CUPS_EDGE_BOTTOM, CUPS_EDGE_LEFT); pragma Convention (C, cups_edge_e); -- cups/raster.h:169 -- Leading edge is the top of the page -- Leading edge is the right of the page -- Leading edge is the bottom of the page -- Leading edge is the left of the page subtype cups_edge_t is cups_edge_e; --*** Jog attribute values *** type cups_jog_e is (CUPS_JOG_NONE, CUPS_JOG_FILE, CUPS_JOG_JOB, CUPS_JOG_SET); pragma Convention (C, cups_jog_e); -- cups/raster.h:177 -- Never move pages -- Move pages after this file -- Move pages after this job -- Move pages after this set subtype cups_jog_t is cups_jog_e; --*** cupsRasterOpen modes *** type cups_mode_e is (CUPS_RASTER_READ, CUPS_RASTER_WRITE, CUPS_RASTER_WRITE_COMPRESSED, CUPS_RASTER_WRITE_PWG); pragma Convention (C, cups_mode_e); -- cups/raster.h:185 -- Open stream for reading -- Open stream for writing -- Open stream for compressed writing @since CUPS 1.3/OS X 10.5@ -- Open stream for compressed writing in PWG mode @since CUPS 1.5/OS X 10.7@ --*** cupsRasterOpen modes *** subtype cups_mode_t is cups_mode_e; --*** cupsColorOrder attribute values *** type cups_order_e is (CUPS_ORDER_CHUNKED, CUPS_ORDER_BANDED, CUPS_ORDER_PLANAR); pragma Convention (C, cups_order_e); -- cups/raster.h:195 -- CMYK CMYK CMYK ... -- CCC MMM YYY KKK ... -- CCC ... MMM ... YYY ... KKK ... subtype cups_order_t is cups_order_e; --*** Orientation attribute values *** type cups_orient_e is (CUPS_ORIENT_0, CUPS_ORIENT_90, CUPS_ORIENT_180, CUPS_ORIENT_270); pragma Convention (C, cups_orient_e); -- cups/raster.h:202 -- Don't rotate the page -- Rotate the page counter-clockwise -- Turn the page upside down -- Rotate the page clockwise subtype cups_orient_t is cups_orient_e; -- * The page header structure contains the standard PostScript page device -- * dictionary, along with some CUPS-specific parameters that are provided -- * by the RIPs... -- * -- * The API supports a "version 1" (from CUPS 1.0 and 1.1) and a "version 2" -- * (from CUPS 1.2 and higher) page header, for binary compatibility. -- --*** Version 1 page header @deprecated@ *** --*** Standard Page Device Dictionary String Values *** -- MediaClass string subtype cups_page_header_s_MediaClass_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header_s_MediaColor_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header_s_MediaType_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header_s_OutputType_array is Interfaces.C.char_array (0 .. 63); type cups_page_header_s_HWResolution_array is array (0 .. 1) of aliased unsigned; type cups_page_header_s_ImagingBoundingBox_array is array (0 .. 3) of aliased unsigned; type cups_page_header_s_Margins_array is array (0 .. 1) of aliased unsigned; type cups_page_header_s_PageSize_array is array (0 .. 1) of aliased unsigned; type cups_page_header_s is record MediaClass : aliased cups_page_header_s_MediaClass_array; -- cups/raster.h:223 MediaColor : aliased cups_page_header_s_MediaColor_array; -- cups/raster.h:224 MediaType : aliased cups_page_header_s_MediaType_array; -- cups/raster.h:225 OutputType : aliased cups_page_header_s_OutputType_array; -- cups/raster.h:226 AdvanceDistance : aliased unsigned; -- cups/raster.h:229 AdvanceMedia : aliased cups_adv_t; -- cups/raster.h:230 Collate : aliased cups_bool_t; -- cups/raster.h:231 CutMedia : aliased cups_cut_t; -- cups/raster.h:232 Duplex : aliased cups_bool_t; -- cups/raster.h:233 HWResolution : aliased cups_page_header_s_HWResolution_array; -- cups/raster.h:234 ImagingBoundingBox : aliased cups_page_header_s_ImagingBoundingBox_array; -- cups/raster.h:235 InsertSheet : aliased cups_bool_t; -- cups/raster.h:236 Jog : aliased cups_jog_t; -- cups/raster.h:237 LeadingEdge : aliased cups_edge_t; -- cups/raster.h:238 Margins : aliased cups_page_header_s_Margins_array; -- cups/raster.h:239 ManualFeed : aliased cups_bool_t; -- cups/raster.h:240 MediaPosition : aliased unsigned; -- cups/raster.h:241 MediaWeight : aliased unsigned; -- cups/raster.h:242 MirrorPrint : aliased cups_bool_t; -- cups/raster.h:243 NegativePrint : aliased cups_bool_t; -- cups/raster.h:244 NumCopies : aliased unsigned; -- cups/raster.h:245 Orientation : aliased cups_orient_t; -- cups/raster.h:246 OutputFaceUp : aliased cups_bool_t; -- cups/raster.h:247 PageSize : aliased cups_page_header_s_PageSize_array; -- cups/raster.h:248 Separations : aliased cups_bool_t; -- cups/raster.h:249 TraySwitch : aliased cups_bool_t; -- cups/raster.h:250 Tumble : aliased cups_bool_t; -- cups/raster.h:251 cupsWidth : aliased unsigned; -- cups/raster.h:254 cupsHeight : aliased unsigned; -- cups/raster.h:255 cupsMediaType : aliased unsigned; -- cups/raster.h:256 cupsBitsPerColor : aliased unsigned; -- cups/raster.h:257 cupsBitsPerPixel : aliased unsigned; -- cups/raster.h:258 cupsBytesPerLine : aliased unsigned; -- cups/raster.h:259 cupsColorOrder : aliased cups_order_t; -- cups/raster.h:260 cupsColorSpace : aliased cups_cspace_t; -- cups/raster.h:261 cupsCompression : aliased unsigned; -- cups/raster.h:262 cupsRowCount : aliased unsigned; -- cups/raster.h:263 cupsRowFeed : aliased unsigned; -- cups/raster.h:264 cupsRowStep : aliased unsigned; -- cups/raster.h:265 end record; pragma Convention (C_Pass_By_Copy, cups_page_header_s); -- cups/raster.h:220 -- MediaColor string -- MediaType string -- OutputType string --*** Standard Page Device Dictionary Integer Values *** -- AdvanceDistance value in points -- AdvanceMedia value (@link cups_adv_t@) -- Collated copies value -- CutMedia value (@link cups_cut_t@) -- Duplexed (double-sided) value -- Resolution in dots-per-inch -- Pixel region that is painted (points, left, bottom, right, top) -- InsertSheet value -- Jog value (@link cups_jog_t@) -- LeadingEdge value (@link cups_edge_t@) -- Lower-lefthand margins in points -- ManualFeed value -- MediaPosition value -- MediaWeight value in grams/m^2 -- MirrorPrint value -- NegativePrint value -- Number of copies to produce -- Orientation value (@link cups_orient_t@) -- OutputFaceUp value -- Width and length of page in points -- Separations value -- TraySwitch value -- Tumble value --*** CUPS Page Device Dictionary Values *** -- Width of page image in pixels -- Height of page image in pixels -- Media type code -- Number of bits for each color -- Number of bits for each pixel -- Number of bytes per line -- Order of colors -- True colorspace -- Device compression to use -- Rows per band -- Feed between bands -- Spacing between lines subtype cups_page_header_t is cups_page_header_s; --*** New in CUPS 1.2 *** --*** Version 2 page header @since CUPS 1.2/OS X 10.5@ *** --*** Standard Page Device Dictionary String Values *** -- MediaClass string subtype cups_page_header2_s_MediaClass_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header2_s_MediaColor_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header2_s_MediaType_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header2_s_OutputType_array is Interfaces.C.char_array (0 .. 63); type cups_page_header2_s_HWResolution_array is array (0 .. 1) of aliased unsigned; type cups_page_header2_s_ImagingBoundingBox_array is array (0 .. 3) of aliased unsigned; type cups_page_header2_s_Margins_array is array (0 .. 1) of aliased unsigned; type cups_page_header2_s_PageSize_array is array (0 .. 1) of aliased unsigned; type cups_page_header2_s_cupsPageSize_array is array (0 .. 1) of aliased float; type cups_page_header2_s_cupsImagingBBox_array is array (0 .. 3) of aliased float; type cups_page_header2_s_cupsInteger_array is array (0 .. 15) of aliased unsigned; type cups_page_header2_s_cupsReal_array is array (0 .. 15) of aliased float; type cups_page_header2_s_cupsString_array is array (0 .. 15, 0 .. 63) of aliased char; subtype cups_page_header2_s_cupsMarkerType_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header2_s_cupsRenderingIntent_array is Interfaces.C.char_array (0 .. 63); subtype cups_page_header2_s_cupsPageSizeName_array is Interfaces.C.char_array (0 .. 63); type cups_page_header2_s is record MediaClass : aliased cups_page_header2_s_MediaClass_array; -- cups/raster.h:272 MediaColor : aliased cups_page_header2_s_MediaColor_array; -- cups/raster.h:273 MediaType : aliased cups_page_header2_s_MediaType_array; -- cups/raster.h:274 OutputType : aliased cups_page_header2_s_OutputType_array; -- cups/raster.h:275 AdvanceDistance : aliased unsigned; -- cups/raster.h:278 AdvanceMedia : aliased cups_adv_t; -- cups/raster.h:279 Collate : aliased cups_bool_t; -- cups/raster.h:280 CutMedia : aliased cups_cut_t; -- cups/raster.h:281 Duplex : aliased cups_bool_t; -- cups/raster.h:282 HWResolution : aliased cups_page_header2_s_HWResolution_array; -- cups/raster.h:283 ImagingBoundingBox : aliased cups_page_header2_s_ImagingBoundingBox_array; -- cups/raster.h:284 InsertSheet : aliased cups_bool_t; -- cups/raster.h:285 Jog : aliased cups_jog_t; -- cups/raster.h:286 LeadingEdge : aliased cups_edge_t; -- cups/raster.h:287 Margins : aliased cups_page_header2_s_Margins_array; -- cups/raster.h:288 ManualFeed : aliased cups_bool_t; -- cups/raster.h:289 MediaPosition : aliased unsigned; -- cups/raster.h:290 MediaWeight : aliased unsigned; -- cups/raster.h:291 MirrorPrint : aliased cups_bool_t; -- cups/raster.h:292 NegativePrint : aliased cups_bool_t; -- cups/raster.h:293 NumCopies : aliased unsigned; -- cups/raster.h:294 Orientation : aliased cups_orient_t; -- cups/raster.h:295 OutputFaceUp : aliased cups_bool_t; -- cups/raster.h:296 PageSize : aliased cups_page_header2_s_PageSize_array; -- cups/raster.h:297 Separations : aliased cups_bool_t; -- cups/raster.h:298 TraySwitch : aliased cups_bool_t; -- cups/raster.h:299 Tumble : aliased cups_bool_t; -- cups/raster.h:300 cupsWidth : aliased unsigned; -- cups/raster.h:303 cupsHeight : aliased unsigned; -- cups/raster.h:304 cupsMediaType : aliased unsigned; -- cups/raster.h:305 cupsBitsPerColor : aliased unsigned; -- cups/raster.h:306 cupsBitsPerPixel : aliased unsigned; -- cups/raster.h:307 cupsBytesPerLine : aliased unsigned; -- cups/raster.h:308 cupsColorOrder : aliased cups_order_t; -- cups/raster.h:309 cupsColorSpace : aliased cups_cspace_t; -- cups/raster.h:310 cupsCompression : aliased unsigned; -- cups/raster.h:311 cupsRowCount : aliased unsigned; -- cups/raster.h:312 cupsRowFeed : aliased unsigned; -- cups/raster.h:313 cupsRowStep : aliased unsigned; -- cups/raster.h:314 cupsNumColors : aliased unsigned; -- cups/raster.h:317 cupsBorderlessScalingFactor : aliased float; -- cups/raster.h:318 cupsPageSize : aliased cups_page_header2_s_cupsPageSize_array; -- cups/raster.h:320 cupsImagingBBox : aliased cups_page_header2_s_cupsImagingBBox_array; -- cups/raster.h:322 cupsInteger : aliased cups_page_header2_s_cupsInteger_array; -- cups/raster.h:325 cupsReal : aliased cups_page_header2_s_cupsReal_array; -- cups/raster.h:326 cupsString : aliased cups_page_header2_s_cupsString_array; -- cups/raster.h:327 cupsMarkerType : aliased cups_page_header2_s_cupsMarkerType_array; -- cups/raster.h:328 cupsRenderingIntent : aliased cups_page_header2_s_cupsRenderingIntent_array; -- cups/raster.h:329 cupsPageSizeName : aliased cups_page_header2_s_cupsPageSizeName_array; -- cups/raster.h:330 end record; pragma Convention (C_Pass_By_Copy, cups_page_header2_s); -- cups/raster.h:269 -- MediaColor string -- MediaType string -- OutputType string --*** Standard Page Device Dictionary Integer Values *** -- AdvanceDistance value in points -- AdvanceMedia value (@link cups_adv_t@) -- Collated copies value -- CutMedia value (@link cups_cut_t@) -- Duplexed (double-sided) value -- Resolution in dots-per-inch -- Pixel region that is painted (points, left, bottom, right, top) -- InsertSheet value -- Jog value (@link cups_jog_t@) -- LeadingEdge value (@link cups_edge_t@) -- Lower-lefthand margins in points -- ManualFeed value -- MediaPosition value -- MediaWeight value in grams/m^2 -- MirrorPrint value -- NegativePrint value -- Number of copies to produce -- Orientation value (@link cups_orient_t@) -- OutputFaceUp value -- Width and length of page in points -- Separations value -- TraySwitch value -- Tumble value --*** CUPS Page Device Dictionary Values *** -- Width of page image in pixels -- Height of page image in pixels -- Media type code -- Number of bits for each color -- Number of bits for each pixel -- Number of bytes per line -- Order of colors -- True colorspace -- Device compression to use -- Rows per band -- Feed between bands -- Spacing between lines --*** Version 2 Dictionary Values *** -- Number of color compoents @since CUPS 1.2/OS X 10.5@ -- Scaling that was applied to page data @since CUPS 1.2/OS X 10.5@ -- Floating point PageSize (scaling * -- * factor not applied) @since CUPS 1.2/OS X 10.5@ -- Floating point ImagingBoundingBox -- * (scaling factor not applied, left, -- * bottom, right, top) @since CUPS 1.2/OS X 10.5@ -- User-defined integer values @since CUPS 1.2/OS X 10.5@ -- User-defined floating-point values @since CUPS 1.2/OS X 10.5@ -- User-defined string values @since CUPS 1.2/OS X 10.5@ -- Ink/toner type @since CUPS 1.2/OS X 10.5@ -- Color rendering intent @since CUPS 1.2/OS X 10.5@ -- PageSize name @since CUPS 1.2/OS X 10.5@ subtype cups_page_header2_t is cups_page_header2_s; -- skipped empty struct u_cups_raster_s -- skipped empty struct cups_raster_t --*** Raster stream data *** type cups_interpret_cb_t is access function (arg1 : access cups_page_header2_t; arg2 : int) return int; pragma Convention (C, cups_interpret_cb_t); -- cups/raster.h:336 --*** cupsRasterInterpretPPD callback function -- * -- * This function is called by -- * @link cupsRasterInterpretPPD@ to -- * validate (and update, as needed) -- * the page header attributes. The -- * "preferred_bits" argument provides -- * the value of the -- * @code cupsPreferredBitsPerColor@ -- * key from the PostScript page device -- * dictionary and is 0 if undefined. -- *** --*** New in CUPS 1.5 *** type cups_raster_iocb_t is access function (arg1 : System.Address; arg2 : access unsigned_char; arg3 : size_t) return size_t; pragma Convention (C, cups_raster_iocb_t); -- cups/raster.h:351 --*** cupsRasterOpenIO callback function -- * -- * This function is specified when -- * creating a raster stream with -- * @link cupsRasterOpenIO@ and handles -- * generic reading and writing of raster -- * data. It must return -1 on error or -- * the number of bytes specified by -- * "length" on success. -- *** -- * Prototypes... -- procedure cupsRasterClose (r : System.Address); -- cups/raster.h:368 pragma Import (C, cupsRasterClose, "cupsRasterClose"); function cupsRasterOpen (fd : int; mode : cups_mode_t) return System.Address; -- cups/raster.h:369 pragma Import (C, cupsRasterOpen, "cupsRasterOpen"); function cupsRasterReadHeader (r : System.Address; h : access cups_page_header_t) return unsigned; -- cups/raster.h:370 pragma Import (C, cupsRasterReadHeader, "cupsRasterReadHeader"); function cupsRasterReadPixels (r : System.Address; p : access unsigned_char; len : unsigned) return unsigned; -- cups/raster.h:372 pragma Import (C, cupsRasterReadPixels, "cupsRasterReadPixels"); function cupsRasterWriteHeader (r : System.Address; h : access cups_page_header_t) return unsigned; -- cups/raster.h:374 pragma Import (C, cupsRasterWriteHeader, "cupsRasterWriteHeader"); function cupsRasterWritePixels (r : System.Address; p : access unsigned_char; len : unsigned) return unsigned; -- cups/raster.h:376 pragma Import (C, cupsRasterWritePixels, "cupsRasterWritePixels"); --*** New in CUPS 1.2 *** function cupsRasterInterpretPPD (h : access cups_page_header2_t; ppd : access CUPS.cups_ppd_h.ppd_file_t; num_options : int; options : access CUPS.cups_cups_h.cups_option_t; func : cups_interpret_cb_t) return int; -- cups/raster.h:380 pragma Import (C, cupsRasterInterpretPPD, "cupsRasterInterpretPPD"); function cupsRasterReadHeader2 (r : System.Address; h : access cups_page_header2_t) return unsigned; -- cups/raster.h:385 pragma Import (C, cupsRasterReadHeader2, "cupsRasterReadHeader2"); function cupsRasterWriteHeader2 (r : System.Address; h : access cups_page_header2_t) return unsigned; -- cups/raster.h:387 pragma Import (C, cupsRasterWriteHeader2, "cupsRasterWriteHeader2"); --*** New in CUPS 1.3 *** function cupsRasterErrorString return Interfaces.C.Strings.chars_ptr; -- cups/raster.h:391 pragma Import (C, cupsRasterErrorString, "cupsRasterErrorString"); --*** New in CUPS 1.5 *** function cupsRasterOpenIO (iocb : cups_raster_iocb_t; ctx : System.Address; mode : cups_mode_t) return System.Address; -- cups/raster.h:394 pragma Import (C, cupsRasterOpenIO, "cupsRasterOpenIO"); -- * End of "$Id: raster.h 4027 2012-11-16 01:00:05Z msweet $". -- end CUPS.cups_raster_h;
44.286624
126
0.688624
2fba2ccac36efde8b1dde91aa68c1a652aa491ca
431
ads
Ada
tests/src/test_nested.ads
TNO/Rejuvenation-Ada
8113ec28da3923ccde40d76cbab70e0e614f4b75
[ "BSD-3-Clause" ]
1
2022-03-08T13:00:47.000Z
2022-03-08T13:00:47.000Z
src/libraries/Rejuvenation_Lib/tests/test_nested.ads
selroc/Renaissance-Ada
39230b34aced4a9d83831be346ca103136c53715
[ "BSD-3-Clause" ]
null
null
null
src/libraries/Rejuvenation_Lib/tests/test_nested.ads
selroc/Renaissance-Ada
39230b34aced4a9d83831be346ca103136c53715
[ "BSD-3-Clause" ]
null
null
null
with AUnit; use AUnit; with AUnit.Test_Cases; use AUnit.Test_Cases; package Test_Nested is type Nested_Test_Case is new Test_Case with null record; overriding procedure Register_Tests (T : in out Nested_Test_Case); -- Register routines to be run overriding function Name (T : Nested_Test_Case) return Message_String; -- Provide name identifying the test case end Test_Nested;
22.684211
45
0.709977
2f3ee4dad7b0f0d08ade799902070dfd92693d51
1,962
ads
Ada
source/oasis/program-elements-attribute_definition_clauses.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/oasis/program-elements-attribute_definition_clauses.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/oasis/program-elements-attribute_definition_clauses.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Representation_Clauses; with Program.Lexical_Elements; with Program.Elements.Expressions; package Program.Elements.Attribute_Definition_Clauses is pragma Pure (Program.Elements.Attribute_Definition_Clauses); type Attribute_Definition_Clause is limited interface and Program.Elements.Representation_Clauses.Representation_Clause; type Attribute_Definition_Clause_Access is access all Attribute_Definition_Clause'Class with Storage_Size => 0; not overriding function Name (Self : Attribute_Definition_Clause) return not null Program.Elements.Expressions.Expression_Access is abstract; not overriding function Expression (Self : Attribute_Definition_Clause) return not null Program.Elements.Expressions.Expression_Access is abstract; type Attribute_Definition_Clause_Text is limited interface; type Attribute_Definition_Clause_Text_Access is access all Attribute_Definition_Clause_Text'Class with Storage_Size => 0; not overriding function To_Attribute_Definition_Clause_Text (Self : aliased in out Attribute_Definition_Clause) return Attribute_Definition_Clause_Text_Access is abstract; not overriding function For_Token (Self : Attribute_Definition_Clause_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Use_Token (Self : Attribute_Definition_Clause_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Semicolon_Token (Self : Attribute_Definition_Clause_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Attribute_Definition_Clauses;
34.421053
78
0.7737
59d77ef360003c90e0bfbd2a5b66ef8412cb9162
2,308
ads
Ada
src/image/sdl-images-versions.ads
Fabien-Chouteau/sdlada
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
[ "Zlib" ]
89
2015-01-03T01:41:23.000Z
2022-02-23T18:21:11.000Z
src/image/sdl-images-versions.ads
Fabien-Chouteau/sdlada
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
[ "Zlib" ]
66
2015-05-01T00:54:03.000Z
2022-01-20T04:09:59.000Z
src/image/sdl-images-versions.ads
Fabien-Chouteau/sdlada
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
[ "Zlib" ]
33
2015-04-30T23:39:31.000Z
2022-01-03T13:00:41.000Z
-------------------------------------------------------------------------------------------------------------------- -- 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. -------------------------------------------------------------------------------------------------------------------- -- SDL.Images.Versions -- -- Library version information. -------------------------------------------------------------------------------------------------------------------- with SDL.Versions; package SDL.Images.Versions is -- These allow the user to determine which version of SDLAda_Image they compiled with. Compiled_Major : constant SDL.Versions.Version_Level with Import => True, Convention => C, External_Name => "SDL_Ada_Image_Major_Version"; Compiled_Minor : constant SDL.Versions.Version_Level with Import => True, Convention => C, External_Name => "SDL_Ada_Image_Minor_Version"; Compiled_Patch : constant SDL.Versions.Version_Level with Import => True, Convention => C, External_Name => "SDL_Ada_Image_Patch_Version"; Compiled : constant SDL.Versions.Version := (Major => Compiled_Major, Minor => Compiled_Minor, Patch => Compiled_Patch); procedure Linked_With (Info : in out SDL.Versions.Version); end SDL.Images.Versions;
44.384615
116
0.573657
a15f82e0a70cdb75dba116dbdb980800efda713f
313
ads
Ada
examples/racing/src/geste_config.ads
Fabien-Chouteau/GESTE
5ac814906fdb49d880db60cbb17279cbbb777336
[ "BSD-3-Clause" ]
13
2018-07-31T12:11:46.000Z
2021-11-19T14:16:46.000Z
examples/racing/src/geste_config.ads
gregkrsak/GESTE
5ac814906fdb49d880db60cbb17279cbbb777336
[ "BSD-3-Clause" ]
1
2018-10-22T21:41:59.000Z
2018-10-22T21:41:59.000Z
examples/racing/src/geste_config.ads
gregkrsak/GESTE
5ac814906fdb49d880db60cbb17279cbbb777336
[ "BSD-3-Clause" ]
4
2020-07-03T10:03:13.000Z
2022-02-10T03:35:07.000Z
with Interfaces; package GESTE_Config is type Color_Index is range 0 .. 2168; subtype Output_Color is Interfaces.Unsigned_16; Transparent : constant Output_Color := 0; Tile_Size : constant := 16; type Tile_Index is range 0 .. 151; No_Tile : constant Tile_Index := 0; end GESTE_Config;
19.5625
50
0.70607
df3dcc14d787573967fc263adb48f856d7bedbc7
4,974
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-caun16.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-caun16.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-caun16.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY COMPONENTS -- -- -- -- S Y S T E M . C O M P A R E _ A R R A Y _ U N S I G N E D _ 1 6 -- -- -- -- B o d y -- -- -- -- Copyright (C) 2002-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. -- -- -- ------------------------------------------------------------------------------ with System.Address_Operations; use System.Address_Operations; with Ada.Unchecked_Conversion; package body System.Compare_Array_Unsigned_16 is type Word is mod 2 ** 32; -- Used to process operands by words type Half is mod 2 ** 16; for Half'Size use 16; -- Used to process operands by half words type Uhalf is new Half; for Uhalf'Alignment use 1; -- Used to process operands when unaligned type WP is access Word; type HP is access Half; type UP is access Uhalf; function W is new Ada.Unchecked_Conversion (Address, WP); function H is new Ada.Unchecked_Conversion (Address, HP); function U is new Ada.Unchecked_Conversion (Address, UP); ----------------------- -- Compare_Array_U16 -- ----------------------- function Compare_Array_U16 (Left : System.Address; Right : System.Address; Left_Len : Natural; Right_Len : Natural) return Integer is Clen : Natural := Natural'Min (Left_Len, Right_Len); -- Number of elements left to compare L : Address := Left; R : Address := Right; -- Pointers to next elements to compare begin -- Go by words if possible if ModA (OrA (Left, Right), 4) = 0 then while Clen > 1 and then W (L).all = W (R).all loop Clen := Clen - 2; L := AddA (L, 4); R := AddA (R, 4); end loop; end if; -- Case of going by aligned half words if ModA (OrA (Left, Right), 2) = 0 then while Clen /= 0 loop if H (L).all /= H (R).all then if H (L).all > H (R).all then return +1; else return -1; end if; end if; Clen := Clen - 1; L := AddA (L, 2); R := AddA (R, 2); end loop; -- Case of going by unaligned half words else while Clen /= 0 loop if U (L).all /= U (R).all then if U (L).all > U (R).all then return +1; else return -1; end if; end if; Clen := Clen - 1; L := AddA (L, 2); R := AddA (R, 2); end loop; end if; -- Here if common section equal, result decided by lengths if Left_Len = Right_Len then return 0; elsif Left_Len > Right_Len then return +1; else return -1; end if; end Compare_Array_U16; end System.Compare_Array_Unsigned_16;
37.119403
78
0.44813
5981d38df0c8d00a4b5b9e0db3974f64bcbdf532
2,983
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce2204c.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/ce/ce2204c.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce2204c.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- CE2204C.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. --* -- OBJECTIVE: -- CHECK THAT WRITE IS FORBIDDEN FOR SEQUENTIAL FILES OF -- MODE IN_FILE. -- B) CHECK TEMPORARY FILES. -- APPLICABILITY CRITERIA: -- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT -- TEMPORARY SEQUENTIAL FILES AND THE RESETTING FROM OUT_FILE -- TO IN_FILE. -- HISTORY: -- GMT 07/27/87 CREATED ORIGINAL TEST. WITH REPORT; USE REPORT; WITH SEQUENTIAL_IO; PROCEDURE CE2204C IS INCOMPLETE : EXCEPTION; BEGIN TEST ("CE2204C", "CHECK THAT MODE_ERROR IS RAISED BY WRITE " & "WHEN THE MODE IS INFILE AND THE FILE IS " & "A TEMPORARY FILE"); DECLARE PACKAGE SEQ_IO IS NEW SEQUENTIAL_IO (INTEGER); USE SEQ_IO; FT : FILE_TYPE; VAR1 : INTEGER := 5; BEGIN BEGIN CREATE (FT, OUT_FILE); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE - 1"); RAISE INCOMPLETE; END; WRITE (FT, VAR1); BEGIN RESET (FT, IN_FILE); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED ON RESET - 2"); RAISE INCOMPLETE; END; BEGIN WRITE(FT, 3); FAILED ("MODE_ERROR NOT RAISED ON WRITE - 3"); EXCEPTION WHEN MODE_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED ON WRITE - 4"); END; CLOSE (FT); END; RESULT; EXCEPTION WHEN INCOMPLETE => RESULT; END CE2204C;
32.423913
79
0.582635
1d1d68ef66b9a2426ba4a8b0ba1d2c7a78687206
368
ads
Ada
tests/regex_test_suite.ads
skordal/ada-regex
cda71d076184f9dc607c132343b60678b8dc2ec8
[ "MIT" ]
2
2020-04-15T06:02:06.000Z
2021-05-12T23:09:18.000Z
tests/regex_test_suite.ads
skordal/ada-regex
cda71d076184f9dc607c132343b60678b8dc2ec8
[ "MIT" ]
null
null
null
tests/regex_test_suite.ads
skordal/ada-regex
cda71d076184f9dc607c132343b60678b8dc2ec8
[ "MIT" ]
null
null
null
-- Ada regular expression library -- (c) Kristian Klomsten Skordal 2020 <[email protected]> -- Report bugs and issues on <https://github.com/skordal/ada-regex> with AUnit.Test_Suites; package Regex_Test_Suite is -- Creates the Regex library test suite: function Test_Suite return AUnit.Test_Suites.Access_Test_Suite; end Regex_Test_Suite;
26.285714
72
0.774457
a192005d1398dbd4d68caa372e216fe8363ea342
58,719
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-stwisu.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-stwisu.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-stwisu.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . S T R I N G S . W I D E _ S U P E R B O U N D E D -- -- -- -- B o d y -- -- -- -- Copyright (C) 2003-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. -- -- -- ------------------------------------------------------------------------------ with Ada.Strings.Wide_Maps; use Ada.Strings.Wide_Maps; with Ada.Strings.Wide_Search; package body Ada.Strings.Wide_Superbounded is ------------ -- Concat -- ------------ function Concat (Left : Super_String; Right : Super_String) return Super_String is begin return Result : Super_String (Left.Max_Length) do declare Llen : constant Natural := Left.Current_Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen > Left.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right.Data (1 .. Rlen); end if; end; end return; end Concat; function Concat (Left : Super_String; Right : Wide_String) return Super_String is begin return Result : Super_String (Left.Max_Length) do declare Llen : constant Natural := Left.Current_Length; Nlen : constant Natural := Llen + Right'Length; begin if Nlen > Left.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right; end if; end; end return; end Concat; function Concat (Left : Wide_String; Right : Super_String) return Super_String is begin return Result : Super_String (Right.Max_Length) do declare Llen : constant Natural := Left'Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen > Right.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left; Result.Data (Llen + 1 .. Nlen) := Right.Data (1 .. Rlen); end if; end; end return; end Concat; function Concat (Left : Super_String; Right : Wide_Character) return Super_String is begin return Result : Super_String (Left.Max_Length) do declare Llen : constant Natural := Left.Current_Length; begin if Llen = Left.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Llen + 1; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Result.Current_Length) := Right; end if; end; end return; end Concat; function Concat (Left : Wide_Character; Right : Super_String) return Super_String is begin return Result : Super_String (Right.Max_Length) do declare Rlen : constant Natural := Right.Current_Length; begin if Rlen = Right.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Rlen + 1; Result.Data (1) := Left; Result.Data (2 .. Result.Current_Length) := Right.Data (1 .. Rlen); end if; end; end return; end Concat; ----------- -- Equal -- ----------- function "=" (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Current_Length = Right.Current_Length and then Left.Data (1 .. Left.Current_Length) = Right.Data (1 .. Right.Current_Length); end "="; function Equal (Left : Super_String; Right : Wide_String) return Boolean is begin return Left.Current_Length = Right'Length and then Left.Data (1 .. Left.Current_Length) = Right; end Equal; function Equal (Left : Wide_String; Right : Super_String) return Boolean is begin return Left'Length = Right.Current_Length and then Left = Right.Data (1 .. Right.Current_Length); end Equal; ------------- -- Greater -- ------------- function Greater (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) > Right.Data (1 .. Right.Current_Length); end Greater; function Greater (Left : Super_String; Right : Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) > Right; end Greater; function Greater (Left : Wide_String; Right : Super_String) return Boolean is begin return Left > Right.Data (1 .. Right.Current_Length); end Greater; ---------------------- -- Greater_Or_Equal -- ---------------------- function Greater_Or_Equal (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) >= Right.Data (1 .. Right.Current_Length); end Greater_Or_Equal; function Greater_Or_Equal (Left : Super_String; Right : Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) >= Right; end Greater_Or_Equal; function Greater_Or_Equal (Left : Wide_String; Right : Super_String) return Boolean is begin return Left >= Right.Data (1 .. Right.Current_Length); end Greater_Or_Equal; ---------- -- Less -- ---------- function Less (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) < Right.Data (1 .. Right.Current_Length); end Less; function Less (Left : Super_String; Right : Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) < Right; end Less; function Less (Left : Wide_String; Right : Super_String) return Boolean is begin return Left < Right.Data (1 .. Right.Current_Length); end Less; ------------------- -- Less_Or_Equal -- ------------------- function Less_Or_Equal (Left : Super_String; Right : Super_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) <= Right.Data (1 .. Right.Current_Length); end Less_Or_Equal; function Less_Or_Equal (Left : Super_String; Right : Wide_String) return Boolean is begin return Left.Data (1 .. Left.Current_Length) <= Right; end Less_Or_Equal; function Less_Or_Equal (Left : Wide_String; Right : Super_String) return Boolean is begin return Left <= Right.Data (1 .. Right.Current_Length); end Less_Or_Equal; ---------------------- -- Set_Super_String -- ---------------------- procedure Set_Super_String (Target : out Super_String; Source : Wide_String; Drop : Truncation := Error) is Slen : constant Natural := Source'Length; Max_Length : constant Positive := Target.Max_Length; begin if Slen <= Max_Length then Target.Current_Length := Slen; Target.Data (1 .. Slen) := Source; else case Drop is when Strings.Right => Target.Current_Length := Max_Length; Target.Data (1 .. Max_Length) := Source (Source'First .. Source'First - 1 + Max_Length); when Strings.Left => Target.Current_Length := Max_Length; Target.Data (1 .. Max_Length) := Source (Source'Last - (Max_Length - 1) .. Source'Last); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Set_Super_String; ------------------ -- Super_Append -- ------------------ -- Case of Super_String and Super_String function Super_Append (Left : Super_String; Right : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Left.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left.Current_Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right.Data (1 .. Rlen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen >= Max_Length then -- only case is Llen = Max_Length Result.Data := Left.Data; else Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Max_Length) := Right.Data (1 .. Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then -- only case is Rlen = Max_Length Result.Data := Right.Data; else Result.Data (1 .. Max_Length - Rlen) := Left.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Result.Data (Max_Length - Rlen + 1 .. Max_Length) := Right.Data (1 .. Rlen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Append; procedure Super_Append (Source : in out Super_String; New_Item : Super_String; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Llen : constant Natural := Source.Current_Length; Rlen : constant Natural := New_Item.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Source.Current_Length := Nlen; Source.Data (Llen + 1 .. Nlen) := New_Item.Data (1 .. Rlen); else Source.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen < Max_Length then Source.Data (Llen + 1 .. Max_Length) := New_Item.Data (1 .. Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then -- only case is Rlen = Max_Length Source.Data := New_Item.Data; else Source.Data (1 .. Max_Length - Rlen) := Source.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Source.Data (Max_Length - Rlen + 1 .. Max_Length) := New_Item.Data (1 .. Rlen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; -- Case of Super_String and Wide_String function Super_Append (Left : Super_String; Right : Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Left.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left.Current_Length; Rlen : constant Natural := Right'Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Nlen) := Right; else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen >= Max_Length then -- only case is Llen = Max_Length Result.Data := Left.Data; else Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1 .. Max_Length) := Right (Right'First .. Right'First - 1 + Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then Result.Data (1 .. Max_Length) := Right (Right'Last - (Max_Length - 1) .. Right'Last); else Result.Data (1 .. Max_Length - Rlen) := Left.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Result.Data (Max_Length - Rlen + 1 .. Max_Length) := Right; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Append; procedure Super_Append (Source : in out Super_String; New_Item : Wide_String; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Llen : constant Natural := Source.Current_Length; Rlen : constant Natural := New_Item'Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Source.Current_Length := Nlen; Source.Data (Llen + 1 .. Nlen) := New_Item; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen < Max_Length then Source.Data (Llen + 1 .. Max_Length) := New_Item (New_Item'First .. New_Item'First - 1 + Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then Source.Data (1 .. Max_Length) := New_Item (New_Item'Last - (Max_Length - 1) .. New_Item'Last); else Source.Data (1 .. Max_Length - Rlen) := Source.Data (Llen - (Max_Length - Rlen - 1) .. Llen); Source.Data (Max_Length - Rlen + 1 .. Max_Length) := New_Item; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; -- Case of Wide_String and Super_String function Super_Append (Left : Wide_String; Right : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Right.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left'Length; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Llen + Rlen; begin if Nlen <= Max_Length then Result.Current_Length := Nlen; Result.Data (1 .. Llen) := Left; Result.Data (Llen + 1 .. Llen + Rlen) := Right.Data (1 .. Rlen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Llen >= Max_Length then Result.Data (1 .. Max_Length) := Left (Left'First .. Left'First + (Max_Length - 1)); else Result.Data (1 .. Llen) := Left; Result.Data (Llen + 1 .. Max_Length) := Right.Data (1 .. Max_Length - Llen); end if; when Strings.Left => if Rlen >= Max_Length then Result.Data (1 .. Max_Length) := Right.Data (Rlen - (Max_Length - 1) .. Rlen); else Result.Data (1 .. Max_Length - Rlen) := Left (Left'Last - (Max_Length - Rlen - 1) .. Left'Last); Result.Data (Max_Length - Rlen + 1 .. Max_Length) := Right.Data (1 .. Rlen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Append; -- Case of Super_String and Wide_Character function Super_Append (Left : Super_String; Right : Wide_Character; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Left.Max_Length; Result : Super_String (Max_Length); Llen : constant Natural := Left.Current_Length; begin if Llen < Max_Length then Result.Current_Length := Llen + 1; Result.Data (1 .. Llen) := Left.Data (1 .. Llen); Result.Data (Llen + 1) := Right; return Result; else case Drop is when Strings.Right => return Left; when Strings.Left => Result.Current_Length := Max_Length; Result.Data (1 .. Max_Length - 1) := Left.Data (2 .. Max_Length); Result.Data (Max_Length) := Right; return Result; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; procedure Super_Append (Source : in out Super_String; New_Item : Wide_Character; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Llen : constant Natural := Source.Current_Length; begin if Llen < Max_Length then Source.Current_Length := Llen + 1; Source.Data (Llen + 1) := New_Item; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => null; when Strings.Left => Source.Data (1 .. Max_Length - 1) := Source.Data (2 .. Max_Length); Source.Data (Max_Length) := New_Item; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; -- Case of Wide_Character and Super_String function Super_Append (Left : Wide_Character; Right : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Right.Max_Length; Result : Super_String (Max_Length); Rlen : constant Natural := Right.Current_Length; begin if Rlen < Max_Length then Result.Current_Length := Rlen + 1; Result.Data (1) := Left; Result.Data (2 .. Rlen + 1) := Right.Data (1 .. Rlen); return Result; else case Drop is when Strings.Right => Result.Current_Length := Max_Length; Result.Data (1) := Left; Result.Data (2 .. Max_Length) := Right.Data (1 .. Max_Length - 1); return Result; when Strings.Left => return Right; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Append; ----------------- -- Super_Count -- ----------------- function Super_Count (Source : Super_String; Pattern : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) return Natural is begin return Wide_Search.Count (Source.Data (1 .. Source.Current_Length), Pattern, Mapping); end Super_Count; function Super_Count (Source : Super_String; Pattern : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural is begin return Wide_Search.Count (Source.Data (1 .. Source.Current_Length), Pattern, Mapping); end Super_Count; function Super_Count (Source : Super_String; Set : Wide_Maps.Wide_Character_Set) return Natural is begin return Wide_Search.Count (Source.Data (1 .. Source.Current_Length), Set); end Super_Count; ------------------ -- Super_Delete -- ------------------ function Super_Delete (Source : Super_String; From : Positive; Through : Natural) return Super_String is Result : Super_String (Source.Max_Length); Slen : constant Natural := Source.Current_Length; Num_Delete : constant Integer := Through - From + 1; begin if Num_Delete <= 0 then return Source; elsif From > Slen + 1 then raise Ada.Strings.Index_Error; elsif Through >= Slen then Result.Current_Length := From - 1; Result.Data (1 .. From - 1) := Source.Data (1 .. From - 1); return Result; else Result.Current_Length := Slen - Num_Delete; Result.Data (1 .. From - 1) := Source.Data (1 .. From - 1); Result.Data (From .. Result.Current_Length) := Source.Data (Through + 1 .. Slen); return Result; end if; end Super_Delete; procedure Super_Delete (Source : in out Super_String; From : Positive; Through : Natural) is Slen : constant Natural := Source.Current_Length; Num_Delete : constant Integer := Through - From + 1; begin if Num_Delete <= 0 then return; elsif From > Slen + 1 then raise Ada.Strings.Index_Error; elsif Through >= Slen then Source.Current_Length := From - 1; else Source.Current_Length := Slen - Num_Delete; Source.Data (From .. Source.Current_Length) := Source.Data (Through + 1 .. Slen); end if; end Super_Delete; ------------------- -- Super_Element -- ------------------- function Super_Element (Source : Super_String; Index : Positive) return Wide_Character is begin if Index <= Source.Current_Length then return Source.Data (Index); else raise Strings.Index_Error; end if; end Super_Element; ---------------------- -- Super_Find_Token -- ---------------------- procedure Super_Find_Token (Source : Super_String; Set : Wide_Maps.Wide_Character_Set; From : Positive; Test : Strings.Membership; First : out Positive; Last : out Natural) is begin Wide_Search.Find_Token (Source.Data (From .. Source.Current_Length), Set, Test, First, Last); end Super_Find_Token; procedure Super_Find_Token (Source : Super_String; Set : Wide_Maps.Wide_Character_Set; Test : Strings.Membership; First : out Positive; Last : out Natural) is begin Wide_Search.Find_Token (Source.Data (1 .. Source.Current_Length), Set, Test, First, Last); end Super_Find_Token; ---------------- -- Super_Head -- ---------------- function Super_Head (Source : Super_String; Count : Natural; Pad : Wide_Character := Wide_Space; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; begin if Npad <= 0 then Result.Current_Length := Count; Result.Data (1 .. Count) := Source.Data (1 .. Count); elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); Result.Data (Slen + 1 .. Count) := (others => Pad); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Slen) := Source.Data (1 .. Slen); Result.Data (Slen + 1 .. Max_Length) := (others => Pad); when Strings.Left => if Npad >= Max_Length then Result.Data := (others => Pad); else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := (others => Pad); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Head; procedure Super_Head (Source : in out Super_String; Count : Natural; Pad : Wide_Character := Wide_Space; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; Temp : Wide_String (1 .. Max_Length); begin if Npad <= 0 then Source.Current_Length := Count; elsif Count <= Max_Length then Source.Current_Length := Count; Source.Data (Slen + 1 .. Count) := (others => Pad); else Source.Current_Length := Max_Length; case Drop is when Strings.Right => Source.Data (Slen + 1 .. Max_Length) := (others => Pad); when Strings.Left => if Npad > Max_Length then Source.Data := (others => Pad); else Temp := Source.Data; Source.Data (1 .. Max_Length - Npad) := Temp (Count - Max_Length + 1 .. Slen); for J in Max_Length - Npad + 1 .. Max_Length loop Source.Data (J) := Pad; end loop; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Head; ----------------- -- Super_Index -- ----------------- function Super_Index (Source : Super_String; Pattern : Wide_String; Going : Strings.Direction := Strings.Forward; Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) return Natural is begin return Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Pattern : Wide_String; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural is begin return Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Set : Wide_Maps.Wide_Character_Set; Test : Strings.Membership := Strings.Inside; Going : Strings.Direction := Strings.Forward) return Natural is begin return Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Set, Test, Going); end Super_Index; function Super_Index (Source : Super_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) return Natural is begin return Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, From, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural is begin return Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Pattern, From, Going, Mapping); end Super_Index; function Super_Index (Source : Super_String; Set : Wide_Maps.Wide_Character_Set; From : Positive; Test : Membership := Inside; Going : Direction := Forward) return Natural is begin return Wide_Search.Index (Source.Data (1 .. Source.Current_Length), Set, From, Test, Going); end Super_Index; --------------------------- -- Super_Index_Non_Blank -- --------------------------- function Super_Index_Non_Blank (Source : Super_String; Going : Strings.Direction := Strings.Forward) return Natural is begin return Wide_Search.Index_Non_Blank (Source.Data (1 .. Source.Current_Length), Going); end Super_Index_Non_Blank; function Super_Index_Non_Blank (Source : Super_String; From : Positive; Going : Direction := Forward) return Natural is begin return Wide_Search.Index_Non_Blank (Source.Data (1 .. Source.Current_Length), From, Going); end Super_Index_Non_Blank; ------------------ -- Super_Insert -- ------------------ function Super_Insert (Source : Super_String; Before : Positive; New_Item : Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Slen : constant Natural := Source.Current_Length; Nlen : constant Natural := New_Item'Length; Tlen : constant Natural := Slen + Nlen; Blen : constant Natural := Before - 1; Alen : constant Integer := Slen - Blen; Droplen : constant Integer := Tlen - Max_Length; -- Tlen is the length of the total string before possible truncation. -- Blen, Alen are the lengths of the before and after pieces of the -- source string. begin if Alen < 0 then raise Ada.Strings.Index_Error; elsif Droplen <= 0 then Result.Current_Length := Tlen; Result.Data (1 .. Blen) := Source.Data (1 .. Blen); Result.Data (Before .. Before + Nlen - 1) := New_Item; Result.Data (Before + Nlen .. Tlen) := Source.Data (Before .. Slen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Blen) := Source.Data (1 .. Blen); if Droplen > Alen then Result.Data (Before .. Max_Length) := New_Item (New_Item'First .. New_Item'First + Max_Length - Before); else Result.Data (Before .. Before + Nlen - 1) := New_Item; Result.Data (Before + Nlen .. Max_Length) := Source.Data (Before .. Slen - Droplen); end if; when Strings.Left => Result.Data (Max_Length - (Alen - 1) .. Max_Length) := Source.Data (Before .. Slen); if Droplen >= Blen then Result.Data (1 .. Max_Length - Alen) := New_Item (New_Item'Last - (Max_Length - Alen) + 1 .. New_Item'Last); else Result.Data (Blen - Droplen + 1 .. Max_Length - Alen) := New_Item; Result.Data (1 .. Blen - Droplen) := Source.Data (Droplen + 1 .. Blen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Insert; procedure Super_Insert (Source : in out Super_String; Before : Positive; New_Item : Wide_String; Drop : Strings.Truncation := Strings.Error) is begin -- We do a double copy here because this is one of the situations -- in which we move data to the right, and at least at the moment, -- GNAT is not handling such cases correctly ??? Source := Super_Insert (Source, Before, New_Item, Drop); end Super_Insert; ------------------ -- Super_Length -- ------------------ function Super_Length (Source : Super_String) return Natural is begin return Source.Current_Length; end Super_Length; --------------------- -- Super_Overwrite -- --------------------- function Super_Overwrite (Source : Super_String; Position : Positive; New_Item : Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Endpos : constant Natural := Position + New_Item'Length - 1; Slen : constant Natural := Source.Current_Length; Droplen : Natural; begin if Position > Slen + 1 then raise Ada.Strings.Index_Error; elsif New_Item'Length = 0 then return Source; elsif Endpos <= Slen then Result.Current_Length := Source.Current_Length; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); Result.Data (Position .. Endpos) := New_Item; return Result; elsif Endpos <= Max_Length then Result.Current_Length := Endpos; Result.Data (1 .. Position - 1) := Source.Data (1 .. Position - 1); Result.Data (Position .. Endpos) := New_Item; return Result; else Result.Current_Length := Max_Length; Droplen := Endpos - Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Position - 1) := Source.Data (1 .. Position - 1); Result.Data (Position .. Max_Length) := New_Item (New_Item'First .. New_Item'Last - Droplen); return Result; when Strings.Left => if New_Item'Length >= Max_Length then Result.Data (1 .. Max_Length) := New_Item (New_Item'Last - Max_Length + 1 .. New_Item'Last); return Result; else Result.Data (1 .. Max_Length - New_Item'Length) := Source.Data (Droplen + 1 .. Position - 1); Result.Data (Max_Length - New_Item'Length + 1 .. Max_Length) := New_Item; return Result; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Overwrite; procedure Super_Overwrite (Source : in out Super_String; Position : Positive; New_Item : Wide_String; Drop : Strings.Truncation := Strings.Error) is Max_Length : constant Positive := Source.Max_Length; Endpos : constant Positive := Position + New_Item'Length - 1; Slen : constant Natural := Source.Current_Length; Droplen : Natural; begin if Position > Slen + 1 then raise Ada.Strings.Index_Error; elsif Endpos <= Slen then Source.Data (Position .. Endpos) := New_Item; elsif Endpos <= Max_Length then Source.Data (Position .. Endpos) := New_Item; Source.Current_Length := Endpos; else Source.Current_Length := Max_Length; Droplen := Endpos - Max_Length; case Drop is when Strings.Right => Source.Data (Position .. Max_Length) := New_Item (New_Item'First .. New_Item'Last - Droplen); when Strings.Left => if New_Item'Length > Max_Length then Source.Data (1 .. Max_Length) := New_Item (New_Item'Last - Max_Length + 1 .. New_Item'Last); else Source.Data (1 .. Max_Length - New_Item'Length) := Source.Data (Droplen + 1 .. Position - 1); Source.Data (Max_Length - New_Item'Length + 1 .. Max_Length) := New_Item; end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Overwrite; --------------------------- -- Super_Replace_Element -- --------------------------- procedure Super_Replace_Element (Source : in out Super_String; Index : Positive; By : Wide_Character) is begin if Index <= Source.Current_Length then Source.Data (Index) := By; else raise Ada.Strings.Index_Error; end if; end Super_Replace_Element; ------------------------- -- Super_Replace_Slice -- ------------------------- function Super_Replace_Slice (Source : Super_String; Low : Positive; High : Natural; By : Wide_String; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Slen : constant Natural := Source.Current_Length; begin if Low > Slen + 1 then raise Strings.Index_Error; elsif High < Low then return Super_Insert (Source, Low, By, Drop); else declare Blen : constant Natural := Natural'Max (0, Low - 1); Alen : constant Natural := Natural'Max (0, Slen - High); Tlen : constant Natural := Blen + By'Length + Alen; Droplen : constant Integer := Tlen - Max_Length; Result : Super_String (Max_Length); -- Tlen is the total length of the result string before any -- truncation. Blen and Alen are the lengths of the pieces -- of the original string that end up in the result string -- before and after the replaced slice. begin if Droplen <= 0 then Result.Current_Length := Tlen; Result.Data (1 .. Blen) := Source.Data (1 .. Blen); Result.Data (Low .. Low + By'Length - 1) := By; Result.Data (Low + By'Length .. Tlen) := Source.Data (High + 1 .. Slen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Result.Data (1 .. Blen) := Source.Data (1 .. Blen); if Droplen > Alen then Result.Data (Low .. Max_Length) := By (By'First .. By'First + Max_Length - Low); else Result.Data (Low .. Low + By'Length - 1) := By; Result.Data (Low + By'Length .. Max_Length) := Source.Data (High + 1 .. Slen - Droplen); end if; when Strings.Left => Result.Data (Max_Length - (Alen - 1) .. Max_Length) := Source.Data (High + 1 .. Slen); if Droplen >= Blen then Result.Data (1 .. Max_Length - Alen) := By (By'Last - (Max_Length - Alen) + 1 .. By'Last); else Result.Data (Blen - Droplen + 1 .. Max_Length - Alen) := By; Result.Data (1 .. Blen - Droplen) := Source.Data (Droplen + 1 .. Blen); end if; when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end; end if; end Super_Replace_Slice; procedure Super_Replace_Slice (Source : in out Super_String; Low : Positive; High : Natural; By : Wide_String; Drop : Strings.Truncation := Strings.Error) is begin -- We do a double copy here because this is one of the situations -- in which we move data to the right, and at least at the moment, -- GNAT is not handling such cases correctly ??? Source := Super_Replace_Slice (Source, Low, High, By, Drop); end Super_Replace_Slice; --------------------- -- Super_Replicate -- --------------------- function Super_Replicate (Count : Natural; Item : Wide_Character; Drop : Truncation := Error; Max_Length : Positive) return Super_String is Result : Super_String (Max_Length); begin if Count <= Max_Length then Result.Current_Length := Count; elsif Drop = Strings.Error then raise Ada.Strings.Length_Error; else Result.Current_Length := Max_Length; end if; Result.Data (1 .. Result.Current_Length) := (others => Item); return Result; end Super_Replicate; function Super_Replicate (Count : Natural; Item : Wide_String; Drop : Truncation := Error; Max_Length : Positive) return Super_String is Length : constant Integer := Count * Item'Length; Result : Super_String (Max_Length); Indx : Positive; begin if Length <= Max_Length then Result.Current_Length := Length; if Length > 0 then Indx := 1; for J in 1 .. Count loop Result.Data (Indx .. Indx + Item'Length - 1) := Item; Indx := Indx + Item'Length; end loop; end if; else Result.Current_Length := Max_Length; case Drop is when Strings.Right => Indx := 1; while Indx + Item'Length <= Max_Length + 1 loop Result.Data (Indx .. Indx + Item'Length - 1) := Item; Indx := Indx + Item'Length; end loop; Result.Data (Indx .. Max_Length) := Item (Item'First .. Item'First + Max_Length - Indx); when Strings.Left => Indx := Max_Length; while Indx - Item'Length >= 1 loop Result.Data (Indx - (Item'Length - 1) .. Indx) := Item; Indx := Indx - Item'Length; end loop; Result.Data (1 .. Indx) := Item (Item'Last - Indx + 1 .. Item'Last); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Replicate; function Super_Replicate (Count : Natural; Item : Super_String; Drop : Strings.Truncation := Strings.Error) return Super_String is begin return Super_Replicate (Count, Item.Data (1 .. Item.Current_Length), Drop, Item.Max_Length); end Super_Replicate; ----------------- -- Super_Slice -- ----------------- function Super_Slice (Source : Super_String; Low : Positive; High : Natural) return Wide_String is begin -- Note: test of High > Length is in accordance with AI95-00128 return R : Wide_String (Low .. High) do if Low > Source.Current_Length + 1 or else High > Source.Current_Length then raise Index_Error; end if; R := Source.Data (Low .. High); end return; end Super_Slice; function Super_Slice (Source : Super_String; Low : Positive; High : Natural) return Super_String is begin return Result : Super_String (Source.Max_Length) do if Low > Source.Current_Length + 1 or else High > Source.Current_Length then raise Index_Error; end if; Result.Current_Length := High - Low + 1; Result.Data (1 .. Result.Current_Length) := Source.Data (Low .. High); end return; end Super_Slice; procedure Super_Slice (Source : Super_String; Target : out Super_String; Low : Positive; High : Natural) is begin if Low > Source.Current_Length + 1 or else High > Source.Current_Length then raise Index_Error; else Target.Current_Length := High - Low + 1; Target.Data (1 .. Target.Current_Length) := Source.Data (Low .. High); end if; end Super_Slice; ---------------- -- Super_Tail -- ---------------- function Super_Tail (Source : Super_String; Count : Natural; Pad : Wide_Character := Wide_Space; Drop : Strings.Truncation := Strings.Error) return Super_String is Max_Length : constant Positive := Source.Max_Length; Result : Super_String (Max_Length); Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; begin if Npad <= 0 then Result.Current_Length := Count; Result.Data (1 .. Count) := Source.Data (Slen - (Count - 1) .. Slen); elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Npad) := (others => Pad); Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); else Result.Current_Length := Max_Length; case Drop is when Strings.Right => if Npad >= Max_Length then Result.Data := (others => Pad); else Result.Data (1 .. Npad) := (others => Pad); Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => Result.Data (1 .. Max_Length - Slen) := (others => Pad); Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end Super_Tail; procedure Super_Tail (Source : in out Super_String; Count : Natural; Pad : Wide_Character := Wide_Space; Drop : Truncation := Error) is Max_Length : constant Positive := Source.Max_Length; Slen : constant Natural := Source.Current_Length; Npad : constant Integer := Count - Slen; Temp : constant Wide_String (1 .. Max_Length) := Source.Data; begin if Npad <= 0 then Source.Current_Length := Count; Source.Data (1 .. Count) := Temp (Slen - (Count - 1) .. Slen); elsif Count <= Max_Length then Source.Current_Length := Count; Source.Data (1 .. Npad) := (others => Pad); Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); else Source.Current_Length := Max_Length; case Drop is when Strings.Right => if Npad >= Max_Length then Source.Data := (others => Pad); else Source.Data (1 .. Npad) := (others => Pad); Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; when Strings.Left => for J in 1 .. Max_Length - Slen loop Source.Data (J) := Pad; end loop; Source.Data (Max_Length - Slen + 1 .. Max_Length) := Temp (1 .. Slen); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; end Super_Tail; --------------------- -- Super_To_String -- --------------------- function Super_To_String (Source : Super_String) return Wide_String is begin return R : Wide_String (1 .. Source.Current_Length) do R := Source.Data (1 .. Source.Current_Length); end return; end Super_To_String; --------------------- -- Super_Translate -- --------------------- function Super_Translate (Source : Super_String; Mapping : Wide_Maps.Wide_Character_Mapping) return Super_String is Result : Super_String (Source.Max_Length); begin Result.Current_Length := Source.Current_Length; for J in 1 .. Source.Current_Length loop Result.Data (J) := Value (Mapping, Source.Data (J)); end loop; return Result; end Super_Translate; procedure Super_Translate (Source : in out Super_String; Mapping : Wide_Maps.Wide_Character_Mapping) is begin for J in 1 .. Source.Current_Length loop Source.Data (J) := Value (Mapping, Source.Data (J)); end loop; end Super_Translate; function Super_Translate (Source : Super_String; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Super_String is Result : Super_String (Source.Max_Length); begin Result.Current_Length := Source.Current_Length; for J in 1 .. Source.Current_Length loop Result.Data (J) := Mapping.all (Source.Data (J)); end loop; return Result; end Super_Translate; procedure Super_Translate (Source : in out Super_String; Mapping : Wide_Maps.Wide_Character_Mapping_Function) is begin for J in 1 .. Source.Current_Length loop Source.Data (J) := Mapping.all (Source.Data (J)); end loop; end Super_Translate; ---------------- -- Super_Trim -- ---------------- function Super_Trim (Source : Super_String; Side : Trim_End) return Super_String is Result : Super_String (Source.Max_Length); Last : Natural := Source.Current_Length; First : Positive := 1; begin if Side = Left or else Side = Both then while First <= Last and then Source.Data (First) = ' ' loop First := First + 1; end loop; end if; if Side = Right or else Side = Both then while Last >= First and then Source.Data (Last) = ' ' loop Last := Last - 1; end loop; end if; Result.Current_Length := Last - First + 1; Result.Data (1 .. Result.Current_Length) := Source.Data (First .. Last); return Result; end Super_Trim; procedure Super_Trim (Source : in out Super_String; Side : Trim_End) is Max_Length : constant Positive := Source.Max_Length; Last : Natural := Source.Current_Length; First : Positive := 1; Temp : Wide_String (1 .. Max_Length); begin Temp (1 .. Last) := Source.Data (1 .. Last); if Side = Left or else Side = Both then while First <= Last and then Temp (First) = ' ' loop First := First + 1; end loop; end if; if Side = Right or else Side = Both then while Last >= First and then Temp (Last) = ' ' loop Last := Last - 1; end loop; end if; Source.Data := (others => Wide_NUL); Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Temp (First .. Last); end Super_Trim; function Super_Trim (Source : Super_String; Left : Wide_Maps.Wide_Character_Set; Right : Wide_Maps.Wide_Character_Set) return Super_String is Result : Super_String (Source.Max_Length); begin for First in 1 .. Source.Current_Length loop if not Is_In (Source.Data (First), Left) then for Last in reverse First .. Source.Current_Length loop if not Is_In (Source.Data (Last), Right) then Result.Current_Length := Last - First + 1; Result.Data (1 .. Result.Current_Length) := Source.Data (First .. Last); return Result; end if; end loop; end if; end loop; Result.Current_Length := 0; return Result; end Super_Trim; procedure Super_Trim (Source : in out Super_String; Left : Wide_Maps.Wide_Character_Set; Right : Wide_Maps.Wide_Character_Set) is begin for First in 1 .. Source.Current_Length loop if not Is_In (Source.Data (First), Left) then for Last in reverse First .. Source.Current_Length loop if not Is_In (Source.Data (Last), Right) then if First = 1 then Source.Current_Length := Last; return; else Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Source.Data (First .. Last); for J in Source.Current_Length + 1 .. Source.Max_Length loop Source.Data (J) := Wide_NUL; end loop; return; end if; end if; end loop; Source.Current_Length := 0; return; end if; end loop; Source.Current_Length := 0; end Super_Trim; ----------- -- Times -- ----------- function Times (Left : Natural; Right : Wide_Character; Max_Length : Positive) return Super_String is Result : Super_String (Max_Length); begin if Left > Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Left; for J in 1 .. Left loop Result.Data (J) := Right; end loop; end if; return Result; end Times; function Times (Left : Natural; Right : Wide_String; Max_Length : Positive) return Super_String is Result : Super_String (Max_Length); Pos : Positive := 1; Rlen : constant Natural := Right'Length; Nlen : constant Natural := Left * Rlen; begin if Nlen > Max_Length then raise Ada.Strings.Index_Error; else Result.Current_Length := Nlen; if Nlen > 0 then for J in 1 .. Left loop Result.Data (Pos .. Pos + Rlen - 1) := Right; Pos := Pos + Rlen; end loop; end if; end if; return Result; end Times; function Times (Left : Natural; Right : Super_String) return Super_String is Result : Super_String (Right.Max_Length); Pos : Positive := 1; Rlen : constant Natural := Right.Current_Length; Nlen : constant Natural := Left * Rlen; begin if Nlen > Right.Max_Length then raise Ada.Strings.Length_Error; else Result.Current_Length := Nlen; if Nlen > 0 then for J in 1 .. Left loop Result.Data (Pos .. Pos + Rlen - 1) := Right.Data (1 .. Rlen); Pos := Pos + Rlen; end loop; end if; end if; return Result; end Times; --------------------- -- To_Super_String -- --------------------- function To_Super_String (Source : Wide_String; Max_Length : Natural; Drop : Truncation := Error) return Super_String is Result : Super_String (Max_Length); Slen : constant Natural := Source'Length; begin if Slen <= Max_Length then Result.Current_Length := Slen; Result.Data (1 .. Slen) := Source; else case Drop is when Strings.Right => Result.Current_Length := Max_Length; Result.Data (1 .. Max_Length) := Source (Source'First .. Source'First - 1 + Max_Length); when Strings.Left => Result.Current_Length := Max_Length; Result.Data (1 .. Max_Length) := Source (Source'Last - (Max_Length - 1) .. Source'Last); when Strings.Error => raise Ada.Strings.Length_Error; end case; end if; return Result; end To_Super_String; end Ada.Strings.Wide_Superbounded;
30.361427
79
0.527053
59af1231c8fef2b64da858f2005a43dee5df7df4
8,135
adb
Ada
src/asf-components-html-lists.adb
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
12
2015-01-18T23:02:20.000Z
2022-03-25T15:30:30.000Z
src/asf-components-html-lists.adb
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
3
2021-01-06T09:44:02.000Z
2022-02-04T20:20:53.000Z
src/asf-components-html-lists.adb
jquorning/ada-asf
ddc697c5dfa4e22c57c6958f4cff27e14d02ce98
[ "Apache-2.0" ]
4
2016-04-12T05:29:00.000Z
2022-01-24T23:53:59.000Z
----------------------------------------------------------------------- -- html.lists -- List of items -- Copyright (C) 2009, 2010, 2013, 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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.Log.Loggers; with Util.Beans.Basic; with ASF.Components.Base; package body ASF.Components.Html.Lists is use type EL.Objects.Data_Type; Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ASF.Components.Html.Lists"); function Get_Item_Layout (List_Layout : in String; Item_Class : in String) return String; -- ------------------------------ -- Get the list layout to use. The default is to use no layout or a div if some CSS style -- is applied on the list or some specific list ID must be generated. Possible layout values -- include: -- "simple" : the list is rendered as is or as a div with each children as is, -- "unorderedList" : the list is rendered as an HTML ul/li list, -- "orderedList" : the list is rendered as an HTML ol/li list. -- ------------------------------ function Get_Layout (UI : in UIList; Class : in String; Context : in Faces_Context'Class) return String is Value : constant EL.Objects.Object := UI.Get_Attribute (Context, "layout"); Layout : constant String := EL.Objects.To_String (Value); begin if Layout = "orderedList" or Layout = "ordered" then return "ol"; elsif Layout = "unorderedList" or Layout = "unordered" then return "ul"; elsif Class'Length > 0 or else not UI.Is_Generated_Id then return "div"; else return ""; end if; end Get_Layout; -- ------------------------------ -- Get the item layout according to the list layout and the item class (if any). -- ------------------------------ function Get_Item_Layout (List_Layout : in String; Item_Class : in String) return String is begin if List_Layout'Length = 2 then return "li"; elsif Item_Class'Length > 0 then return "div"; else return ""; end if; end Get_Item_Layout; -- ------------------------------ -- Get the value to write on the output. -- ------------------------------ function Get_Value (UI : in UIList) return EL.Objects.Object is begin return UI.Get_Attribute (UI.Get_Context.all, "value"); end Get_Value; -- ------------------------------ -- Set the value to write on the output. -- ------------------------------ procedure Set_Value (UI : in out UIList; Value : in EL.Objects.Object) is begin null; end Set_Value; -- ------------------------------ -- Get the variable name -- ------------------------------ function Get_Var (UI : in UIList) return String is Var : constant EL.Objects.Object := UI.Get_Attribute (UI.Get_Context.all, "var"); begin return EL.Objects.To_String (Var); end Get_Var; -- ------------------------------ -- Encode an item of the list with the given item layout and item class. -- ------------------------------ procedure Encode_Item (UI : in UIList; Item_Layout : in String; Item_Class : in String; Context : in out Faces_Context'Class) is Writer : constant Response_Writer_Access := Context.Get_Response_Writer; begin if Item_Layout'Length > 0 then Writer.Start_Element (Item_Layout); end if; if Item_Class'Length > 0 then Writer.Write_Attribute ("class", Item_Class); end if; Base.UIComponent (UI).Encode_Children (Context); if Item_Layout'Length > 0 then Writer.End_Element (Item_Layout); end if; end Encode_Item; procedure Encode_Children (UI : in UIList; Context : in out Faces_Context'Class) is begin if not UI.Is_Rendered (Context) then return; end if; declare Value : EL.Objects.Object := Get_Value (UI); Kind : constant EL.Objects.Data_Type := EL.Objects.Get_Type (Value); Name : constant String := UI.Get_Var; Bean : access Util.Beans.Basic.Readonly_Bean'Class; Is_Reverse : constant Boolean := UI.Get_Attribute ("reverse", Context, False); List : Util.Beans.Basic.List_Bean_Access; Count : Natural; begin -- Check that we have a List_Bean but do not complain if we have a null value. if Kind /= EL.Objects.TYPE_BEAN then if Kind /= EL.Objects.TYPE_NULL then ASF.Components.Base.Log_Error (UI, "Invalid list bean (found a {0})", EL.Objects.Get_Type_Name (Value)); end if; return; end if; Bean := EL.Objects.To_Bean (Value); if Bean = null or else not (Bean.all in Util.Beans.Basic.List_Bean'Class) then ASF.Components.Base.Log_Error (UI, "Invalid list bean: " & "it does not implement 'List_Bean' interface"); return; end if; List := Util.Beans.Basic.List_Bean'Class (Bean.all)'Unchecked_Access; Count := List.Get_Count; if Count /= 0 then declare Class : constant String := UI.Get_Attribute (STYLE_CLASS_ATTR_NAME, Context, ""); Item_Class : constant String := UI.Get_Attribute (ITEM_STYLE_CLASS_ATTR_NAME, Context, ""); Layout : constant String := UI.Get_Layout (Class, Context); Writer : constant Response_Writer_Access := Context.Get_Response_Writer; Item_Layout : constant String := Get_Item_Layout (Layout, Item_Class); begin if Layout'Length > 0 then Writer.Start_Element (Layout); end if; if not UI.Is_Generated_Id then Writer.Write_Attribute ("id", UI.Get_Client_Id); end if; if Class'Length > 0 then Writer.Write_Attribute ("class", Class); end if; if Is_Reverse then for I in reverse 1 .. Count loop List.Set_Row_Index (I); Value := List.Get_Row; Context.Set_Attribute (Name, Value); Log.Debug ("Set variable {0}", Name); UI.Encode_Item (Item_Layout, Item_Class, Context); end loop; else for I in 1 .. Count loop List.Set_Row_Index (I); Value := List.Get_Row; Context.Set_Attribute (Name, Value); Log.Debug ("Set variable {0}", Name); UI.Encode_Item (Item_Layout, Item_Class, Context); end loop; end if; if Layout'Length > 0 then Writer.End_Element (Layout); end if; end; end if; end; end Encode_Children; end ASF.Components.Html.Lists;
41.085859
99
0.528703
2ffb46aa4fb879d6f4b27a6bfa27cdb6c3060848
671
ads
Ada
resources/scripts/api/sublist3r.ads
0xflotus/Amass
89a8960c5254031364f966190e841d6951206d47
[ "Apache-2.0" ]
11
2020-08-19T01:01:42.000Z
2022-02-12T08:36:53.000Z
resources/scripts/api/sublist3r.ads
0xflotus/Amass
89a8960c5254031364f966190e841d6951206d47
[ "Apache-2.0" ]
null
null
null
resources/scripts/api/sublist3r.ads
0xflotus/Amass
89a8960c5254031364f966190e841d6951206d47
[ "Apache-2.0" ]
2
2020-11-10T17:13:54.000Z
2021-01-23T07:23:24.000Z
-- 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. local json = require("json") name = "Sublist3rAPI" type = "api" function start() setratelimit(1) end function vertical(ctx, domain) local page, err = request({url=buildurl(domain)}) if (err ~= nil and err ~= "") then return end local resp = json.decode(page) if (resp == nil or #resp == 0) then return end for i, v in pairs(resp) do newname(ctx, v) end end function buildurl(domain) return "https://api.sublist3r.com/search.php?domain=" .. domain end
20.96875
97
0.645306
120c48ba14cb78c9889c9c924aeaa0ad126b7c18
3,271
adb
Ada
source/libgela/gela-decoders-fixed_width_8.adb
faelys/gela-asis
48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253
[ "BSD-3-Clause" ]
4
2016-02-05T15:51:56.000Z
2022-03-25T20:38:32.000Z
source/libgela/gela-decoders-fixed_width_8.adb
faelys/gela-asis
48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253
[ "BSD-3-Clause" ]
null
null
null
source/libgela/gela-decoders-fixed_width_8.adb
faelys/gela-asis
48a3bee90eda9f0c9d958b4e3c80a5a9b1c65253
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ package body Gela.Decoders.Fixed_Width_8 is ------------ -- Decode -- ------------ procedure Decode (Object : in Decoder; From : in Source_Buffers.Cursor; To : in Source_Buffers.Cursor; Result : out Wide_String; Last : out Natural) is use Source_Buffers; Pos : Cursor := From; Char : Character; Index : Natural := Result'First - 1; begin while Pos /= To loop Index := Index + 1; Char := Element (Pos); Next (Pos); if Character'Pos (Char) in Object.Table'Range then Result (Index) := Object.Table (Character'Pos (Char)); else Result (Index) := Wide_Character'Val (Character'Pos (Char)); end if; end loop; Last := Index; end Decode; end Gela.Decoders.Fixed_Width_8; ------------------------------------------------------------------------------ -- Copyright (c) 2008, Maxim Reznik -- 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 Maxim Reznik, 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 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. -- ------------------------------------------------------------------------------
43.613333
79
0.559462
291c29511b0366fe4909165d10a58a7a572818f7
8,554
adb
Ada
tests/natools-s_expressions-conditionals-strings-tests.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
tests/natools-s_expressions-conditionals-strings-tests.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
tests/natools-s_expressions-conditionals-strings-tests.adb
faelys/natools
947c004e6f69ca144942c6af40e102d089223cf8
[ "0BSD" ]
null
null
null
------------------------------------------------------------------------------ -- Copyright (c) 2015-2017, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Caches; with Natools.S_Expressions.Test_Tools; package body Natools.S_Expressions.Conditionals.Strings.Tests is procedure Check (Test : in out NT.Test; Context : in Strings.Context; Expression : in Caches.Reference; Image : in String; Expected : in Boolean := True); procedure Check (Test : in out NT.Test; Value : in String; Expression : in Caches.Reference; Image : in String; Expected : in Boolean := True); ------------------------------ -- Local Helper Subprograms -- ------------------------------ procedure Check (Test : in out NT.Test; Context : in Strings.Context; Expression : in Caches.Reference; Image : in String; Expected : in Boolean := True) is function Match_Image return String; Cursor : Caches.Cursor := Expression.First; function Match_Image return String is begin if Expected then return " does not match "; else return " does match "; end if; end Match_Image; begin if Evaluate (Context, Cursor) /= Expected then Test.Fail ('"' & Context.Data.all & '"' & Match_Image & Image); end if; end Check; procedure Check (Test : in out NT.Test; Value : in String; Expression : in Caches.Reference; Image : in String; Expected : in Boolean := True) is function Match_Image return String; Cursor : Caches.Cursor := Expression.First; function Match_Image return String is begin if Expected then return " does not match "; else return " does match "; end if; end Match_Image; begin if Evaluate (Value, Cursor) /= Expected then Test.Fail ('"' & Value & '"' & Match_Image & Image); end if; end Check; ------------------------- -- Complete Test Suite -- ------------------------- procedure All_Tests (Report : in out NT.Reporter'Class) is begin Basic_Usage (Report); Fallbacks (Report); end All_Tests; ---------------------- -- Individual Tests -- ---------------------- procedure Basic_Usage (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Basic usage"); begin declare procedure Check (Value : in String; Expected : in Boolean := True); Image : constant String := "Expression 1"; Exp : constant Caches.Reference := Test_Tools.To_S_Expression ("(or is-empty (starts-with Hi)" & "(is BY) (case-insensitive (is HELLO))" & "(and (contains 1:.) (contains-any-of 1:! 1:?))" & "(case-insensitive (or (contains aLiCe)" & " (case-sensitive (contains Bob))))" & "(not is-ascii))"); procedure Check (Value : in String; Expected : in Boolean := True) is begin Check (Test, Value, Exp, Image, Expected); end Check; begin Check (""); Check ("A", False); Check ("Hi, my name is John."); Check ("Hello, my name is John.", False); Check ("Hello. My name is John!"); Check ("Hello. My name is John?"); Check ("Alice and Bob"); Check ("BOBBY!", False); Check ("AlicE and Malory"); Check ("©"); Check ("BY"); Check ("By", False); Check ("Hello"); Check ("Hell", False); end; exception when Error : others => Test.Report_Exception (Error); end Basic_Usage; procedure Fallbacks (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Fallback functions"); begin declare procedure Check (Value : in String; With_Fallback : in Boolean); procedure Check_Counts (Expected_Parametric, Expected_Simple : in Natural); function Parametric_Fallback (Settings : in Strings.Settings; Name : in Atom; Arguments : in out Lockable.Descriptor'Class) return Boolean; function Simple_Fallback (Settings : in Strings.Settings; Name : in Atom) return Boolean; Parametric_Count : Natural := 0; Simple_Count : Natural := 0; Exp : constant Caches.Reference := Test_Tools.To_S_Expression ("(or" & "(and (starts-with a) non-existant)" & "(does-not-exist ohai ()))"); procedure Check (Value : in String; With_Fallback : in Boolean) is Copy : aliased constant String := Value; Context : Strings.Context (Data => Copy'Access, Parametric_Fallback => (if With_Fallback then Parametric_Fallback'Access else null), Simple_Fallback => (if With_Fallback then Simple_Fallback'Access else null)); begin Context.Settings.Case_Sensitive := False; begin Check (Test, Context, Exp, "Fallback expression"); if not With_Fallback then Test.Fail ("Exception expected from """ & Value & '"'); end if; exception when Constraint_Error => if With_Fallback then raise; end if; end; end Check; procedure Check_Counts (Expected_Parametric, Expected_Simple : in Natural) is begin if Parametric_Count /= Expected_Parametric then Test.Fail ("Parametric_Count is" & Natural'Image (Parametric_Count) & ", expected" & Natural'Image (Expected_Parametric)); end if; if Simple_Count /= Expected_Simple then Test.Fail ("Simple_Count is" & Natural'Image (Simple_Count) & ", expected" & Natural'Image (Expected_Simple)); end if; end Check_Counts; function Parametric_Fallback (Settings : in Strings.Settings; Name : in Atom; Arguments : in out Lockable.Descriptor'Class) return Boolean is pragma Unreferenced (Settings, Arguments); begin Parametric_Count := Parametric_Count + 1; return To_String (Name) = "does-not-exist"; end Parametric_Fallback; function Simple_Fallback (Settings : in Strings.Settings; Name : in Atom) return Boolean is pragma Unreferenced (Settings); begin Simple_Count := Simple_Count + 1; return To_String (Name) = "non-existant"; end Simple_Fallback; begin Check ("Oook?", False); Check ("Alice", False); Check ("Alpha", True); Check_Counts (0, 1); Check ("Bob", True); Check_Counts (1, 1); end; exception when Error : others => Test.Report_Exception (Error); end Fallbacks; end Natools.S_Expressions.Conditionals.Strings.Tests;
32.773946
78
0.525134
31851b3ee093295704263b71fcff48655067da23
2,885
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/g-strspl.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/ada/g-strspl.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/g-strspl.ads
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 T R I N G _ S P L I T -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-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. -- -- -- ------------------------------------------------------------------------------ -- Useful string-manipulation routines: given a set of separators, split -- a string wherever the separators appear, and provide direct access -- to the resulting slices. See GNAT.Array_Split for full documentation. with Ada.Strings.Maps; use Ada.Strings; with GNAT.Array_Split; package GNAT.String_Split is new GNAT.Array_Split (Element => Character, Element_Sequence => String, Element_Set => Maps.Character_Set, To_Set => Maps.To_Set, Is_In => Maps.Is_In);
64.111111
78
0.425997
1d5402d1c99f84232c5fb45f56a0609dd722e7e0
1,277
ads
Ada
ParallelProgramming-2/rgr/part2/data.ads
smithros/kpi-stuff
60da5f960ab6ab3d1c2b0ea451d4d113c333d7ad
[ "MIT" ]
21
2021-01-20T19:49:31.000Z
2021-12-15T20:26:18.000Z
ParallelProgramming-2/rgr/part2/data.ads
smithros/kpi-stuff
60da5f960ab6ab3d1c2b0ea451d4d113c333d7ad
[ "MIT" ]
1
2021-03-13T17:24:41.000Z
2021-05-28T18:33:49.000Z
ParallelProgramming-2/rgr/part2/data.ads
smithros/kpi-stuff
60da5f960ab6ab3d1c2b0ea451d4d113c333d7ad
[ "MIT" ]
3
2021-02-16T17:41:16.000Z
2022-03-25T13:18:04.000Z
with Ada.Text_IO; use Ada.Text_IO; generic N, H : in Natural; package Data is type Vector is array(Integer range <>) of Integer; Subtype VectorN is Vector(1..N); Subtype Vector4H is Vector(1..4 * H); Subtype Vector3H is Vector(1..3 * H); Subtype Vector2H is Vector(1..2 * H); Subtype VectorH is Vector(1..H); type Matrix is array(Integer range <>) of VectorN; Subtype MatrixN is Matrix(1..N); Subtype Matrix4H is Matrix(1..4 * H); Subtype Matrix3H is Matrix(1..3 * H); Subtype Matrix2H is Matrix(1..2 * H); Subtype MatrixH is Matrix(1..H); procedure Input ( V : out Vector; Value : in Integer); procedure Input ( MA : out Matrix; Value : in Integer); procedure Output (V : in VectorN); procedure Output (MA : in Matrix); procedure FindMinZ (V : in VectorH; minZi : out Integer); function Min (A, B: Integer) return Integer; function Calculation (X : in VectorN; MA : in MatrixN; MS : in MatrixH; q : in Integer; R : in VectorN; MF: in MatrixH) return VectorH; end Data;
27.76087
60
0.540329
3178f3757d78a07b69cf69f3204c046eaa98c765
5,466
adb
Ada
ado/src/sqlbench-simple.adb
fjudith/sql-benchmark
13a5e20d59a9ddac02eca252db125934b7ec177c
[ "Apache-2.0" ]
24
2018-10-28T11:04:19.000Z
2021-11-16T12:29:21.000Z
ado/src/sqlbench-simple.adb
fjudith/sql-benchmark
13a5e20d59a9ddac02eca252db125934b7ec177c
[ "Apache-2.0" ]
1
2022-02-16T00:55:45.000Z
2022-02-16T00:55:45.000Z
ado/src/sqlbench-simple.adb
fjudith/sql-benchmark
13a5e20d59a9ddac02eca252db125934b7ec177c
[ "Apache-2.0" ]
3
2019-04-15T17:04:26.000Z
2020-10-29T21:27:49.000Z
----------------------------------------------------------------------- -- sqlbench-simple -- Simple SQL benchmark -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Ada.Strings.Unbounded; with ADO.Statements; with Util.Files; package body Sqlbench.Simple is use Ada.Strings.Unbounded; generic LIMIT : Positive; procedure Select_Table_N (Context : in out Context_Type); procedure Select_Table_N (Context : in out Context_Type) is DB : constant ADO.Sessions.Master_Session := Context.Get_Session; Count : Natural; Stmt : ADO.Statements.Query_Statement := DB.Create_Statement ("SELECT * FROM test_simple LIMIT " & Positive'Image (LIMIT)); begin for I in 1 .. Context.Repeat loop Stmt.Execute; Count := 0; while Stmt.Has_Elements loop Count := Count + 1; Stmt.Next; end loop; if Count /= LIMIT then raise Benchmark_Error with "Invalid result count:" & Natural'Image (Count); end if; end loop; end Select_Table_N; procedure Do_Static (Context : in out Context_Type); procedure Select_Static (Context : in out Context_Type); procedure Connect_Select_Static (Context : in out Context_Type); procedure Drop_Create (Context : in out Context_Type); procedure Insert (Context : in out Context_Type); procedure Select_Table_1 is new Select_Table_N (1); procedure Select_Table_10 is new Select_Table_N (10); procedure Select_Table_100 is new Select_Table_N (100); procedure Select_Table_500 is new Select_Table_N (500); procedure Select_Table_1000 is new Select_Table_N (1000); Create_SQL : Ada.Strings.Unbounded.Unbounded_String; procedure Register (Tests : in out Context_Type) is Driver : constant String := Tests.Get_Driver_Name; begin if Driver /= "sqlite" and Driver /= "postgresql" then Tests.Register (Do_Static'Access, "DO 1"); end if; Tests.Register (Select_Static'Access, "SELECT 1"); Tests.Register (Connect_Select_Static'Access, "CONNECT; SELECT 1; CLOSE"); Tests.Register (Drop_Create'Access, "DROP table; CREATE table", 1); Tests.Register (Insert'Access, "INSERT INTO table", 10); Tests.Register (Select_Table_1'Access, "SELECT * FROM table LIMIT 1"); Tests.Register (Select_Table_10'Access, "SELECT * FROM table LIMIT 10"); Tests.Register (Select_Table_100'Access, "SELECT * FROM table LIMIT 100"); Tests.Register (Select_Table_500'Access, "SELECT * FROM table LIMIT 500"); Tests.Register (Select_Table_1000'Access, "SELECT * FROM table LIMIT 1000"); Util.Files.Read_File (Tests.Get_Config_Path ("create-table.sql"), Create_SQL); end Register; procedure Do_Static (Context : in out Context_Type) is Stmt : ADO.Statements.Query_Statement := Context.Session.Create_Statement ("DO 1"); begin for I in 1 .. Context.Repeat loop Stmt.Execute; end loop; end Do_Static; procedure Select_Static (Context : in out Context_Type) is Stmt : ADO.Statements.Query_Statement := Context.Session.Create_Statement ("SELECT 1"); begin for I in 1 .. Context.Repeat loop Stmt.Execute; end loop; end Select_Static; procedure Connect_Select_Static (Context : in out Context_Type) is begin for I in 1 .. Context.Repeat loop declare DB : constant ADO.Sessions.Session := Context.Factory.Get_Session; Stmt : ADO.Statements.Query_Statement := DB.Create_Statement ("SELECT 1"); begin Stmt.Execute; end; end loop; end Connect_Select_Static; procedure Drop_Create (Context : in out Context_Type) is Drop_Stmt : ADO.Statements.Query_Statement := Context.Session.Create_Statement ("DROP TABLE test_simple"); Create_Stmt : ADO.Statements.Query_Statement := Context.Session.Create_Statement (To_String (Create_SQL)); begin for I in 1 .. Context.Repeat loop begin Drop_Stmt.Execute; Context.Session.Commit; exception when ADO.Statements.SQL_Error => Context.Session.Rollback; end; Context.Session.Begin_Transaction; Create_Stmt.Execute; Context.Session.Commit; Context.Session.Begin_Transaction; end loop; end Drop_Create; procedure Insert (Context : in out Context_Type) is Stmt : ADO.Statements.Query_Statement := Context.Session.Create_Statement ("INSERT INTO test_simple (value) VALUES (1)"); begin for I in 1 .. Context.Repeat loop Stmt.Execute; end loop; Context.Session.Commit; end Insert; end Sqlbench.Simple;
36.932432
94
0.660446
129f7de8ac03e8f76c60d8841a096c13e533b1c2
441
adb
Ada
tools/SPARK2005/packages/polypaver/pp_f_elementary.adb
michalkonecny/polypaver
7a1541a85523f5ecbef44b7f5e09680d9a5c1ca6
[ "BSD-3-Clause" ]
1
2015-07-01T14:50:00.000Z
2015-07-01T14:50:00.000Z
tools/SPARK2005/packages/polypaver/pp_f_elementary.adb
michalkonecny/polypaver
7a1541a85523f5ecbef44b7f5e09680d9a5c1ca6
[ "BSD-3-Clause" ]
null
null
null
tools/SPARK2005/packages/polypaver/pp_f_elementary.adb
michalkonecny/polypaver
7a1541a85523f5ecbef44b7f5e09680d9a5c1ca6
[ "BSD-3-Clause" ]
null
null
null
-- This file cannot be processed by the SPARK Examiner. with Ada.Numerics, Ada.Numerics.Elementary_Functions; package body PP_F_Elementary is function Pi return Float is begin return Ada.Numerics.Pi; end Pi; function Sqrt (X : Float) return Float renames Ada.Numerics.Elementary_Functions.Sqrt; function Exp (X : Float) return Float renames Ada.Numerics.Elementary_Functions.Exp; end PP_F_Elementary;
24.5
55
0.741497
598d17a64d9a3612de849e160c553011d64a66fb
7,434
ads
Ada
llvm-gcc-4.2-2.9/gcc/ada/system-linux-s390x.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/system-linux-s390x.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/system-linux-s390x.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (GNU-Linux/s390x Version) -- -- -- -- Copyright (C) 1992-2005 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, 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 System is pragma Pure (System); -- Note that we take advantage of the implementation permission to -- make this unit Pure instead of Preelaborable, see RM 13.7(36) type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := Long_Long_Integer'First; Max_Int : constant := Long_Long_Integer'Last; Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size; Max_Nonbinary_Modulus : constant := Integer'Last; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := 63; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 0.000_001; -- Storage-related Declarations type Address is private; Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := 64; Memory_Size : constant := 2 ** 64; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := High_Order_First; -- Priority-related Declarations (RM D.1) Max_Priority : constant Positive := 30; Max_Interrupt_Priority : constant Positive := 31; subtype Any_Priority is Integer range 0 .. 31; subtype Priority is Any_Priority range 0 .. 30; subtype Interrupt_Priority is Any_Priority range 31 .. 31; Default_Priority : constant Priority := 15; private type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. AAMP : constant Boolean := False; Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := False; Command_Line_Args : constant Boolean := True; Compiler_System_Version : constant Boolean := False; Configurable_Run_Time : constant Boolean := False; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := True; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Functions_Return_By_DSP : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; OpenVMS : constant Boolean := False; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := False; Support_64_Bit_Divides : constant Boolean := True; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Suppress_Standard_Library : constant Boolean := False; Use_Ada_Main_Program_Name : constant Boolean := False; ZCX_By_Default : constant Boolean := True; GCC_ZCX_Support : constant Boolean := True; Front_End_ZCX_Support : constant Boolean := False; -- Obsolete entries, to be removed eventually (bootstrap issues!) High_Integrity_Mode : constant Boolean := False; Long_Shifts_Inlined : constant Boolean := True; end System;
48.588235
78
0.559591
1d03aec1f171e759835685fae30b533183170656
6,448
ads
Ada
tools/scitools/conf/understand/ada/ada12/s-wchcnv.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/ada12/s-wchcnv.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/ada/ada12/s-wchcnv.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . W C H _ C N V -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2009, 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. -- -- -- -- -- -- -- -- -- -- -- -- 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 generic subprograms used for converting between -- sequences of Character and Wide_Character. Wide_Wide_Character values -- are also handled, but represented using integer range types defined in -- this package, so that this package can be used from applications that -- are restricted to Ada 95 compatibility (such as the compiler itself). -- All the algorithms for encoding and decoding are isolated in this package -- and in System.WCh_JIS and should not be duplicated elsewhere. The only -- exception to this is that GNAT.Decode_String and GNAT.Encode_String have -- their own circuits for UTF-8 conversions, for improved efficiency. -- This unit may be used directly from an application program by providing -- an appropriate WITH, and the interface can be expected to remain stable. pragma Compiler_Unit; with System.WCh_Con; package System.WCh_Cnv is pragma Pure; type UTF_32_Code is range 0 .. 16#7FFF_FFFF#; for UTF_32_Code'Size use 32; -- Range of allowed UTF-32 encoding values type UTF_32_String is array (Positive range <>) of UTF_32_Code; generic with function In_Char return Character; function Char_Sequence_To_Wide_Char (C : Character; EM : System.WCh_Con.WC_Encoding_Method) return Wide_Character; -- C is the first character of a sequence of one or more characters which -- represent a wide character sequence. Calling the function In_Char for -- additional characters as required, Char_To_Wide_Char returns the -- corresponding wide character value. Constraint_Error is raised if the -- sequence of characters encountered is not a valid wide character -- sequence for the given encoding method. -- -- Note on the use of brackets encoding (WCEM_Brackets). The brackets -- encoding method is ambiguous in the context of this function, since -- there is no way to tell if ["1234"] is eight unencoded characters or -- one encoded character. In the context of Ada sources, any sequence -- starting [" must be the start of an encoding (since that sequence is -- not valid in Ada source otherwise). The routines in this package use -- the same approach. If the input string contains the sequence [" then -- this is assumed to be the start of a brackets encoding sequence, and -- if it does not match the syntax, an error is raised. generic with function In_Char return Character; function Char_Sequence_To_UTF_32 (C : Character; EM : System.WCh_Con.WC_Encoding_Method) return UTF_32_Code; -- This is similar to the above, but the function returns a code from -- the full UTF_32 code set, which covers the full range of possible -- values in Wide_Wide_Character. The result can be converted to -- Wide_Wide_Character form using Wide_Wide_Character'Val. generic with procedure Out_Char (C : Character); procedure Wide_Char_To_Char_Sequence (WC : Wide_Character; EM : System.WCh_Con.WC_Encoding_Method); -- Given a wide character, converts it into a sequence of one or -- more characters, calling the given Out_Char procedure for each. -- Constraint_Error is raised if the given wide character value is -- not a valid value for the given encoding method. -- -- Note on brackets encoding (WCEM_Brackets). For the input routines above, -- upper half characters can be represented as ["hh"] but this procedure -- will only use brackets encodings for codes higher than 16#FF#, so upper -- half characters will be output as single Character values. generic with procedure Out_Char (C : Character); procedure UTF_32_To_Char_Sequence (Val : UTF_32_Code; EM : System.WCh_Con.WC_Encoding_Method); -- This is similar to the above, but the input value is a code from the -- full UTF_32 code set, which covers the full range of possible values -- in Wide_Wide_Character. To convert a Wide_Wide_Character value, the -- caller can use Wide_Wide_Character'Pos in the call. end System.WCh_Cnv;
55.111111
79
0.575217
59d9d4c96d126f39352fde0a4792b39820f89fb9
1,081
ads
Ada
ada-environment_variables.ads
mgrojo/adalib
dc1355a5b65c2843e702ac76252addb2caf3c56b
[ "BSD-3-Clause" ]
15
2018-07-08T07:09:19.000Z
2021-11-21T09:58:55.000Z
ada-environment_variables.ads
mgrojo/adalib
dc1355a5b65c2843e702ac76252addb2caf3c56b
[ "BSD-3-Clause" ]
4
2019-11-17T20:04:33.000Z
2021-08-29T21:24:55.000Z
ada-environment_variables.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 <[email protected]> -- 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 --------------------------------------------------------------------------- package Ada.Environment_Variables is pragma Preelaborate (Environment_Variables); function Value (Name : in String) return String; function Value (Name : in String; Default : in String) return String; function Exists (Name : in String) return Boolean; procedure Set (Name : in String; Value : in String); procedure Clear (Name : in String); procedure Clear; procedure Iterate (Process : not null access procedure (Name : in String; Value : in String)); end Ada.Environment_Variables;
32.757576
75
0.603145
59f5f5a647104a30ff7013517803dfef4231037d
705
adb
Ada
1A/S5/PIM/tps/tp1/puissance.adb
MOUDDENEHamza/ENSEEIHT
a90b1dee0c8d18a9578153a357278d99405bb534
[ "Apache-2.0" ]
4
2020-05-02T12:32:32.000Z
2022-01-12T20:20:35.000Z
1A/S5/PIM/tps/tp1/puissance.adb
MOUDDENEHamza/ENSEEIHT
a90b1dee0c8d18a9578153a357278d99405bb534
[ "Apache-2.0" ]
2
2021-01-14T20:03:26.000Z
2022-01-30T01:10:00.000Z
1A/S5/PIM/tps/tp1/puissance.adb
MOUDDENEHamza/ENSEEIHT
a90b1dee0c8d18a9578153a357278d99405bb534
[ "Apache-2.0" ]
13
2020-11-11T21:28:11.000Z
2022-02-19T13:54:22.000Z
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; procedure puissance is x, res : Float; n : Integer; begin -- Ask number who we will calculate it power with a exponent power. Put ("Enter your x : "); Get (x); res := Float(1); -- Ask the exponent of the number. Put ("Enter your exponent : "); Get (n); -- Display the power. for i in 1..abs(n) loop if n >= 0 then -- If the exponent is greater than 0. res := res * x; else res := res * (Float(1) / x); end if; end loop; Put_Line (Float'Image(res)); end puissance;
21.363636
71
0.584397
2f1892f6916f1a25e92656f04159ceea41457563
2,885
adb
Ada
.emacs.d/elpa/wisi-3.1.3/wisitoken-productions.adb
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-3.1.3/wisitoken-productions.adb
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-3.1.3/wisitoken-productions.adb
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
-- Abstract : -- -- See spec. -- -- Copyright (C) 2018, 2020 Free Software Foundation, Inc. -- -- This file is part of the WisiToken package. -- -- The WisiToken package is free software; you can redistribute it -- and/or modify it under terms of the GNU General Public License as -- published by the Free Software Foundation; either version 3, or -- (at your option) any later version. This library is distributed in -- the hope that it will be useful, but WITHOUT ANY WARRANTY; without -- even the implied warranty of MERCHAN- TABILITY 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. pragma License (Modified_GPL); with Ada.Text_IO; package body WisiToken.Productions is function Image (Item : in Recursion_Arrays.Vector) return String is use Ada.Strings.Unbounded; Result : Ada.Strings.Unbounded.Unbounded_String := +"("; Need_Comma : Boolean := False; begin -- We assume most are None, so we use named association for I in Item.First_Index .. Item.Last_Index loop if Item (I) /= None then Result := Result & (if Need_Comma then ", " else "") & Trimmed_Image (I) & " => " & Image (Item (I)); Need_Comma := True; end if; end loop; Result := Result & ")"; return -Result; end Image; function Constant_Ref_RHS (Grammar : in Prod_Arrays.Vector; ID : in Production_ID) return RHS_Arrays.Constant_Reference_Type is begin return RHS_Arrays.Constant_Ref (Grammar (ID.LHS).RHSs, ID.RHS); end Constant_Ref_RHS; function Image (LHS : in Token_ID; RHS_Index : in Natural; RHS : in Token_ID_Arrays.Vector; Descriptor : in WisiToken.Descriptor) return String is use Ada.Strings.Unbounded; Result : Unbounded_String := +Trimmed_Image ((LHS, RHS_Index)) & ": " & Image (LHS, Descriptor) & " <="; begin for ID of RHS loop Result := Result & ' ' & Image (ID, Descriptor); end loop; return To_String (Result); end Image; procedure Put (Grammar : Prod_Arrays.Vector; Descriptor : in WisiToken.Descriptor) is use Ada.Text_IO; begin for P of Grammar loop for R in P.RHSs.First_Index .. P.RHSs.Last_Index loop Put (Image (P.LHS, R, P.RHSs (R).Tokens, Descriptor)); if (for all Item of Grammar (P.LHS).RHSs (R).Recursion => Item = None) then New_Line; else Put_Line (" ; " & Image (Grammar (P.LHS).RHSs (R).Recursion)); end if; end loop; end loop; end Put; end WisiToken.Productions;
34.345238
113
0.629116
417da4b281bbb3e303e7da75448aac73f069a018
4,185
ads
Ada
source/sql/sql-queries-holders.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/sql/sql-queries-holders.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/sql/sql-queries-holders.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- SQL Database Access -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2016, Vadim Godunko <[email protected]> -- -- 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 League.Holders.Generic_Iterable_Holders; package SQL.Queries.Holders is Value_Tag : constant League.Holders.Tag; function Element (Self : League.Holders.Holder) return SQL_Query; -- Returns internal value. procedure Replace_Element (Self : in out League.Holders.Holder; To : SQL_Query); -- Set value. Tag of the value must be set before this call. function To_Holder (Item : SQL_Query) return League.Holders.Holder; -- Creates new Value from specified value. private function First (Self : aliased SQL_Query) return League.Holders.Iterable_Holder_Cursors.Cursor'Class; package Holders is new League.Holders.Generic_Iterable_Holders (Element_Type => SQL_Query, First => First); Value_Tag : constant League.Holders.Tag := Holders.Value_Tag; end SQL.Queries.Holders;
57.328767
78
0.456153
06f944fc8b825686b524d70728ab6e0f86d506fe
4,880
adb
Ada
source/nodes/program-nodes-signed_integer_types.adb
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-signed_integer_types.adb
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-signed_integer_types.adb
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- package body Program.Nodes.Signed_Integer_Types is function Create (Range_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Lower_Bound : not null Program.Elements.Expressions .Expression_Access; Double_Dot_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Upper_Bound : not null Program.Elements.Expressions .Expression_Access) return Signed_Integer_Type is begin return Result : Signed_Integer_Type := (Range_Token => Range_Token, Lower_Bound => Lower_Bound, Double_Dot_Token => Double_Dot_Token, Upper_Bound => Upper_Bound, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Lower_Bound : not null Program.Elements.Expressions .Expression_Access; Upper_Bound : not null Program.Elements.Expressions .Expression_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Signed_Integer_Type is begin return Result : Implicit_Signed_Integer_Type := (Lower_Bound => Lower_Bound, Upper_Bound => Upper_Bound, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Lower_Bound (Self : Base_Signed_Integer_Type) return not null Program.Elements.Expressions.Expression_Access is begin return Self.Lower_Bound; end Lower_Bound; overriding function Upper_Bound (Self : Base_Signed_Integer_Type) return not null Program.Elements.Expressions.Expression_Access is begin return Self.Upper_Bound; end Upper_Bound; overriding function Range_Token (Self : Signed_Integer_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Range_Token; end Range_Token; overriding function Double_Dot_Token (Self : Signed_Integer_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Double_Dot_Token; end Double_Dot_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Signed_Integer_Type) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Signed_Integer_Type) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Signed_Integer_Type) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : aliased in out Base_Signed_Integer_Type'Class) is begin Set_Enclosing_Element (Self.Lower_Bound, Self'Unchecked_Access); Set_Enclosing_Element (Self.Upper_Bound, Self'Unchecked_Access); null; end Initialize; overriding function Is_Signed_Integer_Type_Element (Self : Base_Signed_Integer_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Signed_Integer_Type_Element; overriding function Is_Type_Definition_Element (Self : Base_Signed_Integer_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Type_Definition_Element; overriding function Is_Definition_Element (Self : Base_Signed_Integer_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Definition_Element; overriding procedure Visit (Self : not null access Base_Signed_Integer_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Signed_Integer_Type (Self); end Visit; overriding function To_Signed_Integer_Type_Text (Self : aliased in out Signed_Integer_Type) return Program.Elements.Signed_Integer_Types .Signed_Integer_Type_Text_Access is begin return Self'Unchecked_Access; end To_Signed_Integer_Type_Text; overriding function To_Signed_Integer_Type_Text (Self : aliased in out Implicit_Signed_Integer_Type) return Program.Elements.Signed_Integer_Types .Signed_Integer_Type_Text_Access is pragma Unreferenced (Self); begin return null; end To_Signed_Integer_Type_Text; end Program.Nodes.Signed_Integer_Types;
31.483871
79
0.717008
1d3e8bb68e24c6d7e464adc2d72850d0e6265852
6,955
ads
Ada
source/nodes/program-nodes-package_declarations.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-package_declarations.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-package_declarations.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
1
2019-10-16T09:05:27.000Z
2019-10-16T09:05:27.000Z
-- SPDX-FileCopyrightText: 2019 Max Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Defining_Names; with Program.Elements.Aspect_Specifications; with Program.Element_Vectors; with Program.Elements.Expressions; with Program.Elements.Package_Declarations; with Program.Element_Visitors; package Program.Nodes.Package_Declarations is pragma Preelaborate; type Package_Declaration is new Program.Nodes.Node and Program.Elements.Package_Declarations.Package_Declaration and Program.Elements.Package_Declarations.Package_Declaration_Text with private; function Create (Package_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Name : not null Program.Elements.Defining_Names .Defining_Name_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Visible_Declarations : Program.Element_Vectors.Element_Vector_Access; Private_Token : Program.Lexical_Elements.Lexical_Element_Access; Private_Declarations : Program.Element_Vectors.Element_Vector_Access; End_Token : not null Program.Lexical_Elements .Lexical_Element_Access; End_Name : Program.Elements.Expressions.Expression_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Package_Declaration; type Implicit_Package_Declaration is new Program.Nodes.Node and Program.Elements.Package_Declarations.Package_Declaration with private; function Create (Name : not null Program.Elements.Defining_Names .Defining_Name_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Visible_Declarations : Program.Element_Vectors.Element_Vector_Access; Private_Declarations : Program.Element_Vectors.Element_Vector_Access; End_Name : Program.Elements.Expressions.Expression_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Package_Declaration with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Package_Declaration is abstract new Program.Nodes.Node and Program.Elements.Package_Declarations.Package_Declaration with record Name : not null Program.Elements.Defining_Names .Defining_Name_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Visible_Declarations : Program.Element_Vectors.Element_Vector_Access; Private_Declarations : Program.Element_Vectors.Element_Vector_Access; End_Name : Program.Elements.Expressions.Expression_Access; end record; procedure Initialize (Self : in out Base_Package_Declaration'Class); overriding procedure Visit (Self : not null access Base_Package_Declaration; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Name (Self : Base_Package_Declaration) return not null Program.Elements.Defining_Names.Defining_Name_Access; overriding function Aspects (Self : Base_Package_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; overriding function Visible_Declarations (Self : Base_Package_Declaration) return Program.Element_Vectors.Element_Vector_Access; overriding function Private_Declarations (Self : Base_Package_Declaration) return Program.Element_Vectors.Element_Vector_Access; overriding function End_Name (Self : Base_Package_Declaration) return Program.Elements.Expressions.Expression_Access; overriding function Is_Package_Declaration (Self : Base_Package_Declaration) return Boolean; overriding function Is_Declaration (Self : Base_Package_Declaration) return Boolean; type Package_Declaration is new Base_Package_Declaration and Program.Elements.Package_Declarations.Package_Declaration_Text with record Package_Token : not null Program.Lexical_Elements .Lexical_Element_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Private_Token : Program.Lexical_Elements.Lexical_Element_Access; End_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Package_Declaration_Text (Self : in out Package_Declaration) return Program.Elements.Package_Declarations .Package_Declaration_Text_Access; overriding function Package_Token (Self : Package_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function With_Token (Self : Package_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Is_Token (Self : Package_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Private_Token (Self : Package_Declaration) return Program.Lexical_Elements.Lexical_Element_Access; overriding function End_Token (Self : Package_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Semicolon_Token (Self : Package_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Package_Declaration is new Base_Package_Declaration with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Package_Declaration_Text (Self : in out Implicit_Package_Declaration) return Program.Elements.Package_Declarations .Package_Declaration_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Package_Declaration) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Package_Declaration) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Package_Declaration) return Boolean; end Program.Nodes.Package_Declarations;
37.798913
78
0.739037
4107ccf5a06e93b46a692fcc688d54fa712fc6fb
5,150
adb
Ada
src/css-comments.adb
stcarrez/ada-css
f7c337306094993186c507540701d04a4753b724
[ "Apache-2.0" ]
3
2017-01-03T22:18:22.000Z
2017-01-10T07:58:17.000Z
src/css-comments.adb
stcarrez/ada-css
f7c337306094993186c507540701d04a4753b724
[ "Apache-2.0" ]
null
null
null
src/css-comments.adb
stcarrez/ada-css
f7c337306094993186c507540701d04a4753b724
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- css-comments -- CSS comments recording -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Ada.Unchecked_Deallocation; with Ada.Characters.Latin_1; package body CSS.Comments is function Get_Line_Count (Text : in String) return Positive; -- ------------------------------ -- Get the line number where the comment was written. -- ------------------------------ function Get_Line_Number (Comment : in Comment_Type) return Natural is begin return Comment.Object.Line; end Get_Line_Number; -- ------------------------------ -- Get the number of lines that the comment span. -- ------------------------------ function Get_Line_Count (Comment : in Comment_Type) return Natural is begin return Comment.Object.Line_Count; end Get_Line_Count; -- ------------------------------ -- Get the full or stripped comment text. -- ------------------------------ function Get_Text (Comment : in Comment_Type; Strip : in Boolean := False) return String is begin return Comment.Object.Text; end Get_Text; -- ------------------------------ -- Get the given line of the comment text. -- ------------------------------ function Get_Text (Comment : in Comment_Type; Line : in Positive; Strip : in Boolean := False) return String is Start, Finish : Positive; begin if Line > Comment.Object.Line_Count then return ""; else Start := Comment.Object.Lines (Line).Start; Finish := Comment.Object.Lines (Line).Finish; if Strip then while Start <= Finish loop exit when Comment.Object.Text (Start) /= ' ' and Comment.Object.Text (Start) /= ASCII.HT; Start := Start + 1; end loop; while Start <= Finish loop exit when Comment.Object.Text (Finish) /= ' ' and Comment.Object.Text (Finish) /= ASCII.HT; Finish := Finish - 1; end loop; end if; return Comment.Object.Text (Start .. Finish); end if; end Get_Text; function Get_Line_Count (Text : in String) return Positive is Result : Positive := 1; begin for I in Text'Range loop if Text (I) = Ada.Characters.Latin_1.LF then Result := Result + 1; end if; end loop; return Result; end Get_Line_Count; -- ------------------------------ -- Insert in the comment list the comment described by <tt>Text</tt> -- and associated with source line number <tt>Line</tt>. After insertion -- the comment reference is returned to identify the new comment. -- ------------------------------ procedure Insert (List : in out CSSComment_List; Text : in String; Line : in Natural; Index : out Comment_Type) is N : constant Positive := Get_Line_Count (Text); C : constant Comment_Access := new Comment '(Len => Text'Length, Line_Count => N, Text => Text, Line => Line, Next => List.Chain, Lines => (others => (1, 0))); First : Natural := 1; Last : constant Natural := Text'Length; Pos : Positive := 1; begin Index.Object := C.all'Access; List.Chain := C; while First <= Last loop if Text (First) = Ada.Characters.Latin_1.LF then C.Lines (Pos).Finish := First - 1; Pos := Pos + 1; C.Lines (Pos).Start := First + 1; end if; First := First + 1; end loop; C.Lines (Pos).Finish := Last; end Insert; -- ------------------------------ -- Release the memory used by the comment list. -- ------------------------------ overriding procedure Finalize (List : in out CSSComment_List) is procedure Free is new Ada.Unchecked_Deallocation (Comment, Comment_Access); Current : Comment_Access := List.Chain; begin while Current /= null loop declare Next : constant Comment_Access := Current.Next; begin Free (Current); Current := Next; end; end loop; List.Chain := null; end Finalize; end CSS.Comments;
36.267606
89
0.528155
59a598d74c84f0908472d8493d518e72931f963e
15,401
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/g-sechas.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-sechas.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/g-sechas.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . S E C U R E _ H A S H E S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2009-2016, 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 System; use System; with Interfaces; use Interfaces; package body GNAT.Secure_Hashes is Hex_Digit : constant array (Stream_Element range 0 .. 15) of Character := "0123456789abcdef"; type Fill_Buffer_Access is access procedure (M : in out Message_State; S : String; First : Natural; Last : out Natural); -- A procedure to transfer data from S, starting at First, into M's block -- buffer until either the block buffer is full or all data from S has been -- consumed. procedure Fill_Buffer_Copy (M : in out Message_State; S : String; First : Natural; Last : out Natural); -- Transfer procedure which just copies data from S to M procedure Fill_Buffer_Swap (M : in out Message_State; S : String; First : Natural; Last : out Natural); -- Transfer procedure which swaps bytes from S when copying into M. S must -- have even length. Note that the swapping is performed considering pairs -- starting at S'First, even if S'First /= First (that is, if -- First = S'First then the first copied byte is always S (S'First + 1), -- and if First = S'First + 1 then the first copied byte is always -- S (S'First). procedure To_String (SEA : Stream_Element_Array; S : out String); -- Return the hexadecimal representation of SEA ---------------------- -- Fill_Buffer_Copy -- ---------------------- procedure Fill_Buffer_Copy (M : in out Message_State; S : String; First : Natural; Last : out Natural) is Buf_String : String (M.Buffer'Range); for Buf_String'Address use M.Buffer'Address; pragma Import (Ada, Buf_String); Length : constant Natural := Natural'Min (M.Block_Length - M.Last, S'Last - First + 1); begin pragma Assert (Length > 0); Buf_String (M.Last + 1 .. M.Last + Length) := S (First .. First + Length - 1); M.Last := M.Last + Length; Last := First + Length - 1; end Fill_Buffer_Copy; ---------------------- -- Fill_Buffer_Swap -- ---------------------- procedure Fill_Buffer_Swap (M : in out Message_State; S : String; First : Natural; Last : out Natural) is pragma Assert (S'Length mod 2 = 0); Length : constant Natural := Natural'Min (M.Block_Length - M.Last, S'Last - First + 1); begin Last := First; while Last - First < Length loop M.Buffer (M.Last + 1 + Last - First) := (if (Last - S'First) mod 2 = 0 then S (Last + 1) else S (Last - 1)); Last := Last + 1; end loop; M.Last := M.Last + Length; Last := First + Length - 1; end Fill_Buffer_Swap; --------------- -- To_String -- --------------- procedure To_String (SEA : Stream_Element_Array; S : out String) is pragma Assert (S'Length = 2 * SEA'Length); begin for J in SEA'Range loop declare S_J : constant Natural := 1 + Natural (J - SEA'First) * 2; begin S (S_J) := Hex_Digit (SEA (J) / 16); S (S_J + 1) := Hex_Digit (SEA (J) mod 16); end; end loop; end To_String; ------- -- H -- ------- package body H is procedure Update (C : in out Context; S : String; Fill_Buffer : Fill_Buffer_Access); -- Internal common routine for all Update procedures procedure Final (C : Context; Hash_Bits : out Ada.Streams.Stream_Element_Array); -- Perform final hashing operations (data padding) and extract the -- (possibly truncated) state of C into Hash_Bits. ------------ -- Digest -- ------------ function Digest (C : Context) return Message_Digest is Hash_Bits : Stream_Element_Array (1 .. Stream_Element_Offset (Hash_Length)); begin Final (C, Hash_Bits); return MD : Message_Digest do To_String (Hash_Bits, MD); end return; end Digest; function Digest (S : String) return Message_Digest is C : Context; begin Update (C, S); return Digest (C); end Digest; function Digest (A : Stream_Element_Array) return Message_Digest is C : Context; begin Update (C, A); return Digest (C); end Digest; function Digest (C : Context) return Binary_Message_Digest is Hash_Bits : Stream_Element_Array (1 .. Stream_Element_Offset (Hash_Length)); begin Final (C, Hash_Bits); return Hash_Bits; end Digest; function Digest (S : String) return Binary_Message_Digest is C : Context; begin Update (C, S); return Digest (C); end Digest; function Digest (A : Stream_Element_Array) return Binary_Message_Digest is C : Context; begin Update (C, A); return Digest (C); end Digest; ----------- -- Final -- ----------- -- Once a complete message has been processed, it is padded with one 1 -- bit followed by enough 0 bits so that the last block is 2 * Word'Size -- bits short of being completed. The last 2 * Word'Size bits are set to -- the message size in bits (excluding padding). procedure Final (C : Context; Hash_Bits : out Stream_Element_Array) is FC : Context := C; Zeroes : Natural; -- Number of 0 bytes in padding Message_Length : Unsigned_64 := FC.M_State.Length; -- Message length in bytes Size_Length : constant Natural := 2 * Hash_State.Word'Size / 8; -- Length in bytes of the size representation begin Zeroes := (Block_Length - 1 - Size_Length - FC.M_State.Last) mod FC.M_State.Block_Length; declare Pad : String (1 .. 1 + Zeroes + Size_Length) := (1 => Character'Val (128), others => ASCII.NUL); Index : Natural; First_Index : Natural; begin First_Index := (if Hash_Bit_Order = Low_Order_First then Pad'Last - Size_Length + 1 else Pad'Last); Index := First_Index; while Message_Length > 0 loop if Index = First_Index then -- Message_Length is in bytes, but we need to store it as -- a bit count. Pad (Index) := Character'Val (Shift_Left (Message_Length and 16#1f#, 3)); Message_Length := Shift_Right (Message_Length, 5); else Pad (Index) := Character'Val (Message_Length and 16#ff#); Message_Length := Shift_Right (Message_Length, 8); end if; Index := Index + (if Hash_Bit_Order = Low_Order_First then 1 else -1); end loop; Update (FC, Pad); end; pragma Assert (FC.M_State.Last = 0); Hash_State.To_Hash (FC.H_State, Hash_Bits); -- HMAC case: hash outer pad if C.KL /= 0 then declare Outer_C : Context; Opad : Stream_Element_Array := (1 .. Stream_Element_Offset (Block_Length) => 16#5c#); begin for J in C.Key'Range loop Opad (J) := Opad (J) xor C.Key (J); end loop; Update (Outer_C, Opad); Update (Outer_C, Hash_Bits); Final (Outer_C, Hash_Bits); end; end if; end Final; -------------------------- -- HMAC_Initial_Context -- -------------------------- function HMAC_Initial_Context (Key : String) return Context is begin if Key'Length = 0 then raise Constraint_Error with "null key"; end if; return C : Context (KL => (if Key'Length <= Key_Length'Last then Key'Length else Stream_Element_Offset (Hash_Length))) do -- Set Key (if longer than block length, first hash it) if C.KL = Key'Length then declare SK : String (1 .. Key'Length); for SK'Address use C.Key'Address; pragma Import (Ada, SK); begin SK := Key; end; else C.Key := Digest (Key); end if; -- Hash inner pad declare Ipad : Stream_Element_Array := (1 .. Stream_Element_Offset (Block_Length) => 16#36#); begin for J in C.Key'Range loop Ipad (J) := Ipad (J) xor C.Key (J); end loop; Update (C, Ipad); end; end return; end HMAC_Initial_Context; ---------- -- Read -- ---------- procedure Read (Stream : in out Hash_Stream; Item : out Stream_Element_Array; Last : out Stream_Element_Offset) is pragma Unreferenced (Stream, Item, Last); begin raise Program_Error with "Hash_Stream is write-only"; end Read; ------------ -- Update -- ------------ procedure Update (C : in out Context; S : String; Fill_Buffer : Fill_Buffer_Access) is Last : Natural; begin C.M_State.Length := C.M_State.Length + S'Length; Last := S'First - 1; while Last < S'Last loop Fill_Buffer (C.M_State, S, Last + 1, Last); if C.M_State.Last = Block_Length then Transform (C.H_State, C.M_State); C.M_State.Last := 0; end if; end loop; end Update; ------------ -- Update -- ------------ procedure Update (C : in out Context; Input : String) is begin Update (C, Input, Fill_Buffer_Copy'Access); end Update; ------------ -- Update -- ------------ procedure Update (C : in out Context; Input : Stream_Element_Array) is S : String (1 .. Input'Length); for S'Address use Input'Address; pragma Import (Ada, S); begin Update (C, S, Fill_Buffer_Copy'Access); end Update; ----------------- -- Wide_Update -- ----------------- procedure Wide_Update (C : in out Context; Input : Wide_String) is S : String (1 .. 2 * Input'Length); for S'Address use Input'Address; pragma Import (Ada, S); begin Update (C, S, (if System.Default_Bit_Order /= Low_Order_First then Fill_Buffer_Swap'Access else Fill_Buffer_Copy'Access)); end Wide_Update; ----------------- -- Wide_Digest -- ----------------- function Wide_Digest (W : Wide_String) return Message_Digest is C : Context; begin Wide_Update (C, W); return Digest (C); end Wide_Digest; function Wide_Digest (W : Wide_String) return Binary_Message_Digest is C : Context; begin Wide_Update (C, W); return Digest (C); end Wide_Digest; ----------- -- Write -- ----------- procedure Write (Stream : in out Hash_Stream; Item : Stream_Element_Array) is begin Update (Stream.C.all, Item); end Write; end H; ------------------------- -- Hash_Function_State -- ------------------------- package body Hash_Function_State is ------------- -- To_Hash -- ------------- procedure To_Hash (H : State; H_Bits : out Stream_Element_Array) is Hash_Words : constant Natural := H'Size / Word'Size; Result : State (1 .. Hash_Words) := H (H'Last - Hash_Words + 1 .. H'Last); R_SEA : Stream_Element_Array (1 .. Result'Size / 8); for R_SEA'Address use Result'Address; pragma Import (Ada, R_SEA); begin if System.Default_Bit_Order /= Hash_Bit_Order then for J in Result'Range loop Swap (Result (J)'Address); end loop; end if; -- Return truncated hash pragma Assert (H_Bits'Length <= R_SEA'Length); H_Bits := R_SEA (R_SEA'First .. R_SEA'First + H_Bits'Length - 1); end To_Hash; end Hash_Function_State; end GNAT.Secure_Hashes;
31.62423
79
0.484774
2f9da3956d12a7046138961ca5e45f7fa8696fce
2,558
ads
Ada
orka/src/orka/interface/orka-rendering-buffers-pointers.ads
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
52
2016-07-30T23:00:28.000Z
2022-02-05T11:54:55.000Z
orka/src/orka/interface/orka-rendering-buffers-pointers.ads
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
79
2016-08-01T18:36:48.000Z
2022-02-27T12:14:20.000Z
orka/src/orka/interface/orka-rendering-buffers-pointers.ads
onox/orka
9edf99559a16ffa96dfdb208322f4d18efbcbac6
[ "Apache-2.0" ]
4
2018-04-28T22:36:26.000Z
2020-11-14T23:00:29.000Z
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 onox <[email protected]> -- -- 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 GL.Types.Pointers; with Orka.Types.Pointers; private package Orka.Rendering.Buffers.Pointers is pragma Preelaborate; use GL.Types.Pointers; package Half is new GL.Objects.Buffers.Buffer_Pointers (Half_Pointers); package Single is new GL.Objects.Buffers.Buffer_Pointers (Single_Pointers); package Double is new GL.Objects.Buffers.Buffer_Pointers (Double_Pointers); package Byte is new GL.Objects.Buffers.Buffer_Pointers (Byte_Pointers); package Short is new GL.Objects.Buffers.Buffer_Pointers (Short_Pointers); package Int is new GL.Objects.Buffers.Buffer_Pointers (Int_Pointers); package UByte is new GL.Objects.Buffers.Buffer_Pointers (UByte_Pointers); package UShort is new GL.Objects.Buffers.Buffer_Pointers (UShort_Pointers); package UInt is new GL.Objects.Buffers.Buffer_Pointers (UInt_Pointers); ----------------------------------------------------------------------------- use Orka.Types.Pointers; package Single_Vector4 is new GL.Objects.Buffers.Buffer_Pointers (Single_Vector4_Pointers); package Double_Vector4 is new GL.Objects.Buffers.Buffer_Pointers (Double_Vector4_Pointers); package Single_Matrix4 is new GL.Objects.Buffers.Buffer_Pointers (Single_Matrix4_Pointers); package Double_Matrix4 is new GL.Objects.Buffers.Buffer_Pointers (Double_Matrix4_Pointers); ----------------------------------------------------------------------------- package Arrays_Command is new GL.Objects.Buffers.Buffer_Pointers (Indirect.Arrays_Indirect_Command_Pointers); package Elements_Command is new GL.Objects.Buffers.Buffer_Pointers (Indirect.Elements_Indirect_Command_Pointers); package Dispatch_Command is new GL.Objects.Buffers.Buffer_Pointers (Indirect.Dispatch_Indirect_Command_Pointers); end Orka.Rendering.Buffers.Pointers;
31.580247
80
0.713057
416ce6f8e8324b1778b5de8f1abcc1a94b27bf2e
1,023
ads
Ada
deps/gid/gid-headers.ads
Roldak/OpenGLAda
6807605b7321249d71286fa25231bdfd537d3eac
[ "MIT" ]
null
null
null
deps/gid/gid-headers.ads
Roldak/OpenGLAda
6807605b7321249d71286fa25231bdfd537d3eac
[ "MIT" ]
null
null
null
deps/gid/gid-headers.ads
Roldak/OpenGLAda
6807605b7321249d71286fa25231bdfd537d3eac
[ "MIT" ]
null
null
null
--------------------------------- -- GID - Generic Image Decoder -- --------------------------------- -- -- Private child of GID, with helpers for identifying -- image formats and reading header informations. -- private package GID.Headers is -- -- Crude image signature detection -- procedure Load_signature ( image : in out Image_descriptor; try_tga : Boolean:= False ); -- -- Loading of various format's headers (past signature) -- procedure Load_BMP_header (image: in out Image_descriptor); procedure Load_FITS_header (image: in out Image_descriptor); procedure Load_GIF_header (image: in out Image_descriptor); procedure Load_JPEG_header (image: in out Image_descriptor); procedure Load_PNG_header (image: in out Image_descriptor); procedure Load_PNM_header (image: in out Image_descriptor); procedure Load_TGA_header (image: in out Image_descriptor); procedure Load_TIFF_header (image: in out Image_descriptor); end GID.Headers;
31.96875
63
0.669599
2918e84839361e873f17d7600ed97dc70823e7aa
3,582
adb
Ada
source/amf/mof/cmof/amf-internals-factories-cmof_factories-create_string_from_string.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/mof/cmof/amf-internals-factories-cmof_factories-create_string_from_string.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/mof/cmof/amf-internals-factories-cmof_factories-create_string_from_string.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 © 2010-2012, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ separate (AMF.Internals.Factories.CMOF_Factories) function Create_String_From_String (Image : League.Strings.Universal_String) return League.Holders.Holder is begin return League.Holders.To_Holder (Image); end Create_String_From_String;
70.235294
78
0.419319
59c8f3a4f8e65671047c1856f362f4fb37c5eaeb
2,517
ads
Ada
source/nodes/program-nodes-root_types.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-root_types.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
null
null
null
source/nodes/program-nodes-root_types.ads
optikos/oasis
9f64d46d26d964790d69f9db681c874cfb3bf96d
[ "MIT" ]
2
2019-09-14T23:18:50.000Z
2019-10-02T10:11:40.000Z
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Root_Types; with Program.Element_Visitors; package Program.Nodes.Root_Types is pragma Preelaborate; type Root_Type is new Program.Nodes.Node and Program.Elements.Root_Types.Root_Type and Program.Elements.Root_Types.Root_Type_Text with private; function Create return Root_Type; type Implicit_Root_Type is new Program.Nodes.Node and Program.Elements.Root_Types.Root_Type with private; function Create (Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Root_Type with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Root_Type is abstract new Program.Nodes.Node and Program.Elements.Root_Types.Root_Type with null record; procedure Initialize (Self : aliased in out Base_Root_Type'Class); overriding procedure Visit (Self : not null access Base_Root_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Is_Root_Type_Element (Self : Base_Root_Type) return Boolean; overriding function Is_Type_Definition_Element (Self : Base_Root_Type) return Boolean; overriding function Is_Definition_Element (Self : Base_Root_Type) return Boolean; type Root_Type is new Base_Root_Type and Program.Elements.Root_Types.Root_Type_Text with null record; overriding function To_Root_Type_Text (Self : aliased in out Root_Type) return Program.Elements.Root_Types.Root_Type_Text_Access; type Implicit_Root_Type is new Base_Root_Type with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Root_Type_Text (Self : aliased in out Implicit_Root_Type) return Program.Elements.Root_Types.Root_Type_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Root_Type) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Root_Type) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Root_Type) return Boolean; end Program.Nodes.Root_Types;
28.280899
78
0.723878
2997820355ef8af93901d0b8b4c50bbbd076d688
552
ads
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/uc1.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/specs/uc1.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/uc1.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-do compile } -- { dg-options "-gnatws" } with System; with System.Storage_Elements; with Unchecked_Conversion; package UC1 is function Conv is new Unchecked_Conversion (Source => System.Address, Target => Integer); function Conv is new Unchecked_Conversion (Source => Integer, Target => System.Address); M : constant System.Address := System.Storage_Elements.To_Address(0); N : constant System.Address := Conv (Conv (M) + 1); A : constant System.Address := Conv (Conv (N) + 1); I : Integer; for I use at A; end UC1;
24
75
0.686594
4d208ce217f0b0445c9e152484013f3e4c45951d
13,853
ads
Ada
src/bitmap_fonts/giza-bitmap_fonts-freesansboldoblique8pt7b.ads
Fabien-Chouteau/Giza
9f6c167666dbba8f0e5f0ba3e33825c0b3f399bd
[ "BSD-3-Clause" ]
7
2017-10-18T02:40:24.000Z
2020-12-19T22:41:19.000Z
src/bitmap_fonts/giza-bitmap_fonts-freesansboldoblique8pt7b.ads
Fabien-Chouteau/Giza
9f6c167666dbba8f0e5f0ba3e33825c0b3f399bd
[ "BSD-3-Clause" ]
null
null
null
src/bitmap_fonts/giza-bitmap_fonts-freesansboldoblique8pt7b.ads
Fabien-Chouteau/Giza
9f6c167666dbba8f0e5f0ba3e33825c0b3f399bd
[ "BSD-3-Clause" ]
2
2019-05-06T08:30:26.000Z
2020-11-22T11:27:27.000Z
package Giza.Bitmap_Fonts.FreeSansBoldOblique8pt7b is Font : constant Giza.Font.Ref_Const; private FreeSansBoldOblique8pt7bBitmaps : aliased constant Font_Bitmap := ( 16#39#, 16#CC#, 16#63#, 16#10#, 16#8C#, 16#00#, 16#39#, 16#80#, 16#CF#, 16#38#, 16#A2#, 16#0D#, 16#86#, 16#47#, 16#F9#, 16#FE#, 16#32#, 16#09#, 16#8F#, 16#F3#, 16#FC#, 16#4C#, 16#36#, 16#00#, 16#04#, 16#0F#, 16#8D#, 16#6C#, 16#B6#, 16#C3#, 16#C0#, 16#F8#, 16#1E#, 16#0B#, 16#69#, 16#BD#, 16#8F#, 16#81#, 16#00#, 16#80#, 16#30#, 16#27#, 16#84#, 16#C8#, 16#C8#, 16#98#, 16#99#, 16#0F#, 16#20#, 16#64#, 16#00#, 16#CE#, 16#0B#, 16#F1#, 16#21#, 16#23#, 16#F4#, 16#1C#, 16#07#, 16#01#, 16#F0#, 16#66#, 16#0C#, 16#C1#, 16#F0#, 16#38#, 16#1F#, 16#9F#, 16#3E#, 16#C3#, 16#98#, 16#F3#, 16#FF#, 16#3E#, 16#E0#, 16#FA#, 16#0C#, 16#61#, 16#0C#, 16#61#, 16#8C#, 16#30#, 16#C3#, 16#0C#, 16#30#, 16#C1#, 16#86#, 16#00#, 16#18#, 16#60#, 16#C3#, 16#0C#, 16#30#, 16#C3#, 16#0C#, 16#61#, 16#8C#, 16#21#, 16#8C#, 16#00#, 16#11#, 16#77#, 16#9C#, 16#50#, 16#0C#, 16#06#, 16#1F#, 16#EF#, 16#E1#, 16#80#, 16#C0#, 16#60#, 16#6D#, 16#28#, 16#FF#, 16#C0#, 16#F0#, 16#02#, 16#08#, 16#10#, 16#40#, 16#82#, 16#04#, 16#10#, 16#20#, 16#81#, 16#04#, 16#00#, 16#0F#, 16#1F#, 16#CC#, 16#6C#, 16#36#, 16#1F#, 16#0F#, 16#0F#, 16#86#, 16#C3#, 16#63#, 16#3F#, 16#8F#, 16#00#, 16#1F#, 16#FE#, 16#73#, 16#18#, 16#C6#, 16#73#, 16#18#, 16#0F#, 16#87#, 16#F3#, 16#8C#, 16#C3#, 16#00#, 16#C0#, 16#60#, 16#30#, 16#38#, 16#38#, 16#1C#, 16#07#, 16#FB#, 16#FC#, 16#1F#, 16#1F#, 16#D8#, 16#60#, 16#30#, 16#30#, 16#70#, 16#7C#, 16#06#, 16#03#, 16#63#, 16#BF#, 16#8F#, 16#80#, 16#03#, 16#03#, 16#82#, 16#C2#, 16#62#, 16#73#, 16#33#, 16#FD#, 16#FE#, 16#0E#, 16#06#, 16#03#, 16#00#, 16#1F#, 16#9F#, 16#CC#, 16#05#, 16#C7#, 16#F3#, 16#18#, 16#0C#, 16#06#, 16#C6#, 16#7F#, 16#1E#, 16#00#, 16#0F#, 16#0F#, 16#CC#, 16#6C#, 16#06#, 16#E3#, 16#FB#, 16#8D#, 16#86#, 16#C3#, 16#63#, 16#3F#, 16#8F#, 16#00#, 16#7F#, 16#BF#, 16#C0#, 16#C0#, 16#C0#, 16#C0#, 16#C0#, 16#C0#, 16#60#, 16#60#, 16#30#, 16#38#, 16#00#, 16#1F#, 16#1F#, 16#D8#, 16#6C#, 16#33#, 16#F3#, 16#F9#, 16#8D#, 16#86#, 16#C3#, 16#63#, 16#3F#, 16#8F#, 16#00#, 16#0F#, 16#1F#, 16#CC#, 16#6C#, 16#36#, 16#1B#, 16#1D#, 16#FE#, 16#76#, 16#03#, 16#63#, 16#3F#, 16#0F#, 16#00#, 16#6C#, 16#00#, 16#36#, 16#33#, 16#00#, 16#00#, 16#66#, 16#44#, 16#80#, 16#00#, 16#83#, 16#C7#, 16#CF#, 16#0F#, 16#03#, 16#F0#, 16#3C#, 16#06#, 16#7F#, 16#BF#, 16#C0#, 16#00#, 16#0F#, 16#F7#, 16#F8#, 16#60#, 16#3C#, 16#0F#, 16#C0#, 16#F0#, 16#F3#, 16#E3#, 16#C1#, 16#00#, 16#3C#, 16#FD#, 16#9E#, 16#30#, 16#61#, 16#86#, 16#18#, 16#30#, 16#00#, 16#C3#, 16#80#, 16#01#, 16#F0#, 16#0F#, 16#F8#, 16#38#, 16#30#, 16#C0#, 16#33#, 16#00#, 16#2C#, 16#3E#, 16#58#, 16#CC#, 16#E3#, 16#11#, 16#CC#, 16#67#, 16#99#, 16#9B#, 16#3F#, 16#E7#, 16#3B#, 16#86#, 16#00#, 16#07#, 16#08#, 16#03#, 16#F0#, 16#00#, 16#03#, 16#81#, 16#E0#, 16#78#, 16#3E#, 16#0D#, 16#87#, 16#61#, 16#98#, 16#E6#, 16#7F#, 16#9F#, 16#FE#, 16#0F#, 16#03#, 16#1F#, 16#C7#, 16#FC#, 16#E1#, 16#98#, 16#33#, 16#0C#, 16#7F#, 16#9F#, 16#F3#, 16#86#, 16#60#, 16#CC#, 16#39#, 16#FE#, 16#7F#, 16#80#, 16#0F#, 16#07#, 16#E3#, 16#1D#, 16#83#, 16#60#, 16#30#, 16#0C#, 16#03#, 16#00#, 16#C1#, 16#B8#, 16#E7#, 16#F0#, 16#F0#, 16#1F#, 16#87#, 16#F8#, 16#E3#, 16#98#, 16#33#, 16#06#, 16#60#, 16#DC#, 16#1B#, 16#86#, 16#60#, 16#CC#, 16#31#, 16#FE#, 16#7F#, 16#00#, 16#1F#, 16#E7#, 16#FC#, 16#E0#, 16#18#, 16#03#, 16#00#, 16#7F#, 16#9F#, 16#E3#, 16#80#, 16#60#, 16#0C#, 16#01#, 16#FE#, 16#7F#, 16#C0#, 16#1F#, 16#E7#, 16#FC#, 16#E0#, 16#18#, 16#03#, 16#00#, 16#7F#, 16#1F#, 16#E3#, 16#80#, 16#60#, 16#0C#, 16#03#, 16#80#, 16#70#, 16#00#, 16#0F#, 16#83#, 16#F8#, 16#C3#, 16#B0#, 16#06#, 16#01#, 16#87#, 16#B0#, 16#F6#, 16#06#, 16#C1#, 16#DC#, 16#31#, 16#FE#, 16#1F#, 16#40#, 16#38#, 16#73#, 16#87#, 16#30#, 16#63#, 16#06#, 16#30#, 16#67#, 16#FE#, 16#7F#, 16#E6#, 16#0C#, 16#60#, 16#C6#, 16#0C#, 16#E1#, 16#CE#, 16#1C#, 16#39#, 16#CC#, 16#63#, 16#39#, 16#CC#, 16#63#, 16#39#, 16#80#, 16#01#, 16#80#, 16#C0#, 16#E0#, 16#70#, 16#30#, 16#18#, 16#1D#, 16#8E#, 16#C6#, 16#63#, 16#3F#, 16#8F#, 16#00#, 16#18#, 16#73#, 16#8E#, 16#39#, 16#C3#, 16#38#, 16#37#, 16#03#, 16#E0#, 16#7E#, 16#07#, 16#70#, 16#63#, 16#86#, 16#38#, 16#E1#, 16#CE#, 16#1C#, 16#18#, 16#1C#, 16#0E#, 16#06#, 16#03#, 16#01#, 16#81#, 16#C0#, 16#E0#, 16#60#, 16#30#, 16#1F#, 16#FF#, 16#E0#, 16#1C#, 16#1C#, 16#70#, 16#F1#, 16#C3#, 16#8F#, 16#1E#, 16#34#, 16#58#, 16#DB#, 16#E7#, 16#6B#, 16#9D#, 16#AC#, 16#67#, 16#B1#, 16#9C#, 16#CE#, 16#77#, 16#31#, 16#98#, 16#18#, 16#33#, 16#C7#, 16#3C#, 16#73#, 16#C6#, 16#3E#, 16#67#, 16#66#, 16#76#, 16#E6#, 16#3C#, 16#63#, 16#C6#, 16#3C#, 16#E1#, 16#CC#, 16#1C#, 16#0F#, 16#83#, 16#F8#, 16#C3#, 16#B0#, 16#36#, 16#07#, 16#80#, 16#F0#, 16#1E#, 16#06#, 16#C0#, 16#DC#, 16#31#, 16#FC#, 16#1F#, 16#00#, 16#1F#, 16#C7#, 16#FC#, 16#E1#, 16#98#, 16#33#, 16#06#, 16#61#, 16#9F#, 16#F3#, 16#F8#, 16#60#, 16#0C#, 16#01#, 16#80#, 16#70#, 16#00#, 16#0F#, 16#83#, 16#F8#, 16#C3#, 16#B0#, 16#36#, 16#07#, 16#80#, 16#F0#, 16#1E#, 16#16#, 16#C7#, 16#DC#, 16#71#, 16#FE#, 16#1F#, 16#60#, 16#00#, 16#1F#, 16#C7#, 16#FC#, 16#E1#, 16#98#, 16#33#, 16#0C#, 16#7F#, 16#9F#, 16#F3#, 16#86#, 16#60#, 16#CC#, 16#31#, 16#86#, 16#70#, 16#E0#, 16#0F#, 16#87#, 16#FD#, 16#C1#, 16#B0#, 16#36#, 16#00#, 16#FE#, 16#07#, 16#F0#, 16#0E#, 16#C0#, 16#D8#, 16#33#, 16#FE#, 16#1F#, 16#00#, 16#7F#, 16#FF#, 16#F0#, 16#C0#, 16#30#, 16#1C#, 16#06#, 16#01#, 16#80#, 16#60#, 16#38#, 16#0E#, 16#03#, 16#00#, 16#C0#, 16#70#, 16#EC#, 16#1D#, 16#83#, 16#30#, 16#66#, 16#0C#, 16#C3#, 16#B0#, 16#76#, 16#0C#, 16#C1#, 16#98#, 16#73#, 16#FC#, 16#1E#, 16#00#, 16#C1#, 16#F0#, 16#6C#, 16#33#, 16#8C#, 16#E6#, 16#19#, 16#86#, 16#C1#, 16#B0#, 16#78#, 16#1E#, 16#07#, 16#01#, 16#C0#, 16#C3#, 16#8F#, 16#8F#, 16#1B#, 16#1E#, 16#36#, 16#3C#, 16#CC#, 16#D9#, 16#99#, 16#B7#, 16#36#, 16#6C#, 16#6C#, 16#D8#, 16#F1#, 16#E0#, 16#E3#, 16#C1#, 16#87#, 16#03#, 16#0E#, 16#00#, 16#1C#, 16#30#, 16#63#, 16#83#, 16#B8#, 16#1F#, 16#80#, 16#78#, 16#03#, 16#80#, 16#1C#, 16#01#, 16#F0#, 16#1F#, 16#81#, 16#CC#, 16#0C#, 16#70#, 16#E3#, 16#80#, 16#E1#, 16#F8#, 16#E6#, 16#31#, 16#98#, 16#7E#, 16#0F#, 16#03#, 16#80#, 16#E0#, 16#30#, 16#0C#, 16#03#, 16#01#, 16#C0#, 16#1F#, 16#F1#, 16#FE#, 16#00#, 16#E0#, 16#1C#, 16#03#, 16#80#, 16#70#, 16#0E#, 16#01#, 16#C0#, 16#38#, 16#07#, 16#00#, 16#7F#, 16#C7#, 16#F8#, 16#0E#, 16#3C#, 16#60#, 16#C1#, 16#86#, 16#0C#, 16#18#, 16#30#, 16#61#, 16#83#, 16#06#, 16#0F#, 16#3C#, 16#00#, 16#2A#, 16#AF#, 16#54#, 16#1E#, 16#78#, 16#30#, 16#60#, 16#C3#, 16#06#, 16#0C#, 16#18#, 16#30#, 16#C1#, 16#83#, 16#1E#, 16#38#, 16#00#, 16#0C#, 16#38#, 16#D1#, 16#B6#, 16#68#, 16#F1#, 16#80#, 16#FF#, 16#C0#, 16#D0#, 16#1E#, 16#3F#, 16#63#, 16#03#, 16#3F#, 16#E7#, 16#C6#, 16#FE#, 16#76#, 16#38#, 16#18#, 16#0C#, 16#06#, 16#E7#, 16#FB#, 16#8D#, 16#86#, 16#C3#, 16#61#, 16#F1#, 16#BF#, 16#9B#, 16#80#, 16#1E#, 16#3F#, 16#63#, 16#C0#, 16#C0#, 16#C0#, 16#C6#, 16#FE#, 16#78#, 16#00#, 16#C0#, 16#30#, 16#1C#, 16#7E#, 16#3F#, 16#98#, 16#EC#, 16#3B#, 16#0E#, 16#C7#, 16#31#, 16#CF#, 16#F1#, 16#EC#, 16#1E#, 16#7F#, 16#63#, 16#FF#, 16#FF#, 16#C0#, 16#C6#, 16#FC#, 16#78#, 16#1C#, 16#73#, 16#9F#, 16#7C#, 16#C3#, 16#1C#, 16#61#, 16#86#, 16#18#, 16#0E#, 16#C7#, 16#F3#, 16#1D#, 16#87#, 16#61#, 16#D8#, 16#66#, 16#39#, 16#FE#, 16#3D#, 16#80#, 16#CC#, 16#33#, 16#F8#, 16#7C#, 16#00#, 16#38#, 16#18#, 16#0C#, 16#06#, 16#E3#, 16#FB#, 16#8D#, 16#C6#, 16#C3#, 16#61#, 16#B1#, 16#F8#, 16#D8#, 16#60#, 16#33#, 16#06#, 16#66#, 16#66#, 16#6E#, 16#CC#, 16#0E#, 16#1C#, 16#00#, 16#60#, 16#C3#, 16#86#, 16#0C#, 16#18#, 16#30#, 16#E1#, 16#83#, 16#06#, 16#1C#, 16#70#, 16#38#, 16#18#, 16#0C#, 16#06#, 16#77#, 16#73#, 16#F1#, 16#F0#, 16#F8#, 16#6C#, 16#77#, 16#31#, 16#98#, 16#E0#, 16#33#, 16#76#, 16#66#, 16#66#, 16#6E#, 16#CC#, 16#37#, 16#73#, 16#FF#, 16#DC#, 16#E6#, 16#C6#, 16#36#, 16#31#, 16#B1#, 16#8F#, 16#9C#, 16#78#, 16#E7#, 16#C6#, 16#30#, 16#37#, 16#1F#, 16#DC#, 16#6C#, 16#36#, 16#1B#, 16#0D#, 16#8F#, 16#C6#, 16#C3#, 16#00#, 16#1F#, 16#1F#, 16#D8#, 16#7C#, 16#3C#, 16#1E#, 16#1F#, 16#0D#, 16#FC#, 16#7C#, 16#00#, 16#1B#, 16#8F#, 16#F3#, 16#8C#, 16#C3#, 16#30#, 16#CC#, 16#37#, 16#19#, 16#FE#, 16#6E#, 16#18#, 16#06#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#1D#, 16#8F#, 16#E6#, 16#3B#, 16#0E#, 16#C3#, 16#B0#, 16#CC#, 16#73#, 16#FC#, 16#7B#, 16#01#, 16#C0#, 16#60#, 16#18#, 16#06#, 16#00#, 16#36#, 16#79#, 16#C3#, 16#06#, 16#0C#, 16#18#, 16#70#, 16#C0#, 16#3C#, 16#FF#, 16#1F#, 16#0F#, 16#C7#, 16#F1#, 16#FE#, 16#78#, 16#37#, 16#FE#, 16#C6#, 16#73#, 16#18#, 16#E7#, 16#00#, 16#71#, 16#98#, 16#66#, 16#19#, 16#86#, 16#E3#, 16#B8#, 16#CC#, 16#73#, 16#FC#, 16#7B#, 16#00#, 16#C3#, 16#E7#, 16#E6#, 16#6E#, 16#6C#, 16#78#, 16#78#, 16#70#, 16#70#, 16#C7#, 16#3E#, 16#79#, 16#B3#, 16#CD#, 16#B6#, 16#CD#, 16#B6#, 16#79#, 16#E3#, 16#CF#, 16#1C#, 16#70#, 16#E3#, 16#80#, 16#39#, 16#C6#, 16#61#, 16#F0#, 16#38#, 16#0E#, 16#07#, 16#83#, 16#E1#, 16#DC#, 16#63#, 16#00#, 16#61#, 16#B9#, 16#DC#, 16#CE#, 16#63#, 16#61#, 16#B0#, 16#F0#, 16#78#, 16#38#, 16#18#, 16#0C#, 16#1C#, 16#0C#, 16#00#, 16#3F#, 16#9F#, 16#C0#, 16#C1#, 16#C1#, 16#C1#, 16#C1#, 16#C0#, 16#FE#, 16#FF#, 16#00#, 16#1C#, 16#73#, 16#0C#, 16#30#, 16#CE#, 16#38#, 16#61#, 16#86#, 16#30#, 16#C3#, 16#8E#, 16#00#, 16#13#, 16#22#, 16#22#, 16#64#, 16#44#, 16#CC#, 16#88#, 16#00#, 16#1C#, 16#70#, 16#C3#, 16#18#, 16#61#, 16#87#, 16#1C#, 16#C3#, 16#0C#, 16#33#, 16#8E#, 16#00#, 16#F1#, 16#64#, 16#70#); FreeSansBoldOblique8pt7bGlyphs : aliased constant Glyph_Array := ( (0, 0, 0, 4, 0, 1), -- 0x20 ' ' (0, 5, 12, 5, 2, -11), -- 0x21 '!' (8, 6, 4, 8, 3, -11), -- 0x22 '"' (11, 10, 10, 9, 1, -10), -- 0x23 '#' (24, 9, 14, 9, 1, -11), -- 0x24 '$' (40, 12, 12, 14, 2, -11), -- 0x25 '%' (58, 11, 12, 12, 1, -11), -- 0x26 '&' (75, 2, 4, 4, 3, -11), -- 0x27 ''' (76, 6, 15, 5, 1, -11), -- 0x28 '(' (88, 6, 15, 5, 0, -10), -- 0x29 ')' (100, 6, 5, 6, 2, -11), -- 0x2A '*' (104, 9, 7, 9, 1, -6), -- 0x2B '+' (112, 3, 5, 4, 0, -1), -- 0x2C ',' (114, 5, 2, 5, 1, -4), -- 0x2D '-' (116, 2, 2, 4, 1, -1), -- 0x2E '.' (117, 7, 12, 4, 0, -11), -- 0x2F '/' (128, 9, 12, 9, 1, -11), -- 0x30 '0' (142, 5, 11, 9, 3, -10), -- 0x31 '1' (149, 10, 12, 9, 0, -11), -- 0x32 '2' (164, 9, 12, 9, 1, -11), -- 0x33 '3' (178, 9, 11, 9, 1, -10), -- 0x34 '4' (191, 9, 11, 9, 1, -10), -- 0x35 '5' (204, 9, 12, 9, 1, -11), -- 0x36 '6' (218, 9, 11, 9, 2, -10), -- 0x37 '7' (231, 9, 12, 9, 1, -11), -- 0x38 '8' (245, 9, 12, 9, 1, -11), -- 0x39 '9' (259, 3, 8, 5, 2, -7), -- 0x3A ':' (262, 4, 11, 5, 1, -7), -- 0x3B ';' (268, 9, 8, 9, 1, -7), -- 0x3C '<' (277, 9, 6, 9, 1, -6), -- 0x3D '=' (284, 9, 8, 9, 1, -6), -- 0x3E '>' (293, 7, 12, 10, 3, -11), -- 0x3F '?' (304, 15, 15, 16, 1, -12), -- 0x40 '@' (333, 10, 12, 12, 1, -11), -- 0x41 'A' (348, 11, 12, 12, 1, -11), -- 0x42 'B' (365, 10, 12, 12, 2, -11), -- 0x43 'C' (380, 11, 12, 12, 1, -11), -- 0x44 'D' (397, 11, 12, 11, 1, -11), -- 0x45 'E' (414, 11, 12, 10, 1, -11), -- 0x46 'F' (431, 11, 12, 12, 2, -11), -- 0x47 'G' (448, 12, 12, 12, 1, -11), -- 0x48 'H' (466, 5, 12, 4, 1, -11), -- 0x49 'I' (474, 9, 12, 9, 1, -11), -- 0x4A 'J' (488, 12, 12, 12, 1, -11), -- 0x4B 'K' (506, 9, 12, 10, 1, -11), -- 0x4C 'L' (520, 14, 12, 13, 1, -11), -- 0x4D 'M' (541, 12, 12, 12, 1, -11), -- 0x4E 'N' (559, 11, 12, 12, 2, -11), -- 0x4F 'O' (576, 11, 12, 11, 1, -11), -- 0x50 'P' (593, 11, 13, 12, 2, -11), -- 0x51 'Q' (611, 11, 12, 12, 1, -11), -- 0x52 'R' (628, 11, 12, 11, 1, -11), -- 0x53 'S' (645, 10, 12, 10, 2, -11), -- 0x54 'T' (660, 11, 12, 12, 2, -11), -- 0x55 'U' (677, 10, 12, 11, 3, -11), -- 0x56 'V' (692, 15, 12, 15, 3, -11), -- 0x57 'W' (715, 13, 12, 11, 0, -11), -- 0x58 'X' (735, 10, 12, 11, 3, -11), -- 0x59 'Y' (750, 12, 12, 10, 0, -11), -- 0x5A 'Z' (768, 7, 15, 5, 0, -11), -- 0x5B '[' (782, 2, 11, 4, 2, -10), -- 0x5C '\' (785, 7, 15, 5, 0, -10), -- 0x5D ']' (799, 7, 7, 9, 2, -10), -- 0x5E '^' (806, 10, 1, 9, -1, 3), -- 0x5F '_' (808, 2, 2, 5, 3, -11), -- 0x60 '`' (809, 8, 9, 9, 1, -8), -- 0x61 'a' (818, 9, 12, 10, 1, -11), -- 0x62 'b' (832, 8, 9, 9, 1, -8), -- 0x63 'c' (841, 10, 12, 10, 1, -11), -- 0x64 'd' (856, 8, 9, 9, 1, -8), -- 0x65 'e' (865, 6, 12, 5, 1, -11), -- 0x66 'f' (874, 10, 13, 10, 0, -8), -- 0x67 'g' (891, 9, 12, 10, 1, -11), -- 0x68 'h' (905, 4, 12, 4, 1, -11), -- 0x69 'i' (911, 7, 16, 4, -1, -11), -- 0x6A 'j' (925, 9, 12, 9, 1, -11), -- 0x6B 'k' (939, 4, 12, 4, 1, -11), -- 0x6C 'l' (945, 13, 9, 14, 1, -8), -- 0x6D 'm' (960, 9, 9, 10, 1, -8), -- 0x6E 'n' (971, 9, 9, 10, 1, -8), -- 0x6F 'o' (982, 10, 13, 10, 0, -8), -- 0x70 'p' (999, 10, 13, 10, 1, -8), -- 0x71 'q' (1016, 7, 9, 6, 1, -8), -- 0x72 'r' (1024, 7, 9, 9, 2, -8), -- 0x73 's' (1032, 5, 10, 5, 2, -9), -- 0x74 't' (1039, 10, 9, 10, 1, -8), -- 0x75 'u' (1051, 8, 9, 9, 2, -8), -- 0x76 'v' (1060, 13, 9, 12, 2, -8), -- 0x77 'w' (1075, 10, 9, 9, 0, -8), -- 0x78 'x' (1087, 9, 13, 9, 1, -8), -- 0x79 'y' (1102, 9, 9, 8, 0, -8), -- 0x7A 'z' (1113, 6, 15, 6, 1, -11), -- 0x7B '{' (1125, 4, 15, 4, 1, -11), -- 0x7C '|' (1133, 6, 15, 6, 1, -10), -- 0x7D '}' (1145, 7, 3, 9, 2, -4)); -- 0x7E '~' Font_D : aliased constant Bitmap_Font := (FreeSansBoldOblique8pt7bBitmaps'Access, FreeSansBoldOblique8pt7bGlyphs'Access, 19); Font : constant Giza.Font.Ref_Const := Font_D'Access; end Giza.Bitmap_Fonts.FreeSansBoldOblique8pt7b;
57.962343
73
0.461344
413ae476536b084574edfbdf32ac24d966f33258
1,341
ads
Ada
ada-numerics-discrete_random.ads
mgrojo/adalib
dc1355a5b65c2843e702ac76252addb2caf3c56b
[ "BSD-3-Clause" ]
15
2018-07-08T07:09:19.000Z
2021-11-21T09:58:55.000Z
ada-numerics-discrete_random.ads
mgrojo/adalib
dc1355a5b65c2843e702ac76252addb2caf3c56b
[ "BSD-3-Clause" ]
4
2019-11-17T20:04:33.000Z
2021-08-29T21:24:55.000Z
ada-numerics-discrete_random.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 <[email protected]> -- 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 --------------------------------------------------------------------------- generic type Result_Subtype is (<>); package Ada.Numerics.Discrete_Random is -- Basic facilities type Generator is limited private; function Random (Gen : Generator) return Result_Subtype; procedure Reset (Gen : in Generator; Initiator : in Integer); procedure Reset (Gen : in Generator); -- Advanced facilities type State is private; procedure Save (Gen : in Generator; To_State : out State); procedure Reset (Gen : in Generator; From_State : in State); Max_Image_Width : constant := implementation_defined; function Image (Of_State : State) return String; function Value (Coded_State : String) return State; private pragma Import (Ada, State); pragma Import (Ada, Generator); end Ada.Numerics.Discrete_Random;
28.531915
75
0.620433
0bfa68b91cb7e44490be7e5464db28e670f786b0
3,887
adb
Ada
HdGfxLib/libhwbase/common/direct/hw-pci-dev.adb
jam3st/edk2
d477ef9975cc6cdf1fca4d221c3064c2f2d804e8
[ "BSD-2-Clause" ]
1
2019-02-05T09:50:07.000Z
2019-02-05T09:50:07.000Z
HdGfxLib/libhwbase/common/direct/hw-pci-dev.adb
jam3st/edk2
d477ef9975cc6cdf1fca4d221c3064c2f2d804e8
[ "BSD-2-Clause" ]
null
null
null
HdGfxLib/libhwbase/common/direct/hw-pci-dev.adb
jam3st/edk2
d477ef9975cc6cdf1fca4d221c3064c2f2d804e8
[ "BSD-2-Clause" ]
null
null
null
-- -- Copyright (C) 2017 Nico Huber <[email protected]> -- -- 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 2 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. -- with HW.Config; with HW.PCI.MMConf; with HW.Debug; with HW.MMIO_Range; pragma Elaborate_All (HW.MMIO_Range); package body HW.PCI.Dev with Refined_State => (Address_State => MM.Address_State, PCI_State => MM.PCI_State) is package MM is new HW.PCI.MMConf (Dev); procedure Read8 (Value : out Word8; Offset : Index) renames MM.Read8; procedure Read16 (Value : out Word16; Offset : Index) renames MM.Read16; procedure Read32 (Value : out Word32; Offset : Index) renames MM.Read32; procedure Write8 (Offset : Index; Value : Word8) renames MM.Write8; procedure Write16 (Offset : Index; Value : Word16) renames MM.Write16; procedure Write32 (Offset : Index; Value : Word32) renames MM.Write32; procedure Map (Addr : out Word64; Res : in Resource; Length : in Natural := 0; Offset : in Natural := 0; WC : in Boolean := False) is use type HW.Word8; use type HW.Word32; Header_Type : Word8; Reg32 : Word32; begin Addr := 0; Read8 (Header_Type, PCI.Header_Type); if (Header_Type and Header_Type_Mask) = Header_Type_Normal then Read32 (Reg32, Base_Address (Res)); if (Reg32 and Base_Address_Space_Mask) = Base_Address_Space_Mem then case Reg32 and Base_Address_Mem_Type_Mask is when Base_Address_Mem_Type_64 => if Res < Res5 then Addr := Word64 (Reg32 and Base_Address_Mem_Mask); Read32 (Reg32, Base_Address (Resource'Succ (Res))); Addr := Addr or Shift_Left (Word64 (Reg32), 32); end if; when others => Addr := Word64 (Reg32 and Base_Address_Mem_Mask); end case; end if; end if; if Addr /= 0 then if Length = 0 or else Addr <= Word64'Last - Word64 (Length) - Word64 (Offset) + 1 then Addr := Addr + Word64 (Offset); else Addr := 0; end if; end if; end Map; procedure Resource_Size (Length : out Natural; Res : Resource) is use Type HW.Word16; use Type HW.Word32; Cmd : Word16; Base, Backup : Word32; begin Length := 0; Read16 (Cmd, PCI.Command); Write16 (PCI.Command, Cmd and not PCI.Command_Memory); Read32 (Backup, Base_Address (Res)); if (Backup and Base_Address_Space_Mask) = Base_Address_Space_Mem then Write32 (Base_Address (Res), 16#ffff_ffff#); Read32 (Base, Base_Address (Res)); Base := not (Base and Base_Address_Mem_Mask) + 1; if Base <= Word32 (Natural'Last) then Length := Natural (Base); end if; Write32 (Base_Address (Res), Backup); end if; Write16 (PCI.Command, Cmd); end Resource_Size; procedure Initialize (Success : out Boolean; MMConf_Base : Word64 := 16#b0000000#) is begin Debug.Put ("Initialize MMIO: "); MM.Set_Base_Address(MMConf_Base); Debug.Put_Word64(MMConf_Base); Debug.Put_Line(""); Debug.Put ("Initialize MMIO: "); Debug.Put_Line(""); Success := True ; --MMConf_Base /= 0 or Config.Default_MMConf_Base_Set; end Initialize; end HW.PCI.Dev;
32.123967
85
0.614098
299bda988d7e429fa103a5bf49739e7b5f8701ff
4,094
ads
Ada
src/el-contexts.ads
My-Colaborations/ada-el
dba689d093357cda0722a1e650358fa5fcaf8157
[ "Apache-2.0" ]
null
null
null
src/el-contexts.ads
My-Colaborations/ada-el
dba689d093357cda0722a1e650358fa5fcaf8157
[ "Apache-2.0" ]
null
null
null
src/el-contexts.ads
My-Colaborations/ada-el
dba689d093357cda0722a1e650358fa5fcaf8157
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- EL.Contexts -- Contexts for evaluating an expression -- Copyright (C) 2009, 2010, 2011, 2012, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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. ----------------------------------------------------------------------- -- The expression context provides information to resolve runtime -- information when evaluating an expression. The context provides -- a resolver whose role is to find variables given their name. with EL.Objects; with Util.Beans.Basic; with Ada.Strings.Unbounded; with Ada.Exceptions; with EL.Functions; limited with EL.Variables; package EL.Contexts is pragma Preelaborate; use Ada.Strings.Unbounded; type ELContext; -- ------------------------------ -- Expression Resolver -- ------------------------------ -- Enables customization of variable and property resolution -- behavior for EL expression evaluation. type ELResolver is limited interface; type ELResolver_Access is access all ELResolver'Class; -- Get the value associated with a base object and a given property. function Get_Value (Resolver : ELResolver; Context : ELContext'Class; Base : access Util.Beans.Basic.Readonly_Bean'Class; Name : Unbounded_String) return EL.Objects.Object is abstract; -- Set the value associated with a base object and a given property. procedure Set_Value (Resolver : in out ELResolver; Context : in ELContext'Class; Base : access Util.Beans.Basic.Bean'Class; Name : in Unbounded_String; Value : in EL.Objects.Object) is abstract; -- ------------------------------ -- Expression Context -- ------------------------------ -- Context information for expression evaluation. type ELContext is limited interface; type ELContext_Access is access all ELContext'Class; -- Retrieves the ELResolver associated with this ELcontext. function Get_Resolver (Context : ELContext) return ELResolver_Access is abstract; -- Retrieves the VariableMapper associated with this ELContext. function Get_Variable_Mapper (Context : ELContext) return access EL.Variables.Variable_Mapper'Class is abstract; -- Set the variable mapper associated with this ELContext. procedure Set_Variable_Mapper (Context : in out ELContext; Mapper : access EL.Variables.Variable_Mapper'Class) is abstract; -- Retrieves the FunctionMapper associated with this ELContext. -- The FunctionMapper is only used when parsing an expression. function Get_Function_Mapper (Context : ELContext) return EL.Functions.Function_Mapper_Access is abstract; -- Set the function mapper associated with this ELContext. procedure Set_Function_Mapper (Context : in out ELContext; Mapper : access EL.Functions.Function_Mapper'Class) is abstract; -- Handle the exception during expression evaluation. The handler can ignore the -- exception or raise it. procedure Handle_Exception (Context : in ELContext; Ex : in Ada.Exceptions.Exception_Occurrence) is abstract; end EL.Contexts;
44.021505
94
0.624084
4183dcba1fee35f8b36862917f6e81662fb5d61d
5,297
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/a-cusyqu.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/a-cusyqu.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/a-cusyqu.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.UNBOUNDED_SYNCHRONIZED_QUEUES -- -- -- -- B o d y -- -- -- -- Copyright (C) 2011-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/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; package body Ada.Containers.Unbounded_Synchronized_Queues is package body Implementation is ----------------------- -- Local Subprograms -- ----------------------- procedure Free is new Ada.Unchecked_Deallocation (Node_Type, Node_Access); ------------- -- Dequeue -- ------------- procedure Dequeue (List : in out List_Type; Element : out Queue_Interfaces.Element_Type) is X : Node_Access; begin Element := List.First.Element; X := List.First; List.First := List.First.Next; if List.First = null then List.Last := null; end if; List.Length := List.Length - 1; Free (X); end Dequeue; ------------- -- Enqueue -- ------------- procedure Enqueue (List : in out List_Type; New_Item : Queue_Interfaces.Element_Type) is Node : Node_Access; begin Node := new Node_Type'(New_Item, null); if List.First = null then List.First := Node; List.Last := List.First; else List.Last.Next := Node; List.Last := Node; end if; List.Length := List.Length + 1; if List.Length > List.Max_Length then List.Max_Length := List.Length; end if; end Enqueue; -------------- -- Finalize -- -------------- procedure Finalize (List : in out List_Type) is X : Node_Access; begin while List.First /= null loop X := List.First; List.First := List.First.Next; Free (X); end loop; end Finalize; ------------ -- Length -- ------------ function Length (List : List_Type) return Count_Type is begin return List.Length; end Length; ---------------- -- Max_Length -- ---------------- function Max_Length (List : List_Type) return Count_Type is begin return List.Max_Length; end Max_Length; end Implementation; protected body Queue is ----------------- -- Current_Use -- ----------------- function Current_Use return Count_Type is begin return List.Length; end Current_Use; ------------- -- Dequeue -- ------------- entry Dequeue (Element : out Queue_Interfaces.Element_Type) when List.Length > 0 is begin List.Dequeue (Element); end Dequeue; ------------- -- Enqueue -- ------------- entry Enqueue (New_Item : Queue_Interfaces.Element_Type) when True is begin List.Enqueue (New_Item); end Enqueue; -------------- -- Peak_Use -- -------------- function Peak_Use return Count_Type is begin return List.Max_Length; end Peak_Use; end Queue; end Ada.Containers.Unbounded_Synchronized_Queues;
30.268571
78
0.43704
4d8cf104122a419274120f91abd4bfd2e0576e86
5,324
adb
Ada
src/sys/http/util-http-mockups.adb
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
60
2015-01-18T23:05:34.000Z
2022-03-20T18:56:30.000Z
src/sys/http/util-http-mockups.adb
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
20
2016-09-15T16:41:30.000Z
2022-03-29T22:02:32.000Z
src/sys/http/util-http-mockups.adb
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
10
2015-02-13T04:00:45.000Z
2022-03-20T18:57:54.000Z
----------------------------------------------------------------------- -- util-http-clients-curl -- HTTP Clients with CURL -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Util.Http.Mockups is ----------------- -- Returns a boolean indicating whether the named response header has already -- been set. -- ------------------------------ function Contains_Header (Message : in Mockup_Message; Name : in String) return Boolean is begin return Message.Headers.Contains (Name); end Contains_Header; -- ------------------------------ -- Returns the value of the specified response header as a String. If the response -- did not include a header of the specified name, this method returns null. -- If there are multiple headers with the same name, this method returns the -- first head in the request. The header name is case insensitive. You can use -- this method with any response header. -- ------------------------------ function Get_Header (Message : in Mockup_Message; Name : in String) return String is Pos : constant Util.Strings.Maps.Cursor := Message.Headers.Find (Name); begin if Util.Strings.Maps.Has_Element (Pos) then return Util.Strings.Maps.Element (Pos); else return ""; end if; end Get_Header; -- ------------------------------ -- Sets a message header with the given name and value. If the header had already -- been set, the new value overwrites the previous one. The containsHeader -- method can be used to test for the presence of a header before setting its value. -- ------------------------------ overriding procedure Set_Header (Message : in out Mockup_Message; Name : in String; Value : in String) is begin Message.Headers.Include (Name, Value); end Set_Header; -- ------------------------------ -- Adds a request header with the given name and value. -- This method allows request headers to have multiple values. -- ------------------------------ overriding procedure Add_Header (Message : in out Mockup_Message; Name : in String; Value : in String) is Pos : constant Util.Strings.Maps.Cursor := Message.Headers.Find (Name); begin if Util.Strings.Maps.Has_Element (Pos) then declare Header : constant String := Util.Strings.Maps.Element (Pos); begin Message.Headers.Replace_Element (Pos, Header & ASCII.CR & ASCII.LF & Value); end; else Message.Headers.Include (Name, Value); end if; end Add_Header; -- ------------------------------ -- Iterate over the response headers and executes the <b>Process</b> procedure. -- ------------------------------ overriding procedure Iterate_Headers (Message : in Mockup_Message; Process : not null access procedure (Name : in String; Value : in String)) is Iter : Util.Strings.Maps.Cursor := Message.Headers.First; begin while Util.Strings.Maps.Has_Element (Iter) loop Util.Strings.Maps.Query_Element (Iter, Process); Util.Strings.Maps.Next (Iter); end loop; end Iterate_Headers; -- ------------- -- ------------------------------ -- Get the response body as a string. -- ------------------------------ overriding function Get_Body (Reply : in Mockup_Response) return String is begin return Ada.Strings.Unbounded.To_String (Reply.Content); end Get_Body; -- ------------------------------ -- Get the response status code. -- ------------------------------ overriding function Get_Status (Reply : in Mockup_Response) return Natural is begin return Reply.Status; end Get_Status; -- ------------------------------ -- Set the response status code. -- ------------------------------ procedure Set_Status (Reply : in out Mockup_Response; Status : in Natural) is begin Reply.Status := Status; end Set_Status; -- ------------------------------ -- Set the response body. -- ------------------------------ procedure Set_Body (Reply : in out Mockup_Response; Content : in String) is begin Reply.Content := Ada.Strings.Unbounded.To_Unbounded_String (Content); end Set_Body; end Util.Http.Mockups;
38.57971
88
0.547521
2f0060c17cae499ada1219f02f2ad6e4cd51af3d
1,811
ads
Ada
test/mat/vulkan-math-mat4x4-test.ads
zrmyers/VulkanAda
ed8c46d923bc8936db3a5d55d36afebb928a9ede
[ "MIT" ]
1
2021-01-29T21:10:45.000Z
2021-01-29T21:10:45.000Z
test/mat/vulkan-math-mat4x4-test.ads
zrmyers/VulkanAda
ed8c46d923bc8936db3a5d55d36afebb928a9ede
[ "MIT" ]
8
2020-04-22T14:55:20.000Z
2021-11-22T03:58:08.000Z
test/mat/vulkan-math-mat4x4-test.ads
zrmyers/VulkanAda
ed8c46d923bc8936db3a5d55d36afebb928a9ede
[ "MIT" ]
1
2021-04-05T13:19:21.000Z
2021-04-05T13:19:21.000Z
-------------------------------------------------------------------------------- -- MIT License -- -- Copyright (c) 2021 Zane Myers -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, 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 -- AUTHORS OR 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. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --< @group Vulkan Math Basic Types -------------------------------------------------------------------------------- --< @summary --< This package provides a single precision floating point matrix with 4 rows --< and 4 columns. -------------------------------------------------------------------------------- package Vulkan.Math.Mat4x4.Test is -- Test Harness for Mat4x3 regression tests procedure Test_Mat4x4; end Vulkan.Math.Mat4x4.Test;
47.657895
81
0.591938
29ee61f4bab9c30de840c09c61fdf3a26f4c069f
1,020
ads
Ada
resources/scripts/api/gitlab.ads
marcostolosa/Amass
7a48ddae82eeac76fd6447de908f6b27002eace7
[ "Apache-2.0" ]
7,053
2018-07-13T09:40:12.000Z
2022-03-31T15:26:10.000Z
resources/scripts/api/gitlab.ads
marcostolosa/Amass
7a48ddae82eeac76fd6447de908f6b27002eace7
[ "Apache-2.0" ]
624
2018-07-17T12:01:23.000Z
2022-03-28T13:59:17.000Z
resources/scripts/api/gitlab.ads
marcostolosa/Amass
7a48ddae82eeac76fd6447de908f6b27002eace7
[ "Apache-2.0" ]
1,470
2018-07-17T06:01:21.000Z
2022-03-31T18:02:17.000Z
-- Copyright 2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. name = "GitLab" type = "api" function start() set_rate_limit(1) end function check() local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c ~= nil and c.key ~= nil and c.key ~= "") then return true end return false end function vertical(ctx, domain) local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c == nil or c.key == nil or c.key == "") then return end local scopes = {"issues", "blobs", "notes"} for _, s in pairs(scopes) do scrape(ctx, { url=build_url(domain, s), headers={['PRIVATE-TOKEN']=c.key}, }) end end function build_url(domain, scope) return "https://gitlab.com/api/v4/search?scope=" .. scope .. "&search=" .. domain:gsub("%.", "[.]") end
21.702128
103
0.584314
59a2c7a234fc906641072a2e750d8ea57936f80b
2,165
adb
Ada
examples/exception_unhandled.adb
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
33
2015-04-04T09:19:36.000Z
2021-11-10T05:33:34.000Z
examples/exception_unhandled.adb
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
8
2017-11-14T13:05:07.000Z
2018-08-09T15:28:49.000Z
examples/exception_unhandled.adb
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
9
2015-02-03T17:09:53.000Z
2021-11-12T01:16:05.000Z
-- Demonstration for the behaviors of unhandled exceptions. with Ada.Exceptions; with Ada.Interrupts.Names; with Ada.Task_Identification; with Ada.Task_Termination; procedure exception_unhandled is begin -- terminate a task by unhandled exception declare task T; task body T is begin Ada.Debug.Put ("in task T"); raise Program_Error; -- will be reported by default end T; begin null; end; declare -- it can replace the report by a termination handler Handled : Boolean := False; protected Handlers is procedure Handle_T2 ( Cause : Ada.Task_Termination.Cause_Of_Termination; T : Ada.Task_Identification.Task_Id; X : Ada.Exceptions.Exception_Occurrence); end Handlers; protected body Handlers is procedure Handle_T2 ( Cause : Ada.Task_Termination.Cause_Of_Termination; T : Ada.Task_Identification.Task_Id; X : Ada.Exceptions.Exception_Occurrence) is pragma Unreferenced (T); begin case Cause is when Ada.Task_Termination.Normal | Ada.Task_Termination.Abnormal => null; when Ada.Task_Termination.Unhandled_Exception => Ada.Debug.Put (Ada.Exceptions.Exception_Name (X)); Handled := True; end case; end Handle_T2; end Handlers; begin declare task T2; task body T2 is begin Ada.Debug.Put ("in task T2"); Ada.Task_Termination.Set_Specific_Handler ( T2'Identity, Handlers.Handle_T2'Unrestricted_Access); raise Program_Error; -- will be handled by Handlers.Handle_T2 end T2; begin null; end; pragma Assert (Handled); end; -- terminate a interrupt handler by unhandled exception declare protected Handlers is procedure Handle_SIGINT; end Handlers; protected body Handlers is procedure Handle_SIGINT is begin Ada.Debug.Put ("in interrupt SIGINT"); raise Program_Error; end Handle_SIGINT; end Handlers; begin Ada.Interrupts.Unchecked_Attach_Handler (Handlers.Handle_SIGINT'Unrestricted_Access, Ada.Interrupts.Names.SIGINT); Ada.Interrupts.Raise_Interrupt (Ada.Interrupts.Names.SIGINT); end; Ada.Debug.Put ("in environment task"); raise Program_Error; end exception_unhandled;
27.0625
116
0.733487
10700b07d2e4423adfae50fc4aa4aa3eaaa46daf
6,211
adb
Ada
llvm-gcc-4.2-2.9/gcc/ada/g-hesorg.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/g-hesorg.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/g-hesorg.adb
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . H E A P _ S O R T _ G -- -- -- -- B o d y -- -- -- -- Copyright (C) 1995-2005, 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 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 GNAT.Heap_Sort_G is ---------- -- Sort -- ---------- -- We are using the classical heapsort algorithm (i.e. Floyd's Treesort3) -- as described by Knuth ("The Art of Programming", Volume III, first -- edition, section 5.2.3, p. 145-147) with the modification that is -- mentioned in exercise 18. For more details on this algorithm, see -- Robert B. K. Dewar PhD thesis "The use of Computers in the X-ray -- Phase Problem". University of Chicago, 1968, which was the first -- publication of the modification, which reduces the number of compares -- from 2NlogN to NlogN. procedure Sort (N : Natural) is Max : Natural := N; -- Current Max index in tree being sifted procedure Sift (S : Positive); -- This procedure sifts up node S, i.e. converts the subtree rooted -- at node S into a heap, given the precondition that any sons of -- S are already heaps. On entry, the contents of node S is found -- in the temporary (index 0), the actual contents of node S on -- entry are irrelevant. This is just a minor optimization to avoid -- what would otherwise be two junk moves in phase two of the sort. ---------- -- Sift -- ---------- procedure Sift (S : Positive) is C : Positive := S; Son : Positive; Father : Positive; -- Note: by making the above all Positive, we ensure that a test -- against zero for the temporary location can be resolved on the -- basis of types when the routines are inlined. begin -- This is where the optimization is done, normally we would do a -- comparison at each stage between the current node and the larger -- of the two sons, and continue the sift only if the current node -- was less than this maximum. In this modified optimized version, -- we assume that the current node will be less than the larger -- son, and unconditionally sift up. Then when we get to the bottom -- of the tree, we check parents to make sure that we did not make -- a mistake. This roughly cuts the number of comparisions in half, -- since it is almost always the case that our assumption is correct. -- Loop to pull up larger sons loop Son := 2 * C; if Son < Max then if Lt (Son, Son + 1) then Son := Son + 1; end if; elsif Son > Max then exit; end if; Move (Son, C); C := Son; end loop; -- Loop to check fathers while C /= S loop Father := C / 2; if Lt (Father, 0) then Move (Father, C); C := Father; else exit; end if; end loop; -- Last step is to pop the sifted node into place Move (0, C); end Sift; -- Start of processing for Sort begin -- Phase one of heapsort is to build the heap. This is done by -- sifting nodes N/2 .. 1 in sequence. for J in reverse 1 .. N / 2 loop Move (J, 0); Sift (J); end loop; -- In phase 2, the largest node is moved to end, reducing the size -- of the tree by one, and the displaced node is sifted down from -- the top, so that the largest node is again at the top. while Max > 1 loop Move (Max, 0); Move (1, Max); Max := Max - 1; Sift (1); end loop; end Sort; end GNAT.Heap_Sort_G;
42.834483
79
0.49686
296f5007a1e42bb2aa1c804c76fe216f693810c4
3,497
adb
Ada
src/str.adb
JeremyGrosser/synack_misc
08f791aa6200c95767cce80a6e0998f00e19acfd
[ "BSD-3-Clause" ]
null
null
null
src/str.adb
JeremyGrosser/synack_misc
08f791aa6200c95767cce80a6e0998f00e19acfd
[ "BSD-3-Clause" ]
null
null
null
src/str.adb
JeremyGrosser/synack_misc
08f791aa6200c95767cce80a6e0998f00e19acfd
[ "BSD-3-Clause" ]
null
null
null
-- -- Copyright (C) 2021 Jeremy Grosser <[email protected]> -- -- SPDX-License-Identifier: BSD-3-Clause -- package body Str is subtype Numbers is Character range '0' .. '9'; function Find (S : String; C : Character) return Natural is begin for I in S'Range loop if S (I) = C then return I; end if; end loop; return 0; end Find; function Contains (Haystack, Needle : String) return Boolean is I : Integer := Haystack'First; begin if Haystack'Length < Needle'Length then return False; end if; while I <= Haystack'Last - Needle'Length - 1 loop if Haystack (I .. I + Needle'Length) = Needle then return True; end if; I := I + 1; end loop; return False; end Contains; function Find_Number (S : String) return Natural is begin for I in S'Range loop if S (I) in Numbers then return I; end if; end loop; return 0; end Find_Number; function To_Natural (S : String; Base : Positive := 10) return Natural is Multiple : Natural := 1; N : Natural := 0; begin for I in reverse 0 .. S'Length - 1 loop N := N + ((Character'Pos (S (S'First + I)) - Character'Pos ('0')) * Multiple); Multiple := Multiple * Base; end loop; return N; end To_Natural; function Split (S : String; Delimiter : Character; Skip : Natural) return String is First : Natural := S'First; Last : Natural := S'Last; begin if Skip > 0 then for I in 1 .. Skip loop First := Find (S (First .. Last), Delimiter) + 1; end loop; end if; Last := Find (S (First .. Last), Delimiter); if Last = 0 then Last := S'Last; else Last := Last - 1; end if; return S (First .. Last); end Split; function Strip (S : String; C : Character) return String is begin if S'Length = 0 then return S; end if; if S'Length = 1 and then S (S'First) = C then return ""; end if; if S (S'First) = C then return Strip (S (S'First + 1 .. S'Last), C); elsif S (S'Last) = C then return Strip (S (S'First .. S'Last - 1), C); else return S; end if; end Strip; function Strip_Leading (S : String; C : Character) return String is begin if S'Length = 0 then return S; end if; if S'Length = 1 and then S (S'First) = C then return ""; end if; if S (S'First) = C then return Strip (S (S'First + 1 .. S'Last), C); else return S; end if; end Strip_Leading; function Trim (S : String; Chars : String) return String is Last : Integer := S'Last; begin while Find (Chars, S (Last)) /= 0 loop Last := Last - 1; if Last = S'First then return ""; end if; end loop; return S (S'First .. Last); end Trim; function Starts_With (S : String; Prefix : String) return Boolean is begin return (S'Length >= Prefix'Length and then S (S'First .. S'First + Prefix'Length - 1) = Prefix); end Starts_With; end Str;
21.58642
102
0.502145