Mauro Carvalho Chehab 60d3603ba0 [media] drx-j: Remove typedefs in drxj.c
Remove three typedefs from drxj.c, using the following script:

use File::Find;
use strict;

my $dir = shift or die "need a dir";
my $type = shift or die "need type";
my $var = shift or die "need var";

sub handle_file {
	my $file = shift;

	my $out;

	open IN, $file or die "can't open $file";
	$out .= $_ while (<IN>);
	close IN;

	$out =~ s/\btypedef\s+($type)\s+\{([\d\D]+?)\s*\}\s+\b($var)[^\;]+\;/$type $var \{\2\};/;

        # This replaces the typedef declaration for a simple struct declaration - style 1

        # This replaces the typedef declaration for a simple struct declaration - style 2

	# Replace struct occurrences

	$out =~ s,\b($var)_t\s+,$type \1 ,g;
	$out =~ s,\bp_*($var)_t\s+,$type \1 *,g;
	$out =~ s,\b($var)_t\b,$type \1,g;
	$out =~ s,\bp_*($var)_t\b,$type \1 *,g;

	open OUT, ">$file" or die "can't open $file";
	print OUT $out;
	close OUT;
}

sub parse_dir {
	my $file = $File::Find::name;

	return if (!($file =~ /.[ch]$/));

	handle_file $file;
}

find({wanted => \&parse_dir, no_chdir => 1}, $dir);

Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-04 14:29:02 -03:00
..
2013-03-23 09:03:59 -03:00
2013-03-23 09:03:59 -03:00
2013-12-04 15:24:42 -02:00
2013-03-23 09:03:59 -03:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-04-22 17:13:43 -03:00
2013-04-22 17:13:43 -03:00
2013-04-22 16:58:16 -03:00
2013-02-06 09:24:09 -02:00
2013-04-22 16:58:16 -03:00
2013-03-23 09:03:59 -03:00
2013-03-23 09:03:59 -03:00
2013-02-06 09:24:09 -02:00
2012-09-23 20:11:26 -03:00
2013-03-23 09:03:59 -03:00
2013-03-23 09:03:59 -03:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-03-23 09:03:59 -03:00
2013-03-23 09:03:59 -03:00
2013-03-23 09:03:59 -03:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-10-31 06:09:23 -02:00
2013-02-06 09:24:09 -02:00
2014-02-07 08:03:07 -02:00
2014-02-07 08:03:07 -02:00
2013-03-23 09:03:59 -03:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2012-09-18 12:46:27 -03:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00
2013-02-06 09:24:09 -02:00