On Sun, 11 Oct 2009 10:01:52 +0200, "h.g. muller" <[email protected]> wrote: > Related, but for another purpose: Is there a way to obtain the console width?
Yes, you should be able to do the same thing that "stty -a" does. See "man tty_ioctl" and look for the "Get and Set Window Size" section. Note that this is nonportable, so the code should really be inside an "#if HAVE_TIOCGWINSZ" and the configure script should check for it. That man page also mentions how to tell when the size changes: catch the SIGWINCH signal. -- Tim Mann [email protected] http://tim-mann.org/
