diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-08-30 07:06:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-08-30 07:06:39 -0300 |
commit | 9bcda4998b34e63d38d390763cdbda7706f033d9 (patch) | |
tree | 963ec6a411f4d3c6393a6477d89613290989c8aa /v4l/scripts | |
parent | d0c6f4ec6b9d0e37d63cfc2e25bd415f305a0be8 (diff) | |
parent | 67e93560aecd64287dd726434d034631f33fa158 (diff) | |
download | mediapointer-dvb-s2-9bcda4998b34e63d38d390763cdbda7706f033d9.tar.gz mediapointer-dvb-s2-9bcda4998b34e63d38d390763cdbda7706f033d9.tar.bz2 |
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts')
-rw-r--r-- | v4l/scripts/headers_convert.pl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/v4l/scripts/headers_convert.pl b/v4l/scripts/headers_convert.pl new file mode 100644 index 000000000..800a453e1 --- /dev/null +++ b/v4l/scripts/headers_convert.pl @@ -0,0 +1,30 @@ +#!/usr/bin/perl +# +# headers_install prepare the listed header files for use in +# user space and copy the files to their destination. +# + +use strict; +use warnings; + +foreach (@ARGV) { + my $file = $_; + my $tmpfile = $file . ".tmp"; + + open(my $infile, '<', "$file") + or die "$file: $!\n"; + open(my $outfile, '>', "$tmpfile") or die "$tmpfile: $!\n"; + while (my $line = <$infile>) { + $line =~ s/([\s(])__user\s/$1/g; + $line =~ s/([\s(])__force\s/$1/g; + $line =~ s/([\s(])__iomem\s/$1/g; + $line =~ s/\s__attribute_const__\s/ /g; + $line =~ s/\s__attribute_const__$//g; + $line =~ s/^#include <linux\/compiler.h>//; + printf $outfile "%s", $line; + } + close $outfile; + close $infile; + system "mv $tmpfile $file"; +} +exit 0; |