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

Diff for /mandoc/read.c between version 1.149 and 1.150

version 1.149, 2016/07/10 13:34:30 version 1.150, 2016/07/19 16:22:52
Line 291  choose_parser(struct mparse *curp)
Line 291  choose_parser(struct mparse *curp)
                 }                  }
         }          }
   
         if (curp->man == NULL) {  
                 curp->man = roff_man_alloc(curp->roff, curp, curp->defos,  
                     curp->options & MPARSE_QUICK ? 1 : 0);  
                 curp->man->macroset = MACROSET_MAN;  
                 curp->man->first->tok = TOKEN_NONE;  
         }  
   
         if (format == MPARSE_MDOC) {          if (format == MPARSE_MDOC) {
                 mdoc_hash_init();                  mdoc_hash_init();
                 curp->man->macroset = MACROSET_MDOC;                  curp->man->macroset = MACROSET_MDOC;
Line 562  rerun:
Line 555  rerun:
                         break;                          break;
                 }                  }
   
                 /*                  if (curp->man->macroset == MACROSET_NONE)
                  * If input parsers have not been allocated, do so now.  
                  * We keep these instanced between parsers, but set them  
                  * locally per parse routine since we can use different  
                  * parsers with each one.  
                  */  
   
                 if (curp->man == NULL ||  
                     curp->man->macroset == MACROSET_NONE)  
                         choose_parser(curp);                          choose_parser(curp);
   
                 /*                  /*
Line 683  read_whole_file(struct mparse *curp, const char *file,
Line 668  read_whole_file(struct mparse *curp, const char *file,
 static void  static void
 mparse_end(struct mparse *curp)  mparse_end(struct mparse *curp)
 {  {
   
         if (curp->man == NULL && curp->sodest == NULL)  
                 curp->man = roff_man_alloc(curp->roff, curp, curp->defos,  
                     curp->options & MPARSE_QUICK ? 1 : 0);  
         if (curp->man->macroset == MACROSET_NONE)          if (curp->man->macroset == MACROSET_NONE)
                 curp->man->macroset = MACROSET_MAN;                  curp->man->macroset = MACROSET_MAN;
         if (curp->man->macroset == MACROSET_MDOC)          if (curp->man->macroset == MACROSET_MDOC)
Line 842  mparse_alloc(int options, enum mandoclevel wlevel, man
Line 823  mparse_alloc(int options, enum mandoclevel wlevel, man
 void  void
 mparse_reset(struct mparse *curp)  mparse_reset(struct mparse *curp)
 {  {
   
         roff_reset(curp->roff);          roff_reset(curp->roff);
           roff_man_reset(curp->man);
         if (curp->man != NULL)  
                 roff_man_reset(curp->man);  
         if (curp->secondary)          if (curp->secondary)
                 curp->secondary->sz = 0;                  curp->secondary->sz = 0;
   

Legend:
Removed from v.1.149  
changed lines
  Added in v.1.150

CVSweb