diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2006-12-15 17:47:25 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2006-12-15 17:47:25 +0000 |
commit | 090782f5d5974c14eaa0ed4cb3e2c46c8f3166a4 (patch) | |
tree | 2b09e655581fe88295e21de1f34485b8895ac38d /usr.bin/column | |
parent | e0195199f7dfebbad00cd42d863cde2e214c5f17 (diff) | |
download | src-090782f5d5974c14eaa0ed4cb3e2c46c8f3166a4.tar.gz src-090782f5d5974c14eaa0ed4cb3e2c46c8f3166a4.zip |
Notes
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 ca2837dd5a68..329cfa932ee5 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; } |