X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=progs%2Ftset.c;h=69f4aba879746c65fbf6179b32476970b46442fc;hb=00dd248b527ad47f0fc3b0776a0889da0ac926d0;hp=5255ef476c1defce7a1616bef362f2d3f04db156;hpb=725169bda4d3b4c3fde0d4a94f76d017812c7ea6;p=ncurses.git diff --git a/progs/tset.c b/progs/tset.c index 5255ef47..69f4aba8 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -98,7 +98,7 @@ char *ttyname(int fd); #endif -MODULE_ID("$Id: tset.c,v 1.132 2024/03/17 00:15:54 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.135 2024/04/20 22:20:41 tom Exp $") #ifndef environ extern char **environ; @@ -869,7 +869,11 @@ main(int argc, char **argv) if (!noset) { #if HAVE_SIZECHANGE if (opt_w) { - set_window_size(my_fd, &lines, &columns); + NCURSES_INT2 my_rows = lines; + NCURSES_INT2 my_cols = columns; + set_window_size(my_fd, &my_rows, &my_cols); + lines = my_rows; + columns = my_cols; } #endif if (opt_c) { @@ -882,9 +886,7 @@ main(int argc, char **argv) (void) putc('\r', stderr); (void) fflush(stderr); - if (isatty(my_fd) - && (name = ttyname(my_fd)) != NULL - && strncmp(name, "/dev/pts/", 9)) { + if (IsRealTty(my_fd, name)) { (void) napms(1000); /* Settle the terminal. */ } }