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

Diff for /mandoc/html.c between version 1.185 and 1.186

version 1.185, 2015/01/21 20:33:25 version 1.186, 2015/03/27 21:33:20
Line 7 
Line 7 
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies.   * copyright notice and this permission notice appear in all copies.
  *   *
  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES   * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF   * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR   * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES   * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
Line 32 
Line 32 
 #include "mandoc_aux.h"  #include "mandoc_aux.h"
 #include "out.h"  #include "out.h"
 #include "html.h"  #include "html.h"
   #include "manconf.h"
 #include "main.h"  #include "main.h"
   
 struct  htmldata {  struct  htmldata {
Line 129  static void  print_attr(struct html *, const char *, c
Line 130  static void  print_attr(struct html *, const char *, c
   
   
 void *  void *
 html_alloc(const struct mchars *mchars, char *outopts)  html_alloc(const struct mchars *mchars, const struct manoutput *outopts)
 {  {
         struct html     *h;          struct html     *h;
         const char      *toks[5];  
         char            *v;  
   
         toks[0] = "style";  
         toks[1] = "man";  
         toks[2] = "includes";  
         toks[3] = "fragment";  
         toks[4] = NULL;  
   
         h = mandoc_calloc(1, sizeof(struct html));          h = mandoc_calloc(1, sizeof(struct html));
   
         h->tags.head = NULL;          h->tags.head = NULL;
         h->symtab = mchars;          h->symtab = mchars;
   
         while (outopts && *outopts)          h->style = outopts->style;
                 switch (getsubopt(&outopts, UNCONST(toks), &v)) {          h->base_man = outopts->man;
                 case 0:          h->base_includes = outopts->includes;
                         h->style = v;          if (outopts->fragment)
                         break;                  h->oflags |= HTML_FRAGMENT;
                 case 1:  
                         h->base_man = v;  
                         break;  
                 case 2:  
                         h->base_includes = v;  
                         break;  
                 case 3:  
                         h->oflags |= HTML_FRAGMENT;  
                         break;  
                 default:  
                         break;  
                 }  
   
         return(h);          return(h);
 }  }

Legend:
Removed from v.1.185  
changed lines
  Added in v.1.186

CVSweb