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 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 */ }