kill unused tinfo fields BCEflag/AMflag

This commit is contained in:
nick black 2021-06-20 04:38:22 -04:00 committed by Nick Black
parent 086ee695c1
commit 878eebde0a
2 changed files with 2 additions and 6 deletions

View File

@ -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){

View File

@ -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