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

Diff for /src/usr.bin/sudo/Attic/lbuf.c between version 1.4 and 1.5

version 1.4, 2010/03/04 12:21:36 version 1.5, 2013/12/12 22:59:25
Line 52 
Line 52 
 #include "sudo.h"  #include "sudo.h"
 #include "lbuf.h"  #include "lbuf.h"
   
 #if !defined(TIOCGSIZE) && defined(TIOCGWINSZ)  #if !defined(TIOCGWINSZ) && defined(TIOCGSIZE)
 # define TIOCGSIZE      TIOCGWINSZ  # define TIOCGWINSZ     TIOCGSIZE
 # define ttysize        winsize  # define winsize        ttysize
 # define ts_cols        ws_col  # define ws_col         ts_cols
 #endif  #endif
   
 int  int
Line 64 
Line 64 
     char *p;      char *p;
     int cols;      int cols;
 #ifdef TIOCGSIZE  #ifdef TIOCGSIZE
     struct ttysize win;      struct winsize win;
   
     if (ioctl(STDERR_FILENO, TIOCGSIZE, &win) == 0 && win.ts_cols != 0)      if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) == 0 && win.ws_col != 0)
         return((int)win.ts_cols);          return((int)win.ws_col);
 #endif  #endif
   
     /* Fall back on $COLUMNS. */      /* Fall back on $COLUMNS. */

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5