aboutsummaryrefslogtreecommitdiff
path: root/tty-term.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty-term.c')
-rw-r--r--tty-term.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/tty-term.c b/tty-term.c
index f3dbae5c..20022fd9 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -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"
@@ -61,6 +64,8 @@ static const struct tty_term_code_entry tty_term_codes[] = {
[TTYC_BOLD] = { TTYCODE_STRING, "bold" },
[TTYC_CIVIS] = { TTYCODE_STRING, "civis" },
[TTYC_CLEAR] = { TTYCODE_STRING, "clear" },
+ [TTYC_CLMG] = { TTYCODE_STRING, "Clmg" },
+ [TTYC_CMG] = { TTYCODE_STRING, "Cmg" },
[TTYC_CNORM] = { TTYCODE_STRING, "cnorm" },
[TTYC_COLORS] = { TTYCODE_NUMBER, "colors" },
[TTYC_CR] = { TTYCODE_STRING, "Cr" },
@@ -81,12 +86,14 @@ static const struct tty_term_code_entry tty_term_codes[] = {
[TTYC_DIM] = { TTYCODE_STRING, "dim" },
[TTYC_DL1] = { TTYCODE_STRING, "dl1" },
[TTYC_DL] = { TTYCODE_STRING, "dl" },
+ [TTYC_DSMG] = { TTYCODE_STRING, "Dsmg" },
[TTYC_E3] = { TTYCODE_STRING, "E3" },
[TTYC_ECH] = { TTYCODE_STRING, "ech" },
[TTYC_ED] = { TTYCODE_STRING, "ed" },
[TTYC_EL1] = { TTYCODE_STRING, "el1" },
[TTYC_EL] = { TTYCODE_STRING, "el" },
[TTYC_ENACS] = { TTYCODE_STRING, "enacs" },
+ [TTYC_ENMG] = { TTYCODE_STRING, "Enmg" },
[TTYC_FSL] = { TTYCODE_STRING, "fsl" },
[TTYC_HOME] = { TTYCODE_STRING, "home" },
[TTYC_HPA] = { TTYCODE_STRING, "hpa" },
@@ -237,8 +244,8 @@ static const struct tty_term_code_entry tty_term_codes[] = {
[TTYC_OP] = { TTYCODE_STRING, "op" },
[TTYC_REV] = { TTYCODE_STRING, "rev" },
[TTYC_RGB] = { TTYCODE_FLAG, "RGB" },
- [TTYC_RI] = { TTYCODE_STRING, "ri" },
[TTYC_RIN] = { TTYCODE_STRING, "rin" },
+ [TTYC_RI] = { TTYCODE_STRING, "ri" },
[TTYC_RMACS] = { TTYCODE_STRING, "rmacs" },
[TTYC_RMCUP] = { TTYCODE_STRING, "rmcup" },
[TTYC_RMKX] = { TTYCODE_STRING, "rmkx" },
@@ -265,7 +272,7 @@ static const struct tty_term_code_entry tty_term_codes[] = {
[TTYC_U8] = { TTYCODE_NUMBER, "U8" },
[TTYC_VPA] = { TTYCODE_STRING, "vpa" },
[TTYC_XENL] = { TTYCODE_FLAG, "xenl" },
- [TTYC_XT] = { TTYCODE_FLAG, "XT" },
+ [TTYC_XT] = { TTYCODE_FLAG, "XT" }
};
u_int
@@ -526,7 +533,10 @@ tty_term_create(struct tty *tty, char *name, int *feat, int fd, char **cause)
}
/* 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);
@@ -631,33 +641,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