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

Diff for /src/usr.bin/systat/pigs.c between version 1.13 and 1.14

version 1.13, 2002/02/16 21:27:54 version 1.14, 2002/06/18 00:46:48
Line 75 
Line 75 
 static double  lccpu;  static double  lccpu;
   
 WINDOW *  WINDOW *
 openpigs()  openpigs(void)
 {  {
         return (subwin(stdscr, LINES-5-1, 0, 5, 0));          return (subwin(stdscr, LINES-5-1, 0, 5, 0));
 }  }
   
 void  void
 closepigs(w)  closepigs(WINDOW *w)
         WINDOW *w;  
 {  {
         if (w == NULL)          if (w == NULL)
                 return;                  return;
Line 93 
Line 92 
   
   
 void  void
 showpigs()  showpigs(void)
 {  {
         int i, j, y, k;          int i, j, y, k;
         struct  eproc *ep;          struct  eproc *ep;
Line 111 
Line 110 
         }          }
   
         if (total < 1.0)          if (total < 1.0)
                 total = 1.0;                  total = 1.0;
         factor = 50.0/total;          factor = 50.0/total;
   
         qsort(pt, nproc + 1, sizeof (struct p_times), compar);          qsort(pt, nproc + 1, sizeof (struct p_times), compar);
Line 143 
Line 142 
 struct loadavg sysload;  struct loadavg sysload;
   
 int  int
 initpigs()  initpigs(void)
 {  {
         static int sysload_mib[] = {CTL_VM, VM_LOADAVG};          static int sysload_mib[] = {CTL_VM, VM_LOADAVG};
         static int cp_time_mib[] = { CTL_KERN, KERN_CPTIME };          static int cp_time_mib[] = { CTL_KERN, KERN_CPTIME };
Line 166 
Line 165 
 }  }
   
 void  void
 fetchpigs()  fetchpigs(void)
 {  {
         static int cp_time_mib[] = { CTL_KERN, KERN_CPTIME };          static int cp_time_mib[] = { CTL_KERN, KERN_CPTIME };
         static int lastnproc = 0;          static int lastnproc = 0;
Line 226 
Line 225 
 }  }
   
 void  void
 labelpigs()  labelpigs(void)
 {  {
         wmove(wnd, 0, 0);          wmove(wnd, 0, 0);
         wclrtoeol(wnd);          wclrtoeol(wnd);
Line 235 
Line 234 
 }  }
   
 int  int
 compar(a, b)  compar(const void *a, const void *b)
         const void *a, *b;  
 {  {
         return (((struct p_times *) a)->pt_pctcpu >          return (((struct p_times *) a)->pt_pctcpu >
                 ((struct p_times *) b)->pt_pctcpu)? -1: 1;              ((struct p_times *) b)->pt_pctcpu)? -1: 1;
 }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14