[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.133 and 1.137

version 1.133, 2017/02/05 18:15:39 version 1.137, 2017/05/04 17:48:28
Line 71  static int    man_in_pre(MAN_ARGS);
Line 71  static int    man_in_pre(MAN_ARGS);
 static  void              man_root_post(MAN_ARGS);  static  void              man_root_post(MAN_ARGS);
 static  void              man_root_pre(MAN_ARGS);  static  void              man_root_pre(MAN_ARGS);
   
 static  const struct htmlman mans[MAN_MAX] = {  static  const struct htmlman __mans[MAN_MAX - MAN_TH] = {
         { man_br_pre, NULL }, /* br */  
         { NULL, NULL }, /* TH */          { NULL, NULL }, /* TH */
         { man_SH_pre, NULL }, /* SH */          { man_SH_pre, NULL }, /* SH */
         { man_SS_pre, NULL }, /* SS */          { man_SS_pre, NULL }, /* SS */
Line 111  static const struct htmlman mans[MAN_MAX] = {
Line 110  static const struct htmlman mans[MAN_MAX] = {
         { NULL, NULL }, /* UE */          { NULL, NULL }, /* UE */
         { man_ign_pre, NULL }, /* ll */          { man_ign_pre, NULL }, /* ll */
 };  };
   static  const struct htmlman *const mans = __mans - MAN_TH;
   
   
 /*  /*
Line 304  print_man_node(MAN_ARGS)
Line 304  print_man_node(MAN_ARGS)
                         print_tblclose(h);                          print_tblclose(h);
   
                 t = h->tag;                  t = h->tag;
                   if (n->tok < ROFF_MAX) {
                           switch(n->tok) {
                           case ROFF_br:
                                   man_br_pre(man, n, h);
                                   break;
                           default:
                                   abort();
                           }
                           break;
                   }
   
                   assert(n->tok >= MAN_TH && n->tok < MAN_MAX);
                 if (mans[n->tok].pre)                  if (mans[n->tok].pre)
                         child = (*mans[n->tok].pre)(man, n, h);                          child = (*mans[n->tok].pre)(man, n, h);
   
Line 435  man_br_pre(MAN_ARGS)
Line 447  man_br_pre(MAN_ARGS)
 static int  static int
 man_SH_pre(MAN_ARGS)  man_SH_pre(MAN_ARGS)
 {  {
         if (n->type == ROFFT_HEAD)          char    *id;
                 print_otag(h, TAG_H1, "c", "Sh");  
           if (n->type == ROFFT_HEAD) {
                   id = html_make_id(n);
                   print_otag(h, TAG_H1, "cTi", "Sh", id);
                   if (id != NULL)
                           print_otag(h, TAG_A, "chR", "selflink", id);
                   free(id);
           }
         return 1;          return 1;
 }  }
   
Line 498  man_SM_pre(MAN_ARGS)
Line 517  man_SM_pre(MAN_ARGS)
 static int  static int
 man_SS_pre(MAN_ARGS)  man_SS_pre(MAN_ARGS)
 {  {
         if (n->type == ROFFT_HEAD)          char    *id;
                 print_otag(h, TAG_H2, "c", "Ss");  
           if (n->type == ROFFT_HEAD) {
                   id = html_make_id(n);
                   print_otag(h, TAG_H2, "cTi", "Ss", id);
                   if (id != NULL)
                           print_otag(h, TAG_A, "chR", "selflink", id);
                   free(id);
           }
         return 1;          return 1;
 }  }
   
Line 656  man_UR_pre(MAN_ARGS)
Line 682  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", "Lk", n->child->string);                  print_otag(h, TAG_A, "cTh", "Lk", n->child->string);
         }          }
   
         assert(n->next->type == ROFFT_BODY);          assert(n->next->type == ROFFT_BODY);

Legend:
Removed from v.1.133  
changed lines
  Added in v.1.137

CVSweb