On Wed 15 May 2002 at 05:04:36 +0900, Paul Brannan wrote:

> Dunno how portable it is (I don't usually do this sort of thing), but
> the following works on i386 Linux:
> 
>   TIOCGWINSZ = 0x5413
>   str = [ 0, 0, 0, 0 ].pack("SSSS")
>   if $stdin.ioctl(TIOCGWINSZ, str) >= 0 then
>     rows, cols, xpixels, ypixels = str.unpack("SSSS")
>     p rows, cols, xpixels, ypixels
>   else
>     puts "Unable to get window size"
>   end

Thanks. Unfortunately, I need something more portable, since the
resulting code will need to run on both *NIX and Win32 systems.

Ian
-- 
Ian Macdonald               | Ask not for whom the <CONTROL-G> tolls. 
ian / caliban.org             | 
                            | 
                            | 
                            |