summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica McKellar <jesstess@mit.edu>2010-11-10 21:34:59 -0500
committerJessica McKellar <jesstess@mit.edu>2010-11-12 21:04:10 -0500
commit35e7eb23b3a7bc9ae79f7f8a91a0f714b398c135 (patch)
tree2dbaee0ddd22e253794860a7489c82b8d74f8615
parentc1aa031d9354f6b1a4212b0ac9178411dc6477f9 (diff)
downloadscreen-jesstess-screen.tar.gz
Increase the maximum allowed TERM length (to 30, in MAXTERMLEN).jesstess-screen
This change allows in particular rxvt-unicode-256color users to use screen, and resolves bug #30880.
-rw-r--r--src/display.h6
-rw-r--r--src/screen.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/display.h b/src/display.h
index e8b3b80..0e882c4 100644
--- a/src/display.h
+++ b/src/display.h
@@ -56,6 +56,10 @@ struct kmap_ext
#endif
+#ifndef MAXTERMLEN
+#define MAXTERMLEN 30
+#endif
+
struct win; /* forward declaration */
struct display
@@ -73,7 +77,7 @@ struct display
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[MAXTERMLEN + 1]; /* $TERM */
char *d_tentry; /* buffer for tgetstr */
char d_tcinited; /* termcap inited flag */
int d_width, d_height; /* width/height of the screen */
diff --git a/src/screen.h b/src/screen.h
index 73c17ba..34d8d9e 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -214,7 +214,7 @@ struct msg
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[MAXTERMLEN + 1]; /* terminal type */
int encoding; /* encoding of display */
int detachfirst; /* whether to detach remote sessions first */
}