Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- #include <termios.h>
- int main()
- {
- struct winsize sz;
- printf("isatty 0=%d\n", isatty(0));
- if (ioctl(0,TIOCGWINSZ, &sz) == 0) {
- printf("ioctl succeeded. sz.ws_row=%d\n", sz.ws_row);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement