From: tholo Date: Tue, 17 Dec 1996 18:52:52 +0000 (+0000) Subject: Get TAB expansion right X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c91959fe3623a92e892e68b9ce85c4fa7a75552a;p=openbsd Get TAB expansion right --- 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; }