diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-12-08 20:31:25 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-12-08 20:31:25 +0000 |
commit | f6bba3d68954624d8515b8345295710e60f78137 (patch) | |
tree | 1c123cb6ec3cba924c7bbc16436d98420448bb31 /procps | |
parent | 9adcf73152e1cb4d537d3ff713abe9d1c51171dd (diff) |
Splitting statements with #define's can cause trouble for cross
compilers (and it looks a bit messy)
Diffstat (limited to 'procps')
-rw-r--r-- | procps/top.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/procps/top.c b/procps/top.c index 9944598c2..64b3c0732 100644 --- a/procps/top.c +++ b/procps/top.c @@ -409,17 +409,15 @@ static void display_status(int count, int col) sprintf(rss_str_buf, "%6ldM", s->rss/1024); else sprintf(rss_str_buf, "%7ld", s->rss); - printf( #ifdef FEATURE_CPU_USAGE_PERCENTAGE - "%5d %-8s %s %s %5d %2d.%d %2u.%u ", + printf("%5d %-8s %s %s %5d %2d.%d %2u.%u ", + s->pid, s->user, s->state, rss_str_buf, s->ppid, + s->pcpu/10, s->pcpu%10, pmem/10, pmem%10); #else - "%5d %-8s %s %s %5d %2u.%u ", -#endif + printf("%5d %-8s %s %s %5d %2u.%u ", s->pid, s->user, s->state, rss_str_buf, s->ppid, -#ifdef FEATURE_CPU_USAGE_PERCENTAGE - s->pcpu/10, s->pcpu%10, -#endif pmem/10, pmem%10); +#endif if(strlen(namecmd) > col) namecmd[col] = 0; printf("%s\n", namecmd); |