err the better way to get it is:
#include
setupterm((char *)0, 1, (int *)0);
x=tgetnum("co");
y=tgetnum("li");
/* printf("%dx%d\n\r",x,y); */
yours,
guerkan
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Package: tetrinet-client
Version: 0.11+CVS20031026-3
Severity: wishlist
please can you add a check for terminal size and abort when not large enough?
here's some code to start with:
static int get_term_size(int fd, int *x, int *y) {
#ifdef TIOCGSIZE
struct ttysize win;
#elif defined(TIOCGWIN
2 matches
Mail list logo