kernel-ark/drivers/staging/lirc
Joe Perches 95cd17c9f3 staging: Remove unnecessary semicolons when switch (foo) {...};
Done via perl script:

$ cat remove_semi_switch.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces      = qr/(\{(?:[^\{\}]++|(?-1))*\})/;

foreach my $file (@ARGV) {
    my $f;
    my $text;
    my $oldtext;

    next if ((-d $file));

    open($f, '<', $file)
	or die "$P: Can't open $file for read\n";
    $oldtext = do { local($/) ; <$f> };
    close($f);

    next if ($oldtext eq "");

    $text = $oldtext;

    my $count = 0;
    do {
	$count = 0;
	$count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
    } while ($count > 0);

    if ($text ne $oldtext) {
	my $newfile = $file;

	open($f, '>', $newfile)
	    or die "$P: Can't open $newfile for write\n";
	print $f $text;
	close($f);
    }
}

$

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:58:35 -07:00
..
Kconfig [media] lirc: remove staging lirc_it87 and lirc_ite8709 drivers 2011-03-22 17:20:13 -03:00
lirc_bt829.c
lirc_ene0100.h Fix common misspellings 2011-03-31 11:26:23 -03:00
lirc_igorplugusb.c
lirc_imon.c [media] lirc: silence some compile warnings 2011-03-22 19:24:20 -03:00
lirc_parallel.c staging: lirc: fix for "lirc_dev: lirc_register_driver: driver pointer must be not NULL!" 2011-03-07 13:23:26 -08:00
lirc_parallel.h
lirc_sasem.c [media] lirc: silence some compile warnings 2011-03-22 19:24:20 -03:00
lirc_serial.c staging: Remove unnecessary semicolons when switch (foo) {...}; 2011-04-25 16:58:35 -07:00
lirc_sir.c [media] staging/lirc: fix mem leaks and ptr err usage 2011-01-19 12:52:22 -02:00
lirc_ttusbir.c
lirc_zilog.c [media] lirc_zilog: error out if buffer read bytes != chunk size 2011-03-22 19:24:21 -03:00
Makefile [media] lirc: remove staging lirc_it87 and lirc_ite8709 drivers 2011-03-22 17:20:13 -03:00
TODO
TODO.lirc_zilog [media] lirc_zilog: Update TODO list based on work completed and revised plans 2011-03-22 19:24:01 -03:00