File : cmdline.ads
1 ------------------------------------------------------------------------------
2 ------------------------------------------------------------------------------
3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
4 -- --
5 -- (C) 2018 Stanislav Datskovskiy ( www.loper-os.org ) --
6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
7 -- --
8 -- You do not have, nor can you ever acquire the right to use, copy or --
9 -- distribute this software ; Should you use this software for any purpose, --
10 -- or copy and distribute it to anyone or in any manner, you are breaking --
11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
12 -- continue doing so for the indefinite future. In any case, please --
13 -- always : read and understand any software ; verify any PGP signatures --
14 -- that you use - for any purpose. --
15 -- --
16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
17 ------------------------------------------------------------------------------
18 ------------------------------------------------------------------------------
19
20 with System;
21
22 package CmdLine is
23
24 -- IMHO this is reasonable.
25 CmdLineArg_Length : constant Positive := 256;
26
27 subtype CmdLineArg is String(1 .. CmdLineArg_Length);
28
29 function Initialized return Boolean;
30
31 function Arg_Count return Natural;
32 pragma Import(C, Arg_Count, "__gnat_arg_count");
33
34 procedure Get_Argument(Number : in Natural;
35 Result : out CmdLineArg);
36
37 function Len_Arg (Arg_Num : Integer) return Integer;
38 pragma Import(C, Len_Arg, "__gnat_len_arg");
39
40 private
41
42 procedure Fill_Arg (A : System.Address; Arg_Num : Integer);
43 pragma Import(C, Fill_Arg, "__gnat_fill_arg");
44
45 end CmdLine;