#include "os_string.h"
#include "sci_malloc.h"
#include "strsubst.h"
+#ifdef HAVE_TERMCAP_H
+#include <termcap.h>
+#endif
}
/*
int ConfigVariable::getConsoleWidth(void)
{
+#ifndef _MSC_VER
+ if (getScilabMode() == SCILAB_NWNI || getScilabMode() == SCILAB_NW)
+ {
+ char tc_buf[1024]; /* holds termcap buffer */
+ if (tgetent(tc_buf, getenv("TERM")) == 1)
+ {
+ return tgetnum((char *)"co");
+ }
+ else
+ {
+ return m_iConsoleWidth;
+ }
+ }
+#else
return m_iConsoleWidth;
+#endif
}
/*
** \}