ncdirect_init: don't force query_term()

pull/1377/head
nick black 3 years ago committed by Nick Black
parent da6435c517
commit 6d3c8e1add

@ -696,9 +696,6 @@ ncdirect* ncdirect_core_init(const char* termtype, FILE* outfp, uint64_t flags){
if(interrogate_terminfo(&ret->tcache, shortname_term, utf8)){
goto err;
}
if(query_term(&ret->tcache, ret->ctermfd)){
goto err;
}
ncdirect_set_styles(ret, 0);
return ret;

@ -782,8 +782,7 @@ init_banner(const notcurses* nc){
" terminfo from %s\n",
nc->stdplane->leny, nc->stdplane->lenx,
bprefix(nc->stats.fbbytes, 1, prefixbuf, 0), sizeof(nccell),
nc->tcache.colors,
nc->tcache.RGBflag ? "+RGB" : "",
nc->tcache.colors, nc->tcache.RGBflag ? "+RGB" : "",
__VERSION__,
#ifdef __BYTE_ORDER__
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
@ -1029,6 +1028,9 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
if(ncinputlayer_init(&ret->input, stdin)){
goto err;
}
if(make_nonblocking(ret->input.ttyinfd)){
goto err;
}
// Neither of these is supported on e.g. the "linux" virtual console.
if(!(opts->flags & NCOPTION_NO_ALTERNATE_SCREEN)){
terminfostr(&ret->tcache.smcup, "smcup");
@ -1052,9 +1054,6 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
}
reset_term_attributes(ret);
}
if(make_nonblocking(ret->input.ttyinfd)){
goto err;
}
if((ret->rstate.mstreamfp = open_memstream(&ret->rstate.mstream, &ret->rstate.mstrsize)) == NULL){
free_plane(ret->stdplane);
goto err;

Loading…
Cancel
Save