forked from AdaDoom3/AdaDoom3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
neo-system.adb
99 lines (99 loc) · 2.85 KB
/
neo-system.adb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
package body Neo.System
is
--------------------
-- Implementation --
--------------------
package body Implementation
is separate;
----------
-- Test --
----------
procedure Test
is
begin
Put_Title("SYSTEM TEST");
Put_Line("Language " & Enumerated_Language'Wide_Image(Get_Language));
Put_Line("Version " & Enumerated_System'Wide_Image(Get_Version));
Put_Line("Username """ & Get_Username & """");
Open_Webpage("http://www.google.com");
Execute_Application(False, "C:\Windows\System32\taskmgr.exe");
--Put_Line("Newer than Windows XP is " & Boolean'Wide_Image(Is_Newer_Than(Windows_2_5_1_System)));
Hang_Window;
end Test;
-------------------
-- Is_Newer_Than --
-------------------
function Is_Newer_Than(
Linux : in Enumerated_Linux_System;
Macintosh : in Enumerated_Macintosh_System;
Windows : in Enumerated_Windows_System)
return Boolean
is
Current_System : Enumerated_System := Get_Version;
begin
-- if Operating_System in Enumerated_Linux_System'Range then
-- elsif Operating_System in Enumerated_Windows_System'Range then
-- elsif Operating_System in Enumerated_Macintosh_System'Range then
-- end if;
return True;
end Is_Newer_Than;
--------------------------------------
-- Is_Running_In_64_Bit_Environment --
--------------------------------------
function Is_Running_In_64_Bit_Environment
return Boolean
is
begin
IF USE_64_BIT THEN
return True;
end IF;
return Implementation.Is_Running_In_64_Bit_Environment;
end Is_Running_In_64_Bit_Environment;
------------------
-- Get_Language --
------------------
function Get_Language
return Enumerated_Language
renames Implementation.Get_Language;
-----------------
-- Get_Version --
-----------------
function Get_Version
return Enumerated_System
renames Implementation.Get_Version;
------------------
-- Get_Username --
------------------
function Get_Username
return String_2
renames Implementation.Get_Username;
------------------
-- Open_Webpage --
------------------
procedure Open_Webpage(
Path : in String_2)
renames Implementation.Open_Webpage;
-------------------------
-- Execute_Application --
-------------------------
procedure Execute_Application(
Do_Quit : in Boolean;
Executable_Path : in String_2)
renames Implementation.Execute_Application;
end Neo.System;