1 // SPDX-License-Identifier: GPL-2.0
8 void get_term_dimensions(struct winsize
*ws
)
10 char *s
= getenv("LINES");
14 s
= getenv("COLUMNS");
17 if (ws
->ws_row
&& ws
->ws_col
)
22 if (ioctl(1, TIOCGWINSZ
, ws
) == 0 &&
23 ws
->ws_row
&& ws
->ws_col
)
30 void set_term_quiet_input(struct termios
*old
)
36 tc
.c_lflag
&= ~(ICANON
| ECHO
);
39 tcsetattr(0, TCSANOW
, &tc
);