int view_width = 0;
int view_length = 0;
+#ifdef HAVE_TERMIOS_H
struct winsize ws;
if (0 == ioctl (0, TIOCGWINSZ, &ws))
{
view_length = ws.ws_row;
}
else
+#endif
{
if (view_width <= 0 && getenv ("COLUMNS") != NULL)
view_width = atoi (getenv ("COLUMNS"));