[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.135 and 1.140

version 1.135, 2010/12/22 11:15:16 version 1.140, 2011/01/01 12:18:37
Line 422  print_mdoc_node(MDOC_ARGS)
Line 422  print_mdoc_node(MDOC_ARGS)
         case (MDOC_TEXT):          case (MDOC_TEXT):
                 print_text(h, n->string);                  print_text(h, n->string);
                 return;                  return;
           case (MDOC_TBL):
                   return;
         default:          default:
                 if (mdocs[n->tok].pre && ENDBODY_NOT == n->end)                  if (mdocs[n->tok].pre && ENDBODY_NOT == n->end)
                         child = (*mdocs[n->tok].pre)(m, n, h);                          child = (*mdocs[n->tok].pre)(m, n, h);
Line 839  mdoc_it_pre(MDOC_ARGS)
Line 841  mdoc_it_pre(MDOC_ARGS)
   
         assert(bl);          assert(bl);
   
         type = bl->norm->d.Bl.type;          type = bl->norm->Bl.type;
   
         assert(lists[type]);          assert(lists[type]);
         PAIR_CLASS_INIT(&tag[0], lists[type]);          PAIR_CLASS_INIT(&tag[0], lists[type]);
Line 865  mdoc_it_pre(MDOC_ARGS)
Line 867  mdoc_it_pre(MDOC_ARGS)
                 case(LIST_ohang):                  case(LIST_ohang):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case(LIST_tag):                  case(LIST_tag):
                         SCALE_VS_INIT(&su, ! bl->norm->d.Bl.comp);                          SCALE_VS_INIT(&su, ! bl->norm->Bl.comp);
                         bufcat_su(h, "margin-top", &su);                          bufcat_su(h, "margin-top", &su);
                         PAIR_STYLE_INIT(&tag[1], h);                          PAIR_STYLE_INIT(&tag[1], h);
                         print_otag(h, TAG_DT, 2, tag);                          print_otag(h, TAG_DT, 2, tag);
Line 890  mdoc_it_pre(MDOC_ARGS)
Line 892  mdoc_it_pre(MDOC_ARGS)
                 case(LIST_enum):                  case(LIST_enum):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case(LIST_item):                  case(LIST_item):
                         SCALE_VS_INIT(&su, ! bl->norm->d.Bl.comp);                          SCALE_VS_INIT(&su, ! bl->norm->Bl.comp);
                         bufcat_su(h, "margin-top", &su);                          bufcat_su(h, "margin-top", &su);
                         PAIR_STYLE_INIT(&tag[1], h);                          PAIR_STYLE_INIT(&tag[1], h);
                         print_otag(h, TAG_LI, 2, tag);                          print_otag(h, TAG_LI, 2, tag);
Line 904  mdoc_it_pre(MDOC_ARGS)
Line 906  mdoc_it_pre(MDOC_ARGS)
                 case(LIST_ohang):                  case(LIST_ohang):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case(LIST_tag):                  case(LIST_tag):
                         if (NULL == bl->norm->d.Bl.width) {                          if (NULL == bl->norm->Bl.width) {
                                 print_otag(h, TAG_DD, 1, tag);                                  print_otag(h, TAG_DD, 1, tag);
                                 break;                                  break;
                         }                          }
                         a2width(bl->norm->d.Bl.width, &su);                          a2width(bl->norm->Bl.width, &su);
                         bufcat_su(h, "margin-left", &su);                          bufcat_su(h, "margin-left", &su);
                         PAIR_STYLE_INIT(&tag[1], h);                          PAIR_STYLE_INIT(&tag[1], h);
                         print_otag(h, TAG_DD, 2, tag);                          print_otag(h, TAG_DD, 2, tag);
                         break;                          break;
                 case(LIST_column):                  case(LIST_column):
                         SCALE_VS_INIT(&su, ! bl->norm->d.Bl.comp);                          SCALE_VS_INIT(&su, ! bl->norm->Bl.comp);
                         bufcat_su(h, "margin-top", &su);                          bufcat_su(h, "margin-top", &su);
                         PAIR_STYLE_INIT(&tag[1], h);                          PAIR_STYLE_INIT(&tag[1], h);
                         print_otag(h, TAG_TD, 2, tag);                          print_otag(h, TAG_TD, 2, tag);
Line 945  mdoc_bl_pre(MDOC_ARGS)
Line 947  mdoc_bl_pre(MDOC_ARGS)
         char             buf[BUFSIZ];          char             buf[BUFSIZ];
   
         if (MDOC_BODY == n->type) {          if (MDOC_BODY == n->type) {
                 if (LIST_column == n->norm->d.Bl.type)                  if (LIST_column == n->norm->Bl.type)
                         print_otag(h, TAG_TBODY, 0, NULL);                          print_otag(h, TAG_TBODY, 0, NULL);
                 return(1);                  return(1);
         }          }
   
         if (MDOC_HEAD == n->type) {          if (MDOC_HEAD == n->type) {
                 if (LIST_column != n->norm->d.Bl.type)                  if (LIST_column != n->norm->Bl.type)
                         return(0);                          return(0);
   
                 /*                  /*
Line 961  mdoc_bl_pre(MDOC_ARGS)
Line 963  mdoc_bl_pre(MDOC_ARGS)
                  * screen and we want to preserve that behaviour.                   * screen and we want to preserve that behaviour.
                  */                   */
   
                 for (i = 0; i < n->norm->d.Bl.ncols; i++) {                  for (i = 0; i < n->norm->Bl.ncols; i++) {
                         a2width(n->norm->d.Bl.cols[i], &su);                          a2width(n->norm->Bl.cols[i], &su);
                         bufinit(h);                          bufinit(h);
                         if (i < n->norm->d.Bl.ncols - 1)                          if (i < n->norm->Bl.ncols - 1)
                                 bufcat_su(h, "width", &su);                                  bufcat_su(h, "width", &su);
                         else                          else
                                 bufcat_su(h, "min-width", &su);                                  bufcat_su(h, "min-width", &su);
Line 980  mdoc_bl_pre(MDOC_ARGS)
Line 982  mdoc_bl_pre(MDOC_ARGS)
         bufcat_su(h, "margin-bottom", &su);          bufcat_su(h, "margin-bottom", &su);
         PAIR_STYLE_INIT(&tag[0], h);          PAIR_STYLE_INIT(&tag[0], h);
   
         assert(lists[n->norm->d.Bl.type]);          assert(lists[n->norm->Bl.type]);
         strlcpy(buf, "list ", BUFSIZ);          strlcpy(buf, "list ", BUFSIZ);
         strlcat(buf, lists[n->norm->d.Bl.type], BUFSIZ);          strlcat(buf, lists[n->norm->Bl.type], BUFSIZ);
         PAIR_INIT(&tag[1], ATTR_CLASS, buf);          PAIR_INIT(&tag[1], ATTR_CLASS, buf);
   
         /* Set the block's left-hand margin. */          /* Set the block's left-hand margin. */
   
         if (n->norm->d.Bl.offs) {          if (n->norm->Bl.offs) {
                 a2offs(n->norm->d.Bl.offs, &su);                  a2offs(n->norm->Bl.offs, &su);
                 bufcat_su(h, "margin-left", &su);                  bufcat_su(h, "margin-left", &su);
         }          }
   
         switch (n->norm->d.Bl.type) {          switch (n->norm->Bl.type) {
         case(LIST_bullet):          case(LIST_bullet):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case(LIST_dash):          case(LIST_dash):
Line 1096  mdoc_d1_pre(MDOC_ARGS)
Line 1098  mdoc_d1_pre(MDOC_ARGS)
   
         /* BLOCKQUOTE needs a block body. */          /* BLOCKQUOTE needs a block body. */
   
           PAIR_CLASS_INIT(&tag[0], "display");
           print_otag(h, TAG_DIV, 1, tag);
   
         if (MDOC_Dl == n->tok) {          if (MDOC_Dl == n->tok) {
                 PAIR_CLASS_INIT(&tag[0], "lit display");                  PAIR_CLASS_INIT(&tag[0], "lit");
                 print_otag(h, TAG_CODE, 1, tag);                  print_otag(h, TAG_CODE, 1, tag);
         } else {          }
                 PAIR_CLASS_INIT(&tag[0], "display");  
                 print_otag(h, TAG_DIV, 1, tag);  
         }  
   
         return(1);          return(1);
 }  }
Line 1145  mdoc_bd_pre(MDOC_ARGS)
Line 1147  mdoc_bd_pre(MDOC_ARGS)
                 return(0);                  return(0);
   
         if (MDOC_BLOCK == n->type) {          if (MDOC_BLOCK == n->type) {
                 comp = n->norm->d.Bd.comp;                  comp = n->norm->Bd.comp;
                 for (nn = n; nn && ! comp; nn = nn->parent) {                  for (nn = n; nn && ! comp; nn = nn->parent) {
                         if (MDOC_BLOCK != nn->type)                          if (MDOC_BLOCK != nn->type)
                                 continue;                                  continue;
Line 1160  mdoc_bd_pre(MDOC_ARGS)
Line 1162  mdoc_bd_pre(MDOC_ARGS)
         }          }
   
         SCALE_HS_INIT(&su, 0);          SCALE_HS_INIT(&su, 0);
         if (n->norm->d.Bd.offs)          if (n->norm->Bd.offs)
                 a2offs(n->norm->d.Bd.offs, &su);                  a2offs(n->norm->Bd.offs, &su);
   
         bufcat_su(h, "margin-left", &su);          bufcat_su(h, "margin-left", &su);
         PAIR_STYLE_INIT(&tag[0], h);          PAIR_STYLE_INIT(&tag[0], h);
   
         if (DISP_unfilled != n->norm->d.Bd.type &&          if (DISP_unfilled != n->norm->Bd.type &&
                         DISP_literal != n->norm->d.Bd.type) {                          DISP_literal != n->norm->Bd.type) {
                 PAIR_CLASS_INIT(&tag[1], "display");                  PAIR_CLASS_INIT(&tag[1], "display");
                 print_otag(h, TAG_DIV, 2, tag);                  print_otag(h, TAG_DIV, 2, tag);
                 return(1);                  return(1);
Line 1597  mdoc_fo_pre(MDOC_ARGS)
Line 1599  mdoc_fo_pre(MDOC_ARGS)
         assert(n->child->string);          assert(n->child->string);
   
         PAIR_CLASS_INIT(&tag, "fname");          PAIR_CLASS_INIT(&tag, "fname");
         t = print_otag(h, TAG_SPAN, 1, &tag);          t = print_otag(h, TAG_B, 1, &tag);
         print_text(h, n->child->string);          print_text(h, n->child->string);
         print_tagq(h, t);          print_tagq(h, t);
         return(0);          return(0);
Line 1684  mdoc_rv_pre(MDOC_ARGS)
Line 1686  mdoc_rv_pre(MDOC_ARGS)
   
         for (nn = n->child; nn; nn = nn->next) {          for (nn = n->child; nn; nn = nn->next) {
                 PAIR_CLASS_INIT(&tag, "fname");                  PAIR_CLASS_INIT(&tag, "fname");
                 t = print_otag(h, TAG_SPAN, 1, &tag);                  t = print_otag(h, TAG_B, 1, &tag);
                 print_text(h, nn->string);                  print_text(h, nn->string);
                 print_tagq(h, t);                  print_tagq(h, t);
   
Line 1750  mdoc_bf_pre(MDOC_ARGS)
Line 1752  mdoc_bf_pre(MDOC_ARGS)
         else if (MDOC_BODY != n->type)          else if (MDOC_BODY != n->type)
                 return(1);                  return(1);
   
         if (FONT_Em == n->norm->d.Bf.font)          if (FONT_Em == n->norm->Bf.font)
                 PAIR_CLASS_INIT(&tag[0], "emph");                  PAIR_CLASS_INIT(&tag[0], "emph");
         else if (FONT_Sy == n->norm->d.Bf.font)          else if (FONT_Sy == n->norm->Bf.font)
                 PAIR_CLASS_INIT(&tag[0], "symb");                  PAIR_CLASS_INIT(&tag[0], "symb");
         else if (FONT_Li == n->norm->d.Bf.font)          else if (FONT_Li == n->norm->Bf.font)
                 PAIR_CLASS_INIT(&tag[0], "lit");                  PAIR_CLASS_INIT(&tag[0], "lit");
         else          else
                 PAIR_CLASS_INIT(&tag[0], "none");                  PAIR_CLASS_INIT(&tag[0], "none");
Line 1933  mdoc__x_pre(MDOC_ARGS)
Line 1935  mdoc__x_pre(MDOC_ARGS)
                 break;                  break;
         case(MDOC__T):          case(MDOC__T):
                 PAIR_CLASS_INIT(&tag[0], "ref-title");                  PAIR_CLASS_INIT(&tag[0], "ref-title");
                 t = TAG_U;  
                 break;                  break;
         case(MDOC__U):          case(MDOC__U):
                 PAIR_CLASS_INIT(&tag[0], "link-ref");                  PAIR_CLASS_INIT(&tag[0], "link-ref");

Legend:
Removed from v.1.135  
changed lines
  Added in v.1.140

CVSweb