1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +00:00

convert diskiographval_* to double

This commit is contained in:
Phil Sutter 2009-12-04 01:51:41 +01:00
parent 1382915d1e
commit a68a523d40
2 changed files with 9 additions and 11 deletions

View File

@ -165,27 +165,25 @@ void parse_diskiograph_arg(struct text_object *obj, const char *arg)
free(buf);
}
/* XXX: what about max values? */
uint8_t diskiographval(struct text_object *obj)
double diskiographval(struct text_object *obj)
{
struct diskio_stat *diskio = obj->data.opaque;
return (diskio ? round_to_int(diskio->current) : 0);
return (diskio ? diskio->current : 0);
}
uint8_t diskiographval_read(struct text_object *obj)
double diskiographval_read(struct text_object *obj)
{
struct diskio_stat *diskio = obj->data.opaque;
return (diskio ? round_to_int(diskio->current_read) : 0);
return (diskio ? diskio->current_read : 0);
}
uint8_t diskiographval_write(struct text_object *obj)
double diskiographval_write(struct text_object *obj)
{
struct diskio_stat *diskio = obj->data.opaque;
return (diskio ? round_to_int(diskio->current_write) : 0);
return (diskio ? diskio->current_write : 0);
}
#endif /* X11 */

View File

@ -57,9 +57,9 @@ void print_diskio_read(struct text_object *, char *, int);
void print_diskio_write(struct text_object *, char *, int);
#ifdef X11
void parse_diskiograph_arg(struct text_object *, const char *);
uint8_t diskiographval(struct text_object *);
uint8_t diskiographval_read(struct text_object *);
uint8_t diskiographval_write(struct text_object *);
double diskiographval(struct text_object *);
double diskiographval_read(struct text_object *);
double diskiographval_write(struct text_object *);
#endif /* X11 */
#endif /* DISKIO_H_ */