lines-crc32 now crcs a \n at the end of each line. it is still off by one \n if the last line doesn't have a newline, but it's good enough for the parser
parent
de3ea8cc19
commit
3f1370f2b5
|
@ -30,4 +30,6 @@ DEFER: crc32-table inline
|
|||
: file-crc32 ( path -- n ) file-contents crc32 ;
|
||||
|
||||
: lines-crc32 ( seq -- n )
|
||||
HEX: ffffffff tuck [ [ (crc32) ] each ] reduce bitxor ;
|
||||
HEX: ffffffff tuck [
|
||||
[ (crc32) ] each CHAR: \n (crc32)
|
||||
] reduce bitxor ;
|
||||
|
|
Loading…
Reference in New Issue