summaryrefslogtreecommitdiff
path: root/lib/bio
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-08-27 15:55:36 -0700
committerOri Bernstein <ori@eigenstate.org>2016-08-27 15:55:36 -0700
commite83d16d5bd500b8e1913a836560f943a757ab86b (patch)
treeed88a93da5185122d16eec51086a053f0910b9a0 /lib/bio
parent6121d28dc28103cb85b22fe404daaa8c441790b4 (diff)
downloadmc-e83d16d5bd500b8e1913a836560f943a757ab86b.tar.gz
Rename `std.Fail to `std.Err.
Diffstat (limited to 'lib/bio')
-rw-r--r--lib/bio/bio.myr12
-rw-r--r--lib/bio/test/bio-create.myr2
-rw-r--r--lib/bio/test/bio-delim.myr2
-rw-r--r--lib/bio/test/bio-endianrd.myr2
-rw-r--r--lib/bio/test/bio-endianwr.myr2
-rw-r--r--lib/bio/test/bio-peek.myr2
-rw-r--r--lib/bio/test/bio-read.myr2
-rw-r--r--lib/bio/test/bio-unitwr.myr2
-rw-r--r--lib/bio/test/bio-write.myr2
9 files changed, 14 insertions, 14 deletions
diff --git a/lib/bio/bio.myr b/lib/bio/bio.myr
index a6dfd48..d93137f 100644
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -117,7 +117,7 @@ const create = {path, mode, perm
const dial = {srv, mode
match std.dial(srv)
| `std.Ok sock: -> `std.Ok mkfile(sock, mode)
- | `std.Fail m: -> `std.Fail m
+ | `std.Err m: -> `std.Err m
;;
}
@@ -136,7 +136,7 @@ const sysmode = {mode
const sysopen = {path, mode, openmode, perm
match std.openmode(path, openmode, (perm : int64))
| `std.Ok fd: -> `std.Ok mkfile(fd, mode)
- | `std.Fail e: -> `std.Fail "could not open fd"
+ | `std.Err e: -> `std.Err "could not open fd"
;;
}
@@ -232,7 +232,7 @@ const read = {f, dst
| `std.Ok n:
count += n
d = d[n:]
- | `std.Fail err:
+ | `std.Err err:
if count == 0
-> `Err errtype(err)
else
@@ -268,7 +268,7 @@ const seek = {f, off
f.rstart = f.rend = 0
match std.seek(f.fd, off, std.Seekset)
| `std.Ok ret: -> `std.Ok ret
- | `std.Fail e: -> `std.Fail errtype(e)
+ | `std.Err e: -> `std.Err errtype(e)
;;
}
@@ -604,7 +604,7 @@ const writebuf = {fd, src
| `std.Ok n:
count += n
src = src[n:]
- | `std.Fail e:
+ | `std.Err e:
-> `Err errtype(e)
;;
;;
@@ -646,7 +646,7 @@ const fill = {f, min
| `std.Ok n:
count += n
f.rend += n
- | `std.Fail e:
+ | `std.Err e:
if count > 0
f.lasterr = e
else
diff --git a/lib/bio/test/bio-create.myr b/lib/bio/test/bio-create.myr
index a15c9f0..7015f6a 100644
--- a/lib/bio/test/bio-create.myr
+++ b/lib/bio/test/bio-create.myr
@@ -7,7 +7,7 @@ const main = {
std.mkdir("tmpout", 0o755);
match bio.create("tmpout/test-create", bio.Wr, 0o644)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Failed to open file: {}\n", m)
+ | `std.Err m: std.fatal("Failed to open file: {}\n", m)
;;
bio.close(f)
}
diff --git a/lib/bio/test/bio-delim.myr b/lib/bio/test/bio-delim.myr
index 7bb0dcf..139b542 100644
--- a/lib/bio/test/bio-delim.myr
+++ b/lib/bio/test/bio-delim.myr
@@ -7,7 +7,7 @@ const main = {
match bio.open("data/lines", bio.Rd)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Unable to open data file: {}\n", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}\n", m)
;;
/* read first line */
diff --git a/lib/bio/test/bio-endianrd.myr b/lib/bio/test/bio-endianrd.myr
index 629d9a6..bad5d57 100644
--- a/lib/bio/test/bio-endianrd.myr
+++ b/lib/bio/test/bio-endianrd.myr
@@ -17,7 +17,7 @@ const main = {
/* use the expected write data as read data */
match bio.open("data/bio-endianwr-expected", bio.Rd)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Unable to open data file: {}\n", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}\n", m)
;;
/* byte */
diff --git a/lib/bio/test/bio-endianwr.myr b/lib/bio/test/bio-endianwr.myr
index 1173bef..c4391f3 100644
--- a/lib/bio/test/bio-endianwr.myr
+++ b/lib/bio/test/bio-endianwr.myr
@@ -10,7 +10,7 @@ const main = {
match bio.create("tmpout/test-endianwr", bio.Wr, 0o644)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Unable to open data file: {}\n", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}\n", m)
;;
/* byte */
diff --git a/lib/bio/test/bio-peek.myr b/lib/bio/test/bio-peek.myr
index 1f80f06..062464c 100644
--- a/lib/bio/test/bio-peek.myr
+++ b/lib/bio/test/bio-peek.myr
@@ -8,7 +8,7 @@ const main = {
match bio.open("data/datafile", bio.Rd)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Unable to open data file: {}", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}", m)
;;
std.assert(peekb(f) == 0x30, "wrong byte value read from datafile")
diff --git a/lib/bio/test/bio-read.myr b/lib/bio/test/bio-read.myr
index 2112d42..5db9274 100644
--- a/lib/bio/test/bio-read.myr
+++ b/lib/bio/test/bio-read.myr
@@ -9,7 +9,7 @@ const main = {
match bio.open("data/datafile", bio.Rd)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Unable to open data file: {}", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}", m)
;;
/* read a 4 byte chunk j*/
diff --git a/lib/bio/test/bio-unitwr.myr b/lib/bio/test/bio-unitwr.myr
index 1a78e97..5b66bbb 100644
--- a/lib/bio/test/bio-unitwr.myr
+++ b/lib/bio/test/bio-unitwr.myr
@@ -5,7 +5,7 @@ const main = {
var f
match bio.create("tmpout/test-unitwr", bio.Wr, 0o644)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Unable to open data file: {}\n", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}\n", m)
;;
bio.putb(f, 42)
bio.putc(f, 'ה')
diff --git a/lib/bio/test/bio-write.myr b/lib/bio/test/bio-write.myr
index 27a3f12..3b682c5 100644
--- a/lib/bio/test/bio-write.myr
+++ b/lib/bio/test/bio-write.myr
@@ -9,7 +9,7 @@ const main = {
match bio.create("tmpout/test-write", bio.Wr, 0o644)
| `std.Ok bio: f = bio
- | `std.Fail m: std.fatal("Unable to open data file: {}", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}", m)
;;
/* write a 5 byte chunk */