From 785f5992d84bb72a79ec6cd15389c79b9a434e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Date: Tue, 22 Apr 2014 13:59:12 +0200 Subject: [PATCH] fix screen to run on terminals with long $TERM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to tic man page: Terminal names exceeding the maximum alias length (32 characters on systems with long filenames, 14 characters otherwise) will be truncated to the maximum alias length and a warning message will be printed. Use 32 as it's bigger value and it won't matter on systems with smaller filenames. Signed-off-by: Amadeusz Sławiński --- src/display.h | 2 +- src/screen.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/display.h b/src/display.h index e8b3b80..5a497c5 100644 --- a/src/display.h +++ b/src/display.h @@ -73,7 +73,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[32 + 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 e74d711..0529967 100644 --- a/src/screen.h +++ b/src/screen.h @@ -203,7 +203,7 @@ struct msg int nargs; char line[MAXPATHLEN]; char dir[MAXPATHLEN]; - char screenterm[20]; /* is screen really "screen" ? */ + char screenterm[32]; /* is screen really "screen" ? */ } create; struct @@ -215,7 +215,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[32 + 1]; /* terminal type */ int encoding; /* encoding of display */ int detachfirst; /* whether to detach remote sessions first */ }