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

Diff for /mandoc/man.c between version 1.131 and 1.134

version 1.131, 2014/07/06 19:09:00 version 1.134, 2014/07/30 20:06:36
Line 392  man_descope(struct man *man, int line, int offs)
Line 392  man_descope(struct man *man, int line, int offs)
   
         if (MAN_ELINE & man->flags) {          if (MAN_ELINE & man->flags) {
                 man->flags &= ~MAN_ELINE;                  man->flags &= ~MAN_ELINE;
                 if ( ! man_unscope(man, man->last->parent, MANDOCERR_MAX))                  if ( ! man_unscope(man, man->last->parent))
                         return(0);                          return(0);
         }          }
   
Line 400  man_descope(struct man *man, int line, int offs)
Line 400  man_descope(struct man *man, int line, int offs)
                 return(1);                  return(1);
         man->flags &= ~MAN_BLINE;          man->flags &= ~MAN_BLINE;
   
         if ( ! man_unscope(man, man->last->parent, MANDOCERR_MAX))          if ( ! man_unscope(man, man->last->parent))
                 return(0);                  return(0);
         return(man_body_alloc(man, line, offs, man->last->tok));          return(man_body_alloc(man, line, offs, man->last->tok));
 }  }
Line 478  man_ptext(struct man *man, int line, char *buf, int of
Line 478  man_ptext(struct man *man, int line, char *buf, int of
 static int  static int
 man_pmacro(struct man *man, int ln, char *buf, int offs)  man_pmacro(struct man *man, int ln, char *buf, int offs)
 {  {
         int              i, ppos;  
         enum mant        tok;  
         char             mac[5];          char             mac[5];
         struct man_node *n;          struct man_node *n;
           enum mant        tok;
           int              i, ppos;
           int              bline;
   
         if ('"' == buf[offs]) {          if ('"' == buf[offs]) {
                 mandoc_msg(MANDOCERR_COMMENT_BAD, man->parse,                  mandoc_msg(MANDOCERR_COMMENT_BAD, man->parse,
Line 542  man_pmacro(struct man *man, int ln, char *buf, int off
Line 543  man_pmacro(struct man *man, int ln, char *buf, int off
                 if (MAN_NSCOPED & man_macros[n->tok].flags)                  if (MAN_NSCOPED & man_macros[n->tok].flags)
                         n = n->parent;                          n = n->parent;
   
                 mandoc_vmsg(MANDOCERR_LINESCOPE, man->parse, n->line,                  mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse, n->line,
                     n->pos, "%s breaks %s", man_macronames[tok],                      n->pos, "%s breaks %s", man_macronames[tok],
                     man_macronames[n->tok]);                      man_macronames[n->tok]);
   
Line 573  man_pmacro(struct man *man, int ln, char *buf, int off
Line 574  man_pmacro(struct man *man, int ln, char *buf, int off
                 assert(MAN_BLOCK == n->type);                  assert(MAN_BLOCK == n->type);
                 assert(MAN_SCOPED & man_macros[n->tok].flags);                  assert(MAN_SCOPED & man_macros[n->tok].flags);
   
                 mandoc_vmsg(MANDOCERR_LINESCOPE, man->parse, n->line,                  mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse, n->line,
                     n->pos, "%s breaks %s", man_macronames[tok],                      n->pos, "%s breaks %s", man_macronames[tok],
                     man_macronames[n->tok]);                      man_macronames[n->tok]);
   
Line 581  man_pmacro(struct man *man, int ln, char *buf, int off
Line 582  man_pmacro(struct man *man, int ln, char *buf, int off
                 man->flags &= ~MAN_BLINE;                  man->flags &= ~MAN_BLINE;
         }          }
   
         /*          /* Remember whether we are in next-line scope for a block head. */
          * Save the fact that we're in the next-line for a block.  In  
          * this way, embedded roff instructions can "remember" state  
          * when they exit.  
          */  
   
         if (MAN_BLINE & man->flags)          bline = man->flags & MAN_BLINE;
                 man->flags |= MAN_BPLINE;  
   
         /* Call to handler... */          /* Call to handler... */
   
Line 610  man_pmacro(struct man *man, int ln, char *buf, int off
Line 606  man_pmacro(struct man *man, int ln, char *buf, int off
          * above-parsed macro, so return.           * above-parsed macro, so return.
          */           */
   
         if ( ! (MAN_BPLINE & man->flags)) {          if ( ! bline) {
                 man->flags &= ~MAN_ILINE;                  man->flags &= ~MAN_ILINE;
                 return(1);                  return(1);
         }          }
         man->flags &= ~MAN_BPLINE;  
   
         /*          /*
          * If we're in a block scope, then allow this macro to slip by           * If we're in a block scope, then allow this macro to slip by
Line 639  man_pmacro(struct man *man, int ln, char *buf, int off
Line 634  man_pmacro(struct man *man, int ln, char *buf, int off
         assert(MAN_BLINE & man->flags);          assert(MAN_BLINE & man->flags);
         man->flags &= ~MAN_BLINE;          man->flags &= ~MAN_BLINE;
   
         if ( ! man_unscope(man, man->last->parent, MANDOCERR_MAX))          if ( ! man_unscope(man, man->last->parent))
                 return(0);                  return(0);
         return(man_body_alloc(man, ln, ppos, man->last->tok));          return(man_body_alloc(man, ln, ppos, man->last->tok));
   

Legend:
Removed from v.1.131  
changed lines
  Added in v.1.134

CVSweb