aboutsummaryrefslogtreecommitdiffstats
path: root/CPUMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:19 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:19 +0200
commit266ab52b3a741a58fb17c48b0f7939d7c5d266de (patch)
treeb4bccc59b9a35f3acbe7560f3d633940c71aedef /CPUMeter.c
parent2c8c1a156130aa40be7dcaeb3ce2977a03cf50c2 (diff)
downloaddebian_htop-266ab52b3a741a58fb17c48b0f7939d7c5d266de.tar.gz
debian_htop-266ab52b3a741a58fb17c48b0f7939d7c5d266de.tar.bz2
debian_htop-266ab52b3a741a58fb17c48b0f7939d7c5d266de.zip
Imported Upstream version 0.6upstream/0.6
Diffstat (limited to 'CPUMeter.c')
-rw-r--r--CPUMeter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/CPUMeter.c b/CPUMeter.c
index 8e9918b..c59c2c4 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -49,9 +49,9 @@ CPUMeter* CPUMeter_new(ProcessList* pl, int processor) {
Meter_init((Meter*)this, NULL, caption, 3);
((Meter*)this)->name = malloc(20);
sprintf(((Meter*)this)->name, "CPU(%d)", processor);
- ((Meter*)this)->attributes[0] = &(CRT_colors[CPU_NICE]);
- ((Meter*)this)->attributes[1] = &(CRT_colors[CPU_NORMAL]);
- ((Meter*)this)->attributes[2] = &(CRT_colors[CPU_KERNEL]);
+ ((Meter*)this)->attributes[0] = CPU_NICE;
+ ((Meter*)this)->attributes[1] = CPU_NORMAL;
+ ((Meter*)this)->attributes[2] = CPU_KERNEL;
((Meter*)this)->setValues = CPUMeter_setValues;
((Object*)this)->display = CPUMeter_display;
((Meter*)this)->total = 1.0;
@@ -76,11 +76,11 @@ void CPUMeter_display(Object* cast, RichString* out) {
RichString_prune(out);
sprintf(buffer, "%5.1f%% ", this->values[1] * 100.0);
RichString_append(out, CRT_colors[METER_TEXT], ":");
- RichString_append(out, *(this->attributes[1]), buffer);
+ RichString_append(out, CRT_colors[CPU_NORMAL], buffer);
sprintf(buffer, "%5.1f%% ", this->values[2] * 100.0);
RichString_append(out, CRT_colors[METER_TEXT], "sys:");
- RichString_append(out, *(this->attributes[2]), buffer);
+ RichString_append(out, CRT_colors[CPU_KERNEL], buffer);
sprintf(buffer, "%5.1f%% ", this->values[0] * 100.0);
RichString_append(out, CRT_colors[METER_TEXT], "low:");
- RichString_append(out, *(this->attributes[0]), buffer);
+ RichString_append(out, CRT_colors[CPU_NICE], buffer);
}

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