diff options
Diffstat (limited to 'tty-term.c')
-rw-r--r-- | tty-term.c | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -18,12 +18,15 @@ #include <sys/types.h> +#if defined(HAVE_CURSES_H) #include <curses.h> +#elif defined(HAVE_NCURSES_H) +#include <ncurses.h> +#endif #include <fnmatch.h> #include <stdlib.h> #include <string.h> #include <term.h> -#include <vis.h> #include "tmux.h" @@ -581,6 +584,12 @@ tty_term_create(struct tty *tty, char *name, char **caps, u_int ncaps, a = options_array_next(a); } + /* Delete curses data. */ +#if !defined(NCURSES_VERSION_MAJOR) || NCURSES_VERSION_MAJOR > 5 || \ + (NCURSES_VERSION_MAJOR == 5 && NCURSES_VERSION_MINOR > 6) + del_curterm(cur_term); +#endif + /* Apply overrides so any capabilities used for features are changed. */ tty_term_apply_overrides(term); @@ -716,7 +725,10 @@ tty_term_read_list(const char *name, int fd, char ***caps, u_int *ncaps, (*ncaps)++; } +#if !defined(NCURSES_VERSION_MAJOR) || NCURSES_VERSION_MAJOR > 5 || \ + (NCURSES_VERSION_MAJOR == 5 && NCURSES_VERSION_MINOR > 6) del_curterm(cur_term); +#endif return (0); } @@ -749,33 +761,33 @@ tty_term_string(struct tty_term *term, enum tty_code_code code) const char * tty_term_string1(struct tty_term *term, enum tty_code_code code, int a) { - return (tparm((char *) tty_term_string(term, code), a)); + return (tparm((char *) tty_term_string(term, code), a, 0, 0, 0, 0, 0, 0, 0, 0)); } const char * tty_term_string2(struct tty_term *term, enum tty_code_code code, int a, int b) { - return (tparm((char *) tty_term_string(term, code), a, b)); + return (tparm((char *) tty_term_string(term, code), a, b, 0, 0, 0, 0, 0, 0, 0)); } const char * tty_term_string3(struct tty_term *term, enum tty_code_code code, int a, int b, int c) { - return (tparm((char *) tty_term_string(term, code), a, b, c)); + return (tparm((char *) tty_term_string(term, code), a, b, c, 0, 0, 0, 0, 0, 0)); } const char * tty_term_ptr1(struct tty_term *term, enum tty_code_code code, const void *a) { - return (tparm((char *) tty_term_string(term, code), a)); + return (tparm((char *) tty_term_string(term, code), (long)a, 0, 0, 0, 0, 0, 0, 0, 0)); } const char * tty_term_ptr2(struct tty_term *term, enum tty_code_code code, const void *a, const void *b) { - return (tparm((char *) tty_term_string(term, code), a, b)); + return (tparm((char *) tty_term_string(term, code), (long)a, (long)b, 0, 0, 0, 0, 0, 0, 0)); } int |