summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-16 12:10:02 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-16 12:10:02 +0000
commitff49ea030a789a629d6f57157827d964b156edb6 (patch)
tree80ac9e0b404c76f867036259b2a3e479a7cb01cd /test
parentaee21231bd45b128b8e48a21dfca57f308a453ce (diff)
downloadlibcss-ff49ea030a789a629d6f57157827d964b156edb6.tar.gz
libcss-ff49ea030a789a629d6f57157827d964b156edb6.tar.bz2
Manufacture fixed point values from floats
svn path=/trunk/libcss/; revision=6076
Diffstat (limited to 'test')
-rwxr-xr-xtest/data/parse/makefixed.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/data/parse/makefixed.pl b/test/data/parse/makefixed.pl
new file mode 100755
index 0000000..712784f
--- /dev/null
+++ b/test/data/parse/makefixed.pl
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+die "Usage: makefixed.pl <value>\n" if (@ARGV != 1);
+
+my $val = shift @ARGV;
+
+printf("0x%.8x\n", $val * (1 << 10));
+