summaryrefslogtreecommitdiff
path: root/libstd/getcwd.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/getcwd.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libstd/getcwd.myr')
-rw-r--r--libstd/getcwd.myr31
1 files changed, 0 insertions, 31 deletions
diff --git a/libstd/getcwd.myr b/libstd/getcwd.myr
deleted file mode 100644
index c9dbbea..0000000
--- a/libstd/getcwd.myr
+++ /dev/null
@@ -1,31 +0,0 @@
-
-use "alloc.use"
-use "errno.use"
-use "extremum.use"
-use "syswrap.use"
-use "syswrap-ss.use"
-pkg std =
- const getcwd : (-> byte[:])
-;;
-
-const getcwd = {
- var len, n, buf
-
- len = 128
- while true
- buf = std.slalloc(len)
- n = bgetcwd(buf)
- if n >= 0
- /* n is the length of the nul terminated c string */
- -> buf[:n]
- elif n != Erange
- std.slfree(buf)
- -> ""
- else
- len *= 2
- ;;
- ;;
- /* unreachable; shut up return without value analysis */
- -> ""
-}
-