aboutsummaryrefslogtreecommitdiffstats
path: root/MemoryMeter.c
diff options
context:
space:
mode:
authorEugene V. Lyubimkin <jackyf@debian.org>2014-05-01 13:16:56 +0300
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:34 +0200
commit43997d37137cc1e4a1a5be654aa16d4992045e34 (patch)
treeb89a3360498e310adb64b337d849ea25aa0e51f0 /MemoryMeter.c
parent51516557d375ac91e0a1a6f0525c3def1d3d79b0 (diff)
parentf75ab6d2c11e8a8e18191b087564aedebbeb96c5 (diff)
downloaddebian_htop-43997d37137cc1e4a1a5be654aa16d4992045e34.tar.gz
debian_htop-43997d37137cc1e4a1a5be654aa16d4992045e34.tar.bz2
debian_htop-43997d37137cc1e4a1a5be654aa16d4992045e34.zip
Imported Debian patch 1.0.3-1debian/1.0.3-1
Diffstat (limited to 'MemoryMeter.c')
-rw-r--r--MemoryMeter.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/MemoryMeter.c b/MemoryMeter.c
index fa897d7..0151625 100644
--- a/MemoryMeter.c
+++ b/MemoryMeter.c
@@ -11,7 +11,6 @@ in the source distribution for its full text.
#include "ProcessList.h"
#include <stdlib.h>
-#include <curses.h>
#include <string.h>
#include <math.h>
#include <sys/param.h>
@@ -53,17 +52,21 @@ static void MemoryMeter_display(Object* cast, RichString* out) {
RichString_append(out, CRT_colors[MEMORY_USED], buffer);
sprintf(buffer, format, buffersMem);
RichString_append(out, CRT_colors[METER_TEXT], "buffers:");
- RichString_append(out, CRT_colors[MEMORY_BUFFERS], buffer);
+ RichString_append(out, CRT_colors[MEMORY_BUFFERS_TEXT], buffer);
sprintf(buffer, format, cachedMem);
RichString_append(out, CRT_colors[METER_TEXT], "cache:");
RichString_append(out, CRT_colors[MEMORY_CACHE], buffer);
}
-MeterType MemoryMeter = {
+MeterClass MemoryMeter_class = {
+ .super = {
+ .extends = Class(Meter),
+ .delete = Meter_delete,
+ .display = MemoryMeter_display,
+ },
.setValues = MemoryMeter_setValues,
- .display = MemoryMeter_display,
- .mode = BAR_METERMODE,
- .items = 3,
+ .defaultMode = BAR_METERMODE,
+ .maxItems = 3,
.total = 100.0,
.attributes = MemoryMeter_attributes,
"Memory",

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