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

Diff for /src/usr.bin/systat/engine.c between version 1.7 and 1.8

version 1.7, 2008/12/07 02:56:06 version 1.8, 2009/06/04 14:48:07
Line 25 
Line 25 
 #include <signal.h>  #include <signal.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <term.h>
 #include <unistd.h>  #include <unistd.h>
   
   /* XXX These are defined in term.h and conflict with our variable names */
   #ifdef columns
   #undef columns
   #endif
   
   #ifdef lines
   #undef lines
   #endif
   
 #include "engine.h"  #include "engine.h"
   
 #ifndef MIN  #ifndef MIN
Line 1033 
Line 1043 
         field_setup();          field_setup();
 }  }
   
   void
   resize_term(void)
   {
           struct winsize ws;
   
           if (rawmode)
                   return;
   
           if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1)
                   return;
   
           resizeterm(ws.ws_row, ws.ws_col);
   
           columns = COLS;
           lines = LINES;
   
           maxprint = max_disp;
   
           if (maxprint == 0 || maxprint > lines - HEADER_LINES)
                   maxprint = lines - HEADER_LINES;
   
           clear();
   
           field_setup();
   }
   
 struct command *  struct command *
 command_set(struct command *cmd, const char *init)  command_set(struct command *cmd, const char *init)
 {  {
Line 1279 
Line 1315 
                 if (gotsig_close)                  if (gotsig_close)
                         break;                          break;
                 if (gotsig_resize) {                  if (gotsig_resize) {
                         if (rawmode == 0)                          resize_term();
                                 endwin();  
                         setup_term(max_disp);  
                         gotsig_resize = 0;                          gotsig_resize = 0;
                         need_update = 1;                          need_update = 1;
                 }                  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8