HCoop
/
clinton
/
Smoothieware.git
/ blame_incremental
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(non-incremental) |
history
|
HEAD
Merge pull request #1334 from CapnBry/z-grid-dest
[clinton/Smoothieware.git]
/
checksum.pl
This page requires JavaScript to run. Use
this page
instead.
... / ...
Commit
Line
Data
1
#!/usr/bin/perl
2
3
use strict;
4
5
while (defined $ARGV[0]) {
6
my $s1 = 0;
7
my $s2 = 0;
8
my $str = shift @ARGV;
9
10
for (split //, $str) {
11
$s1 = ($s1 + (ord $_)) % 255;
12
$s2 = ($s2 + $s1) % 255;
13
};
14
printf "%s:\t%d\n", $str, ($s2<<8) + $s1;
15
}