diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2001-04-21 21:41:28 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2001-04-21 21:41:28 +0000 |
commit | 6bf2ff17175946b9c038f041f8828bceb59565aa (patch) | |
tree | 2d8af6e939ae601234fa91ee0870edca54ea0f59 | |
parent | 219674c48b0956fe8ed9e6e6c795eeca90f41b5a (diff) | |
download | zsh-6bf2ff17175946b9c038f041f8828bceb59565aa.tar.gz zsh-6bf2ff17175946b9c038f041f8828bceb59565aa.tar.xz zsh-6bf2ff17175946b9c038f041f8828bceb59565aa.zip |
More term*.h inclusion un-confusion.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/Modules/termcap.c | 28 |
2 files changed, 19 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog index e477fdd60..f9d01ef5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2001-04-21 Bart Schaefer <schaefer@zsh.org> + * 14062: Src/Modules/termcap.c: Avoid including both old-style + termcap.h and ncurses term.h at the same time (see 13965). + * 14060: Src/builtin.c, Src/lex.c, Src/params.c, Test/D06subscript.ztst: Fix problem with ${array[ix]=value} introduced by 14008; fix long-standing problems with diff --git a/Src/Modules/termcap.c b/Src/Modules/termcap.c index 35fb71f64..fbaf887c1 100644 --- a/Src/Modules/termcap.c +++ b/Src/Modules/termcap.c @@ -37,20 +37,22 @@ static char termcap_nam[] = "termcap"; /* echotc: output a termcap */ #ifdef HAVE_TGETENT -# ifdef HAVE_TERMCAP_H -# include <termcap.h> -# ifdef HAVE_TERM_H -# include <term.h> -# endif -# else +# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H) # ifdef HAVE_TERMIO_H # include <termio.h> # endif -# ifdef HAVE_CURSES_H -# include <curses.h> -# endif -# ifdef HAVE_TERM_H -# include <term.h> +# include <curses.h> +# include <term.h> +# else +# ifdef HAVE_TERMCAP_H +# include <termcap.h> +# else +# ifdef HAVE_CURSES_H +# include <curses.h> +# endif +# ifdef HAVE_TERM_H +# include <term.h> +# endif # endif # endif @@ -356,7 +358,9 @@ int boot_(Module m) { #ifdef HAVE_TGETENT +# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H) setupterm((char *)0, 1, (int *)0); +# endif if (!createtchash()) return 1; @@ -376,7 +380,7 @@ cleanup_(Module m) incleanup = 1; -#ifdef HAVE_TGETENTR +#ifdef HAVE_TGETENT if ((pm = (Param) paramtab->getnode(paramtab, termcap_nam)) && pm == termcap_pm) { pm->flags &= ~PM_READONLY; |