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

Diff for /mandoc/html.c between version 1.52 and 1.53

version 1.52, 2009/09/24 09:50:31 version 1.53, 2009/10/03 15:08:09
Line 83  void *
Line 83  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] = NULL;
   
         if (NULL == (h = calloc(1, sizeof(struct html))))          if (NULL == (h = calloc(1, sizeof(struct html))))
Line 100  html_alloc(char *outopts)
Line 100  html_alloc(char *outopts)
                 return(NULL);                  return(NULL);
         }          }
   
           h->base_man = "%N.%S.html";
   
         while (outopts && *outopts)          while (outopts && *outopts)
                 switch (getsubopt(&outopts, toks, &v)) {                  switch (getsubopt(&outopts, toks, &v)) {
                 case (0):                  case (0):
                         h->style = v;                          h->style = v;
                         break;                          break;
                 case (1):                  case (1):
                         h->base = v;                          h->base_man = v;
                         break;                          break;
                 default:                  default:
                         break;                          break;
Line 137  html_free(void *p)
Line 139  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 170  print_gen_head(struct html *h)
Line 175  print_gen_head(struct html *h)
                 tag[3].key = ATTR_MEDIA;                  tag[3].key = ATTR_MEDIA;
                 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);  
         }          }
 }  }
   

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

CVSweb