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

Diff for /mandoc/html.c between version 1.151 and 1.152

version 1.151, 2012/05/31 22:29:13 version 1.152, 2013/08/08 20:07:47
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 235  print_metaf(struct html *h, enum mandoc_esc deco)
Line 235  print_metaf(struct html *h, enum mandoc_esc deco)
         case (ESCAPE_FONTBOLD):          case (ESCAPE_FONTBOLD):
                 font = HTMLFONT_BOLD;                  font = HTMLFONT_BOLD;
                 break;                  break;
           case (ESCAPE_FONTBI):
                   font = HTMLFONT_BI;
                   break;
         case (ESCAPE_FONT):          case (ESCAPE_FONT):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (ESCAPE_FONTROMAN):          case (ESCAPE_FONTROMAN):
Line 253  print_metaf(struct html *h, enum mandoc_esc deco)
Line 256  print_metaf(struct html *h, enum mandoc_esc deco)
         h->metal = h->metac;          h->metal = h->metac;
         h->metac = font;          h->metac = font;
   
         if (HTMLFONT_NONE != font)          switch (font) {
                 h->metaf = HTMLFONT_BOLD == font ?          case (HTMLFONT_ITALIC):
                         print_otag(h, TAG_B, 0, NULL) :                  h->metaf = print_otag(h, TAG_I, 0, NULL);
                         print_otag(h, TAG_I, 0, NULL);                  break;
           case (HTMLFONT_BOLD):
                   h->metaf = print_otag(h, TAG_B, 0, NULL);
                   break;
           case (HTMLFONT_BI):
                   h->metaf = print_otag(h, TAG_B, 0, NULL);
                   print_otag(h, TAG_I, 0, NULL);
                   break;
           default:
                   break;
           }
 }  }
   
 int  int
Line 367  print_encode(struct html *h, const char *p, int norecu
Line 380  print_encode(struct html *h, const char *p, int norecu
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case (ESCAPE_FONTITALIC):                  case (ESCAPE_FONTITALIC):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                   case (ESCAPE_FONTBI):
                           /* FALLTHROUGH */
                 case (ESCAPE_FONTROMAN):                  case (ESCAPE_FONTROMAN):
                         if (0 == norecurse)                          if (0 == norecurse)
                                 print_metaf(h, esc);                                  print_metaf(h, esc);
Line 544  print_text(struct html *h, const char *word)
Line 559  print_text(struct html *h, const char *word)
         }          }
   
         assert(NULL == h->metaf);          assert(NULL == h->metaf);
         if (HTMLFONT_NONE != h->metac)          switch (h->metac) {
                 h->metaf = HTMLFONT_BOLD == h->metac ?          case (HTMLFONT_ITALIC):
                         print_otag(h, TAG_B, 0, NULL) :                  h->metaf = print_otag(h, TAG_I, 0, NULL);
                         print_otag(h, TAG_I, 0, NULL);                  break;
           case (HTMLFONT_BOLD):
                   h->metaf = print_otag(h, TAG_B, 0, NULL);
                   break;
           case (HTMLFONT_BI):
                   h->metaf = print_otag(h, TAG_B, 0, NULL);
                   print_otag(h, TAG_I, 0, NULL);
                   break;
           default:
                   break;
           }
   
         assert(word);          assert(word);
         if ( ! print_encode(h, word, 0)) {          if ( ! print_encode(h, word, 0)) {

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.152

CVSweb