diff options
| author | David Kühling <dvdkhlng@gmx.de> | 2011-01-02 15:19:00 +0100 |
|---|---|---|
| committer | David Kühling <dvdkhlng@gmx.de> | 2011-01-02 15:19:00 +0100 |
| commit | 9aaeb4623d3ff5746e665bc17914eefd292b7dcd (patch) | |
| tree | 370db60ffdc2ef840b7d1124d5a392f93bba3c9d /fbsize/files/fbsize.c | |
| download | qipackages-fork-9aaeb4623d3ff5746e665bc17914eefd292b7dcd.tar.gz | |
New OpenWrt package for GNU Octave. Experimental/probably still broken.grafted
Work in progress. Committing it as compilation seems to take forever.
Not sure whether I can finish this within a few days.
Diffstat (limited to 'fbsize/files/fbsize.c')
| -rw-r--r-- | fbsize/files/fbsize.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fbsize/files/fbsize.c b/fbsize/files/fbsize.c new file mode 100644 index 0000000..556dfa0 --- /dev/null +++ b/fbsize/files/fbsize.c @@ -0,0 +1,19 @@ +#include <sys/ioctl.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> +#include <stdio.h> + +int +main(int argc,char **argv) +{ +struct winsize ws; + +if (ioctl(0,TIOCGWINSZ,&ws)!=0) { +fprintf(stderr,"TIOCGWINSZ:%s\n",strerror(errno)); +exit(1); +} +printf("row=%d, col=%d, xpixel=%d, ypixel=%d\n", +ws.ws_row,ws.ws_col,ws.ws_xpixel,ws.ws_ypixel); +return 0; +} |
