summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-06-02 13:13:43 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-06-02 13:13:43 +0000
commitfdebbca7547a0bbeac5335e8ee97e073ac495c40 (patch)
tree4fdc953d432eabc6475b66ff4ec2f002d1699d82
parent5068080f7824c09ba1cce43e15303695b315589a (diff)
downloadzsh-fdebbca7547a0bbeac5335e8ee97e073ac495c40.tar.gz
zsh-fdebbca7547a0bbeac5335e8ee97e073ac495c40.zip
27990: don't use return value from setupterm()
to decide if module booted OK
-rw-r--r--ChangeLog9
-rw-r--r--Src/Modules/termcap.c10
-rw-r--r--Src/Modules/terminfo.c8
3 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4cdde0930..efe7bbb26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-02 Peter Stephenson <pws@csr.com>
+
+ * 27990: Src/Modules/termcap.c (not in original patch),
+ Src/Modules/terminfo.c: ignore error return value from
+ setupterm(), it's not useful in telling us whether the module
+ booted OK.
+
2010-06-01 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Daniel Friesel: 27982: Completion/Unix/Command/_feh: update.
@@ -13182,5 +13189,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4987 $
+* $Revision: 1.4988 $
*****************************************************
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