aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/g-comlin.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/g-comlin.ads')
-rw-r--r--gcc/ada/g-comlin.ads25
1 files changed, 15 insertions, 10 deletions
diff --git a/gcc/ada/g-comlin.ads b/gcc/ada/g-comlin.ads
index f19d7ba..893a674 100644
--- a/gcc/ada/g-comlin.ads
+++ b/gcc/ada/g-comlin.ads
@@ -707,9 +707,9 @@ package GNAT.Command_Line is
Callback : Switch_Handler := null;
Parser : Opt_Parser := Command_Line_Parser;
Concatenate : Boolean := True);
- -- Similar to the standard Getopt function.
- -- For each switch found on the command line, this calls Callback, if the
- -- switch is not handled automatically.
+ -- Similar to the standard Getopt function. For each switch found on the
+ -- command line, this calls Callback, if the switch is not handled
+ -- automatically.
--
-- The list of valid switches are the ones from the configuration. The
-- switches that were declared through Define_Switch with an Output
@@ -726,12 +726,15 @@ package GNAT.Command_Line is
-- will display an error message and raises Invalid_Switch again.
--
-- This function automatically expands switches:
- -- * If Define_Prefix was called (for instance "-gnaty") and the user
- -- specifies "-gnatycb" on the command line, then Getopt returns
- -- "-gnatyc" and "-gnatyb" separately.
- -- * If Define_Alias was called (for instance "-gnatya = -gnatycb") then
- -- the latter is returned (in this case it also expands -gnaty as per
- -- the above.
+ --
+ -- If Define_Prefix was called (for instance "-gnaty") and the user
+ -- specifies "-gnatycb" on the command line, then Getopt returns
+ -- "-gnatyc" and "-gnatyb" separately.
+ --
+ -- If Define_Alias was called (for instance "-gnatya = -gnatycb") then
+ -- the latter is returned (in this case it also expands -gnaty as per
+ -- the above.
+ --
-- The goal is to make handling as easy as possible by leaving as much
-- work as possible to this package.
--
@@ -753,15 +756,17 @@ package GNAT.Command_Line is
-- way to remove a switch from an existing command line.
-- For instance:
+
-- declare
-- Config : Command_Line_Configuration;
-- Line : Command_Line;
-- Args : Argument_List_Access;
+
-- begin
-- Define_Switch (Config, "-gnatyc");
-- Define_Switch (Config, ...); -- for all valid switches
-- Define_Prefix (Config, "-gnaty");
- --
+
-- Set_Configuration (Line, Config);
-- Add_Switch (Line, "-O2");
-- Add_Switch (Line, "-gnatyc");