version 1.34, 2015/03/19 21:22:15 |
version 1.35, 2015/03/19 21:48:05 |
|
|
{ |
{ |
int newrow = 0, newcol = 0; |
int newrow = 0, newcol = 0; |
|
|
#ifdef TIOCGWINSZ |
|
struct winsize winsize; |
struct winsize winsize; |
|
|
if (ioctl(0, TIOCGWINSZ, &winsize) == 0) { |
if (ioctl(0, TIOCGWINSZ, &winsize) == 0) { |
newrow = winsize.ws_row; |
newrow = winsize.ws_row; |
newcol = winsize.ws_col; |
newcol = winsize.ws_col; |
} |
} |
#endif |
|
if ((newrow <= 0 || newcol <= 0) && |
if ((newrow <= 0 || newcol <= 0) && |
((newrow = lines) <= 0 || (newcol = columns) <= 0)) { |
((newrow = lines) <= 0 || (newcol = columns) <= 0)) { |
newrow = 24; |
newrow = 24; |