summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2003-01-19 00:31:16 +0000
committerjmallett <jmallett@FreeBSD.org>2003-01-19 00:31:16 +0000
commit73809496b45d21085a6db24febd200f02c70f935 (patch)
tree1cc7b9065ac7aabd4420de7b517bd239be8106b6 /bin/ps/print.c
parentd52835b4ab057c3bfdf416502c82c4c0f7a22546 (diff)
downloadFreeBSD-src-73809496b45d21085a6db24febd200f02c70f935.zip
FreeBSD-src-73809496b45d21085a6db24febd200f02c70f935.tar.gz
Per-variable\ entry headers, to allow the 'ps -otime -otime=FOO' or similar
case to do the right thing and affect exactly one column. This is consistent with GNU ps(1) in BSD mode, and POLA.
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 8760484..6b3489b 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -76,7 +76,7 @@ printheader(void)
allempty = 1;
for (vent = vhead; vent; vent = vent->next)
- if (*vent->var->header != '\0') {
+ if (*vent->header != '\0') {
allempty = 0;
break;
}
@@ -86,11 +86,11 @@ printheader(void)
v = vent->var;
if (v->flag & LJUST) {
if (vent->next == NULL) /* last one */
- (void)printf("%s", v->header);
+ (void)printf("%s", vent->header);
else
- (void)printf("%-*s", v->width, v->header);
+ (void)printf("%-*s", v->width, vent->header);
} else
- (void)printf("%*s", v->width, v->header);
+ (void)printf("%*s", v->width, vent->header);
if (vent->next != NULL)
(void)putchar(' ');
}
OpenPOWER on IntegriCloud