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

Diff for /mandoc/term.c between version 1.75 and 1.77

version 1.75, 2009/06/10 20:18:44 version 1.77, 2009/06/11 07:46:41
Line 106  term_alloc(enum termenc enc)
Line 106  term_alloc(enum termenc enc)
         if (NULL == (p = malloc(sizeof(struct termp))))          if (NULL == (p = malloc(sizeof(struct termp))))
                 err(1, "malloc");                  err(1, "malloc");
         bzero(p, sizeof(struct termp));          bzero(p, sizeof(struct termp));
         p->maxrmargin = 78;          p->maxrmargin = 80;
         p->enc = enc;          p->enc = enc;
         return(p);          return(p);
 }  }
Line 278  term_flushln(struct termp *p)
Line 278  term_flushln(struct termp *p)
                  * our breakpoint.                   * our breakpoint.
                  */                   */
   
                   if (0 < vis++)
                           putchar(' ');
   
                 for ( ; i < (int)p->col; i++) {                  for ( ; i < (int)p->col; i++) {
                         if (' ' == p->buf[i])                          if (' ' == p->buf[i])
                                 break;                                  break;
                         putchar(p->buf[i]);                          putchar(p->buf[i]);
                 }                  }
                 vis += vsz;                  vis += vsz;
                 if (i < (int)p->col && vis <= bp) {  
                         putchar(' ');  
                         vis++;  
                 }  
         }          }
   
         /*          /*
Line 312  term_flushln(struct termp *p)
Line 311  term_flushln(struct termp *p)
   
         if (p->flags & TERMP_NOBREAK) {          if (p->flags & TERMP_NOBREAK) {
                 if ( ! (TERMP_NONOBREAK & p->flags))                  if ( ! (TERMP_NONOBREAK & p->flags))
                         for ( ; vis < maxvis; vis++)                          for ( ; vis <= maxvis; vis++)
                                 putchar(' ');                                  putchar(' ');
         } else          } else
                 putchar('\n');                  putchar('\n');

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.77

CVSweb