#
# Applies to
#   /usr/src/bin/ps/print.c 1.36.2.2 / 1.36.2.3
#
# This patch stops ps(1) from printing a blank line when no/empty
# headers are specified. Apply the patch, then 'make all install' in
# /usr/src/bin/ps.
#
# James Raftery <james@now.ie>
#

--- print.c.orig	Tue Mar 12 18:12:57 2002
+++ print.c	Fri Nov 22 14:53:27 2002
@@ -69,6 +69,18 @@
 {
 	VAR *v;
 	struct varent *vent;
+	int i; i = 0;
+
+	for (vent = vhead; vent; vent = vent->next) {
+		v = vent->var;
+		if (strlen(v->header) > 0) {
+			i = 1;
+			break;
+		}
+	}
+
+	if (!i)
+		return;
 
 	for (vent = vhead; vent; vent = vent->next) {
 		v = vent->var;
