moving from gitlab
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
struct winsize win;
|
||||
/*
|
||||
* unsigned short ws_row
|
||||
* unsinged short ws_col
|
||||
* unsighed short ws_xpixel
|
||||
* unsinged short ws_ypixel
|
||||
*/
|
||||
ioctl(STDOUT_FILENO, TIOCGWINSZ, &win);
|
||||
|
||||
printf("Lines: %d\n", win.ws_row);
|
||||
printf("chars: %d\n", win.ws_col);
|
||||
printf("xpixel: %d\n", win.ws_xpixel);
|
||||
printf("ypixel: %d\n", win.ws_ypixel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user