wmmon: Use consistent data types.
This commit is contained in:
parent
4a1a75e65a
commit
cd2115dbe8
|
@ -1,6 +1,6 @@
|
||||||
#define wmmon_mask_width 128
|
#define wmmon_mask_width 128
|
||||||
#define wmmon_mask_height 64
|
#define wmmon_mask_height 64
|
||||||
static char wmmon_mask_bits[] = {
|
static unsigned char wmmon_mask_bits[] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|
|
@ -232,7 +232,7 @@ void wmmon_routine(int argc, char **argv)
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned long i, j;
|
int i, j;
|
||||||
long k;
|
long k;
|
||||||
XEvent Event;
|
XEvent Event;
|
||||||
int but_stat = -1;
|
int but_stat = -1;
|
||||||
|
@ -325,7 +325,7 @@ void wmmon_routine(int argc, char **argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
openXwindow(argc, argv, wmmon_master_xpm, wmmon_mask_bits,
|
openXwindow(argc, argv, wmmon_master_xpm, (char *)wmmon_mask_bits,
|
||||||
wmmon_mask_width, wmmon_mask_height);
|
wmmon_mask_width, wmmon_mask_height);
|
||||||
|
|
||||||
/* add mouse region */
|
/* add mouse region */
|
||||||
|
@ -678,17 +678,17 @@ void update_stat_mem(stat_dev *st, stat_dev *st2)
|
||||||
if (strstr(line, "MemTotal:"))
|
if (strstr(line, "MemTotal:"))
|
||||||
sscanf(line, "MemTotal: %ld", &st->rt_idle);
|
sscanf(line, "MemTotal: %ld", &st->rt_idle);
|
||||||
else if (strstr(line, "MemFree:"))
|
else if (strstr(line, "MemFree:"))
|
||||||
sscanf(line, "MemFree: %ld", &free);
|
sscanf(line, "MemFree: %lu", &free);
|
||||||
else if (strstr(line, "MemShared:"))
|
else if (strstr(line, "MemShared:"))
|
||||||
sscanf(line, "MemShared: %ld", &shared);
|
sscanf(line, "MemShared: %lu", &shared);
|
||||||
else if (strstr(line, "Buffers:"))
|
else if (strstr(line, "Buffers:"))
|
||||||
sscanf(line, "Buffers: %ld", &buffers);
|
sscanf(line, "Buffers: %lu", &buffers);
|
||||||
else if (strstr(line, "Cached:"))
|
else if (strstr(line, "Cached:"))
|
||||||
sscanf(line, "Cached: %ld", &cached);
|
sscanf(line, "Cached: %lu", &cached);
|
||||||
else if (strstr(line, "SwapTotal:"))
|
else if (strstr(line, "SwapTotal:"))
|
||||||
sscanf(line, "SwapTotal: %ld", &st2->rt_idle);
|
sscanf(line, "SwapTotal: %ld", &st2->rt_idle);
|
||||||
else if (strstr(line, "SwapFree:"))
|
else if (strstr(line, "SwapFree:"))
|
||||||
sscanf(line, "SwapFree: %ld", &swapfree);
|
sscanf(line, "SwapFree: %lu", &swapfree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* memory use - rt_stat is the amount used, it seems, and this isn't
|
/* memory use - rt_stat is the amount used, it seems, and this isn't
|
||||||
|
@ -719,7 +719,7 @@ void update_stat_swp(stat_dev *st)
|
||||||
if (strstr(line, "SwapTotal:"))
|
if (strstr(line, "SwapTotal:"))
|
||||||
sscanf(line, "SwapTotal: %ld", &st->rt_idle);
|
sscanf(line, "SwapTotal: %ld", &st->rt_idle);
|
||||||
else if (strstr(line, "SwapFree:"))
|
else if (strstr(line, "SwapFree:"))
|
||||||
sscanf(line, "SwapFree: %ld", &swapfree);
|
sscanf(line, "SwapFree: %lu", &swapfree);
|
||||||
}
|
}
|
||||||
st->rt_stat = st->rt_idle - swapfree;
|
st->rt_stat = st->rt_idle - swapfree;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue