From 878eebde0a9d17088a78ee247a5dcbcb929bbc09 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 20 Jun 2021 04:38:22 -0400 Subject: [PATCH] kill unused tinfo fields BCEflag/AMflag --- src/lib/termdesc.c | 6 ++---- src/lib/termdesc.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/termdesc.c b/src/lib/termdesc.c index e438009e6..804b9c472 100644 --- a/src/lib/termdesc.c +++ b/src/lib/termdesc.c @@ -390,13 +390,11 @@ int interrogate_terminfo(tinfo* ti, int fd, const char* termname, unsigned utf8, ti->escindices[ESCAPE_SMCUP] = 0; ti->escindices[ESCAPE_RMCUP] = 0; } - // check that the terminal provides automatic margins - ti->AMflag = tigetflag("am") == 1; - if(!ti->AMflag){ + // ensure that the terminal provides automatic margins + if(tigetflag("am") != 1){ fprintf(stderr, "Required terminfo capability 'am' not defined\n"); goto err; } - ti->BCEflag = tigetflag("bce") == 1; if(get_escape(ti, ESCAPE_CIVIS) == NULL){ char* chts; if(terminfostr(&chts, "chts") == 0){ diff --git a/src/lib/termdesc.h b/src/lib/termdesc.h index 8ea3005f0..fbbf2802a 100644 --- a/src/lib/termdesc.h +++ b/src/lib/termdesc.h @@ -143,8 +143,6 @@ typedef struct tinfo { struct termios tpreserved; // terminal state upon entry ncinputlayer input; // input layer bool bitmap_supported; // do we support bitmaps (post pixel_query_done)? - bool BCEflag; // "BCE" flag for erases with background color - bool AMflag; // "AM" flag for automatic movement to next line // mlterm resets the cursor (i.e. makes it visible) any time you print // a sprixel. we work around this spiritedly unorthodox decision. it