summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatchop.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 16:02:05 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 16:02:05 +0000
commit7163d04ce8e8db43be124fd50cd5b5fa95bac2b7 (patch)
treee17b1c8a979b4b4b507721aa32c95be631698232 /gcc/ada/gnatchop.adb
parent21b1b4b8e3005aa9552e51adcc54eca311a8eae1 (diff)
downloadgcc-7163d04ce8e8db43be124fd50cd5b5fa95bac2b7.tar.gz
2005-03-08 Doug Rupp <rupp@adacore.com>
* gnatchop.adb (Locate_Executable): Normalize the possibly VMS style Command_Name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96498 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatchop.adb')
-rw-r--r--gcc/ada/gnatchop.adb14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/ada/gnatchop.adb b/gcc/ada/gnatchop.adb
index a6b12e5c5fa..a7c65707342 100644
--- a/gcc/ada/gnatchop.adb
+++ b/gcc/ada/gnatchop.adb
@@ -521,17 +521,19 @@ procedure Gnatchop is
function Locate_Executable
(Program_Name : String;
- Look_For_Prefix : Boolean := True)
- return String_Access
+ Look_For_Prefix : Boolean := True) return String_Access
is
- Current_Command : constant String := Command_Name;
- End_Of_Prefix : Natural := Current_Command'First - 1;
- Start_Of_Prefix : Positive := Current_Command'First;
+ Current_Command : constant String := Normalize_Pathname (Command_Name);
+ End_Of_Prefix : Natural;
+ Start_Of_Prefix : Positive;
Result : String_Access;
begin
+ Start_Of_Prefix := Current_Command'First;
+ End_Of_Prefix := Start_Of_Prefix - 1;
if Look_For_Prefix then
+
-- Find Start_Of_Prefix
for J in reverse Current_Command'Range loop
@@ -546,8 +548,6 @@ procedure Gnatchop is
-- Find End_Of_Prefix
- End_Of_Prefix := Start_Of_Prefix - 1;
-
for J in reverse Start_Of_Prefix .. Current_Command'Last loop
if Current_Command (J) = '-' then
End_Of_Prefix := J;