Francois Gouget : winapi_test: Simplify the code that builds the list of headers to process.

Alexandre Julliard julliard at winehq.org
Mon May 18 08:13:13 CDT 2009


Module: wine
Branch: master
Commit: d537476894471dbae75044e8fc5d997f02806950
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d537476894471dbae75044e8fc5d997f02806950

Author: Francois Gouget <fgouget at free.fr>
Date:   Sun May 17 13:26:16 2009 +0200

winapi_test: Simplify the code that builds the list of headers to process.

---

 tools/winapi/winapi_test |   35 +++++++++++++----------------------
 1 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/tools/winapi/winapi_test b/tools/winapi/winapi_test
index 99a7276..cf3a2b6 100755
--- a/tools/winapi/winapi_test
+++ b/tools/winapi/winapi_test
@@ -47,32 +47,23 @@ if ($options->pack) {
     push @tests, "pack";
 }
 
-my @files = ();
+my @files;
 {
     my %files;
 
-    my %test_dirs;
-    foreach my $test (@tests) {
-	my @test_dirs = $tests->get_test_dirs($test);
-	foreach my $test_dir (@test_dirs) {
-	    my @headers = $tests->get_section($test_dir, $test, "header");
-	    foreach my $header (@headers) {
-		$files{"include/$header"} = 1;
-	    }
-	}
-    }
-
-    foreach my $test (@tests) {
-	my @test_dirs = $tests->get_test_dirs($test);
-	foreach my $test_dir (@test_dirs) {
-	    my @headers = $tests->get_section($test_dir, $test, "header");
-	    foreach my $header (@headers) {
-		if($files{"include/$header"}) {
+    foreach my $test (@tests)
+    {
+	foreach my $test_dir ($tests->get_test_dirs($test))
+        {
+	    foreach my $header ($tests->get_section($test_dir, $test, "header"))
+            {
+                if (!$files{$header})
+                {
 		    push @files, "include/$header";
-		    $files{"include/$header"} = 0;
-		}
-	    }
-	}
+                    $files{$header} = 1;
+                }
+            }
+        }
     }
 }
 




More information about the wine-cvs mailing list