shithub: mc

Download patch

ref: 6c03e0312087a22b53c44369ac758c7d8ae155e4
parent: 0c0a9801c0e2b92832a9f91d6a6e7f94e8ba277d
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)}