summaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-16 10:39:25 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-16 10:39:25 +0000
commitc11fc57837acfd62de02d5fc28a83d7c3b4587a5 (patch)
treec7cfc9f3cb19cd9ce12a949d10b55f4489a76d65 /test/data
parenteee0b5e4eae37ec56b78668c16d715c705a81a5c (diff)
downloadlibcss-c11fc57837acfd62de02d5fc28a83d7c3b4587a5.tar.gz
libcss-c11fc57837acfd62de02d5fc28a83d7c3b4587a5.tar.bz2
Script to manufacture OPV word from 3 hex values.
svn path=/trunk/libcss/; revision=6074
Diffstat (limited to 'test/data')
-rwxr-xr-xtest/data/parse/makeopv.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/data/parse/makeopv.pl b/test/data/parse/makeopv.pl
new file mode 100755
index 0000000..8961d48
--- /dev/null
+++ b/test/data/parse/makeopv.pl
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+die "Usage: makeopv.pl <opcode> <flags> <value>\n" if (@ARGV != 3);
+
+my ($opcode, $flags, $value) = @ARGV;
+
+printf("0x%.8x\n", hex($opcode) | hex($flags) << 10 | hex($value) << 18);
+