[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.25 and 1.26

version 1.25, 2020/01/12 20:51:08 version 1.26, 2021/01/09 12:49:09
Line 128 
Line 128 
         va_start(arg, format);          va_start(arg, format);
         len = vsnprintf(tb_ptr, tb_len, format, arg);          len = vsnprintf(tb_ptr, tb_len, format, arg);
         va_end(arg);          va_end(arg);
   
         if (len > tb_len)          if (len > tb_len)
                 tb_end();                  tb_end();
         else if (len > 0) {          else if (len > 0) {
Line 538 
Line 538 
         }          }
   
         v = ve->view;          v = ve->view;
   
         if ((curr_view != NULL) && (curr_mgr != v->mgr)) {          if ((curr_view != NULL) && (curr_mgr != v->mgr)) {
                 gotsig_alarm = 1;                  gotsig_alarm = 1;
                 if (v->mgr != NULL && v->mgr->select_fn != NULL)                  if (v->mgr != NULL && v->mgr->select_fn != NULL)
Line 682 
Line 682 
         tb_start();          tb_start();
         if (tbprintf("%02u:%02u:%02u", h, m, s) <= len)          if (tbprintf("%02u:%02u:%02u", h, m, s) <= len)
                 goto ok;                  goto ok;
   
         tb_start();          tb_start();
         if (tbprintf("%u", age) <= len)          if (tbprintf("%u", age) <= len)
                 goto ok;                  goto ok;
Line 693 
Line 693 
                 goto ok;                  goto ok;
         if (age == 0)          if (age == 0)
                 goto err;                  goto err;
   
         tb_start();          tb_start();
         age /= 60;          age /= 60;
         if (tbprintf("%uh", age) <= len)          if (tbprintf("%uh", age) <= len)
                 goto ok;                  goto ok;
         if (age == 0)          if (age == 0)
                 goto err;                  goto err;
   
         tb_start();          tb_start();
         age /= 24;          age /= 24;
         if (tbprintf("%ud", age) <= len)          if (tbprintf("%ud", age) <= len)
                 goto ok;                  goto ok;
   
 err:  err:
         print_fld_str(fld, "*");          print_fld_str(fld, "*");
         tb_end();          tb_end();
         return;          return;
   
 ok:  ok:
         print_fld_tb(fld);          print_fld_tb(fld);
 }  }
Line 1002 
Line 1002 
                 dispstart = 0;                  dispstart = 0;
         else if (dispstart + maxprint > num_disp)          else if (dispstart + maxprint > num_disp)
                 dispstart = num_disp - maxprint;                  dispstart = num_disp - maxprint;
   
         if (dispstart < 0)          if (dispstart < 0)
                 dispstart = 0;                  dispstart = 0;
   
Line 1184 
Line 1184 
                 } else                  } else
                         beep();                          beep();
         }          }
   
         switch (ch) {          switch (ch) {
         case KEY_ENTER:          case KEY_ENTER:
         case 0x0a:          case 0x0a:
Line 1348 
Line 1348 
                         sort_view();                          sort_view();
                         need_sort = 0;                          need_sort = 0;
                         need_update = 1;                          need_update = 1;
   
                         /* XXX if sort took too long */                          /* XXX if sort took too long */
                         if (gotsig_alarm) {                          if (gotsig_alarm) {
                                 gotsig_alarm = 0;                                  gotsig_alarm = 0;
Line 1406 
Line 1406 
                 if (status == -1)                  if (status == -1)
                         warnx("can't open termcap file");                          warnx("can't open termcap file");
                 else                  else
                         warnx("no termcap entry for a `%s' terminal",                          warnx("no termcap entry for a `%s' terminal",
                             term_name);                              term_name);
   
                 /* pretend it's dumb and proceed */                  /* pretend it's dumb and proceed */

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26