[BACK]Return to mdoc_html.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mdoc_html.c between version 1.60 and 1.61

version 1.60, 2011/09/18 10:25:28 version 1.61, 2011/09/18 15:54:48
Line 30 
Line 30 
 #include "main.h"  #include "main.h"
   
 #define INDENT           5  #define INDENT           5
 #define HALFINDENT       3  
   
 #define MDOC_ARGS         const struct mdoc_meta *m, \  #define MDOC_ARGS         const struct mdoc_meta *m, \
                           const struct mdoc_node *n, \                            const struct mdoc_node *n, \
Line 349 
Line 348 
                 SCALE_HS_INIT(su, INDENT);                  SCALE_HS_INIT(su, INDENT);
         else if (0 == strcmp(p, "indent-two"))          else if (0 == strcmp(p, "indent-two"))
                 SCALE_HS_INIT(su, INDENT * 2);                  SCALE_HS_INIT(su, INDENT * 2);
         else if ( ! a2roffsu(p, su, SCALE_MAX)) {          else if ( ! a2roffsu(p, su, SCALE_MAX))
                 su->unit = SCALE_BU;                  SCALE_HS_INIT(su, html_strlen(p));
                 su->scale = html_strlen(p);  
         }  
 }  }
   
   
Line 604 
Line 601 
   
         bufinit(h);          bufinit(h);
         bufcat(h, "x");          bufcat(h, "x");
         for (n = n->child; n; n = n->next) {  
           for (n = n->child; n && MDOC_TEXT == n->type; ) {
                 bufcat_id(h, n->string);                  bufcat_id(h, n->string);
                 if (n->next)                  if (NULL != (n = n->next))
                         bufcat_id(h, " ");                          bufcat_id(h, " ");
         }          }
   
         PAIR_ID_INIT(&tag, h->buf);          if (NULL == n) {
         print_otag(h, TAG_H1, 1, &tag);                  PAIR_ID_INIT(&tag, h->buf);
                   print_otag(h, TAG_H1, 1, &tag);
           } else
                   print_otag(h, TAG_H1, 0, NULL);
   
         return(1);          return(1);
 }  }
   
   
 /* ARGSUSED */  /* ARGSUSED */
 static int  static int
 mdoc_ss_pre(MDOC_ARGS)  mdoc_ss_pre(MDOC_ARGS)
Line 631 
Line 632 
   
         bufinit(h);          bufinit(h);
         bufcat(h, "x");          bufcat(h, "x");
         for (n = n->child; n; n = n->next) {  
           for (n = n->child; n && MDOC_TEXT == n->type; ) {
                 bufcat_id(h, n->string);                  bufcat_id(h, n->string);
                 if (n->next)                  if (NULL != (n = n->next))
                         bufcat_id(h, " ");                          bufcat_id(h, " ");
         }          }
   
         PAIR_ID_INIT(&tag, h->buf);          if (NULL == n) {
         print_otag(h, TAG_H2, 1, &tag);                  PAIR_ID_INIT(&tag, h->buf);
                   print_otag(h, TAG_H2, 1, &tag);
           } else
                   print_otag(h, TAG_H2, 0, NULL);
   
         return(1);          return(1);
 }  }
   
Line 1167 
Line 1173 
   
         bufinit(h);          bufinit(h);
         bufcat(h, "#x");          bufcat(h, "#x");
         for (n = n->child; n; n = n->next) {  
           for (n = n->child; n; ) {
                 bufcat_id(h, n->string);                  bufcat_id(h, n->string);
                 if (n->next)                  if (NULL != (n = n->next))
                         bufcat_id(h, " ");                          bufcat_id(h, " ");
         }          }
   
Line 1980 
Line 1987 
         struct htmlpair tag;          struct htmlpair tag;
   
         PAIR_CLASS_INIT(&tag, "lit");          PAIR_CLASS_INIT(&tag, "lit");
         print_otag(h, TAG_SPAN, 1, &tag);          print_otag(h, TAG_CODE, 1, &tag);
         return(1);          return(1);
 }  }
   
Line 2208 
Line 2215 
                 print_text(h, "(");                  print_text(h, "(");
                 break;                  break;
         case (MDOC_Ql):          case (MDOC_Ql):
                 /* FALLTHROUGH */                  print_text(h, "\\(oq");
                   h->flags |= HTML_NOSPACE;
                   PAIR_CLASS_INIT(&tag, "lit");
                   print_otag(h, TAG_CODE, 1, &tag);
                   break;
         case (MDOC_So):          case (MDOC_So):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_Sq):          case (MDOC_Sq):

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61