summaryrefslogtreecommitdiff
path: root/lib/bio
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-12 09:01:39 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-15 23:01:09 -0700
commit610852e18629b8a9a4c4f4ed6e6fc7a336152511 (patch)
treeb69e2c8d29091b688115a499a50521d6d81cad1a /lib/bio
parentae9a74441cba3160943ad18bf500781143bff096 (diff)
downloadmc-610852e18629b8a9a4c4f4ed6e6fc7a336152511.tar.gz
Move to use 'for var i = ...' construct.
Diffstat (limited to 'lib/bio')
-rw-r--r--lib/bio/bio.myr13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/bio/bio.myr b/lib/bio/bio.myr
index 3ad9760..301822b 100644
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -291,9 +291,7 @@ const ensurecodepoint = {f
little endian format
*/
generic putle = {f, v : @a::(numeric,integral)
- var i
-
- for i = 0; i < sizeof(@a); i++
+ for var i = 0; i < sizeof(@a); i++
putb(f, (v & 0xff) castto(byte))
v >>= 8
;;
@@ -305,9 +303,7 @@ generic putle = {f, v : @a::(numeric,integral)
big endian format
*/
generic putbe = {f, v : @a::(numeric,integral)
- var i
-
- for i = sizeof(@a); i != 0; i--
+ for var i = sizeof(@a); i != 0; i--
putb(f, ((v >> ((i-1)*8)) & 0xff) castto(byte))
;;
-> sizeof(@a)
@@ -360,7 +356,6 @@ const readln = {f
const readdelim = {f, delim, drop
var ret
- var i, j
ret = [][:]
while true
@@ -374,9 +369,9 @@ const readdelim = {f, delim, drop
-> `std.None
;;
;;
- for i = f.rstart; i < f.rend; i++
+ for var i = f.rstart; i < f.rend; i++
if f.rbuf[i] == delim[0]
- for j = 0; j < delim.len; j++
+ for var j = 0; j < delim.len; j++
if f.rbuf[i + j] != delim[j]
goto nextiterread
;;