aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/g-comlin.adb
diff options
context:
space:
mode:
authorEmmanuel Briot <briot@adacore.com>2011-08-04 09:44:38 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 11:44:38 +0200
commitafab164f736e5d4e746f2832f58f838e797d3bca (patch)
tree64f11b7bbbad408ff1e22d79a79b4efa474ecd4c /gcc/ada/g-comlin.adb
parentfe0ec02f9397eeb71a4ecb1a6fb2b67cfdb9378c (diff)
downloadgcc-afab164f736e5d4e746f2832f58f838e797d3bca.zip
gcc-afab164f736e5d4e746f2832f58f838e797d3bca.tar.gz
gcc-afab164f736e5d4e746f2832f58f838e797d3bca.tar.bz2
g-comlin.adb, [...] (Add_Switch): Put back support for overriding the separator.
2011-08-04 Emmanuel Briot <briot@adacore.com> * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for overriding the separator. From-SVN: r177345
Diffstat (limited to 'gcc/ada/g-comlin.adb')
-rw-r--r--gcc/ada/g-comlin.adb17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb
index b39c57a..0d75289 100644
--- a/gcc/ada/g-comlin.adb
+++ b/gcc/ada/g-comlin.adb
@@ -2113,7 +2113,7 @@ package body GNAT.Command_Line is
(Cmd : in out Command_Line;
Switch : String;
Parameter : String := "";
- Separator : Character := ' ';
+ Separator : Character := ASCII.NUL;
Section : String := "";
Add_Before : Boolean := False)
is
@@ -2132,16 +2132,14 @@ package body GNAT.Command_Line is
(Cmd : in out Command_Line;
Switch : String;
Parameter : String := "";
- Separator : Character := ' ';
+ Separator : Character := ASCII.NUL;
Section : String := "";
Add_Before : Boolean := False;
Success : out Boolean)
is
- pragma Unreferenced (Separator); -- ??? Should be removed eventually
-
procedure Add_Simple_Switch
(Simple : String;
- Separator : String;
+ Sepa : String;
Param : String;
Index : Integer);
-- Add a new switch that has had all its aliases expanded, and switches
@@ -2153,7 +2151,7 @@ package body GNAT.Command_Line is
procedure Add_Simple_Switch
(Simple : String;
- Separator : String;
+ Sepa : String;
Param : String;
Index : Integer)
is
@@ -2168,10 +2166,13 @@ package body GNAT.Command_Line is
with "Invalid switch " & Simple;
end if;
- if Separator = "" then
+ if Separator /= ASCII.NUL then
+ Sep := Separator;
+
+ elsif Sepa = "" then
Sep := ASCII.NUL;
else
- Sep := Separator (Separator'First);
+ Sep := Sepa (Sepa'First);
end if;
if Cmd.Expanded = null then