aboutsummaryrefslogtreecommitdiff
path: root/editors/joe-devel/files/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'editors/joe-devel/files/patch-ad')
-rw-r--r--editors/joe-devel/files/patch-ad63
1 files changed, 0 insertions, 63 deletions
diff --git a/editors/joe-devel/files/patch-ad b/editors/joe-devel/files/patch-ad
deleted file mode 100644
index 39c52b56e693..000000000000
--- a/editors/joe-devel/files/patch-ad
+++ /dev/null
@@ -1,63 +0,0 @@
---- b.c.orig Fri Dec 7 19:13:04 2001
-+++ b.c Fri Dec 7 19:13:10 2001
-@@ -17,6 +17,9 @@
- #include <pwd.h>
- #endif
- #include <errno.h>
-+#include <sys/file.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
- #include <stdlib.h>
- #include <ctype.h>
- #include <string.h>
-@@ -187,6 +190,7 @@
- else
- b->o = pdefault;
- mset(b->marks, 0, sizeof(b->marks));
-+ b->filehandle = -1; /* initialize filehande &&& ob */
- b->rdonly = 0;
- b->orphan = 0;
- b->oldcur = 0;
-@@ -239,6 +243,10 @@
- void brm(B * b)
- {
- if (b && !--b->count) {
-+ if (b->filehandle != -1) {
-+ /* close filehandle, free lock &&& ob */
-+ close (b->filehandle);
-+ }
- if (b->changed)
- abrerr(b->name);
- if (b == errbuf)
-@@ -1805,7 +1813,8 @@
- B *b;
- long skip, amnt;
- char *n;
-- int nowrite = 0;
-+ struct stat sb;
-+ int nowrite = 0, fh = -1;
-
- if (!s || !s[0]) {
- error = -1;
-@@ -1852,6 +1861,12 @@
- goto opnerr;
- }
-
-+ /* Lock the file &&& ob,petef */
-+ if (fi) {
-+ fh = dup( fileno(fi) );
-+ nowrite = (flock (fh, LOCK_EX | LOCK_NB));
-+ }
-+
- /* Skip data if we need to */
- if (skip && lseek(fileno(fi), skip, 0) < 0) {
- int r;
-@@ -1907,6 +1922,8 @@
- vsrm(n);
-
- b->er = error;
-+ if (fh != -1)
-+ b->filehandle = fh;
- return b;
- }
-