winsz comments
This commit is contained in:
parent
319cfe0dbb
commit
e1bd06eb69
1 changed files with 4 additions and 0 deletions
4
winsz.c
4
winsz.c
|
|
@ -5,6 +5,10 @@
|
|||
int main(void) {
|
||||
struct winsize w;
|
||||
|
||||
/* See: man 2 ioctl */
|
||||
/* See: man 2 TIOCGWINSZ */
|
||||
/* See: linux/fs/ioctl.c */
|
||||
/* See: linux/drivers/tty/tty_io.c (L: ~2709 and ~2359) */
|
||||
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) == -1) {
|
||||
perror("ioctl");
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue