[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Jun 2010 13:31:32 +0000 (15:31 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Jun 2010 13:31:32 +0000 (15:31 +0200)
2010-06-18  Pascal Obry  <obry@adacore.com>

* prj-nmsc.adb: Fix source filenames casing in debug output.

2010-06-18  Robert Dewar  <dewar@adacore.com>

* gnatcmd.adb: Minor reformatting.

From-SVN: r160989

gcc/ada/ChangeLog
gcc/ada/gnatcmd.adb
gcc/ada/prj-nmsc.adb

index 61619ff48a5d9d5107a39f7f7b157063526484a1..c5225cb90c7063e26edf911809758ffaecdf3ef3 100644 (file)
@@ -1,3 +1,11 @@
+2010-06-18  Pascal Obry  <obry@adacore.com>
+
+       * prj-nmsc.adb: Fix source filenames casing in debug output.
+
+2010-06-18  Robert Dewar  <dewar@adacore.com>
+
+       * gnatcmd.adb: Minor reformatting.
+
 2010-06-18  Robert Dewar  <dewar@adacore.com>
 
        * sem_eval.adb (Eval_Conditional_Expression): Result is static if
index 793c6c9c92ca98a709f2f7ab8d4586ece4e3c65e..0f3810144e405423cabaa035cebd70d590c533bb 100644 (file)
@@ -141,7 +141,7 @@ procedure GNATCmd is
 
    Packages_To_Check_By_Check : constant String_List_Access :=
      new String_List'
-       ((Naming_String, Builder_String, Check_String, Compiler_String));
+          ((Naming_String, Builder_String, Check_String, Compiler_String));
 
    Packages_To_Check_By_Sync : constant String_List_Access :=
      new String_List'((Naming_String, Synchronize_String, Compiler_String));
@@ -335,13 +335,11 @@ procedure GNATCmd is
             if Index = 1
               or else
                 (The_Command = Check
-                   and then
-                     Last_Switches.Table (Index - 1).all /= "-o")
+                   and then Last_Switches.Table (Index - 1).all /= "-o")
               or else
                 (The_Command = Pretty
-                   and then
-                     Last_Switches.Table (Index - 1).all /= "-o"  and then
-                     Last_Switches.Table (Index - 1).all /= "-of")
+                   and then Last_Switches.Table (Index - 1).all /= "-o"
+                   and then Last_Switches.Table (Index - 1).all /= "-of")
               or else
                 (The_Command = Metric
                    and then
@@ -365,7 +363,7 @@ procedure GNATCmd is
 
       if Add_Sources then
 
-         --  For gnatcheck, gnatpp and gnatmetric, create a temporary file
+         --  For gnatcheck, gnatpp, and gnatmetric, create a temporary file
          --  and put the list of sources in it.
 
          if The_Command = Check  or else
@@ -457,8 +455,8 @@ procedure GNATCmd is
                   then
                      --  There is a body, check if it is for this project
 
-                     if All_Projects or else
-                        Unit.File_Names (Impl).Project = Project
+                     if All_Projects
+                       or else Unit.File_Names (Impl).Project = Project
                      then
                         Subunit := False;
 
@@ -1085,8 +1083,7 @@ procedure GNATCmd is
                   --  Append ".ali" if file name does not end with it
 
                   if Switch'Length <= 4
-                    or else Switch (Switch'Last - 3 .. Switch'Last)
-                    /= ".ali"
+                    or else Switch (Switch'Last - 3 .. Switch'Last) /= ".ali"
                   then
                      Last := ALI_File'Last;
                   end if;
@@ -1099,8 +1096,8 @@ procedure GNATCmd is
 
                   else
                      for K in Switch'Range loop
-                        if Switch (K) = '/' or else
-                          Switch (K) = Directory_Separator
+                        if Switch (K) = '/'
+                          or else Switch (K) = Directory_Separator
                         then
                            Test_Existence := True;
                            exit;
@@ -1277,7 +1274,7 @@ procedure GNATCmd is
 
          --  No usage for VMS only command or for Sync
 
-         if (not Command_List (C).VMS_Only) and then C /= Sync then
+         if not Command_List (C).VMS_Only and then C /= Sync then
             if Targparm.AAMP_On_Target then
                Put ("gnaampcmd ");
             else
@@ -1643,11 +1640,12 @@ begin
 
                   --  --subdirs=... Specify Subdirs
 
-                  if Argv'Length > Makeutl.Subdirs_Option'Length and then
-                    Argv
-                     (Argv'First ..
-                      Argv'First + Makeutl.Subdirs_Option'Length - 1) =
-                        Makeutl.Subdirs_Option
+                  if Argv'Length > Makeutl.Subdirs_Option'Length
+                    and then
+                      Argv
+                       (Argv'First ..
+                        Argv'First + Makeutl.Subdirs_Option'Length - 1) =
+                          Makeutl.Subdirs_Option
                   then
                      Subdirs :=
                        new String'
@@ -1756,8 +1754,9 @@ begin
                                         ('=',
                                          Argv (Argv'First + 2 .. Argv'Last));
                      begin
-                        if Equal_Pos >= Argv'First + 3 and then
-                          Equal_Pos /= Argv'Last then
+                        if Equal_Pos >= Argv'First + 3
+                          and then Equal_Pos /= Argv'Last
+                        then
                            Add (Project_Node_Tree,
                                 External_Name =>
                                   Argv (Argv'First + 2 .. Equal_Pos - 1),
@@ -1959,7 +1958,7 @@ begin
             end if;
          end;
 
-         if The_Command = Bind
+         if        The_Command = Bind
            or else The_Command = Link
            or else The_Command = Elim
          then
@@ -1974,7 +1973,7 @@ begin
          --  For gnatcheck, gnatstub, gnatmetric, gnatpp and gnatelim, create
          --  a configuration pragmas file, if necessary.
 
-         if The_Command = Pretty
+         if        The_Command = Pretty
            or else The_Command = Metric
            or else The_Command = Stub
            or else The_Command = Elim
@@ -2112,7 +2111,7 @@ begin
                      while K <= First_Switches.Last
                        and then
                         (The_Command /= Check
-                           or else First_Switches.Table (K).all /= "-rules")
+                          or else First_Switches.Table (K).all /= "-rules")
                      loop
                         Add_To_Carg_Switches (First_Switches.Table (K));
                         K := K + 1;
@@ -2152,8 +2151,7 @@ begin
                      while K <= Last_Switches.Last
                        and then
                         (The_Command /= Check
-                         or else
-                         Last_Switches.Table (K).all /= "-rules")
+                          or else Last_Switches.Table (K).all /= "-rules")
                      loop
                         Add_To_Carg_Switches (Last_Switches.Table (K));
                         K := K + 1;
@@ -2207,33 +2205,35 @@ begin
                if The_Command = Check then
                   declare
                      Pkg  : constant Prj.Package_Id :=
-                       Prj.Util.Value_Of
-                         (Name        => Name_Builder,
-                          In_Packages => Project.Decl.Packages,
-                          In_Tree     => Project_Tree);
+                              Prj.Util.Value_Of
+                                (Name        => Name_Builder,
+                                 In_Packages => Project.Decl.Packages,
+                                 In_Tree     => Project_Tree);
+
                      Variable : Variable_Value :=
-                       Prj.Util.Value_Of
-                         (Name                    => No_Name,
-                          Attribute_Or_Array_Name =>
-                            Name_Global_Configuration_Pragmas,
-                          In_Package              => Pkg,
-                          In_Tree                 => Project_Tree);
+                                  Prj.Util.Value_Of
+                                    (Name                    => No_Name,
+                                     Attribute_Or_Array_Name =>
+                                       Name_Global_Configuration_Pragmas,
+                                     In_Package              => Pkg,
+                                     In_Tree                 => Project_Tree);
 
                   begin
-                     if (Variable = Nil_Variable_Value or else
-                         Length_Of_Name (Variable.Value) = 0)
-                         and then Pkg /= No_Package
+                     if (Variable = Nil_Variable_Value
+                          or else Length_Of_Name (Variable.Value) = 0)
+                       and then Pkg /= No_Package
                      then
                         Variable :=
                           Prj.Util.Value_Of
-                         (Name                    => Name_Ada,
-                          Attribute_Or_Array_Name => Name_Global_Config_File,
-                          In_Package              => Pkg,
-                          In_Tree                 => Project_Tree);
+                            (Name                    => Name_Ada,
+                             Attribute_Or_Array_Name =>
+                               Name_Global_Config_File,
+                             In_Package              => Pkg,
+                             In_Tree                 => Project_Tree);
                      end if;
 
-                     if Variable /= Nil_Variable_Value and then
-                       Length_Of_Name (Variable.Value) /= 0
+                     if Variable /= Nil_Variable_Value
+                       and then Length_Of_Name (Variable.Value) /= 0
                      then
                         Add_To_Carg_Switches
                           (new String'
@@ -2243,22 +2243,23 @@ begin
 
                   if not All_Projects then
                      declare
-                        Pkg      : constant Prj.Package_Id :=
-                          Prj.Util.Value_Of
-                            (Name        => Name_Compiler,
-                             In_Packages => Project.Decl.Packages,
-                             In_Tree     => Project_Tree);
+                        Pkg : constant Prj.Package_Id :=
+                                Prj.Util.Value_Of
+                                  (Name        => Name_Compiler,
+                                   In_Packages => Project.Decl.Packages,
+                                   In_Tree     => Project_Tree);
+
                         Variable : Variable_Value :=
-                          Prj.Util.Value_Of
-                            (Name                    => No_Name,
-                             Attribute_Or_Array_Name =>
-                               Name_Local_Configuration_Pragmas,
-                             In_Package              => Pkg,
-                             In_Tree                 => Project_Tree);
+                                     Prj.Util.Value_Of
+                                       (Name        => No_Name,
+                                        Attribute_Or_Array_Name =>
+                                          Name_Local_Configuration_Pragmas,
+                                        In_Package  => Pkg,
+                                        In_Tree     => Project_Tree);
 
                      begin
-                        if (Variable = Nil_Variable_Value or else
-                              Length_Of_Name (Variable.Value) = 0)
+                        if (Variable = Nil_Variable_Value
+                             or else Length_Of_Name (Variable.Value) = 0)
                           and then Pkg /= No_Package
                         then
                            Variable :=
@@ -2270,8 +2271,8 @@ begin
                                 In_Tree                 => Project_Tree);
                         end if;
 
-                        if Variable /= Nil_Variable_Value and then
-                          Length_Of_Name (Variable.Value) /= 0
+                        if Variable /= Nil_Variable_Value
+                          and then Length_Of_Name (Variable.Value) /= 0
                         then
                            Add_To_Carg_Switches
                              (new String'
index a72f0bc8c87bda1d29afbb5c5c3e4af1016a8505..a3d65635037482a56743cd71b6e49e41f6196b64 100644 (file)
@@ -6888,31 +6888,29 @@ package body Prj.Nmsc is
                         end if;
 
                         declare
-                           Path_Name    : constant String :=
-                                            Normalize_Pathname
-                                              (Name (1 .. Last),
-                                               Directory       =>
-                                                 Source_Directory
-                                                   (Source_Directory'First ..
-                                                    Dir_Last),
-                                               Resolve_Links   =>
-                                                 Opt.Follow_Links_For_Files,
-                                               Case_Sensitive => True);
-
-                           Path         : Path_Name_Type;
-                           Display_Path : Path_Name_Type;
-                           FF           : File_Found :=
-                                            Excluded_Sources_Htable.Get
-                                              (Project.Excluded, File_Name);
-                           To_Remove    : Boolean := False;
+                           Path_Name : constant String :=
+                                         Normalize_Pathname
+                                           (Name (1 .. Last),
+                                            Directory       =>
+                                              Source_Directory
+                                                (Source_Directory'First ..
+                                                 Dir_Last),
+                                            Resolve_Links   =>
+                                              Opt.Follow_Links_For_Files,
+                                            Case_Sensitive => True);
+
+                           Path      : Path_Name_Type;
+                           FF        : File_Found :=
+                                         Excluded_Sources_Htable.Get
+                                           (Project.Excluded, File_Name);
+                           To_Remove : Boolean := False;
 
                         begin
                            Name_Len := Path_Name'Length;
                            Name_Buffer (1 .. Name_Len) := Path_Name;
-                           Display_Path := Name_Find;
 
                            if Osint.File_Names_Case_Sensitive then
-                              Path := Display_Path;
+                              Path := Name_Find;
                            else
                               Canonical_Case_File_Name
                                 (Name_Buffer (1 .. Name_Len));
@@ -6927,7 +6925,8 @@ package body Prj.Nmsc is
 
                                  if Current_Verbosity = High then
                                     Write_Str ("     excluded source """);
-                                    Write_Str (Get_Name_String (File_Name));
+                                    Write_Str
+                                      (Get_Name_String (Display_File_Name));
                                     Write_Line ("""");
                                  end if;
 
@@ -6954,7 +6953,7 @@ package body Prj.Nmsc is
                               Source_Dir_Rank   => Num_Nod.Number,
                               Data              => Data,
                               Path              => Path,
-                              Display_Path      => Display_Path,
+                              Display_Path      => Name_Find,
                               File_Name         => File_Name,
                               Locally_Removed   => To_Remove,
                               Display_File_Name => Display_File_Name,