From 8fa33dc3365f0e27a5013748321def4bef937049 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 9 Mar 2008 02:33:23 +0000 Subject: Add Unicode support, enabled with the --enable-unicode flag, which requires libncursesw. Thanks to Sergej Pupykin! --- Meter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Meter.c') 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 @@ -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; -- cgit v1.2.3