[BACK]Return to term.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/term.c between version 1.30 and 1.31

version 1.30, 2010/04/23 00:23:47 version 1.31, 2010/05/14 19:52:43
Line 163 
Line 163 
                  * beginning of a line, one between words -- but do not                   * beginning of a line, one between words -- but do not
                  * actually write them yet.                   * actually write them yet.
                  */                   */
                 vbl = (size_t)(ASCII_EOS == p->buf[i] ? 2 :                  vbl = (size_t)(0 == vis ? 0 : 1);
                                 (0 == vis ? 0 : 1));  
                 vis += vbl;                  vis += vbl;
                 vend = vis;                  vend = vis;
   
Line 195 
Line 194 
                                 break;                                  break;
                         else if (8 == p->buf[j])                          else if (8 == p->buf[j])
                                 vend--;                                  vend--;
                         else if (ASCII_EOS != p->buf[j]) {                          else {
                                 if (vend > vis && vend < bp &&                                  if (vend > vis && vend < bp &&
                                     '-' == p->buf[j])                                      '-' == p->buf[j])
                                         jhy = j;                                          jhy = j;
Line 204 
Line 203 
                 }                  }
   
                 /*                  /*
                  * Skip empty words.  This happens due to the ASCII_EOS  
                  * after the end of the final sentence of a paragraph.  
                  */  
                 if (vend == vis && j == (int)p->col)  
                         break;  
   
                 /*  
                  * Usually, indent the first line of each paragraph.                   * Usually, indent the first line of each paragraph.
                  */                   */
                 if (0 == i && ! (p->flags & TERMP_NOLPAD)) {                  if (0 == i && ! (p->flags & TERMP_NOLPAD)) {
Line 268 
Line 260 
                         }                          }
                         if (ASCII_NBRSP == p->buf[i])                          if (ASCII_NBRSP == p->buf[i])
                                 putchar(' ');                                  putchar(' ');
                         else if (ASCII_EOS != p->buf[i])                          else
                                 putchar(p->buf[i]);                                  putchar(p->buf[i]);
                 }                  }
                 p->viscol += vend - vis;                  p->viscol += vend - vis;
Line 487 
Line 479 
                         break;                          break;
                 }                  }
   
         if ( ! (TERMP_NOSPACE & p->flags))          if ( ! (TERMP_NOSPACE & p->flags)) {
                 bufferc(p, ' ');                  bufferc(p, ' ');
                   if (TERMP_SENTENCE & p->flags)
                           bufferc(p, ' ');
           }
   
         if ( ! (p->flags & TERMP_NONOSPACE))          if ( ! (p->flags & TERMP_NONOSPACE))
                 p->flags &= ~TERMP_NOSPACE;                  p->flags &= ~TERMP_NOSPACE;
   
           p->flags &= ~TERMP_SENTENCE;
   
         /* FIXME: use strcspn. */          /* FIXME: use strcspn. */
   
         while (*word) {          while (*word) {
Line 533 
Line 530 
                         p->flags |= TERMP_NOSPACE;                          p->flags |= TERMP_NOSPACE;
         }          }
   
           /*
            * Note that we don't process the pipe: the parser sees it as
            * punctuation, but we don't in terms of typography.
            */
         if (sv[0] && 0 == sv[1])          if (sv[0] && 0 == sv[1])
                 switch (sv[0]) {                  switch (sv[0]) {
                 case('('):                  case('('):

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31