summaryrefslogtreecommitdiffstats
path: root/Meter.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-08-27 21:37:06 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-08-27 21:37:06 -0300
commitbdadd45a881b9b59f7b2ac9a655b5e5c6cde5fa7 (patch)
tree03bc9585b5e510622c7a42779e012568ee01439f /Meter.c
parentbde3406addc4bd65d3aa7ceb957f7887a154f9c9 (diff)
Fix indentation.
Diffstat (limited to 'Meter.c')
-rw-r--r--Meter.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/Meter.c b/Meter.c
index 67ae96ef..ee8fbf78 100644
--- a/Meter.c
+++ b/Meter.c
@@ -142,31 +142,31 @@ Meter* Meter_new(struct ProcessList_* pl, int param, MeterClass* type) {
}
int Meter_humanUnit(char* buffer, unsigned long int value, int size) {
- const char * prefix = "KMGTPEZY";
- unsigned long int powi = 1;
- unsigned int written, powj = 1, precision = 2;
+ const char * prefix = "KMGTPEZY";
+ unsigned long int powi = 1;
+ unsigned int written, powj = 1, precision = 2;
- for(;;) {
- if (value / 1024 < powi)
- break;
+ for(;;) {
+ if (value / 1024 < powi)
+ break;
- if (prefix[1] == 0)
- break;
+ if (prefix[1] == 0)
+ break;
- powi *= 1024;
- ++prefix;
- }
+ powi *= 1024;
+ ++prefix;
+ }
- for (; precision > 0; precision--) {
- powj *= 10;
- if (value / powi < powj)
- break;
- }
+ for (; precision > 0; precision--) {
+ powj *= 10;
+ if (value / powi < powj)
+ break;
+ }
- written = snprintf(buffer, size, "%.*f%c",
- precision, (double) value / powi, *prefix);
+ written = snprintf(buffer, size, "%.*f%c",
+ precision, (double) value / powi, *prefix);
- return written;
+ return written;
}
void Meter_delete(Object* cast) {
@@ -463,9 +463,9 @@ static void LEDMeterMode_draw(Meter* this, int x, int y, int w) {
int yText =
#ifdef HAVE_LIBNCURSESW
- CRT_utf8 ? y+1 :
+ CRT_utf8 ? y+1 :
#endif
- y+2;
+ y+2;
attrset(CRT_colors[LED_COLOR]);
mvaddstr(yText, x, this->caption);
int xx = x + strlen(this->caption);

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