]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Jan 2010 13:39:30 +0000 (14:39 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Jan 2010 13:39:30 +0000 (14:39 +0100)
2010-01-27  Vasiliy Fofanov  <fofanov@adacore.com>

* g-regist.adb (For_Every_Key): Fix previous change.

2010-01-27  Thomas Quinot  <quinot@adacore.com>

* lib-writ.ads: Current version of spec for new N (note) ALI lines

2010-01-27  Yannick Moy  <moy@adacore.com>

* a-cdlili.adb (Insert): Correct exception message when cursor
designates wrong list.

From-SVN: r156284

gcc/ada/ChangeLog
gcc/ada/a-cdlili.adb
gcc/ada/g-regist.adb
gcc/ada/lib-writ.ads

index 10cf7299dc04eefee324cc38866e5f7850bfd889..a0ff729910c3baa8e893f7981f9c9c81e840ec2d 100644 (file)
@@ -1,3 +1,17 @@
+2010-01-27  Vasiliy Fofanov  <fofanov@adacore.com>
+
+       * g-regist.adb (For_Every_Key): Fix previous change.
+       Minor reformatting.
+
+2010-01-27  Thomas Quinot  <quinot@adacore.com>
+
+       * lib-writ.ads: Current version of spec for new N (note) ALI lines
+
+2010-01-27  Yannick Moy  <moy@adacore.com>
+
+       * a-cdlili.adb (Insert): Correct exception message when cursor
+       designates wrong list.
+
 2010-01-27  Vincent Celier  <celier@adacore.com>
 
        * gnatcmd.adb: When there is only one main specified, the package
index c2e0d9d0a0a7b4a58e288011334f2ddbd240ff3a..78ed93a411e0743ef705b78fc1d5850b2435c45c 100644 (file)
@@ -621,7 +621,7 @@ package body Ada.Containers.Doubly_Linked_Lists is
       if Before.Container /= null then
          if Before.Container /= Container'Unrestricted_Access then
             raise Program_Error with
-              "attempt to tamper with elements (list is busy)";
+              "Before cursor designates wrong list";
          end if;
 
          pragma Assert (Vet (Before), "bad cursor in Insert");
index 44dd8db15645d2a4197e20f09c5c6b1a18e5dbad..ba63b3c8326103103f3a389a738969f0857d6fab 100644 (file)
@@ -243,7 +243,7 @@ package body GNAT.Registry is
    -------------------
 
    procedure For_Every_Key
-     (From_Key : HKEY;
+     (From_Key  : HKEY;
       Recursive : Boolean := False)
    is
       procedure Recursive_For_Every_Key
@@ -251,12 +251,15 @@ package body GNAT.Registry is
          Recursive : Boolean := False;
          Quit      : in out Boolean);
 
+      -----------------------------
+      -- Recursive_For_Every_Key --
+      -----------------------------
+
       procedure Recursive_For_Every_Key
         (From_Key : HKEY;
          Recursive : Boolean := False;
          Quit      : in out Boolean)
       is
-
          use type LONG;
          use type ULONG;
 
@@ -271,11 +274,17 @@ package body GNAT.Registry is
 
          function Current_Name return String;
 
+         ------------------
+         -- Current_Name --
+         ------------------
+
          function Current_Name return String is
          begin
             return Interfaces.C.To_Ada (Sub_Key);
          end Current_Name;
 
+      --  Start of processing for Recursive_For_Every_Key
+
       begin
          loop
             Size_Sub_Key := Sub_Key'Length;
@@ -286,23 +295,28 @@ package body GNAT.Registry is
 
             exit when not (Result = ERROR_SUCCESS);
 
-            Action (Natural (Index) + 1, From_Key, Current_Name, Quit);
+            Sub_Hkey := Open_Key (From_Key, Interfaces.C.To_Ada (Sub_Key));
 
-            exit when Quit;
+            Action (Natural (Index) + 1, Sub_Hkey, Current_Name, Quit);
 
-            if Recursive then
-               Sub_Hkey := Open_Key (From_Key, Interfaces.C.To_Ada (Sub_Key));
+            if not Quit and then Recursive then
                Recursive_For_Every_Key (Sub_Hkey, True, Quit);
-               Close_Key (Sub_Hkey);
             end if;
 
+            Close_Key (Sub_Hkey);
+
             exit when Quit;
 
             Index := Index + 1;
          end loop;
       end Recursive_For_Every_Key;
 
+      --  Local Variables
+
       Quit : Boolean := False;
+
+   --  Start of processing for For_Every_Key
+
    begin
       Recursive_For_Every_Key (From_Key, Recursive, Quit);
    end For_Every_Key;
index fa8af04d6aecca2610e18a27c60b89edef446582..593442c4d4fb6c48fa938eb1e2e9cef2450bd8b3 100644 (file)
@@ -654,6 +654,40 @@ package Lib.Writ is
    --  The cross-reference data follows the dependency lines. See the spec of
    --  Lib.Xref for details on the format of this data.
 
+   --  --------------
+   --  -- N  Notes --
+   --  --------------
+
+   --  The note lines record annotations inserted in source code for processing
+   --  by external tools using pragmas. For each occurrence of any of these
+   --  pragmas, a line is generated with the following syntax:
+
+   --    N <dep>x<sloc> [<arg_id>:]<arg> ...
+
+   --  x is one of:
+   --    A  pragma Annotate
+   --    C  pragma Comment
+   --    I  pragma Ident
+   --    T  pragma Title
+   --    S  pragma Subtitle
+
+   --  <dep>  is the source file containing the pragma by its dependency index
+   --         (first D line has index 1)
+   --  <sloc> is the source location of the pragma
+
+   --  Successive entries record the pragma_argument_associations.
+
+   --  For a named association, the entry is prefixed with the pragma argument
+   --  identifier <arg_id> followed by a colon.
+
+   --  <arg> represents the pragma argument, and has the following conventions:
+
+   --   - identifiers are output verbatim
+   --   - static string expressions are output as literals encoded as for
+   --       L lines
+   --   - static integer expressions are output as decimal literals
+   --   - any other expression is replaced by the placeholder "<expr>"
+
    ---------------------------------
    -- Source Coverage Obligations --
    ---------------------------------