aboutsummaryrefslogtreecommitdiff
path: root/editors/joe2/files/patch-ad
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2000-11-17 12:19:22 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2000-11-17 12:19:22 +0000
commitd615f4ca564f838b39bd8b504a3107011d951a03 (patch)
treed799b77773a040bd9f634696266507c9072dd071 /editors/joe2/files/patch-ad
parentc2ed1d8a3eee6f0edbbd6033ea2f1717399741e2 (diff)
This commit was manufactured by cvs2svn to create tag 'RELEASE_4_2_0'.release/4.2.0
Notes
Notes: svn path=/head/; revision=35216 svn path=/tags/RELEASE_4_2_0/; revision=35217; tag=release/4.2.0
Diffstat (limited to 'editors/joe2/files/patch-ad')
-rw-r--r--editors/joe2/files/patch-ad66
1 files changed, 0 insertions, 66 deletions
diff --git a/editors/joe2/files/patch-ad b/editors/joe2/files/patch-ad
deleted file mode 100644
index a57f81ee61e2..000000000000
--- a/editors/joe2/files/patch-ad
+++ /dev/null
@@ -1,66 +0,0 @@
---- b.c.orig Fri Jan 20 13:38:25 1995
-+++ b.c Tue Dec 28 15:56:10 1999
-@@ -22,4 +22,7 @@
- #endif
- #include <errno.h>
-+#include <sys/file.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-
- #include "config.h"
-@@ -202,4 +205,5 @@
- else b->o=pdefault;
- mset(b->marks,0,sizeof(b->marks));
-+ b->filehandle = -1; /* initialize filehandle &&& ob */
- b->rdonly=0;
- b->orphan=0;
-@@ -256,4 +260,8 @@
- 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) errbuf=0;
-@@ -1672,5 +1680,6 @@
- long skip,amnt;
- char *n;
-- int nowrite=0;
-+ struct stat sb;
-+ int nowrite=0,fh=-1;
-
- if(!s || !s[0])
-@@ -1705,4 +1714,26 @@
- fi=fopen(n,"r");
- if(!fi) nowrite=0;
-+/*printf ("nowrite open=%i\n", nowrite); */
-+
-+ /* check file mod, if no write flags set,
-+ joe in read only mode. &&& ob */
-+
-+ if (!nowrite) {
-+ nowrite = (!stat (n, &sb)) && (!(sb.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)));
-+ }
-+/*printf ("nowrite stat=%i\n", nowrite); */
-+
-+ /* lock the file if writable, or go into read only mode if
-+ already locked, */
-+
-+ if ((fi) && (!nowrite)) {
-+ fh = dup( fileno(fi) );
-+ nowrite = (flock (fh, LOCK_EX | LOCK_NB));
-+ }
-+/*printf ("nowrite flock=%i\n", nowrite); */
-+
-+/*nowrite = 1; */ /* for test purpose */
-+/*printf ("nowrite=%i\n", nowrite); */
-+
- }
- joesep(n);
-@@ -1762,4 +1793,5 @@
-
- b->er=error;
-+ if( fh != -1 ) b->filehandle = fh;
- return b;
- }