Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Nov 2003 14:37:05 +0100
From:      Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com>
To:        ports@FreeBSD.org
Subject:    [PATCH] ports/editors/jove/ : Patch to enable longer lines than 1024
Message-ID:  <20031106133705.GA4986@deejai2.mch.fsc.net>

next in thread | raw e-mail | index | archive | help

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ah

--- ./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);
 	}
 }
 

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ai

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

--sm4nu43k4a2Rpi4c--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031106133705.GA4986>