ref: 5012321224ab424e3e7b166506690dc77d34d021
parent: b7756ecff1779f6b0a411e96db7a66c42ae3f577
author: Ori Bernstein <[email protected]>
date: Tue Dec 23 10:22:29 EST 2014
Fix some syntax errors.
--- a/libstd/syswrap+plan9.myr
+++ b/libstd/syswrap+plan9.myr
@@ -1,6 +1,5 @@
use sys
use "types.use"
-use "slcp.use"
pkg std =
type fd = sys.fd
@@ -10,7 +9,6 @@
const Ordonly : fdopt = sys.Ordonly castto(fdopt)
const Owronly : fdopt = sys.Owronly castto(fdopt)
const Ordwr : fdopt = sys.Ordwr castto(fdopt)
- const Ocreat : fdopt = sys.Ocreat castto(fdopt)
const Otrunc : fdopt = sys.Otrunc castto(fdopt)
const Ocreat : fdopt = 0x100000 /* Emulated by redirecting to create().*/
@@ -42,7 +40,6 @@
/* fd stuff */
const open = {path, opts; -> openmode(path, opts, 0o777)}
-}
const openmode = {path, opts, mode;
if opts & Ocreat
sys.create(path, opts, mode)
@@ -49,6 +46,7 @@
else
sys.open(path, opts castto(sys.fdopt)) castto(fd)
;;
+}
const close = {fd; -> sys.close(fd castto(sys.fd))}
const creat = {path, mode; -> sys.create(path, opts, mode) castto(fd)}
const read = {fd, buf; -> sys.read(fd castto(sys.fd), buf) castto(size)}