|
|
@ -501,6 +501,11 @@ static int
|
|
|
|
apply_term_heuristics(tinfo* ti, const char* termname, queried_terminals_e qterm,
|
|
|
|
apply_term_heuristics(tinfo* ti, const char* termname, queried_terminals_e qterm,
|
|
|
|
size_t* tablelen, size_t* tableused, bool* invertsixel,
|
|
|
|
size_t* tablelen, size_t* tableused, bool* invertsixel,
|
|
|
|
unsigned nonewfonts){
|
|
|
|
unsigned nonewfonts){
|
|
|
|
|
|
|
|
#ifdef __MINGW64__
|
|
|
|
|
|
|
|
if(qterm == TERMINAL_UNKNOWN){
|
|
|
|
|
|
|
|
qterm = TERMINAL_MSTERMINAL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
if(!termname){
|
|
|
|
if(!termname){
|
|
|
|
// setupterm interprets a missing/empty TERM variable as the special value “unknown”.
|
|
|
|
// setupterm interprets a missing/empty TERM variable as the special value “unknown”.
|
|
|
|
termname = ti->termname ? ti->termname : "unknown";
|
|
|
|
termname = ti->termname ? ti->termname : "unknown";
|
|
|
@ -596,6 +601,9 @@ apply_term_heuristics(tinfo* ti, const char* termname, queried_terminals_e qterm
|
|
|
|
*invertsixel = true;
|
|
|
|
*invertsixel = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ti->bce = true;
|
|
|
|
ti->bce = true;
|
|
|
|
|
|
|
|
}else if(qterm == TERMINAL_MSTERMINAL){
|
|
|
|
|
|
|
|
ti->termname = "Windows Terminal";
|
|
|
|
|
|
|
|
ti->caps.rgb = true;
|
|
|
|
}else if(qterm == TERMINAL_CONTOUR){
|
|
|
|
}else if(qterm == TERMINAL_CONTOUR){
|
|
|
|
termname = "Contour";
|
|
|
|
termname = "Contour";
|
|
|
|
ti->caps.quadrants = true;
|
|
|
|
ti->caps.quadrants = true;
|
|
|
@ -744,12 +752,12 @@ int interrogate_terminfo(tinfo* ti, const char* termtype, FILE* out, unsigned ut
|
|
|
|
if(termtype){
|
|
|
|
if(termtype){
|
|
|
|
logwarn("termtype (%s) ignored on windows\n", termtype);
|
|
|
|
logwarn("termtype (%s) ignored on windows\n", termtype);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(prepare_windows_terminal(ti, &tablelen, &tableused) == 0){
|
|
|
|
if(prepare_windows_terminal(ti, &tablelen, &tableused)){
|
|
|
|
ti->qterm = TERMINAL_MSTERMINAL;
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
if(cursor_y && cursor_x){
|
|
|
|
if(cursor_y && cursor_x){
|
|
|
|
locate_cursor(ti, cursor_y, cursor_x);
|
|
|
|
locate_cursor(ti, cursor_y, cursor_x);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif defined(__linux__)
|
|
|
|
#elif defined(__linux__)
|
|
|
|
ti->linux_fb_fd = -1;
|
|
|
|
ti->linux_fb_fd = -1;
|
|
|
|
ti->linux_fbuffer = MAP_FAILED;
|
|
|
|
ti->linux_fbuffer = MAP_FAILED;
|
|
|
|