diff options
author | Michael Czigler <37268479+mcpcpc@users.noreply.github.com> | 2020-10-02 11:57:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 11:57:18 -0400 |
commit | a5e89e6b7ce39e61c0f02b8e2849137c3f6d098f (patch) | |
tree | 56e5bcebadf0775d8b02553a280c6a14f66e6678 /kirc.c | |
parent | change -W to automatic wrap (#50) (diff) | |
download | kirc-a5e89e6b7ce39e61c0f02b8e2849137c3f6d098f.tar.gz kirc-a5e89e6b7ce39e61c0f02b8e2849137c3f6d098f.tar.bz2 kirc-a5e89e6b7ce39e61c0f02b8e2849137c3f6d098f.tar.xz kirc-a5e89e6b7ce39e61c0f02b8e2849137c3f6d098f.tar.zst kirc-a5e89e6b7ce39e61c0f02b8e2849137c3f6d098f.zip |
move ioctrl and cmax to minimize resources
Diffstat (limited to '')
-rw-r--r-- | kirc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -328,13 +328,13 @@ main(int argc, char **argv) { for (;;) { int poll_res = poll(fds, 2, -1); - ioctl(0, TIOCGWINSZ, &window_dims); - cmax = window_dims.ws_col; if (poll_res != -1) { if (fds[0].revents & POLLIN) { handle_user_input(); } if (fds[1].revents & POLLIN && (keyboard_hit() < 1)) { + ioctl(0, TIOCGWINSZ, &window_dims); + cmax = window_dims.ws_col; int rc = handle_server_message(); if (rc != 0) { if (rc == -2) return EXIT_FAILURE; |