[BACK]Return to term.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/term.c between version 1.152 and 1.153

version 1.152, 2010/06/28 09:48:44 version 1.153, 2010/06/28 22:46:21
Line 195  term_flushln(struct termp *p)
Line 195  term_flushln(struct termp *p)
                                 if (vend > vis && vend < bp &&                                  if (vend > vis && vend < bp &&
                                     ASCII_HYPH == p->buf[j])                                      ASCII_HYPH == p->buf[j])
                                         jhy = j;                                          jhy = j;
                                 vend++;                                  vend += (*p->width)(p, p->buf[j]);
                         } else                          } else {
                                 vend--;                                  assert(j);
                                   vend -= (*p->width)(p, p->buf[j - 1]);
                           }
                 }                  }
   
                 /*                  /*
Line 237  term_flushln(struct termp *p)
Line 239  term_flushln(struct termp *p)
                                 break;                                  break;
                         if (' ' == p->buf[i]) {                          if (' ' == p->buf[i]) {
                                 while (' ' == p->buf[i]) {                                  while (' ' == p->buf[i]) {
                                         vbl++;                                          vbl += (*p->width)(p, p->buf[i]);
                                         i++;                                          i++;
                                 }                                  }
                                 break;                                  break;
                         }                          }
                         if (ASCII_NBRSP == p->buf[i]) {                          if (ASCII_NBRSP == p->buf[i]) {
                                 vbl++;                                  vbl += (*p->width)(p, ' ');
                                 continue;                                  continue;
                         }                          }
   
Line 258  term_flushln(struct termp *p)
Line 260  term_flushln(struct termp *p)
                                 vbl = 0;                                  vbl = 0;
                         }                          }
   
                         if (ASCII_HYPH == p->buf[i])                          if (ASCII_HYPH == p->buf[i]) {
                                 (*p->letter)(p, '-');                                  (*p->letter)(p, '-');
                         else                                  p->viscol += (*p->width)(p, '-');
                           } else {
                                 (*p->letter)(p, p->buf[i]);                                  (*p->letter)(p, p->buf[i]);
                                   p->viscol += (*p->width)(p, p->buf[i]);
                         p->viscol += 1;                          }
                 }                  }
                 vend += vbl;                  vend += vbl;
                 vis = vend;                  vis = vend;
Line 281  term_flushln(struct termp *p)
Line 284  term_flushln(struct termp *p)
         if (TERMP_HANG & p->flags) {          if (TERMP_HANG & p->flags) {
                 /* We need one blank after the tag. */                  /* We need one blank after the tag. */
                 p->overstep = /* LINTED */                  p->overstep = /* LINTED */
                         vis - maxvis + 1;                          vis - maxvis + (*p->width)(p, ' ');
   
                 /*                  /*
                  * Behave exactly the same way as groff:                   * Behave exactly the same way as groff:
Line 305  term_flushln(struct termp *p)
Line 308  term_flushln(struct termp *p)
   
         /* Right-pad. */          /* Right-pad. */
         if (maxvis > vis + /* LINTED */          if (maxvis > vis + /* LINTED */
                         ((TERMP_TWOSPACE & p->flags) ? 1 : 0)) {                          ((TERMP_TWOSPACE & p->flags) ? (*p->width)(p, ' ') : 0)) {
                 p->viscol += maxvis - vis;                  p->viscol += maxvis - vis;
                 (*p->advance)(p, maxvis - vis);                  (*p->advance)(p, maxvis - vis);
                 vis += (maxvis - vis);                  vis += (maxvis - vis);

Legend:
Removed from v.1.152  
changed lines
  Added in v.1.153

CVSweb