toaruos/userspace/term_size.c
2012-09-06 14:54:05 -07:00

10 lines
214 B
C

#include <stdio.h>
int main(int argc, char * argv[]) {
printf("\033[1003z");
fflush(stdout);
int width, height;
scanf("%d,%d", &width, &height);
printf("Terminal is %dx%d\n", width, height);
}