[PATCH] ports/editors/jove/ : Patch to enable longer lines than 1024

Martin Kraemer Martin.Kraemer at Fujitsu-Siemens.com
Thu Nov 6 05:37:22 PST 2003


I use jove on several platforms, but was bothered by the short "max.
line length" of 1023.

The following patches do the following:

files/patch-ah:
  Fix erroneous use of errno (setting it instead of testing it) in
  several places in portsrv.c

files/patch-ai:
  Set max. line length to 32768 by increasing several limits which
  exist in the default source.

Feel free to improve it, or use it for the FreeBSD ports use.

  Martin
-- 
<Martin.Kraemer at Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany
-------------- next part --------------
--- ./portsrv.c	Thu Mar  7 18:34:43 1996
+++ portsrv.c	Mon Jan 20 14:37:02 2003
@@ -70,7 +70,7 @@
 		lump.header.nbytes = n;
 		/* It is not clear what we can do if this write fails */
 		do ; while (write(1, (UnivPtr) &lump, sizeof(struct header) + n) < 0
-			&& errno = EINTR);
+			&& errno == EINTR);
 	}
 }
 
@@ -85,7 +85,7 @@
 size_t	n;
 {
 	/* It is not clear what we can do if this write fails */
-	do ; while (write(1, ptr, n) < 0 && errno = EINTR);
+	do ; while (write(1, ptr, n) < 0 && errno == EINTR);
 }
 
 private void
@@ -155,7 +155,7 @@
 		byte_copy((UnivConstPtr) &pid, (UnivPtr) lump.data, sizeof(pid_t));
 		/* It is not clear what we can do if this write fails */
 		do ; while (write(1, (UnivConstPtr) &lump, sizeof(struct header) + sizeof(pid_t)) < 0
-			&& errno = EINTR);
+			&& errno == EINTR);
 
 		/* read proc's output and send it to jove */
 		read_pipe(p[0]);
@@ -181,7 +181,7 @@
 		/* It is not clear what we can do if this write fails */
 		do ; while (write(1, (UnivConstPtr) &lump,
 			sizeof(struct header) + sizeof(wait_status_t)) < 0
-				&& errno = EINTR);
+				&& errno == EINTR);
 	}
 }
 
-------------- next part --------------
Index: fp.h
===================================================================
RCS file: /home/cvs/jove/fp.h,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.4.1
diff -u -r1.1.1.2 -r1.1.1.2.4.1
--- fp.h	20 Feb 1998 16:50:41 -0000	1.1.1.2
+++ fp.h	20 Jan 2003 13:37:44 -0000	1.1.1.2.4.1
@@ -18,6 +18,8 @@
 extern void		flushscreen proto((void));
 # ifndef SMALL
 #  define MAXTTYBUF	2048
+#undef MAXTTYBUF
+#define MAXTTYBUF 35000
 # else
 #  define MAXTTYBUF	512
 # endif
Index: jove.h
===================================================================
RCS file: /home/cvs/jove/jove.h,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.4.1
diff -u -r1.1.1.2 -r1.1.1.2.4.1
--- jove.h	20 Feb 1998 16:50:59 -0000	1.1.1.2
+++ jove.h	20 Jan 2003 13:37:44 -0000	1.1.1.2.4.1
@@ -268,6 +268,8 @@
 /* term.c: universal termcap-like declarations */
 
 #define MAXCOLS		256	/* maximum number of columns */
+#undef MAXCOLS
+#define MAXCOLS	32768	/* Allow 1<<JLGBUFSIZ => 32768 columns (see also JLGBUFSIZ in sysdep.h) */
 
 extern int
 	SG,		/* number of magic cookies left by SO and SE */
--- sysdep.h~	Tue Mar 19 05:44:33 1996
+++ sysdep.h	Thu Nov  6 10:58:13 2003
@@ -154,7 +154,8 @@
 # define USE_FSYNC	1
 # define USE_FSTAT	1
 # define USE_FCHMOD	1
 # define USE_CTYPE	1
+# define JLGBUFSIZ      15	/* Allow 1<<JLGBUFSIZ => 32768 columns (see also MAXCOLS in jove.h) */
 #endif
 
 #ifdef IRIX


More information about the freebsd-ports mailing list