summaryrefslogtreecommitdiff
path: root/include/control/uncomment.pl
blob: f06f52c8bb318f509744f40bc5ae2e00c82d4805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use strict;
use warnings;

foreach (@ARGV)
{

	open FILE, $_ or die "Couldn't open file: $!"; 
	my $string = join("", <FILE>); 
	close FILE;

	$string=~ s|/[*].*?[*]/||sg;
	$string=~ s/virtual//sg; 
	$string=~ s/=0;/;/sg;
	$string=~ s/(^|\n)[\n\s]*/$1/g;

	open F, ">$_" or die "Couldn't open file: $!"; 
	print F $string;
	close F;
}