From 6e76e603b126b39c13e3741f74b2df7112773238 Mon Sep 17 00:00:00 2001 From: gotmor Date: Tue, 28 Aug 2007 11:44:01 +0000 Subject: fixed width/alignement in gcpubar for '-o' option git-svn-id: http://dzen.googlecode.com/svn/trunk@163 f2baff5b-bf2c-0410-a398-912abdc3d8b2 --- gadgets/gcpubar.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gadgets') diff --git a/gadgets/gcpubar.c b/gadgets/gcpubar.c index b4c066d..a55b781 100644 --- a/gadgets/gcpubar.c +++ b/gadgets/gcpubar.c @@ -58,9 +58,9 @@ pbar(double perc, int maxc, int height, int print_nl, int mode) { rp = (int)perc; if(mode) - printf("CPU: %3d%% ^ib(1)^fg(%s)^ro(%dx%d)^p(%d)^fg(%s)^r(%dx%d)^fg()%s", + printf("CPU: %3d%% ^ib(1)^fg(%s)^ro(%dx%d)^p(%d)^fg(%s)^r(%dx%d)^p(%d)^ib(0)^fg()%s", rp, bg, maxc, height, -1*(maxc-1), - (rp>=CPUCRIT) ? CRITCOL : fg, (int)l, height-2, print_nl ? "\n" : ""); + (rp>=CPUCRIT) ? CRITCOL : fg, (int)l, height-2, (maxc-1)-(int)l, print_nl ? "\n" : ""); else printf("CPU: %3d%% ^fg(%s)^r(%dx%d)^fg(%s)^r(%dx%d)^fg()%s", rp, (rp>=CPUCRIT) ? CRITCOL : fg, (int)l, height, @@ -69,6 +69,10 @@ pbar(double perc, int maxc, int height, int print_nl, int mode) { fflush(stdout); } +static void +mkstat() { +} + int main(int argc, char *argv[]) { @@ -133,7 +137,7 @@ main(int argc, char *argv[]) print_nl = 0; } else { - printf("usage: %s [-i ] [-c ] [-fg ] [-bg ] [-w ] [-h ] [-nonl]\n", argv[0]); + printf("usage: %s [-i ] [-c ] [-fg ] [-bg ] [-w ] [-h ] [-o] [-nonl]\n", argv[0]); return EXIT_FAILURE; } } -- cgit v1.2.3-54-g00ecf