diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-02-09 09:31:24 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-02-09 09:31:24 +0100 |
| commit | 3ab649953a8782b3bb82019f021739b898239c6f (patch) | |
| tree | 3e0776b70f232005dba19c904992112d9bda44a9 /lib/tctl/tctl.c | |
| parent | f298e9e8d66582293fab2a2845ed2808924c1cd4 (diff) | |
make mdv center
Diffstat (limited to 'lib/tctl/tctl.c')
| -rw-r--r-- | lib/tctl/tctl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tctl/tctl.c b/lib/tctl/tctl.c index d54f2dd..3bdc2fd 100644 --- a/lib/tctl/tctl.c +++ b/lib/tctl/tctl.c @@ -9,6 +9,22 @@ #define ICANON 000002 #define ECHO 000010 + +window_size_t tctl_get_fd_window_size(int fd) +{ + window_size_t ws; + ioctl(fd, GET_WIN_SIZE, &ws); + return ws; +} + + +void tctl_set_fd_window_size(int fd, window_size_t size) +{ + ioctl(fd, SET_WIN_SIZE, &size); +} + + + window_size_t tctl_get_window_size() { window_size_t ws; |