@ -388,8 +388,7 @@ ncinputlayer_prestamp(ncinputlayer* nc, const struct timespec *ts,
return handle_queued_input(nc, ni, leftmargin, topmargin);
}
errno = 0;
int events;
if((events = block_on_input(nc->ttyinfp, ts, sigmask)) > 0){
if(block_on_input(nc->ttyinfp, ts, sigmask) > 0){
//fprintf(stderr, "%d events from input!\n", events);
return handle_ncinput(nc, ni, leftmargin, topmargin, sigmask);
@ -543,8 +543,8 @@ bool is_linux_console(const notcurses* nc, unsigned no_font_changes){
if(nc->ttyfd < 0){
return false;
int mode, r;
if( (r = ioctl(nc->ttyfd, KDGETMODE, &mode)) ){
int mode;
if(ioctl(nc->ttyfd, KDGETMODE, &mode)){
logdebug(nc, "Not a Linux console, KDGETMODE failed\n");
@ -54,14 +54,6 @@ notcurses_resize_internal(ncplane* pp, int* restrict rows, int* restrict cols){
pile->dimy = *rows;
pile->dimx = *cols;
int keepy = *rows;
if(keepy > oldrows){
keepy = oldrows;
int keepx = *cols;
if(keepx > oldcols){
keepx = oldcols;
int ret = 0;
//notcurses_debug(n, stderr);
for(ncplane* rootn = pile->roots ; rootn ; rootn = rootn->bnext){