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

Diff for /mandoc/eqn_html.c between version 1.1 and 1.2

version 1.1, 2011/07/23 22:57:13 version 1.2, 2011/07/24 10:09:03
Line 27 
Line 27 
 #include "out.h"  #include "out.h"
 #include "html.h"  #include "html.h"
   
   static  const enum htmltag fontmap[EQNFONT__MAX] = {
           TAG_SPAN, /* EQNFONT_NONE */
           TAG_SPAN, /* EQNFONT_ROMAN */
           TAG_B, /* EQNFONT_BOLD */
           TAG_B, /* EQNFONT_FAT */
           TAG_I /* EQNFONT_ITALIC */
   };
   
   
 static void     eqn_box(struct html *, const struct eqn_box *);  static void     eqn_box(struct html *, const struct eqn_box *);
 static void     eqn_box_post(struct html *, const struct eqn_box *);  
 static void     eqn_box_pre(struct html *, const struct eqn_box *);  
 static void     eqn_text(struct html *, const struct eqn_box *);  
   
 void  void
 print_eqn(struct html *p, const struct eqn *ep)  print_eqn(struct html *p, const struct eqn *ep)
Line 51  print_eqn(struct html *p, const struct eqn *ep)
Line 57  print_eqn(struct html *p, const struct eqn *ep)
 static void  static void
 eqn_box(struct html *p, const struct eqn_box *bp)  eqn_box(struct html *p, const struct eqn_box *bp)
 {  {
           struct tag      *t;
   
         eqn_box_pre(p, bp);          t = EQNFONT_NONE == bp->font ? NULL :
         eqn_text(p, bp);                  print_otag(p, fontmap[(int)bp->font], 0, NULL);
   
         if (bp->first)  
                 eqn_box(p, bp->first);  
   
         eqn_box_post(p, bp);  
   
         if (bp->next)  
                 eqn_box(p, bp->next);  
 }  
   
 static void  
 eqn_box_pre(struct html *p, const struct eqn_box *bp)  
 {  
   
         if (bp->left)          if (bp->left)
                 print_text(p, bp->left);                  print_text(p, bp->left);
 }  
           if (bp->text)
                   print_text(p, bp->text);
   
 static void          if (bp->first)
 eqn_box_post(struct html *p, const struct eqn_box *bp)                  eqn_box(p, bp->first);
 {  
   
           if (NULL != t)
                   print_tagq(p, t);
         if (bp->right)          if (bp->right)
                 print_text(p, bp->right);                  print_text(p, bp->right);
 }  
   
 static void          if (bp->next)
 eqn_text(struct html *p, const struct eqn_box *bp)                  eqn_box(p, bp->next);
 {  
   
         if (bp->text)  
                 print_text(p, bp->text);  
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb