diff options
author | jmallett <jmallett@FreeBSD.org> | 2003-01-19 00:31:16 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2003-01-19 00:31:16 +0000 |
commit | 73809496b45d21085a6db24febd200f02c70f935 (patch) | |
tree | 1cc7b9065ac7aabd4420de7b517bd239be8106b6 /bin/ps/print.c | |
parent | d52835b4ab057c3bfdf416502c82c4c0f7a22546 (diff) | |
download | FreeBSD-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.c | 8 |
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(' '); } |