]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compression/run-length/run-length.factor
use radix literals
[factor.git] / basis / compression / run-length / run-length.factor
index cde2a7e1134c537cb7b00a93b9434b17c60ecb75..deaed9e947a7b0758096ae98122030968a1976a0 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays combinators grouping kernel locals math
-math.matrices math.order multiline sequence-parser sequences
+math.matrices math.order multiline sequences.parser sequences
 tools.continuations ;
 IN: compression.run-length
 
@@ -9,7 +9,7 @@ IN: compression.run-length
     2 group [ first2 <array> ] map B{ } concat-as ;
 
 : 8hi-lo ( byte -- hi lo )
-    [ HEX: f0 bitand -4 shift ] [ HEX: f bitand ] bi ; inline
+    [ 0xf0 bitand -4 shift ] [ 0xf bitand ] bi ; inline
 
 :: run-length-uncompress-bitmap4 ( byte-array m n -- byte-array' )
     byte-array <sequence-parser> :> sp
@@ -21,7 +21,7 @@ IN: compression.run-length
     [
         ! i j [ number>string ] bi@ " " glue .
         sp next dup 0 = [
-            sp next dup HEX: 03 HEX: ff between? [
+            sp next dup 0x03 0xff between? [
                 nip [ sp ] dip dup odd?
                 [ 1 + take-n but-last ] [ take-n ] if
                 [ j matrix i swap nth copy ] [ length j + j! ] bi
@@ -53,7 +53,7 @@ IN: compression.run-length
     [
         ! i j [ number>string ] bi@ " " glue .
         sp next dup 0 = [
-            sp next dup HEX: 03 HEX: ff between? [
+            sp next dup 0x03 0xff between? [
                 nip [ sp ] dip dup odd?
                 [ 1 + take-n but-last ] [ take-n ] if
                 [ j matrix i swap nth copy ] [ length j + j! ] bi