[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.115 and 1.116

version 1.115, 2010/12/15 14:52:16 version 1.116, 2010/12/15 15:32:01
Line 246  static const struct htmlmdoc mdocs[MDOC_MAX] = {
Line 246  static const struct htmlmdoc mdocs[MDOC_MAX] = {
   
 static  const char * const lists[LIST_MAX] = {  static  const char * const lists[LIST_MAX] = {
         NULL,          NULL,
         "list-bullet",          "list-bul",
         "list-column",          "list-col",
         "list-dash",          "list-dash",
         "list-diag",          "list-diag",
         "list-enum",          "list-enum",
         "list-hang",          "list-hang",
         "list-hyphen",          "list-hyph",
         "list-inset",          "list-inset",
         "list-item",          "list-item",
         "list-ohang",          "list-ohang",
Line 903  mdoc_it_pre(MDOC_ARGS)
Line 903  mdoc_it_pre(MDOC_ARGS)
 {  {
         struct roffsu    su;          struct roffsu    su;
         enum mdoc_list   type;          enum mdoc_list   type;
         struct htmlpair  tag;          struct htmlpair  tag[2];
         const struct mdoc_node *bl;          const struct mdoc_node *bl;
   
         bl = n->parent;          bl = n->parent;
Line 914  mdoc_it_pre(MDOC_ARGS)
Line 914  mdoc_it_pre(MDOC_ARGS)
   
         type = bl->data.Bl->type;          type = bl->data.Bl->type;
   
         /* Whether we're top-padded (not "compact"). */          assert(lists[type]);
           PAIR_CLASS_INIT(&tag[0], lists[type]);
   
         SCALE_VS_INIT(&su, ! bl->data.Bl->comp);          SCALE_VS_INIT(&su, ! bl->data.Bl->comp);
         bufcat_su(h, "margin-top", &su);          bufcat_su(h, "margin-top", &su);
         PAIR_STYLE_INIT(&tag, h);          PAIR_STYLE_INIT(&tag[1], h);
   
         if (MDOC_HEAD == n->type) {          if (MDOC_HEAD == n->type) {
                 switch (type) {                  switch (type) {
Line 941  mdoc_it_pre(MDOC_ARGS)
Line 942  mdoc_it_pre(MDOC_ARGS)
                 case(LIST_ohang):                  case(LIST_ohang):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case(LIST_tag):                  case(LIST_tag):
                         print_otag(h, TAG_DT, 1, &tag);                          print_otag(h, TAG_DT, 2, tag);
                         break;                          break;
                 case(LIST_column):                  case(LIST_column):
                         break;                          break;
Line 960  mdoc_it_pre(MDOC_ARGS)
Line 961  mdoc_it_pre(MDOC_ARGS)
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case(LIST_item):                  case(LIST_item):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                         print_otag(h, TAG_LI, 1, &tag);                          print_otag(h, TAG_LI, 2, tag);
                         break;                          break;
                 case(LIST_diag):                  case(LIST_diag):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
Line 971  mdoc_it_pre(MDOC_ARGS)
Line 972  mdoc_it_pre(MDOC_ARGS)
                 case(LIST_ohang):                  case(LIST_ohang):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case(LIST_tag):                  case(LIST_tag):
                         print_otag(h, TAG_DD, 0, NULL);                          print_otag(h, TAG_DD, 1, tag);
                         break;                          break;
                 case(LIST_column):                  case(LIST_column):
                         print_otag(h, TAG_TD, 1, &tag);                          print_otag(h, TAG_TD, 2, tag);
                         break;                          break;
                 default:                  default:
                         break;                          break;
Line 982  mdoc_it_pre(MDOC_ARGS)
Line 983  mdoc_it_pre(MDOC_ARGS)
         } else {          } else {
                 switch (type) {                  switch (type) {
                 case (LIST_column):                  case (LIST_column):
                         print_otag(h, TAG_TR, 0, NULL);                          print_otag(h, TAG_TR, 1, tag);
                         break;                          break;
                 default:                  default:
                         break;                          break;

Legend:
Removed from v.1.115  
changed lines
  Added in v.1.116

CVSweb