summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-08-30 07:43:57 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-08-30 07:43:57 -0300
commit56e4c75fce1cca2ee4553fd47b31dc8b6d43d688 (patch)
treecf92072da97e8aea3315303ac188d4f8432d42a8 /v4l/scripts
parent937ba8f2a0dc3b8cdb98de9a48c256ad24427ac9 (diff)
parent9bcda4998b34e63d38d390763cdbda7706f033d9 (diff)
downloadmediapointer-dvb-s2-56e4c75fce1cca2ee4553fd47b31dc8b6d43d688.tar.gz
mediapointer-dvb-s2-56e4c75fce1cca2ee4553fd47b31dc8b6d43d688.tar.bz2
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-dev
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.pl30
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;