void-packages/srcpkgs/procps/patches/procps-3.2.7-top-sorthigh.patch

38 lines
1.1 KiB
Diff
Raw Normal View History

--- procps-3.2.7/top.c.sorthigh 2007-02-05 09:06:34.000000000 +0100
+++ procps-3.2.7/top.c 2007-02-05 09:09:35.000000000 +0100
@@ -3121,6 +3121,7 @@
unsigned w = Fieldstab[i].width;
int advance = (x==0) && !Rc.mode_altscr;
+ f += advance;
switch (i) {
case P_CMD:
@@ -3179,7 +3180,7 @@
break;
case P_PRI:
if (unlikely(-99 > p->priority) || unlikely(999 < p->priority)) {
- f = " RT";
+ f = advance ? " RT" : " RT";
MKCOL("");
} else
MKCOL((int)p->priority);
@@ -3227,7 +3228,7 @@
break;
case P_WCH:
if (No_ksyms) {
- f = " %08lx ";
+ f = advance ? "%08lx " : " %08lx ";
MKCOL((long)p->wchan);
} else {
MKCOL(lookup_wchan(p->wchan, p->XXXID));
@@ -3236,7 +3237,7 @@
} /* end: switch 'procflag' */
- rp = scat(rp, cbuf+advance);
+ rp = scat(rp, cbuf);
} /* end: for 'maxpflgs' */
PUFF(