gnatcoll_24.0.0_11c512d1/testsuite/tests/opt_parse/optional_long_short/optional_long_short_option_crash_2/src-mylib/mylib.ads

 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
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;

with GNATCOLL.Opt_Parse; use GNATCOLL.Opt_Parse;

package Mylib is

   package Int_Vectors is new Ada.Containers.Vectors (Positive, Integer);

   type Day is (Mon, Tue, Wed, Thu, Fri, Sat, Sun);

   type Context is record
      Ints : Int_Vectors.Vector;
   end record;
   type Context_Array is array (Positive range <>) of Context;

   package Args is
      Parser : Argument_Parser :=
         Create_Argument_Parser (Help => "Test program");

      package Charset_Option1 is new Parse_Option
        (Parser      => Parser,
         Short       => "-C1",
         Arg_Type    => Unbounded_String,
         Help        =>
            "What charset to use when parsing files. "
            & "Default is ""latin-1""",
         Default_Val => To_Unbounded_String ("latin-1"));

   end Args;

   procedure Run;

end Mylib;