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

Diff for /mandoc/mdoc.c between version 1.220 and 1.221

version 1.220, 2014/07/09 11:31:43 version 1.221, 2014/07/30 21:18:24
Line 104  const struct mdoc_node *
Line 104  const struct mdoc_node *
 mdoc_node(const struct mdoc *mdoc)  mdoc_node(const struct mdoc *mdoc)
 {  {
   
         assert( ! (MDOC_HALT & mdoc->flags));  
         return(mdoc->first);          return(mdoc->first);
 }  }
   
Line 112  const struct mdoc_meta *
Line 111  const struct mdoc_meta *
 mdoc_meta(const struct mdoc *mdoc)  mdoc_meta(const struct mdoc *mdoc)
 {  {
   
         assert( ! (MDOC_HALT & mdoc->flags));  
         return(&mdoc->meta);          return(&mdoc->meta);
 }  }
   
Line 205  mdoc_alloc(struct roff *roff, struct mparse *parse,
Line 203  mdoc_alloc(struct roff *roff, struct mparse *parse,
         return(p);          return(p);
 }  }
   
 /*  
  * Climb back up the parse tree, validating open scopes.  Mostly calls  
  * through to macro_end() in macro.c.  
  */  
 int  int
 mdoc_endparse(struct mdoc *mdoc)  mdoc_endparse(struct mdoc *mdoc)
 {  {
   
         assert( ! (MDOC_HALT & mdoc->flags));          return(mdoc_macroend(mdoc));
         if (mdoc_macroend(mdoc))  
                 return(1);  
         mdoc->flags |= MDOC_HALT;  
         return(0);  
 }  }
   
 int  int
Line 225  mdoc_addeqn(struct mdoc *mdoc, const struct eqn *ep)
Line 215  mdoc_addeqn(struct mdoc *mdoc, const struct eqn *ep)
 {  {
         struct mdoc_node *n;          struct mdoc_node *n;
   
         assert( ! (MDOC_HALT & mdoc->flags));  
   
         n = node_alloc(mdoc, ep->ln, ep->pos, MDOC_MAX, MDOC_EQN);          n = node_alloc(mdoc, ep->ln, ep->pos, MDOC_MAX, MDOC_EQN);
         n->eqn = ep;          n->eqn = ep;
   
Line 242  mdoc_addspan(struct mdoc *mdoc, const struct tbl_span 
Line 230  mdoc_addspan(struct mdoc *mdoc, const struct tbl_span 
 {  {
         struct mdoc_node *n;          struct mdoc_node *n;
   
         assert( ! (MDOC_HALT & mdoc->flags));  
   
         n = node_alloc(mdoc, sp->line, 0, MDOC_MAX, MDOC_TBL);          n = node_alloc(mdoc, sp->line, 0, MDOC_MAX, MDOC_TBL);
         n->span = sp;          n->span = sp;
   
Line 262  int
Line 248  int
 mdoc_parseln(struct mdoc *mdoc, int ln, char *buf, int offs)  mdoc_parseln(struct mdoc *mdoc, int ln, char *buf, int offs)
 {  {
   
         assert( ! (MDOC_HALT & mdoc->flags));  
   
         mdoc->flags |= MDOC_NEWLINE;          mdoc->flags |= MDOC_NEWLINE;
   
         /*          /*
Line 883  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
Line 867  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
          * into macro processing.           * into macro processing.
          */           */
   
         if (NULL == mdoc->last || MDOC_It == tok || MDOC_El == tok) {          if (NULL == mdoc->last || MDOC_It == tok || MDOC_El == tok)
                 if ( ! mdoc_macro(mdoc, tok, ln, sv, &offs, buf))                  return(mdoc_macro(mdoc, tok, ln, sv, &offs, buf));
                         goto err;  
                 return(1);  
         }  
   
         n = mdoc->last;          n = mdoc->last;
         assert(mdoc->last);          assert(mdoc->last);
Line 900  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
Line 881  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
         if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&          if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&
             LIST_column == n->norm->Bl.type) {              LIST_column == n->norm->Bl.type) {
                 mdoc->flags |= MDOC_FREECOL;                  mdoc->flags |= MDOC_FREECOL;
                 if ( ! mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf))                  return(mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf));
                         goto err;  
                 return(1);  
         }          }
   
         /*          /*
Line 916  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
Line 895  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
             MDOC_Bl == n->parent->tok &&              MDOC_Bl == n->parent->tok &&
             LIST_column == n->parent->norm->Bl.type) {              LIST_column == n->parent->norm->Bl.type) {
                 mdoc->flags |= MDOC_FREECOL;                  mdoc->flags |= MDOC_FREECOL;
                 if ( ! mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf))                  return(mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf));
                         goto err;  
                 return(1);  
         }          }
   
         /* Normal processing of a macro. */          /* Normal processing of a macro. */
   
         if ( ! mdoc_macro(mdoc, tok, ln, sv, &offs, buf))          if ( ! mdoc_macro(mdoc, tok, ln, sv, &offs, buf))
                 goto err;                  return(0);
   
         /* In quick mode (for mandocdb), abort after the NAME section. */          /* In quick mode (for mandocdb), abort after the NAME section. */
   
Line 933  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
Line 910  mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int 
                 return(2);                  return(2);
   
         return(1);          return(1);
   
 err:    /* Error out. */  
   
         mdoc->flags |= MDOC_HALT;  
         return(0);  
 }  }
   
 enum mdelim  enum mdelim

Legend:
Removed from v.1.220  
changed lines
  Added in v.1.221

CVSweb