+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
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");
-------------------
procedure For_Every_Key
- (From_Key : HKEY;
+ (From_Key : HKEY;
Recursive : Boolean := False)
is
procedure Recursive_For_Every_Key
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;
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;
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;
-- 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 --
---------------------------------