summaryrefslogtreecommitdiff
path: root/libstd/blat.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
commit2bc852bda98762d3bc01548bf972e3f1b137fbfb (patch)
tree74831deed3c9057c5fe0cbb8790d220e855bc792 /libstd/blat.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libstd/blat.myr')
-rw-r--r--libstd/blat.myr32
1 files changed, 0 insertions, 32 deletions
diff --git a/libstd/blat.myr b/libstd/blat.myr
deleted file mode 100644
index 90c0f94..0000000
--- a/libstd/blat.myr
+++ /dev/null
@@ -1,32 +0,0 @@
-use "syswrap.use"
-
-pkg std =
- const blat : (path : byte[:], buf : byte[:], perm : int64 -> bool)
- const fblat : (f : fd, buf : byte[:] -> bool)
-;;
-
-const blat = {path, buf, perm
- var fd
-
- fd = openmode(path, Ocreat|Owronly, perm)
- if fd < 0
- -> false
- ;;
- -> fblat(fd, buf)
-}
-
-
-const fblat = {fd, buf
- var written, n
-
- n = 0
- while true
- written = write(fd, buf[n:])
- if written <= 0
- goto done
- ;;
- n += written
- ;;
-:done
- -> written == 0 && n == buf.len
-}