summaryrefslogtreecommitdiffstats
path: root/Meter.c
diff options
context:
space:
mode:
authorDaniel Flanagan <daniel@lytedev.io>2019-10-31 11:39:12 -0500
committerDaniel Flanagan <daniel@lytedev.io>2019-10-31 11:39:12 -0500
commitdd33444f7eace81115308eadb568020470c48b2b (patch)
treeb13c2a7f17cc64458016d396829e95ef5cea9294 /Meter.c
parent28840683cfc5d48307b9b0f382f55f8c84d6a0c4 (diff)
Clean up existing whitespace
Diffstat (limited to 'Meter.c')
-rw-r--r--Meter.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Meter.c b/Meter.c
index 05a4eb23..e2a29a69 100644
--- a/Meter.c
+++ b/Meter.c
@@ -78,7 +78,7 @@ typedef struct MeterClass_ {
struct Meter_ {
Object super;
Meter_Draw draw;
-
+
char* caption;
int mode;
int param;
@@ -275,7 +275,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
attrset(CRT_colors[BAR_BORDER]);
mvaddch(y, x, '[');
mvaddch(y, x + w, ']');
-
+
w--;
x++;
@@ -284,7 +284,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
return;
}
char bar[w + 1];
-
+
int blockSizes[10];
xSnprintf(bar, w + 1, "%*.*s", w, w, buffer);
@@ -378,7 +378,7 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
mvaddnstr(y, x, this->caption, captionLen);
x += captionLen;
w -= captionLen;
-
+
struct timeval now;
gettimeofday(&now, NULL);
if (!timercmp(&now, &(data->time), <)) {
@@ -387,10 +387,10 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
for (int i = 0; i < nValues - 1; i++)
data->values[i] = data->values[i+1];
-
+
char buffer[nValues];
Meter_updateValues(this, buffer, nValues - 1);
-
+
double value = 0.0;
int items = Meter_getItems(this);
for (int i = 0; i < items; i++)
@@ -398,7 +398,7 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
value /= this->total;
data->values[nValues - 1] = value;
}
-
+
int i = nValues - (w*2) + 2, k = 0;
if (i < 0) {
k = -i/2;
@@ -459,7 +459,7 @@ static void LEDMeterMode_draw(Meter* this, int x, int y, int w) {
char buffer[METER_BUFFER_LEN];
Meter_updateValues(this, buffer, METER_BUFFER_LEN - 1);
-
+
RichString_begin(out);
Meter_displayBuffer(this, buffer, &out);

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