OSDN Git Service

2009-07-28 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jul 2009 08:21:57 +0000 (08:21 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jul 2009 08:21:57 +0000 (08:21 +0000)
* prj-nmsc.adb, g-expect.adb, prj.ads: Minor reformatting

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150148 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/g-expect.adb
gcc/ada/prj-nmsc.adb
gcc/ada/prj.ads

index c916da4..a8df543 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-28  Robert Dewar  <dewar@adacore.com>
+
+       * prj-nmsc.adb, g-expect.adb, prj.ads: Minor reformatting
+
 2009-07-28  Sergey Rybin  <rybin@adacore.com>
 
        * gnat_ugn.texi: Add section about gnatcheck rule exemption.
index 5f88f63..02bc6cf 100644 (file)
@@ -1196,6 +1196,7 @@ package body GNAT.Expect is
       pragma Warnings (Off, Pipe3);
 
       On_Windows : constant Boolean := Directory_Separator = '\';
+      --  This is ugly, we need a better way of doing this test ???
 
       Input  : File_Descriptor;
       Output : File_Descriptor;
@@ -1203,8 +1204,10 @@ package body GNAT.Expect is
 
    begin
       if On_Windows then
+
          --  Since Windows does not have a separate fork/exec, we need to
          --  perform the following actions:
+
          --    - save stdin, stdout, stderr
          --    - replace them by our pipes
          --    - create the child with process handle inheritance
index ee74ad7..75e4c6e 100644 (file)
@@ -730,13 +730,14 @@ package body Prj.Nmsc is
       Id.File                := File_Name;
       Id.Display_File        := Display_File;
       Id.Dep_Name            := Dependency_Name
-                               (File_Name, Lang_Id.Config.Dependency_Kind);
+                                  (File_Name, Lang_Id.Config.Dependency_Kind);
       Id.Naming_Exception    := Naming_Exception;
 
       --  Add the source id to the Unit_Sources_HT hash table, if the unit name
       --  is not null.
 
       if Unit /= No_Name then
+
          --  Note: we might be creating a dummy unit here, when we in fact have
          --  a separate. For instance, file file-bar.adb will initially be
          --  assumed to be the IMPL of unit "file.bar". Only later on (in
index e2aec8c..53229fd 100644 (file)
@@ -600,17 +600,24 @@ package Prj is
    type Source_Kind is (Spec, Impl, Sep);
    subtype Spec_Or_Body is Source_Kind range Spec .. Impl;
 
+   --  The following declarations declare a structure used to store the Name
+   --  and File and Path names of a unit, with a reference to its GNAT Project
+   --  File(s). Some units might have neither Spec nor Impl when they were
+   --  created for a "separate".
+
    type File_Names_Data is array (Spec_Or_Body) of Source_Id;
+
    type Unit_Data is record
       Name       : Name_Id := No_Name;
       File_Names : File_Names_Data;
    end record;
+
    type Unit_Index is access all Unit_Data;
+
    No_Unit_Index : constant Unit_Index := null;
-   --  Name and File and Path names of a unit, with a reference to its
-   --  GNAT Project File(s).
-   --  Some units might have neither Spec nor Impl when they were created for
-   --  a "separate".
+   --  Used to indicate a null entry for no unit
+
+   --  Structure to define source data
 
    type Source_Data is record
       Project                : Project_Id          := No_Project;
@@ -627,7 +634,7 @@ package Prj is
       Declared_In_Interfaces : Boolean             := False;
       --  True when source is declared in attribute Interfaces
 
-      Alternate_Languages    : Language_List;
+      Alternate_Languages    : Language_List       := null;
       --  List of languages a header file may also be, in addition of language
       --  Language_Name.