summaryrefslogtreecommitdiff
path: root/debian/patches/50increase-max-TERM-length.patch
blob: fb32064fd614c47d3b4e0589329b614b9dedbc2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From: Andy Spencer
Subject: [screen-devel] [PATCH 1/1] Increase max TERM length to 40 characters
Date: Tue, 5 Apr 2011 03:26:58 +0000
Source: https://lists.gnu.org/archive/html/screen-devel/2011-04/msg00002.html
Debian-Bugs: 630976 621804

Some terms contain rather long TERM names these days, for example,
`rxvt-unicode-256color'. Increasing the max size for the TERM variables
avoids the `$TERM too long - sorry.' error when using these terms.

---
 display.h |    2 +-
 screen.h  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: screen/display.h
===================================================================
--- screen.orig/display.h	2011-10-06 01:30:53.000000000 +0200
+++ screen/display.h	2011-10-08 21:28:51.000000000 +0200
@@ -73,7 +73,7 @@
   struct win *d_other;		/* pointer to other window */
   int   d_nonblock;		/* -1 don't block if obufmax reached */
 				/* >0: block after nonblock secs */
-  char  d_termname[20 + 1];	/* $TERM */
+  char  d_termname[40 + 1];	/* $TERM */
   char	*d_tentry;		/* buffer for tgetstr */
   char	d_tcinited;		/* termcap inited flag */
   int	d_width, d_height;	/* width/height of the screen */
Index: screen/screen.h
===================================================================
--- screen.orig/screen.h	2011-10-08 21:20:57.000000000 +0200
+++ screen/screen.h	2011-10-08 21:28:45.000000000 +0200
@@ -214,7 +214,7 @@
 	  char preselect[20];
 	  int esc;		/* his new escape character unless -1 */
 	  int meta_esc;		/* his new meta esc character unless -1 */
-	  char envterm[20 + 1];	/* terminal type */
+	  char envterm[40 + 1];	/* terminal type */
 	  int encoding;		/* encoding of display */
 	  int detachfirst;      /* whether to detach remote sessions first */
 	}
Index: screen/process.c
===================================================================
--- screen.orig/process.c	2013-07-22 16:56:05.000000000 +0200
+++ screen/process.c	2013-07-22 17:02:15.000000000 +0200
@@ -2664,9 +2664,9 @@
       s = NULL;
       if (ParseSaveStr(act, &s))
 	break;
-      if (strlen(s) >= 20)
+      if (strlen(s) >= 40)
 	{
-	  OutputMsg(0, "%s: term: argument too long ( < 20)", rc_name);
+	  OutputMsg(0, "%s: term: argument too long ( < 40)", rc_name);
 	  free(s);
 	  break;
 	}