summaryrefslogtreecommitdiffstats
path: root/gcc/ada/g-regist.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-27 13:39:30 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-01-27 13:39:30 +0000
commit21871cb76bf907321f5fcb153a45548e2cc8797e (patch)
treebf99c34f9ece05f590d7ed12388a614712bdbe45 /gcc/ada/g-regist.adb
parente837694788dc1d70ada513c1c5b7e53c2e45a01d (diff)
downloadppe42-gcc-21871cb76bf907321f5fcb153a45548e2cc8797e.tar.gz
ppe42-gcc-21871cb76bf907321f5fcb153a45548e2cc8797e.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156284 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-regist.adb')
-rw-r--r--gcc/ada/g-regist.adb28
1 files changed, 21 insertions, 7 deletions
diff --git a/gcc/ada/g-regist.adb b/gcc/ada/g-regist.adb
index 44dd8db1564..ba63b3c8326 100644
--- a/gcc/ada/g-regist.adb
+++ b/gcc/ada/g-regist.adb
@@ -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;
OpenPOWER on IntegriCloud