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

Diff for /mandoc/term.c between version 1.251 and 1.253

version 1.251, 2015/09/26 00:54:04 version 1.253, 2015/10/12 00:08:16
Line 474  term_word(struct termp *p, const char *word)
Line 474  term_word(struct termp *p, const char *word)
                         term_fontrepl(p, TERMFONT_BI);                          term_fontrepl(p, TERMFONT_BI);
                         continue;                          continue;
                 case ESCAPE_FONT:                  case ESCAPE_FONT:
                         /* FALLTHROUGH */  
                 case ESCAPE_FONTROMAN:                  case ESCAPE_FONTROMAN:
                         term_fontrepl(p, TERMFONT_NONE);                          term_fontrepl(p, TERMFONT_NONE);
                         continue;                          continue;
Line 644  size_t
Line 643  size_t
 term_len(const struct termp *p, size_t sz)  term_len(const struct termp *p, size_t sz)
 {  {
   
         return((*p->width)(p, ' ') * sz);          return (*p->width)(p, ' ') * sz;
 }  }
   
 static size_t  static size_t
Line 653  cond_width(const struct termp *p, int c, int *skip)
Line 652  cond_width(const struct termp *p, int c, int *skip)
   
         if (*skip) {          if (*skip) {
                 (*skip) = 0;                  (*skip) = 0;
                 return(0);                  return 0;
         } else          } else
                 return((*p->width)(p, c));                  return (*p->width)(p, c);
 }  }
   
 size_t  size_t
Line 771  term_strlen(const struct termp *p, const char *cp)
Line 770  term_strlen(const struct termp *p, const char *cp)
                 case ASCII_HYPH:                  case ASCII_HYPH:
                         sz += cond_width(p, '-', &skip);                          sz += cond_width(p, '-', &skip);
                         cp++;                          cp++;
                         /* FALLTHROUGH */  
                 case ASCII_BREAK:  
                         break;                          break;
                 default:                  default:
                         break;                          break;
                 }                  }
         }          }
   
         return(sz);          return sz;
 }  }
   
 int  int
Line 811  term_vspan(const struct termp *p, const struct roffsu 
Line 808  term_vspan(const struct termp *p, const struct roffsu 
                 r = su->scale / 12.0;                  r = su->scale / 12.0;
                 break;                  break;
         case SCALE_EN:          case SCALE_EN:
                 /* FALLTHROUGH */  
         case SCALE_EM:          case SCALE_EM:
                 r = su->scale * 0.6;                  r = su->scale * 0.6;
                 break;                  break;
Line 822  term_vspan(const struct termp *p, const struct roffsu 
Line 818  term_vspan(const struct termp *p, const struct roffsu 
                 abort();                  abort();
         }          }
         ri = r > 0.0 ? r + 0.4995 : r - 0.4995;          ri = r > 0.0 ? r + 0.4995 : r - 0.4995;
         return(ri < 66 ? ri : 1);          return ri < 66 ? ri : 1;
 }  }
   
 /*  /*
Line 832  int
Line 828  int
 term_hspan(const struct termp *p, const struct roffsu *su)  term_hspan(const struct termp *p, const struct roffsu *su)
 {  {
   
         return((*p->hspan)(p, su));          return (*p->hspan)(p, su);
 }  }

Legend:
Removed from v.1.251  
changed lines
  Added in v.1.253

CVSweb