=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/term.c,v retrieving revision 1.48 retrieving revision 1.49 diff -c -r1.48 -r1.49 *** src/usr.bin/mandoc/term.c 2010/08/20 23:22:07 1.48 --- src/usr.bin/mandoc/term.c 2010/08/20 23:34:00 1.49 *************** *** 1,4 **** ! /* $Id: term.c,v 1.48 2010/08/20 23:22:07 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze --- 1,4 ---- ! /* $Id: term.c,v 1.49 2010/08/20 23:34:00 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze *************** *** 165,176 **** * Handle literal tab characters: collapse all * subsequent tabs into a single huge set of spaces. */ ! for (j = i; j < (int)p->col; j++) { ! if ('\t' != p->buf[j]) ! break; vend = (vis / p->tabwidth + 1) * p->tabwidth; vbl += vend - vis; vis = vend; } /* --- 165,175 ---- * Handle literal tab characters: collapse all * subsequent tabs into a single huge set of spaces. */ ! while (i < (int)p->col && '\t' == p->buf[i]) { vend = (vis / p->tabwidth + 1) * p->tabwidth; vbl += vend - vis; vis = vend; + i++; } /* *************** *** 181,187 **** */ /* LINTED */ ! for (jhy = 0; j < (int)p->col; j++) { if ((j && ' ' == p->buf[j]) || '\t' == p->buf[j]) break; --- 180,186 ---- */ /* LINTED */ ! for (j = i, jhy = 0; j < (int)p->col; j++) { if ((j && ' ' == p->buf[j]) || '\t' == p->buf[j]) break; *************** *** 223,234 **** p->overstep; p->overstep = 0; } - - /* - * Skip leading tabs, they were handled above. - */ - while (i < (int)p->col && '\t' == p->buf[i]) - i++; /* Write out the [remaining] word. */ for ( ; i < (int)p->col; i++) { --- 222,227 ----