#define SPECIAL_CHAR '\x01'
-enum {
+enum special_types {
HORIZONTAL_LINE,
STIPPLED_HR,
BAR,
#define MAX_GRAPH_DEPTH 256 /* why 256? cause an array of more then 256 doubles seems excessive, and who needs that kind of precision anyway? */
-static struct special_t *new_special(char *buf, int t)
+static struct special_t *new_special(char *buf, enum special_types t)
{
if (special_count >= max_specials)
CRIT_ERR("too many special things in text");
}
#ifndef HAVE_MEMRCHR
-void *
-memrchr (const void *buffer, int c, size_t n)
+void *memrchr(const void *buffer, char c, size_t n)
{
const unsigned char *p = buffer;
file_pos = ftell(fp);
buf_pos = fread(buf, 1, buf_size, fp);
}
- cur_found =
- memrchr(
- buf,
- (int)val,
- (size_t)buf_pos);
+ cur_found = memrchr(buf, val, (size_t) buf_pos);
if(cur_found != NULL) {
buf_pos = cur_found-buf;
count++;
double
get_sysfs_info(int *fd, int arg, char *devtype, char *type)
{
- return (0);
+ return 0.0;
}
void
double v[3];
getloadavg(v, 3);
- info.loadavg[0] = (float) v[0];
- info.loadavg[1] = (float) v[1];
- info.loadavg[2] = (float) v[2];
+ info.loadavg[0] = (double) v[0];
+ info.loadavg[1] = (double) v[1];
+ info.loadavg[2] = (double) v[2];
}
double