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

Diff for /mandoc/main.c between version 1.162 and 1.165

version 1.162, 2011/05/17 14:38:34 version 1.165, 2011/10/06 22:29:12
Line 44  typedef void  (*out_free)(void *);
Line 44  typedef void  (*out_free)(void *);
 enum    outt {  enum    outt {
         OUTT_ASCII = 0, /* -Tascii */          OUTT_ASCII = 0, /* -Tascii */
         OUTT_LOCALE,    /* -Tlocale */          OUTT_LOCALE,    /* -Tlocale */
           OUTT_UTF8,      /* -Tutf8 */
         OUTT_TREE,      /* -Ttree */          OUTT_TREE,      /* -Ttree */
           OUTT_MAN,       /* -Tman */
         OUTT_HTML,      /* -Thtml */          OUTT_HTML,      /* -Thtml */
         OUTT_XHTML,     /* -Txhtml */          OUTT_XHTML,     /* -Txhtml */
         OUTT_LINT,      /* -Tlint */          OUTT_LINT,      /* -Tlint */
Line 125  main(int argc, char *argv[])
Line 127  main(int argc, char *argv[])
   
         curp.mp = mparse_alloc(type, curp.wlevel, mmsg, &curp);          curp.mp = mparse_alloc(type, curp.wlevel, mmsg, &curp);
   
           /*
            * Conditionally start up the lookaside buffer before parsing.
            */
           if (OUTT_MAN == curp.outtype)
                   mparse_keep(curp.mp);
   
         argc -= optind;          argc -= optind;
         argv += optind;          argv += optind;
   
Line 213  parse(struct curparse *curp, int fd, 
Line 221  parse(struct curparse *curp, int fd, 
                         curp->outdata = html_alloc(curp->outopts);                          curp->outdata = html_alloc(curp->outopts);
                         curp->outfree = html_free;                          curp->outfree = html_free;
                         break;                          break;
                   case (OUTT_UTF8):
                           curp->outdata = utf8_alloc(curp->outopts);
                           curp->outfree = ascii_free;
                           break;
                 case (OUTT_LOCALE):                  case (OUTT_LOCALE):
                         curp->outdata = locale_alloc(curp->outopts);                          curp->outdata = locale_alloc(curp->outopts);
                         curp->outfree = ascii_free;                          curp->outfree = ascii_free;
Line 244  parse(struct curparse *curp, int fd, 
Line 256  parse(struct curparse *curp, int fd, 
                         curp->outman = tree_man;                          curp->outman = tree_man;
                         curp->outmdoc = tree_mdoc;                          curp->outmdoc = tree_mdoc;
                         break;                          break;
                   case (OUTT_MAN):
                           curp->outmdoc = man_mdoc;
                           curp->outman = man_man;
                           break;
                 case (OUTT_PDF):                  case (OUTT_PDF):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case (OUTT_ASCII):                  case (OUTT_ASCII):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                   case (OUTT_UTF8):
                           /* FALLTHROUGH */
                 case (OUTT_LOCALE):                  case (OUTT_LOCALE):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case (OUTT_PS):                  case (OUTT_PS):
Line 305  toptions(struct curparse *curp, char *arg)
Line 323  toptions(struct curparse *curp, char *arg)
                 curp->wlevel  = MANDOCLEVEL_WARNING;                  curp->wlevel  = MANDOCLEVEL_WARNING;
         } else if (0 == strcmp(arg, "tree"))          } else if (0 == strcmp(arg, "tree"))
                 curp->outtype = OUTT_TREE;                  curp->outtype = OUTT_TREE;
           else if (0 == strcmp(arg, "man"))
                   curp->outtype = OUTT_MAN;
         else if (0 == strcmp(arg, "html"))          else if (0 == strcmp(arg, "html"))
                 curp->outtype = OUTT_HTML;                  curp->outtype = OUTT_HTML;
           else if (0 == strcmp(arg, "utf8"))
                   curp->outtype = OUTT_UTF8;
         else if (0 == strcmp(arg, "locale"))          else if (0 == strcmp(arg, "locale"))
                 curp->outtype = OUTT_LOCALE;                  curp->outtype = OUTT_LOCALE;
         else if (0 == strcmp(arg, "xhtml"))          else if (0 == strcmp(arg, "xhtml"))

Legend:
Removed from v.1.162  
changed lines
  Added in v.1.165

CVSweb