summaryrefslogtreecommitdiff
path: root/editors/joe
diff options
context:
space:
mode:
authoris <is>1999-11-25 17:03:19 +0000
committeris <is>1999-11-25 17:03:19 +0000
commitcbd17701a92f92eaf3777b13a1fd06cc4aa793b9 (patch)
treebd0420576685561f38dca2bd36138f26c3809430 /editors/joe
parentf4dd630a89f15e5c82c9e4ee7a9b8f3239c7b4a7 (diff)
downloadpkgsrc-cbd17701a92f92eaf3777b13a1fd06cc4aa793b9.tar.gz
Check return code of close()/fclose() in a few places.
Without this, joe doesn't notice that you exceeded your filesystem quota, and happily creates a zero length file (throwing away all your changes).
Diffstat (limited to 'editors/joe')
-rw-r--r--editors/joe/files/patch-sum3
-rw-r--r--editors/joe/patches/patch-ac33
2 files changed, 35 insertions, 1 deletions
diff --git a/editors/joe/files/patch-sum b/editors/joe/files/patch-sum
index 6dc24c546ae..16c120575f9 100644
--- a/editors/joe/files/patch-sum
+++ b/editors/joe/files/patch-sum
@@ -1,4 +1,5 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 13:50:43 agc Exp $
+$NetBSD: patch-sum,v 1.2 1999/11/25 17:03:19 is Exp $
MD5 (patch-aa) = 4d03abaa1efe74c7df2948f77ec2c2cb
MD5 (patch-ab) = 66fca9918c3d57d16fba7bfc339df0d7
+MD5 (patch-ac) = 163befde22583603bc7cca3872ba0fed
diff --git a/editors/joe/patches/patch-ac b/editors/joe/patches/patch-ac
new file mode 100644
index 00000000000..3e0ebe41546
--- /dev/null
+++ b/editors/joe/patches/patch-ac
@@ -0,0 +1,33 @@
+--- ../../work/joe/b.c Fri Jan 20 09:38:25 1995
++++ b.c Thu Nov 25 18:17:59 1999
+@@ -1928,7 +1928,7 @@
+ if(s[0]=='!') pclose(f);
+ else
+ #endif
+- if(zcmp(s,"-")) fclose(f);
++ if(zcmp(s,"-")) { if (fclose(f)) return error = -5; }
+ else fflush(f);
+
+ opnerr:;
+--- ../../work/joe/ufile.c Fri Jan 13 18:13:16 1995
++++ ufile.c Thu Nov 25 17:25:47 1999
+@@ -135,7 +135,7 @@
+ int cp(from,to)
+ char *from, *to;
+ {
+- int f, g, amnt;
++ int f, g, amnt, rc;
+ struct stat sbuf;
+
+ #ifdef HAVEUTIME
+@@ -157,8 +157,8 @@
+ }
+ while((amnt=read(f,stdbuf,stdsiz))>0)
+ if(amnt!=write(g,stdbuf,amnt)) break;
+- close(f); close(g);
+- if(amnt) return -1;
++ close(f); rc = close(g);
++ if(amnt || rc) return -1;
+
+ #ifdef HAVEUTIME
+ #ifdef NeXT