summaryrefslogtreecommitdiffstats
path: root/Meter.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2008-03-09 02:33:23 +0000
committerHisham Muhammad <hisham@gobolinux.org>2008-03-09 02:33:23 +0000
commit8fa33dc3365f0e27a5013748321def4bef937049 (patch)
treecf1498456001b55157c4ce9dcd516dd5226158e3 /Meter.c
parentfa87ff02514cdd148cdcf8d24de0599a400f3918 (diff)
Add Unicode support, enabled with the --enable-unicode
flag, which requires libncursesw. Thanks to Sergej Pupykin!
Diffstat (limited to 'Meter.c')
-rw-r--r--Meter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Meter.c b/Meter.c
index 0e9ef05f..fb7d8425 100644
--- a/Meter.c
+++ b/Meter.c
@@ -18,6 +18,7 @@ in the source distribution for its full text.
#include "ListItem.h"
#include "String.h"
#include "ProcessList.h"
+#include "RichString.h"
#include "debug.h"
#include <assert.h>
@@ -266,7 +267,7 @@ void TextMeterMode_draw(Meter* this, int x, int y, int w) {
Meter_displayToStringBuffer(this, buffer);
mvhline(y, x, ' ', CRT_colors[DEFAULT_COLOR]);
attrset(CRT_colors[RESET_COLOR]);
- mvaddchstr(y, x, Meter_stringBuffer.chstr);
+ RichString_printVal(Meter_stringBuffer, y, x);
}
/* ---------- BarMeterMode ---------- */
@@ -418,7 +419,7 @@ void LEDMeterMode_draw(Meter* this, int x, int y, int w) {
mvaddstr(y+2, x, this->caption);
int xx = x + strlen(this->caption);
for (int i = 0; i < Meter_stringBuffer.len; i++) {
- char c = Meter_stringBuffer.chstr[i];
+ char c = RichString_getCharVal(Meter_stringBuffer, i);
if (c >= '0' && c <= '9') {
LEDMeterMode_drawDigit(xx, y, c-48);
xx += 4;

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