Mercurial > ec-dotfiles
diff bin/cek.rb @ 486:324c5842af87
Replace tabs with spaces.
author | edogawaconan <me@myconan.net> |
---|---|
date | Wed, 16 Oct 2013 03:45:54 +0900 |
parents | 72c299437fde |
children | a0f4a3e15322 |
line wrap: on
line diff
--- a/bin/cek.rb Sat Oct 12 23:57:56 2013 +0700 +++ b/bin/cek.rb Wed Oct 16 03:45:54 2013 +0900 @@ -3,12 +3,12 @@ block = 1048576 ARGV.each do |filename| - crc = 0 - file = File.open(filename, 'rb') - currentbyte = 0 - while (line = file.read(block)) do - crc = Zlib.crc32(line,crc) - end - file.close - printf("%s %08X\n", filename, crc.to_i) + crc = 0 + file = File.open(filename, 'rb') + currentbyte = 0 + while (line = file.read(block)) do + crc = Zlib.crc32(line,crc) + end + file.close + printf("%s %08X\n", filename, crc.to_i) end