nio

a simple irc client
git clone git@git.kloet.net/nio.git
Download | Log | Files | Refs | README

commit 110c0a8075a87cf1991233c158ad51fe69e48e2a
parent 7242e2cc4b68ca55086a26cb57139a9b29470bbf
Author: Quentin Carbonneaux <qcarbonneaux@gmail.com>
Date:   Sun, 11 Mar 2012 23:54:14 +0100

Test the result of ioctl (TIOCGWINSZ).

Diffstat:
Mirc.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/irc.c b/irc.c @@ -351,7 +351,8 @@ tresize(void) struct winsize ws; winchg=0; - ioctl(0, TIOCGWINSZ, &ws); + if (ioctl(0, TIOCGWINSZ, &ws)<0) + panic("Ioctl (TIOCGWINSZ) failed."); resizeterm(scr.y=ws.ws_row, scr.x=ws.ws_col); if (scr.y<3 || scr.x<10) panic("Screen too small.");