diff options
author | peter <peter@FreeBSD.org> | 1995-09-26 17:48:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-09-26 17:48:59 +0000 |
commit | 5a3733e33dd63da58b28eb2ea6df25d4090dab5e (patch) | |
tree | eb90e8805e1e348568dee5f1f8a3cbf37a20cc9b /bin/ps/print.c | |
parent | 8d2c8c2164b2a032b537a49fb198ccebe58e9af5 (diff) | |
download | FreeBSD-src-5a3733e33dd63da58b28eb2ea6df25d4090dab5e.zip FreeBSD-src-5a3733e33dd63da58b28eb2ea6df25d4090dab5e.tar.gz |
Correct the alignment of the tty column, which was affected by my change to
allow more than two tty characters.
David Greenman pointed out that when a process that had been revoked from
it's controlling tty, the "-" sign was detached from any two-character
names.
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 56b98f7..e64a6b0 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: print.c,v 1.8 1995/08/07 19:17:39 wollman Exp $ + * $Id: print.c,v 1.9 1995/09/04 01:22:41 peter Exp $ */ #ifndef lint @@ -322,12 +322,12 @@ tname(k, ve) v = ve->var; dev = KI_EPROC(k)->e_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - (void)printf("%-*s", v->width, "??"); + (void)printf("%*s ", v->width-1, "??"); else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) ttname += 3; - (void)printf("%-*.*s%c", v->width-1, v->width-1, ttname, + (void)printf("%*.*s%c", v->width-1, v->width-1, ttname, KI_EPROC(k)->e_flag & EPROC_CTTY ? ' ' : '-'); } } |