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

Diff for /mandoc/main.c between version 1.248 and 1.249

version 1.248, 2015/10/12 00:08:15 version 1.249, 2015/10/13 22:59:54
Line 77  enum outt {
Line 77  enum outt {
   
 struct  curparse {  struct  curparse {
         struct mparse    *mp;          struct mparse    *mp;
         struct mchars    *mchars;       /* character table */  
         enum mandoclevel  wlevel;       /* ignore messages below this */          enum mandoclevel  wlevel;       /* ignore messages below this */
         int               wstop;        /* stop after a file with a warning */          int               wstop;        /* stop after a file with a warning */
         enum outt         outtype;      /* which output to use */          enum outt         outtype;      /* which output to use */
Line 422  main(int argc, char *argv[])
Line 421  main(int argc, char *argv[])
         if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))          if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))
                 return (int)MANDOCLEVEL_BADARG;                  return (int)MANDOCLEVEL_BADARG;
   
         curp.mchars = mchars_alloc();          mchars_alloc();
         curp.mp = mparse_alloc(options, curp.wlevel, mmsg,          curp.mp = mparse_alloc(options, curp.wlevel, mmsg, defos);
             curp.mchars, defos);  
   
         /*          /*
          * Conditionally start up the lookaside buffer before parsing.           * Conditionally start up the lookaside buffer before parsing.
Line 478  main(int argc, char *argv[])
Line 476  main(int argc, char *argv[])
         if (curp.outfree)          if (curp.outfree)
                 (*curp.outfree)(curp.outdata);                  (*curp.outfree)(curp.outdata);
         mparse_free(curp.mp);          mparse_free(curp.mp);
         mchars_free(curp.mchars);          mchars_free();
   
 out:  out:
         if (search.argmode != ARG_FILE) {          if (search.argmode != ARG_FILE) {
Line 662  parse(struct curparse *curp, int fd, const char *file)
Line 660  parse(struct curparse *curp, int fd, const char *file)
         if ( ! (curp->outman && curp->outmdoc)) {          if ( ! (curp->outman && curp->outmdoc)) {
                 switch (curp->outtype) {                  switch (curp->outtype) {
                 case OUTT_HTML:                  case OUTT_HTML:
                         curp->outdata = html_alloc(curp->mchars,                          curp->outdata = html_alloc(curp->outopts);
                             curp->outopts);  
                         curp->outfree = html_free;                          curp->outfree = html_free;
                         break;                          break;
                 case OUTT_UTF8:                  case OUTT_UTF8:
                         curp->outdata = utf8_alloc(curp->mchars,                          curp->outdata = utf8_alloc(curp->outopts);
                             curp->outopts);  
                         curp->outfree = ascii_free;                          curp->outfree = ascii_free;
                         break;                          break;
                 case OUTT_LOCALE:                  case OUTT_LOCALE:
                         curp->outdata = locale_alloc(curp->mchars,                          curp->outdata = locale_alloc(curp->outopts);
                             curp->outopts);  
                         curp->outfree = ascii_free;                          curp->outfree = ascii_free;
                         break;                          break;
                 case OUTT_ASCII:                  case OUTT_ASCII:
                         curp->outdata = ascii_alloc(curp->mchars,                          curp->outdata = ascii_alloc(curp->outopts);
                             curp->outopts);  
                         curp->outfree = ascii_free;                          curp->outfree = ascii_free;
                         break;                          break;
                 case OUTT_PDF:                  case OUTT_PDF:
                         curp->outdata = pdf_alloc(curp->mchars,                          curp->outdata = pdf_alloc(curp->outopts);
                             curp->outopts);  
                         curp->outfree = pspdf_free;                          curp->outfree = pspdf_free;
                         break;                          break;
                 case OUTT_PS:                  case OUTT_PS:
                         curp->outdata = ps_alloc(curp->mchars,                          curp->outdata = ps_alloc(curp->outopts);
                             curp->outopts);  
                         curp->outfree = pspdf_free;                          curp->outfree = pspdf_free;
                         break;                          break;
                 default:                  default:

Legend:
Removed from v.1.248  
changed lines
  Added in v.1.249

CVSweb