ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/saidar/saidar.c
(Generate patch)

Comparing projects/libstatgrab/src/saidar/saidar.c (file contents):
Revision 1.40 by tdb, Sun Dec 17 01:06:16 2006 UTC vs.
Revision 1.41 by tdb, Fri Jan 5 13:30:36 2007 UTC

# Line 59 | Line 59
59   #define THRESHOLD_WARN_DISK 75.0
60   #define THRESHOLD_ALERT_DISK 90.0
61  
62 + int sig_winch_flag = 0;
63 +
64   typedef struct{
65          sg_cpu_percents *cpu_percents;
66          sg_mem_stats *mem_stats;
# Line 532 | Line 534 | void display_data(int colors){
534   }
535  
536   void sig_winch_handler(int dummy){
537 <        clear();
536 <        display_headings();
537 <        display_data(0);
537 >        sig_winch_flag = 1;
538          signal(SIGWINCH, sig_winch_handler);
539   }
540  
# Line 676 | Line 676 | int main(int argc, char **argv){
676                          get_stats();
677                  }
678                  last_update = now;
679 +
680 +                if(sig_winch_flag) {
681 +                        clear();
682 +                        display_headings();
683 +                        sig_winch_flag = 0;
684 +                }
685  
686                  display_data(colouron);
687          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines