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

Diff for /mandoc/term.c between version 1.286 and 1.287

version 1.286, 2022/04/27 13:41:13 version 1.287, 2022/08/15 10:22:14
Line 268  term_fill(struct termp *p, size_t *nbr, size_t *vbr, s
Line 268  term_fill(struct termp *p, size_t *nbr, size_t *vbr, s
                         vis -= (*p->width)(p, p->tcol->buf[ic - 1]);                          vis -= (*p->width)(p, p->tcol->buf[ic - 1]);
                         continue;                          continue;
   
                 case '\t':  /* Normal ASCII whitespace. */  
                 case ' ':                  case ' ':
                 case ASCII_BREAK:  /* Escape \: (breakpoint). */                  case ASCII_BREAK:  /* Escape \: (breakpoint). */
                         switch (p->tcol->buf[ic]) {                          vn = vis;
                         case '\t':                          if (p->tcol->buf[ic] == ' ')
                                 vn = term_tab_next(vis);                                  vn += (*p->width)(p, ' ');
                                 break;  
                         case ' ':  
                                 vn = vis + (*p->width)(p, ' ');  
                                 break;  
                         case ASCII_BREAK:  
                                 vn = vis;  
                                 break;  
                         default:  
                                 abort();  
                         }  
                         /* Can break at the end of a word. */                          /* Can break at the end of a word. */
                         if (breakline || vn > vtarget)                          if (breakline || vn > vtarget)
                                 break;                                  break;
Line 317  term_fill(struct termp *p, size_t *nbr, size_t *vbr, s
Line 306  term_fill(struct termp *p, size_t *nbr, size_t *vbr, s
                         *vbr = vis;                          *vbr = vis;
                         continue;                          continue;
   
                 case ASCII_NBRSP:  /* Non-breakable space. */                  default:
                         p->tcol->buf[ic] = ' ';                          switch (p->tcol->buf[ic]) {
                         /* FALLTHROUGH */                          case '\t':
                 default:  /* Printable character. */                                  vis = term_tab_next(vis);
                                   break;
                           case ASCII_NBRSP:  /* Non-breakable space. */
                                   p->tcol->buf[ic] = ' ';
                                   /* FALLTHROUGH */
                           default:  /* Printable character. */
                                   vis += (*p->width)(p, p->tcol->buf[ic]);
                                   break;
                           }
                         graph = 1;                          graph = 1;
                         vis += (*p->width)(p, p->tcol->buf[ic]);  
                         if (vis > vtarget && *nbr > 0)                          if (vis > vtarget && *nbr > 0)
                                 return;                                  return;
                         continue;                          continue;

Legend:
Removed from v.1.286  
changed lines
  Added in v.1.287

CVSweb