]> gitweb.factorcode.org Git - factor.git/blobdiff - core/checksums/crc32/crc32.factor
use radix literals
[factor.git] / core / checksums / crc32 / crc32.factor
index e937cf591086c008d48baffa4d26b0960802bc0f..415317c813c2d01fe1f0068bd1755c34f3c84cc4 100644 (file)
@@ -5,7 +5,7 @@ words io io.binary io.files quotations
 definitions checksums ;
 IN: checksums.crc32
 
-CONSTANT: crc32-polynomial HEX: edb88320
+CONSTANT: crc32-polynomial 0xedb88320
 
 CONSTANT: crc32-table V{ }
 
@@ -25,7 +25,7 @@ SINGLETON: crc32
 INSTANCE: crc32 checksum
 
 : init-crc32 ( input checksum -- x y input )
-    drop [ HEX: ffffffff dup ] dip ; inline
+    drop [ 0xffffffff dup ] dip ; inline
 
 : finish-crc32 ( x y -- bytes )
     bitxor 4 >be ; inline