Trims down unnecessary set cases
[libcds.git] / tools / brush_cds.pl
index a8ca3862021d746d6388f0c05d028ac585e2832f..4e67a4e82b48b61fe8a94ef0326f54b4d1efaa5e 100644 (file)
@@ -16,9 +16,7 @@ sub brush()
 {\r
        processDir( "../cds" ) ;\r
        processDir( "../src" ) ;\r
-       processDir( "../tests/test-hdr" ) ;\r
-       processDir( "../tests/unit" ) ;\r
-       processDir( "../tests/cppunit" ) ;\r
+       processDir( "../test" ) ;\r
 }\r
 \r
 sub processDir( $ )\r
@@ -45,53 +43,20 @@ sub processFile( $ )
        my $file = shift;\r
 \r
        if ( open( my $fh, $file )) {\r
-               binmode $fh     ;\r
+               #binmode $fh    ;\r
                my $str = '';\r
                while (<$fh>) {\r
-            if ( /^\/\/\$\$CDS-header\$\$/ ) {\r
-                $str .= \r
-"/*\r
-    This file is a part of libcds - Concurrent Data Structures library\r
-\r
-    (C) Copyright Maxim Khizhinsky (libcds.dev\@gmail.com) 2006-$year\r
-\r
-    Source code repo: http://github.com/khizmax/libcds/\r
-    Download: http://sourceforge.net/projects/libcds/files/\r
-    \r
-    Redistribution and use in source and binary forms, with or without\r
-    modification, are permitted provided that the following conditions are met:\r
-\r
-    * Redistributions of source code must retain the above copyright notice, this\r
-      list of conditions and the following disclaimer.\r
-\r
-    * Redistributions in binary form must reproduce the above copyright notice,\r
-      this list of conditions and the following disclaimer in the documentation\r
-      and/or other materials provided with the distribution.\r
-\r
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\r
-    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
-    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r
-    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r
-    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r
-    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     \r
-*/\n" ;\r
-            }\r
-            else {\r
-                $nTabsFound += $_ =~ s/\t/    /g;\r
-                $_ =~ s/\s+$//  ;\r
-                $_ =~ s/\s+;$/;/;\r
-                $str .= $_      ;\r
-                $str .= "\n"    ;\r
-            }\r
+            $nTabsFound += $_ =~ s/\t/    /g;\r
+            $_ =~ s/\s+$//;\r
+            $_ =~ s/\s+;$/;/;\r
+            $_ =~ s/\)\s+\)/\)\)/g;\r
+            $str .= $_      ;\r
+            $str .= "\n"    ;\r
                }\r
                close $fh;\r
                \r
                if ( open( my $fh, ">$file" )) {\r
-                       binmode $fh;\r
+                       #binmode $fh;\r
                        print $fh $str;\r
                        close $fh;\r
                }\r