diff options
author | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:28 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:28 +0100 |
commit | 94123a215ba971baf4ad7e12cc479258ddb8600e (patch) | |
tree | 6f053d8e1ce754ab7104b7364be9754231ab84de /linux/ZramMeter.c | |
parent | 50cb99f0acecb15992f3d5610c02676a6c94f2a4 (diff) | |
parent | c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (diff) | |
download | debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.gz debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.bz2 debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.zip |
Update upstream source from tag 'upstream/3.0.5'
Update to upstream version '3.0.5'
with Debian dir 10922042e094a59dc72f9c39ddd4bfd59c7a302c
Diffstat (limited to 'linux/ZramMeter.c')
-rw-r--r-- | linux/ZramMeter.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/linux/ZramMeter.c b/linux/ZramMeter.c index e6b6937..723de0a 100644 --- a/linux/ZramMeter.c +++ b/linux/ZramMeter.c @@ -37,17 +37,19 @@ static void ZramMeter_updateValues(Meter* this, char* buffer, size_t size) { static void ZramMeter_display(const Object* cast, RichString* out) { char buffer[50]; const Meter* this = (const Meter*)cast; - RichString_write(out, CRT_colors[METER_TEXT], ":"); + + RichString_writeAscii(out, CRT_colors[METER_TEXT], ":"); + Meter_humanUnit(buffer, this->total, sizeof(buffer)); + RichString_appendAscii(out, CRT_colors[METER_VALUE], buffer); - RichString_append(out, CRT_colors[METER_VALUE], buffer); Meter_humanUnit(buffer, this->values[0], sizeof(buffer)); - RichString_append(out, CRT_colors[METER_TEXT], " used:"); - RichString_append(out, CRT_colors[METER_VALUE], buffer); + RichString_appendAscii(out, CRT_colors[METER_TEXT], " used:"); + RichString_appendAscii(out, CRT_colors[METER_VALUE], buffer); Meter_humanUnit(buffer, this->values[1], sizeof(buffer)); - RichString_append(out, CRT_colors[METER_TEXT], " uncompressed:"); - RichString_append(out, CRT_colors[METER_VALUE], buffer); + RichString_appendAscii(out, CRT_colors[METER_TEXT], " uncompressed:"); + RichString_appendAscii(out, CRT_colors[METER_VALUE], buffer); } const MeterClass ZramMeter_class = { |