ref: 0ffaabebcf294f1488a26f84c9f6ff3621d8319d
parent: d27288db4ad5b2154c8c946029f8ed1943012286
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Aug 26 22:33:39 EDT 2017
Ordonly/Owronly => Oread/Owrite.
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -149,8 +149,8 @@
/* 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")
;;
--- a/lib/crypto/entropy.myr
+++ b/lib/crypto/entropy.myr
@@ -7,7 +7,7 @@
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
--- a/lib/inifile/parse.myr
+++ b/lib/inifile/parse.myr
@@ -18,7 +18,7 @@
;;
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
;;
--- a/lib/std/blat.myr
+++ b/lib/std/blat.myr
@@ -7,7 +7,7 @@
;;
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
;;
--- a/lib/std/bytealloc.myr
+++ b/lib/std/bytealloc.myr
@@ -73,7 +73,7 @@
}
const startalloctrace = {path
- match openmode(path, Owronly | Ocreat, 0o644)
+ match openmode(path, Owrite | Ocreat, 0o644)
| `Ok fd: tracefd = fd
| `Err e: -> void
;;
--- a/lib/std/slurp.myr
+++ b/lib/std/slurp.myr
@@ -15,7 +15,7 @@
const slurp = {path
var sl
- match open(path, Ordonly)
+ match open(path, Oread)
| `Err e: -> `Err e
| `Ok fd:
sl = fslurp(fd)
--- a/lib/std/syswrap+plan9.myr
+++ b/lib/std/syswrap+plan9.myr
@@ -27,8 +27,8 @@
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)
--- a/lib/std/syswrap+posixy.myr
+++ b/lib/std/syswrap+posixy.myr
@@ -25,12 +25,13 @@
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 */
--- a/lib/sys/sys+plan9-x64.myr
+++ b/lib/sys/sys+plan9-x64.myr
@@ -27,8 +27,8 @@
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
--- a/mbld/test.myr
+++ b/mbld/test.myr
@@ -75,7 +75,7 @@
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)