aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnatls.adb
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2017-09-06 09:31:46 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-06 11:31:46 +0200
commit3e720c9601e26585c386c983084fdc2926902936 (patch)
tree3c64ea77f5ea643df0973229e1dd0eb9f80eca78 /gcc/ada/gnatls.adb
parentf8159014019f2aa3b3e53970732d087dd93fc432 (diff)
downloadgcc-3e720c9601e26585c386c983084fdc2926902936.zip
gcc-3e720c9601e26585c386c983084fdc2926902936.tar.gz
gcc-3e720c9601e26585c386c983084fdc2926902936.tar.bz2
exp_util.adb, [...]: Minor reformatting.
2017-09-06 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb, exp_ch3.adb, xoscons.adb: Minor reformatting. From-SVN: r251758
Diffstat (limited to 'gcc/ada/gnatls.adb')
-rw-r--r--gcc/ada/gnatls.adb30
1 files changed, 18 insertions, 12 deletions
diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb
index b31277b..fe62b7b 100644
--- a/gcc/ada/gnatls.adb
+++ b/gcc/ada/gnatls.adb
@@ -1232,7 +1232,7 @@ procedure Gnatls is
Uninitialized_Prefix : constant String := '#' & Path_Separator;
-- Prefix to indicate that the project path has not been initialized
- -- yet. Must be two characters long
+ -- yet. Must be two characters long.
---------------------
-- Add_Directories --
@@ -1244,6 +1244,7 @@ procedure Gnatls is
Prepend : Boolean := False)
is
Tmp : String_Access;
+
begin
if Self = null then
Self := new String'(Uninitialized_Prefix & Path);
@@ -1256,7 +1257,6 @@ procedure Gnatls is
end if;
Free (Tmp);
end if;
-
end Add_Directories;
-------------------------------------
@@ -1306,6 +1306,7 @@ procedure Gnatls is
else
(1 => Directory_Separator));
-- Note: Target_Name has a trailing / when it comes from Sdefault
+
begin
Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all & Target_Name & Extra_Sep & Suffix);
@@ -1315,15 +1316,15 @@ procedure Gnatls is
begin
if Self /= null
- and then (Self'Length = 0
+ and then (Self'Length = 0
or else Self (Self'First) /= '#')
then
return;
end if;
-- The current directory is always first in the search path. Since
- -- the Project_Path currently starts with '#:' as a sign that it
- -- isn't initialized, we simply replace '#' with '.'
+ -- the Project_Path currently starts with '#:' as a sign that it is
+ -- not initialized, we simply replace '#' with '.'
if Self = null then
Self := new String'('.' & Path_Separator);
@@ -1342,12 +1343,12 @@ procedure Gnatls is
Ada_Prj_Path := Getenv (Ada_Project_Path);
if Gpr_Prj_Path_File.all /= "" then
-
FD := Open_Read (Gpr_Prj_Path_File.all, GNAT.OS_Lib.Text);
if FD = Invalid_FD then
- Osint.Fail ("warning: could not read project path file """ &
- Gpr_Prj_Path_File.all & """");
+ Osint.Fail
+ ("warning: could not read project path file """
+ & Gpr_Prj_Path_File.all & """");
end if;
Len := Integer (File_Length (FD));
@@ -1448,8 +1449,7 @@ procedure Gnatls is
Add_Default_Dir := False;
for J in Last + 1 .. Name_Len loop
- Name_Buffer (J - 2) :=
- Name_Buffer (J);
+ Name_Buffer (J - 2) := Name_Buffer (J);
end loop;
Name_Len := Name_Len - 2;
@@ -1515,11 +1515,13 @@ procedure Gnatls is
if Base_Name (Runtime_Name) = Runtime_Name then
-- $prefix/$target/$runtime/lib/gnat
+
Add_Target
(Runtime_Name & Directory_Separator &
"lib" & Directory_Separator & "gnat");
-- $prefix/$target/$runtime/share/gpr
+
Add_Target
(Runtime_Name & Directory_Separator &
"share" & Directory_Separator & "gpr");
@@ -1529,11 +1531,13 @@ procedure Gnatls is
new String'(Normalize_Pathname (Runtime_Name));
-- $runtime_dir/lib/gnat
+
Add_Str_To_Name_Buffer
(Path_Separator & Runtime.all & Directory_Separator &
"lib" & Directory_Separator & "gnat");
-- $runtime_dir/share/gpr
+
Add_Str_To_Name_Buffer
(Path_Separator & Runtime.all & Directory_Separator &
"share" & Directory_Separator & "gpr");
@@ -1541,10 +1545,12 @@ procedure Gnatls is
end if;
-- $prefix/$target/lib/gnat
+
Add_Target
("lib" & Directory_Separator & "gnat");
-- $prefix/$target/share/gpr
+
Add_Target
("share" & Directory_Separator & "gpr");
end if;
@@ -1589,8 +1595,8 @@ procedure Gnatls is
end if;
else
- -- Because we don't want to resolve symbolic links, we cannot
- -- use Locate_Regular_File. So, we try each possible path
+ -- Because we do not want to resolve symbolic links, we cannot
+ -- use Locate_Regular_File. Instead we try each possible path
-- successively.
First := Self'First;