[BACK]Return to man.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/man.c between version 1.45 and 1.46

version 1.45, 2010/11/29 00:12:02 version 1.46, 2010/11/29 01:44:41
Line 509 
Line 509 
                         goto err;                          goto err;
   
         /*          /*
          * Remove prior ELINE macro, as it's being clobbering by a new           * Remove prior ELINE macro, as it's being clobbered by a new
          * macro.  Note that NSCOPED macros do not close out ELINE           * macro.  Note that NSCOPED macros do not close out ELINE
          * macros---they don't print text---so we let those slip by.           * macros---they don't print text---so we let those slip by.
          */           */
   
         if ( ! (MAN_NSCOPED & man_macros[tok].flags) &&          if ( ! (MAN_NSCOPED & man_macros[tok].flags) &&
                         m->flags & MAN_ELINE) {                          m->flags & MAN_ELINE) {
                 assert(MAN_TEXT != m->last->type);  
   
                 /*  
                  * This occurs in the following construction:  
                  *   .B  
                  *   .br  
                  *   .B  
                  *   .br  
                  *   I hate man macros.  
                  * Flat-out disallow this madness.  
                  */  
                 if (MAN_NSCOPED & man_macros[m->last->tok].flags) {  
                         man_pmsg(m, ln, ppos, MANDOCERR_SYNTLINESCOPE);  
                         return(0);  
                 }  
   
                 n = m->last;                  n = m->last;
                   assert(MAN_TEXT != n->type);
   
                 assert(n);                  /* .B .br .br .B: remove prior including children */
                 assert(NULL == n->child);                  if (MAN_NSCOPED & man_macros[n->tok].flags)
                 assert(0 == n->nchild);                          n = n->parent;
   
                 if ( ! man_nmsg(m, n, MANDOCERR_LINESCOPE))                  man_vmsg(m, MANDOCERR_LINESCOPE, n->line, n->pos,
                         return(0);                      "%s", man_macronames[n->tok]);
   
                 man_node_delete(m, n);                  man_node_delete(m, n);
                 m->flags &= ~MAN_ELINE;                  m->flags &= ~MAN_ELINE;

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46