diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-12-29 17:13:56 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-12-29 17:13:56 +0000 |
commit | ca6e8a65a743155f0952eff98ff5bf1f28e4572d (patch) | |
tree | cb5865fcd771013bcc7b9fe21e017b7d240a9572 /bin/ps/keyword.c | |
parent | 9a7af7ec309e1b8bc76d267187bcc3a827a20c9b (diff) |
Suppress the header line if all the field headers have been set to empty.
ok millert@
Diffstat (limited to 'bin/ps/keyword.c')
-rw-r--r-- | bin/ps/keyword.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 4653db0b790..9a6457b6772 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keyword.c,v 1.33 2011/12/11 00:16:49 nicm Exp $ */ +/* $OpenBSD: keyword.c,v 1.34 2011/12/29 17:13:55 guenther Exp $ */ /* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */ /*- @@ -47,6 +47,8 @@ #include <sys/ucred.h> #include <sys/sysctl.h> +int needheader; + static VAR *findvar(char *); static int vcmp(const void *, const void *); @@ -227,6 +229,7 @@ parsefmt(char *p) vtail->next = vent; vtail = vent; } + needheader |= v->header[0] != '\0'; } if (!vhead) errx(1, "no valid keywords"); |