From 563d27a55f527b517f68ffb94f93084351ad6a0c Mon Sep 17 00:00:00 2001 From: jdp Date: Wed, 16 Apr 1997 16:08:11 +0000 Subject: When "-c" is specified, don't pad the command with spaces if it is the last field on the line. "ps -axlc" was needlessly wrapping around on 80-character windows. --- bin/ps/print.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin/ps/print.c') diff --git a/bin/ps/print.c b/bin/ps/print.c index 2ac3c28..aac505a 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: print.c,v 1.19 1997/02/22 14:05:05 peter Exp $ */ #ifndef lint @@ -103,7 +103,10 @@ command(k, ve) v = ve->var; if (cflag) { - (void)printf("%-*s", v->width, KI_PROC(k)->p_comm); + if (ve->next == NULL) /* last field, don't pad */ + (void)printf("%s", KI_PROC(k)->p_comm); + else + (void)printf("%-*s", v->width, KI_PROC(k)->p_comm); return; } -- cgit v1.1