summaryrefslogtreecommitdiff
path: root/libstd/endian.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/endian.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libstd/endian.myr')
-rw-r--r--libstd/endian.myr32
1 files changed, 0 insertions, 32 deletions
diff --git a/libstd/endian.myr b/libstd/endian.myr
deleted file mode 100644
index 8bac74f..0000000
--- a/libstd/endian.myr
+++ /dev/null
@@ -1,32 +0,0 @@
-pkg std =
- generic hosttonet : (v : @a -> @a)
- generic nettohost : (v : @a -> @a)
-;;
-
-/* FIXME: we only support little endian platforms right now,
- so we assume a little endian machine. FIX THIS. */
-generic hosttonet = {v : @a::(integral,numeric)
- var i
- var ret
-
- ret = 0
- for i = 0; i < sizeof(@a); i++
- ret <<= 8
- ret |= v & 0xff
- v >>= 8
- ;;
- -> ret
-}
-
-generic nettohost = {v : @a::(integral,numeric)
- var i
- var ret
-
- ret = 0
- for i = 0; i < sizeof(@a); i++
- ret <<= 8
- ret |= v & 0xff
- v >>= 8
- ;;
- -> ret
-}