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

Diff for /mandoc/term.c between version 1.235 and 1.236

version 1.235, 2014/11/16 21:29:35 version 1.236, 2014/11/21 01:52:53
Line 100  term_flushln(struct termp *p)
Line 100  term_flushln(struct termp *p)
         size_t           j;     /* temporary loop index for p->buf */          size_t           j;     /* temporary loop index for p->buf */
         size_t           jhy;   /* last hyph before overflow w/r/t j */          size_t           jhy;   /* last hyph before overflow w/r/t j */
         size_t           maxvis; /* output position of visible boundary */          size_t           maxvis; /* output position of visible boundary */
         size_t           mmax; /* used in calculating bp */          size_t           rmargin; /* the rightmost of the two margins */
   
         /*          /*
          * First, establish the maximum columns of "visible" content.           * First, establish the maximum columns of "visible" content.
Line 113  term_flushln(struct termp *p)
Line 113  term_flushln(struct termp *p)
          * is negative, it gets sign extended.  Subtracting that           * is negative, it gets sign extended.  Subtracting that
          * very large size_t effectively adds a small number to dv.           * very large size_t effectively adds a small number to dv.
          */           */
         assert  (p->rmargin >= p->offset);          rmargin = p->rmargin > p->offset ? p->rmargin : p->offset;
         dv     = p->rmargin - p->offset;          dv = p->rmargin - p->offset;
         maxvis = (int)dv > p->overstep ? dv - (size_t)p->overstep : 0;          maxvis = (int)dv > p->overstep ? dv - (size_t)p->overstep : 0;
         dv     = p->maxrmargin - p->offset;  
         mmax   = (int)dv > p->overstep ? dv - (size_t)p->overstep : 0;  
   
         bp = TERMP_NOBREAK & p->flags ? mmax : maxvis;          if (p->flags & TERMP_NOBREAK) {
                   dv = p->maxrmargin > p->offset ?
                        p->maxrmargin - p->offset : 0;
                   bp = (int)dv > p->overstep ?
                        dv - (size_t)p->overstep : 0;
           } else
                   bp = maxvis;
   
         /*          /*
          * Calculate the required amount of padding.           * Calculate the required amount of padding.
Line 188  term_flushln(struct termp *p)
Line 192  term_flushln(struct termp *p)
                         (*p->endline)(p);                          (*p->endline)(p);
                         p->viscol = 0;                          p->viscol = 0;
                         if (TERMP_BRIND & p->flags) {                          if (TERMP_BRIND & p->flags) {
                                 vbl = p->rmargin;                                  vbl = rmargin;
                                 vend += p->rmargin - p->offset;                                  vend += rmargin - p->offset;
                         } else                          } else
                                 vbl = p->offset;                                  vbl = p->offset;
   

Legend:
Removed from v.1.235  
changed lines
  Added in v.1.236

CVSweb