[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.310 and 1.311

version 1.310, 2018/07/27 17:49:31 version 1.311, 2018/08/17 20:33:37
Line 42 
Line 42 
 #define MIN(a,b)        ((/*CONSTCOND*/(a)<(b))?(a):(b))  #define MIN(a,b)        ((/*CONSTCOND*/(a)<(b))?(a):(b))
 #endif  #endif
   
 struct  htmlmdoc {  struct  mdoc_html_act {
         int             (*pre)(MDOC_ARGS);          int             (*pre)(MDOC_ARGS);
         void            (*post)(MDOC_ARGS);          void            (*post)(MDOC_ARGS);
 };  };
Line 119  static int    mdoc_vt_pre(MDOC_ARGS);
Line 119  static int    mdoc_vt_pre(MDOC_ARGS);
 static  int               mdoc_xr_pre(MDOC_ARGS);  static  int               mdoc_xr_pre(MDOC_ARGS);
 static  int               mdoc_xx_pre(MDOC_ARGS);  static  int               mdoc_xx_pre(MDOC_ARGS);
   
 static  const struct htmlmdoc __mdocs[MDOC_MAX - MDOC_Dd] = {  static const struct mdoc_html_act mdoc_html_acts[MDOC_MAX - MDOC_Dd] = {
         {NULL, NULL}, /* Dd */          {NULL, NULL}, /* Dd */
         {NULL, NULL}, /* Dt */          {NULL, NULL}, /* Dt */
         {NULL, NULL}, /* Os */          {NULL, NULL}, /* Os */
Line 241  static const struct htmlmdoc __mdocs[MDOC_MAX - MDOC_D
Line 241  static const struct htmlmdoc __mdocs[MDOC_MAX - MDOC_D
         {mdoc__x_pre, mdoc__x_post}, /* %U */          {mdoc__x_pre, mdoc__x_post}, /* %U */
         {NULL, NULL}, /* Ta */          {NULL, NULL}, /* Ta */
 };  };
 static  const struct htmlmdoc *const mdocs = __mdocs - MDOC_Dd;  
   
   
 /*  /*
Line 402  print_mdoc_node(MDOC_ARGS)
Line 401  print_mdoc_node(MDOC_ARGS)
                         break;                          break;
                 }                  }
                 assert(n->tok >= MDOC_Dd && n->tok < MDOC_MAX);                  assert(n->tok >= MDOC_Dd && n->tok < MDOC_MAX);
                 if (mdocs[n->tok].pre != NULL &&                  if (mdoc_html_acts[n->tok - MDOC_Dd].pre != NULL &&
                     (n->end == ENDBODY_NOT || n->child != NULL))                      (n->end == ENDBODY_NOT || n->child != NULL))
                         child = (*mdocs[n->tok].pre)(meta, n, h);                          child = (*mdoc_html_acts[n->tok - MDOC_Dd].pre)(meta,
                               n, h);
                 break;                  break;
         }          }
   
Line 423  print_mdoc_node(MDOC_ARGS)
Line 423  print_mdoc_node(MDOC_ARGS)
                 break;                  break;
         default:          default:
                 if (n->tok < ROFF_MAX ||                  if (n->tok < ROFF_MAX ||
                     mdocs[n->tok].post == NULL ||                      mdoc_html_acts[n->tok - MDOC_Dd].post == NULL ||
                     n->flags & NODE_ENDED)                      n->flags & NODE_ENDED)
                         break;                          break;
                 (*mdocs[n->tok].post)(meta, n, h);                  (*mdoc_html_acts[n->tok - MDOC_Dd].post)(meta, n, h);
                 if (n->end != ENDBODY_NOT)                  if (n->end != ENDBODY_NOT)
                         n->body->flags |= NODE_ENDED;                          n->body->flags |= NODE_ENDED;
                 break;                  break;

Legend:
Removed from v.1.310  
changed lines
  Added in v.1.311

CVSweb