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

Diff for /mandoc/html.c between version 1.210 and 1.213

version 1.210, 2017/03/15 11:29:53 version 1.213, 2017/06/08 12:54:58
Line 609  print_otag(struct html *h, enum htmltag tag, const cha
Line 609  print_otag(struct html *h, enum htmltag tag, const cha
                         SCALE_VS_INIT(su, i);                          SCALE_VS_INIT(su, i);
                         break;                          break;
                 case 'w':                  case 'w':
                 case 'W':  
                         if ((arg2 = va_arg(ap, char *)) == NULL)                          if ((arg2 = va_arg(ap, char *)) == NULL)
                                 break;                                  break;
                         su = &mysu;                          su = &mysu;
                         a2width(arg2, su);                          a2width(arg2, su);
                         /* Increase width to make even bold text fit. */                          if (*fmt == '+') {
                         su->scale *= 1.1;                                  /* Increase to make even bold text fit. */
                         if (fmt[-1] == 'W')                                  su->scale *= 1.2;
                                   /* Add padding. */
                                   su->scale += 3.0;
                                   fmt++;
                           }
                           if (*fmt == '-') {
                                 su->scale *= -1.0;                                  su->scale *= -1.0;
                                   fmt++;
                           }
                         break;                          break;
                 default:                  default:
                         abort();                          abort();
Line 944  print_word(struct html *h, const char *cp)
Line 950  print_word(struct html *h, const char *cp)
 static void  static void
 a2width(const char *p, struct roffsu *su)  a2width(const char *p, struct roffsu *su)
 {  {
         if (a2roffsu(p, su, SCALE_MAX) < 2) {          const char      *end;
   
           end = a2roffsu(p, su, SCALE_MAX);
           if (end == NULL || *end != '\0') {
                 su->unit = SCALE_EN;                  su->unit = SCALE_EN;
                 su->scale = html_strlen(p);                  su->scale = html_strlen(p);
         } else if (su->scale < 0.0)          } else if (su->scale < 0.0)

Legend:
Removed from v.1.210  
changed lines
  Added in v.1.213

CVSweb