Permalink
Browse files

fix codetest failures

add copyright line
add pir coda
remove trailing spaces
some documentati8on would be welcome!
  • Loading branch information...
1 parent b3ec6cf commit 79595251a932dda08433d336caf56fb2f186b59d @mikehh mikehh committed Dec 13, 2010
Showing with 12 additions and 4 deletions.
  1. +12 −4 md5task/main_m.pir
View
@@ -1,20 +1,28 @@
+# Copyright (C) 2010, Parrot Foundation.
+
.sub main
.param pmc argv
load_bytecode "Digest/MD5.pbc"
.local pmc mba
.local string filename
-
+
set filename, argv[1]
$S0 = "Creating new MappedByteArray, and opening " . filename
say $S0
- mba = new 'MappedByteArray'
+ mba = new 'MappedByteArray'
mba.'open'(filename)
say 'getting the data from the Mapped Byte Array...'
$I1 = elements mba
$S0 = mba.'get_string'(0, $I1, 'binary')
-
+
$P1 = _md5sum($S0)
$S0 = _md5_hex($P1)
say $S0
- .end
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:

0 comments on commit 7959525

Please sign in to comment.