2014-06-08 10:13:29 +04:00
|
|
|
/* This file is part of ToaruOS and is released under the terms
|
|
|
|
* of the NCSA / University of Illinois License - see LICENSE.md
|
|
|
|
* Copyright (C) 2013 Kevin Lange
|
|
|
|
*/
|
2012-09-06 09:47:52 +04:00
|
|
|
#include <stdio.h>
|
2013-03-26 09:24:26 +04:00
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <termios.h>
|
2012-09-06 09:47:52 +04:00
|
|
|
|
2012-09-07 01:54:05 +04:00
|
|
|
int main(int argc, char * argv[]) {
|
2013-03-26 09:24:26 +04:00
|
|
|
struct winsize w;
|
|
|
|
ioctl(0, TIOCGWINSZ, &w);
|
2017-01-07 09:27:55 +03:00
|
|
|
printf("Terminal is %dx%d (%d px x %d px)\n", w.ws_col, w.ws_row, w.ws_xpixel, w.ws_ypixel);
|
|
|
|
return 0;
|
2012-09-06 09:47:52 +04:00
|
|
|
}
|