[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.231 and 1.232

version 1.231, 2015/04/18 16:06:40 version 1.232, 2015/04/18 17:53:21
Line 48  struct htmlmdoc {
Line 48  struct htmlmdoc {
         void            (*post)(MDOC_ARGS);          void            (*post)(MDOC_ARGS);
 };  };
   
 static  void              print_mdoc(MDOC_ARGS);  
 static  void              print_mdoc_head(MDOC_ARGS);  static  void              print_mdoc_head(MDOC_ARGS);
 static  void              print_mdoc_node(MDOC_ARGS);  static  void              print_mdoc_node(MDOC_ARGS);
 static  void              print_mdoc_nodelist(MDOC_ARGS);  static  void              print_mdoc_nodelist(MDOC_ARGS);
Line 264  static const char * const lists[LIST_MAX] = {
Line 263  static const char * const lists[LIST_MAX] = {
 };  };
   
   
 void  
 html_mdoc(void *arg, const struct roff_man *mdoc)  
 {  
   
         print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc)->child,  
             (struct html *)arg);  
         putchar('\n');  
 }  
   
 /*  /*
  * Calculate the scaling unit passed in a `-width' argument.  This uses   * Calculate the scaling unit passed in a `-width' argument.  This uses
  * either a native scaling unit (e.g., 1i, 2m) or the string length of   * either a native scaling unit (e.g., 1i, 2m) or the string length of
Line 331  synopsis_pre(struct html *h, const struct roff_node *n
Line 321  synopsis_pre(struct html *h, const struct roff_node *n
         }          }
 }  }
   
 static void  void
 print_mdoc(MDOC_ARGS)  html_mdoc(void *arg, const struct roff_man *mdoc)
 {  {
         struct tag      *t, *tt;  
         struct htmlpair  tag;          struct htmlpair  tag;
           struct html     *h;
           struct tag      *t, *tt;
   
         PAIR_CLASS_INIT(&tag, "mandoc");          PAIR_CLASS_INIT(&tag, "mandoc");
           h = (struct html *)arg;
   
         if ( ! (HTML_FRAGMENT & h->oflags)) {          if ( ! (HTML_FRAGMENT & h->oflags)) {
                 print_gen_decls(h);                  print_gen_decls(h);
                 t = print_otag(h, TAG_HTML, 0, NULL);                  t = print_otag(h, TAG_HTML, 0, NULL);
                 tt = print_otag(h, TAG_HEAD, 0, NULL);                  tt = print_otag(h, TAG_HEAD, 0, NULL);
                 print_mdoc_head(meta, n, h);                  print_mdoc_head(&mdoc->meta, mdoc->first->child, h);
                 print_tagq(h, tt);                  print_tagq(h, tt);
                 print_otag(h, TAG_BODY, 0, NULL);                  print_otag(h, TAG_BODY, 0, NULL);
                 print_otag(h, TAG_DIV, 1, &tag);                  print_otag(h, TAG_DIV, 1, &tag);
         } else          } else
                 t = print_otag(h, TAG_DIV, 1, &tag);                  t = print_otag(h, TAG_DIV, 1, &tag);
   
         mdoc_root_pre(meta, n, h);          mdoc_root_pre(&mdoc->meta, mdoc->first->child, h);
         print_mdoc_nodelist(meta, n, h);          print_mdoc_nodelist(&mdoc->meta, mdoc->first->child, h);
         mdoc_root_post(meta, n, h);          mdoc_root_post(&mdoc->meta, mdoc->first->child, h);
         print_tagq(h, t);          print_tagq(h, t);
           putchar('\n');
 }  }
   
 static void  static void

Legend:
Removed from v.1.231  
changed lines
  Added in v.1.232

CVSweb