summaryrefslogtreecommitdiffstats
path: root/Meter.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-08-20 01:27:07 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-08-20 01:27:07 -0300
commit4597014ea33ae1afa3280d39732dd1410734a939 (patch)
treea4a99463b26e62876a022a2b17a46bb7ebb86479 /Meter.c
parentf019f4cd9ed78af02fe7810806b607f7a48f7842 (diff)
Standardize variable name.
Diffstat (limited to 'Meter.c')
-rw-r--r--Meter.c18
1 files 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;
}
}

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