summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1997-04-16 16:08:11 +0000
committerjdp <jdp@FreeBSD.org>1997-04-16 16:08:11 +0000
commit563d27a55f527b517f68ffb94f93084351ad6a0c (patch)
tree38f7b50f767d103eefcef44aaab147b55a3bae0d /bin
parent15333a5b94df4c5e55a358cea512d30967c1b4ab (diff)
downloadFreeBSD-src-563d27a55f527b517f68ffb94f93084351ad6a0c.zip
FreeBSD-src-563d27a55f527b517f68ffb94f93084351ad6a0c.tar.gz
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.
Diffstat (limited to 'bin')
-rw-r--r--bin/ps/print.c7
1 files changed, 5 insertions, 2 deletions
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;
}
OpenPOWER on IntegriCloud