equal
deleted
inserted
replaced
46 |
46 |
47 int used = total - free; |
47 int used = total - free; |
48 |
48 |
49 #ifdef PANGO_MARKUP |
49 #ifdef PANGO_MARKUP |
50 char *color; |
50 char *color; |
51 if (used*1.0/total < GREEN) color = "color='green'"; |
51 if (used*1.0/total < GREEN) color = "color='#0f0'"; |
52 else if (used*1.0/total > RED) color = "color='red'"; |
52 else if (used*1.0/total > RED) color = "color='#f33'"; |
53 else if (used*1.0/total > ORANGE) color = "color='orange'"; |
53 else if (used*1.0/total > ORANGE) color = "color='#fa0'"; |
54 else color = ""; |
54 else color = ""; |
55 printf("<span %s>%d/%d</span>\n", color, used/1024, total/1024); |
55 printf("<span %s>%d/%d</span>\n", color, used/1024, total/1024); |
56 #else |
56 #else |
57 printf("%d/%d\n", used/1024, total/1024); |
57 printf("%d/%d\n", used/1024, total/1024); |
58 #endif |
58 #endif |