summaryrefslogtreecommitdiff
path: root/libstd/cstrconv.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/cstrconv.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libstd/cstrconv.myr')
-rw-r--r--libstd/cstrconv.myr40
1 files changed, 0 insertions, 40 deletions
diff --git a/libstd/cstrconv.myr b/libstd/cstrconv.myr
deleted file mode 100644
index fa9e0bf..0000000
--- a/libstd/cstrconv.myr
+++ /dev/null
@@ -1,40 +0,0 @@
-use "types.use"
-
-pkg std =
- const cstrlen : (buf : byte[:] -> size)
- const cstrconv : (buf : byte[:] -> byte[:])
- const cstrconvp : (p : byte# -> byte[:])
-;;
-
-const cstrconv = {buf
- var i
-
- for i = 0; i < buf.len; i++
- if buf[i] == 0
- -> buf[:i]
- ;;
- ;;
- -> buf
-}
-
-const cstrconvp = {p
- var i, base
-
- i = 0
- base = p castto(intptr)
- while ((base + i) castto(byte#))# != 0
- i++
- ;;
- -> p[:i]
-}
-
-const cstrlen = {buf
- var i
-
- for i = 0; i < buf.len; i++
- if buf[i] == 0
- break
- ;;
- ;;
- -> i
-}