summaryrefslogtreecommitdiff
path: root/lib/bio
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-01 23:06:16 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-01 23:07:46 -0700
commit6507bf31d345f0046a1415088e42390c8befdd97 (patch)
tree79f9c09722ec670555ea0e3d4fff4bfe76ca32c9 /lib/bio
parent02efc3a7d15eb97ec7b80be68474d112f65493c8 (diff)
downloadmc-6507bf31d345f0046a1415088e42390c8befdd97.tar.gz
Update the C glue library detection.
We still need to propagate the extra libs, though.
Diffstat (limited to 'lib/bio')
-rw-r--r--lib/bio/bio.myr6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bio/bio.myr b/lib/bio/bio.myr
index 4242721..17b9508 100644
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -35,6 +35,7 @@ pkg bio =
const flush : (f : file# -> bool)
/* seeking */
+ const seek : (f : file#, std.off -> std.off)
/* single unit operations */
const putb : (f : file#, b : byte -> std.size)
@@ -226,6 +227,11 @@ const flush = {f
-> ret
}
+const seek = {f, off
+ flush(f)
+ -> std.seek(f.fd, off, std.Seekset)
+}
+
/* writes a single byte to the output stream */
const putb = {f, b
ensurewrite(f, 1)