diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-01 09:09:43 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-01 09:09:43 -0200 |
commit | fd33d30eaf1d0c4f84d835172c845e7c4b15033e (patch) | |
tree | 9ed746d8e53de9840b8fd0184bf3ca3a931cc235 /v4l2-apps/util/xc3028-firmware/extract_head.h | |
parent | bfe842d9d57aab64b1dc7162a8248472ca3b4bda (diff) | |
download | mediapointer-dvb-s2-fd33d30eaf1d0c4f84d835172c845e7c4b15033e.tar.gz mediapointer-dvb-s2-fd33d30eaf1d0c4f84d835172c845e7c4b15033e.tar.bz2 |
Avoid needing to run perl script on machines with 64-bit int
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/util/xc3028-firmware/extract_head.h')
-rw-r--r-- | v4l2-apps/util/xc3028-firmware/extract_head.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/v4l2-apps/util/xc3028-firmware/extract_head.h b/v4l2-apps/util/xc3028-firmware/extract_head.h index 0bc0d19f9..373ac78ba 100644 --- a/v4l2-apps/util/xc3028-firmware/extract_head.h +++ b/v4l2-apps/util/xc3028-firmware/extract_head.h @@ -60,17 +60,18 @@ char *extract_header = "#!/usr/bin/perl\n" " syswrite(OUTFILE, chr($l0).chr($l1).chr($l2).chr($l3));\n" "}\n" "\n" - "sub write_le64($)\n" + "sub write_le64($$)\n" "{\n" - " my $val = shift;\n" - " my $l7 = ($val >> 56) & 0xff;\n" - " my $l6 = ($val >> 48) & 0xff;\n" - " my $l5 = ($val >> 40) & 0xff;\n" - " my $l4 = ($val >> 32) & 0xff;\n" - " my $l3 = ($val >> 24) & 0xff;\n" - " my $l2 = ($val >> 16) & 0xff;\n" - " my $l1 = ($val >> 8) & 0xff;\n" - " my $l0 = $val & 0xff;\n" + " my $msb_val = shift;\n" + " my $lsb_val = shift;\n" + " my $l7 = ($msb_val >> 24) & 0xff;\n" + " my $l6 = ($msb_val >> 16) & 0xff;\n" + " my $l5 = ($msb_val >> 8) & 0xff;\n" + " my $l4 = $msb_val & 0xff;\n\n" + " my $l3 = ($lsb_val >> 24) & 0xff;\n" + " my $l2 = ($lsb_val >> 16) & 0xff;\n" + " my $l1 = ($lsb_val >> 8) & 0xff;\n" + " my $l0 = $lsb_val & 0xff;\n" "\n" " syswrite(OUTFILE,\n" " chr($l0).chr($l1).chr($l2).chr($l3).\n" |