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

Diff for /mandoc/html.c between version 1.51 and 1.54

version 1.51, 2009/09/21 14:56:56 version 1.54, 2009/10/03 15:26:26
Line 73  static const char  *const htmlattrs[ATTR_MAX] = {
Line 73  static const char  *const htmlattrs[ATTR_MAX] = {
         "style",          "style",
         "width",          "width",
         "valign",          "valign",
           "target",
 };  };
   
 #ifdef __linux__  #ifdef __linux__
Line 83  void *
Line 84  void *
 html_alloc(char *outopts)  html_alloc(char *outopts)
 {  {
         struct html     *h;          struct html     *h;
         char            *toks[3], *v;          char            *toks[4], *v;
   
         toks[0] = "style";          toks[0] = "style";
         toks[1] = "base";          toks[1] = "man";
         toks[2] = NULL;          toks[2] = "includes";
           toks[3] = NULL;
   
         if (NULL == (h = calloc(1, sizeof(struct html))))          if (NULL == (h = calloc(1, sizeof(struct html))))
                 return(NULL);                  return(NULL);
Line 106  html_alloc(char *outopts)
Line 108  html_alloc(char *outopts)
                         h->style = v;                          h->style = v;
                         break;                          break;
                 case (1):                  case (1):
                         h->base = v;                          h->base_man = v;
                         break;                          break;
                   case (2):
                           h->base_includes = v;
                           break;
                 default:                  default:
                         break;                          break;
                 }                  }
Line 137  html_free(void *p)
Line 142  html_free(void *p)
                 free(tag);                  free(tag);
         }          }
   
           if (h->buf)
                   free(h->buf);
         if (h->symtab)          if (h->symtab)
                 chars_free(h->symtab);                  chars_free(h->symtab);
   
         free(h);          free(h);
 }  }
   
Line 171  print_gen_head(struct html *h)
Line 179  print_gen_head(struct html *h)
                 tag[3].val = "all";                  tag[3].val = "all";
                 print_otag(h, TAG_LINK, 4, tag);                  print_otag(h, TAG_LINK, 4, tag);
         }          }
   
         if (h->base) {  
                 tag[0].key = ATTR_HREF;  
                 tag[1].val = h->base;  
                 print_otag(h, TAG_BASE, 1, tag);  
         }  
 }  }
   
   
Line 424  print_text(struct html *h, const char *p)
Line 426  print_text(struct html *h, const char *p)
                 case(']'):                  case(']'):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case('}'):                  case('}'):
                         h->flags |= HTML_NOSPACE;                          if ( ! (HTML_IGNDELIM & h->flags))
                                   h->flags |= HTML_NOSPACE;
                         break;                          break;
                 default:                  default:
                         break;                          break;

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.54

CVSweb