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

Diff for /mandoc/term.c between version 1.109 and 1.113

version 1.109, 2009/10/22 18:19:36 version 1.113, 2009/10/26 17:05:44
Line 19 
Line 19 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <time.h>
   
 #include "chars.h"  #include "chars.h"
 #include "out.h"  #include "out.h"
Line 130  void
Line 131  void
 term_flushln(struct termp *p)  term_flushln(struct termp *p)
 {  {
         int              i, j;          int              i, j;
         size_t           vbl, vsz, vis, maxvis, mmax, bp, os;          size_t           vbl, vsz, vis, maxvis, mmax, bp;
         static int       overstep = 0;          static int       overstep = 0;
   
         /*          /*
Line 143  term_flushln(struct termp *p)
Line 144  term_flushln(struct termp *p)
         assert(p->offset < p->rmargin);          assert(p->offset < p->rmargin);
         assert((int)(p->rmargin - p->offset) - overstep > 0);          assert((int)(p->rmargin - p->offset) - overstep > 0);
   
         /* Save the overstep. */  
         os = (size_t)overstep;  
   
         maxvis = /* LINTED */          maxvis = /* LINTED */
                 p->rmargin - p->offset - overstep;                  p->rmargin - p->offset - overstep;
         mmax = /* LINTED */          mmax = /* LINTED */
Line 153  term_flushln(struct termp *p)
Line 151  term_flushln(struct termp *p)
   
         bp = TERMP_NOBREAK & p->flags ? mmax : maxvis;          bp = TERMP_NOBREAK & p->flags ? mmax : maxvis;
         vis = 0;          vis = 0;
         overstep = 0;  
   
         /*          /*
          * If in the standard case (left-justified), then begin with our           * If in the standard case (left-justified), then begin with our
Line 208  term_flushln(struct termp *p)
Line 205  term_flushln(struct termp *p)
                                 vis = 0;                                  vis = 0;
                         }                          }
                         /* Remove the overstep width. */                          /* Remove the overstep width. */
                         bp += os;                          bp += (int)/* LINTED */
                         os = 0;                                  overstep;
                           overstep = 0;
                 } else {                  } else {
                         for (j = 0; j < (int)vbl; j++)                          for (j = 0; j < (int)vbl; j++)
                                 putchar(' ');                                  putchar(' ');
Line 226  term_flushln(struct termp *p)
Line 224  term_flushln(struct termp *p)
                 }                  }
                 vis += vsz;                  vis += vsz;
         }          }
   
         p->col = 0;          p->col = 0;
           overstep = 0;
   
         if ( ! (TERMP_NOBREAK & p->flags)) {          if ( ! (TERMP_NOBREAK & p->flags)) {
                 putchar('\n');                  putchar('\n');

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.113

CVSweb