Provide fallback is struct winsize is not defined

darcs-hash:20060730205544-ac50b-26f34eb04b56924baa34f560fd274cf38413b5f5.gz
This commit is contained in:
axel
2006-07-31 06:55:44 +10:00
parent 60f0533821
commit e79fdcb194
3 changed files with 31 additions and 0 deletions

View File

@@ -1412,10 +1412,15 @@ int acquire_lock_file( const char *lockfile, const int timeout, int force )
void common_handle_winch( int signal )
{
#ifdef HAVE_WINSIZE
if (ioctl(1,TIOCGWINSZ,&termsize)!=0)
{
return;
}
#else
termsize.ws_col = 80;
termsizews_row = 24;
#endif
}
int common_get_width()