mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
Splitting statements with #define's can cause trouble for cross
compilers (and it looks a bit messy)
This commit is contained in:
parent
9adcf73152
commit
f6bba3d689
14
procps/top.c
14
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 ",
|
||||
#else
|
||||
"%5d %-8s %s %s %5d %2u.%u ",
|
||||
#endif
|
||||
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
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user