diff options
author | ru <ru@FreeBSD.org> | 2006-12-15 17:47:25 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-12-15 17:47:25 +0000 |
commit | 75044764a1a48af980100c5cc21ff5da817434bf (patch) | |
tree | 2b09e655581fe88295e21de1f34485b8895ac38d /usr.bin/column | |
parent | 0798d56531414f0c060b1f82dbca36cccc795503 (diff) | |
download | FreeBSD-src-75044764a1a48af980100c5cc21ff5da817434bf.zip FreeBSD-src-75044764a1a48af980100c5cc21ff5da817434bf.tar.gz |
Fix the fix in rev. 1.15 so that we jump to the next column
instead of always skipping it.
MFC after: 3 days
Diffstat (limited to 'usr.bin/column')
-rw-r--r-- | usr.bin/column/column.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c index ca2837d..329cfa9 100644 --- a/usr.bin/column/column.c +++ b/usr.bin/column/column.c @@ -141,7 +141,7 @@ main(int argc, char **argv) if (!entries) exit(eval); - maxlength = roundup(maxlength + TAB, TAB); + maxlength = roundup(maxlength + 1, TAB); if (tflag) maketbl(); else if (maxlength >= termwidth) @@ -171,7 +171,7 @@ c_columnate(void) endcol = maxlength; putwchar('\n'); } else { - while ((cnt = roundup(chcnt + TAB, TAB)) <= endcol) { + while ((cnt = roundup(chcnt + 1, TAB)) <= endcol) { (void)putwchar('\t'); chcnt = cnt; } @@ -199,7 +199,7 @@ r_columnate(void) chcnt += width(list[base]); if ((base += numrows) >= entries) break; - while ((cnt = roundup(chcnt + TAB, TAB)) <= endcol) { + while ((cnt = roundup(chcnt + 1, TAB)) <= endcol) { (void)putwchar('\t'); chcnt = cnt; } |