[BACK]Return to tty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/tty.c between version 1.34 and 1.35

version 1.34, 2015/03/19 21:22:15 version 1.35, 2015/03/19 21:48:05
Line 408 
Line 408 
 {  {
         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;

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35