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

Diff for /mandoc/mdoc_html.c between version 1.76 and 1.77

version 1.76, 2010/06/04 22:26:13 version 1.77, 2010/06/06 10:50:56
Line 1247  mdoc_d1_pre(MDOC_ARGS)
Line 1247  mdoc_d1_pre(MDOC_ARGS)
   
         /* FIXME: D1 shouldn't be literal. */          /* FIXME: D1 shouldn't be literal. */
   
         SCALE_VS_INIT(&su, INDENT - 1);          SCALE_VS_INIT(&su, INDENT - 2);
         bufcat_su(h, "margin-left", &su);          bufcat_su(h, "margin-left", &su);
         PAIR_CLASS_INIT(&tag[0], "lit");          PAIR_CLASS_INIT(&tag[0], "lit");
         PAIR_STYLE_INIT(&tag[1], h);          PAIR_STYLE_INIT(&tag[1], h);
Line 1563  mdoc_ft_pre(MDOC_ARGS)
Line 1563  mdoc_ft_pre(MDOC_ARGS)
 {  {
         struct htmlpair  tag;          struct htmlpair  tag;
   
         if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)          if (SEC_SYNOPSIS == n->sec && n->prev)
                 print_otag(h, TAG_DIV, 0, NULL);                  print_otag(h, TAG_BR, 0, NULL);
   
         PAIR_CLASS_INIT(&tag, "ftype");          PAIR_CLASS_INIT(&tag, "ftype");
         print_otag(h, TAG_SPAN, 1, &tag);          print_otag(h, TAG_SPAN, 1, &tag);
Line 1594  mdoc_fn_pre(MDOC_ARGS)
Line 1594  mdoc_fn_pre(MDOC_ARGS)
                         SCALE_VS_INIT(&su, 1);                          SCALE_VS_INIT(&su, 1);
                         bufcat_su(h, "margin-top", &su);                          bufcat_su(h, "margin-top", &su);
                 }                  }
                 if (n->next) {  
                         SCALE_VS_INIT(&su, 1);  
                         bufcat_su(h, "margin-bottom", &su);  
                 }  
                 PAIR_STYLE_INIT(&tag[0], h);                  PAIR_STYLE_INIT(&tag[0], h);
                 print_otag(h, TAG_DIV, 1, tag);                  print_otag(h, TAG_DIV, 1, tag);
         }          }
Line 1785  mdoc_mt_pre(MDOC_ARGS)
Line 1781  mdoc_mt_pre(MDOC_ARGS)
 static int  static int
 mdoc_fo_pre(MDOC_ARGS)  mdoc_fo_pre(MDOC_ARGS)
 {  {
         struct htmlpair tag;          struct htmlpair  tag;
         struct roffsu   su;          struct roffsu    su;
           struct tag      *t;
   
         if (MDOC_BODY == n->type) {          if (MDOC_BODY == n->type) {
                 h->flags |= HTML_NOSPACE;                  h->flags |= HTML_NOSPACE;
                 print_text(h, "(");                  print_text(h, "(");
                 h->flags |= HTML_NOSPACE;                  h->flags |= HTML_NOSPACE;
                 return(1);                  return(1);
         } else if (MDOC_BLOCK == n->type && n->next) {          } else if (MDOC_BLOCK == n->type) {
                   if (SEC_SYNOPSIS != n->sec)
                           return(1);
                   if (NULL == n->prev || MDOC_Ft == n->prev->tok) {
                           print_otag(h, TAG_DIV, 0, NULL);
                           return(1);
                   }
                 SCALE_VS_INIT(&su, 1);                  SCALE_VS_INIT(&su, 1);
                 bufcat_su(h, "margin-bottom", &su);                  bufcat_su(h, "margin-top", &su);
                 PAIR_STYLE_INIT(&tag, h);                  PAIR_STYLE_INIT(&tag, h);
                 print_otag(h, TAG_DIV, 1, &tag);                  print_otag(h, TAG_DIV, 1, &tag);
                 return(1);                  return(1);
         }          }
   
           /* XXX: we drop non-initial arguments as per groff. */
   
           assert(n->child);
           assert(n->child->string);
   
         PAIR_CLASS_INIT(&tag, "fname");          PAIR_CLASS_INIT(&tag, "fname");
         print_otag(h, TAG_SPAN, 1, &tag);          t = print_otag(h, TAG_SPAN, 1, &tag);
         return(1);          print_text(h, n->child->string);
           print_tagq(h, t);
           return(0);
 }  }
   
   

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

CVSweb