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

Diff for /mandoc/read.c between version 1.163 and 1.164

version 1.163, 2017/03/07 20:00:08 version 1.164, 2017/04/29 12:45:42
Line 293  choose_parser(struct mparse *curp)
Line 293  choose_parser(struct mparse *curp)
         }          }
   
         if (format == MPARSE_MDOC) {          if (format == MPARSE_MDOC) {
                 mdoc_hash_init();  
                 curp->man->macroset = MACROSET_MDOC;                  curp->man->macroset = MACROSET_MDOC;
                 curp->man->first->tok = TOKEN_NONE;                  if (curp->man->mdocmac == NULL)
                           curp->man->mdocmac = roffhash_alloc(MDOC_Dd, MDOC_MAX);
         } else {          } else {
                 man_hash_init();  
                 curp->man->macroset = MACROSET_MAN;                  curp->man->macroset = MACROSET_MAN;
                 curp->man->first->tok = TOKEN_NONE;                  if (curp->man->manmac == NULL)
                           curp->man->manmac = roffhash_alloc(MAN_TH, MAN_MAX);
         }          }
           curp->man->first->tok = TOKEN_NONE;
 }  }
   
 /*  /*
Line 818  mparse_alloc(int options, enum mandoclevel wlevel, man
Line 819  mparse_alloc(int options, enum mandoclevel wlevel, man
         curp->man = roff_man_alloc( curp->roff, curp, curp->defos,          curp->man = roff_man_alloc( curp->roff, curp, curp->defos,
                 curp->options & MPARSE_QUICK ? 1 : 0);                  curp->options & MPARSE_QUICK ? 1 : 0);
         if (curp->options & MPARSE_MDOC) {          if (curp->options & MPARSE_MDOC) {
                 mdoc_hash_init();  
                 curp->man->macroset = MACROSET_MDOC;                  curp->man->macroset = MACROSET_MDOC;
                   if (curp->man->mdocmac == NULL)
                           curp->man->mdocmac = roffhash_alloc(MDOC_Dd, MDOC_MAX);
         } else if (curp->options & MPARSE_MAN) {          } else if (curp->options & MPARSE_MAN) {
                 man_hash_init();  
                 curp->man->macroset = MACROSET_MAN;                  curp->man->macroset = MACROSET_MAN;
                   if (curp->man->manmac == NULL)
                           curp->man->manmac = roffhash_alloc(MAN_TH, MAN_MAX);
         }          }
         curp->man->first->tok = TOKEN_NONE;          curp->man->first->tok = TOKEN_NONE;
         return curp;          return curp;
Line 848  void
Line 851  void
 mparse_free(struct mparse *curp)  mparse_free(struct mparse *curp)
 {  {
   
           roffhash_free(curp->man->mdocmac);
           roffhash_free(curp->man->manmac);
         roff_man_free(curp->man);          roff_man_free(curp->man);
         roff_free(curp->roff);          roff_free(curp->roff);
         if (curp->secondary)          if (curp->secondary)

Legend:
Removed from v.1.163  
changed lines
  Added in v.1.164

CVSweb