[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: terminal
On Sat, Nov 30, 2002 at 11:45:27AM -0800, Ben Bunker wrote:
> Hello,
>
> Bit of a programming question here. I'm attempting to
> write a scaled-down version of the more utility, and
> I'm at a loss as to how to find the size of the
> terminal (i.e., width, number of lines). Does anyone
> have any insight into this? Thanks.
There's a TIOCGWINSZ ioctl to get the window size (man 4 tty).
--
Hugo Villeneuve <hugo@EINTR.net>
http://EINTR.net/