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

Diff for /mandoc/html.c between version 1.48 and 1.50

version 1.48, 2009/09/21 14:07:07 version 1.50, 2009/09/21 14:40:31
Line 167  static void    print_mdoc(MDOC_ARGS);
Line 167  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);
 static  void              print_man(MAN_ARGS);  
 static  void              print_man_head(MAN_ARGS);  
 static  struct tag       *print_otag(struct html *, enum htmltag,  static  struct tag       *print_otag(struct html *, enum htmltag,
                                 int, const struct htmlpair *);                                  int, const struct htmlpair *);
 static  void              print_tagq(struct html *, const struct tag *);  static  void              print_tagq(struct html *, const struct tag *);
Line 386  html_mdoc(void *arg, const struct mdoc *m)
Line 384  html_mdoc(void *arg, const struct mdoc *m)
 }  }
   
   
   /* ARGSUSED */
 void  void
 html_man(void *arg, const struct man *m)  html_man(void *arg, const struct man *m)
 {  {
         struct html     *h;  
         struct tag      *t;  
   
         h = (struct html *)arg;  
   
         print_gen_doctype(h);  
         t = print_otag(h, TAG_HTML, 0, NULL);  
         print_man(man_meta(m), man_node(m), h);  
         print_tagq(h, t);  
   
         printf("\n");  
 }  }
   
   
Line 616  print_gen_head(struct html *h)
Line 604  print_gen_head(struct html *h)
 static void  static void
 print_mdoc_head(MDOC_ARGS)  print_mdoc_head(MDOC_ARGS)
 {  {
           char            b[BUFSIZ];
   
         print_gen_head(h);          print_gen_head(h);
   
           (void)snprintf(b, BUFSIZ - 1,
                           "%s(%d)", m->title, m->msec);
   
           if (m->arch) {
                   (void)strlcat(b, " (", BUFSIZ);
                   (void)strlcat(b, m->arch, BUFSIZ);
                   (void)strlcat(b, ")", BUFSIZ);
           }
   
         print_otag(h, TAG_TITLE, 0, NULL);          print_otag(h, TAG_TITLE, 0, NULL);
         print_text(h, m->title);          print_text(h, b);
 }  }
   
   
Line 679  print_mdoc_node(MDOC_ARGS)
Line 678  print_mdoc_node(MDOC_ARGS)
   
   
 static void  static void
 print_man(MAN_ARGS)  
 {  
         struct tag      *t;  
   
         t = print_otag(h, TAG_HEAD, 0, NULL);  
         print_man_head(m, n, h);  
         print_tagq(h, t);  
   
         t = print_otag(h, TAG_BODY, 0, NULL);  
         /*print_man_body(m, n, h);*/  
         print_tagq(h, t);  
 }  
   
   
 /* ARGSUSED */  
 static void  
 print_man_head(MAN_ARGS)  
 {  
   
         print_gen_head(h);  
         print_otag(h, TAG_TITLE, 0, NULL);  
         print_text(h, m->title);  
 }  
   
   
 static void  
 print_spec(struct html *h, const char *p, int len)  print_spec(struct html *h, const char *p, int len)
 {  {
         const char      *rhs;          const char      *rhs;
Line 2168  mdoc_sp_pre(MDOC_ARGS)
Line 2141  mdoc_sp_pre(MDOC_ARGS)
         int             len;          int             len;
         struct htmlpair tag;          struct htmlpair tag;
   
         if (MDOC_sp == n->tok)          switch (n->tok) {
           case (MDOC_sp):
                 len = n->child ? atoi(n->child->string) : 1;                  len = n->child ? atoi(n->child->string) : 1;
         else                  break;
           case (MDOC_br):
                   len = 0;
                   break;
           default:
                 len = 1;                  len = 1;
                   break;
           }
   
         buffmt("height: %dem", len);          buffmt("height: %dem", len);
   
         tag.key = ATTR_STYLE;          tag.key = ATTR_STYLE;
         tag.val = buf;          tag.val = buf;
         print_otag(h, TAG_DIV, 1, &tag);          print_otag(h, TAG_DIV, 1, &tag);

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.50

CVSweb