Introduction
Introduction Statistics Contact Development Disclaimer Help
tFix battprint arguments for non-openbsd - spoon - [fork] customized build of s…
git clone git://src.adamsgaard.dk/spoon
Log
Files
Refs
LICENSE
---
commit 0b5d0726bfff81af35ec51db72494cc0941a5a7d
parent 0923a1296f40894c00d8e77cb5203cf6f70a0a2b
Author: Anders Damsgaard <[email protected]>
Date: Wed, 3 Jun 2020 15:59:55 +0200
Fix battprint arguments for non-openbsd
Diffstat:
M batt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/batt.c b/batt.c
t@@ -16,7 +16,7 @@ battprint(char *buf, size_t len, int acon, int life, int rem…
static int frame = 0;
c = acon ? '=' : ' ';
- if (c == ' ')
+ if (c == ' ' && remain != 0)
snprintf(buf, len, "%d%% %d:%02d", life, remain/60, remain%60);
else
snprintf(buf, len, "%d%%", life);
t@@ -80,7 +80,7 @@ battread(void *arg, char *buf, size_t len)
}
fscanf(fp, "%d", &acon);
fclose(fp);
- battprint(buf, len, acon, life);
+ battprint(buf, len, acon, life, 0);
return 0;
}
#endif
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.