]> gcc.gnu.org Git - gcc.git/commitdiff
[Ada] Typo fixes and minor reformatting
authorGary Dismukes <dismukes@adacore.com>
Mon, 16 Dec 2019 10:33:22 +0000 (10:33 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Dec 2019 10:33:22 +0000 (10:33 +0000)
2019-12-16  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

* libgnat/g-exptty.adb, libgnat/g-exptty.ads: Typo fixes and
minor reformatting.

From-SVN: r279415

gcc/ada/ChangeLog
gcc/ada/libgnat/g-exptty.adb
gcc/ada/libgnat/g-exptty.ads

index 0f843f3b66eefd9f9fc6a0288195a889ae944b97..12380b6b983bfc718908f9bfea5e2b4bbc105cbb 100644 (file)
@@ -1,3 +1,8 @@
+2019-12-16  Gary Dismukes  <dismukes@adacore.com>
+
+       * libgnat/g-exptty.adb, libgnat/g-exptty.ads: Typo fixes and
+       minor reformatting.
+
 2019-12-16  Eric Botcazou  <ebotcazou@adacore.com>
 
        * exp_ch6.adb (Requires_Atomic_Or_Volatile_Copy): New predicate.
index b193448a0d0e6fa8ac607591a77fcffdb164a3ae..758be7ac2d7fb0828bc3a09aed0d2b1d996b5374 100644 (file)
@@ -38,8 +38,9 @@ package body GNAT.Expect.TTY is
    On_Windows : constant Boolean := Directory_Separator = '\';
    --  True when on Windows
 
-   function Waitpid (Process : System.Address; Blocking : Integer)
-                     return Integer;
+   function Waitpid
+     (Process  : System.Address;
+      Blocking : Integer) return Integer;
    pragma Import (C, Waitpid, "__gnat_tty_waitpid");
    --  Wait for a specific process id, and return its exit code
 
@@ -48,8 +49,7 @@ package body GNAT.Expect.TTY is
    ------------------------
 
    function Is_Process_Running
-      (Descriptor : in out TTY_Process_Descriptor)
-      return Boolean
+     (Descriptor : in out TTY_Process_Descriptor) return Boolean
    is
    begin
       if Descriptor.Process = System.Null_Address then
@@ -57,6 +57,7 @@ package body GNAT.Expect.TTY is
       end if;
 
       Descriptor.Exit_Status := Waitpid (Descriptor.Process, Blocking => 0);
+
       return Descriptor.Exit_Status = Still_Active;
    end Is_Process_Running;
 
@@ -106,17 +107,20 @@ package body GNAT.Expect.TTY is
             Status := Waitpid (Descriptor.Process, Blocking => 0);
 
             if Status = Still_Active then
-               --  In theory the process might hav died since the check. In
+               --  In theory the process might have died since the check. In
                --  practice the following calls should not cause any issue.
+
                Interrupt (Descriptor);
                delay (0.05);
                Terminate_Process (Descriptor.Process);
                Status := Waitpid (Descriptor.Process, Blocking => 1);
                Descriptor.Exit_Status := Status;
             end if;
+
          else
             --  If Exit_Status is not STILL_ACTIVE just retrieve the saved
-            --  exit status
+            --  exit status.
+
             Status := Descriptor.Exit_Status;
          end if;
 
index f61ea6215b453a3487dd624c1c131ed88e69c220..683a453ec212277df23be7cec453820806b05068 100644 (file)
@@ -95,7 +95,7 @@ package GNAT.Expect.TTY is
    function Is_Process_Running
       (Descriptor : in out TTY_Process_Descriptor)
       return Boolean;
-   --  Return True is the process is still alive
+   --  Returns True if the process is still alive
 
 private
 
@@ -142,7 +142,7 @@ private
       Process     : System.Address := System.Null_Address;
       --  Underlying structure used in C
       Exit_Status : Integer := Still_Active;
-      --  Hold the exit status of the process.
+      --  Holds the exit status of the process
       Use_Pipes   : Boolean := True;
    end record;
 
This page took 0.074405 seconds and 5 git commands to generate.