aboutsummaryrefslogtreecommitdiffstats
path: root/MemoryMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:18 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:18 +0200
commit2c8c1a156130aa40be7dcaeb3ce2977a03cf50c2 (patch)
treeafaa05858260763c1d25fa092f3905cf51ffd7b2 /MemoryMeter.c
parent031c3bb95f3d0a74d985286068baa6dd4d29d83f (diff)
downloaddebian_htop-2c8c1a156130aa40be7dcaeb3ce2977a03cf50c2.tar.gz
debian_htop-2c8c1a156130aa40be7dcaeb3ce2977a03cf50c2.tar.bz2
debian_htop-2c8c1a156130aa40be7dcaeb3ce2977a03cf50c2.zip
Imported Upstream version 0.5.4upstream/0.5.4
Diffstat (limited to 'MemoryMeter.c')
-rw-r--r--MemoryMeter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/MemoryMeter.c b/MemoryMeter.c
index 01a9ac1..43029ff 100644
--- a/MemoryMeter.c
+++ b/MemoryMeter.c
@@ -35,9 +35,9 @@ struct MemoryMeter_ {
MemoryMeter* MemoryMeter_new(ProcessList* pl) {
MemoryMeter* this = malloc(sizeof(MemoryMeter));
Meter_init((Meter*)this, String_copy("Memory"), String_copy("Mem"), 3);
- ((Meter*)this)->attributes[0] = CRT_colors[MEMORY_USED];
- ((Meter*)this)->attributes[1] = CRT_colors[MEMORY_BUFFERS];
- ((Meter*)this)->attributes[2] = CRT_colors[MEMORY_CACHE];
+ ((Meter*)this)->attributes[0] = &(CRT_colors[MEMORY_USED]);
+ ((Meter*)this)->attributes[1] = &(CRT_colors[MEMORY_BUFFERS]);
+ ((Meter*)this)->attributes[2] = &(CRT_colors[MEMORY_CACHE]);
((Meter*)this)->setValues = MemoryMeter_setValues;
((Object*)this)->display = MemoryMeter_display;
this->pl = pl;
@@ -88,11 +88,11 @@ void MemoryMeter_display(Object* cast, RichString* out) {
RichString_append(out, CRT_colors[METER_VALUE], buffer);
sprintf(buffer, format, usedMem);
RichString_append(out, CRT_colors[METER_TEXT], "used:");
- RichString_append(out, meter->attributes[0], buffer);
+ RichString_append(out, *(meter->attributes[0]), buffer);
sprintf(buffer, format, buffersMem);
RichString_append(out, CRT_colors[METER_TEXT], "buffers:");
- RichString_append(out, meter->attributes[1], buffer);
+ RichString_append(out, *(meter->attributes[1]), buffer);
sprintf(buffer, format, cachedMem);
RichString_append(out, CRT_colors[METER_TEXT], "cache:");
- RichString_append(out, meter->attributes[2], buffer);
+ RichString_append(out, *(meter->attributes[2]), buffer);
}

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