First import
git-svn-id: http://photonzero.com/dotfiles/trunk@1 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
commit
83d40113d2
60 changed files with 4264 additions and 0 deletions
15
bin/build/src/gettermsize/gettermsize.c
Normal file
15
bin/build/src/gettermsize/gettermsize.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
struct winsize size;
|
||||
ioctl(STDIN_FILENO, TIOCGWINSZ, (char *) &size);
|
||||
printf("%d x %d\n", size.ws_col, size.ws_row);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue