mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-12-02 08:53:43 +03:00
10 lines
189 B
C
10 lines
189 B
C
#include <sys/ioctl.h>
|
|
|
|
unsigned long vty_c_get_window_size(void) {
|
|
struct winsize w;
|
|
if (ioctl (0, TIOCGWINSZ, &w) >= 0)
|
|
return (w.ws_row << 16) + w.ws_col;
|
|
else
|
|
return 0x190050;
|
|
}
|