OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | #include <sys/ioctl.h> |
2 | #include <string.h> |
3 | #include <errno.h> |
4 | #include <stdlib.h> |
5 | #include <stdio.h> |
6 | |
7 | int |
8 | main(int argc,char **argv) |
9 | { |
10 | struct winsize ws; |
11 | |
12 | if (ioctl(0,TIOCGWINSZ,&ws)!=0) { |
13 | fprintf(stderr,"TIOCGWINSZ:%s\n",strerror(errno)); |
14 | exit(1); |
15 | } |
16 | printf("row=%d, col=%d, xpixel=%d, ypixel=%d\n", |
17 | ws.ws_row,ws.ws_col,ws.ws_xpixel,ws.ws_ypixel); |
18 | return 0; |
19 | } |
20 |