commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
5ba0ff1950cda97c019401e56cba37a5eeec0596
resources/scripts/scrape/duckduckgo.ads
resources/scripts/scrape/duckduckgo.ads
-- 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 = "DuckDuckGo" type = "scrape" function start() setratelimit(1) end function vertical(ctx, domain) scrape(ctx, {['url']="https://html.duckduckgo.com/html/?q=site:" .. domain}) end
-- 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 = "DuckDuckGo" type = "scrape" function start() setratelimit(1) end function vertical(ctx, domain) scrape(ctx, {['url']=buildurl(domain)}) end function buildurl(domain) return "https://html.duckduckgo.com/html/?q=site:" .. domain .. " -site:www." .. domain end
Exclude www from DuckDuckGo search result
Exclude www from DuckDuckGo search result
Ada
apache-2.0
caffix/amass,caffix/amass
c73b2a83da61a709a748b9a3aa4ddad94be9ac66
src/gen-commands-info.ads
src/gen-commands-info.ads
----------------------------------------------------------------------- -- gen-commands-info -- Collect and give information about the project -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Info is -- ------------------------------ -- Project Information Command -- ------------------------------ -- This command collects information about the project and print it. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Info;
----------------------------------------------------------------------- -- gen-commands-info -- Collect and give information about the project -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Info is -- ------------------------------ -- Project Information Command -- ------------------------------ -- This command collects information about the project and print it. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Info;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
dd579e30f700d1950577dd153ee69603fda22434
awa/regtests/awa-mail-modules-tests.ads
awa/regtests/awa-mail-modules-tests.ads
----------------------------------------------------------------------- -- awa-mail-module-tests -- Unit tests for Mail module -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Mail.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with null record; -- Create an email message and verify its content. procedure Test_Create_Message (T : in out Test); end AWA.Mail.Modules.Tests;
----------------------------------------------------------------------- -- awa-mail-module-tests -- Unit tests for Mail module -- Copyright (C) 2012, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Mail.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with null record; -- Create an email message with the given template and verify its content. procedure Test_Mail_Message (T : in out Test; Name : in String); -- Create an email message and verify its content. procedure Test_Create_Message (T : in out Test); -- Create an email message with Cc: and verify its content. procedure Test_Cc_Message (T : in out Test); -- Create an email message with Bcc: and verify its content. procedure Test_Bcc_Message (T : in out Test); end AWA.Mail.Modules.Tests;
Add new tests for mail Cc and Bcc
Add new tests for mail Cc and Bcc
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
827c3ce72ca31f16885f809a4c436d3beed1ff3e
awa/plugins/awa-counters/src/awa-counters-definition.ads
awa/plugins/awa-counters/src/awa-counters-definition.ads
----------------------------------------------------------------------- -- awa-counters-definition -- Counter definition -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition. generic Table : ADO.Schemas.Class_Mapping_Access; Field : String; package AWA.Counters.Definition is Def_Name : aliased constant String := Field; -- Get the counter definition index. function Index return Counter_Index_Type; private package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access)); -- Get the counter definition index. function Index return Counter_Index_Type renames Def.Kind; end AWA.Counters.Definition;
----------------------------------------------------------------------- -- awa-counters-definition -- Counter definition -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition. generic Table : ADO.Schemas.Class_Mapping_Access; Field : String := ""; package AWA.Counters.Definition is Def_Name : aliased constant String := Field; -- Get the counter definition index. function Index return Counter_Index_Type; private package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access)); -- Get the counter definition index. function Index return Counter_Index_Type renames Def.Kind; end AWA.Counters.Definition;
Change the Field parameter to be optional
Change the Field parameter to be optional
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
75baa9b76472b63a7a2a119922787c85014b5e5f
mat/src/matp.adb
mat/src/matp.adb
----------------------------------------------------------------------- -- mat-types -- Global types -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.IO_Exceptions; with MAT.Commands; with MAT.Targets; with MAT.Consoles.Text; with MAT.Readers.Streams.Sockets; procedure Matp is Target : MAT.Targets.Target_Type; Options : MAT.Commands.Options_Type; Console : aliased MAT.Consoles.Text.Console_Type; Server : MAT.Readers.Streams.Sockets.Socket_Listener_Type; begin Target.Console (Console'Unchecked_Access); MAT.Commands.Initialize_Options (Target, Options); Server.Start (Options.Address); MAT.Commands.Interactive (Target); Server.Stop; exception when Ada.IO_Exceptions.End_Error | MAT.Commands.Usage_Error => Server.Stop; end Matp;
----------------------------------------------------------------------- -- mat-types -- Global types -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.IO_Exceptions; with MAT.Commands; with MAT.Targets; with MAT.Consoles.Text; with MAT.Readers.Streams.Sockets; procedure Matp is Target : MAT.Targets.Target_Type; Options : MAT.Commands.Options_Type; Console : aliased MAT.Consoles.Text.Console_Type; Server : MAT.Readers.Streams.Sockets.Socket_Listener_Type; begin Target.Console (Console'Unchecked_Access); MAT.Commands.Initialize_Options (Target, Options); MAT.Commands.Initialize_Files (Target); Server.Start (Options.Address); MAT.Commands.Interactive (Target); Server.Stop; exception when Ada.IO_Exceptions.End_Error | MAT.Commands.Usage_Error => Server.Stop; end Matp;
Load the MAT files passed in the command line argument
Load the MAT files passed in the command line argument
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
c07896268b3a1be5d6cb418504473e15530165a7
src/util-commands.ads
src/util-commands.ads
----------------------------------------------------------------------- -- util-commands -- Support to make command line tools -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Util.Commands is -- The argument list interface that gives access to command arguments. type Argument_List is limited interface; -- Get the number of arguments available. function Get_Count (List : in Argument_List) return Natural is abstract; -- Get the argument at the given position. function Get_Argument (List : in Argument_List; Pos : in Positive) return String is abstract; end Util.Commands;
----------------------------------------------------------------------- -- util-commands -- Support to make command line tools -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Util.Commands is -- The argument list interface that gives access to command arguments. type Argument_List is limited interface; -- Get the number of arguments available. function Get_Count (List : in Argument_List) return Natural is abstract; -- Get the argument at the given position. function Get_Argument (List : in Argument_List; Pos : in Positive) return String is abstract; type Default_Argument_List (Offset : Natural) is new Argument_List with null record; -- Get the number of arguments available. overriding function Get_Count (List : in Default_Argument_List) return Natural; -- Get the argument at the given position. overriding function Get_Argument (List : in Default_Argument_List; Pos : in Positive) return String; end Util.Commands;
Declare the Default_Argument_List and override the Get_Count and Get_Argument operations
Declare the Default_Argument_List and override the Get_Count and Get_Argument operations
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
5b0b4a558b5c3205044fb5a57dfa8417c61cfd26
src/asf-lifecycles-default.ads
src/asf-lifecycles-default.ads
----------------------------------------------------------------------- -- asf-lifecycles-default -- Default Lifecycle handler -- Copyright (C) 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package ASF.Lifecycles.Default is type Lifecycle is new ASF.Lifecycles.Lifecycle with null record; -- Creates the phase controllers by invoking the <b>Set_Controller</b> -- procedure for each phase. This is called by <b>Initialize</b> to build -- the lifecycle handler. procedure Create_Phase_Controllers (Controller : in out Lifecycle); -- Initialize the the lifecycle handler. overriding procedure Initialize (Controller : in out Lifecycle; App : access ASF.Applications.Main.Application'Class); end ASF.Lifecycles.Default;
----------------------------------------------------------------------- -- asf-lifecycles-default -- Default Lifecycle handler -- Copyright (C) 2010, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 ASF.Lifecycles.Default is type Lifecycle is new ASF.Lifecycles.Lifecycle with null record; -- Creates the phase controllers by invoking the <b>Set_Controller</b> -- procedure for each phase. This is called by <b>Initialize</b> to build -- the lifecycle handler. procedure Create_Phase_Controllers (Controller : in out Lifecycle); -- Initialize the the lifecycle handler. overriding procedure Initialize (Controller : in out Lifecycle; Views : access ASF.Applications.Views.View_Handler'Class); end ASF.Lifecycles.Default;
Update Initialize to use a ASF.Applications.Views.View_Handler'Class
Update Initialize to use a ASF.Applications.Views.View_Handler'Class
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
4371ca7c8bd1a5f86fd7bc9694f74274d79d76e4
regtests/util-dates-tests.ads
regtests/util-dates-tests.ads
----------------------------------------------------------------------- -- util-dates-tests - Test for dates -- Copyright (C) 2018, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Dates.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test converting a date in ISO8601. procedure Test_ISO8601_Image (T : in out Test); -- Test converting a string in ISO8601 into a date. procedure Test_ISO8601_Value (T : in out Test); -- Test value convertion errors. procedure Test_ISO8601_Error (T : in out Test); end Util.Dates.Tests;
----------------------------------------------------------------------- -- util-dates-tests - Test for dates -- Copyright (C) 2018, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Dates.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test converting a date in ISO8601. procedure Test_ISO8601_Image (T : in out Test); -- Test converting a string in ISO8601 into a date. procedure Test_ISO8601_Value (T : in out Test); -- Test value convertion errors. procedure Test_ISO8601_Error (T : in out Test); -- Test Is_Same_Day operation. procedure Test_Is_Same_Day (T : in out Test); end Util.Dates.Tests;
Add Test_Is_Same_Day to check the Is_Same_Day operation
Add Test_Is_Same_Day to check the Is_Same_Day operation
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
67dd28110d63a9d0eb65cd8623ac9deb8ac2551c
src/gen-commands-project.ads
src/gen-commands-project.ads
----------------------------------------------------------------------- -- gen-commands-project -- Project creation command for dynamo -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Project is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Project;
----------------------------------------------------------------------- -- gen-commands-project -- Project creation command for dynamo -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Project is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Project;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
221c3eb5dbed978e8e1310dfa06d561b2dc97767
src/definitions.ads
src/definitions.ads
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt package Definitions is pragma Pure; synth_version_major : constant String := "1"; synth_version_minor : constant String := "02"; copyright_years : constant String := "2015-2016"; host_localbase : constant String := "/usr/local"; host_pkg8 : constant String := host_localbase & "/sbin/pkg"; jobs_per_cpu : constant := 2; type cpu_range is range 1 .. 32; type scanners is range cpu_range'First .. cpu_range'Last; type builders is range cpu_range'First .. cpu_range'Last * jobs_per_cpu; end Definitions;
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt package Definitions is pragma Pure; synth_version_major : constant String := "1"; synth_version_minor : constant String := "03"; copyright_years : constant String := "2015-2016"; host_localbase : constant String := "/usr/local"; host_pkg8 : constant String := host_localbase & "/sbin/pkg"; jobs_per_cpu : constant := 2; type cpu_range is range 1 .. 32; type scanners is range cpu_range'First .. cpu_range'Last; type builders is range cpu_range'First .. cpu_range'Last * jobs_per_cpu; end Definitions;
Bump to version 1.03 (term/dtrace fixes self-confirmed)
Bump to version 1.03 (term/dtrace fixes self-confirmed)
Ada
isc
jrmarino/synth,jrmarino/synth,jrmarino/synth,jrmarino/synth
80d8835ded5d6289555075188f352813f694a933
regtests/security-testsuite.adb
regtests/security-testsuite.adb
----------------------------------------------------------------------- -- Security testsuite - Ada Security Test suite -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Security.OpenID.Tests; with Security.Permissions.Tests; with Security.Policies.Tests; package body Security.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Ret : constant Util.Tests.Access_Test_Suite := Tests'Access; begin Security.OpenID.Tests.Add_Tests (Ret); Security.Permissions.Tests.Add_Tests (Ret); Security.Policies.Tests.Add_Tests (Ret); return Ret; end Suite; end Security.Testsuite;
----------------------------------------------------------------------- -- Security testsuite - Ada Security Test suite -- Copyright (C) 2011, 2012, 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Security.OpenID.Tests; with Security.Permissions.Tests; with Security.Policies.Tests; with Security.OAuth.JWT.Tests; package body Security.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Ret : constant Util.Tests.Access_Test_Suite := Tests'Access; begin Security.OAuth.JWT.Tests.Add_Tests (Ret); Security.OpenID.Tests.Add_Tests (Ret); Security.Permissions.Tests.Add_Tests (Ret); Security.Policies.Tests.Add_Tests (Ret); return Ret; end Suite; end Security.Testsuite;
Add the new unit tests
Add the new unit tests
Ada
apache-2.0
stcarrez/ada-security
9ec7dc42a5848802e292cf5c6381f3784bd5b5ff
awa/plugins/awa-tags/src/awa-tags.ads
awa/plugins/awa-tags/src/awa-tags.ads
----------------------------------------------------------------------- -- awa-tags -- Tags management -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Tags</b> module allows to associate general purpose tags to any database entity. -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_tags_model.png] -- -- @include awa-tags-modules.ads package AWA.Tags is pragma Pure; end AWA.Tags;
----------------------------------------------------------------------- -- awa-tags -- Tags management -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Tags</b> module allows to associate general purpose tags to any database entity. -- It provides a JSF component that allows to insert easily a list of tags in a page and -- in a form. An application can use the bean types defined in <tt>AWA.Tags.Beans</tt> -- to define the tags and it will use the <tt>awa:tagList</tt> component to display them. -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_tags_model.png] -- -- @include awa-tags-modules.ads -- @include awa-tags-beans.ads -- @include awa-tags-components.ads -- package AWA.Tags is pragma Pure; end AWA.Tags;
Document the Tags plugin in AWA
Document the Tags plugin in AWA
Ada
apache-2.0
Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa
69efcb859896e91d312d8b07e551511816c72cf6
regtests/asf-requests-tests.ads
regtests/asf-requests-tests.ads
----------------------------------------------------------------------- -- asf-requests-tests - Unit tests for requests -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ASF.Requests.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test the Split_Header procedure. procedure Test_Split_Header (T : in out Test); -- Test the Accept_Locales procedure. procedure Test_Accept_Locales (T : in out Test); end ASF.Requests.Tests;
----------------------------------------------------------------------- -- asf-requests-tests - Unit tests for requests -- Copyright (C) 2012, 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ASF.Requests.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test the Split_Header procedure. procedure Test_Split_Header (T : in out Test); -- Test the Accept_Locales procedure. procedure Test_Accept_Locales (T : in out Test); -- Test the Set_Attribute procedure. procedure Test_Set_Attribute (T : in out Test); end ASF.Requests.Tests;
Declare the Test_Set_Attribute procedure to check the Set/Get/Remove attribute
Declare the Test_Set_Attribute procedure to check the Set/Get/Remove attribute
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
95880958f105d4b3a56bfffe99308c2e53c9554b
src/util-processes-tools.ads
src/util-processes-tools.ads
----------------------------------------------------------------------- -- util-processes-tools -- System specific and low level operations -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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.Vectors; package Util.Processes.Tools is -- Execute the command and append the output in the vector array. -- The program output is read line by line and the standard input is closed. -- Return the program exit status. procedure Execute (Command : in String; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); end Util.Processes.Tools;
----------------------------------------------------------------------- -- util-processes-tools -- System specific and low level operations -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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.Vectors; with Util.Streams.Pipes; package Util.Processes.Tools is -- Execute the command and append the output in the vector array. -- The program output is read line by line and the standard input is closed. -- Return the program exit status. procedure Execute (Command : in String; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); procedure Execute (Command : in String; Input_Path : in String; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); procedure Execute (Command : in String; Process : in out Util.Streams.Pipes.Pipe_Stream; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); end Util.Processes.Tools;
Declare more Execute procedures as helper to launch a command and get the output
Declare more Execute procedures as helper to launch a command and get the output
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
95be7c3737b22b8f447dfed41202288270d31d37
awa/plugins/awa-blogs/regtests/awa-blogs-tests.ads
awa/plugins/awa-blogs/regtests/awa-blogs-tests.ads
----------------------------------------------------------------------- -- awa-blogs-tests -- Unit tests for blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package AWA.Blogs.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test creation of blog by simulating web requests. procedure Test_Create_Blog (T : in out Test); end AWA.Blogs.Tests;
----------------------------------------------------------------------- -- awa-blogs-tests -- Unit tests for blogs module -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with Ada.Strings.Unbounded; package AWA.Blogs.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with record Blog_Ident : Ada.Strings.Unbounded.Unbounded_String; Post_Ident : Ada.Strings.Unbounded.Unbounded_String; Post_Uri : Ada.Strings.Unbounded.Unbounded_String; end record; -- Get some access on the blog as anonymous users. procedure Verify_Anonymous (T : in out Test; Post : in String); -- Test access to the blog as anonymous user. procedure Test_Anonymous_Access (T : in out Test); -- Test creation of blog by simulating web requests. procedure Test_Create_Blog (T : in out Test); -- Test updating a post by simulating web requests. procedure Test_Update_Post (T : in out Test); end AWA.Blogs.Tests;
Declare two new unit tests Test_Update_Post and Test_Anonymous_Access
Declare two new unit tests Test_Update_Post and Test_Anonymous_Access
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
5a3538c864f35bc5184b009d674572c3c67066a6
src/mysql/ado-mysql.adb
src/mysql/ado-mysql.adb
----------------------------------------------------------------------- -- ado-mysql -- Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Mysql; package body ADO.Mysql is -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); ADO.Connections.Mysql.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); ADO.Connections.Mysql.Initialize; end Initialize; end ADO.Mysql;
----------------------------------------------------------------------- -- ado-mysql -- Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Mysql; package body ADO.Mysql is -- ------------------------------ -- Initialize the Mysql driver. -- ------------------------------ procedure Initialize is begin ADO.Connections.Mysql.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; end ADO.Mysql;
Implement the Initialize procedure and use it
Implement the Initialize procedure and use it
Ada
apache-2.0
stcarrez/ada-ado
fb8f7f1cf7a663a6ff22cbd2255abb8b7de8ebae
awa/regtests/awa_harness.adb
awa/regtests/awa_harness.adb
----------------------------------------------------------------------- -- AWA - Unit tests -- Copyright (C) 2009, 2010, 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with AWA.Testsuite; with Util.Tests; with AWA.Tests; procedure AWA_Harness is procedure Harness is new Util.Tests.Harness (AWA.Testsuite.Suite, AWA.Tests.Initialize); begin Harness ("awa-tests.xml"); end AWA_Harness;
----------------------------------------------------------------------- -- AWA - Unit tests -- Copyright (C) 2009, 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with AWA.Testsuite; with Util.Tests; with AWA.Tests; procedure AWA_Harness is procedure Harness is new Util.Tests.Harness (AWA.Testsuite.Suite, AWA.Tests.Initialize, AWA.Tests.Finish); begin Harness ("awa-tests.xml"); end AWA_Harness;
Call the Finish procedure after executing the testsuite Finish will destroy the AWA application that was allocated dynamically
Call the Finish procedure after executing the testsuite Finish will destroy the AWA application that was allocated dynamically
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
689e10214201b442c0563f6c0044e726ac1c28f2
regtests/security-testsuite.adb
regtests/security-testsuite.adb
----------------------------------------------------------------------- -- Security testsuite - Ada Security Test suite -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Security.OpenID.Tests; with Security.Permissions.Tests; with Security.Policies.Tests; package body Security.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Ret : constant Util.Tests.Access_Test_Suite := Tests'Access; begin Security.OpenID.Tests.Add_Tests (Ret); Security.Permissions.Tests.Add_Tests (Ret); Security.Policies.Tests.Add_Tests (Ret); return Ret; end Suite; end Security.Testsuite;
----------------------------------------------------------------------- -- Security testsuite - Ada Security Test suite -- Copyright (C) 2011, 2012, 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Security.OpenID.Tests; with Security.Permissions.Tests; with Security.Policies.Tests; with Security.OAuth.JWT.Tests; package body Security.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Ret : constant Util.Tests.Access_Test_Suite := Tests'Access; begin Security.OAuth.JWT.Tests.Add_Tests (Ret); Security.OpenID.Tests.Add_Tests (Ret); Security.Permissions.Tests.Add_Tests (Ret); Security.Policies.Tests.Add_Tests (Ret); return Ret; end Suite; end Security.Testsuite;
Add the new unit tests
Add the new unit tests
Ada
apache-2.0
Letractively/ada-security
ca75e6900380036a05c5ce6330dc232c0c79af27
mat/src/mat-formats.ads
mat/src/mat-formats.ads
----------------------------------------------------------------------- -- mat-formats - Format various types for the console or GUI interface -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 MAT.Types; package MAT.Formats is -- Format the address into a string. function Addr (Value : in MAT.Types.Target_Addr) return String; -- Format the size into a string. function Size (Value : in MAT.Types.Target_Size) return String; -- Format a file, line, function information into a string. function Location (File : in Ada.Strings.Unbounded.Unbounded_String; Line : in Natural; Func : in Ada.Strings.Unbounded.Unbounded_String) return String; end MAT.Formats;
----------------------------------------------------------------------- -- mat-formats - Format various types for the console or GUI interface -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 MAT.Types; with MAT.Events.Targets; package MAT.Formats is -- Format the address into a string. function Addr (Value : in MAT.Types.Target_Addr) return String; -- Format the size into a string. function Size (Value : in MAT.Types.Target_Size) return String; -- Format a file, line, function information into a string. function Location (File : in Ada.Strings.Unbounded.Unbounded_String; Line : in Natural; Func : in Ada.Strings.Unbounded.Unbounded_String) return String; -- Format a short description of the event. function Event (Item : in MAT.Events.Targets.Probe_Event_Type; Related : in MAT.Events.Targets.Target_Event_Vector) return String; end MAT.Formats;
Declare the Event function to format an event in a printable short description
Declare the Event function to format an event in a printable short description
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
225ddf74376da5a89f53dbcde8eea57064ecee76
src/gen-commands-distrib.ads
src/gen-commands-distrib.ads
----------------------------------------------------------------------- -- gen-commands-distrib -- Distrib command for dynamo -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not 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 Gen.Commands.Distrib is -- ------------------------------ -- Distrib Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Distrib;
----------------------------------------------------------------------- -- gen-commands-distrib -- Distrib command for dynamo -- Copyright (C) 2012, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Distrib is -- ------------------------------ -- Distrib Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Distrib;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
f16023ad92a6be1cf7665cdc9c6cc44e4b920d21
src/gen-commands.ads
src/gen-commands.ads
----------------------------------------------------------------------- -- gen-commands -- Commands for dynamo -- Copyright (C) 2011, 2012, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Commands.Drivers; with Gen.Generator; package Gen.Commands is package Drivers is new Util.Commands.Drivers (Context_Type => Gen.Generator.Handler, Driver_Name => "gen-commands"); subtype Command is Drivers.Command_Type; subtype Command_Access is Drivers.Command_Access; subtype Argument_List is Util.Commands.Argument_List; Driver : Drivers.Driver_Type; -- Print dynamo short usage. procedure Short_Help_Usage; end Gen.Commands;
----------------------------------------------------------------------- -- gen-commands -- Commands for dynamo -- Copyright (C) 2011, 2012, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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.Commands.Drivers; with Util.Commands.Parsers; with Gen.Generator; package Gen.Commands is package Drivers is new Util.Commands.Drivers (Context_Type => Gen.Generator.Handler, Config_Parser => Util.Commands.Parsers.No_Parser, Driver_Name => "gen-commands"); subtype Command is Drivers.Command_Type; subtype Command_Access is Drivers.Command_Access; subtype Argument_List is Util.Commands.Argument_List; Driver : Drivers.Driver_Type; -- Print dynamo short usage. procedure Short_Help_Usage; end Gen.Commands;
Update to use the No_Parser for commands
Update to use the No_Parser for commands
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
012dc4bd70fdfd05692dcf8de01d1bb8eefff8cc
awa/plugins/awa-workspaces/src/awa-workspaces.ads
awa/plugins/awa-workspaces/src/awa-workspaces.ads
----------------------------------------------------------------------- -- awa-workspaces -- Module workspaces -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *workspaces* plugin defines a workspace area for other plugins. -- -- == Data Model == -- @include Workspace.hbm.xml -- package AWA.Workspaces is end AWA.Workspaces;
----------------------------------------------------------------------- -- awa-workspaces -- Module workspaces -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *workspaces* plugin defines a workspace area for other plugins. -- -- == Ada Beans == -- @include workspaces.xml -- -- == Data Model == -- @include Workspace.hbm.xml -- package AWA.Workspaces is end AWA.Workspaces;
Add the Ada beans in the workspace documentation
Add the Ada beans in the workspace documentation
Ada
apache-2.0
Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa
0b34b35ce477b31573529b60f8bf2f4eab3c0138
src/base/beans/util-beans-objects-time.ads
src/base/beans/util-beans-objects-time.ads
----------------------------------------------------------------------- -- Util.Beans.Objects.Time -- Helper conversion for Ada Calendar Time -- Copyright (C) 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Beans.Objects.Time is -- Create an object from the given value. function To_Object (Value : in Ada.Calendar.Time) return Object; -- Convert the object into a time. -- Raises Constraint_Error if the object cannot be converter to the target type. function To_Time (Value : in Object) return Ada.Calendar.Time; -- Force the object to be a time. function Cast_Time (Value : Object) return Object; end Util.Beans.Objects.Time;
----------------------------------------------------------------------- -- util-beans-objects-time -- Helper conversion for Ada Calendar Time -- Copyright (C) 2010, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; with Util.Nullables; package Util.Beans.Objects.Time is -- Create an object from the given value. function To_Object (Value : in Ada.Calendar.Time) return Object; function To_Object (Value : in Nullables.Nullable_Time) return Object; -- Convert the object into a time. -- Raises Constraint_Error if the object cannot be converter to the target type. function To_Time (Value : in Object) return Ada.Calendar.Time; function To_Time (Value : in Object) return Nullables.Nullable_Time; -- Force the object to be a time. function Cast_Time (Value : Object) return Object; end Util.Beans.Objects.Time;
Add To_Object and To_Time with a Nullable_Time type
Add To_Object and To_Time with a Nullable_Time type
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
e4ea0b00f0f9deb3c8aca8acce9c64b3ed159280
awa/plugins/awa-tags/src/awa-tags.ads
awa/plugins/awa-tags/src/awa-tags.ads
----------------------------------------------------------------------- -- awa-tags -- Tags management -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Tags</b> module allows to associate general purpose tags to any database entity. -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_tags_model.png] -- -- @include awa-tags-modules.ads package AWA.Tags is pragma Pure; end AWA.Tags;
----------------------------------------------------------------------- -- awa-tags -- Tags management -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Tags</b> module allows to associate general purpose tags to any database entity. -- It provides a JSF component that allows to insert easily a list of tags in a page and -- in a form. An application can use the bean types defined in <tt>AWA.Tags.Beans</tt> -- to define the tags and it will use the <tt>awa:tagList</tt> component to display them. -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_tags_model.png] -- -- @include awa-tags-modules.ads -- @include awa-tags-beans.ads -- @include awa-tags-components.ads -- package AWA.Tags is pragma Pure; end AWA.Tags;
Document the Tags plugin in AWA
Document the Tags plugin in AWA
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
3d649c52302f22085d57e3422b43f295ed936779
src/gen-commands-database.ads
src/gen-commands-database.ads
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
c44636eef7002c239dde452cab4d5ae3bfc2f16e
src/gen-commands-propset.ads
src/gen-commands-propset.ads
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
31f10974b069933e9c0691f9e45d740bc6373484
tools/druss-commands-devices.ads
tools/druss-commands-devices.ads
----------------------------------------------------------------------- -- druss-commands-devices -- Print information about the devices -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Devices is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_List (Command : in Command_Type; Args : in Argument_List'Class; Context : in out Context_Type); -- Execute a status command to report information about the Bbox. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Devices;
----------------------------------------------------------------------- -- druss-commands-devices -- Print information about the devices -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Devices is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_List (Command : in Command_Type; Args : in Argument_List'Class; Selector : in Device_Selector_Type; Context : in out Context_Type); -- Execute a status command to report information about the Bbox. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Devices;
Add a device selector to the Do_List procedure
Add a device selector to the Do_List procedure
Ada
apache-2.0
stcarrez/bbox-ada-api
233b030fe6c6e48276b77d6a35bf0f692b00f325
src/ado-schemas-databases.ads
src/ado-schemas-databases.ads
----------------------------------------------------------------------- -- ado-schemas-databases -- Database creation -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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.Vectors; with ADO.Sessions; with ADO.Configs; package ADO.Schemas.Databases is -- Create the database and initialize it with the schema SQL file. procedure Create_Database (Session : in out Sessions.Master_Session; Config : in Configs.Configuration'Class; Schema_Path : in String; Messages : out Util.Strings.Vectors.Vector); end ADO.Schemas.Databases;
----------------------------------------------------------------------- -- ado-schemas-databases -- Database creation -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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.Vectors; with ADO.Sessions.Sources; package ADO.Schemas.Databases is -- 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: this is the -- database that must be created and configured. The `Schema_Path` is the path -- of the SQL file that can be used to populate the database with the schema. -- The `Messages` vector will contain the messages produced during the setup and -- configuration of the database. -- -- For the `sqlite` driver, the `Admin` parameter is not used. procedure Create_Database (Admin : in ADO.Sessions.Sources.Data_Source'Class; Config : in ADO.Sessions.Sources.Data_Source'Class; Schema_Path : in String; Messages : out Util.Strings.Vectors.Vector); end ADO.Schemas.Databases;
Update the Create_Database to use a Data_Source as configuration parameters
Update the Create_Database to use a Data_Source as configuration parameters
Ada
apache-2.0
stcarrez/ada-ado
9496af418a57a78692fc1585c2cf4c2e2ca201a3
resources/scripts/api/gitlab.ads
resources/scripts/api/gitlab.ads
-- 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 end
-- 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
Fix Gitlab data source script
Fix Gitlab data source script
Ada
apache-2.0
caffix/amass,caffix/amass
f8c0c5014e96fbeb001cb9d3e00e4f695ca9a456
ibv_message_passing_ada_project/source/coverage_for_ada_task/coverage_for_ada_task.adb
ibv_message_passing_ada_project/source/coverage_for_ada_task/coverage_for_ada_task.adb
-- @file coverage_for_ada_task.adb -- @date 28 May 2022 -- @author Chester Gillon -- @brief Example program to test getting coverage for an Ada task with Ada.Text_IO; procedure Coverage_For_Ada_Task is task Print_Task is entry Print; end Print_Task; task body Print_Task is begin loop select accept Print do Ada.Text_IO.Put_Line ("In task Print_Task"); end Print; or terminate; end select; end loop; end Print_Task; begin for index in 1..3 loop Print_Task.Print; end loop; Ada.Text_IO.Put_Line ("In main"); end Coverage_For_Ada_Task;
-- @file coverage_for_ada_task.adb -- @date 28 May 2022 -- @author Chester Gillon -- @brief Example program to test getting coverage for an Ada task with Ada.Text_IO; procedure Coverage_For_Ada_Task is generic Name : String; package Generic_Name is procedure Display_Name; end Generic_Name; package body Generic_Name is procedure Display_Name is begin Ada.Text_IO.Put_Line ("My name is " & Name); end Display_Name; end Generic_Name; task Print_Task is entry Print; end Print_Task; task body Print_Task is begin loop select accept Print do Ada.Text_IO.Put_Line ("In task Print_Task"); end Print; or terminate; end select; end loop; end Print_Task; package Package_A is new Generic_Name ("A"); package Package_B is new Generic_Name ("B"); begin Package_A.Display_Name; for index in 1..3 loop Print_Task.Print; end loop; Package_B.Display_Name; Ada.Text_IO.Put_Line ("In main"); end Coverage_For_Ada_Task;
Add coverage test for simple generic package
Add coverage test for simple generic package
Ada
mit
Chester-Gillon/ibv_message_passing,Chester-Gillon/ibv_message_passing,Chester-Gillon/ibv_message_passing
26441e9cc26bebfa7c85b0711f59facb415ba5fd
t0032.adb
t0032.adb
-- t0032.adb - Tue Jan 14 20:20:46 2014 -- -- (c) Warren W. Gay VE3WWG ve3wwg@gmail.com -- -- Protected under the following license: -- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 with Ada.Text_IO; with Posix; use Posix; procedure T0032 is use Ada.Text_IO; Res : s_rusage; Error : errno_t; pragma Volatile(Error); begin Put_Line("Test 0032 - Getrlimit/Setrlimit"); Error := 0; for X in 0..999999 loop if Error < 32000 then Error := Error + 1; else Error := 0; end if; end loop; Getrusage(RUSAGE_SELF,Res,Error); pragma Assert(Error = 0); pragma Assert(Res.ru_utime.tv_sec >= 0); pragma Assert(Res.ru_utime.tv_usec > 0 or else Res.ru_utime.tv_sec > 0); Put_Line("Test 0032 Passed."); end T0032;
-- t0032.adb - Tue Jan 14 20:20:46 2014 -- -- (c) Warren W. Gay VE3WWG ve3wwg@gmail.com -- -- Protected under the following license: -- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 with Ada.Text_IO; with Posix; use Posix; procedure T0032 is use Ada.Text_IO; Res : s_rusage; Error : errno_t; pragma Volatile(Error); begin Put_Line("Test 0032 - Getrlimit/Setrlimit"); Error := 0; for X in 0..9999999 loop if Error < 32000 then Error := Error + 1; else Error := 0; end if; end loop; Getrusage(RUSAGE_SELF,Res,Error); pragma Assert(Error = 0); pragma Assert(Res.ru_utime.tv_sec >= 0); pragma Assert(Res.ru_utime.tv_usec > 0 or else Res.ru_utime.tv_sec > 0); Put_Line("Test 0032 Passed."); end T0032;
Increase loop for FreeBSD test
Increase loop for FreeBSD test
Ada
lgpl-2.1
ve3wwg/adafpx,ve3wwg/adafpx
8548eca4d803a079f89ee0a0249108b48f800e74
src/asf-security.ads
src/asf-security.ads
----------------------------------------------------------------------- -- asf-security -- ASF Security -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not 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 EL.Functions; package ASF.Security is -- EL function name exposed by Set_Functions. HAS_PERMISSION_FN : constant String := "hasPermission"; -- URI for the EL functions exposed by the security package (See Set_Functions). AUTH_NAMESPACE_URI : constant String := "http://code.google.com/p/ada-asf/auth"; -- Register a set of functions in the namespace -- xmlns:fn="http://code.google.com/p/ada-asf/auth" -- Functions: -- hasPermission(NAME) -- Returns True if the permission NAME is granted procedure Set_Functions (Mapper : in out EL.Functions.Function_Mapper'Class); end ASF.Security;
----------------------------------------------------------------------- -- asf-security -- ASF Security -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not 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 EL.Functions; package ASF.Security is -- EL function name exposed by Set_Functions. HAS_PERMISSION_FN : constant String := "hasPermission"; -- URI for the EL functions exposed by the security package (See Set_Functions). AUTH_NAMESPACE_URI : constant String := "http://code.google.com/p/ada-asf/auth"; -- Register a set of functions in the namespace -- xmlns:fn="http://code.google.com/p/ada-asf/auth" -- Functions: -- hasPermission(NAME) -- Returns True if the permission NAME is granted procedure Set_Functions (Mapper : in out EL.Functions.Function_Mapper'Class); end ASF.Security;
Package ASF.Security moved to Servlet.Security
Package ASF.Security moved to Servlet.Security
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
6f371af13a8ba870eee9b1ad5c3b256adc39e763
awa/plugins/awa-blogs/src/awa-blogs.ads
awa/plugins/awa-blogs/src/awa-blogs.ads
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- @include blogs.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- == Ada Beans == -- @include blogs.xml -- -- == Queries == -- @include blog-admin-post-list.xml -- @include blog-post-list.xml -- @include blog-list.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
Add the specific queries and Ada beans in the documentation
Add the specific queries and Ada beans in the documentation
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
e9f4160d35e7a5cc739ee49b7040ae1091f9d007
awa/plugins/awa-blogs/src/awa-blogs.ads
awa/plugins/awa-blogs/src/awa-blogs.ads
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- @include blogs.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- == Ada Beans == -- @include blogs.xml -- -- == Queries == -- @include blog-admin-post-list.xml -- @include blog-post-list.xml -- @include blog-list.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
Add the specific queries and Ada beans in the documentation
Add the specific queries and Ada beans in the documentation
Ada
apache-2.0
tectronics/ada-awa,Letractively/ada-awa,Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa
2833042551b4031f930f280c89dbaf1695ec0359
awa/plugins/awa-storages/src/awa-storages.ads
awa/plugins/awa-storages/src/awa-storages.ads
----------------------------------------------------------------------- -- awa-storages -- Storage module -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not 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. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Storages</b> module provides a set of storage services allowing an application -- to store data files, documents, images in a persistent area. -- -- == Data Model == -- @include Storages.hbm.xml package AWA.Storages is end AWA.Storages;
----------------------------------------------------------------------- -- awa-storages -- Storage module -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not 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. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Storages</b> module provides a set of storage services allowing an application -- to store data files, documents, images in a persistent area. -- -- == Ada Beans == -- @include storages.xml -- -- == Data Model == -- @include Storages.hbm.xml package AWA.Storages is end AWA.Storages;
Add the Ada beans in the Storages plugin documentation
Add the Ada beans in the Storages plugin documentation
Ada
apache-2.0
Letractively/ada-awa,Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa
2efb5be733d8c5694781fd4c0e47520d141a1f41
tools/druss-commands-wifi.ads
tools/druss-commands-wifi.ads
----------------------------------------------------------------------- -- druss-commands-wifi -- Wifi related commands -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Wifi is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; -- Execute a command to control or get status about the Wifi. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Wifi;
----------------------------------------------------------------------- -- druss-commands-wifi -- Wifi related commands -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Wifi is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; -- Enable or disable with wifi radio. procedure Set_Enable (Command : in Command_Type; Args : in Argument_List'Class; Value : in String; Context : in out Context_Type); -- Execute the wifi 'status' command to print the Wifi current status. procedure Do_Status (Command : in Command_Type; Args : in Argument_List'Class; Context : in out Context_Type); -- Execute a command to control or get status about the Wifi. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Wifi;
Declare the Set_Enable and Do_Status operations
Declare the Set_Enable and Do_Status operations
Ada
apache-2.0
stcarrez/bbox-ada-api
9772acdb4718191e696148306a9a5e4b81382403
test/FrontendAda/negative_field_offset.adb
test/FrontendAda/negative_field_offset.adb
-- RUN: %llvmgcc -c %s with System; procedure Negative_Field_Offset (N : Integer) is type String_Pointer is access String; -- Force use of a thin pointer. for String_Pointer'Size use System.Word_Size; P : String_Pointer; begin P := new String (1 .. N); end;
-- RUN: %llvmgcc -c %s with System; procedure Negative_Field_Offset (N : Integer) is type String_Pointer is access String; -- Force use of a thin pointer. for String_Pointer'Size use System.Word_Size; P : String_Pointer; procedure Q (P : String_Pointer) is begin P (1) := 'Z'; end; begin P := new String (1 .. N); Q (P); end;
Check that accessing a struct field that occurs before the start of the struct (!) works correctly.
Check that accessing a struct field that occurs before the start of the struct (!) works correctly. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@84853 91177308-0d34-0410-b5e6-96231b3b80d8
Ada
bsd-2-clause
dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm
8418a148e1b87f0a87e6771384069b20b3ad4866
src/security.ads
src/security.ads
----------------------------------------------------------------------- -- security -- Security -- Copyright (C) 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- -- -- @include security-contexts.ads -- @include security-controllers.ads package Security is end Security;
----------------------------------------------------------------------- -- security -- Security -- Copyright (C) 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <tt>Security</tt> package provides security frameworks that allows -- an application to use OpenID or OAuth security frameworks. This security -- framework was first developed within the Ada Server Faces project. -- -- @include security-permissions.ads -- @include security-openid.ads -- @include security-oauth.ads -- @include security-contexts.ads -- @include security-controllers.ads package Security is end Security;
Add the permission in the documentation
Add the permission in the documentation
Ada
apache-2.0
Letractively/ada-security
0323d352d90970d5a86901fd42cf1cf0010eb12c
examples/usart_interruptive_echo/src/main.adb
examples/usart_interruptive_echo/src/main.adb
#if MCU="ATMEGA2560" then with AVR.USART; with AVR.INTERRUPTS; #end if; procedure Main is -- Out_Flag_Char : Character; begin #if MCU="ATMEGA2560" then AVR.INTERRUPTS.Disable; AVR.USART.Initialize (In_Port => AVR.USART.USART1, In_Setup => (Sync_Mode => AVR.USART.ASYNCHRONOUS, Double_Speed => True, Baud_Rate => 9600, Data_Bits => AVR.USART.BITS_8, Parity => AVR.USART.NONE, Stop_Bits => 1, Model => AVR.USART.INTERRUPTIVE)); AVR.USART.Put_Line (Port => AVR.USART.USART1, Data => "#### Initialization ok. ####"); AVR.INTERRUPTS.Enable; loop -- Out_Flag_Char := AVR.USART.Get; -- AVR.USART.Put -- (Port => AVR.USART.USART1, -- Data => Out_Flag_Char); null; end loop; #else null; #end if; end Main;
#if MCU="ATMEGA2560" then with AVR.USART; with AVR.INTERRUPTS; #end if; procedure Main is Counter : Long_Integer := 0; Out_Buffer : AVR.USART.Buffer_64_Type; begin #if MCU="ATMEGA2560" then AVR.INTERRUPTS.Disable; AVR.USART.Initialize (In_Port => AVR.USART.USART1, In_Setup => (Sync_Mode => AVR.USART.ASYNCHRONOUS, Double_Speed => True, Baud_Rate => 9600, Data_Bits => AVR.USART.BITS_8, Parity => AVR.USART.NONE, Stop_Bits => 1, Model => AVR.USART.INTERRUPTIVE)); AVR.USART.Put_Line (Port => AVR.USART.USART1, Data => "#### Initialization ok. ####"); AVR.INTERRUPTS.Enable; loop Counter := Counter + 1; if AVR.USART.Get_Raw_Buffer (In_Port => AVR.USART.USART1, Out_Data => Out_Buffer) then AVR.USART.Put_Buffer (In_Port => AVR.USART.USART1); end if; end loop; #else null; #end if; end Main;
Read from usart1 in interruptive mode.
Read from usart1 in interruptive mode.
Ada
mit
pvrego/adaino,pvrego/adaino
9c2ffadf3fb29c01739edc1509e3cb45a0dedd73
src/babel-base.ads
src/babel-base.ads
----------------------------------------------------------------------- -- babel-base -- File filters -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Babel.Base is end Babel.Base;
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
Define the abstract Database type to represent the database of backup files
Define the abstract Database type to represent the database of backup files
Ada
apache-2.0
stcarrez/babel
b8d99d444be9277ac70b052bc3f94fc20e4bcfe5
awa/awaunit/awa-tests-helpers.ads
awa/awaunit/awa-tests-helpers.ads
----------------------------------------------------------------------- -- awa-tests-helpers - Helpers for AWA unit tests -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Responses.Mockup; with Ada.Strings.Unbounded; package AWA.Tests.Helpers is -- Extract from the Location header the part that is after the given base string. -- If the Location header does not start with the base string, returns the empty -- string. function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return String; function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return Ada.Strings.Unbounded.Unbounded_String; end AWA.Tests.Helpers;
----------------------------------------------------------------------- -- awa-tests-helpers - Helpers for AWA unit tests -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Responses.Mockup; with Ada.Strings.Unbounded; package AWA.Tests.Helpers is -- Extract from the Location header the part that is after the given base string. -- If the Location header does not start with the base string, returns the empty -- string. function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return String; function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return Ada.Strings.Unbounded.Unbounded_String; -- Extract from the response content a link with a given title. function Extract_Link (Content : in String; Title : in String) return String; end AWA.Tests.Helpers;
Declare the Extract_Link function to extract a href from a HTML response
Declare the Extract_Link function to extract a href from a HTML response
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
74f4071f8cacf6671e0387d5beaa133e5b7a2927
src/asf-components-ajax-factory.ads
src/asf-components-ajax-factory.ads
----------------------------------------------------------------------- -- components-ajax-factory -- Factory for AJAX Components -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 ASF.Factory; package ASF.Components.Ajax.Factory is use ASF; -- Get the Ajax component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end ASF.Components.Ajax.Factory;
----------------------------------------------------------------------- -- components-ajax-factory -- Factory for AJAX Components -- Copyright (C) 2011, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 ASF.Factory; package ASF.Components.Ajax.Factory is -- Register the Ajax component factory. procedure Register (Factory : in out ASF.Factory.Component_Factory); end ASF.Components.Ajax.Factory;
Change the Definition function into a Register procedure
Change the Definition function into a Register procedure
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
a54ef28f1ba98cadc3572310adf2884a2aeb59c1
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); end AWA.Votes.Modules.Tests;
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); -- Test vote. procedure Test_Vote_Undo (T : in out Test); end AWA.Votes.Modules.Tests;
Add unit test for undo vote
Add unit test for undo vote
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
1a999614af4680bd7f6db1b7b5ba4bc669740872
mat/src/mat-targets.ads
mat/src/mat-targets.ads
----------------------------------------------------------------------- -- Targets - Representation of target information -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Types; with Ada.Strings.Unbounded; with MAT.Memory.Targets; with MAT.Readers; package MAT.Targets is type Target_Type is tagged limited private; type Target_Type_Access is access all Target_Type'Class; -- Initialize the target object to manage the memory slots, the stack frames -- and setup the reader to analyze the memory and other events. procedure Initialize (Target : in out Target_Type; Reader : in out MAT.Readers.Manager_Base'Class); private type Target_Type is tagged limited record Memory : MAT.Memory.Targets.Target_Memory; end record; end MAT.Targets;
----------------------------------------------------------------------- -- Targets - Representation of target information -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Types; with Ada.Strings.Unbounded; with MAT.Memory.Targets; with MAT.Symbols.Targets; with MAT.Readers; package MAT.Targets is -- type Target_Type is tagged limited private; type Target_Type is tagged limited record Memory : MAT.Memory.Targets.Target_Memory; Symbols : MAT.Symbols.Targets.Target_Symbols; end record; type Target_Type_Access is access all Target_Type'Class; -- Initialize the target object to manage the memory slots, the stack frames -- and setup the reader to analyze the memory and other events. procedure Initialize (Target : in out Target_Type; Reader : in out MAT.Readers.Manager_Base'Class); -- -- private -- -- type Target_Type is tagged limited record -- Memory : MAT.Memory.Targets.Target_Memory; -- end record; end MAT.Targets;
Add the symbols in the target object
Add the symbols in the target object
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
955ee4407f9d071729cf67278695300e06262722
regtests/util-streams-tests.ads
regtests/util-streams-tests.ads
----------------------------------------------------------------------- -- util-streams-tests -- Unit tests for encoding buffered streams -- Copyright (C) 2017, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with Util.Encoders.AES; package Util.Streams.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_AES (T : in out Test; Item : in String; Count : in Positive; Mode : in Util.Encoders.AES.AES_Mode; Label : in String); procedure Test_Base64_Stream (T : in out Test); end Util.Streams.Tests;
----------------------------------------------------------------------- -- util-streams-tests -- Unit tests for encoding buffered streams -- Copyright (C) 2017, 2019, 2021 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with Util.Encoders.AES; package Util.Streams.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_AES (T : in out Test; Item : in String; Count : in Positive; Mode : in Util.Encoders.AES.AES_Mode; Label : in String); procedure Test_Base64_Stream (T : in out Test); procedure Test_Copy_Stream (T : in out Test); end Util.Streams.Tests;
Declare the Test_Copy_Stream procedure to test the Util.Streams.Copy procedures
Declare the Test_Copy_Stream procedure to test the Util.Streams.Copy procedures
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
d603fd0bb2519543a4f128dde437863325ef1c66
awa/plugins/awa-counters/src/awa-counters-definition.ads
awa/plugins/awa-counters/src/awa-counters-definition.ads
----------------------------------------------------------------------- -- awa-counters-definition -- Counter definition -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition. generic Table : ADO.Schemas.Class_Mapping_Access; Field : String; package AWA.Counters.Definition is Def_Name : aliased constant String := Field; package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access)); -- Get the counter definition index. function Index return Counter_Index_Type renames Def.Kind; end AWA.Counters.Definition;
----------------------------------------------------------------------- -- awa-counters-definition -- Counter definition -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition. generic Table : ADO.Schemas.Class_Mapping_Access; Field : String; package AWA.Counters.Definition is Def_Name : aliased constant String := Field; -- Get the counter definition index. function Index return Counter_Index_Type; private package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access)); -- Get the counter definition index. function Index return Counter_Index_Type renames Def.Kind; end AWA.Counters.Definition;
Move the Counter_Arrays.Definition package instantiation in the private part
Move the Counter_Arrays.Definition package instantiation in the private part
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
44c319c4ab59e5dabc029a4f187256e6484f58d9
src/sqlite/ado-sqlite.adb
src/sqlite/ado-sqlite.adb
----------------------------------------------------------------------- -- ado-sqlite -- SQLite Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Sqlite; package body ADO.Sqlite is -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); ADO.Connections.Sqlite.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); ADO.Connections.Sqlite.Initialize; end Initialize; end ADO.Sqlite;
----------------------------------------------------------------------- -- ado-sqlite -- SQLite Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Sqlite; package body ADO.Sqlite is -- ------------------------------ -- Initialize the SQLite driver. -- ------------------------------ procedure Initialize is begin ADO.Connections.Sqlite.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; end ADO.Sqlite;
Implement the Initialize procedure and use it
Implement the Initialize procedure and use it
Ada
apache-2.0
stcarrez/ada-ado
8c5858c3859a982abaed7ea3b2aebe1e92667ad1
src/babel-base.ads
src/babel-base.ads
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; with Babel.Files; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; type Database_Access is access all Database'Class; -- Insert the file in the database. procedure Insert (Into : in out Database; File : in Babel.Files.File_Type) is abstract; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; with Babel.Files; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; type Database_Access is access all Database'Class; -- Insert the file in the database. procedure Insert (Into : in out Database; File : in Babel.Files.File_Type) is abstract; procedure Iterate (From : in Database; Process : not null access procedure (File : in Babel.Files.File_Type)) is abstract; procedure Copy (Into : in out Database'Class; From : in Database'Class); private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
Declare the Iterate and Copy procedures
Declare the Iterate and Copy procedures
Ada
apache-2.0
stcarrez/babel
ec9594bdf26c1d6a71b30dd376f746f0d3999a6f
src/gen-commands-model.ads
src/gen-commands-model.ads
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
ee209a391c4829f918c315179d01e778235a93c1
regtests/ado-schemas-tests.ads
regtests/ado-schemas-tests.ads
----------------------------------------------------------------------- -- schemas Tests -- Test loading of database schema -- Copyright (C) 2009, 2010, 2011, 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ADO.Schemas.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test reading the entity cache and the Find_Entity_Type operation procedure Test_Find_Entity_Type (T : in out Test); -- Test calling Find_Entity_Type with an invalid table. procedure Test_Find_Entity_Type_Error (T : in out Test); -- Test the Load_Schema operation and check the result schema. procedure Test_Load_Schema (T : in out Test); end ADO.Schemas.Tests;
----------------------------------------------------------------------- -- schemas Tests -- Test loading of database schema -- Copyright (C) 2009, 2010, 2011, 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ADO.Schemas.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test reading the entity cache and the Find_Entity_Type operation procedure Test_Find_Entity_Type (T : in out Test); -- Test calling Find_Entity_Type with an invalid table. procedure Test_Find_Entity_Type_Error (T : in out Test); -- Test the Load_Schema operation and check the result schema. procedure Test_Load_Schema (T : in out Test); -- Test the Table_Cursor operations and check the result schema. procedure Test_Table_Iterator (T : in out Test); end ADO.Schemas.Tests;
Declare Test_Table_Iterator procedure to test the table iterator
Declare Test_Table_Iterator procedure to test the table iterator
Ada
apache-2.0
stcarrez/ada-ado
ce0281f49c4ba2ddb05804df0431a5489107284d
src/asf-streams-json.adb
src/asf-streams-json.adb
----------------------------------------------------------------------- -- asf-streams-json -- JSON Print streams for servlets -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Serialize.IO.JSON; package body ASF.Streams.JSON is -- ------------------------------ -- Initialize the stream -- ------------------------------ procedure Initialize (Stream : in out Print_Stream; To : in ASF.Streams.Print_Stream'Class) is begin Stream.Initialize (To.Target); end Initialize; end ASF.Streams.JSON;
----------------------------------------------------------------------- -- asf-streams-json -- JSON Print streams for servlets -- Copyright (C) 2016, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body ASF.Streams.JSON is -- ------------------------------ -- Initialize the stream -- ------------------------------ procedure Initialize (Stream : in out Print_Stream; To : in ASF.Streams.Print_Stream'Class) is begin Stream.Initialize (To.Target); end Initialize; end ASF.Streams.JSON;
Remove unused with clause Util.Serialize.IO.JSON
Remove unused with clause Util.Serialize.IO.JSON
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
6b2e3a8e9276050f46a5425823a8ed39f3747f91
tools/druss-config.ads
tools/druss-config.ads
----------------------------------------------------------------------- -- druss-config -- Configuration management for Druss -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Properties; with Druss.Gateways; package Druss.Config is -- Initialize the configuration. procedure Initialize; -- Get the configuration parameter. function Get (Name : in String) return String; -- Initalize the list of gateways from the configuration file. procedure Get_Gateways (List : in out Druss.Gateways.Gateway_Vector); end Druss.Config;
----------------------------------------------------------------------- -- druss-config -- Configuration management for Druss -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Druss.Gateways; package Druss.Config is -- Initialize the configuration. procedure Initialize (Path : in String); -- Get the configuration parameter. function Get (Name : in String) return String; -- Initalize the list of gateways from the configuration file. procedure Get_Gateways (List : in out Druss.Gateways.Gateway_Vector); end Druss.Config;
Add a Path parameter to the Initialize procedure
Add a Path parameter to the Initialize procedure
Ada
apache-2.0
stcarrez/bbox-ada-api
0c030d1de447711c6b0636f64d8dfc65ed35babb
src/gen-commands-database.ads
src/gen-commands-database.ads
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
de321942df923f89366c4b60d58036d939cd7e06
orka/src/orka/interface/orka-atomics.ads
orka/src/orka/interface/orka-atomics.ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <denkpadje@gmail.com> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/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 Orka.Atomics is pragma Pure; protected type Counter (Initial_Value : Natural) is procedure Add (Addition : Natural); procedure Increment; procedure Decrement (Zero : out Boolean); procedure Reset; function Count return Natural; private Value : Natural := Initial_Value; end Counter; end Orka.Atomics;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <denkpadje@gmail.com> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/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 Orka.Atomics is pragma Pure; protected type Counter (Initial_Value : Natural) is pragma Lock_Free; procedure Add (Addition : Natural); procedure Increment; procedure Decrement (Zero : out Boolean); procedure Reset; function Count return Natural; private Value : Natural := Initial_Value; end Counter; end Orka.Atomics;
Make protected type Counter lock free
orka: Make protected type Counter lock free Signed-off-by: onox <34c1d3d2d1347bea60a26f46574de21a7a79b6d5@gmail.com>
Ada
apache-2.0
onox/orka
aa02552f0c12d01ba0b9e63ca22d6d562611a000
src/gen-commands-propset.ads
src/gen-commands-propset.ads
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
Update to use an in out parameter for Help procedure
Update to use an in out parameter for Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
26e68a922285d96b523d6d265e3b32b7f7e1a99d
src/wiki-parsers-markdown.ads
src/wiki-parsers-markdown.ads
----------------------------------------------------------------------- -- wiki-parsers-markdown -- Markdown parser operations -- Copyright (C) 2016 - 2022 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- private package Wiki.Parsers.Markdown is pragma Preelaborate; subtype Parser_Type is Parser; -- Parse a markdown table/column. -- Example: -- | col1 | col2 | ... | colN | procedure Parse_Table (P : in out Parser; Token : in Wiki.Strings.WChar); procedure Parse_Line (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); procedure Parse_Inline_Text (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); end Wiki.Parsers.Markdown;
----------------------------------------------------------------------- -- wiki-parsers-markdown -- Markdown parser operations -- Copyright (C) 2016 - 2022 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- private package Wiki.Parsers.Markdown is pragma Preelaborate; subtype Parser_Type is Parser; procedure Parse_Line (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); procedure Parse_Inline_Text (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); end Wiki.Parsers.Markdown;
Remove declaration of internal Parse_Table procedure
Remove declaration of internal Parse_Table procedure
Ada
apache-2.0
stcarrez/ada-wiki,stcarrez/ada-wiki
6818a85e4d41cb6d11aa9bdd1ef06b15f5f03b44
src/gen-commands-generate.ads
src/gen-commands-generate.ads
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
ad2daf98cb80fb425c86a4927ea73ce16b752333
src/wiki-helpers-parser.ads
src/wiki-helpers-parser.ads
----------------------------------------------------------------------- -- wiki-helpers-parser -- Generic procedure for the wiki parser -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Wiki.Strings; with Wiki.Documents; with Wiki.Streams; generic type Engine_Type is limited private; type Element_Type is limited private; with function Element (Item : in Element_Type; Pos : in Natural) return Wiki.Strings.WChar is <>; with function Length (Item : in Element_Type) return Natural is <>; with procedure Parse (Engine : in out Engine_Type; Stream : in Wiki.Streams.Input_Stream_Access; Doc : in out Wiki.Documents.Document) is <>; procedure Wiki.Helpers.Parser (Engine : in out Engine_Type; Content : in Element_Type; Doc : in out Wiki.Documents.Document); pragma Preelaborate (Wiki.Helpers.Parser);
----------------------------------------------------------------------- -- wiki-helpers-parser -- Generic procedure for the wiki parser -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Wiki.Strings; with Wiki.Documents; with Wiki.Streams; generic type Engine_Type is limited private; type Element_Type (<>) is limited private; with procedure Element (Item : in Element_Type; Pos : in out Natural; Char : out Wiki.Strings.WChar) is <>; with function Length (Item : in Element_Type) return Natural is <>; with procedure Parse (Engine : in out Engine_Type; Stream : in Wiki.Streams.Input_Stream_Access; Doc : in out Wiki.Documents.Document) is <>; procedure Wiki.Helpers.Parser (Engine : in out Engine_Type; Content : in Element_Type; Doc : in out Wiki.Documents.Document); pragma Preelaborate (Wiki.Helpers.Parser);
Change the Element operation to a procedure that gets and updates the position
Change the Element operation to a procedure that gets and updates the position
Ada
apache-2.0
stcarrez/ada-wiki,stcarrez/ada-wiki
1bf422dc6949d3fdf4a63040b9be0af2d92ce86e
ARM/STMicro/STM32/components/lcd/rortech_stm32f7disco/stm32-lcd.ads
ARM/STMicro/STM32/components/lcd/rortech_stm32f7disco/stm32-lcd.ads
with STM32.LTDC; with STM32.LCDInit; package STM32.LCD is new STM32.LTDC (LCD_Width => 480, LCD_Height => 272, LCD_HSync => 41, LCD_HBP => 13, LCD_HFP => 32, LCD_VSYNC => 10, LCD_VBP => 2, LCD_VFP => 2, PLLSAI_N => 429, PLLSAI_R => 5, DivR => 2, Pre_LTDC_Initialize => STM32.LCDInit.Initialize, Post_LTDC_Initialize => STM32.LCDInit.Post_Init);
with STM32.LTDC; with STM32.LCDInit; package STM32.LCD is new STM32.LTDC (LCD_Width => 480, LCD_Height => 272, LCD_HSync => 41, LCD_HBP => 13, LCD_HFP => 32, LCD_VSYNC => 10, LCD_VBP => 2, LCD_VFP => 2, PLLSAI_N => 200, PLLSAI_R => 5, DivR => 2, Pre_LTDC_Initialize => STM32.LCDInit.Initialize, Post_LTDC_Initialize => STM32.LCDInit.Post_Init);
Fix LCD too slow on the STM32F7-Disco.
Fix LCD too slow on the STM32F7-Disco.
Ada
bsd-3-clause
lambourg/Ada_Drivers_Library,AdaCore/Ada_Drivers_Library,Fabien-Chouteau/Ada_Drivers_Library,Fabien-Chouteau/Ada_Drivers_Library,simonjwright/Ada_Drivers_Library,AdaCore/Ada_Drivers_Library,ellamosi/Ada_BMP_Library,simonjwright/Ada_Drivers_Library
b68c3779eb4d9f2043bb97e60fa34ca4e9a215c5
src/asf-helpers-beans.ads
src/asf-helpers-beans.ads
----------------------------------------------------------------------- -- asf-helpers-beans -- Helper packages to write ASF applications -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not 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.Beans.Basic; package ASF.Helpers.Beans is -- Get a bean instance associated under the given name from the current faces context. -- A null value is returned if the bean does not exist or is not of the good type. generic type Element_Type is new Util.Beans.Basic.Readonly_Bean with private; type Element_Access is access all Element_Type'Class; function Get_Bean (Name : in String) return Element_Access; end ASF.Helpers.Beans;
----------------------------------------------------------------------- -- asf-helpers-beans -- Helper packages to write ASF applications -- Copyright (C) 2012, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Beans.Basic; with ASF.Requests; package ASF.Helpers.Beans is -- Get a bean instance associated under the given name from the current faces context. -- A null value is returned if the bean does not exist or is not of the good type. generic type Element_Type is new Util.Beans.Basic.Readonly_Bean with private; type Element_Access is access all Element_Type'Class; function Get_Bean (Name : in String) return Element_Access; -- Get a bean instance associated under the given name from the request. -- A null value is returned if the bean does not exist or is not of the good type. generic type Element_Type is new Util.Beans.Basic.Readonly_Bean with private; type Element_Access is access all Element_Type'Class; function Get_Request_Bean (Request : in ASF.Requests.Request'Class; Name : in String) return Element_Access; end ASF.Helpers.Beans;
Declare the Get_Request_Bean generic function
Declare the Get_Request_Bean generic function
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
431d39042769bfb6005b2b9ea0350bb3982b4dac
src/gen-commands-layout.ads
src/gen-commands-layout.ads
----------------------------------------------------------------------- -- gen-commands-layout -- Layout creation command for dynamo -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Layout is -- ------------------------------ -- Layout Creation Command -- ------------------------------ -- This command adds a XHTML layout to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Layout;
----------------------------------------------------------------------- -- gen-commands-layout -- Layout creation command for dynamo -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Layout is -- ------------------------------ -- Layout Creation Command -- ------------------------------ -- This command adds a XHTML layout to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Layout;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
15592ccd524fe7003ddea8f74285b424cc1f8f66
src/gen-commands-plugins.ads
src/gen-commands-plugins.ads
----------------------------------------------------------------------- -- gen-commands-plugins -- Plugin creation and management commands for dynamo -- Copyright (C) 2012, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Plugins is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Plugins;
----------------------------------------------------------------------- -- gen-commands-plugins -- Plugin creation and management commands for dynamo -- Copyright (C) 2012, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Plugins is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Plugins;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
bcffe2bfc9a85fadcfd69015b3f2b56b33228c45
src/babel-base.ads
src/babel-base.ads
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; with Babel.Files; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; -- Insert the file in the database. procedure Insert (Into : in out Database; File : in Babel.Files.File_Type) is abstract; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
Define the Insert operation on the Database abstract type
Define the Insert operation on the Database abstract type
Ada
apache-2.0
stcarrez/babel
2e6b5e880fe1f45d39331661543dae568a3f613e
tools/druss-commands-ping.ads
tools/druss-commands-ping.ads
----------------------------------------------------------------------- -- druss-commands-ping -- Ping devices from the gateway -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Ping is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_Ping (Command : in Command_Type; Args : in Argument_List'Class; Context : in out Context_Type); -- Execute a ping from the gateway to each device. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Ping;
----------------------------------------------------------------------- -- druss-commands-ping -- Ping devices from the gateway -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Ping is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_Ping (Command : in Command_Type; Args : in Argument_List'Class; Selector : in Device_Selector_Type; Context : in out Context_Type); -- Execute a ping from the gateway to each device. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Ping;
Add a device selector to the Do_Ping procedure
Add a device selector to the Do_Ping procedure
Ada
apache-2.0
stcarrez/bbox-ada-api
f2c66ba99bd0dc5aaf84b5764b59b24e6f5486f4
src/gen-commands-generate.ads
src/gen-commands-generate.ads
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
f1549e07ad371d50186db25711292fc3fb7d1803
src/gen-commands-model.ads
src/gen-commands-model.ads
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
37917bb9370ede46abcb209ab7235462d3a90875
lumen.ads
lumen.ads
-- Lumen -- A simple graphical user interface library based on OpenGL -- -- Chip Richards, NiEstu, Phoenix AZ, Spring 2010 -- Lumen would not be possible without the support and contributions of a cast -- of thousands, including and primarily Rod Kay. -- This code is covered by the ISC License: -- -- Copyright (c) 2010, NiEstu -- -- 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 Lumen is pragma Pure (Lumen); end Lumen;
-- Lumen -- A simple graphical user interface library based on OpenGL -- -- Chip Richards, NiEstu, Phoenix AZ, Spring 2010 -- Lumen would not be possible without the support and contributions of a cast -- of thousands, including and primarily Rod Kay. -- This code is covered by the ISC License: -- -- Copyright (c) 2010, NiEstu -- -- 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 Lumen is pragma Pure (Lumen); end Lumen;
Change license text to mixed case instead of SHOUTING it
Change license text to mixed case instead of SHOUTING it
Ada
isc
darkestkhan/lumen2,darkestkhan/lumen
b92bccd7ab3b96d73c78b48966ad152cf9aa628d
src/asf-components-html-factory.ads
src/asf-components-html-factory.ads
----------------------------------------------------------------------- -- html-factory -- Factory for HTML UI Components -- Copyright (C) 2009, 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Html.Factory is use ASF; -- Get the HTML component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end ASF.Components.Html.Factory;
----------------------------------------------------------------------- -- html-factory -- Factory for HTML UI Components -- Copyright (C) 2009, 2010, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 ASF.Factory; package ASF.Components.Html.Factory is -- Register the HTML component factory. procedure Register (Factory : in out ASF.Factory.Component_Factory); end ASF.Components.Html.Factory;
Change the Definition function into a Register procedure
Change the Definition function into a Register procedure
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
1f75cb5f92bd5ed8b546955ba065ef30d8531ef7
src/sys/os-win32/util-systems-constants.ads
src/sys/os-win32/util-systems-constants.ads
-- Generated by utildgen.c from system includes with Interfaces.C; package Util.Systems.Constants is pragma Pure; -- Flags used when opening a file with open/creat. O_RDONLY : constant Interfaces.C.int := 8#000000#; O_WRONLY : constant Interfaces.C.int := 8#000001#; O_RDWR : constant Interfaces.C.int := 8#000002#; O_CREAT : constant Interfaces.C.int := 8#000400#; O_EXCL : constant Interfaces.C.int := 8#002000#; O_TRUNC : constant Interfaces.C.int := 8#001000#; O_APPEND : constant Interfaces.C.int := 8#000010#; DLL_OPTIONS : constant String := ""; SYMBOL_PREFIX : constant String := ""; end Util.Systems.Constants;
-- Generated by utildgen.c from system includes with Interfaces.C; package Util.Systems.Constants is pragma Pure; -- Flags used when opening a file with open/creat. O_RDONLY : constant Interfaces.C.int := 8#000000#; O_WRONLY : constant Interfaces.C.int := 8#000001#; O_RDWR : constant Interfaces.C.int := 8#000002#; O_CREAT : constant Interfaces.C.int := 8#000400#; O_EXCL : constant Interfaces.C.int := 8#002000#; O_TRUNC : constant Interfaces.C.int := 8#001000#; O_APPEND : constant Interfaces.C.int := 8#000010#; O_CLOEXEC : constant Interfaces.C.int := 0; O_SYNC : constant Interfaces.C.int := 0; O_DIRECT : constant Interfaces.C.int := 0; DLL_OPTIONS : constant String := ""; SYMBOL_PREFIX : constant String := ""; end Util.Systems.Constants;
Fix O_CLOEXEC undefined in keystore-io-files.adb (win32)
Fix O_CLOEXEC undefined in keystore-io-files.adb (win32)
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
ec084716b9199c3b823ecbec044a841f2baa5c2d
src/util-dates-iso8601.ads
src/util-dates-iso8601.ads
----------------------------------------------------------------------- -- util-dates-iso8601 -- ISO8601 dates -- Copyright (C) 2011, 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Dates.ISO8601 is -- Parses an ISO8601 date and return it as a calendar time. -- Raises Constraint_Error if the date format is not recognized. function Value (Date : in String) return Ada.Calendar.Time; -- Return the ISO8601 date. function Image (Date : in Ada.Calendar.Time) return String; function Image (Date : in Date_Record) return String; end Util.Dates.ISO8601;
----------------------------------------------------------------------- -- util-dates-iso8601 -- ISO8601 dates -- Copyright (C) 2011, 2013, 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Dates.ISO8601 is type Precision_Type is (YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, SUBSECOND); -- Parses an ISO8601 date and return it as a calendar time. -- Raises Constraint_Error if the date format is not recognized. function Value (Date : in String) return Ada.Calendar.Time; -- Return the ISO8601 date. function Image (Date : in Ada.Calendar.Time) return String; function Image (Date : in Date_Record) return String; function Image (Date : in Ada.Calendar.Time; Precision : in Precision_Type) return String; function Image (Date : in Date_Record; Precision : in Precision_Type) return String; end Util.Dates.ISO8601;
Declare Precision_Type enumeration Declare new Image function
Declare Precision_Type enumeration Declare new Image function
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
7e0a6f0575cc39219eacd23c2f58f084530e4466
awa/src/awa.ads
awa/src/awa.ads
----------------------------------------------------------------------- -- awa -- Ada Web Application -- Copyright (C) 2009 - 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- = AWA Core == -- -- @include awa-applications.ads -- @include awa-modules.ads -- @include awa-permissions.ads -- @include awa-events.ads -- @include awa.xml package AWA is pragma Pure; end AWA;
----------------------------------------------------------------------- -- awa -- Ada Web Application -- Copyright (C) 2009 - 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- = AWA Core == -- -- @include awa-applications.ads -- @include awa-modules.ads -- @include awa-permissions.ads -- @include awa-events.ads -- @include awa-commands.ads -- @include awa.xml package AWA is pragma Pure; end AWA;
Include the AWA commands documentation
Include the AWA commands documentation
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
58868546577bd497edaa337d1d0a59c7bda8a408
src/util-events.ads
src/util-events.ads
----------------------------------------------------------------------- -- util-events -- Events -- Copyright (C) 2001, 2002, 2003, 2009, 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Events is type Event is tagged private; -- Get the time identifying when the event was created. function Get_Time (Ev : Event) return Ada.Calendar.Time; type Event_Listener is limited interface; private type Event is tagged record Date : Ada.Calendar.Time := Ada.Calendar.Clock; end record; end Util.Events;
----------------------------------------------------------------------- -- util-events -- Events -- Copyright (C) 2001, 2002, 2003, 2009, 2010, 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Events is type Event is tagged limited private; -- Get the time identifying when the event was created. function Get_Time (Ev : Event) return Ada.Calendar.Time; type Event_Listener is limited interface; private type Event is tagged limited record Date : Ada.Calendar.Time := Ada.Calendar.Clock; end record; end Util.Events;
Change the Event type to a limited type
Change the Event type to a limited type
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
926364568a81d03a08a83fdf83d1e442e657c176
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); end AWA.Votes.Modules.Tests;
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); -- Test vote. procedure Test_Vote_Undo (T : in out Test); end AWA.Votes.Modules.Tests;
Add unit test for undo vote
Add unit test for undo vote
Ada
apache-2.0
tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa
e7d02a1cc2114950c4a4c4e6fe6620879c395bd9
src/asf-components-core-factory.ads
src/asf-components-core-factory.ads
----------------------------------------------------------------------- -- core-factory -- Factory for UI Core Components -- Copyright (C) 2009, 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Core.Factory is use ASF; -- Get the Core component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end ASF.Components.Core.Factory;
----------------------------------------------------------------------- -- core-factory -- Factory for UI Core Components -- Copyright (C) 2009, 2010, 2018 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 ASF.Factory; package ASF.Components.Core.Factory is -- Register the Core component factory. procedure Register (Factory : in out ASF.Factory.Component_Factory); end ASF.Components.Core.Factory;
Change the Definition function into a Register procedure
Change the Definition function into a Register procedure
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
4f069f1ea3979f0b4bed3f91fb2134724e206f65
regtests/util-serialize-io-json-tests.ads
regtests/util-serialize-io-json-tests.ads
----------------------------------------------------------------------- -- serialize-io-json-tests -- Unit tests for JSON parser -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Serialize.IO.JSON.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_Parse_Error (T : in out Test); procedure Test_Parser (T : in out Test); end Util.Serialize.IO.JSON.Tests;
----------------------------------------------------------------------- -- serialize-io-json-tests -- Unit tests for JSON parser -- Copyright (C) 2011, 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Serialize.IO.JSON.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_Parse_Error (T : in out Test); procedure Test_Parser (T : in out Test); -- Generate some output stream for the test. procedure Write_Stream (Stream : in out Util.Serialize.IO.Output_Stream'Class); -- Test the JSON output stream generation. procedure Test_Output (T : in out Test); end Util.Serialize.IO.JSON.Tests;
Declare Test_Output and Write_Stream procedures
Declare Test_Output and Write_Stream procedures
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
b474166df879b452873d9e50e9292498b7ba711f
mat/src/matp.adb
mat/src/matp.adb
----------------------------------------------------------------------- -- mat-types -- Global types -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.IO_Exceptions; with MAT.Commands; with MAT.Targets; with MAT.Consoles.Text; with MAT.Readers.Streams.Sockets; procedure Matp is Target : MAT.Targets.Target_Type; Console : aliased MAT.Consoles.Text.Console_Type; Server : MAT.Readers.Streams.Sockets.Socket_Listener_Type; begin Target.Console (Console'Unchecked_Access); Target.Initialize_Options; MAT.Commands.Initialize_Files (Target); Server.Start (Options.Address); MAT.Commands.Interactive (Target); Server.Stop; exception when Ada.IO_Exceptions.End_Error | MAT.Targets.Usage_Error => Server.Stop; end Matp;
----------------------------------------------------------------------- -- mat-types -- Global types -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.IO_Exceptions; with MAT.Commands; with MAT.Targets; with MAT.Consoles.Text; with MAT.Readers.Streams.Sockets; procedure Matp is Target : MAT.Targets.Target_Type; Console : aliased MAT.Consoles.Text.Console_Type; Server : MAT.Readers.Streams.Sockets.Socket_Listener_Type; begin Target.Console (Console'Unchecked_Access); Target.Initialize_Options; MAT.Commands.Initialize_Files (Target); Target.Start; MAT.Commands.Interactive (Target); Server.Stop; exception when Ada.IO_Exceptions.End_Error | MAT.Targets.Usage_Error => Server.Stop; end Matp;
Update to call the target Start procedure
Update to call the target Start procedure
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
f62527203709bd722a16c19bfa579322cb33ad3d
awa/plugins/awa-questions/regtests/awa-questions-services-tests.ads
awa/plugins/awa-questions/regtests/awa-questions-services-tests.ads
----------------------------------------------------------------------- -- awa-questions-services-tests -- Unit tests for question service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Questions.Services.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Questions.Services.Question_Service_Access; end record; -- Test creation of a question. procedure Test_Create_Question (T : in out Test); -- Test list of questions. procedure Test_List_Questions (T : in out Test); end AWA.Questions.Services.Tests;
----------------------------------------------------------------------- -- awa-questions-services-tests -- Unit tests for question service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Questions.Services.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Questions.Services.Question_Service_Access; end record; -- Test creation of a question. procedure Test_Create_Question (T : in out Test); -- Test list of questions. procedure Test_List_Questions (T : in out Test); -- Test anonymous user voting for a question. procedure Test_Question_Vote_Anonymous (T : in out Test); -- Test voting for a question. procedure Test_Question_Vote (T : in out Test); private -- Do a vote on a question through the question vote bean. procedure Do_Vote (T : in out Test); end AWA.Questions.Services.Tests;
Add unit tests for the questionVote bean
Add unit tests for the questionVote bean
Ada
apache-2.0
Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa
b6b6d68814fc5833de259c95dc5979112a3646b8
mat/regtests/mat-testsuite.adb
mat/regtests/mat-testsuite.adb
----------------------------------------------------------------------- -- mat-testsuite - MAT Testsuite -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Readers.Tests; with MAT.Targets.Tests; package body MAT.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Result : constant Util.Tests.Access_Test_Suite := Tests'Access; begin MAT.Readers.Tests.Add_Tests (Result); MAT.Targets.Tests.Add_Tests (Result); return Result; end Suite; end MAT.Testsuite;
----------------------------------------------------------------------- -- mat-testsuite - MAT Testsuite -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Readers.Tests; with MAT.Targets.Tests; with MAT.Frames.Tests; package body MAT.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Result : constant Util.Tests.Access_Test_Suite := Tests'Access; begin MAT.Frames.Tests.Add_Tests (Result); MAT.Readers.Tests.Add_Tests (Result); MAT.Targets.Tests.Add_Tests (Result); return Result; end Suite; end MAT.Testsuite;
Add the stack frames unit tests
Add the stack frames unit tests
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
edaaf48ed03608b6cc9d348b9f184b8cbb0addb2
mat/src/gtk/mat-targets-gtkmat.ads
mat/src/gtk/mat-targets-gtkmat.ads
----------------------------------------------------------------------- -- mat-targets-gtkmat - Gtk target management -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Gtk.Widget; with Gtkada.Builder; package MAT.Targets.Gtkmat is type Target_Type is new MAT.Targets.Target_Type with private; -- Initialize the widgets and create the Gtk gui. procedure Initialize_Widget (Target : in out Target_Type; Widget : out Gtk.Widget.Gtk_Widget); -- Create a process instance to hold and keep track of memory and other information about -- the given process ID. overriding procedure Create_Process (Target : in out Target_Type; Pid : in MAT.Types.Target_Process_Ref; Path : in Ada.Strings.Unbounded.Unbounded_String; Process : out Target_Process_Type_Access); private type Target_Type is new MAT.Targets.Target_Type with record Builder : Gtkada.Builder.Gtkada_Builder; end record; end MAT.Targets.Gtkmat;
Define a targets package for the Gtk UI
Define a targets package for the Gtk UI
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
84123815e19f71efe25504cfcbad0e4f6f9a9543
regtests/ado-datasets-tests.adb
regtests/ado-datasets-tests.adb
----------------------------------------------------------------------- -- ado-datasets-tests -- Test executing queries and using datasets -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Test_Caller; with Util.Properties; with Regtests.Simple.Model; with ADO.Queries.Loaders; package body ADO.Datasets.Tests is package Caller is new Util.Test_Caller (Test, "ADO.Datasets"); package User_List_Query_File is new ADO.Queries.Loaders.File (Path => "regtests/files/user-list.xml", Sha1 => ""); package User_List_Query is new ADO.Queries.Loaders.Query (Name => "user-list", File => User_List_Query_File.File'Access); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test ADO.Datasets.List", Test_List'Access); end Add_Tests; procedure Test_List (T : in out Test) is DB : ADO.Sessions.Master_Session := Regtests.Get_Master_Database; Query : ADO.Queries.Context; Data : ADO.Datasets.Dataset; Props : constant Util.Properties.Manager := Util.Tests.Get_Properties; begin -- Configure the XML query loader. ADO.Queries.Loaders.Initialize (Props.Get ("ado.queries.paths", ".;db"), Props.Get ("ado.queries.load", "false") = "true"); for I in 1 .. 100 loop declare User : Regtests.Simple.Model.User_Ref; begin User.Set_Name ("John " & Integer'Image (I)); User.Set_Select_Name ("test-list"); User.Set_Value (ADO.Identifier (I)); User.Save (DB); end; end loop; DB.Commit; Query.Set_Query (User_List_Query.Query'Access); Query.Bind_Param ("filter", String '("test-list")); ADO.Datasets.List (Data, DB, Query); Util.Tests.Assert_Equals (T, 100, Data.Get_Count, "Invalid dataset size"); end Test_List; end ADO.Datasets.Tests;
Implement the unit test on datasets
Implement the unit test on datasets
Ada
apache-2.0
Letractively/ada-ado
8100b19dd2b2ab4959f75774ee95064c268bb3d7
src/babel-files-queues.adb
src/babel-files-queues.adb
----------------------------------------------------------------------- -- babel-files-queues -- File and directory queues -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Ada.Calendar; with Ada.Directories; with Ada.Containers.Vectors; with Util.Encoders.SHA1; with Util.Concurrent.Fifos; with Util.Strings.Vectors; with ADO; with Babel.Base.Models; package body Babel.Files.Queues is -- ------------------------------ -- Returns true if there is a directory in the queue. -- ------------------------------ function Has_Directory (Queue : in Directory_Queue) return Boolean is begin return not Queue.Directories.Is_Empty; end Has_Directory; -- ------------------------------ -- Get the next directory from the queue. -- ------------------------------ procedure Peek_Directory (Queue : in out Directory_Queue; Directory : out Directory_Type) is begin Directory := Queue.Directories.Last_Element; Queue.Directories.Delete_Last; end Peek_Directory; end Babel.Files.Queues;
Implement the Has_Directory and Peek_Directory operation for the Directory_Queue
Implement the Has_Directory and Peek_Directory operation for the Directory_Queue
Ada
apache-2.0
stcarrez/babel
fb0065f3a78757517efd34e11c09a3b6481df38d
src/wiki-helpers-parser.adb
src/wiki-helpers-parser.adb
----------------------------------------------------------------------- -- wiki-helpers-parser -- Generic procedure for the wiki parser -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Wiki.Helpers; with Wiki.Streams; procedure Wiki.Helpers.Parser (Engine : in out Engine_Type; Content : in Element_Type; Doc : in out Wiki.Documents.Document) is use type Wiki.Streams.Input_Stream_Access; type Wide_Input is new Wiki.Streams.Input_Stream with record Pos : Positive; Len : Natural; end record; overriding procedure Read (Buf : in out Wide_Input; Token : out Wiki.Strings.WChar; Is_Eof : out Boolean); procedure Read (Buf : in out Wide_Input; Token : out Wiki.Strings.WChar; Is_Eof : out Boolean) is begin if Buf.Pos > Buf.Len then Is_Eof := True; Token := Wiki.Helpers.CR; else Token := Element (Content, Buf.Pos); Buf.Pos := Buf.Pos + 1; Is_Eof := False; end if; end Read; Buffer : aliased Wide_Input; begin Buffer.Pos := 1; Buffer.Len := Length (Content); Parse (Engine, Buffer'Unchecked_Access, Doc); end Wiki.Helpers.Parser;
Implement the generic procedure Wiki.Helpers.Parser to allow easily provide a Parser with various content types
Implement the generic procedure Wiki.Helpers.Parser to allow easily provide a Parser with various content types
Ada
apache-2.0
stcarrez/ada-wiki,stcarrez/ada-wiki
4cb8bf1cae8997eeee3dde138a2579c1e1bd7d80
awa/plugins/awa-counters/src/awa-counters-components.ads
awa/plugins/awa-counters/src/awa-counters-components.ads
----------------------------------------------------------------------- -- awa-counters-components -- Counter UI component -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 ASF.Factory; with ASF.Contexts.Faces; with ASF.Components.Html; -- == Counter Component == -- package AWA.Counters.Components is type UICounter is new ASF.Components.Html.UIHtmlComponent with private; -- Render the counter component. Starts the DL/DD list and write the input -- component with the possible associated error message. overriding procedure Encode_Begin (UI : in UICounter; Context : in out ASF.Contexts.Faces.Faces_Context'Class); -- Get the AWA Counter component factory. function Definition return ASF.Factory.Factory_Bindings_Access; private type UICounter is new ASF.Components.Html.UIHtmlComponent with null record; end AWA.Counters.Components;
Change the UICounter to use the UIHtmlComponent base type
Change the UICounter to use the UIHtmlComponent base type
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
4a1aa56936cf5b0f32f33fd6d51002b0285171db
src/asis/a4g-itests.ads
src/asis/a4g-itests.ads
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- -- -- -- A 4 G . I T E S T S -- -- -- -- S p e c -- -- -- -- Copyright (c) 1995-1999, Free Software Foundation, Inc. -- -- -- -- ASIS-for-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 -- -- Software Foundation; either version 2, or (at your option) any later -- -- version. ASIS-for-GNAT is distributed in the hope that it will be use- -- -- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- -- -- CHANTABILITY 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 ASIS-for-GNAT; see file -- -- COPYING. If not, write to the Free Software Foundation, 59 Temple Place -- -- - Suite 330, Boston, MA 02111-1307, USA. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the -- -- Software Engineering Laboratory of the Swiss Federal Institute of -- -- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the -- -- Scientific Research Computer Center of Moscow State University (SRCC -- -- MSU), Russia, with funding partially provided by grants from the Swiss -- -- National Science Foundation and the Swiss Academy of Engineering -- -- Sciences. ASIS-for-GNAT is now maintained by Ada Core Technologies Inc -- -- (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ -- This package defines tests for defining if an Element based on the -- given node should test Is_Implicit, Is_Inherited and Is_From_Instance with Types; use Types; package A4G.Itests is function Is_Inherited_Discriminant (N : Node_Id) return Boolean; -- Tests if N corresponds to the defining occurrence of an inherited -- discriminant. N should be of N_Defining_Identifier kind -- -- INCOMPLETE and INRELIABLE for now! function Is_From_Instance (N : Node_Id) return Boolean; -- Tests if N corresponds to an implicit or explicit construction from -- the result of some generic instantiation (that is, from an expanded -- generic template) end A4G.Itests;
Add the ASIS file $i
Add the ASIS file $i
Ada
apache-2.0
Letractively/ada-gen,Letractively/ada-gen,Letractively/ada-gen,Letractively/ada-gen
455313528c5043594b74c35289d782fc17a32af2
src/wiki-streams-html-stream.ads
src/wiki-streams-html-stream.ads
----------------------------------------------------------------------- -- wiki-streams-html-stream -- Generic Wiki HTML output stream -- Copyright (C) 2016, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Wiki.Strings; generic type Output_Stream is limited new Wiki.Streams.Output_Stream with private; package Wiki.Streams.Html.Stream is type Html_Output_Stream is limited new Output_Stream and Html.Html_Output_Stream with private; -- Write an XML attribute within an XML element. -- The attribute value is escaped according to the XML escape rules. overriding procedure Write_Wide_Attribute (Stream : in out Html_Output_Stream; Name : in String; Content : in Wiki.Strings.UString); -- Write an XML attribute within an XML element. -- The attribute value is escaped according to the XML escape rules. overriding procedure Write_Wide_Attribute (Stream : in out Html_Output_Stream; Name : in String; Content : in Wide_Wide_String); -- Start an XML element with the given name. overriding procedure Start_Element (Stream : in out Html_Output_Stream; Name : in String); -- Closes an XML element of the given name. overriding procedure End_Element (Stream : in out Html_Output_Stream; Name : in String); -- Write a text escaping any character as necessary. overriding procedure Write_Wide_Text (Stream : in out Html_Output_Stream; Content : in Wiki.Strings.WString); private type Html_Output_Stream is limited new Output_Stream and Html.Html_Output_Stream with record -- Whether an XML element must be closed (that is a '>' is necessary) Close_Start : Boolean := False; end record; end Wiki.Streams.Html.Stream;
Refactor the HTML Text_IO stream into a generic package
Refactor the HTML Text_IO stream into a generic package
Ada
apache-2.0
stcarrez/ada-wiki,stcarrez/ada-wiki
6d1eefae2d8522dfa8782c1a050674e450d7d7f4
mat/src/readline/readline.ads
mat/src/readline/readline.ads
----------------------------------------------------------------------- -- readline -- A simple readline binding -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Interfaces; package Readline is -- Print the prompt and a read a line from the terminal. -- Raise the Ada.IO_Exceptions.End_Error when the EOF is reached. function Get_Line (Prompt : in String) return String; end Readline;
Define the Readline package with the Get_Line operation
Define the Readline package with the Get_Line operation
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
8b5b8d763f4a8bc71f0e2523cab116d49c5c27a9
src/asis/asis-exceptions.ads
src/asis/asis-exceptions.ads
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT INTERFACE COMPONENTS -- -- -- -- A S I S . E X C E P T I O N S -- -- -- -- S p e c -- -- -- -- $Revision: 14416 $ -- -- -- This specification is adapted from the Ada Semantic Interface -- -- Specification Standard (ISO/IEC 15291) 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. -- -- -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 5 package Asis.Exceptions ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ package Asis.Exceptions is ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- ASIS exceptions are: ASIS_Inappropriate_Context : exception; ------------------------------------------------------------------------------ -- Raised when ASIS is passed a Context value that is not appropriate for the -- operation. This exception will typically indicate that a user error -- has occurred within the application. ------------------------------------------------------------------------------ ASIS_Inappropriate_Container : exception; ------------------------------------------------------------------------------ -- Raised when ASIS is passed a Container value that is not appropriate for -- the operation. This exception will typically indicate that a user error -- has occurred within the application. ------------------------------------------------------------------------------ ASIS_Inappropriate_Compilation_Unit : exception; ------------------------------------------------------------------------------ -- Raised when ASIS is passed a Compilation_Unit value that is not -- appropriate. This exception will typically indicate that a user -- error has occurred within the application. ------------------------------------------------------------------------------ ASIS_Inappropriate_Element : exception; ------------------------------------------------------------------------------ -- Raised when ASIS is given an Element value that is not appropriate. This -- exception will typically indicate that a user error has occurred within -- the application. ------------------------------------------------------------------------------ ASIS_Inappropriate_Line : exception; ------------------------------------------------------------------------------ -- Raised when ASIS is given a Line value that is not appropriate. ------------------------------------------------------------------------------ ASIS_Inappropriate_Line_Number : exception; ------------------------------------------------------------------------------ -- Raised when ASIS is given a Line_Number value that is not appropriate. -- This exception will typically indicate that a user error has occurred -- within the application. ------------------------------------------------------------------------------ ASIS_Failed : exception; ------------------------------------------------------------------------------ -- This is a catch-all exception that may be raised for different reasons -- in different ASIS implementations. All ASIS routines may raise ASIS_Failed -- whenever they cannot normally complete their operation. This exception -- will typically indicate a failure of the underlying ASIS implementation. ------------------------------------------------------------------------------ end Asis.Exceptions;
Add the ASIS file $i
Add the ASIS file $i
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
cf9de94b13f8447306f4e72e7cf1dd0f23a7b00b
matp/src/mat-interrupts.adb
matp/src/mat-interrupts.adb
----------------------------------------------------------------------- -- mat-interrupts - SIGINT management to stop long running commands -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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.Interrupts; with Ada.Interrupts.Names; with Util.Log.Loggers; package body MAT.Interrupts is pragma Interrupt_State (Name => Ada.Interrupts.Names.SIGINT, State => USER); -- The logger Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("MAT.Interrupts"); protected Interrupts is procedure Interrupt; pragma Interrupt_Handler (Interrupt); function Is_Interrupted return Boolean; procedure Clear; private Interrupted : Boolean; end Interrupts; protected body Interrupts is function Is_Interrupted return Boolean is begin return Interrupted; end Is_Interrupted; procedure Clear is begin Interrupted := False; end Clear; procedure Interrupt is begin Interrupted := True; Log.Info ("SIGINT signal received"); end Interrupt; end Interrupts; -- ------------------------------ -- Install the SIGINT handler. -- ------------------------------ procedure Install is begin Ada.Interrupts.Attach_Handler (Interrupts.Interrupt'Access, Ada.Interrupts.Names.SIGINT); Log.Info ("Interrupt handler for SIGINT is installed"); end Install; -- ------------------------------ -- Reset the interrupted flag. -- ------------------------------ procedure Clear is begin Interrupts.Clear; end Clear; -- ------------------------------ -- Check if we have been interrupted. -- ------------------------------ function Is_Interrupted return Boolean is begin return Interrupts.Is_Interrupted; end Is_Interrupted; end MAT.Interrupts;
Implement the SIGINT interrupt handler with operations to install, check and clear the interrupt flag
Implement the SIGINT interrupt handler with operations to install, check and clear the interrupt flag
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
e0c0d518354777d494bb839fd96c92b6cf20cbd1
src/wiki-plugins-variables.adb
src/wiki-plugins-variables.adb
----------------------------------------------------------------------- -- wiki-plugins-variables -- Variables plugin -- Copyright (C) 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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 Wiki.Filters.Variables; package body Wiki.Plugins.Variables is -- ------------------------------ -- Set or update a variable in the `Wiki.Filters.Variable` filter. -- ------------------------------ overriding procedure Expand (Plugin : in out Variable_Plugin; Document : in out Wiki.Documents.Document; Params : in out Wiki.Attributes.Attribute_List; Context : in Plugin_Context) is pragma Unreferenced (Plugin, Document); begin if Wiki.Attributes.Length (Params) >= 3 then declare First : Wiki.Attributes.Cursor := Wiki.Attributes.First (Params); Second : Wiki.Attributes.Cursor; begin Wiki.Attributes.Next (First); Second := First; Wiki.Attributes.Next (Second); Wiki.Filters.Variables.Add_Variable (Context.Filters, Wiki.Attributes.Get_Wide_Value (First), Wiki.Attributes.Get_Wide_Value (Second)); end; end if; end Expand; end Wiki.Plugins.Variables;
Implement the variables plugin to set variables from wiki text
Implement the variables plugin to set variables from wiki text
Ada
apache-2.0
stcarrez/ada-wiki,stcarrez/ada-wiki
a824bdb40f380bc024645528b141559565b31ea8
regtests/asf-navigations-tests.ads
regtests/asf-navigations-tests.ads
----------------------------------------------------------------------- -- asf-navigations-tests - Tests for ASF navigation -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ASF.Navigations.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Initialize the test application overriding procedure Set_Up (T : in out Test); -- Test a form navigation with an exact match (view, outcome, action). procedure Test_Exact_Navigation (T : in out Test); -- Test a form navigation with a partial match (view, outcome). procedure Test_Partial_Navigation (T : in out Test); -- Test a form navigation with a exception match (view, outcome). procedure Test_Exception_Navigation (T : in out Test); -- Check the navigation for an URI and expect the result to match the regular expression. procedure Check_Navigation (T : in out Test; Name : in String; Match : in String; Raise_Flag : in Boolean := False); end ASF.Navigations.Tests;
Add navigation rule unit test
Add navigation rule unit test
Ada
apache-2.0
Letractively/ada-asf,Letractively/ada-asf,Letractively/ada-asf
732dd630adec0c350cc988743f6fa08efb2d87e8
regtests/util-properties-form-tests.adb
regtests/util-properties-form-tests.adb
----------------------------------------------------------------------- -- util-properties-form-tests -- Test reading JSON file into properties -- Copyright (C) 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file 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.Test_Caller; with Util.Files; package body Util.Properties.Form.Tests is package Caller is new Util.Test_Caller (Test, "Properties.Properties.Form"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Util.Properties.Form.Parse_Form", Test_Parse_Form'Access); end Add_Tests; -- Test loading a JSON file into a properties object. procedure Test_Parse_Form (T : in out Test) is procedure Check (Name : in String; Value : in String); P : Util.Properties.Manager; procedure Check (Name : in String; Value : in String) is begin T.Assert (P.Exists (Name), "Missing property: " & Name); Util.Tests.Assert_Equals (T, Value, String '(P.Get (Name)), "Invalid property: " & Name); end Check; Path : constant String := Util.Tests.Get_Test_Path ("regtests/files/test-1.form"); S : Ada.Strings.Unbounded.Unbounded_String; begin Util.Files.Read_File (Path, S); Util.Properties.Form.Parse_Form (P, Ada.Strings.Unbounded.To_String (S)); Check ("access_token", "97356"); Check ("token_type", "bearer"); Check ("refresh_token_expires_in", "15724800"); Check ("refresh_token", "r1.714b6"); Check ("scope", ""); Check ("scope", ""); end Test_Parse_Form; end Util.Properties.Form.Tests;
Implement new test for Parse_Form and register it for execution
Implement new test for Parse_Form and register it for execution
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
678225b830678911d6f6ed9a1bca01d5fe4474a7
regtests/babel-base-users-tests.adb
regtests/babel-base-users-tests.adb
----------------------------------------------------------------------- -- babel-base-users-tests - Unit tests for babel users -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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.Test_Caller; package body Babel.Base.Users.Tests is use type Util.Strings.Name_Access; package Caller is new Util.Test_Caller (Test, "Base.Users"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Babel.Base.Users.Find", Test_Find'Access); end Add_Tests; -- ------------------------------ -- Test the Find function resolving some existing user. -- ------------------------------ procedure Test_Find (T : in out Test) is Db : Babel.Base.Users.Database; User : User_Type; begin User := Db.Find (0, 0); T.Assert (User.Name /= null, "User uid=0 was not found"); T.Assert (User.Group /= null, "User gid=0 was not found"); Util.Tests.Assert_Equals (T, "root", User.Name.all, "Invalid root user name"); Util.Tests.Assert_Equals (T, "root", User.Group.all, "Invalid root group name"); end Test_Find; end Babel.Base.Users.Tests;
Implement a simple unit test for the Find operation
Implement a simple unit test for the Find operation
Ada
apache-2.0
stcarrez/babel
436af7a953dfbbfc83e436f099111fdf92598e97
src/asf-components-widgets-factory.adb
src/asf-components-widgets-factory.adb
----------------------------------------------------------------------- -- widgets-factory -- Factory for widget Components -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Views.Nodes; with ASF.Components.Base; with ASF.Components.Widgets.Inputs; package body ASF.Components.Widgets.Factory is use ASF.Components.Base; function Create_Input return UIComponent_Access; -- ------------------------- -- ------------------------------ -- Create a UIFile component -- ------------------------------ function Create_Input return UIComponent_Access is begin return new ASF.Components.Widgets.Inputs.UIInput; end Create_Input; use ASF.Views.Nodes; URI : aliased constant String := "http://code.google.com/p/ada-asf/widget"; INPUT_TEXT_TAG : aliased constant String := "inputText"; Widget_Bindings : aliased constant ASF.Factory.Binding_Array := (1 => (Name => INPUT_TEXT_TAG'Access, Component => Create_Input'Access, Tag => Create_Component_Node'Access) ); Core_Factory : aliased constant ASF.Factory.Factory_Bindings := (URI => URI'Access, Bindings => Widget_Bindings'Access); -- ------------------------------ -- Get the widget component factory. -- ------------------------------ function Definition return ASF.Factory.Factory_Bindings_Access is begin return Core_Factory'Access; end Definition; end ASF.Components.Widgets.Factory;
Implement the widget component factory
Implement the widget component factory
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
2e225359ac059445f4b90c7a3c4b7c1ed7238fe3
matp/src/events/mat-events-tools.adb
matp/src/events/mat-events-tools.adb
----------------------------------------------------------------------- -- mat-events-tools - Profiler Events Description -- Copyright (C) 2014, 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 MAT.Events.Tools is -- ------------------------------ -- Find in the list the first event with the given type. -- Raise <tt>Not_Found</tt> if the list does not contain such event. -- ------------------------------ function Find (List : in Target_Event_Vector; Kind : in Probe_Index_Type) return Target_Event_Type is Iter : Target_Event_Cursor := List.First; Event : Target_Event_Type; begin while Target_Event_Vectors.Has_Element (Iter) loop Event := Target_Event_Vectors.Element (Iter); if Event.Index = Kind then return Event; end if; Target_Event_Vectors.Next (Iter); end loop; raise Not_Found; end Find; end MAT.Events.Tools;
Implement the MAT.Events.Tools package with the Find operation
Implement the MAT.Events.Tools package with the Find operation
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
4c85c10ca64cac1b8e22c32bf092436c17d71d82
mat/src/memory/mat-memory-readers.ads
mat/src/memory/mat-memory-readers.ads
----------------------------------------------------------------------- -- Memory Events - Definition and Analysis of memory events -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Types; with MAT.Events; -- with MAT.Ipc; with Util.Events; with MAT.Readers; with MAT.Memory.Targets; -- with MAT.Memory.Clients; -- with MAT.Ipc.Clients; -- with MAT.Events; use MAT.Events; package MAT.Memory.Readers is type Memory_Servant is new MAT.Readers.Reader_Base with record Data : MAT.Memory.Targets.Client_Memory; -- Slots : Client_Memory_Ref; -- Impl : Client_Memory_Ref; end record; -- The memory servant is a proxy for the generic communication -- channel to process incomming events (such as memory allocations). overriding procedure Dispatch (For_Servant : in out Memory_Servant; Id : in MAT.Events.Internal_Reference; Params : in MAT.Events.Const_Attribute_Table_Access; Msg : in out MAT.Readers.Message); procedure Bind (For_Servant : in out Memory_Servant); -- Bind the servant with the object adapter to register the -- events it recognizes. end MAT.Memory.Readers;
Package to read the memory events
Package to read the memory events
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
b5e48cc3525fbcfc2c2671236be8e98a5a0ba0d3
src/asf-rest-definition.adb
src/asf-rest-definition.adb
----------------------------------------------------------------------- -- asf-rest -- REST Support -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body ASF.Rest.Definition is overriding procedure Dispatch (Handler : in Descriptor; Req : in out ASF.Rest.Request'Class; Reply : in out ASF.Rest.Response'Class) is Object : Object_Type; begin Handler.Handler (Object, Req, Reply); end Dispatch; package body Definition is P : aliased String := Pattern; begin Instance.Method := Method; Instance.Permission := Permission; Instance.Handler := Handler; Instance.Pattern := P'Access; ASF.Rest.Register (Entries, Instance'Access); end Definition; end ASF.Rest.Definition;
Implement the Rest definition package to dispatch the request to the API handler
Implement the Rest definition package to dispatch the request to the API handler
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
5412d9facbf5cf8b5a280be79bb9dee9a44d6889
mat/regtests/mat-expressions-tests.ads
mat/regtests/mat-expressions-tests.ads
----------------------------------------------------------------------- -- mat-expressions-tests -- Unit tests for MAT expressions -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package MAT.Expressions.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_Parse_Expression (T : in out Test); end MAT.Expressions.Tests;
Add unit tests for MAT.Expressions
Add unit tests for MAT.Expressions
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
9dd3130f9fbb5ad2d6fc00420eabfc60f05fe84d
awa/plugins/awa-counters/src/awa-counters-definition.ads
awa/plugins/awa-counters/src/awa-counters-definition.ads
----------------------------------------------------------------------- -- awa-counters-definition -- Counter definition -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use 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 <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition. generic Table : ADO.Schemas.Class_Mapping_Access; Field : String; package AWA.Counters.Definition is Def_Name : aliased constant String := Field; package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access)); -- Get the counter definition index. function Index return Counter_Index_Type renames Def.Kind; end AWA.Counters.Definition;
Define the generic package for a counter definition
Define the generic package for a counter definition
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
edd174bcca7ded13835bc622b01ff1380cbc4dea
test/AdaFrontend/vce.adb
test/AdaFrontend/vce.adb
-- RUN: %llvmgcc -c %s -o /dev/null procedure VCE is S : String (1 .. 2); B : Character := 'B'; begin S := 'A' & B; end;
Test that the size of a view converted object is determined by the target type, not the source type.
Test that the size of a view converted object is determined by the target type, not the source type. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@35106 91177308-0d34-0410-b5e6-96231b3b80d8
Ada
apache-2.0
llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap
daf4b5c5cec0dae4e79c4d68f52d685223a7c729
src/asf-components-widgets-gravatars.ads
src/asf-components-widgets-gravatars.ads
----------------------------------------------------------------------- -- components-widgets-gravatars -- Gravatar Components -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Components.Html; with ASF.Contexts.Faces; package ASF.Components.Widgets.Gravatars is -- Given an Email address, return the Gravatar link to the user image. -- (See http://en.gravatar.com/site/implement/hash/ and -- http://en.gravatar.com/site/implement/images/) function Get_Link (Email : in String; Secure : in Boolean := False) return String; -- ------------------------------ -- UIGravatar -- ------------------------------ -- The <b>UIGravatar</b> component displays a small image whose link is created -- from a user email address. type UIGravatar is new ASF.Components.Html.UIHtmlComponent with null record; -- Render an image with the source link created from an email address to the Gravatars service. overriding procedure Encode_Begin (UI : in UIGravatar; Context : in out ASF.Contexts.Faces.Faces_Context'Class); end ASF.Components.Widgets.Gravatars;
Define the gravatar UI component
Define the gravatar UI component
Ada
apache-2.0
Letractively/ada-asf,Letractively/ada-asf,Letractively/ada-asf