From 3cc273e0bee1bf92ec10809b2dc5eafcabe2993a Mon Sep 17 00:00:00 2001 From: John Polstra Date: Wed, 16 Apr 1997 16:08:11 +0000 Subject: [PATCH] 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(-) diff --git a/bin/ps/print.c b/bin/ps/print.c index 2ac3c28046ee..aac505a50e38 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; }