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

Diff for /mandoc/mdoc_macro.c between version 1.136 and 1.138

version 1.136, 2014/07/04 16:12:08 version 1.138, 2014/07/30 17:06:26
Line 234  mdoc_macroend(struct mdoc *mdoc)
Line 234  mdoc_macroend(struct mdoc *mdoc)
         for ( ; n; n = n->parent)          for ( ; n; n = n->parent)
                 if (MDOC_BLOCK == n->type &&                  if (MDOC_BLOCK == n->type &&
                     MDOC_EXPLICIT & mdoc_macros[n->tok].flags)                      MDOC_EXPLICIT & mdoc_macros[n->tok].flags)
                         mdoc_nmsg(mdoc, n, MANDOCERR_SCOPEEXIT);                          mandoc_msg(MANDOCERR_BLK_NOEND, mdoc->parse,
                               n->line, n->pos, mdoc_macronames[n->tok]);
   
         /* Rewind to the first. */          /* Rewind to the first. */
   
Line 423  rew_dohalt(enum mdoct tok, enum mdoc_type type,
Line 424  rew_dohalt(enum mdoct tok, enum mdoc_type type,
                         return(REWIND_NONE);                          return(REWIND_NONE);
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case MDOC_Sh:          case MDOC_Sh:
                   if (MDOC_ROOT == p->parent->type)
                           return(REWIND_THIS);
                 if (MDOC_Nd == p->tok || MDOC_Ss == p->tok ||                  if (MDOC_Nd == p->tok || MDOC_Ss == p->tok ||
                     MDOC_Sh == p->tok)                      MDOC_Sh == p->tok)
                         return(REWIND_MORE);                          return(REWIND_MORE);
Line 528  make_pending(struct mdoc_node *broken, enum mdoct tok,
Line 531  make_pending(struct mdoc_node *broken, enum mdoct tok,
                         taker->pending = broken->pending;                          taker->pending = broken->pending;
                 }                  }
                 broken->pending = breaker;                  broken->pending = breaker;
                 mandoc_vmsg(MANDOCERR_BLOCK_NEST, mdoc->parse, line, ppos,                  mandoc_vmsg(MANDOCERR_BLK_NEST, mdoc->parse, line, ppos,
                     "%s breaks %s", mdoc_macronames[tok],                      "%s breaks %s", mdoc_macronames[tok],
                     mdoc_macronames[broken->tok]);                      mdoc_macronames[broken->tok]);
                 return(1);                  return(1);
Line 558  rew_sub(enum mdoc_type t, struct mdoc *mdoc,
Line 561  rew_sub(enum mdoc_type t, struct mdoc *mdoc,
                              ! (MDOC_EXPLICIT & mdoc_macros[tok].flags));                               ! (MDOC_EXPLICIT & mdoc_macros[tok].flags));
                         break;                          break;
                 case REWIND_FORCE:                  case REWIND_FORCE:
                         mandoc_vmsg(MANDOCERR_SCOPEBROKEN, mdoc->parse,                          mandoc_vmsg(MANDOCERR_BLK_BROKEN, mdoc->parse,
                             line, ppos, "%s breaks %s",                              line, ppos, "%s breaks %s",
                             mdoc_macronames[tok],                              mdoc_macronames[tok],
                             mdoc_macronames[n->tok]);                              mdoc_macronames[n->tok]);
Line 574  rew_sub(enum mdoc_type t, struct mdoc *mdoc,
Line 577  rew_sub(enum mdoc_type t, struct mdoc *mdoc,
                                 return(1);                                  return(1);
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case REWIND_ERROR:                  case REWIND_ERROR:
                         mdoc_pmsg(mdoc, line, ppos, MANDOCERR_NOSCOPE);                          mandoc_msg(MANDOCERR_BLK_NOTOPEN,
                               mdoc->parse, line, ppos,
                               mdoc_macronames[tok]);
                         return(1);                          return(1);
                 }                  }
                 break;                  break;
Line 1032  blk_full(MACRO_PROT_ARGS)
Line 1037  blk_full(MACRO_PROT_ARGS)
   
         nl = MDOC_NEWLINE & mdoc->flags;          nl = MDOC_NEWLINE & mdoc->flags;
   
           /* Skip items outside lists. */
   
           if (tok == MDOC_It) {
                   for (n = mdoc->last; n; n = n->parent)
                           if (n->tok == MDOC_Bl)
                                   break;
                   if (n == NULL) {
                           mandoc_vmsg(MANDOCERR_IT_STRAY, mdoc->parse,
                               line, ppos, "It %s", buf + *pos);
                           if ( ! mdoc_elem_alloc(mdoc, line, ppos,
                               MDOC_br, NULL))
                                   return(0);
                           return(rew_elem(mdoc, MDOC_br));
                   }
           }
   
         /* Close out prior implicit scope. */          /* Close out prior implicit scope. */
   
         if ( ! (MDOC_EXPLICIT & mdoc_macros[tok].flags)) {          if ( ! (MDOC_EXPLICIT & mdoc_macros[tok].flags)) {
Line 1763  phrase_ta(MACRO_PROT_ARGS)
Line 1784  phrase_ta(MACRO_PROT_ARGS)
         while (NULL != n && MDOC_Bl != n->tok)          while (NULL != n && MDOC_Bl != n->tok)
                 n = n->parent;                  n = n->parent;
         if (NULL == n || LIST_column != n->norm->Bl.type) {          if (NULL == n || LIST_column != n->norm->Bl.type) {
                 mdoc_pmsg(mdoc, line, ppos, MANDOCERR_STRAYTA);                  mandoc_msg(MANDOCERR_TA_STRAY, mdoc->parse,
                       line, ppos, NULL);
                 return(1);                  return(1);
         }          }
   

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.138

CVSweb