summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ed.c
diff options
context:
space:
mode:
authoraiju <aiju@phicode.de>2011-07-25 18:51:15 +0200
committeraiju <aiju@phicode.de>2011-07-25 18:51:15 +0200
commitacf6c4a6a4ea6d3b66306bd0d2e9b8af1a92d4a2 (patch)
tree0631ddcbe56b8481b1e1f10d7a8c46c732087040 /sys/src/cmd/ed.c
parent591c37b4b9257496f7a7cbc196a61f9ef8d2a0a2 (diff)
added read/write error handling to ed
Diffstat (limited to 'sys/src/cmd/ed.c')
-rw-r--r--sys/src/cmd/ed.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/ed.c b/sys/src/cmd/ed.c
index 52d6c40c1..5e81c7aee 100644
--- a/sys/src/cmd/ed.c
+++ b/sys/src/cmd/ed.c
@@ -127,6 +127,7 @@ main(int argc, char *argv[])
char *p1, *p2;
Binit(&bcons, 0, OREAD);
+ Blethal(&bcons, nil);
notify(notifyf);
ARGBEGIN {
case 'o':
@@ -322,6 +323,7 @@ commands(void)
free(d);
}
Binit(&iobuf, io, OREAD);
+ Blethal(&iobuf, nil);
setwide();
squeeze(0);
c = zero != dol;
@@ -370,6 +372,7 @@ commands(void)
if((io = create(file, OWRITE, 0666)) < 0)
error(file);
Binit(&iobuf, io, OWRITE);
+ Blethal(&iobuf, nil);
wrapp = 0;
if(dol > zero)
putfile();
@@ -669,6 +672,7 @@ rescue(void)
io = create("ed.hup", OWRITE, 0666);
if(io > 0){
Binit(&iobuf, io, OWRITE);
+ Blethal(&iobuf, nil);
putfile();
}
}