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

Diff for /mandoc/Attic/macro.c between version 1.22 and 1.23

version 1.22, 2009/01/05 16:11:14 version 1.23, 2009/01/05 17:57:08
Line 107  static int
Line 107  static int
 rewind_expblock(struct mdoc *mdoc, int ppos, int tok, int tt)  rewind_expblock(struct mdoc *mdoc, int ppos, int tok, int tt)
 {  {
         struct mdoc_node *n;          struct mdoc_node *n;
           int               t;
   
         assert(mdoc->last);          assert(mdoc->last);
   
Line 114  rewind_expblock(struct mdoc *mdoc, int ppos, int tok, 
Line 115  rewind_expblock(struct mdoc *mdoc, int ppos, int tok, 
         for (n = mdoc->last->parent; n; n = n->parent) {          for (n = mdoc->last->parent; n; n = n->parent) {
                 if (MDOC_BLOCK != n->type)                  if (MDOC_BLOCK != n->type)
                         continue;                          continue;
                 if (tt == n->data.block.tok)                  if (tt == (t = n->data.block.tok))
                         break;                          break;
                 if (MDOC_NESTED & mdoc_macros[n->data.block.tok].flags)                  if (MDOC_NESTED & mdoc_macros[t].flags)
                         continue;                          continue;
                 return(mdoc_err(mdoc, tok, ppos, ERR_SCOPE_BREAK));                  return(mdoc_err(mdoc, tok, ppos, ERR_SCOPE_BREAK));
         }          }
Line 147  rewind_impblock(struct mdoc *mdoc, int ppos, int tok)
Line 148  rewind_impblock(struct mdoc *mdoc, int ppos, int tok)
                         break;                          break;
                 if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags))                  if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags))
                         continue;                          continue;
                   if (MDOC_NESTED & mdoc_macros[tok].flags)
                           return(1);
                 return(mdoc_err(mdoc, tok, ppos, ERR_SCOPE_BREAK));                  return(mdoc_err(mdoc, tok, ppos, ERR_SCOPE_BREAK));
         }          }
   
         mdoc->last = n ? n : mdoc->last;          if (NULL == n)
                   return(1);
   
         mdoc->next = MDOC_NEXT_SIBLING;          mdoc->next = MDOC_NEXT_SIBLING;
           mdoc->last = n;
         if ( ! mdoc_valid_post(mdoc, tok, ppos))          if ( ! mdoc_valid_post(mdoc, tok, ppos))
                 return(0);                  return(0);
         return(mdoc_action(mdoc, tok, ppos));          return(mdoc_action(mdoc, tok, ppos));
Line 215  macro_close_explicit(MACRO_PROT_ARGS)
Line 221  macro_close_explicit(MACRO_PROT_ARGS)
         case (MDOC_El):          case (MDOC_El):
                 tt = MDOC_Bl;                  tt = MDOC_Bl;
                 break;                  break;
         case (MDOC_Fo):          case (MDOC_Fc):
                 tt = MDOC_Fc;                  tt = MDOC_Fo;
                 break;                  break;
         case (MDOC_Oc):          case (MDOC_Oc):
                 tt = MDOC_Oo;                  tt = MDOC_Oo;
Line 425  macro_scoped(MACRO_PROT_ARGS)
Line 431  macro_scoped(MACRO_PROT_ARGS)
   
         assert ( ! (MDOC_CALLABLE & mdoc_macros[tok].flags));          assert ( ! (MDOC_CALLABLE & mdoc_macros[tok].flags));
   
         if ( ! (MDOC_EXPLICIT & mdoc_macros[tok].flags) &&          if ( ! (MDOC_EXPLICIT & mdoc_macros[tok].flags))
                         ! (MDOC_NESTED & mdoc_macros[tok].flags))  
                 if ( ! rewind_impblock(mdoc, ppos, tok))                  if ( ! rewind_impblock(mdoc, ppos, tok))
                         return(0);                          return(0);
   

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

CVSweb