From a68a523d40e7701f47ec0acdce16214e37980ec2 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 4 Dec 2009 01:51:41 +0100 Subject: [PATCH] convert diskiographval_* to double --- src/diskio.c | 14 ++++++-------- src/diskio.h | 6 +++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/diskio.c b/src/diskio.c index 2fab45c9..a60544e2 100644 --- a/src/diskio.c +++ b/src/diskio.c @@ -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 */ diff --git a/src/diskio.h b/src/diskio.h index e262891d..1c379fe9 100644 --- a/src/diskio.h +++ b/src/diskio.h @@ -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_ */