From fdebbca7547a0bbeac5335e8ee97e073ac495c40 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 2 Jun 2010 13:13:43 +0000 Subject: 27990: don't use return value from setupterm() to decide if module booted OK --- Src/Modules/termcap.c | 10 +++++++--- Src/Modules/terminfo.c | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'Src/Modules') diff --git a/Src/Modules/termcap.c b/Src/Modules/termcap.c index 784844169..7367dade7 100644 --- a/Src/Modules/termcap.c +++ b/Src/Modules/termcap.c @@ -370,9 +370,13 @@ boot_(Module m) #ifdef HAVE_TGETENT # ifdef HAVE_SETUPTERM int errret; - if (setupterm((char *)0, 1, &errret) == ERR) { - return 1; - } + + /* + * Just because we can't set up the terminal doesn't + * mean the modules hasn't booted---TERM may change, + * and it should be handled dynamically---so ignore errors here. + */ + (void)setupterm((char *)0, 1, &errret); # endif #endif return 0; diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c index db9a6c053..88e326f63 100644 --- a/Src/Modules/terminfo.c +++ b/Src/Modules/terminfo.c @@ -341,8 +341,12 @@ boot_(Module m) # ifdef HAVE_SETUPTERM int errret; - if (setupterm((char *)0, 1, &errret) == ERR) - return 1; + /* + * Just because we can't set up the terminal doesn't + * mean the modules hasn't booted---TERM may change, + * and it should be handled dynamically---so ignore errors here. + */ + (void)setupterm((char *)0, 1, &errret); # endif #endif -- cgit v1.2.3-70-g09d2