From 3f1370f2b54ac50262219641f47257d43ea3fc5b Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 5 Jan 2008 21:46:39 -0600 Subject: [PATCH] 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 --- core/io/crc32/crc32.factor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/io/crc32/crc32.factor b/core/io/crc32/crc32.factor index d6a812c3de..82af0cdb23 100644 --- a/core/io/crc32/crc32.factor +++ b/core/io/crc32/crc32.factor @@ -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 ;