[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.53

version 1.51, 2009/09/21 14:56:56 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 171  print_gen_head(struct html *h)
Line 176  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 423  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.53

CVSweb