-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Arg : String renames CL.Argument (Current_Argument);
Index_Switches : Natural := 0;
Max_Length : Natural := 0;
- Index : Natural := Switches'First;
+ Index : Natural;
Length : Natural := 1;
End_Index : Natural;
begin
+ -- Remove all leading spaces first to make sure that Index points
+ -- at the start of the first switch.
+
+ Index := Switches'First;
+ while Index <= Switches'Last and then Switches (Index) = ' ' loop
+ Index := Index + 1;
+ end loop;
+
while Index <= Switches'Last loop
-- Search the length of the parameter at this position in Switches