From 4597014ea33ae1afa3280d39732dd1410734a939 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 20 Aug 2015 01:27:07 -0300 Subject: [PATCH] Standardize variable name. --- Meter.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Meter.c b/Meter.c index ff0f7000..cc661e6a 100644 --- a/Meter.c +++ b/Meter.c @@ -329,7 +329,7 @@ static const char* GraphMeterMode_dotsAscii[] = { }; static const char** GraphMeterMode_dots; -static int pixperrow; +static int GraphMeterMode_pixPerRow; static void GraphMeterMode_draw(Meter* this, int x, int y, int w) { @@ -340,12 +340,12 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) { #ifdef HAVE_LIBNCURSESW if (CRT_utf8) { GraphMeterMode_dots = GraphMeterMode_dotsUtf8; - pixperrow = PIXPERROW_UTF8; + GraphMeterMode_pixPerRow = PIXPERROW_UTF8; } else #endif { GraphMeterMode_dots = GraphMeterMode_dotsAscii; - pixperrow = PIXPERROW_ASCII; + GraphMeterMode_pixPerRow = PIXPERROW_ASCII; } attrset(CRT_colors[METER_TEXT]); @@ -375,17 +375,17 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) { } for (int i = nValues - (w*2) + 2, k = 0; i < nValues; i+=2, k++) { - const double dot = (1.0 / (pixperrow * 4)); - int v1 = MIN(pixperrow * 4, MAX(1, data->values[i] / dot)); - int v2 = MIN(pixperrow * 4, MAX(1, data->values[i+1] / dot)); + const double dot = (1.0 / (GraphMeterMode_pixPerRow * 4)); + int v1 = MIN(GraphMeterMode_pixPerRow * 4, MAX(1, data->values[i] / dot)); + int v2 = MIN(GraphMeterMode_pixPerRow * 4, MAX(1, data->values[i+1] / dot)); int colorIdx = GRAPH_1; for (int line = 0; line < 4; line++) { - int line1 = MIN(pixperrow, MAX(0, v1 - (pixperrow * (3 - line)))); - int line2 = MIN(pixperrow, MAX(0, v2 - (pixperrow * (3 - line)))); + int line1 = MIN(GraphMeterMode_pixPerRow, MAX(0, v1 - (GraphMeterMode_pixPerRow * (3 - line)))); + int line2 = MIN(GraphMeterMode_pixPerRow, MAX(0, v2 - (GraphMeterMode_pixPerRow * (3 - line)))); attrset(CRT_colors[colorIdx]); - mvaddstr(y+line, x+k, GraphMeterMode_dots[line1 * (pixperrow + 1) + line2]); + mvaddstr(y+line, x+k, GraphMeterMode_dots[line1 * (GraphMeterMode_pixPerRow + 1) + line2]); colorIdx = GRAPH_2; } }