summaryrefslogtreecommitdiff
path: root/libstd/env+posixy.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/env+posixy.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libstd/env+posixy.myr')
-rw-r--r--libstd/env+posixy.myr28
1 files changed, 0 insertions, 28 deletions
diff --git a/libstd/env+posixy.myr b/libstd/env+posixy.myr
deleted file mode 100644
index d7b0e5e..0000000
--- a/libstd/env+posixy.myr
+++ /dev/null
@@ -1,28 +0,0 @@
-use sys
-
-use "extremum.use"
-use "option.use"
-use "sleq.use"
-
-pkg std =
- const getenv : (name : byte[:] -> option(byte[:]))
- const getenvv : (name : byte[:], default : byte[:] -> byte[:])
-;;
-
-const getenv = {name
- var n
- for env in sys.__environment
- n = min(name.len, env.len)
- if sleq(name, env[:n]) && sleq(env[n:n+1], "=")
- -> `Some env[n+1:]
- ;;
- ;;
- -> `None
-}
-
-const getenvv = {name, default
- match getenv(name)
- | `Some v: -> v
- | `None: -> default
- ;;
-}