From: khizmax Date: Thu, 18 Sep 2014 15:58:58 +0000 (+0400) Subject: Make tools directory, move some helper scripts to it X-Git-Tag: v2.0.0~340 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=89d494acc0ba9da8f2da7a0795d53227714f1a22;p=libcds.git Make tools directory, move some helper scripts to it --- diff --git a/brush_cds.pl b/brush_cds.pl deleted file mode 100644 index bd98cc05..00000000 --- a/brush_cds.pl +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl - -my $nTabsFound = 0; - -brush() ; - -print "Tabs found: $nTabsFound\n" ; -print "Done\n" ; - -exit ; - -sub brush() -{ - processDir( "./cds" ) ; - processDir( "./src" ) ; - processDir( "./tests/test-hdr" ) ; - processDir( "./tests/unit" ) ; - processDir( "./tests/cppunit" ) ; -} - -sub processDir( $ ) -{ - my $dirName = shift ; - print "Process $dirName directory...\n"; - - opendir(my $dh, $dirName) || die "can't opendir $dirName: $!"; - my @files = grep { /^[^\.]/ } readdir($dh); - closedir $dh; - - foreach my $file ( @files ) { - if ( -d "$dirName/$file" ) { - processDir("$dirName/$file") ; - } - elsif ( $file =~ /\.(h|cpp)$/ ) { - processFile( "$dirName/$file" ) ; - } - } -} - -sub processFile( $ ) -{ - my $file = shift ; - - - if ( open( my $fh, $file )) { - binmode $fh ; - my $str = '' ; - while (<$fh>) { - $nTabsFound += $_ =~ s/\t/ /g; - $_ =~ s/\s+$// ; - $_ =~ s/\s+;$/;/; - $str .= $_ ; - $str .= "\n" ; - } - close $fh ; - - if ( open( my $fh, ">$file" )) { - binmode $fh ; - print $fh $str ; - close $fh ; - } - } -} - - - diff --git a/make_docs.bat b/make_docs.bat deleted file mode 100644 index 2db6c016..00000000 --- a/make_docs.bat +++ /dev/null @@ -1,6 +0,0 @@ -rm -fr doc -md doc -set DOXYPRJ_ROOT=. -%DOXYGEN_PATH%\bin\doxygen doxygen\cds.doxy > doxygen\doxygen.log 2>&1 -cp -f doxygen/index.html doc/index.html - diff --git a/tools/brush_cds.pl b/tools/brush_cds.pl new file mode 100644 index 00000000..a53090bb --- /dev/null +++ b/tools/brush_cds.pl @@ -0,0 +1,66 @@ +#!/usr/bin/perl + +my $nTabsFound = 0; + +brush() ; + +print "Tabs found: $nTabsFound\n" ; +print "Done\n" ; + +exit ; + +sub brush() +{ + processDir( "../cds" ) ; + processDir( "../src" ) ; + processDir( "../tests/test-hdr" ) ; + processDir( "../tests/unit" ) ; + processDir( "../tests/cppunit" ) ; +} + +sub processDir( $ ) +{ + my $dirName = shift ; + print "Process $dirName directory...\n"; + + opendir(my $dh, $dirName) || die "can't opendir $dirName: $!"; + my @files = grep { /^[^\.]/ } readdir($dh); + closedir $dh; + + foreach my $file ( @files ) { + if ( -d "$dirName/$file" ) { + processDir("$dirName/$file") ; + } + elsif ( $file =~ /\.(h|cpp)$/ ) { + processFile( "$dirName/$file" ) ; + } + } +} + +sub processFile( $ ) +{ + my $file = shift ; + + + if ( open( my $fh, $file )) { + binmode $fh ; + my $str = '' ; + while (<$fh>) { + $nTabsFound += $_ =~ s/\t/ /g; + $_ =~ s/\s+$// ; + $_ =~ s/\s+;$/;/; + $str .= $_ ; + $str .= "\n" ; + } + close $fh ; + + if ( open( my $fh, ">$file" )) { + binmode $fh ; + print $fh $str ; + close $fh ; + } + } +} + + + diff --git a/tools/make_docs.bat b/tools/make_docs.bat new file mode 100644 index 00000000..48bac73e --- /dev/null +++ b/tools/make_docs.bat @@ -0,0 +1,5 @@ +rm -fr doc +md doc +set DOXYPRJ_ROOT=. +%DOXYGEN_PATH%\bin\doxygen ..\doxygen\cds.doxy > ..\doxygen\doxygen.log 2>&1 +cp -f ../doxygen/index.html ../doc/index.html