summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-08-27 02:33:39 -0700
committerOri Bernstein <ori@eigenstate.org>2017-08-27 02:33:39 -0700
commit0ffaabebcf294f1488a26f84c9f6ff3621d8319d (patch)
tree1cde7acb6c35bb1b7a11802b51f7aeb0a35657eb
parentd27288db4ad5b2154c8c946029f8ed1943012286 (diff)
downloadmc-0ffaabebcf294f1488a26f84c9f6ff3621d8319d.tar.gz
Ordonly/Owronly => Oread/Owrite.
-rw-r--r--lib/bio/bio.myr4
-rw-r--r--lib/crypto/entropy.myr2
-rw-r--r--lib/inifile/parse.myr2
-rw-r--r--lib/std/blat.myr2
-rw-r--r--lib/std/bytealloc.myr2
-rw-r--r--lib/std/slurp.myr2
-rw-r--r--lib/std/syswrap+plan9.myr4
-rw-r--r--lib/std/syswrap+posixy.myr5
-rw-r--r--lib/sys/sys+plan9-x64.myr4
-rw-r--r--mbld/test.myr2
10 files changed, 15 insertions, 14 deletions
diff --git a/lib/bio/bio.myr b/lib/bio/bio.myr
index e56844a..0a611f3 100644
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -149,8 +149,8 @@ const dial = {srv, mode
/* map from the bio modes to the unix open modes */
const sysmode = {mode
match mode
- | Rd: -> std.Ordonly
- | Wr: -> std.Owronly
+ | Rd: -> std.Oread
+ | Wr: -> std.Owrite
| Rw: -> std.Ordwr
| _: std.fatal("bio: bad file mode")
;;
diff --git a/lib/crypto/entropy.myr b/lib/crypto/entropy.myr
index b5c5120..8120791 100644
--- a/lib/crypto/entropy.myr
+++ b/lib/crypto/entropy.myr
@@ -7,7 +7,7 @@ pkg crypto =
var randfd
const __init__ = {
- randfd = std.try(std.open("/dev/random", std.Ordonly))
+ randfd = std.try(std.open("/dev/random", std.Oread))
}
const getentropy = {buf
diff --git a/lib/inifile/parse.myr b/lib/inifile/parse.myr
index e2490c2..cd78813 100644
--- a/lib/inifile/parse.myr
+++ b/lib/inifile/parse.myr
@@ -18,7 +18,7 @@ type parser = struct
;;
const load = {path
- match std.open(path, std.Ordonly)
+ match std.open(path, std.Oread)
| `std.Ok fd: -> loadf(fd)
| `std.Err e: -> `std.Err `Fileerr
;;
diff --git a/lib/std/blat.myr b/lib/std/blat.myr
index c0e2b4b..f68f089 100644
--- a/lib/std/blat.myr
+++ b/lib/std/blat.myr
@@ -7,7 +7,7 @@ pkg std =
;;
const blat = {path, buf, perm
- match openmode(path, Ocreat|Owronly, perm)
+ match openmode(path, Ocreat|Owrite, perm)
| `Ok fd: -> fblat(fd, buf)
| `Err e: -> false
;;
diff --git a/lib/std/bytealloc.myr b/lib/std/bytealloc.myr
index 654aa88..cfb6c72 100644
--- a/lib/std/bytealloc.myr
+++ b/lib/std/bytealloc.myr
@@ -73,7 +73,7 @@ const __init__ = {
}
const startalloctrace = {path
- match openmode(path, Owronly | Ocreat, 0o644)
+ match openmode(path, Owrite | Ocreat, 0o644)
| `Ok fd: tracefd = fd
| `Err e: -> void
;;
diff --git a/lib/std/slurp.myr b/lib/std/slurp.myr
index a966e4a..8e653f9 100644
--- a/lib/std/slurp.myr
+++ b/lib/std/slurp.myr
@@ -15,7 +15,7 @@ const Bufstart = 4096
const slurp = {path
var sl
- match open(path, Ordonly)
+ match open(path, Oread)
| `Err e: -> `Err e
| `Ok fd:
sl = fslurp(fd)
diff --git a/lib/std/syswrap+plan9.myr b/lib/std/syswrap+plan9.myr
index ddf37ab..e4a04ba 100644
--- a/lib/std/syswrap+plan9.myr
+++ b/lib/std/syswrap+plan9.myr
@@ -27,8 +27,8 @@ pkg std =
const Failmem : byte# = (-1 : byte#)
- const Ordonly : fdopt = (sys.Ordonly : fdopt)
- const Owronly : fdopt = (sys.Owronly : fdopt)
+ const Oread : fdopt = (sys.Ordonly : fdopt)
+ const Owrite : fdopt = (sys.Owronly : fdopt)
const Ordwr : fdopt = (sys.Ordwr : fdopt)
const Otrunc : fdopt = (sys.Otrunc : fdopt)
const Ocexec : fdopt = (sys.Ocexec : fdopt)
diff --git a/lib/std/syswrap+posixy.myr b/lib/std/syswrap+posixy.myr
index 5766a00..f49f9b8 100644
--- a/lib/std/syswrap+posixy.myr
+++ b/lib/std/syswrap+posixy.myr
@@ -25,12 +25,13 @@ pkg std =
const Seekcur : whence = (sys.Seekcur : whence)
const Seekend : whence = (sys.Seekend : whence)
- const Ordonly : fdopt = (sys.Ordonly : fdopt)
- const Owronly : fdopt = (sys.Owronly : fdopt)
+ const Oread : fdopt = (sys.Ordonly : fdopt)
+ const Owrite : fdopt = (sys.Owronly : fdopt)
const Ordwr : fdopt = (sys.Ordwr : fdopt)
const Ocreat : fdopt = (sys.Ocreat : fdopt)
const Otrunc : fdopt = (sys.Otrunc : fdopt)
const Ocexec : fdopt = (sys.Ocloexec : fdopt)
+ const Oappend : fdopt = (sys.Oappend : fdopt)
const Odir : fdopt = (sys.Odir : fdopt)
/* fd stuff */
diff --git a/lib/sys/sys+plan9-x64.myr b/lib/sys/sys+plan9-x64.myr
index a42a0a2..c49bde1 100644
--- a/lib/sys/sys+plan9-x64.myr
+++ b/lib/sys/sys+plan9-x64.myr
@@ -27,8 +27,8 @@ pkg sys =
const Maxerr : size = 128
- const Ordonly : fdopt = 0
- const Owronly : fdopt = 1
+ const Oread : fdopt = 0
+ const Owrite : fdopt = 1
const Ordwr : fdopt = 2
const Oexec : fdopt = 3
diff --git a/mbld/test.myr b/mbld/test.myr
index 292cc58..62cd89c 100644
--- a/mbld/test.myr
+++ b/mbld/test.myr
@@ -75,7 +75,7 @@ const runtest = {b, n, failed
std.fatal("\nunable to run test: {}\n", m)
| `std.Ok (pid, infd, outfd):
log = std.strcat(std.basename(n.lbl), ".log")
- logfd = std.try(std.openmode(log, std.Owronly | std.Ocreat, 0o644))
+ logfd = std.try(std.openmode(log, std.Owrite | std.Ocreat, 0o644))
sub = showsub(b, n.lbl, outfd, logfd, failed)
std.slfree(log)
std.close(infd)