diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-17 18:52:53 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-17 18:52:53 +0000 |
commit | 1b6b1653c04be7610086e89d5d286dcf2363cbe0 (patch) | |
tree | ec22d04e461619fd6d247e4409e3fe2be528992f /bin/ls | |
parent | 7e77de81db5ad5ee0d7455dfa9a016a680c5387b (diff) |
Get TAB expansion right
Diffstat (limited to 'bin/ls')
-rw-r--r-- | bin/ls/print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 14a0ca8b872..3587d81eac6 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.4 1996/12/14 12:18:04 mickey Exp $ */ +/* $OpenBSD: print.c,v 1.5 1996/12/17 18:52:52 tholo Exp $ */ /* $NetBSD: print.c,v 1.14 1995/09/07 06:43:00 jtc Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.5 (Berkeley) 7/28/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.4 1996/12/14 12:18:04 mickey Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.5 1996/12/17 18:52:52 tholo Exp $"; #endif #endif /* not lint */ @@ -192,7 +192,7 @@ printcol(dp) dp->s_block); if ((base += numrows) >= num) break; - while ((cnt = (chcnt + (TAB & ~(TAB - 1)))) <= endcol) { + while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol) { (void)putchar('\t'); chcnt = cnt; } |