terminal_size (HighLine::SystemExtensions)

    # File lib/highline/system_extensions.rb, line 38
          def terminal_size
            m_GetStdHandle               = Win32API.new( 'kernel32',
                                                         'GetStdHandle',
                                                         ['L'],
                                                         'L' )
            m_GetConsoleScreenBufferInfo = Win32API.new(
              'kernel32', 'GetConsoleScreenBufferInfo', ['L', 'P'], 'L'
            )

            format        = 'SSSSSssssSS'
            buf           = ([0] * format.size).pack(format)
            stdout_handle = m_GetStdHandle.call(0xFFFFFFF5)

            m_GetConsoleScreenBufferInfo.call(stdout_handle, buf)
            bufx, bufy, curx, cury, wattr,
            left, top, right, bottom, maxx, maxy = buf.unpack(format)
            return right - left + 1, bottom - top + 1
          end