aboutsummaryrefslogtreecommitdiffstats
path: root/SwapMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-01-11 20:43:27 +0100
committerDaniel Lange <DLange@git.local>2021-01-11 20:43:27 +0100
commitc55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (patch)
treed6be9a09fdf7d6dc155de3429a70697ee2bb43b0 /SwapMeter.c
parent65357c8c46154de4e4eca14075bfe5523bb5fc14 (diff)
downloaddebian_htop-c55320e9e2a8916e911bcd39ab37b79e3a7d03b2.tar.gz
debian_htop-c55320e9e2a8916e911bcd39ab37b79e3a7d03b2.tar.bz2
debian_htop-c55320e9e2a8916e911bcd39ab37b79e3a7d03b2.zip
New upstream version 3.0.5upstream/3.0.5
Diffstat (limited to 'SwapMeter.c')
-rw-r--r--SwapMeter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/SwapMeter.c b/SwapMeter.c
index 8e39c75..e39cfd9 100644
--- a/SwapMeter.c
+++ b/SwapMeter.c
@@ -32,12 +32,12 @@ static void SwapMeter_updateValues(Meter* this, char* buffer, size_t size) {
static void SwapMeter_display(const Object* cast, RichString* out) {
char buffer[50];
const Meter* this = (const Meter*)cast;
- RichString_write(out, CRT_colors[METER_TEXT], ":");
- Meter_humanUnit(buffer, this->total, 50);
- RichString_append(out, CRT_colors[METER_VALUE], buffer);
- Meter_humanUnit(buffer, this->values[0], 50);
- RichString_append(out, CRT_colors[METER_TEXT], " used:");
- RichString_append(out, CRT_colors[METER_VALUE], buffer);
+ RichString_writeAscii(out, CRT_colors[METER_TEXT], ":");
+ Meter_humanUnit(buffer, this->total, sizeof(buffer));
+ RichString_appendAscii(out, CRT_colors[METER_VALUE], buffer);
+ Meter_humanUnit(buffer, this->values[0], sizeof(buffer));
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], " used:");
+ RichString_appendAscii(out, CRT_colors[METER_VALUE], buffer);
}
const MeterClass SwapMeter_class = {

© 2014-2024 Faster IT GmbH | imprint | privacy policy