]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a-coprnu.ads, a-cohata.ads, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads, a-cgarso.ads...
authorJavier Miranda <miranda@adacore.com>
Fri, 6 Apr 2007 09:13:42 +0000 (11:13 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 6 Apr 2007 09:13:42 +0000 (11:13 +0200)
2007-04-06  Javier Miranda  <miranda@adacore.com>
    Matt Heaney  <heaney@adacore.com>
    Robert Dewar  <dewar@adacore.com>

a-coprnu.ads, a-cohata.ads, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
a-cgarso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads, a-chtgke.ads,
a-chtgke.ads, a-coprnu.ads, a-contai.ads, a-chtgke.ads, a-chtgke.adb,
a-stwiha.ads, a-strhas.ads, a-lfztio.ads, a-liztio.ads, a-llfzti.ads,
a-llizti.ads, a-sfztio.ads, a-siztio.ads, a-ssizti.ads, a-stzfix.ads,
a-stzhas.ads, a-szuzha.ads, a-tiunio.ads, a-wwunio.ads, a-ztcoio.ads,
a-ztinio.ads, a-zttest.ads, a-zzunio.ads, a-astaco.ads, a-charac.ads,
a-chlat1.ads, ada.ads, a-dynpri.ads, a-flteio.ads, a-fwteio.ads,
a-inteio.ads, a-intnam.ads, a-ioexce.ads, a-iwteio.ads, a-lfteio.ads,
a-lfwtio.ads, a-liteio.ads, a-liwtio.ads, a-llftio.ads, a-llfwti.ads,
a-llitio.ads, a-lliwti.ads, a-ncelfu.ads, a-ngcefu.ads, a-ngelfu.ads,
a-nlcefu.ads, a-nlcoty.ads, a-nlelfu.ads, a-nllcef.ads, a-nllcty.ads,
a-nllefu.ads, a-nscefu.ads, a-nscoty.ads, a-nselfu.ads, a-nucoty.ads,
a-nuelfu.ads, a-numeri.ads, a-sfteio.ads, a-sfwtio.ads, a-siteio.ads,
a-siwtio.ads, a-ssitio.ads, a-ssiwti.ads, a-storio.ads, a-strfix.ads,
a-string.ads, a-stwifi.ads, a-titest.ads, a-unccon.ads, a-uncdea.ads,
a-wtcoio.ads, a-wtinio.ads, a-wttest.ads, calendar.ads, directio.ads,
i-c.ads, ioexcept.ads, machcode.ads, sequenio.ads, text_io.ads,
unchconv.ads, unchdeal.ads, a-widcha.ads, a-zchara.ads, a-stboha.ads,
a-stfiha.ads, a-coteio.ads, a-envvar.ads, a-lcteio.ads, a-llctio.ads,
a-scteio.ads, a-swbwha.ads, a-swfwha.ads, a-szbzha.ads, a-szfzha.ads,
a-tiboio.ads, a-wwboio.ads, a-zzboio.ads, a-dispat.ads, a-tgdico.ads,
expander.adb, g-socket.ads, par-labl.adb, sinput-c.adb, s-tarest.ads,
s-stchop.ads, g-expect-vms.adb, s-taprop-lynxos.adb,
s-taprop-tru64.adb, s-taprop-irix.adb,
s-taprop-hpux-dce.adb, s-traceb-hpux.adb,
s-taprop-linux.adb, s-taprop-dummy.adb, s-osprim-unix.adb,
s-osprim-solaris.adb, s-taprop-solaris.adb, s-taprop-vms.adb,
s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb,
s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads,
a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb,
a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads,
g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads,
s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb,
s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads,
s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb,
s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads,
s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb,
s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb,
a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads,
a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads,
a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb,
a-cohase.ads, a-swuwha.ads, a-ciormu.ads, a-coormu.ads, a-rbtgso.ads,
a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads,
a-ztexio.adb, a-ztexio.ads: Addition of null-exclusion to anonymous
access types.
Update documentation.
Minor rewording.

From-SVN: r123538

198 files changed:
gcc/ada/a-astaco.ads
gcc/ada/a-cgarso.ads
gcc/ada/a-charac.ads
gcc/ada/a-chlat1.ads
gcc/ada/a-chtgke.adb
gcc/ada/a-chtgke.ads
gcc/ada/a-chtgop.ads
gcc/ada/a-cihama.adb
gcc/ada/a-cihama.ads
gcc/ada/a-cihase.adb
gcc/ada/a-cihase.ads
gcc/ada/a-ciorma.adb
gcc/ada/a-ciormu.adb
gcc/ada/a-ciormu.ads
gcc/ada/a-ciorse.adb
gcc/ada/a-ciorse.ads
gcc/ada/a-cohama.adb
gcc/ada/a-cohama.ads
gcc/ada/a-cohase.adb
gcc/ada/a-cohase.ads
gcc/ada/a-contai.ads
gcc/ada/a-coorma.adb
gcc/ada/a-coormu.adb
gcc/ada/a-coormu.ads
gcc/ada/a-coorse.adb
gcc/ada/a-coorse.ads
gcc/ada/a-coprnu.ads
gcc/ada/a-coteio.ads
gcc/ada/a-crbtgo.adb
gcc/ada/a-crbtgo.ads
gcc/ada/a-dispat.ads
gcc/ada/a-dynpri.ads
gcc/ada/a-envvar.ads
gcc/ada/a-exexpr-gcc.adb
gcc/ada/a-flteio.ads
gcc/ada/a-fwteio.ads
gcc/ada/a-inteio.ads
gcc/ada/a-intnam.ads
gcc/ada/a-ioexce.ads
gcc/ada/a-iwteio.ads
gcc/ada/a-lcteio.ads
gcc/ada/a-lfteio.ads
gcc/ada/a-lfwtio.ads
gcc/ada/a-lfztio.ads
gcc/ada/a-liteio.ads
gcc/ada/a-liwtio.ads
gcc/ada/a-liztio.ads
gcc/ada/a-llctio.ads
gcc/ada/a-llftio.ads
gcc/ada/a-llfwti.ads
gcc/ada/a-llfzti.ads
gcc/ada/a-llitio.ads
gcc/ada/a-lliwti.ads
gcc/ada/a-llizti.ads
gcc/ada/a-ncelfu.ads
gcc/ada/a-ngcefu.ads
gcc/ada/a-ngelfu.ads
gcc/ada/a-nlcefu.ads
gcc/ada/a-nlcoty.ads
gcc/ada/a-nlelfu.ads
gcc/ada/a-nllcef.ads
gcc/ada/a-nllcty.ads
gcc/ada/a-nllefu.ads
gcc/ada/a-nscefu.ads
gcc/ada/a-nscoty.ads
gcc/ada/a-nselfu.ads
gcc/ada/a-nucoty.ads
gcc/ada/a-nuelfu.ads
gcc/ada/a-numeri.ads
gcc/ada/a-rbtgso.ads
gcc/ada/a-scteio.ads
gcc/ada/a-secain.ads
gcc/ada/a-sfteio.ads
gcc/ada/a-sfwtio.ads
gcc/ada/a-sfztio.ads
gcc/ada/a-shcain.ads
gcc/ada/a-siteio.ads
gcc/ada/a-siwtio.ads
gcc/ada/a-siztio.ads
gcc/ada/a-slcain.ads
gcc/ada/a-ssitio.ads
gcc/ada/a-ssiwti.ads
gcc/ada/a-ssizti.ads
gcc/ada/a-stboha.ads
gcc/ada/a-stfiha.ads
gcc/ada/a-storio.ads
gcc/ada/a-strfix.ads
gcc/ada/a-strhas.ads
gcc/ada/a-string.ads
gcc/ada/a-ststio.adb
gcc/ada/a-ststio.ads
gcc/ada/a-stunha.ads
gcc/ada/a-stwifi.ads
gcc/ada/a-stwiha.ads
gcc/ada/a-stzfix.ads
gcc/ada/a-stzhas.ads
gcc/ada/a-swbwha.ads
gcc/ada/a-swfwha.ads
gcc/ada/a-swuwha.ads
gcc/ada/a-szbzha.ads
gcc/ada/a-szfzha.ads
gcc/ada/a-szuzha.ads
gcc/ada/a-textio.adb
gcc/ada/a-textio.ads
gcc/ada/a-tgdico.ads
gcc/ada/a-tiboio.ads
gcc/ada/a-tideau.adb
gcc/ada/a-tideau.ads
gcc/ada/a-titest.ads
gcc/ada/a-tiunio.ads
gcc/ada/a-unccon.ads
gcc/ada/a-uncdea.ads
gcc/ada/a-widcha.ads
gcc/ada/a-witeio.adb
gcc/ada/a-witeio.ads
gcc/ada/a-wtcoio.ads
gcc/ada/a-wtdeau.adb
gcc/ada/a-wtdeau.ads
gcc/ada/a-wtinio.ads
gcc/ada/a-wttest.ads
gcc/ada/a-wwboio.ads
gcc/ada/a-wwunio.ads
gcc/ada/a-zchara.ads
gcc/ada/a-ztcoio.ads
gcc/ada/a-ztdeau.adb
gcc/ada/a-ztdeau.ads
gcc/ada/a-ztexio.adb
gcc/ada/a-ztexio.ads
gcc/ada/a-ztinio.ads
gcc/ada/a-zttest.ads
gcc/ada/a-zzboio.ads
gcc/ada/a-zzunio.ads
gcc/ada/ada.ads
gcc/ada/calendar.ads
gcc/ada/directio.ads
gcc/ada/expander.adb
gcc/ada/g-calend.adb
gcc/ada/g-calend.ads
gcc/ada/g-dirope.adb
gcc/ada/g-expect-vms.adb
gcc/ada/g-expect.ads
gcc/ada/g-socket.ads
gcc/ada/g-spipat.adb
gcc/ada/g-spipat.ads
gcc/ada/gnatchop.adb
gcc/ada/i-c.ads
gcc/ada/i-vxwork-x86.ads
gcc/ada/ioexcept.ads
gcc/ada/machcode.ads
gcc/ada/par-labl.adb
gcc/ada/s-direio.adb
gcc/ada/s-direio.ads
gcc/ada/s-fatgen.adb
gcc/ada/s-fatgen.ads
gcc/ada/s-osprim-mingw.adb
gcc/ada/s-osprim-posix.adb
gcc/ada/s-osprim-solaris.adb
gcc/ada/s-osprim-unix.adb
gcc/ada/s-parint.adb
gcc/ada/s-sequio.adb
gcc/ada/s-sequio.ads
gcc/ada/s-stchop.adb
gcc/ada/s-stchop.ads
gcc/ada/s-taprop-dummy.adb
gcc/ada/s-taprop-hpux-dce.adb
gcc/ada/s-taprop-irix.adb
gcc/ada/s-taprop-linux.adb
gcc/ada/s-taprop-lynxos.adb
gcc/ada/s-taprop-mingw.adb
gcc/ada/s-taprop-posix.adb
gcc/ada/s-taprop-solaris.adb
gcc/ada/s-taprop-tru64.adb
gcc/ada/s-taprop-vms.adb
gcc/ada/s-taprop.ads
gcc/ada/s-tarest.ads
gcc/ada/s-traceb-hpux.adb
gcc/ada/s-valdec.adb
gcc/ada/s-valdec.ads
gcc/ada/s-valint.adb
gcc/ada/s-valint.ads
gcc/ada/s-vallld.adb
gcc/ada/s-vallld.ads
gcc/ada/s-vallli.adb
gcc/ada/s-vallli.ads
gcc/ada/s-valllu.adb
gcc/ada/s-valllu.ads
gcc/ada/s-valrea.adb
gcc/ada/s-valrea.ads
gcc/ada/s-valuns.adb
gcc/ada/s-valuns.ads
gcc/ada/s-valuti.adb
gcc/ada/s-valuti.ads
gcc/ada/sequenio.ads
gcc/ada/sinput-c.adb
gcc/ada/text_io.ads
gcc/ada/unchconv.ads
gcc/ada/unchdeal.ads
gcc/ada/xref_lib.adb

index dad55e0b62325024a84135e5e2ec86df844b5ad3..3200c7ecdaffe6ddbdd6935b645762600193cc41 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 40056361127f94ecc1ba0b1e5553f21c2304fdea..77281b5ef454c31a5019e72cb9b86b134921c526 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 87889587754e414a16bf0dba7fb8102fc90b5831..30af8b812e1e8e50867220d0c654468c92f7435b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 2d8a8bc7a3fb3a975f7b44404d921618f6607002..634d295b272c5d3b6f9237955f71fb99d0b4f923 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index ba6ae2376f4e3de6c0cf933c6aa456107ac4b19c..4aa9ed3b22e7572fc4bd89121f9e3297b38fab78 100644 (file)
@@ -37,9 +37,9 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
    --------------------------
 
    procedure Delete_Key_Sans_Free
-     (HT   : in out Hash_Table_Type;
-      Key  : Key_Type;
-      X    : out Node_Access)
+     (HT  : in out Hash_Table_Type;
+      Key : Key_Type;
+      X   : out Node_Access)
    is
       Indx : Hash_Type;
       Prev : Node_Access;
@@ -59,7 +59,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
 
       if Equivalent_Keys (Key, X) then
          if HT.Busy > 0 then
-            raise Program_Error;
+            raise Program_Error with
+              "attempt to tamper with elements (container is busy)";
          end if;
          HT.Buckets (Indx) := Next (X);
          HT.Length := HT.Length - 1;
@@ -76,7 +77,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
 
          if Equivalent_Keys (Key, X) then
             if HT.Busy > 0 then
-               raise Program_Error;
+               raise Program_Error with
+                 "attempt to tamper with elements (container is busy)";
             end if;
             Set_Next (Node => Prev, Next => Next (X));
             HT.Length := HT.Length - 1;
@@ -130,7 +132,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
    begin
       if B = null then
          if HT.Busy > 0 then
-            raise Program_Error;
+            raise Program_Error with
+              "attempt to tamper with elements (container is busy)";
          end if;
 
          if HT.Length = Count_Type'Last then
@@ -159,7 +162,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
       end loop;
 
       if HT.Busy > 0 then
-         raise Program_Error;
+         raise Program_Error with
+           "attempt to tamper with elements (container is busy)";
       end if;
 
       if HT.Length = Count_Type'Last then
@@ -184,91 +188,129 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
       return Hash (Key) mod HT.Buckets'Length;
    end Index;
 
-   ---------------------
-   -- Replace_Element --
-   ---------------------
+   -----------------------------
+   -- Generic_Replace_Element --
+   -----------------------------
 
    procedure Generic_Replace_Element
      (HT   : in out Hash_Table_Type;
       Node : Node_Access;
       Key  : Key_Type)
    is
-   begin
       pragma Assert (HT.Length > 0);
+      pragma Assert (Node /= null);
+
+      Old_Hash : constant Hash_Type := Hash (Node);
+      Old_Indx : constant Hash_Type := Old_Hash mod HT.Buckets'Length;
+
+      New_Hash : constant Hash_Type := Hash (Key);
+      New_Indx : constant Hash_Type := New_Hash mod HT.Buckets'Length;
 
+      New_Bucket : Node_Access renames HT.Buckets (New_Indx);
+      N, M       : Node_Access;
+
+   begin
       if Equivalent_Keys (Key, Node) then
-         pragma Assert (Hash (Key) = Hash (Node));
+         pragma Assert (New_Hash = Old_Hash);
 
          if HT.Lock > 0 then
             raise Program_Error with
               "attempt to tamper with cursors (container is locked)";
          end if;
 
+         --  We can change a node's key to Key (that's what Assign is for), but
+         --  only if Key is not already in the hash table. (In a unique-key
+         --  hash table as this one a key is mapped to exactly one node only.)
+         --  The exception is when Key is mapped to Node, in which case the
+         --  change is allowed.
+
          Assign (Node, Key);
+         pragma Assert (Hash (Node) = New_Hash);
+         pragma Assert (Equivalent_Keys (Key, Node));
          return;
       end if;
 
-      declare
-         J : Hash_Type;
-         K : constant Hash_Type := Index (HT, Key);
-         B : Node_Access renames HT.Buckets (K);
-         N : Node_Access := B;
-         M : Node_Access;
+      --  Key is not equivalent to Node, so we now have to determine if it's
+      --  equivalent to some other node in the hash table. This is the case
+      --  irrespective of whether Key is in the same or a different bucket from
+      --  Node.
 
-      begin
-         while N /= null loop
-            if Equivalent_Keys (Key, N) then
-               raise Program_Error with
-                 "attempt to replace existing element";
-            end if;
-
-            N := Next (N);
-         end loop;
+      N := New_Bucket;
+      while N /= null loop
+         if Equivalent_Keys (Key, N) then
+            pragma Assert (N /= Node);
+            raise Program_Error with
+              "attempt to replace existing element";
+         end if;
 
-         J := Hash (Node);
+         N := Next (N);
+      end loop;
 
-         if J = K then
-            if HT.Lock > 0 then
-               raise Program_Error with
-                 "attempt to tamper with cursors (container is locked)";
-            end if;
+      --  We have determined that Key is not already in the hash table, so
+      --  the change is tenatively allowed. We now perform the standard
+      --  checks to determine whether the hash table is locked (because you
+      --  cannot change an element while it's in use by Query_Element or
+      --  Update_Element), or if the container is busy (because moving a
+      --  node to a different bucket would interfere with iteration).
 
-            Assign (Node, Key);
-            return;
-         end if;
+      if Old_Indx = New_Indx then
+         --  The node is already in the bucket implied by Key. In this case
+         --  we merely change its value without moving it.
 
-         if HT.Busy > 0 then
+         if HT.Lock > 0 then
             raise Program_Error with
-              "attempt to tamper with elements (container is busy)";
+              "attempt to tamper with cursors (container is locked)";
          end if;
 
          Assign (Node, Key);
+         pragma Assert (Hash (Node) = New_Hash);
+         pragma Assert (Equivalent_Keys (Key, Node));
+         return;
+      end if;
 
-         N := HT.Buckets (J);
-         pragma Assert (N /= null);
+      --  The node is a bucket different from the bucket implied by Key.
 
-         if N = Node then
-            HT.Buckets (J) := Next (Node);
+      if HT.Busy > 0 then
+         raise Program_Error with
+           "attempt to tamper with elements (container is busy)";
+      end if;
 
-         else
-            pragma Assert (HT.Length > 1);
+      --  Do the assignment first, before moving the node, so that if Assign
+      --  propagates an exception, then the hash table will not have been
+      --  modified (except for any possible side-effect Assign had on Node).
 
-            loop
-               M := Next (N);
-               pragma Assert (M /= null);
+      Assign (Node, Key);
+      pragma Assert (Hash (Node) = New_Hash);
+      pragma Assert (Equivalent_Keys (Key, Node));
 
-               if M = Node then
-                  Set_Next (Node => N, Next => Next (Node));
-                  exit;
-               end if;
+      --  Now we can safely remove the node from its current bucket
 
-               N := M;
-            end loop;
-         end if;
+      N := HT.Buckets (Old_Indx);
+      pragma Assert (N /= null);
 
-         Set_Next (Node => Node, Next => B);
-         B := Node;
-      end;
+      if N = Node then
+         HT.Buckets (Old_Indx) := Next (Node);
+
+      else
+         pragma Assert (HT.Length > 1);
+
+         loop
+            M := Next (N);
+            pragma Assert (M /= null);
+
+            if M = Node then
+               Set_Next (Node => N, Next => Next (Node));
+               exit;
+            end if;
+
+            N := M;
+         end loop;
+      end if;
+
+      --  Now we link the node into its new bucket (corresponding to Key)
+
+      Set_Next (Node => Node, Next => New_Bucket);
+      New_Bucket := Node;
    end Generic_Replace_Element;
 
 end Ada.Containers.Hash_Tables.Generic_Keys;
index 259b0126df22b21ae4291f9baae6c471525686c7..833976acacebd8a69c8f6bb471a3cf3c592ddd3a 100644 (file)
@@ -9,10 +9,6 @@
 --                                                                          --
 --          Copyright (C) 2004-2006, Free Software Foundation, Inc.         --
 --                                                                          --
--- This specification is derived from the Ada Reference Manual for use with --
--- GNAT. The copyright notice above, and the license provisions that follow --
--- apply solely to the  contents of the part following the private keyword. --
---                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
@@ -34,6 +30,9 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+--  Hash_Table_Type is used to implement hashed containers. This package
+--  declares hash-table operations that depend on keys.
+
 generic
    with package HT_Types is
      new Generic_Hash_Table_Types (<>);
@@ -61,13 +60,18 @@ package Ada.Containers.Hash_Tables.Generic_Keys is
      (HT  : Hash_Table_Type;
       Key : Key_Type) return Hash_Type;
    pragma Inline (Index);
+   --  Returns the bucket number (array index value) for the given key
 
    procedure Delete_Key_Sans_Free
-     (HT   : in out Hash_Table_Type;
-      Key  : Key_Type;
-      X    : out Node_Access);
+     (HT  : in out Hash_Table_Type;
+      Key : Key_Type;
+      X   : out Node_Access);
+   --  Removes the node (if any) with the given key from the hash table,
+   --  without deallocating it. Program_Error is raised if the hash
+   --  table is busy.
 
    function Find (HT : Hash_Table_Type; Key : Key_Type) return Node_Access;
+   --  Returns the node (if any) corresponding to the given key
 
    generic
       with function New_Node (Next : Node_Access) return Node_Access;
@@ -76,6 +80,11 @@ package Ada.Containers.Hash_Tables.Generic_Keys is
       Key      : Key_Type;
       Node     : out Node_Access;
       Inserted : out Boolean);
+   --  Attempts to insert a new node with the given key into the hash table.
+   --  If a node with that key already exists in the table, then that node
+   --  is returned and Inserted returns False. Otherwise New_Node is called
+   --  to allocate a new node, and Inserted returns True. Program_Error is
+   --  raised if the hash table is busy.
 
    generic
       with function Hash (Node : Node_Access) return Hash_Type;
@@ -84,5 +93,15 @@ package Ada.Containers.Hash_Tables.Generic_Keys is
      (HT   : in out Hash_Table_Type;
       Node : Node_Access;
       Key  : Key_Type);
+   --  Assigns Key to Node, possibly changing its equivalence class. If Node
+   --  is in the same equivalence class as Key (that is, it's already in the
+   --  bucket implied by Key), then if the hash table is locked then
+   --  Program_Error is raised; otherwise Assign is called to assign Key to
+   --  Node. If Node is in a different bucket from Key, then Program_Error is
+   --  raised if the hash table is busy. Otherwise it Assigns Key to Node and
+   --  moves the Node from its current bucket to the bucket implied by Key.
+   --  Note that it is never proper to assign to Node a key value already
+   --  in the map, and so if Key is equivalent to some other node then
+   --  Program_Error is raised.
 
 end Ada.Containers.Hash_Tables.Generic_Keys;
index 7d6e545e27196e46d88f73fc0391b887bcb89cd1..03154219be67fa04f52a4d75642fc002ef4f5935 100644 (file)
@@ -7,13 +7,32 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
--- GNAT.  In accordance with the copyright of that document, you can freely --
--- copy and modify this specification,  provided that if you redistribute a --
--- modified version,  any changes that you have made are clearly indicated. --
+--          Copyright (C) 2004-2006, Free Software Foundation, Inc.         --
 --                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNAT;  see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+--  Hash_Table_Type is used to implement hashed containers. This package
+--  declares hash-table operations that do not depend on keys.
+
 with Ada.Streams;
 
 generic
@@ -39,20 +58,31 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
    pragma Preelaborate;
 
    procedure Free_Hash_Table (Buckets : in out Buckets_Access);
+   --  First frees the nodes in all non-null buckets of Buckets, and then frees
+   --  the Buckets array itself.
 
    function Index
      (Buckets : Buckets_Type;
       Node    : Node_Access) return Hash_Type;
    pragma Inline (Index);
+   --  Uses the hash value of Node to compute its Buckets array index
 
    function Index
      (Hash_Table : Hash_Table_Type;
       Node       : Node_Access) return Hash_Type;
    pragma Inline (Index);
+   --  Uses the hash value of Node to compute its Hash_Table buckets array
+   --  index.
 
    procedure Adjust (HT : in out Hash_Table_Type);
+   --  Used to implement controlled Adjust. It is assumed that HT has the value
+   --  of the bit-wise copy that immediately follows controlled Finalize.
+   --  Adjust first allocates a new buckets array for HT (having the same
+   --  length as the source), and then allocates a copy of each node of source.
 
    procedure Finalize (HT : in out Hash_Table_Type);
+   --  Used to implement controlled Finalize. It first calls Clear to
+   --  deallocate any remaining nodes, and then deallocates the buckets array.
 
    generic
       with function Find
@@ -60,46 +90,77 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
          Key : Node_Access) return Boolean;
    function Generic_Equal
      (L, R : Hash_Table_Type) return Boolean;
+   --  Used to implement hashed container equality. For each node in hash table
+   --  L, it calls Find to search for an equivalent item in hash table R. If
+   --  Find returns False for any node then Generic_Equal terminates
+   --  immediately and returns False. Otherwise if Find returns True for every
+   --  node then Generic_Equal returns True.
 
    procedure Clear (HT : in out Hash_Table_Type);
+   --  Deallocates each node in hash table HT. (Note that it only deallocates
+   --  the nodes, not the buckets array.)  Program_Error is raised if the hash
+   --  table is busy.
 
    procedure Move (Target, Source : in out Hash_Table_Type);
+   --  Moves (not copies) the buckets array and nodes from Source to
+   --  Target. Program_Error is raised if Source is busy. The Target is first
+   --  cleared to deallocate its nodes (implying that Program_Error is also
+   --  raised if Target is busy). Source is empty following the move.
 
    function Capacity (HT : Hash_Table_Type) return Count_Type;
+   --  Returns the length of the buckets array
 
    procedure Reserve_Capacity
      (HT : in out Hash_Table_Type;
       N  : Count_Type);
+   --  If N is greater than the current capacity, then it expands the buckets
+   --  array to at least the value N. If N is less than the current capacity,
+   --  then it contracts the buckets array. In either case existing nodes are
+   --  rehashed onto the new buckets array, and the old buckets array is
+   --  deallocated. Program_Error is raised if the hash table is busy.
 
    procedure Delete_Node_Sans_Free
      (HT : in out Hash_Table_Type;
       X  : Node_Access);
+   --  Removes node X from the hash table without deallocating the node
 
    function First (HT : Hash_Table_Type) return Node_Access;
+   --  Returns the head of the list in the first (lowest-index) non-empty
+   --  bucket.
 
    function Next
      (HT   : Hash_Table_Type;
       Node : Node_Access) return Node_Access;
+   --  Returns the node that immediately follows Node. This corresponds to
+   --  either the next node in the same bucket, or (if Node is the last node in
+   --  its bucket) the head of the list in the first non-empty bucket that
+   --  follows.
 
    generic
       with procedure Process (Node : Node_Access);
    procedure Generic_Iteration (HT : Hash_Table_Type);
+   --  Calls Process for each node in hash table HT
 
    generic
       use Ada.Streams;
       with procedure Write
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
    procedure Generic_Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       HT     : Hash_Table_Type);
+   --  Used to implement the streaming attribute for hashed containers. It
+   --  calls Write for each node to write its value into Stream.
 
    generic
       use Ada.Streams;
-      with function New_Node (Stream : access Root_Stream_Type'Class)
+      with function New_Node (Stream : not null access Root_Stream_Type'Class)
          return Node_Access;
    procedure Generic_Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       HT     : out Hash_Table_Type);
+   --  Used to implement the streaming attribute for hashed containers. It
+   --  first clears hash table HT, then populates the hash table by calling
+   --  New_Node for each item in Stream.
 
 end Ada.Containers.Hash_Tables.Generic_Operations;
index 24ca33bdb2ca4875c7c2843f831ea17cd96ac7d9..8b9c545422cf3dd44e623b8f80da0190db27d58b 100644 (file)
@@ -72,7 +72,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    pragma Inline (Next);
 
    function Read_Node
-     (Stream : access Root_Stream_Type'Class) return Node_Access;
+     (Stream : not null access Root_Stream_Type'Class) return Node_Access;
 
    procedure Set_Next (Node : Node_Access; Next : Node_Access);
    pragma Inline (Set_Next);
@@ -80,7 +80,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    function Vet (Position : Cursor) return Boolean;
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access);
 
    --------------------------
@@ -772,7 +772,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    procedure Read_Nodes is new HT_Ops.Generic_Read (Read_Node);
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Map)
    is
    begin
@@ -780,7 +780,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -792,7 +792,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    ---------------
 
    function Read_Node
-     (Stream : access Root_Stream_Type'Class) return Node_Access
+     (Stream : not null access Root_Stream_Type'Class) return Node_Access
    is
       Node : Node_Access := new Node_Type;
 
@@ -1050,7 +1050,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    procedure Write_Nodes is new HT_Ops.Generic_Write (Write_Node);
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Map)
    is
    begin
@@ -1058,7 +1058,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
@@ -1070,7 +1070,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
    ----------------
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access)
    is
    begin
index b1b4630376aa23bfcdc74afc2c5237c15e1f49bb..6d0e883fd1d18de44188d9f6231d39ee719f504c 100644 (file)
@@ -198,13 +198,13 @@ private
       end record;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
@@ -214,13 +214,13 @@ private
       Node      => null);
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Map);
 
    for Map'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Map);
 
    for Map'Read use Read;
index 1731ea708d10c9c80edddceca507f028d68ac8de..12acb459eb5114307cd0435dc69b57ad96e740f8 100644 (file)
@@ -84,7 +84,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    function Next (Node : Node_Access) return Node_Access;
    pragma Inline (Next);
 
-   function Read_Node (Stream : access Root_Stream_Type'Class)
+   function Read_Node (Stream : not null access Root_Stream_Type'Class)
      return Node_Access;
    pragma Inline (Read_Node);
 
@@ -94,7 +94,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    function Vet (Position : Cursor) return Boolean;
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access);
    pragma Inline (Write_Node);
 
@@ -1094,7 +1094,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    ----------
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set)
    is
    begin
@@ -1102,7 +1102,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -1114,7 +1114,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    ---------------
 
    function Read_Node
-     (Stream : access Root_Stream_Type'Class) return Node_Access
+     (Stream : not null access Root_Stream_Type'Class) return Node_Access
    is
       X : Element_Access := new Element_Type'(Element_Type'Input (Stream));
 
@@ -1730,7 +1730,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    -----------
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set)
    is
    begin
@@ -1738,7 +1738,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
@@ -1750,7 +1750,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
    ----------------
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access)
    is
    begin
index 0d36adfe609911b7998791c6e66b2aa71f9f8abe..6dab3bfdcdbec230637ea6c20c5b0bd9c8e4ecf2 100644 (file)
@@ -241,13 +241,13 @@ private
       end record;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
@@ -257,13 +257,13 @@ private
                    Node      => null);
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set);
 
    for Set'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set);
 
    for Set'Read use Read;
index dc806bc32fba94941accc682b6744b421ec97963..794fc44771b3d5f03e4b09ca1db4b4a201ef9582 100644 (file)
@@ -1048,7 +1048,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
       Container : out Map)
    is
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access;
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access;
       pragma Inline (Read_Node);
 
       procedure Read is
@@ -1059,7 +1059,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
       ---------------
 
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access
       is
          Node : Node_Access := new Node_Type;
       begin
@@ -1326,7 +1326,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
       Container : Map)
    is
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
       pragma Inline (Write_Node);
 
@@ -1338,7 +1338,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
       ----------------
 
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access)
       is
       begin
index f3af12e27857876b0e3bb861dacf0c01a306320a..f097fdc833b4c09b0a84639f15c27c01aa6c5ea3 100644 (file)
@@ -1508,11 +1508,11 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
    ----------
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set)
    is
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access;
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access;
       pragma Inline (Read_Node);
 
       procedure Read is
@@ -1523,7 +1523,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
       ---------------
 
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access
       is
          Node : Node_Access := new Node_Type;
       begin
@@ -1542,7 +1542,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -1823,11 +1823,11 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
    -----------
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set)
    is
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
       pragma Inline (Write_Node);
 
@@ -1839,7 +1839,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
       ----------------
 
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access)
       is
       begin
@@ -1853,7 +1853,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
index 0bcf19c440bb417a8e80611c8dab10077a2ef36c..518ab351072058187231cee10ee1cf3ee729b15a 100644 (file)
@@ -277,25 +277,27 @@ private
    end record;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
 
    No_Element : constant Cursor := Cursor'(null, null);
 
-   procedure Write (Stream : access Root_Stream_Type'Class; Container : Set);
+   procedure Write
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : Set);
 
    for Set'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set);
 
    for Set'Read use Read;
index adc34abf9505019f05fd0bba6f9c8b32859c12de..51a882a93abe75f67299434ac6b9733ec83a47f5 100644 (file)
@@ -1382,11 +1382,11 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
    ----------
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set)
    is
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access;
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access;
       pragma Inline (Read_Node);
 
       procedure Read is
@@ -1397,7 +1397,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
       ---------------
 
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access
       is
          Node : Node_Access := new Node_Type;
 
@@ -1418,7 +1418,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -1717,11 +1717,11 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
    -----------
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set)
    is
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
       pragma Inline (Write_Node);
 
@@ -1733,7 +1733,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
       ----------------
 
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access)
       is
       begin
@@ -1747,7 +1747,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
index 3fc5f45275281e110691701520afd5a35ee23c45..895a31796cff36fe400ada4de2380503f885fd07 100644 (file)
@@ -281,13 +281,13 @@ private
    end record;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
@@ -295,13 +295,13 @@ private
    No_Element : constant Cursor := Cursor'(null, null);
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set);
 
    for Set'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set);
 
    for Set'Read use Read;
index 01058cd2fc661ad627468f611d2d366edb9abe56..b00e9770fc8587a4ec2287eaf0b3883658a91f91 100644 (file)
@@ -65,7 +65,7 @@ package body Ada.Containers.Hashed_Maps is
    pragma Inline (Next);
 
    function Read_Node
-     (Stream : access Root_Stream_Type'Class) return Node_Access;
+     (Stream : not null access Root_Stream_Type'Class) return Node_Access;
    pragma Inline (Read_Node);
 
    procedure Set_Next (Node : Node_Access; Next : Node_Access);
@@ -74,7 +74,7 @@ package body Ada.Containers.Hashed_Maps is
    function Vet (Position : Cursor) return Boolean;
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access);
    pragma Inline (Write_Node);
 
@@ -703,7 +703,7 @@ package body Ada.Containers.Hashed_Maps is
    ----------
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Map)
    is
    begin
@@ -711,7 +711,7 @@ package body Ada.Containers.Hashed_Maps is
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -723,7 +723,7 @@ package body Ada.Containers.Hashed_Maps is
    ---------------
 
    function Read_Node
-     (Stream : access Root_Stream_Type'Class) return Node_Access
+     (Stream : not null access Root_Stream_Type'Class) return Node_Access
    is
       Node : Node_Access := new Node_Type;
 
@@ -924,7 +924,7 @@ package body Ada.Containers.Hashed_Maps is
    -----------
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Map)
    is
    begin
@@ -932,7 +932,7 @@ package body Ada.Containers.Hashed_Maps is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
@@ -944,7 +944,7 @@ package body Ada.Containers.Hashed_Maps is
    ----------------
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access)
    is
    begin
index f090c82f99e4442502f582393c5d9707cdf3ab69..a0bbad4e955b9aedcc4738392c748180a537882c 100644 (file)
@@ -192,13 +192,13 @@ private
    use Ada.Streams;
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Map);
 
    for Map'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Map);
 
    for Map'Read use Read;
@@ -215,13 +215,13 @@ private
       end record;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
index 0f0552a941df1cac2bb8d46ce2438dced2029126..2328e3f33657304f2d0a938da57d5e025beaf1ae 100644 (file)
@@ -85,7 +85,7 @@ package body Ada.Containers.Hashed_Sets is
    function Next (Node : Node_Access) return Node_Access;
    pragma Inline (Next);
 
-   function Read_Node (Stream : access Root_Stream_Type'Class)
+   function Read_Node (Stream : not null access Root_Stream_Type'Class)
      return Node_Access;
    pragma Inline (Read_Node);
 
@@ -95,7 +95,7 @@ package body Ada.Containers.Hashed_Sets is
    function Vet (Position : Cursor) return Boolean;
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access);
    pragma Inline (Write_Node);
 
@@ -1009,15 +1009,15 @@ package body Ada.Containers.Hashed_Sets is
    ----------
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
-      Container :    out Set)
+     (Stream    : not null access Root_Stream_Type'Class;
+      Container : out Set)
    is
    begin
       Read_Nodes (Stream, Container.HT);
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -1028,7 +1028,7 @@ package body Ada.Containers.Hashed_Sets is
    -- Read_Node --
    ---------------
 
-   function Read_Node (Stream : access Root_Stream_Type'Class)
+   function Read_Node (Stream : not null access Root_Stream_Type'Class)
      return Node_Access
    is
       Node : Node_Access := new Node_Type;
@@ -1561,7 +1561,7 @@ package body Ada.Containers.Hashed_Sets is
    -----------
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set)
    is
    begin
@@ -1569,7 +1569,7 @@ package body Ada.Containers.Hashed_Sets is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
@@ -1581,7 +1581,7 @@ package body Ada.Containers.Hashed_Sets is
    ----------------
 
    procedure Write_Node
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Node   : Node_Access)
    is
    begin
index b0eb14cc2909fa794d7d86db883b635144b61929..5c32f51b53e5771a45004c7826c4cac47860281e 100644 (file)
@@ -238,13 +238,13 @@ private
       end record;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
@@ -252,13 +252,13 @@ private
    No_Element : constant Cursor := (Container => null, Node => null);
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set);
 
    for Set'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set);
 
    for Set'Read use Read;
index 41d99b1f628a72def0f2d52d7f5dbb337788ea1e..a453d6bacad1f09f3d76b5e92d6ccf13da4bdb2b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 81e0d4eb24650b700675c6fbd1f74cf2bd66cf52..f6823d4f7b223e2c115f4999771ecc2f64145102 100644 (file)
@@ -962,7 +962,7 @@ package body Ada.Containers.Ordered_Maps is
       Container : out Map)
    is
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access;
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access;
       pragma Inline (Read_Node);
 
       procedure Read is
@@ -973,7 +973,7 @@ package body Ada.Containers.Ordered_Maps is
       ---------------
 
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access
       is
          Node : Node_Access := new Node_Type;
       begin
@@ -1206,7 +1206,7 @@ package body Ada.Containers.Ordered_Maps is
       Container : Map)
    is
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
       pragma Inline (Write_Node);
 
@@ -1218,7 +1218,7 @@ package body Ada.Containers.Ordered_Maps is
       ----------------
 
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access)
       is
       begin
index 912bde390254b6d42e1ece52f08c8e6c2c55a01a..8000c9911108c739b8c4ce458d322ec4d195ded9 100644 (file)
@@ -1425,11 +1425,11 @@ package body Ada.Containers.Ordered_Multisets is
    ----------
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set)
    is
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access;
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access;
       pragma Inline (Read_Node);
 
       procedure Read is
@@ -1440,7 +1440,7 @@ package body Ada.Containers.Ordered_Multisets is
       ---------------
 
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access
       is
          Node : Node_Access := new Node_Type;
       begin
@@ -1459,7 +1459,7 @@ package body Ada.Containers.Ordered_Multisets is
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -1729,11 +1729,11 @@ package body Ada.Containers.Ordered_Multisets is
    -----------
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set)
    is
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
       pragma Inline (Write_Node);
 
@@ -1745,7 +1745,7 @@ package body Ada.Containers.Ordered_Multisets is
       ----------------
 
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access)
       is
       begin
@@ -1759,7 +1759,7 @@ package body Ada.Containers.Ordered_Multisets is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
index ff32f8c1559ffb428859d1d9aba6bb9a7b1c9088..df300130e76d4531885901e8fe9ede08ad082227 100644 (file)
@@ -282,13 +282,13 @@ private
    end record;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
@@ -296,13 +296,13 @@ private
    No_Element : constant Cursor := Cursor'(null, null);
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set);
 
    for Set'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set);
 
    for Set'Read use Read;
index d407feadfd1d700b220900d00672daeb2dfca825..3cd02332c3c52dc856f552472d9bf654f1e8d360 100644 (file)
@@ -1297,11 +1297,11 @@ package body Ada.Containers.Ordered_Sets is
    ----------
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set)
    is
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access;
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access;
       pragma Inline (Read_Node);
 
       procedure Read is
@@ -1312,7 +1312,7 @@ package body Ada.Containers.Ordered_Sets is
       ---------------
 
       function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access
       is
          Node : Node_Access := new Node_Type;
 
@@ -1333,7 +1333,7 @@ package body Ada.Containers.Ordered_Sets is
    end Read;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor)
    is
    begin
@@ -1618,11 +1618,11 @@ package body Ada.Containers.Ordered_Sets is
    -----------
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set)
    is
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
       pragma Inline (Write_Node);
 
@@ -1634,7 +1634,7 @@ package body Ada.Containers.Ordered_Sets is
       ----------------
 
       procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access)
       is
       begin
@@ -1648,7 +1648,7 @@ package body Ada.Containers.Ordered_Sets is
    end Write;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor)
    is
    begin
index 2cc8accad53975c2da0809e3a1b19c121cf4881d..47208653ef4d2467428a00421791b45cd491e9bc 100644 (file)
@@ -270,13 +270,13 @@ private
    end record;
 
    procedure Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : Cursor);
 
    for Cursor'Write use Write;
 
    procedure Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Item   : out Cursor);
 
    for Cursor'Read use Read;
@@ -284,13 +284,13 @@ private
    No_Element : constant Cursor := Cursor'(null, null);
 
    procedure Write
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : Set);
 
    for Set'Write use Write;
 
    procedure Read
-     (Stream    : access Root_Stream_Type'Class;
+     (Stream    : not null access Root_Stream_Type'Class;
       Container : out Set);
 
    for Set'Read use Read;
index 20e49d87996c9b9da57149104487357bc68d2aca..0f832d125e6a7f3a39e61bb4c034a96c62ebd75d 100644 (file)
@@ -6,13 +6,34 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
--- GNAT.  In accordance with the copyright of that document, you can freely --
--- copy and modify this specification,  provided that if you redistribute a --
--- modified version,  any changes that you have made are clearly indicated. --
+--          Copyright (C) 2004-2006, Free Software Foundation, Inc.         --
 --                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNAT;  see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
+--  This package declares the prime numbers array used to implement hashed
+--  containers. Bucket arrays are always allocated with a prime-number
+--  length (computed using To_Prime below), as this produces better scatter
+--  when hash values are folded.
+
 package Ada.Containers.Prime_Numbers is
    pragma Pure;
 
@@ -27,5 +48,6 @@ package Ada.Containers.Prime_Numbers is
       1610612741, 3221225473, 4294967291);
 
    function To_Prime (Length : Count_Type) return Hash_Type;
+   --  Returns the smallest value in Primes not less than Length
 
 end Ada.Containers.Prime_Numbers;
index 72fc34c16e5ef1e6247d73605ce8a815b8a1358c..abba889ecdfa3fb4f1d185ee17791b1d9b0c8f01 100755 (executable)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index a9f63942fe1c243670c783736ddaca9aa726c829..4afce91a4f31f0904d26ceac65cb1b5c7f312f7a 100644 (file)
@@ -698,7 +698,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Operations is
    ------------------
 
    procedure Generic_Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Tree   : in out Tree_Type)
    is
       N : Count_Type'Base;
@@ -776,7 +776,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Operations is
    -------------------
 
    procedure Generic_Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Tree   : Tree_Type)
    is
       procedure Process (Node : Node_Access);
index 0415f5be2de0347039c58c385b423b8fefba32b1..a55e65f8e8951eda4df8e03f29032a4a978add76 100644 (file)
@@ -137,10 +137,10 @@ package Ada.Containers.Red_Black_Trees.Generic_Operations is
 
    generic
       with procedure Write_Node
-        (Stream : access Root_Stream_Type'Class;
+        (Stream : not null access Root_Stream_Type'Class;
          Node   : Node_Access);
    procedure Generic_Write
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Tree   : Tree_Type);
    --  Used to implement stream attribute T'Write. Generic_Write
    --  first writes the number of nodes into Stream, then calls
@@ -149,9 +149,9 @@ package Ada.Containers.Red_Black_Trees.Generic_Operations is
    generic
       with procedure Clear (Tree : in out Tree_Type);
       with function Read_Node
-        (Stream : access Root_Stream_Type'Class) return Node_Access;
+        (Stream : not null access Root_Stream_Type'Class) return Node_Access;
    procedure Generic_Read
-     (Stream : access Root_Stream_Type'Class;
+     (Stream : not null access Root_Stream_Type'Class;
       Tree   : in out Tree_Type);
    --  Used to implement stream attribute T'Read. Generic_Read
    --  first clears Tree. It then reads the number of nodes out of
index 5403653cafbd3beae6a68e57755944963c8bac6d..b350ae0eb619d7817dc0764db426f370bf1738fe 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 2006, Free Software Foundation, Inc.            --
---                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index e179f46ea405d082368cc720b695c0dad1d7d340..03e02d635477794e403171e14946143e34c04b7d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 2b0229c50697c1aae8ed93100c1197d292078d7c..a2415603e4ebdd71abd540e5df02bd10797a064d 100755 (executable)
@@ -6,13 +6,11 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2005-2006, Free Software Foundation, Inc.         --
---                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
----                                                                          --
+--                                                                          --
 ------------------------------------------------------------------------------
 
 package Ada.Environment_Variables is
index fdec8d0399567441933718eeb202309d4bab8a61..4b6f904c2e774f520a151abc9a9c2888782ccd5b 100644 (file)
@@ -179,7 +179,7 @@ package body Exception_Propagation is
      (UW_Version   : Integer;
       UW_Phases    : Unwind_Action;
       UW_Eclass    : Exception_Class;
-      UW_Exception : access GNAT_GCC_Exception;
+      UW_Exception : not null access GNAT_GCC_Exception;
       UW_Context   : System.Address;
       UW_Argument  : System.Address) return Unwind_Reason_Code;
    --  Hook called at each step of the forced unwinding we perform to
@@ -191,11 +191,11 @@ package body Exception_Propagation is
    --  __gnat stubs for these.
 
    procedure Unwind_RaiseException
-     (UW_Exception : access GNAT_GCC_Exception);
+     (UW_Exception : not null access GNAT_GCC_Exception);
    pragma Import (C, Unwind_RaiseException, "__gnat_Unwind_RaiseException");
 
    procedure Unwind_ForcedUnwind
-     (UW_Exception : access GNAT_GCC_Exception;
+     (UW_Exception : not null access GNAT_GCC_Exception;
       UW_Handler   : System.Address;
       UW_Argument  : System.Address);
    pragma Import (C, Unwind_ForcedUnwind, "__gnat_Unwind_ForcedUnwind");
@@ -353,7 +353,7 @@ package body Exception_Propagation is
      (UW_Version   : Integer;
       UW_Phases    : Unwind_Action;
       UW_Eclass    : Exception_Class;
-      UW_Exception : access GNAT_GCC_Exception;
+      UW_Exception : not null access GNAT_GCC_Exception;
       UW_Context   : System.Address;
       UW_Argument  : System.Address) return Unwind_Reason_Code
    is
index 4c3bdc1ec91ffbad44647fba1fa8b83323d69c19..caf4e9b7534e1fcb837697d71b094f9e4dfff9f5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 118d0064b8060cb4a3351620b198d47a5bd2c88a..e87e08a9ca3d8557f9fb6b740abff5b2c5e4d507 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index f8340dce0a4804cea8f0523fbba990707a0dc0f6..b2b3867a5bd4aff1288427d3dc008dcf6de34568 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 2969d558e66ec96df6e9f15d52c4e3ba794584de..e055d6aa17e9ad905958ef75fdf9f21fd2458a7b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index d4c6ee5d2943890a965e442712e603604d3760ee..43239ddb066f9146fd2fa819bff1878216c6c485 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 34d7b62584f442a63addbf04a8a0a9c05130da6a..dc53046eab7f6cb9c389323a933b3326c01dd9e0 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 8db0c0e9f40f86d015b4e195e55f2f45f843d3a1..f9da97c8da09bf2a149669a3f844f17ad4372ee3 100755 (executable)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 1b577cf6611ec04273970fbddb5536cb5844f03d..1477047e3ad36addcf7b0b160bccadf70e26062e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 3190443564c2cec4372f2a74ed0a63eea4788930..86361414e46ffd680f8dccc3e7d41759bf5223a5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index bbdcbae7e23d1fa2ca5818b626c5965c59a64604..f1719b148a721b0457b2b9d4979c6a8f81e8bd3a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index da7b442f74ae034807f239fc90cdb32dbd84362a..535f6b0d57bcd3c8ca71d9fe2b4a887b7fe56bcd 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 477959375da6d8a116ebac90c2f3dc95241b0664..56fad9a67a8840151ee9a1afcefd645d2a17f978 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 9ce4383f08b01f075cd237048c72e8a196ef1ee8..100ef0a6a9efc8ae1b045654116c8c01a560859b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 70947a117824e6e297e31bfea0d75f0a6bce7d2b..3b53bf7c76d59cd1409535833dcfe2ed9c777b58 100755 (executable)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 669c1b59c680b481c9711ec431f636036fe25d23..589232d02400b4a2d082fce57c68693025319dec 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 76b47a30f4079e25084caa738ebb91583fd80fbf..b26aecdb94c48ef197fed70859dcd4a6565477d1 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 1c03246b1f8f0c8b656f58d297f65a5324d2cfd4..fa92ef40a6520c56d2e618c5ce2dadc73ecb694a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 8788c68c089e29a176d31f18c97dfac5fcb2644d..e1537276d1a6b2c7ea109418167e864f8c216f90 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index d4064c81ca6481da563612c23fe6ef486522f8db..13a0f21436bdee8d58f9c98b3630819cb9630ed8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 9ab6d41a0cbe80dfd38efb347a2049839ccfa14f..09d3219f35075f05e9d40998fd9c04ef77130bc1 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 0f8e585a3bd23fe1490fc73ed71303d59098f2ee..e81730f08cdc9a92f3ee561e0ce05d5e381254a2 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index a60f668f278def336d0e9c11d6827cb7ea737460..576c84ab267f04232898218d33e98f79f8baade4 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index c115411ca89bee7efca19df83e28ce82fef4612d..d84828a7ccb6b4ecec8938c2a1844b1ba7bc0bc5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index df3e4916acc1c283a911b39fd9355077405fad48..9e985dfca6ab8cfa5b07ff38872aff13b1bf7709 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 7e021ae66b9ebeb6a4a68c1191b07a8f6eb8b02a..6eb4fc3b9922e9fb48fdc8f594434699244a37a8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index db0bd25a815d537a1858744b9356babc08d027eb..10b33e9cb3c7a9dc8ddb033a1e2dfa702db05053 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 54b5b39af9eb0a240d473c81bc6b6dbcb82dd20e..2867e1dbb0371b771aed0dd1a3ff0e2a80250843 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 371b757dc66e64a738f9938c27327168ad814d64..a6081c28b2123a1f51352d6935f35161fd20d656 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 55d55ffdbab3852c0bdb5031ed602c6076a40dd9..7089fc3efb0daef2721039cc7b324c907f359bf5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index f7d17c6ffda15823911c096bad8727c53534591a..ac89d051c87078081b44a230b793290814c3038d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index b4e3f500e2255e2c5966b51dc78876c886240c69..e58b0b56e581e03653572460ec563f49cb0cd97d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 3ad54aef629ea7aa8bd5311b8de242df988e8faa..10b04acdeb9432ef838acafa3cdc0ac2c505f5c4 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 97e224bb7f3014c2e0a3fa0f9dcf829d4ba9c28b..3b04a2712d039956cbcf493b7ed43f30806a7cf3 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 57fdb1c6eec4e3f8e6802a429b2e07124bbab9e4..149939babea13b193dd7807aee0781f25fd5c255 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 4d25bce476bedc0315fc2bfa66b80d61bda2d042..998e24bc28f55922d843d0e18498161045ea6099 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 4c3d668f719215166fdc79236c53140f67bba38f..c39dc6e3fce99706b9ef0f9b66be1a0c78bf5a46 100644 (file)
@@ -59,25 +59,51 @@ package Ada.Containers.Red_Black_Trees.Generic_Set_Operations is
    pragma Pure;
 
    procedure Union (Target : in out Tree_Type; Source : Tree_Type);
+   --  Attempts to insert each element of Source in Target. If Target is
+   --  busy then Program_Error is raised. We say "attempts" here because
+   --  if these are unique-element sets, then the insertion should fail
+   --  (not insert a new item) when the insertion item from Source is
+   --  equivalent to an item already in Target. If these are multisets
+   --  then of course the attempt should always succeed.
 
    function Union (Left, Right : Tree_Type) return Tree_Type;
+   --  Makes a copy of Left, and attempts to insert each element of
+   --  Right into the copy, then returns the copy.
 
    procedure Intersection (Target : in out Tree_Type; Source : Tree_Type);
+   --  Removes elements from Target that are not equivalent to items in
+   --  Source. If Target is busy then Program_Error is raised.
 
    function Intersection (Left, Right : Tree_Type) return Tree_Type;
+   --  Returns a set comprising all the items in Left equivalent to items in
+   --  Right.
 
    procedure Difference (Target : in out Tree_Type; Source : Tree_Type);
+   --  Removes elements from Target that are equivalent to items in Source. If
+   --  Target is busy then Program_Error is raised.
 
    function Difference (Left, Right : Tree_Type) return Tree_Type;
+   --  Returns a set comprising all the items in Left not equivalent to items
+   --  in Right.
 
    procedure Symmetric_Difference
      (Target : in out Tree_Type;
       Source : Tree_Type);
+   --  Removes from Target elements that are equivalent to items in Source, and
+   --  inserts into Target items from Source not equivalent elements in
+   --  Target. If Target is busy then Program_Error is raised.
 
    function Symmetric_Difference (Left, Right : Tree_Type) return Tree_Type;
+   --  Returns a set comprising the union of the elements in Left not
+   --  equivalent to items in Right, and the elements in Right not equivalent
+   --  to items in Left.
 
    function Is_Subset (Subset : Tree_Type; Of_Set : Tree_Type) return Boolean;
+   --  Returns False if Subset contains at least one element not equivalent to
+   --  any item in Of_Set; returns True otherwise.
 
    function Overlap (Left, Right : Tree_Type) return Boolean;
+   --  Returns True if at least one element of Left is equivalent to an item in
+   --  Right; returns False otherwise.
 
 end Ada.Containers.Red_Black_Trees.Generic_Set_Operations;
index f8623d8296320b696b1f9df36046cb404f3648f3..d9ceb2f9c2749a854ec63a0275278d6da5fd7a49 100755 (executable)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 3a4b4d8bc0b4f054294e39949012ea76ed3e65cc..38f2ef04f57fa84457c671b1e522ea1da39546ab 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 15ab2a76ad54777c563dd2e1fc4e906f24d0d1cd..a1f18cd8555e8b5fd6aace86ba358227f877e26f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index d6136d565c27e9ab22527e56183969990096d8fa..3ac134e939e275b3243a1bf878e3386648f34fea 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 24458458a12809a748cde6c7824272c28ea8951e..bc34e5d5a828a607dd7ee4cbcf87f48deba46c16 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index a6e083c1e472c6539ac5e0edad7266d3ebaa4077..c7263b602fed353a42667631fd911bfb167f0d35 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 9f3e5e1c585a459fb7f02a7b0e622b22edcf6506..de45c22cce1467b613453770072be0a89eeff8e2 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 618a01658b7ed643f40cb35213e921256f54f1db..aa1a2d4562b6c9cf3bf642a3b3ab84fdd2382a09 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 4d4107769ef336d7413be47bab71084469fd6ffa..3d6f5cdf17c2d31e255c528b55da2193ea61b152 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index c54c6f24ec47fb716c3f1dff08b18543a603789e..2bb2d1ad4c7a62e6c358a4115252725dad2d2b6f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index a323230023d842971f47ea8fa1104eb42b9aca53..98b0540889e420aeed488a4b691002f61442fcfc 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index af5d1abde10fec73e729581aa6c43dcc41ed8022..5f6934ba60def84668d2f678e4fcf64fdd67682e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index d200170c27360c0ed0ff7f55c4f89d6c5a726494..13bfda846667ba8483c1fd6cd5559aa436a3562e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 999850e9ef1a7c8e27ba9eff8ec1b4a4d6f9ed78..876af2a5df3f85371596e2ccd68065bdfefece3f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                S p e c                                   --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 23380034625d2f27bee56f9fbd4909bc2011ec0b..aba42e7c678fff97e7ac344675a2b31ec86be559 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                S p e c                                   --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index e5268c803999ba31ff3e4339707351bdaae80c5a..db0a70bbe4fdece473ff3b29f30439a3e9a2fa32 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 04087925f7d9ded71f21a6857e861272fcfe2776..875219a1c9bdfcb62dff480c727cebc131cac4ee 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index cb11fc056f306a0f68100c15c067ded355d52be0..7d33bf7d019cbbf2066a4d26e43762cff703b2ed 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                S p e c                                   --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index a599c2be8c4d71b0b0ef53b271e32dae950605ae..51ca10247215efd49858e020fb2de27685858d46 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 7091d5d9f7b3bad3f3f753e696e5e8a1e3b6cd4e..d1084d64b5bf4a5df39a205551deccbff7f1861c 100644 (file)
@@ -76,7 +76,7 @@ package body Ada.Streams.Stream_IO is
 
    --  No special processing required for closing Stream_IO file
 
-   procedure AFCB_Close (File : access Stream_AFCB) is
+   procedure AFCB_Close (File : not null access Stream_AFCB) is
       pragma Warnings (Off, File);
    begin
       null;
@@ -86,7 +86,7 @@ package body Ada.Streams.Stream_IO is
    -- AFCB_Free --
    ---------------
 
-   procedure AFCB_Free (File : access Stream_AFCB) is
+   procedure AFCB_Free (File : not null access Stream_AFCB) is
       type FCB_Ptr is access all Stream_AFCB;
       FT : FCB_Ptr := FCB_Ptr (File);
 
index 232672985d57f410ffe38abea3062921be866858..edcec9a139a89440fab63dd3a7a2be091de335ac 100644 (file)
@@ -176,8 +176,8 @@ private
 
    function AFCB_Allocate (Control_Block : Stream_AFCB) return FCB.AFCB_Ptr;
 
-   procedure AFCB_Close (File : access Stream_AFCB);
-   procedure AFCB_Free  (File : access Stream_AFCB);
+   procedure AFCB_Close (File : not null access Stream_AFCB);
+   procedure AFCB_Free  (File : not null access Stream_AFCB);
 
    procedure Read
      (File : in out Stream_AFCB;
index acf04716762a089e2d5b221725606bfe862e7df3..1e45bdb5abca6c5e298a056eccb7157d3efc1763 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index be2e03803fbfeed9dc37980c8d56a1602e4b8a0b..5d9ea3f584d3689ae16a46fe79ecdd334f0db1fc 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 3b0af1fc751ade8f1a655d84ea07e2658bc6319e..f8f0b52fb94f8e1b2e6ae8cc59d376971411d660 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 1670b381ce4ed926fc7b6c6209013de578d2244f..4c3f80b4bdbdacfb0a3b2905ea9b149d07dcfdd5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 8a8436c33df901b359d2b0b4c2a11778c0450d26..dea0ff14670a99f85303278456a04d51bfbce26a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 59479527c30596540f484142d0e1afcb14739e72..6a4fba76ffe02d64c52bbc1f0ad16d596618a595 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                S p e c                                   --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index ebabe865b70960f3f32cbfaf015933877a67b940..c42d54cd56a8885122f8c8ff2197cb9524cb7341 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                S p e c                                   --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 1fcb41007f8f3c8068ab31f25266c4e466f5e44a..69cf76227a4dc9939f3cbd727db1c2303e321ee6 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index b368d7934148c28669ac1b97d299726bd1aa1597..42c6452d4f13b4d7d2c0bd4e2c2b88e8f8a44fed 100644 (file)
@@ -7,7 +7,7 @@
 --                                                                          --
 --                                S p e c                                   --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 1753fc7462c1a2df5b49d007cbd52e01259fbe78..fbc6e87908b43762ca60e9202123dfe564d6d05f 100644 (file)
@@ -7,7 +7,7 @@
 --                                                                          --
 --                                S p e c                                   --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 1e07fbdbd2ba9b3cd04e94cab1eda4e004614dcb..94bed28eb90f5999cc2dbe732adbe383bdc31109 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 0e6dd3240c1c44ed1443b074237807b4d35e9acb..aa566dac23032ebab02aae88cf9d4e72f57c6bc0 100644 (file)
@@ -69,7 +69,7 @@ package body Ada.Text_IO is
    -- AFCB_Close --
    ----------------
 
-   procedure AFCB_Close (File : access Text_AFCB) is
+   procedure AFCB_Close (File : not null access Text_AFCB) is
    begin
       --  If the file being closed is one of the current files, then close
       --  the corresponding current file. It is not clear that this action
@@ -91,7 +91,7 @@ package body Ada.Text_IO is
    -- AFCB_Free --
    ---------------
 
-   procedure AFCB_Free (File : access Text_AFCB) is
+   procedure AFCB_Free (File : not null access Text_AFCB) is
       type FCB_Ptr is access all Text_AFCB;
       FT : FCB_Ptr := FCB_Ptr (File);
 
index 50ba549285a6bcb484433d9e0645a32ce992de93..dec8ee7f891c244f9590d23e282600a8cf080068 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -370,8 +370,8 @@ private
 
    function AFCB_Allocate (Control_Block : Text_AFCB) return FCB.AFCB_Ptr;
 
-   procedure AFCB_Close (File : access Text_AFCB);
-   procedure AFCB_Free  (File : access Text_AFCB);
+   procedure AFCB_Close (File : not null access Text_AFCB);
+   procedure AFCB_Free  (File : not null access Text_AFCB);
 
    procedure Read
      (File : in out Text_AFCB;
index 51e3d80df05849d81a28ad85aa210d55360443e7..d1150fd5991a52d0f2182fb34874909f1a8548aa 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
@@ -19,10 +19,12 @@ pragma Warnings (Off);
 generic
    type T (<>) is abstract tagged limited private;
    type Parameters (<>) is limited private;
-   with function Constructor (Params : access Parameters) return T is abstract;
+   with function Constructor (Params : not null access Parameters) return T
+     is abstract;
 
 function Ada.Tags.Generic_Dispatching_Constructor
-  (The_Tag : Tag; Params : access Parameters) return T'Class;
+  (The_Tag : Tag;
+   Params  : not null access Parameters) return T'Class;
 pragma Preelaborate_05 (Generic_Dispatching_Constructor);
 pragma Import (Intrinsic, Generic_Dispatching_Constructor);
 --  Note: the reason that we use Preelaborate_05 here is so that this will
index 4f23c7ed92cee433fa35d169e06c13cfb7a6954b..1824c1d2c50e7e51b2cab510e8eba490805e9eca 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1997-2005, Free Software Foundation, Inc.         --
---                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 5be5f66f074018eccab209bd9d680d83b1819465..06a41ee791dfa483ab4e4f361c10847bd5d66cb7 100644 (file)
@@ -103,7 +103,7 @@ package body Ada.Text_IO.Decimal_Aux is
 
    function Gets_Dec
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Integer
    is
       Pos  : aliased Integer;
@@ -127,7 +127,7 @@ package body Ada.Text_IO.Decimal_Aux is
 
    function Gets_LLD
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Long_Long_Integer
    is
       Pos  : aliased Integer;
index 9855e5b423710ff0e9c565369efe3b9ea508df14..7d513aee55aebfc2a54800ea4467b7e2d741b659 100644 (file)
@@ -69,12 +69,12 @@ private package Ada.Text_IO.Decimal_Aux is
 
    function Gets_Dec
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Integer;
 
    function Gets_LLD
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Long_Long_Integer;
 
    procedure Puts_Dec
index d2fa2e7b3f6742594d21ca5bf985d7e903df72e5..93cf47aad7be16242a011490ae2c88441f8aac92 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 68f8a17ebebf8f55225cedf7f78fdad064a45da6..ea5caecf599a064540f9985934ca6571788379e0 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 3306c3bbca9ff6b063029ddaabd61a8f7a9f7d88..ffa84d9fad2b1436e59809aeebabc27f7f828055 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 66b64dd1590f2b50892ac95c346c6112c3114cf2..d566b4b343fff701203ceef670329a3f9d39c372 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 371c1c16599ba5c0c0fd73a5178cfa29221bbbfc..a5dde73f43c25901459d140ac6bf68f0a3bee1ee 100755 (executable)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 7f72c1cec9d2bb30da6715601451a61768b66272..07e3fd268710111e32a790623fc7fc1f9d869bcd 100644 (file)
@@ -96,7 +96,7 @@ package body Ada.Wide_Text_IO is
    -- AFCB_Close --
    ----------------
 
-   procedure AFCB_Close (File : access Wide_Text_AFCB) is
+   procedure AFCB_Close (File : not null access Wide_Text_AFCB) is
    begin
       --  If the file being closed is one of the current files, then close
       --  the corresponding current file. It is not clear that this action
@@ -118,7 +118,7 @@ package body Ada.Wide_Text_IO is
    -- AFCB_Free --
    ---------------
 
-   procedure AFCB_Free (File : access Wide_Text_AFCB) is
+   procedure AFCB_Free (File : not null access Wide_Text_AFCB) is
       type FCB_Ptr is access all Wide_Text_AFCB;
       FT : FCB_Ptr := FCB_Ptr (File);
 
index 9430187ca98a5563d95253482d894e83cc21d10a..70636a711d5dd0e572a363e1684bfed2cea00ec3 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -393,8 +393,8 @@ private
 
    function AFCB_Allocate (Control_Block : Wide_Text_AFCB) return FCB.AFCB_Ptr;
 
-   procedure AFCB_Close (File : access Wide_Text_AFCB);
-   procedure AFCB_Free  (File : access Wide_Text_AFCB);
+   procedure AFCB_Close (File : not null access Wide_Text_AFCB);
+   procedure AFCB_Free  (File : not null access Wide_Text_AFCB);
 
    procedure Read
      (File : in out Wide_Text_AFCB;
index 84a5f1405f1c1eaee685f38e17a274730b769755..31fab2b6f229c7f6a6d59c38e6956d3deda0297d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 6b6286537f0f1b55a18358ab2cc632f1ba9d1d49..fd6cc2eea42cc152dff4ef3549f4dcab4590e5e9 100644 (file)
@@ -103,7 +103,7 @@ package body Ada.Wide_Text_IO.Decimal_Aux is
 
    function Gets_Dec
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Integer
    is
       Pos  : aliased Integer;
@@ -128,7 +128,7 @@ package body Ada.Wide_Text_IO.Decimal_Aux is
 
    function Gets_LLD
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Long_Long_Integer
    is
       Pos  : aliased Integer;
index f8983ebd83d2128d619dc2cb02a7fd50d1e300e7..b469a3574e361e66e90eac8aea00a61d251cf5a5 100644 (file)
@@ -54,12 +54,12 @@ private package Ada.Wide_Text_IO.Decimal_Aux is
 
    function Gets_Dec
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Integer;
 
    function Gets_LLD
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Long_Long_Integer;
 
    procedure Put_Dec
index 257ba23ac96c4fd37c3dce90f272cc7bc0f5477b..b078ee379bb177a1593708bfa14c504939a1b028 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index c209e0e401d3258e329e5c4ffa7f726f5fbaf712..7c180ff182f48c0441c9de5acda3a1602cc0fb5b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 634a265facf724cc191ee1f87561e047260a69c8..2b8dd2a16a6f614d38a75a87a050b63cc77b868d 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1997-2005, Free Software Foundation, Inc.         --
---                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index ed7c31b805f5db351a37c3e2cac0cb4a3891d77a..de044c580e0a8e055bfde9f58f2caa2345ac8e5e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 0802bfc62f4fbafc75228eb2dd1faf7af9366ff9..d8d5f9f50bb6d5160d021cf966f0958646f53de7 100755 (executable)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 641065b760c6156d2cb96d8ffba505092cea8348..866fd879c642f4dc10114f2a813a2a6bd4b490c7 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index b6b9b94c440c27562fb6e43721e078f539f5d577..d36d34fb8bd6120c01ef872b65a4eeb6bfbaf6d4 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -103,7 +103,7 @@ package body Ada.Wide_Wide_Text_IO.Decimal_Aux is
 
    function Gets_Dec
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Integer
    is
       Pos  : aliased Integer;
@@ -128,7 +128,7 @@ package body Ada.Wide_Wide_Text_IO.Decimal_Aux is
 
    function Gets_LLD
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Long_Long_Integer
    is
       Pos  : aliased Integer;
index ba9ffcb42d301a1c72169fca6d201620a861fe39..e61bc93ffc5684541e6d40e93fbaab76d340d9eb 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -54,12 +54,12 @@ private package Ada.Wide_Wide_Text_IO.Decimal_Aux is
 
    function Gets_Dec
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Integer;
 
    function Gets_LLD
      (From  : String;
-      Last  : access Positive;
+      Last  : not null access Positive;
       Scale : Integer) return Long_Long_Integer;
 
    procedure Put_Dec
index daadd54b4dece02ff340e8fcca7a0f04cd10bb64..47de699ba705c4926199818ea3bbc390476abf6c 100644 (file)
@@ -96,7 +96,7 @@ package body Ada.Wide_Wide_Text_IO is
    -- AFCB_Close --
    ----------------
 
-   procedure AFCB_Close (File : access Wide_Wide_Text_AFCB) is
+   procedure AFCB_Close (File : not null access Wide_Wide_Text_AFCB) is
    begin
       --  If the file being closed is one of the current files, then close
       --  the corresponding current file. It is not clear that this action
@@ -118,7 +118,7 @@ package body Ada.Wide_Wide_Text_IO is
    -- AFCB_Free --
    ---------------
 
-   procedure AFCB_Free (File : access Wide_Wide_Text_AFCB) is
+   procedure AFCB_Free (File : not null access Wide_Wide_Text_AFCB) is
       type FCB_Ptr is access all Wide_Wide_Text_AFCB;
       FT : FCB_Ptr := FCB_Ptr (File);
 
index 000d104e16b120b8e520db6544be6933a1b83ebc..e200b17c32eff4c92e9cdb893dc035d09bdc054b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
@@ -395,8 +395,8 @@ private
    function AFCB_Allocate
      (Control_Block : Wide_Wide_Text_AFCB) return FCB.AFCB_Ptr;
 
-   procedure AFCB_Close (File : access Wide_Wide_Text_AFCB);
-   procedure AFCB_Free  (File : access Wide_Wide_Text_AFCB);
+   procedure AFCB_Close (File : not null access Wide_Wide_Text_AFCB);
+   procedure AFCB_Free  (File : not null access Wide_Wide_Text_AFCB);
 
    procedure Read
      (File : in out Wide_Wide_Text_AFCB;
index 4efd6841ade21a8bc05746fc3c8ce0f108b10925..4358e7b1e68d9c6279b97668fcd672d3e3f2db3f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index b417ecac9253af75c0fc0ba47c47bbad717f5073..1599253d20ff3bebc4f1574fffe80ffd3f628651 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 83b4ed9f10fdb3a9a38329b1fb061f18527ef6b7..68157e965d7d27d7eb580c7d080bb3e04eb359eb 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1997-2005, Free Software Foundation, Inc.         --
---                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index f54d515ec27297a488e2477927976daac7cc01ca..1695b06298a081a4133146128658bf7f5c0bfae6 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 2e9f35c8cd2eba2292d2b2c17245f09741dc07c9..8c860110f92d23147b4760a3f4e90628948121c6 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 92e93cfca4c34037b1a1ffbd089bbbd4d95c744b..7b13a6f2389e9efe8a95c4988d477f8c527953ea 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index c8239ec60048148e712ce85d2c2db8211968cfcd..b69ca4467e16c13f833daf5eabf455512f93c4e4 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 91191941b162ff27bc60f2e8f1fc4f01eb7a1006..103716a98b380458213f7cfe02819b794796923f 100644 (file)
@@ -55,10 +55,10 @@ package body Expander is
    -- Local Data --
    ----------------
 
-   --  The following table is used to save values of the Expander_Active
-   --  flag when they are saved by Expander_Mode_Save_And_Set. We use an
-   --  extendible table (which is a bit of overkill) because it is easier
-   --  than figuring out a maximum value or bothering with range checks!
+   --  The following table is used to save values of the Expander_Active flag
+   --  when they are saved by Expander_Mode_Save_And_Set. We use an extendible
+   --  table (which is a bit of overkill) because it is easier than figuring
+   --  out a maximum value or bothering with range checks!
 
    package Expander_Flags is new Table.Table (
      Table_Component_Type => Boolean,
@@ -74,17 +74,16 @@ package body Expander is
 
    procedure Expand (N : Node_Id) is
    begin
-      --  If we were analyzing a default expression the Full_Analysis flag
-      --  must be off. If we are in expansion mode then we must be
-      --  performing a full analysis. If we are analyzing a generic then
-      --  Expansion must be off.
+      --  If we were analyzing a default expression the Full_Analysis flag must
+      --  be off. If we are in expansion mode then we must be performing a full
+      --  analysis. If we are analyzing a generic then Expansion must be off.
 
       pragma Assert
         (not (Full_Analysis and then In_Default_Expression)
-         and then (Full_Analysis or else not Expander_Active)
-         and then not (Inside_A_Generic and then Expander_Active));
+          and then (Full_Analysis or else not Expander_Active)
+          and then not (Inside_A_Generic and then Expander_Active));
 
-      --  There are three reasons for the Expander_Active flag to be false.
+      --  There are three reasons for the Expander_Active flag to be false
       --
       --  The first is when are not generating code. In this mode the
       --  Full_Analysis flag indicates whether we are performing a complete
@@ -93,19 +92,18 @@ package body Expander is
       --  info on this.
       --
       --  The second reason for the Expander_Active flag to be False is that
-      --  we are performing a pre-analysis. During pre-analysis all
-      --  expansion activity is turned off to make sure nodes are
-      --  semantically decorated but no extra nodes are generated.  This is
-      --  for instance needed for the first pass of aggregate semantic
-      --  processing. Note that in this case the Full_Analysis flag is set
-      --  to False because the node will subsequently be re-analyzed with
-      --  expansion on (see the spec of sem).
+      --  we are performing a pre-analysis. During pre-analysis all expansion
+      --  activity is turned off to make sure nodes are semantically decorated
+      --  but no extra nodes are generated. This is for instance needed for
+      --  the first pass of aggregate semantic processing. Note that in this
+      --  case the Full_Analysis flag is set to False because the node will
+      --  subsequently be re-analyzed with expansion on (see the spec of sem).
 
       --  Finally, expansion is turned off in a regular compilation if there
       --  are serious errors. In that case there will be no further expansion,
       --  but one cleanup action may be required: if a transient scope was
-      --  created (e.g. for a function that returns an unconstrained type)
-      --  the scope may still be on the stack, and must be removed explicitly,
+      --  created (e.g. for a function that returns an unconstrained type) the
+      --  scope may still be on the stack, and must be removed explicitly,
       --  given that the expansion actions that would normally process it will
       --  not take place. This prevents cascaded errors due to stack mismatch.
 
@@ -129,8 +127,8 @@ package body Expander is
          Debug_A_Entry ("expanding  ", N);
 
          --  Processing depends on node kind. For full details on the expansion
-         --  activity required in each case, see bodies of corresponding
-         --  expand routines
+         --  activity required in each case, see bodies of corresponding expand
+         --  routines.
 
          begin
             case Nkind (N) is
@@ -490,9 +488,9 @@ package body Expander is
       Expander_Active := Expander_Flags.Table (Expander_Flags.Last);
       Expander_Flags.Decrement_Last;
 
-      --  Keep expander off if serious errors detected. In this case we do
-      --  not need expansion, and continued expansion may cause cascaded
-      --  errors or compiler bombs.
+      --  Keep expander off if serious errors detected. In this case we do not
+      --  need expansion, and continued expansion may cause cascaded errors or
+      --  compiler bombs.
 
       if Serious_Errors_Detected /= 0 then
          Expander_Active := False;
index ea8f28a3a68bc932f338f372a500b5d0079e031f..3fec4a093e8098adae97919a811c34015e934064 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                     Copyright (C) 1999-2005, AdaCore                     --
+--                     Copyright (C) 1999-2006, AdaCore                     --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -41,13 +41,13 @@ package body GNAT.Calendar is
    -----------------
 
    function Day_In_Year (Date : Time) return Day_In_Year_Number is
-      Year  : Year_Number;
-      Month : Month_Number;
-      Day   : Day_Number;
-      Dsecs : Day_Duration;
+      Year     : Year_Number;
+      Month    : Month_Number;
+      Day      : Day_Number;
+      Day_Secs : Day_Duration;
 
    begin
-      Split (Date, Year, Month, Day, Dsecs);
+      Split (Date, Year, Month, Day, Day_Secs);
 
       return Julian_Day (Year, Month, Day) - Julian_Day (Year, 1, 1) + 1;
    end Day_In_Year;
@@ -57,13 +57,13 @@ package body GNAT.Calendar is
    -----------------
 
    function Day_Of_Week (Date : Time) return Day_Name is
-      Year  : Year_Number;
-      Month : Month_Number;
-      Day   : Day_Number;
-      Dsecs : Day_Duration;
+      Year     : Year_Number;
+      Month    : Month_Number;
+      Day      : Day_Number;
+      Day_Secs : Day_Duration;
 
    begin
-      Split (Date, Year, Month, Day, Dsecs);
+      Split (Date, Year, Month, Day, Day_Secs);
 
       return Day_Name'Val ((Julian_Day (Year, Month, Day)) mod 7);
    end Day_Of_Week;
@@ -90,8 +90,8 @@ package body GNAT.Calendar is
    -- Julian_Day --
    ----------------
 
-   --  Julian_Day is used to by Day_Of_Week and Day_In_Year. Note
-   --  that this implementation is not expensive.
+   --  Julian_Day is used to by Day_Of_Week and Day_In_Year. Note that this
+   --  implementation is not expensive.
 
    function Julian_Day
      (Year  : Year_Number;
@@ -178,21 +178,21 @@ package body GNAT.Calendar is
       Second     : out Second_Number;
       Sub_Second : out Second_Duration)
    is
-      Dsecs : Day_Duration;
-      Secs  : Natural;
+      Day_Secs : Day_Duration;
+      Secs     : Natural;
 
    begin
-      Split (Date, Year, Month, Day, Dsecs);
+      Split (Date, Year, Month, Day, Day_Secs);
 
-      if Dsecs = 0.0 then
+      if Day_Secs = 0.0 then
          Secs := 0;
       else
-         Secs := Natural (Dsecs - 0.5);
+         Secs := Natural (Day_Secs - 0.5);
       end if;
 
-      Sub_Second := Second_Duration (Dsecs - Day_Duration (Secs));
-      Hour       := Hour_Number (Secs / 3600);
-      Secs       := Secs mod 3600;
+      Sub_Second := Second_Duration (Day_Secs - Day_Duration (Secs));
+      Hour       := Hour_Number (Secs / 3_600);
+      Secs       := Secs mod 3_600;
       Minute     := Minute_Number (Secs / 60);
       Second     := Second_Number (Secs mod 60);
    end Split;
@@ -228,23 +228,25 @@ package body GNAT.Calendar is
       Second     : Second_Number;
       Sub_Second : Second_Duration := 0.0) return Time
    is
-      Dsecs : constant Day_Duration :=
-                Day_Duration (Hour * 3600 + Minute * 60 + Second) +
-                                                             Sub_Second;
+      Day_Secs : constant Day_Duration :=
+                   Day_Duration (Hour   * 3_600) +
+                   Day_Duration (Minute *    60) +
+                   Day_Duration (Second)         +
+                                 Sub_Second;
    begin
-      return Time_Of (Year, Month, Day, Dsecs);
+      return Time_Of (Year, Month, Day, Day_Secs);
    end Time_Of;
 
    -----------------
    -- To_Duration --
    -----------------
 
-   function To_Duration (T : access timeval) return Duration is
+   function To_Duration (T : not null access timeval) return Duration is
 
       procedure timeval_to_duration
-        (T    : access timeval;
-         sec  : access C.long;
-         usec : access C.long);
+        (T    : not null access timeval;
+         sec  : not null access C.long;
+         usec : not null access C.long);
       pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration");
 
       Micro : constant := 10**6;
@@ -260,9 +262,12 @@ package body GNAT.Calendar is
    -- To_Timeval --
    ----------------
 
-   function To_Timeval  (D : Duration) return timeval is
+   function To_Timeval (D : Duration) return timeval is
 
-      procedure duration_to_timeval (Sec, Usec : C.long; T : access timeval);
+      procedure duration_to_timeval
+        (Sec  : C.long;
+         Usec : C.long;
+         T : not null access timeval);
       pragma Import (C, duration_to_timeval, "__gnat_duration_to_timeval");
 
       Micro  : constant := 10**6;
@@ -288,9 +293,7 @@ package body GNAT.Calendar is
    -- Week_In_Year --
    ------------------
 
-   function Week_In_Year
-     (Date : Ada.Calendar.Time) return Week_In_Year_Number
-   is
+   function Week_In_Year (Date : Time) return Week_In_Year_Number is
       Year       : Year_Number;
       Month      : Month_Number;
       Day        : Day_Number;
index 8288635da74553bb84d4ccc89cf690947a7d0128..e8b43456371e50d1798c6cfba87d070161c5bb89 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1999-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1999-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -106,7 +106,7 @@ package GNAT.Calendar is
 
    type timeval is private;
 
-   function To_Duration (T : access timeval) return Duration;
+   function To_Duration (T : not null access timeval) return Duration;
    function To_Timeval  (D : Duration) return timeval;
 
 private
index 5302969ac716ed65e516bb9059db0ba4ddadd6d2..99ce7ea349e7a41863e8226df8e79dd5d89c31d8 100644 (file)
@@ -661,7 +661,7 @@ package body GNAT.Directory_Operations is
       function readdir_gnat
         (Directory : System.Address;
          Buffer    : System.Address;
-         Last      : access Integer) return System.Address;
+         Last      : not null access Integer) return System.Address;
       pragma Import (C, readdir_gnat, "__gnat_readdir");
 
    begin
index 2381c66c45a78753c26dec4bc6f42f2ca82421d8..55ede6536c92a75100e99ba736b374e624566f64 100644 (file)
@@ -95,7 +95,7 @@ package body GNAT.Expect is
    procedure Kill (Pid : Process_Id; Sig_Num : Integer);
    pragma Import (C, Kill, "decc$kill");
 
-   function Create_Pipe (Pipe : access Pipe_Type) return Integer;
+   function Create_Pipe (Pipe : not null access Pipe_Type) return Integer;
    pragma Import (C, Create_Pipe, "__gnat_pipe");
 
    function Poll
@@ -769,7 +769,7 @@ package body GNAT.Expect is
      (Command    : String;
       Arguments  : GNAT.OS_Lib.Argument_List;
       Input      : String;
-      Status     : access Integer;
+      Status     : not null access Integer;
       Err_To_Out : Boolean := False) return String
    is
       use GNAT.Expect;
@@ -1096,9 +1096,9 @@ package body GNAT.Expect is
    procedure Set_Up_Communications
      (Pid        : in out Process_Descriptor;
       Err_To_Out : Boolean;
-      Pipe1      : access Pipe_Type;
-      Pipe2      : access Pipe_Type;
-      Pipe3      : access Pipe_Type)
+      Pipe1      : not null access Pipe_Type;
+      Pipe2      : not null access Pipe_Type;
+      Pipe3      : not null access Pipe_Type)
    is
    begin
       --  Create the pipes
index b47a3a487d7c6d0e339af760167b8b9cd6beb112..7cc1bad531f5e4b2c30908dfa387f4ca18024142 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                     Copyright (C) 2000-2005, AdaCore                     --
+--                     Copyright (C) 2000-2006, AdaCore                     --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -229,7 +229,7 @@ package GNAT.Expect is
      (Command    : String;
       Arguments  : GNAT.OS_Lib.Argument_List;
       Input      : String;
-      Status     : access Integer;
+      Status     : not null access Integer;
       Err_To_Out : Boolean := False) return String;
    --  Execute Command with the specified Arguments and Input, and return the
    --  generated standard output data as a single string. If Err_To_Out is
@@ -555,9 +555,9 @@ private
    procedure Set_Up_Communications
      (Pid        : in out Process_Descriptor;
       Err_To_Out : Boolean;
-      Pipe1      : access Pipe_Type;
-      Pipe2      : access Pipe_Type;
-      Pipe3      : access Pipe_Type);
+      Pipe1      : not null access Pipe_Type;
+      Pipe2      : not null access Pipe_Type;
+      Pipe3      : not null access Pipe_Type);
    --  Set up all the communication pipes and file descriptors prior to
    --  spawning the child process.
 
@@ -601,7 +601,7 @@ private
    --  possibly in future child units providing extensions to this package.
 
    procedure Portable_Execvp
-     (Pid  : access Process_Id;
+     (Pid  : not null access Process_Id;
       Cmd  : String;
       Args : System.Address);
    pragma Import (C, Portable_Execvp, "__gnat_expect_portable_execvp");
index 3e974a213ab6b810b5f6a8c818c44bda7ea14b57..b585a2164201195f005dad453f68443ecc8f2a61 100644 (file)
@@ -881,8 +881,7 @@ package GNAT.Sockets is
    type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class;
    --  Same interface as Ada.Streams.Stream_IO
 
-   function Stream
-     (Socket : Socket_Type) return Stream_Access;
+   function Stream (Socket : Socket_Type) return Stream_Access;
    --  Create a stream associated with a stream-based socket that is
    --  already connected.
 
@@ -892,8 +891,7 @@ package GNAT.Sockets is
    --  Create a stream associated with a datagram-based socket that is already
    --  bound. Send_To is the socket address to which messages are being sent.
 
-   function Get_Address
-     (Stream : Stream_Access) return Sock_Addr_Type;
+   function Get_Address (Stream : Stream_Access) return Sock_Addr_Type;
    --  Return the socket address from which the last message was received
 
    procedure Free is new Ada.Unchecked_Deallocation
@@ -921,8 +919,7 @@ package GNAT.Sockets is
    --  Extract a Socket from socket set Item. Socket is set to
    --  No_Socket when the set is empty.
 
-   function Is_Empty
-     (Item : Socket_Set_Type) return Boolean;
+   function Is_Empty (Item : Socket_Set_Type) return Boolean;
    --  Return True iff Item is empty
 
    function Is_Set
index a7a3af690e43f9f2b691bdb971d48272b93ff348..af6afc233f3e598b3294143ba13d0e8a65b7cee2 100644 (file)
@@ -1646,7 +1646,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_Any_CS, 1, EOP, Str));
    end Any;
 
-   function Any (Str : access VString) return Pattern is
+   function Any (Str : not null access VString) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_Any_VP, 1, EOP, VString_Ptr (Str)));
    end Any;
@@ -1825,7 +1825,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_Break_CS, 1, EOP, Str));
    end Break;
 
-   function Break (Str : access VString) return Pattern is
+   function Break (Str : not null access VString) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_Break_VP, 1, EOP, VString_Ptr (Str)));
    end Break;
@@ -1859,7 +1859,7 @@ package body GNAT.Spitbol.Patterns is
       return BreakX_Make (new PE'(PC_BreakX_CS, 3, N, Str));
    end BreakX;
 
-   function BreakX (Str : access VString) return Pattern is
+   function BreakX (Str : not null access VString) return Pattern is
    begin
       return BreakX_Make (new PE'(PC_BreakX_VP, 3, N, VString_Ptr (Str)));
    end BreakX;
@@ -2779,7 +2779,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_Len_NF, 1, EOP, Count));
    end Len;
 
-   function Len (Count : access Natural) return Pattern is
+   function Len (Count : not null access Natural) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_Len_NP, 1, EOP, Natural_Ptr (Count)));
    end Len;
@@ -3266,7 +3266,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_NotAny_CS, 1, EOP, Str));
    end NotAny;
 
-   function NotAny (Str : access VString) return Pattern is
+   function NotAny (Str : not null access VString) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_NotAny_VP, 1, EOP, VString_Ptr (Str)));
    end NotAny;
@@ -3300,7 +3300,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_NSpan_CS, 1, EOP, Str));
    end NSpan;
 
-   function NSpan (Str : access VString) return Pattern is
+   function NSpan (Str : not null access VString) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_NSpan_VP, 1, EOP, VString_Ptr (Str)));
    end NSpan;
@@ -3324,7 +3324,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_Pos_NF, 1, EOP, Count));
    end Pos;
 
-   function Pos (Count : access Natural) return Pattern is
+   function Pos (Count : not null access Natural) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_Pos_NP, 1, EOP, Natural_Ptr (Count)));
    end Pos;
@@ -3394,7 +3394,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_RPos_NF, 1, EOP, Count));
    end Rpos;
 
-   function Rpos (Count : access Natural) return Pattern is
+   function Rpos (Count : not null access Natural) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_RPos_NP, 1, EOP, Natural_Ptr (Count)));
    end Rpos;
@@ -3413,7 +3413,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_RTab_NF, 1, EOP, Count));
    end Rtab;
 
-   function Rtab (Count : access Natural) return Pattern is
+   function Rtab (Count : not null access Natural) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_RTab_NP, 1, EOP, Natural_Ptr (Count)));
    end Rtab;
@@ -3500,7 +3500,7 @@ package body GNAT.Spitbol.Patterns is
    -- Setcur --
    ------------
 
-   function Setcur (Var : access Natural) return Pattern is
+   function Setcur (Var : not null access Natural) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_Setcur, 1, EOP, Natural_Ptr (Var)));
    end Setcur;
@@ -3529,7 +3529,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_Span_CS, 1, EOP, Str));
    end Span;
 
-   function Span (Str : access VString) return Pattern is
+   function Span (Str : not null access VString) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_Span_VP, 1, EOP, VString_Ptr (Str)));
    end Span;
@@ -3628,7 +3628,7 @@ package body GNAT.Spitbol.Patterns is
       return (AFC with 0, new PE'(PC_Tab_NF, 1, EOP, Count));
    end Tab;
 
-   function Tab (Count : access Natural) return Pattern is
+   function Tab (Count : not null access Natural) return Pattern is
    begin
       return (AFC with 0, new PE'(PC_Tab_NP, 1, EOP, Natural_Ptr (Count)));
    end Tab;
index 31cbef67d6bde761ccbfb661dbce6c571916614f..fd1281c8ce70d63d39e82d4beddf8e028f98c945 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                     Copyright (C) 1997-2005, AdaCore                     --
+--                     Copyright (C) 1997-2006, AdaCore                     --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -782,7 +782,7 @@ package GNAT.Spitbol.Patterns is
    function Any    (Str : VString)                          return Pattern;
    function Any    (Str : Character)                        return Pattern;
    function Any    (Str : Character_Set)                    return Pattern;
-   function Any    (Str : access VString)                   return Pattern;
+   function Any    (Str : not null access VString)          return Pattern;
    function Any    (Str : VString_Func)                     return Pattern;
    --  Constructs a pattern that matches a single character that is one of
    --  the characters in the given argument. The pattern fails if the current
@@ -797,7 +797,7 @@ package GNAT.Spitbol.Patterns is
    function Break  (Str : VString)                          return Pattern;
    function Break  (Str : Character)                        return Pattern;
    function Break  (Str : Character_Set)                    return Pattern;
-   function Break  (Str : access VString)                   return Pattern;
+   function Break  (Str : not null access VString)          return Pattern;
    function Break  (Str : VString_Func)                     return Pattern;
    --  Constructs a pattern that matches a (possibly null) string which
    --  is immediately followed by a character in the given argument. This
@@ -809,7 +809,7 @@ package GNAT.Spitbol.Patterns is
    function BreakX (Str : VString)                          return Pattern;
    function BreakX (Str : Character)                        return Pattern;
    function BreakX (Str : Character_Set)                    return Pattern;
-   function BreakX (Str : access VString)                   return Pattern;
+   function BreakX (Str : not null access VString)          return Pattern;
    function BreakX (Str : VString_Func)                     return Pattern;
    --  Like Break, but the pattern attempts to extend on a failure to find
    --  the next occurrence of a character in Str, and only fails when the
@@ -833,7 +833,7 @@ package GNAT.Spitbol.Patterns is
    --  one attempt is made to match P, without trying alternatives.
 
    function Len    (Count : Natural)                        return Pattern;
-   function Len    (Count : access Natural)                 return Pattern;
+   function Len    (Count : not null access Natural)        return Pattern;
    function Len    (Count : Natural_Func)                   return Pattern;
    --  Constructs a pattern that matches exactly the given number of
    --  characters. The pattern fails if fewer than this number of characters
@@ -843,7 +843,7 @@ package GNAT.Spitbol.Patterns is
    function NotAny (Str : VString)                          return Pattern;
    function NotAny (Str : Character)                        return Pattern;
    function NotAny (Str : Character_Set)                    return Pattern;
-   function NotAny (Str : access VString)                   return Pattern;
+   function NotAny (Str : not null access VString)          return Pattern;
    function NotAny (Str : VString_Func)                     return Pattern;
    --  Constructs a pattern that matches a single character that is not
    --  one of the characters in the given argument. The pattern Fails if
@@ -853,14 +853,14 @@ package GNAT.Spitbol.Patterns is
    function NSpan  (Str : VString)                          return Pattern;
    function NSpan  (Str : Character)                        return Pattern;
    function NSpan  (Str : Character_Set)                    return Pattern;
-   function NSpan  (Str : access VString)                   return Pattern;
+   function NSpan  (Str : not null access VString)          return Pattern;
    function NSpan  (Str : VString_Func)                     return Pattern;
    --  Constructs a pattern that matches the longest possible string
    --  consisting entirely of characters from the given argument. The
    --  string may be empty, so this pattern always succeeds.
 
    function Pos    (Count : Natural)                        return Pattern;
-   function Pos    (Count : access Natural)                 return Pattern;
+   function Pos    (Count : not null access Natural)        return Pattern;
    function Pos    (Count : Natural_Func)                   return Pattern;
    --  Constructs a pattern that matches the null string if exactly Count
    --  characters have already been matched, and otherwise fails.
@@ -870,19 +870,19 @@ package GNAT.Spitbol.Patterns is
    --  unmatched characters in the pattern.
 
    function Rpos   (Count : Natural)                        return Pattern;
-   function Rpos   (Count : access Natural)                 return Pattern;
+   function Rpos   (Count : not null access Natural)        return Pattern;
    function Rpos   (Count : Natural_Func)                   return Pattern;
    --  Constructs a pattern that matches the null string if exactly Count
    --  characters remain to be matched in the string, and otherwise fails.
 
    function Rtab   (Count : Natural)                        return Pattern;
-   function Rtab   (Count : access Natural)                 return Pattern;
+   function Rtab   (Count : not null access Natural)        return Pattern;
    function Rtab   (Count : Natural_Func)                   return Pattern;
    --  Constructs a pattern that matches from the current location until
    --  exactly Count characters remain to be matched in the string. The
    --  pattern fails if fewer than Count characters remain to be matched.
 
-   function Setcur (Var : access Natural)                   return Pattern;
+   function Setcur (Var : not null access Natural)          return Pattern;
    --  Constructs a pattern that matches the null string, and assigns the
    --  current cursor position in the string. This value is the number of
    --  characters matched so far. So it is zero at the start of the match.
@@ -891,7 +891,7 @@ package GNAT.Spitbol.Patterns is
    function Span   (Str : VString)                          return Pattern;
    function Span   (Str : Character)                        return Pattern;
    function Span   (Str : Character_Set)                    return Pattern;
-   function Span   (Str : access VString)                   return Pattern;
+   function Span   (Str : not null access VString)          return Pattern;
    function Span   (Str : VString_Func)                     return Pattern;
    --  Constructs a pattern that matches the longest possible string
    --  consisting entirely of characters from the given argument. The
@@ -904,7 +904,7 @@ package GNAT.Spitbol.Patterns is
    --  infinite alternation of null strings.
 
    function Tab    (Count : Natural)                        return Pattern;
-   function Tab    (Count : access Natural)                 return Pattern;
+   function Tab    (Count : not null access Natural)        return Pattern;
    function Tab    (Count : Natural_Func)                   return Pattern;
    --  Constructs a pattern that from the current location until Count
    --  characters have been matched. The pattern fails if more than Count
index eab7063253ed654bd8004349cf23d538c81e8375..086548c5b8128ee72302bfc8b099e0df75912be4 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                     Copyright (C) 1998-2005, AdaCore                     --
+--                     Copyright (C) 1998-2006, AdaCore                     --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -240,12 +240,14 @@ procedure Gnatchop is
    end record;
 
    function Get_EOL
-     (Source : access String;
+     (Source : not null access String;
       Start  : Positive)
       return   EOL_String;
    --  Return the line terminator used in the passed string
 
-   procedure Parse_EOL (Source : access String; Ptr : in out Positive);
+   procedure Parse_EOL
+     (Source : not null access String;
+      Ptr    : in out Positive);
    --  On return Source (Ptr) is the first character of the next line
    --  or EOF. Source.all must be terminated by EOF.
 
@@ -255,12 +257,14 @@ procedure Gnatchop is
    --  completes, False if some system error (e.g. failure to read the
    --  offset information) occurs.
 
-   procedure Parse_Offset_Info (Chop_File : File_Num; Source : access String);
+   procedure Parse_Offset_Info
+     (Chop_File : File_Num;
+      Source    : not null access String);
    --  Parses the output of the compiler indicating the offsets
    --  and names of the compilation units in Chop_File.
 
    procedure Parse_Token
-     (Source    : access String;
+     (Source    : not null access String;
       Ptr       : in out Positive;
       Token_Ptr : out Positive);
    --  Skips any separators and stores the start of the token in Token_Ptr.
@@ -324,7 +328,7 @@ procedure Gnatchop is
    --  of line sequence to be written at the end of the pragma.
 
    procedure Write_Unit
-     (Source  : access String;
+     (Source  : not null access String;
       Num     : Unit_Num;
       TS_Time : OS_Time;
       Success : out Boolean);
@@ -462,7 +466,7 @@ procedure Gnatchop is
    -------------
 
    function Get_EOL
-     (Source : access String;
+     (Source : not null access String;
       Start  : Positive)
       return   EOL_String
    is
@@ -576,7 +580,9 @@ procedure Gnatchop is
    -- Parse_EOL --
    ---------------
 
-   procedure Parse_EOL (Source : access String; Ptr : in out Positive) is
+   procedure Parse_EOL
+     (Source : not null access String;
+      Ptr    : in out Positive) is
    begin
       --  Skip to end of line
 
@@ -705,7 +711,7 @@ procedure Gnatchop is
 
    procedure Parse_Offset_Info
      (Chop_File : File_Num;
-      Source    : access String)
+      Source    : not null access String)
    is
       First_Unit : constant Unit_Num := Unit.Last + 1;
       Bufferg    : String_Access     := null;
@@ -944,7 +950,7 @@ procedure Gnatchop is
    -----------------
 
    procedure Parse_Token
-     (Source    : access String;
+     (Source    : not null access String;
       Ptr       : in out Positive;
       Token_Ptr : out Positive)
    is
@@ -1607,7 +1613,7 @@ procedure Gnatchop is
    ----------------
 
    procedure Write_Unit
-     (Source  : access String;
+     (Source  : not null access String;
       Num     : Unit_Num;
       TS_Time : OS_Time;
       Success : out Boolean)
index 54dbd457b92c27eb1d079b7f0edc01ebe04786b0..1882e8fa40be96dc5583dfae6963ddf9bf7f3b07 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 360c6fce710834a2219d0b2cf4b4fa5010dbb28c..3c317b8d50b86bce67098c7c8bfa411884502b03 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                   S p e c                                --
 --                                                                          --
---                     Copyright (C) 1999-2005, AdaCore                     --
+--                     Copyright (C) 1999-2006, AdaCore                     --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -155,16 +155,16 @@ package Interfaces.VxWorks is
    procedure intVecGet2
      (vector       : Interrupt_Vector;
       pFunction    : out VOIDFUNCPTR;
-      pIdtGate     : access int;
-      pIdtSelector : access int);
+      pIdtGate     : not null access int;
+      pIdtSelector : not null access int);
    --  Binding to the C routine intVecGet2. Use this to get the
    --  existing handler for later restoral
 
    procedure intVecSet2
      (vector       : Interrupt_Vector;
       pFunction    : VOIDFUNCPTR;
-      pIdtGate     : access int;
-      pIdtSelector : access int);
+      pIdtGate     : not null access int;
+      pIdtSelector : not null access int);
    --  Binding to the C routine intVecSet2. Use this to restore a
    --  handler obtained using intVecGet2
 
index 548fd37fd663687769a7c8c97f1e3cafac477dcc..0473ff32bdfd083c631b70153398921e617e9bd7 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index b920d8196a3e953b70a6d92aa949702a7976e0ae..55e1ae594d8e8c49178a71c022de7ceaa0b078ff 100644 (file)
@@ -6,12 +6,13 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
 --                                                                          --
 ------------------------------------------------------------------------------
 
-   with System.Machine_Code;
-   package Machine_Code renames System.Machine_Code;
+with System.Machine_Code;
+
+package Machine_Code renames System.Machine_Code;
index 7147c36040a8e163885146b1cec32de5dd28c9fb..fe50b7b061163a3e0fa61c83da085e2e7be203e0 100644 (file)
@@ -477,7 +477,6 @@ procedure Labl is
 
 begin
    Next_Label_Elmt := First_Elmt (Label_List);
-
    while Present (Next_Label_Elmt) loop
       Label_Node := Node (Next_Label_Elmt);
 
index 7bb3e52142a5e33466ca2e2172b1f6ad3860de51..33c94985f8c4ecf8e87b8690e038b9b6ea054451 100644 (file)
@@ -74,7 +74,7 @@ package body System.Direct_IO is
 
    --  No special processing required for Direct_IO close
 
-   procedure AFCB_Close (File : access Direct_AFCB) is
+   procedure AFCB_Close (File : not null access Direct_AFCB) is
       pragma Unreferenced (File);
 
    begin
@@ -85,7 +85,7 @@ package body System.Direct_IO is
    -- AFCB_Free --
    ---------------
 
-   procedure AFCB_Free (File : access Direct_AFCB) is
+   procedure AFCB_Free (File : not null access Direct_AFCB) is
 
       type FCB_Ptr is access all Direct_AFCB;
 
index 756bcb25281c3ff6c2d6ab16e1db267442b1cdc1..a43ebb67fc7d64f0258e74449d4f5c1fd12448c3 100644 (file)
@@ -66,8 +66,8 @@ package System.Direct_IO is
 
    function AFCB_Allocate (Control_Block : Direct_AFCB) return FCB.AFCB_Ptr;
 
-   procedure AFCB_Close (File : access Direct_AFCB);
-   procedure AFCB_Free  (File : access Direct_AFCB);
+   procedure AFCB_Close (File : not null access Direct_AFCB);
+   procedure AFCB_Free  (File : not null access Direct_AFCB);
 
    procedure Read
      (File : in out Direct_AFCB;
index f6a9327e66364bd3acedd8cda8926b795c68f8bb..f591a6992506f132be14c294d9ceb7ff31679507 100644 (file)
@@ -759,7 +759,7 @@ package body System.Fat_Gen is
    --  in Exp_Attr by using the Valid functions in Vax_Float_Operations rather
    --  than the corresponding instantiation of this function.
 
-   function Valid (X : access T) return Boolean is
+   function Valid (X : not null access T) return Boolean is
 
       IEEE_Emin : constant Integer := T'Machine_Emin - 1;
       IEEE_Emax : constant Integer := T'Machine_Emax - 1;
index 83b6f06446136adf99d6a79fd447f83260712f35..748e5170a027d1f723f0447417d0cca4ae532e9a 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2006 Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -89,7 +89,7 @@ package System.Fat_Gen is
 
    function Unbiased_Rounding (X : T)                       return T;
 
-   function Valid (X : access T) return Boolean;
+   function Valid (X : not null access T) return Boolean;
    --  This function checks if the object of type T referenced by X
    --  is valid, and returns True/False accordingly. The parameter is
    --  passed by reference (access) here, as the object of type T may
index eb38ac8852fa77b79f8db162bbf625cdd850ea0d..41e3033418f00fd2b62ffaf4707d12cddd9ca39a 100644 (file)
@@ -4,9 +4,9 @@
 --                                                                          --
 --                  S Y S T E M . O S _ P R I M I T I V E S                 --
 --                                                                          --
---                                  B o d y                                 --
+--                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1998-2005 Free Software Foundation, Inc.          --
+--          Copyright (C) 1998-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -51,16 +51,17 @@ package body System.OS_Primitives is
    type BOOL is new Boolean;
    for BOOL'Size use Interfaces.C.unsigned_long'Size;
 
-   procedure GetSystemTimeAsFileTime (lpFileTime : access Long_Long_Integer);
+   procedure GetSystemTimeAsFileTime
+     (lpFileTime : not null access Long_Long_Integer);
    pragma Import (Stdcall, GetSystemTimeAsFileTime, "GetSystemTimeAsFileTime");
 
    function QueryPerformanceCounter
-     (lpPerformanceCount : access LARGE_INTEGER) return BOOL;
+     (lpPerformanceCount : not null access LARGE_INTEGER) return BOOL;
    pragma Import
      (Stdcall, QueryPerformanceCounter, "QueryPerformanceCounter");
 
    function QueryPerformanceFrequency
-     (lpFrequency : access LARGE_INTEGER) return BOOL;
+     (lpFrequency : not null access LARGE_INTEGER) return BOOL;
    pragma Import
      (Stdcall, QueryPerformanceFrequency, "QueryPerformanceFrequency");
 
@@ -241,9 +242,29 @@ package body System.OS_Primitives is
    -----------------
 
    procedure Timed_Delay (Time : Duration; Mode : Integer) is
+
+      function Mode_Clock return Duration;
+      pragma Inline (Mode_Clock);
+      --  Return the current clock value using either the monotonic clock or
+      --  standard clock depending on the Mode value.
+
+      ----------------
+      -- Mode_Clock --
+      ----------------
+
+      function Mode_Clock return Duration is
+      begin
+         case Mode is
+            when Absolute_RT =>
+               return Monotonic_Clock;
+            when others =>
+               return Clock;
+         end case;
+      end Mode_Clock;
+
       Rel_Time   : Duration;
       Abs_Time   : Duration;
-      Check_Time : Duration := Monotonic_Clock;
+      Check_Time : Duration := Mode_Clock;
 
    begin
       if Mode = Relative then
@@ -257,7 +278,7 @@ package body System.OS_Primitives is
       if Rel_Time > 0.0 then
          loop
             Sleep (DWORD (Rel_Time * 1000.0));
-            Check_Time := Monotonic_Clock;
+            Check_Time := Mode_Clock;
 
             exit when Abs_Time <= Check_Time;
 
index 6d4431c6c8cf92b42964d602b96c881c28141d40..59a72374d525ff4860fd478fbe4c1278de9a72da 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  B o d y                                 --
 --                                                                          --
---          Copyright (C) 1998-2005 Free Software Foundation, Inc.          --
+--          Copyright (C) 1998-2006 Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -56,7 +56,7 @@ package body System.OS_Primitives is
    pragma Convention (C, struct_timeval);
 
    function gettimeofday
-     (tv : access struct_timeval;
+     (tv : not null access struct_timeval;
       tz : struct_timezone_ptr) return Integer;
    pragma Import (C, gettimeofday, "gettimeofday");
 
@@ -66,7 +66,7 @@ package body System.OS_Primitives is
    end record;
    pragma Convention (C, timespec);
 
-   function nanosleep (rqtp, rmtp : access timespec) return Integer;
+   function nanosleep (rqtp, rmtp : not null access timespec) return Integer;
    pragma Import (C, nanosleep, "nanosleep");
 
    -----------
index 6e7436f7a0143a56c5efc2854ed64878d7adb3fe..b97093357829da70cc692e4c5a3a2c1ced433f07 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  B o d y                                 --
 --                                                                          --
---          Copyright (C) 1998-2005 Free Software Foundation, Inc.          --
+--          Copyright (C) 1998-2006 Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -48,7 +48,7 @@ package body System.OS_Primitives is
    pragma Convention (C, struct_timeval);
 
    procedure gettimeofday
-     (tv : access struct_timeval;
+     (tv : not null access struct_timeval;
       tz : Address := Null_Address);
    pragma Import (C, gettimeofday, "gettimeofday");
 
@@ -57,7 +57,7 @@ package body System.OS_Primitives is
       readfds,
       writefds,
       exceptfds : Address := Null_Address;
-      timeout   : access struct_timeval);
+      timeout   : not null access struct_timeval);
    pragma Import (C, C_select, "select");
 
    -----------
index 75110346914a263bcfed1db8cce00f0ec434ba5e..719551f9dfae01252119c086f328810c9ac1554d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  B o d y                                 --
 --                                                                          --
---          Copyright (C) 1998-2005 Free Software Foundation, Inc.          --
+--          Copyright (C) 1998-2006 Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -48,7 +48,7 @@ package body System.OS_Primitives is
    pragma Convention (C, struct_timeval);
 
    procedure gettimeofday
-     (tv : access struct_timeval;
+     (tv : not null access struct_timeval;
       tz : Address := Null_Address);
    pragma Import (C, gettimeofday, "gettimeofday");
 
@@ -57,7 +57,7 @@ package body System.OS_Primitives is
       readfds,
       writefds,
       exceptfds : Address := Null_Address;
-      timeout   : access struct_timeval);
+      timeout   : not null access struct_timeval);
    pragma Import (C, C_select, "select");
 
    -----------
index 6091f3d1db6e93290c1104d9bba259322e2aa090..f8bcdcc0bb88eda00801e00c787fecb3ad2ca493 100644 (file)
@@ -7,7 +7,7 @@
 --                                  B o d y                                 --
 --                   (Dummy body for non-distributed case)                  --
 --                                                                          --
---          Copyright (C) 1995-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1995-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -311,8 +311,8 @@ package body System.Partition_Interface is
    --------------------
 
    function Same_Partition
-      (Left  : access RACW_Stub_Type;
-       Right : access RACW_Stub_Type) return Boolean
+      (Left  : not null access RACW_Stub_Type;
+       Right : not null access RACW_Stub_Type) return Boolean
    is
       pragma Unreferenced (Left);
       pragma Unreferenced (Right);
index 50e568211bacc7b8b052feb9c4e3d25839d5a0ac..72f2e2b3bf21aa48d3a09483ca38005674743d8b 100644 (file)
@@ -59,7 +59,7 @@ package body System.Sequential_IO is
 
    --  No special processing required for Sequential_IO close
 
-   procedure AFCB_Close (File : access Sequential_AFCB) is
+   procedure AFCB_Close (File : not null access Sequential_AFCB) is
       pragma Warnings (Off, File);
 
    begin
@@ -70,7 +70,7 @@ package body System.Sequential_IO is
    -- AFCB_Free --
    ---------------
 
-   procedure AFCB_Free (File : access Sequential_AFCB) is
+   procedure AFCB_Free (File : not null access Sequential_AFCB) is
 
       type FCB_Ptr is access all Sequential_AFCB;
 
index 09c41aeb2c29e0affe5ffdca6a7c0881cf97c5a9..d263ec33f45a9dd2fcb804f49b4bc988275bb112 100644 (file)
@@ -48,8 +48,8 @@ package System.Sequential_IO is
    function AFCB_Allocate
      (Control_Block : Sequential_AFCB) return FCB.AFCB_Ptr;
 
-   procedure AFCB_Close (File : access Sequential_AFCB);
-   procedure AFCB_Free  (File : access Sequential_AFCB);
+   procedure AFCB_Close (File : not null access Sequential_AFCB);
+   procedure AFCB_Free  (File : not null access Sequential_AFCB);
 
    procedure Read
      (File : in out Sequential_AFCB;
index f1478f357c86d21ca75b152a1e30360bf896f71e..c0577afe7fec2892978b72eb8d2bff9d5c8a5b76 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  B o d y                                 --
 --                                                                          --
---          Copyright (C) 1999-2006 Free Software Foundation, Inc.          --
+--          Copyright (C) 1999-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -32,7 +32,7 @@
 ------------------------------------------------------------------------------
 
 --  This is the general implementation of this package. There is a VxWorks
---  specific version of this package (5zstchop.adb). This file should
+--  specific version of this package (s-stchop-vxworks.adb). This file should
 --  be kept synchronized with it.
 
 pragma Restrictions (No_Elaboration_Code);
@@ -50,7 +50,8 @@ package body System.Stack_Checking.Operations is
 
    Kilobyte : constant := 1024;
 
-   function Set_Stack_Info (Stack : access Stack_Access) return Stack_Access;
+   function Set_Stack_Info
+     (Stack : not null access Stack_Access) return Stack_Access;
 
    --  The function Set_Stack_Info is the actual function that updates
    --  the cache containing a pointer to the Stack_Info. It may also
@@ -90,7 +91,7 @@ package body System.Stack_Checking.Operations is
    --------------------
 
    function Set_Stack_Info
-     (Stack : access Stack_Access) return Stack_Access
+     (Stack : not null access Stack_Access) return Stack_Access
    is
       type Frame_Mark is null record;
       Frame_Location : Frame_Mark;
index cd56ac272ec70aba2c27cf394d243528b395e98b..1c2f2a7ef918bc34944baee547bf35b0dc806f1a 100644 (file)
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This package provides a implementation of stack checking operations
---  using comparison with stack base and limit.
+--  This package provides a implementation of stack checking operations using
+--  comparison with stack base and limit.
 
 pragma Restrictions (No_Elaboration_Code);
---  We want to guarantee the absence of elaboration code because the
---  binder does not handle references to this package.
+--  We want to guarantee the absence of elaboration code because the binder
+--  does not handle references to this package.
 
 pragma Polling (Off);
 --  Turn off polling, we do not want polling to take place during stack
@@ -46,22 +46,20 @@ package System.Stack_Checking.Operations is
    pragma Preelaborate;
 
    procedure Update_Stack_Cache (Stack : Stack_Access);
-   --  Set the stack cache for the current task. Note that this is only
-   --  for optimization purposes, nothing can be assumed about the
-   --  contents of the cache at any time, see Set_Stack_Info.
+   --  Set the stack cache for the current task. Note that this is only for
+   --  optimization purposes, nothing can be assumed about the contents of the
+   --  cache at any time, see Set_Stack_Info.
 
    procedure Invalidate_Stack_Cache (Any_Stack : Stack_Access);
-   --  Invalidate cache entries for the task T that owns Any_Stack.
-   --  This causes the Set_Stack_Info function to be called during
-   --  the next stack check done by T. This can be used to interrupt
-   --  task T asynchronously.
+   --  Invalidate cache entries for the task T that owns Any_Stack. This causes
+   --  the Set_Stack_Info function to be called during the next stack check
+   --  done by T. This can be used to interrupt task T asynchronously.
    --  Stack_Check should be called in loops for this to work reliably.
 
    function Stack_Check (Stack_Address : System.Address) return Stack_Access;
-   --  This version of Stack_Check should not be inlined.
+   --  This version of Stack_Check should not be inlined
 
 private
-
    Cache : aliased Stack_Access := Null_Stack;
 
    pragma Export (C, Cache, "_gnat_stack_cache");
index 873b1fd78aea05e6388d2f22b5da80bec0fffaa8..894ec292dae5735db911209f55344218af77bd28 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  B o d y                                 --
 --                                                                          --
---         Copyright (C) 1992-2005, Free Software Foundation, Inc.          --
+--         Copyright (C) 1992-2006, Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -144,12 +144,12 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
    begin
       null;
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
    begin
       null;
    end Finalize_Lock;
@@ -204,13 +204,14 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
    begin
       null;
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level) is
    begin
       null;
    end Initialize_Lock;
@@ -264,7 +265,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Ceiling_Violation := False;
    end Read_Lock;
@@ -343,7 +345,7 @@ package body System.Task_Primitives.Operations is
    -- Sleep --
    -----------
 
-   procedure Sleep (Self_ID : Task_Id; Reason  : System.Tasking.Task_States) is
+   procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is
    begin
       null;
    end Sleep;
@@ -412,12 +414,13 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
    begin
       null;
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False) is
    begin
       null;
    end Unlock;
@@ -448,13 +451,14 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Ceiling_Violation := False;
    end Write_Lock;
 
    procedure Write_Lock
-     (L           : access RTS_Lock;
+     (L           : not null access RTS_Lock;
       Global_Lock : Boolean := False)
    is
    begin
index f463d8f90d6f5ac1816c4d72b1ad2009530500f8..4b43f1cde5c23344a1c5e58676808638957ef1c5 100644 (file)
@@ -239,7 +239,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
       Attributes : aliased pthread_mutexattr_t;
       Result     : Interfaces.C.int;
@@ -265,7 +265,8 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level) is
       pragma Unreferenced (Level);
 
       Attributes : aliased pthread_mutexattr_t;
@@ -295,14 +296,14 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L.L'Access);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
@@ -313,7 +314,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Result : Interfaces.C.int;
 
    begin
@@ -330,7 +333,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L : access RTS_Lock; Global_Lock : Boolean := False)
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
    begin
@@ -353,7 +356,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -362,14 +366,16 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_unlock (L.L'Access);
       pragma Assert (Result = 0);
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
    begin
       if not Single_Lock or else Global_Lock then
index a1bc9f09478aedb1bea9c8d6ff5a2f276dbe0310..4b7b170ebc157a3dfaac8791a71ae6d38cf93abb 100644 (file)
@@ -238,7 +238,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
       Attributes : aliased pthread_mutexattr_t;
       Result     : Interfaces.C.int;
@@ -273,7 +273,9 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level)
+   is
       pragma Unreferenced (Level);
 
       Attributes : aliased pthread_mutexattr_t;
@@ -314,14 +316,14 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
@@ -332,7 +334,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_lock (L);
@@ -344,7 +348,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L           : access RTS_Lock;
+     (L           : not null access RTS_Lock;
       Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
@@ -368,7 +372,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -377,14 +382,16 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_unlock (L);
       pragma Assert (Result = 0);
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
 
    begin
index a41eb3f55704c3b8d576ca3fb21f7fcd12a0bb53..c945f5c9d7ea1222a4ba89cfc43e9e0fdfe62b99 100644 (file)
@@ -267,7 +267,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
       pragma Unreferenced (Prio);
 
@@ -283,7 +283,9 @@ package body System.Task_Primitives.Operations is
       end if;
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level)
+   is
       pragma Unreferenced (Level);
 
       Result : Interfaces.C.int;
@@ -302,14 +304,14 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
@@ -320,7 +322,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_lock (L);
@@ -332,7 +336,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L           : access RTS_Lock;
+     (L           : not null access RTS_Lock;
       Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
@@ -356,7 +360,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -365,14 +370,16 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_unlock (L);
       pragma Assert (Result = 0);
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
    begin
       if not Single_Lock or else Global_Lock then
index 881a0cea4ef9f0f9c5c8d9b7b5832ead7fce4647..272d8981aa685a56c559c2794d12013c95dbc331 100644 (file)
@@ -256,7 +256,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
       Attributes : aliased pthread_mutexattr_t;
       Result : Interfaces.C.int;
@@ -284,7 +284,9 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level)
+   is
       pragma Unreferenced (Level);
 
       Attributes : aliased pthread_mutexattr_t;
@@ -314,14 +316,14 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L.Mutex'Access);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
@@ -332,7 +334,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Result : Interfaces.C.int;
       T : constant Task_Id := Self;
 
@@ -361,7 +365,7 @@ package body System.Task_Primitives.Operations is
    --  No tricks on RTS_Locks
 
    procedure Write_Lock
-     (L : access RTS_Lock; Global_Lock : Boolean := False)
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
    begin
@@ -384,7 +388,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -393,7 +398,7 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
       T : constant Task_Id := Self;
 
@@ -408,7 +413,9 @@ package body System.Task_Primitives.Operations is
       end if;
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
    begin
       if not Single_Lock or else Global_Lock then
@@ -432,7 +439,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Sleep
      (Self_ID : Task_Id;
-      Reason   : System.Tasking.Task_States)
+      Reason  : System.Tasking.Task_States)
    is
       pragma Unreferenced (Reason);
       Result : Interfaces.C.int;
index 6a6cd17a75ec572593db5a20ebb47443deb09249..5656932face1f44cd18a477c1b7f37890ff413a1 100644 (file)
@@ -168,23 +168,23 @@ package body System.Task_Primitives.Operations is
    -- Condition Variable Functions --
    ----------------------------------
 
-   procedure Initialize_Cond (Cond : access Condition_Variable);
+   procedure Initialize_Cond (Cond : not null access Condition_Variable);
    --  Initialize given condition variable Cond
 
-   procedure Finalize_Cond (Cond : access Condition_Variable);
+   procedure Finalize_Cond (Cond : not null access Condition_Variable);
    --  Finalize given condition variable Cond
 
-   procedure Cond_Signal (Cond : access Condition_Variable);
+   procedure Cond_Signal (Cond : not null access Condition_Variable);
    --  Signal condition variable Cond
 
    procedure Cond_Wait
-     (Cond : access Condition_Variable;
-      L    : access RTS_Lock);
+     (Cond : not null access Condition_Variable;
+      L    : not null access RTS_Lock);
    --  Wait on conditional variable Cond, using lock L
 
    procedure Cond_Timed_Wait
-     (Cond      : access Condition_Variable;
-      L         : access RTS_Lock;
+     (Cond      : not null access Condition_Variable;
+      L         : not null access RTS_Lock;
       Rel_Time  : Duration;
       Timed_Out : out Boolean;
       Status    : out Integer);
@@ -198,7 +198,7 @@ package body System.Task_Primitives.Operations is
    -- Initialize_Cond --
    ---------------------
 
-   procedure Initialize_Cond (Cond : access Condition_Variable) is
+   procedure Initialize_Cond (Cond : not null access Condition_Variable) is
       hEvent : HANDLE;
 
    begin
@@ -214,7 +214,7 @@ package body System.Task_Primitives.Operations is
    --  No such problem here, DosCloseEventSem has been derived.
    --  What does such refer to in above comment???
 
-   procedure Finalize_Cond (Cond : access Condition_Variable) is
+   procedure Finalize_Cond (Cond : not null access Condition_Variable) is
       Result : BOOL;
    begin
       Result := CloseHandle (HANDLE (Cond.all));
@@ -225,7 +225,7 @@ package body System.Task_Primitives.Operations is
    -- Cond_Signal --
    -----------------
 
-   procedure Cond_Signal (Cond : access Condition_Variable) is
+   procedure Cond_Signal (Cond : not null access Condition_Variable) is
       Result : BOOL;
    begin
       Result := SetEvent (HANDLE (Cond.all));
@@ -243,8 +243,8 @@ package body System.Task_Primitives.Operations is
    --                  L is locked.
 
    procedure Cond_Wait
-     (Cond : access Condition_Variable;
-      L    : access RTS_Lock)
+     (Cond : not null access Condition_Variable;
+      L    : not null access RTS_Lock)
    is
       Result      : DWORD;
       Result_Bool : BOOL;
@@ -276,8 +276,8 @@ package body System.Task_Primitives.Operations is
    --                  L is locked.
 
    procedure Cond_Timed_Wait
-     (Cond      : access Condition_Variable;
-      L         : access RTS_Lock;
+     (Cond      : not null access Condition_Variable;
+      L         : not null access RTS_Lock;
       Rel_Time  : Duration;
       Timed_Out : out Boolean;
       Status    : out Integer)
@@ -385,7 +385,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
    begin
       InitializeCriticalSection (L.Mutex'Access);
@@ -393,7 +393,9 @@ package body System.Task_Primitives.Operations is
       L.Priority := Prio;
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level)
+   is
       pragma Unreferenced (Level);
    begin
       InitializeCriticalSection (CRITICAL_SECTION (L.all)'Unrestricted_Access);
@@ -403,12 +405,12 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
    begin
       DeleteCriticalSection (L.Mutex'Access);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
    begin
       DeleteCriticalSection (CRITICAL_SECTION (L.all)'Unrestricted_Access);
    end Finalize_Lock;
@@ -417,7 +419,8 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       L.Owner_Priority := Get_Priority (Self);
 
@@ -432,7 +435,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L           : access RTS_Lock;
+     (L           : not null access RTS_Lock;
       Global_Lock : Boolean := False)
    is
    begin
@@ -453,7 +456,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -462,12 +466,13 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
    begin
       LeaveCriticalSection (L.Mutex'Access);
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False) is
    begin
       if not Single_Lock or else Global_Lock then
          LeaveCriticalSection (CRITICAL_SECTION (L.all)'Unrestricted_Access);
index f8d1f0db90d23f4f9261583807095c3a418544c7..315db0e8e56b78b38e179af8394250a38662ed10 100644 (file)
@@ -287,7 +287,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
       Attributes : aliased pthread_mutexattr_t;
       Result : Interfaces.C.int;
@@ -327,7 +327,9 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level)
+   is
       pragma Warnings (Off, Level);
 
       Attributes : aliased pthread_mutexattr_t;
@@ -372,7 +374,7 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
 
    begin
@@ -380,7 +382,7 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
 
    begin
@@ -392,7 +394,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Result : Interfaces.C.int;
 
    begin
@@ -405,7 +409,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L           : access RTS_Lock;
+     (L           : not null access RTS_Lock;
       Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
@@ -431,7 +435,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -440,7 +445,7 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
 
    begin
@@ -448,7 +453,9 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
 
    begin
@@ -474,7 +481,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Sleep
      (Self_ID : Task_Id;
-      Reason   : System.Tasking.Task_States)
+      Reason  : System.Tasking.Task_States)
    is
       pragma Warnings (Off, Reason);
 
@@ -949,12 +956,19 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
 
       if T.Common.Task_Info /= Default_Scope then
+         case T.Common.Task_Info is
+            when System.Task_Info.Process_Scope =>
+               Result := pthread_attr_setscope
+                           (Attributes'Access, PTHREAD_SCOPE_PROCESS);
+
+            when System.Task_Info.System_Scope =>
+               Result := pthread_attr_setscope
+                           (Attributes'Access, PTHREAD_SCOPE_SYSTEM);
 
-         --  We are assuming that Scope_Type has the same values than the
-         --  corresponding C macros
+            when System.Task_Info.Default_Scope =>
+               Result := 0;
+         end case;
 
-         Result := pthread_attr_setscope
-           (Attributes'Access, Task_Info_Type'Pos (T.Common.Task_Info));
          pragma Assert (Result = 0);
       end if;
 
index 9da267ec4773407cc4a0e92b062851934a4073fa..c17bf6d958ff89c0300e3e00c998de34d661d492 100644 (file)
@@ -168,8 +168,8 @@ package body System.Task_Primitives.Operations is
 
    procedure Abort_Handler
      (Sig     : Signal;
-      Code    : access siginfo_t;
-      Context : access ucontext_t);
+      Code    : not null access siginfo_t;
+      Context : not null access ucontext_t);
    --  Target-dependent binding of inter-thread Abort signal to
    --  the raising of the Abort_Signal exception.
    --  See also comments in 7staprop.adb
@@ -259,8 +259,8 @@ package body System.Task_Primitives.Operations is
 
    procedure Abort_Handler
      (Sig     : Signal;
-      Code    : access siginfo_t;
-      Context : access ucontext_t)
+      Code    : not null access siginfo_t;
+      Context : not null access ucontext_t)
    is
       pragma Unreferenced (Sig);
       pragma Unreferenced (Code);
@@ -535,7 +535,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
       Result : Interfaces.C.int;
 
@@ -555,7 +555,7 @@ package body System.Task_Primitives.Operations is
    end Initialize_Lock;
 
    procedure Initialize_Lock
-     (L     : access RTS_Lock;
+     (L     : not null access RTS_Lock;
       Level : Lock_Level)
    is
       Result : Interfaces.C.int;
@@ -575,7 +575,7 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
 
    begin
@@ -584,7 +584,7 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
 
    begin
@@ -597,7 +597,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Result : Interfaces.C.int;
 
    begin
@@ -637,7 +639,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L          : access RTS_Lock;
+     (L          : not null access RTS_Lock;
      Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
@@ -667,7 +669,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -676,7 +679,7 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result  : Interfaces.C.int;
 
    begin
@@ -700,7 +703,9 @@ package body System.Task_Primitives.Operations is
       end if;
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
    begin
       if not Single_Lock or else Global_Lock then
index 28e1a4a30c1a0d6eec09a8baa34fb57349c792f6..cf959e35e12e27a7bcf32e5e07a0ad8554f04591 100644 (file)
@@ -242,7 +242,7 @@ package body System.Task_Primitives.Operations is
 
    procedure Initialize_Lock
      (Prio : System.Any_Priority;
-      L    : access Lock)
+      L    : not null access Lock)
    is
       Attributes : aliased pthread_mutexattr_t;
       Result     : Interfaces.C.int;
@@ -271,7 +271,9 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level)
+   is
       pragma Unreferenced (Level);
 
       Attributes : aliased pthread_mutexattr_t;
@@ -301,14 +303,14 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L.L'Access);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
@@ -319,7 +321,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Result         : Interfaces.C.int;
       Self_ID        : Task_Id;
       All_Tasks_Link : Task_Id;
@@ -350,7 +354,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L : access RTS_Lock; Global_Lock : Boolean := False)
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
    begin
@@ -373,7 +377,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -382,14 +387,16 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_unlock (L.L'Access);
       pragma Assert (Result = 0);
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
    begin
       if not Single_Lock or else Global_Lock then
index 7509236e1e1691374883b89d36fac7ef766463de..f96534b45eb02c7faa11372d3b59e40225d3e662 100644 (file)
@@ -197,7 +197,9 @@ package body System.Task_Primitives.Operations is
    --  Therefore rasing Storage_Error in the following routines
    --  should be able to be handled safely.
 
-   procedure Initialize_Lock (Prio : System.Any_Priority; L : access Lock) is
+   procedure Initialize_Lock
+     (Prio : System.Any_Priority; L : not null access Lock)
+   is
       Attributes : aliased pthread_mutexattr_t;
       Result     : Interfaces.C.int;
 
@@ -223,7 +225,9 @@ package body System.Task_Primitives.Operations is
       pragma Assert (Result = 0);
    end Initialize_Lock;
 
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level)
+   is
       pragma Unreferenced (Level);
 
       Attributes : aliased pthread_mutexattr_t;
@@ -266,14 +270,14 @@ package body System.Task_Primitives.Operations is
    -- Finalize_Lock --
    -------------------
 
-   procedure Finalize_Lock (L : access Lock) is
+   procedure Finalize_Lock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L.L'Access);
       pragma Assert (Result = 0);
    end Finalize_Lock;
 
-   procedure Finalize_Lock (L : access RTS_Lock) is
+   procedure Finalize_Lock (L : not null access RTS_Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_destroy (L);
@@ -284,7 +288,9 @@ package body System.Task_Primitives.Operations is
    -- Write_Lock --
    ----------------
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean)
+   is
       Self_ID        : constant Task_Id := Self;
       All_Tasks_Link : constant Task_Id := Self.Common.All_Tasks_Link;
       Current_Prio   : System.Any_Priority;
@@ -312,7 +318,7 @@ package body System.Task_Primitives.Operations is
    end Write_Lock;
 
    procedure Write_Lock
-     (L           : access RTS_Lock;
+     (L           : not null access RTS_Lock;
       Global_Lock : Boolean := False)
    is
       Result : Interfaces.C.int;
@@ -336,7 +342,8 @@ package body System.Task_Primitives.Operations is
    -- Read_Lock --
    ---------------
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean) is
    begin
       Write_Lock (L, Ceiling_Violation);
    end Read_Lock;
@@ -345,14 +352,16 @@ package body System.Task_Primitives.Operations is
    -- Unlock --
    ------------
 
-   procedure Unlock (L : access Lock) is
+   procedure Unlock (L : not null access Lock) is
       Result : Interfaces.C.int;
    begin
       Result := pthread_mutex_unlock (L.L'Access);
       pragma Assert (Result = 0);
    end Unlock;
 
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False)
+   is
       Result : Interfaces.C.int;
    begin
       if not Single_Lock or else Global_Lock then
index bf98c5cbba26b1405feab37abcda8a5e5fb73092..aca25c3cd2f612a4ddc1825c92c5404d617e3341 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  S p e c                                 --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -137,8 +137,10 @@ package System.Task_Primitives.Operations is
    --  call specified below. See locking rules in System.Tasking (spec) for
    --  more details.
 
-   procedure Initialize_Lock (Prio : System.Any_Priority; L : access Lock);
-   procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level);
+   procedure Initialize_Lock
+     (Prio : System.Any_Priority; L : not null access Lock);
+   procedure Initialize_Lock
+     (L : not null access RTS_Lock; Level : Lock_Level);
    pragma Inline (Initialize_Lock);
    --  Initialize a lock object.
    --
@@ -160,15 +162,18 @@ package System.Task_Primitives.Operations is
    --
    --  These operations raise Storage_Error if a lack of storage is detected.
 
-   procedure Finalize_Lock (L : access Lock);
-   procedure Finalize_Lock (L : access RTS_Lock);
+   procedure Finalize_Lock (L : not null access Lock);
+   procedure Finalize_Lock (L : not null access RTS_Lock);
    pragma Inline (Finalize_Lock);
    --  Finalize a lock object, freeing any resources allocated by the
    --  corresponding Initialize_Lock operation.
 
-   procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean);
-   procedure Write_Lock (L : access RTS_Lock; Global_Lock : Boolean := False);
-   procedure Write_Lock (T : ST.Task_Id);
+   procedure Write_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean);
+   procedure Write_Lock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False);
+   procedure Write_Lock
+     (T : ST.Task_Id);
    pragma Inline (Write_Lock);
    --  Lock a lock object for write access. After this operation returns,
    --  the calling task holds write permission for the lock object. No other
@@ -192,7 +197,8 @@ package System.Task_Primitives.Operations is
    --  holds T's lock, or has interrupt-level priority. Finalization of the
    --  per-task lock is implicit in Exit_Task.
 
-   procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean);
+   procedure Read_Lock
+     (L : not null access Lock; Ceiling_Violation : out Boolean);
    pragma Inline (Read_Lock);
    --  Lock a lock object for read access. After this operation returns,
    --  the calling task has non-exclusive read permission for the logical
@@ -214,9 +220,12 @@ package System.Task_Primitives.Operations is
    --  potential write access, and (3) implementations of priority ceiling
    --  locking that make a reader-writer distinction have higher overhead.
 
-   procedure Unlock (L : access Lock);
-   procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False);
-   procedure Unlock (T : ST.Task_Id);
+   procedure Unlock
+     (L : not null access Lock);
+   procedure Unlock
+     (L : not null access RTS_Lock; Global_Lock : Boolean := False);
+   procedure Unlock
+     (T : ST.Task_Id);
    pragma Inline (Unlock);
    --  Unlock a locked lock object.
    --
index 3a6b7c5fef6b48ab6e9eb0ecce8e744653a893c8..1525bd9ea1e4c0e0a6c42266a33bfbf03a4c63ce 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  S p e c                                 --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -144,10 +144,10 @@ package System.Tasking.Restricted.Stages is
    --  Priority is the task's priority (assumed to be in the
    --  System.Any_Priority'Range)
    --
-   --  Stack_Address is the start address of the stack associated to the
-   --  task, in case it has been preallocated by the compiler; it is equal
-   --  to Null_Address when the stack needs to be allocated by the
-   --  underlying operating system.
+   --  Stack_Address is the start address of the stack associated to the task,
+   --  in case it has been preallocated by the compiler; it is equal to
+   --  Null_Address when the stack needs to be allocated by the underlying
+   --  operating system.
    --
    --  Size is the stack size of the task to create
    --
@@ -156,21 +156,19 @@ package System.Tasking.Restricted.Stages is
    --
    --  State is the compiler generated task's procedure body
    --
-   --  Discriminants is a pointer to a limited record whose discriminants
-   --  are those of the task to create. This parameter should be passed as
-   --  the single argument to State.
+   --  Discriminants is a pointer to a limited record whose discriminants are
+   --  those of the task to create. This parameter should be passed as the
+   --  single argument to State.
    --
    --  Elaborated is a pointer to a Boolean that must be set to true on exit
    --  if the task could be sucessfully elaborated.
    --
    --  Chain is a linked list of task that needs to be created. On exit,
-   --  Created_Task.Activation_Link will be Chain.T_ID, and Chain.T_ID
-   --  will be Created_Task (e.g the created task will be linked at the front
-   --  of Chain).
+   --  Created_Task.Activation_Link will be Chain.T_ID, and Chain.T_ID will be
+   --  Created_Task (the created task will be linked at the front of Chain).
    --
-   --  Task_Image is a string created by the compiler that the
-   --  run time can store to ease the debugging and the
-   --  Ada.Task_Identification facility.
+   --  Task_Image is a string created by the compiler that the run time can
+   --  store to ease the debugging and the Ada.Task_Identification facility.
    --
    --  Created_Task is the resulting task.
    --
@@ -188,29 +186,28 @@ package System.Tasking.Restricted.Stages is
    --  version of this procedure had code to reverse the chain, so as to
    --  activate the tasks in the order of declaration. This might be nice, but
    --  it is not needed if priority-based scheduling is supported, since all
-   --  the activated tasks synchronize on the activators lock before they
-   --  start activating and so they should start activating in priority order.
+   --  the activated tasks synchronize on the activators lock before they start
+   --  activating and so they should start activating in priority order.
 
    procedure Complete_Restricted_Activation;
-   --  Compiler interface only. Do not call from within the RTS.
-   --  This should be called from the task body at the end of
-   --  the elaboration code for its declarative part.
-   --  Decrement the count of tasks to be activated by the activator and
-   --  wake it up so it can check to see if all tasks have been activated.
-   --  Except for the environment task, which should never call this procedure,
-   --  T.Activator should only be null iff T has completed activation.
+   --  Compiler interface only. Do not call from within the RTS. This should be
+   --  called from the task body at the end of the elaboration code for its
+   --  declarative part. Decrement the count of tasks to be activated by the
+   --  activator and wake it up so it can check to see if all tasks have been
+   --  activated. Except for the environment task, which should never call this
+   --  procedure, T.Activator should only be null iff T has completed
+   --  activation.
 
    procedure Complete_Restricted_Task;
-   --  Compiler interface only. Do not call from within the RTS.
-   --  This should be called from an implicit at-end handler
-   --  associated with the task body, when it completes.
-   --  From this point, the current task will become not callable.
-   --  If the current task have not completed activation, this should be done
-   --  now in order to wake up the activator (the environment task).
+   --  Compiler interface only. Do not call from within the RTS. This should be
+   --  called from an implicit at-end handler associated with the task body,
+   --  when it completes. From this point, the current task will become not
+   --  callable. If the current task have not completed activation, this should
+   --  be done now in order to wake up the activator (the environment task).
 
    function Restricted_Terminated (T : Task_Id) return Boolean;
-   --  Compiler interface only. Do not call from within the RTS.
-   --  This is called by the compiler to implement the 'Terminated attribute.
+   --  Compiler interface only. Do not call from within the RTS. This is called
+   --  by the compiler to implement the 'Terminated attribute.
    --
    --  source code:
    --     T1'Terminated
index 5457cb1d0eea85cac57a97581f04339e570777c9..c2718af3f6043fc5a19861277840f220c79c4fdf 100644 (file)
@@ -7,7 +7,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                     Copyright (C) 1999-2005, AdaCore                     --
+--                     Copyright (C) 1999-2006, AdaCore                     --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -228,17 +228,18 @@ package body System.Traceback is
    --  of shared library code, the offset from the beginning of the library
    --  is expected as Pc.
 
-   procedure U_init_frame_record (Frame : access CFD);
+   procedure U_init_frame_record (Frame : not null access CFD);
    pragma Import (C, U_init_frame_record, "U_init_frame_record");
 
-   procedure U_prep_frame_rec_for_unwind (Frame : access CFD);
+   procedure U_prep_frame_rec_for_unwind (Frame : not null access CFD);
    pragma Import (C, U_prep_frame_rec_for_unwind,
                     "U_prep_frame_rec_for_unwind");
 
    --  Fetch the description data of the frame in which these two procedures
    --  are called.
 
-   function U_get_u_rlo (Cur : access CFD; Prev : access PFD) return Integer;
+   function U_get_u_rlo
+     (Cur : not null access CFD; Prev : not null access PFD) return Integer;
    pragma Import (C, U_get_u_rlo, "U_IS_STUB_OR_CALLX");
    --  From a complete current frame with a return location possibly located
    --  into a linker generated stub, and basic information about the previous
@@ -251,8 +252,8 @@ package body System.Traceback is
    --  in a shared library, or something non null otherwise.
 
    function U_get_previous_frame_x
-     (current_frame  : access CFD;
-      previous_frame : access PFD;
+     (current_frame  : not null access CFD;
+      previous_frame : not null access PFD;
       previous_size  : Integer) return Integer;
    pragma Import (C, U_get_previous_frame_x, "U_get_previous_frame_x");
    --  Fetch the data describing the "previous" frame relatively to the
@@ -316,15 +317,15 @@ package body System.Traceback is
 
       --  The backtracing process needs a set of subprograms :
 
-      function UWD_For_RLO_Of (Frame : access CFD) return UWD_Ptr;
+      function UWD_For_RLO_Of (Frame : not null access CFD) return UWD_Ptr;
       --  Return an access to the unwind descriptor for the caller of
       --  a given frame, using only the provided return location.
 
-      function UWD_For_Caller_Of (Frame : access CFD) return UWD_Ptr;
+      function UWD_For_Caller_Of (Frame : not null access CFD) return UWD_Ptr;
       --  Return an access to the unwind descriptor for the user code caller
       --  of a given frame, or null if the information is not available.
 
-      function Pop_Frame (Frame : access CFD) return Boolean;
+      function Pop_Frame (Frame : not null access CFD) return Boolean;
       --  Update the provided machine state structure so that it reflects
       --  the state one call frame "above" the initial one.
       --
@@ -332,7 +333,8 @@ package body System.Traceback is
       --  Failure typically occurs when the top of the call stack has been
       --  reached.
 
-      function Prepare_For_Unwind_Of (Frame : access CFD) return Boolean;
+      function Prepare_For_Unwind_Of
+        (Frame : not null access CFD) return Boolean;
       --  Perform the necessary adaptations to the machine state before
       --  calling the unwinder. Currently used for the specific case of
       --  dynamically sized previous frames.
@@ -345,7 +347,7 @@ package body System.Traceback is
       -- Pop_Frame --
       ---------------
 
-      function Pop_Frame (Frame : access CFD) return Boolean is
+      function Pop_Frame (Frame : not null access CFD) return Boolean is
          Up_Frame    : aliased PFD;
          State_Ready : Boolean;
 
@@ -391,7 +393,8 @@ package body System.Traceback is
       -- Prepare_State_For_Unwind_Of --
       ---------------------------------
 
-      function Prepare_For_Unwind_Of (Frame : access CFD) return Boolean
+      function Prepare_For_Unwind_Of
+        (Frame : not null access CFD) return Boolean
       is
          Caller_UWD    : UWD_Ptr;
          FP_Adjustment : Integer;
@@ -453,7 +456,7 @@ package body System.Traceback is
       -- UWD_For_Caller_Of --
       -----------------------
 
-      function UWD_For_Caller_Of (Frame : access CFD) return UWD_Ptr
+      function UWD_For_Caller_Of (Frame : not null access CFD) return UWD_Ptr
       is
          UWD_Access : UWD_Ptr;
 
@@ -499,7 +502,7 @@ package body System.Traceback is
       -- UWD_For_RLO_Of --
       --------------------
 
-      function UWD_For_RLO_Of (Frame : access CFD) return UWD_Ptr
+      function UWD_For_RLO_Of (Frame : not null access CFD) return UWD_Ptr
       is
          UWD_Address : Address;
 
index dbac049edef4aee7e64878019a857264d2a77116..3af5cad34a05c9c6f49d6e5b4292ae7266e89777 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -46,7 +46,7 @@ package body System.Val_Dec is
 
    function Scan_Decimal
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Scale : Integer) return Integer
    is
index df36ebd9007303d7baf28bfd39ab01a6705eb86a..61d9c076cd0ef397ac2d035366ad221532c81ef9 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 1992-2005, Free Software Foundation, Inc.       --
+--            Copyright (C) 1992-2006, Free Software Foundation, Inc.       --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -40,7 +40,7 @@ package System.Val_Dec is
 
    function Scan_Decimal
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Scale : Integer) return Integer;
    --  This function scans the string starting at Str (Ptr.all) for a valid
index 60c761fdfd381ba5ff9d62e58de30b7d32fa61a4..1e2524b390cb864c5e6a1d4283c9c88e55b0b820 100644 (file)
@@ -43,7 +43,7 @@ package body System.Val_Int is
 
    function Scan_Integer
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Integer
    is
       Uval : Unsigned;
index 6413a3492723fcbca28f5d4c940bc317e8e63208..8b8a4c7a5ca910457d6250b32e81514d223df6d8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -39,7 +39,7 @@ package System.Val_Int is
 
    function Scan_Integer
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Integer;
    --  This function scans the string starting at Str (Ptr.all) for a valid
    --  integer according to the syntax described in (RM 3.5(43)). The substring
index 958fb96aa6d4f2654141a72209b6af41b4b06ce5..95a7271c0bb1110902511249430f0a7b4c08cc9f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -45,7 +45,7 @@ package body System.Val_LLD is
 
    function Scan_Long_Long_Decimal
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Scale : Integer) return Long_Long_Integer
    is
index 7022669dfcd34d02a86e33e7f07dbc17526af073..caed56e21b596a1367b37bb1c168f16756c01d09 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -40,7 +40,7 @@ package System.Val_LLD is
 
    function Scan_Long_Long_Decimal
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Scale : Integer) return Long_Long_Integer;
    --  This function scans the string starting at Str (Ptr.all) for a valid
index 850bdf1b7a938a6d16e5b5caa5a00317065389fa..20f160c939facb5b5518e3c8781dacfa2aad49c9 100644 (file)
@@ -43,7 +43,7 @@ package body System.Val_LLI is
 
    function Scan_Long_Long_Integer
      (Str  : String;
-      Ptr  : access Integer;
+      Ptr  : not null access Integer;
       Max  : Integer) return Long_Long_Integer
    is
       Uval : Long_Long_Unsigned;
index e83fd8f710b425e85eac70d6bf4d6108d0aa1024..c5c1bf9f856a76d022fa520feb68847c9569f063 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -39,7 +39,7 @@ package System.Val_LLI is
 
    function Scan_Long_Long_Integer
      (Str  : String;
-      Ptr  : access Integer;
+      Ptr  : not null access Integer;
       Max  : Integer) return Long_Long_Integer;
    --  This function scans the string starting at Str (Ptr.all) for a valid
    --  integer according to the syntax described in (RM 3.5(43)). The substring
index ab5752f4c7c41d04926a8e53108bdb50c1618329..abbbaa440f04e98bc36890a534ab1aefa789ae57 100644 (file)
@@ -42,7 +42,7 @@ package body System.Val_LLU is
 
    function Scan_Raw_Long_Long_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Long_Long_Unsigned
    is
       P : Integer;
@@ -271,7 +271,7 @@ package body System.Val_LLU is
 
    function Scan_Long_Long_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Long_Long_Unsigned
    is
       Start : Positive;
index e6c740f8a50cf021ca08a954c7cbc7df67e3616a..88a6e4cd915f2d22fe12daf2da4493045cedf877 100644 (file)
@@ -41,7 +41,7 @@ package System.Val_LLU is
 
    function Scan_Raw_Long_Long_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return System.Unsigned_Types.Long_Long_Unsigned;
    --  This function scans the string starting at Str (Ptr.all) for a valid
    --  integer according to the syntax described in (RM 3.5(43)). The substring
@@ -71,7 +71,7 @@ package System.Val_LLU is
 
    function Scan_Long_Long_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return System.Unsigned_Types.Long_Long_Unsigned;
    --  Same as Scan_Raw_Long_Long_Unsigned, except scans optional leading
    --  blanks, and an optional leading plus sign.
index e277e380991688d8cc90a09c236548c1c8ce5fbb..60f48739dab350234199a9fc848de39a0f80ac1c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -42,7 +42,7 @@ package body System.Val_Real is
 
    function Scan_Real
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Long_Long_Float
    is
       procedure Reset;
index d3b0e33d90b2eb38dc6ebe676b96358eeedf59d5..0c3510dc3230420feb5068989f1074592700fa68 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -36,7 +36,7 @@ package System.Val_Real is
 
    function Scan_Real
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Long_Long_Float;
    --  This function scans the string starting at Str (Ptr.all) for a valid
    --  real literal according to the syntax described in (RM 3.5(43)). The
index d9d7940a3560787fed50961544228a03ed3309c8..3d09321f21061d26b8c3dc6b1ccc14b4b2adc221 100644 (file)
@@ -42,7 +42,7 @@ package body System.Val_Uns is
 
    function Scan_Raw_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Unsigned
    is
       P : Integer;
@@ -268,7 +268,7 @@ package body System.Val_Uns is
 
    function Scan_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return Unsigned
    is
       Start : Positive;
index 7503ca4b72036b4ce74c87ba98cf7a819eb9fba0..80695dd386c047b36efd99f4edb1320fc644e469 100644 (file)
@@ -41,7 +41,7 @@ package System.Val_Uns is
 
    function Scan_Raw_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return System.Unsigned_Types.Unsigned;
    --  This function scans the string starting at Str (Ptr.all) for a valid
    --  integer according to the syntax described in (RM 3.5(43)). The substring
@@ -71,7 +71,7 @@ package System.Val_Uns is
 
    function Scan_Unsigned
      (Str : String;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer) return System.Unsigned_Types.Unsigned;
    --  Same as Scan_Raw_Unsigned, except scans optional leading
    --  blanks, and an optional leading plus sign.
index 258620e24b6482fa70c1b193f3881e70631911ce..f2ed3217e2bc186eb846c76e05a654f08583ee8b 100644 (file)
@@ -81,7 +81,7 @@ package body System.Val_Util is
 
    function Scan_Exponent
      (Str  : String;
-      Ptr  : access Integer;
+      Ptr  : not null access Integer;
       Max  : Integer;
       Real : Boolean := False) return Integer
    is
@@ -165,7 +165,7 @@ package body System.Val_Util is
 
    procedure Scan_Plus_Sign
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Start : out Positive)
    is
@@ -209,7 +209,7 @@ package body System.Val_Util is
 
    procedure Scan_Sign
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Minus : out Boolean;
       Start : out Positive)
@@ -286,7 +286,7 @@ package body System.Val_Util is
    procedure Scan_Underscore
      (Str : String;
       P   : in out Natural;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer;
       Ext : Boolean)
    is
index 944b945a2ae18ec3be6fcb83ad59bcac2c7c654c..90422e888163db4bda7f0ed27e9b0f30dea939e2 100644 (file)
@@ -49,7 +49,7 @@ package System.Val_Util is
 
    procedure Scan_Sign
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Minus : out Boolean;
       Start : out Positive);
@@ -72,7 +72,7 @@ package System.Val_Util is
 
    procedure Scan_Plus_Sign
      (Str   : String;
-      Ptr   : access Integer;
+      Ptr   : not null access Integer;
       Max   : Integer;
       Start : out Positive);
    --  Same as Scan_Sign, but allows only plus, not minus.
@@ -80,7 +80,7 @@ package System.Val_Util is
 
    function Scan_Exponent
      (Str  : String;
-      Ptr  : access Integer;
+      Ptr  : not null access Integer;
       Max  : Integer;
       Real : Boolean := False) return Integer;
    --  Called to scan a possible exponent. Str, Ptr, Max are as described above
@@ -101,7 +101,7 @@ package System.Val_Util is
    procedure Scan_Underscore
      (Str : String;
       P   : in out Natural;
-      Ptr : access Integer;
+      Ptr : not null access Integer;
       Max : Integer;
       Ext : Boolean);
    --  Called if an underscore is encountered while scanning digits. Str (P)
index 8ea1890585198c43e93839d831dfebbd4cb83c77..7fdf72d782fb6c4abf101cfb685dd90770f302e3 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 39e2332fbbfd278c92a71556f0dd6cec242c4495..f762602778ea1c1ca53d3eef7b1f6ba525b78d1a 100644 (file)
 --                                                                          --
 ------------------------------------------------------------------------------
 
+with Namet;  use Namet;
+with Opt;    use Opt;
+with System; use System;
+
 with Ada.Unchecked_Conversion;
 
 with GNAT.OS_Lib; use GNAT.OS_Lib;
-with Namet;       use Namet;
-with Opt;         use Opt;
-with System;      use System;
 
 package body Sinput.C is
 
index f51e1c22da95af4ec1164b42ade9bad3d3e5e5fb..9c213e9a4fd3aaf7ebbeb038f8b312299b6100ef 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 3ffd43182d5c66c84c0e69eb2d407d152fda22e1..7937020874ab4144f2cf61be907b08c2d9096826 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 663e5e5215242814c0a9d8d63da0f154081fe741..4735a5207914507c89d073db40963bae2a685ec8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
--- This specification is adapted from the Ada Reference Manual for use with --
+-- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT.  In accordance with the copyright of that document, you can freely --
 -- copy and modify this specification,  provided that if you redistribute a --
 -- modified version,  any changes that you have made are clearly indicated. --
index 004b2773ec9acc7e527780c65592ad8231473d08..d48a99480fefa81917ca1032dee36231abb73ac0 100644 (file)
@@ -53,7 +53,7 @@ package body Xref_Lib is
    --  the .ali files
 
    procedure Parse_EOL
-     (Source                 : access String;
+     (Source                 : not null access String;
       Ptr                    : in out Positive;
       Skip_Continuation_Line : Boolean := False);
    --  On return Source (Ptr) is the first character of the next line
@@ -98,7 +98,7 @@ package body Xref_Lib is
    --  The entity will never be reported as unreferenced by gnatxref -u
 
    procedure Parse_Token
-     (Source    : access String;
+     (Source    : not null access String;
       Ptr       : in out Positive;
       Token_Ptr : out Positive);
    --  Skips any separators and stores the start of the token in Token_Ptr.
@@ -107,7 +107,7 @@ package body Xref_Lib is
    --  and ASCII.HT. Parse_Token will never skip to the next line.
 
    procedure Parse_Number
-     (Source : access String;
+     (Source : not null access String;
       Ptr    : in out Positive;
       Number : out Natural);
    --  Skips any separators and parses Source upto the first character that
@@ -694,7 +694,7 @@ package body Xref_Lib is
    ---------------
 
    procedure Parse_EOL
-     (Source                 : access String;
+     (Source                 : not null access String;
       Ptr                    : in out Positive;
       Skip_Continuation_Line : Boolean := False)
    is
@@ -1143,7 +1143,7 @@ package body Xref_Lib is
    ------------------
 
    procedure Parse_Number
-     (Source : access String;
+     (Source : not null access String;
       Ptr    : in out Positive;
       Number : out Natural)
    is
@@ -1167,7 +1167,7 @@ package body Xref_Lib is
    -----------------
 
    procedure Parse_Token
-     (Source    : access String;
+     (Source    : not null access String;
       Ptr       : in out Positive;
       Token_Ptr : out Positive)
    is