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

Diff for /mandoc/man_html.c between version 1.125 and 1.129

version 1.125, 2017/01/19 01:00:14 version 1.129, 2017/01/21 01:20:32
Line 148  html_man(void *arg, const struct roff_man *man)
Line 148  html_man(void *arg, const struct roff_man *man)
 {  {
         struct mhtml     mh;          struct mhtml     mh;
         struct html     *h;          struct html     *h;
         struct tag      *t, *tt;          struct tag      *t;
   
         memset(&mh, 0, sizeof(mh));          memset(&mh, 0, sizeof(mh));
         h = (struct html *)arg;          h = (struct html *)arg;
   
         if ( ! (HTML_FRAGMENT & h->oflags)) {          if ((h->oflags & HTML_FRAGMENT) == 0) {
                 print_gen_decls(h);                  print_gen_decls(h);
                 t = print_otag(h, TAG_HTML, "");                  print_otag(h, TAG_HTML, "");
                 tt = print_otag(h, TAG_HEAD, "");                  t = print_otag(h, TAG_HEAD, "");
                 print_man_head(&man->meta, man->first, &mh, h);                  print_man_head(&man->meta, man->first, &mh, h);
                 print_tagq(h, tt);                  print_tagq(h, t);
                 print_otag(h, TAG_BODY, "");                  print_otag(h, TAG_BODY, "");
                 print_otag(h, TAG_DIV, "c", "mandoc");          }
         } else  
                 t = print_otag(h, TAG_DIV, "c", "mandoc");  
   
         print_man_nodelist(&man->meta, man->first, &mh, h);          man_root_pre(&man->meta, man->first, &mh, h);
           t = print_otag(h, TAG_DIV, "c", "manual-text");
           print_man_nodelist(&man->meta, man->first->child, &mh, h);
         print_tagq(h, t);          print_tagq(h, t);
           man_root_post(&man->meta, man->first, &mh, h);
           print_tagq(h, NULL);
 }  }
   
 static void  static void
Line 200  print_man_node(MAN_ARGS)
Line 202  print_man_node(MAN_ARGS)
         t = h->tags.head;          t = h->tags.head;
   
         switch (n->type) {          switch (n->type) {
         case ROFFT_ROOT:  
                 man_root_pre(man, n, mh, h);  
                 break;  
         case ROFFT_TEXT:          case ROFFT_TEXT:
                 if ('\0' == *n->string) {                  if ('\0' == *n->string) {
                         print_paragraph(h);                          print_paragraph(h);
Line 256  print_man_node(MAN_ARGS)
Line 255  print_man_node(MAN_ARGS)
         print_stagq(h, t);          print_stagq(h, t);
   
         switch (n->type) {          switch (n->type) {
         case ROFFT_ROOT:  
                 man_root_post(man, n, mh, h);  
                 break;  
         case ROFFT_EQN:          case ROFFT_EQN:
                 break;                  break;
         default:          default:
Line 355  man_SH_pre(MAN_ARGS)
Line 351  man_SH_pre(MAN_ARGS)
 {  {
         if (n->type == ROFFT_BLOCK) {          if (n->type == ROFFT_BLOCK) {
                 mh->fl &= ~MANH_LITERAL;                  mh->fl &= ~MANH_LITERAL;
                 print_otag(h, TAG_DIV, "c", "section");  
                 return 1;                  return 1;
         } else if (n->type == ROFFT_BODY)          } else if (n->type == ROFFT_BODY)
                 return 1;                  return 1;
   
         print_otag(h, TAG_H1, "");          print_otag(h, TAG_H1, "c", "Sh");
         return 1;          return 1;
 }  }
   
Line 434  man_SS_pre(MAN_ARGS)
Line 429  man_SS_pre(MAN_ARGS)
 {  {
         if (n->type == ROFFT_BLOCK) {          if (n->type == ROFFT_BLOCK) {
                 mh->fl &= ~MANH_LITERAL;                  mh->fl &= ~MANH_LITERAL;
                 print_otag(h, TAG_DIV, "c", "subsection");  
                 return 1;                  return 1;
         } else if (n->type == ROFFT_BODY)          } else if (n->type == ROFFT_BODY)
                 return 1;                  return 1;
   
         print_otag(h, TAG_H2, "");          print_otag(h, TAG_H2, "c", "Ss");
         return 1;          return 1;
 }  }
   
Line 461  man_IP_pre(MAN_ARGS)
Line 455  man_IP_pre(MAN_ARGS)
         const struct roff_node  *nn;          const struct roff_node  *nn;
   
         if (n->type == ROFFT_BODY) {          if (n->type == ROFFT_BODY) {
                 print_otag(h, TAG_DD, "");                  print_otag(h, TAG_DD, "c", "It-tag");
                 return 1;                  return 1;
         } else if (n->type != ROFFT_HEAD) {          } else if (n->type != ROFFT_HEAD) {
                 print_otag(h, TAG_DL, "");                  print_otag(h, TAG_DL, "c", "Bl-tag");
                 return 1;                  return 1;
         }          }
   
         /* FIXME: width specification. */          /* FIXME: width specification. */
   
         print_otag(h, TAG_DT, "");          print_otag(h, TAG_DT, "c", "It-tag");
   
         /* For IP, only print the first header element. */          /* For IP, only print the first header element. */
   
Line 512  man_HP_pre(MAN_ARGS)
Line 506  man_HP_pre(MAN_ARGS)
         sui.scale = -sum.scale;          sui.scale = -sum.scale;
   
         print_bvspace(h, n);          print_bvspace(h, n);
         print_otag(h, TAG_DIV, "csului", "spacer", &sum, &sui);          print_otag(h, TAG_DIV, "csului", "Pp", &sum, &sui);
         return 1;          return 1;
 }  }
   
Line 523  man_OP_pre(MAN_ARGS)
Line 517  man_OP_pre(MAN_ARGS)
   
         print_text(h, "[");          print_text(h, "[");
         h->flags |= HTML_NOSPACE;          h->flags |= HTML_NOSPACE;
         tt = print_otag(h, TAG_SPAN, "c", "opt");          tt = print_otag(h, TAG_SPAN, "c", "Op");
   
         if (NULL != (n = n->child)) {          if (NULL != (n = n->child)) {
                 print_otag(h, TAG_B, "");                  print_otag(h, TAG_B, "");
Line 609  man_UR_pre(MAN_ARGS)
Line 603  man_UR_pre(MAN_ARGS)
         assert(n->type == ROFFT_HEAD);          assert(n->type == ROFFT_HEAD);
         if (n->child != NULL) {          if (n->child != NULL) {
                 assert(n->child->type == ROFFT_TEXT);                  assert(n->child->type == ROFFT_TEXT);
                 print_otag(h, TAG_A, "ch", "link-ext", n->child->string);                  print_otag(h, TAG_A, "ch", "Lk", n->child->string);
         }          }
   
         assert(n->next->type == ROFFT_BODY);          assert(n->next->type == ROFFT_BODY);

Legend:
Removed from v.1.125  
changed lines
  Added in v.1.129

CVSweb