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

Diff for /src/usr.bin/mandoc/man_macro.c between version 1.96 and 1.97

version 1.96, 2018/12/14 01:17:46 version 1.97, 2018/12/14 05:17:45
Line 104 
Line 104 
                         if (man->flags & (MAN_BLINE | MAN_ELINE) &&                          if (man->flags & (MAN_BLINE | MAN_ELINE) &&
                             man_macro(n->tok)->flags &                              man_macro(n->tok)->flags &
                              (MAN_BSCOPED | MAN_NSCOPED)) {                               (MAN_BSCOPED | MAN_NSCOPED)) {
                                 mandoc_vmsg(MANDOCERR_BLK_LINE,                                  mandoc_msg(MANDOCERR_BLK_LINE,
                                     man->parse, n->line, n->pos,                                      n->line, n->pos,
                                     "EOF breaks %s", roff_name[n->tok]);                                      "EOF breaks %s", roff_name[n->tok]);
                                 if (man->flags & MAN_ELINE)                                  if (man->flags & MAN_ELINE)
                                         man->flags &= ~MAN_ELINE;                                          man->flags &= ~MAN_ELINE;
Line 122 
Line 122 
                         if (n->type == ROFFT_BLOCK &&                          if (n->type == ROFFT_BLOCK &&
                             man_macro(n->tok)->fp == blk_exp)                              man_macro(n->tok)->fp == blk_exp)
                                 mandoc_msg(MANDOCERR_BLK_NOEND,                                  mandoc_msg(MANDOCERR_BLK_NOEND,
                                     man->parse, n->line, n->pos,                                      n->line, n->pos, "%s",
                                     roff_name[n->tok]);                                      roff_name[n->tok]);
                 }                  }
   
Line 214 
Line 214 
                                 nrew++;                                  nrew++;
                 target = strtol(p, &p, 10);                  target = strtol(p, &p, 10);
                 if (*p != '\0')                  if (*p != '\0')
                         mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,                          mandoc_msg(MANDOCERR_ARG_EXCESS, line,
                             line, p - buf, "RE ... %s", p);                              (int)(p - buf), "RE ... %s", p);
                 if (target == 0)                  if (target == 0)
                         target = 1;                          target = 1;
                 nrew -= target;                  nrew -= target;
                 if (nrew < 1) {                  if (nrew < 1) {
                         mandoc_vmsg(MANDOCERR_RE_NOTOPEN, man->parse,                          mandoc_msg(MANDOCERR_RE_NOTOPEN,
                             line, ppos, "RE %d", target);                              line, ppos, "RE %d", target);
                         return;                          return;
                 }                  }
Line 243 
Line 243 
                         break;                          break;
   
         if (nn == NULL) {          if (nn == NULL) {
                 mandoc_msg(MANDOCERR_BLK_NOTOPEN, man->parse,                  mandoc_msg(MANDOCERR_BLK_NOTOPEN,
                     line, ppos, roff_name[tok]);                      line, ppos, "%s", roff_name[tok]);
                 rew_scope(man, MAN_PP);                  rew_scope(man, MAN_PP);
                 if (tok == MAN_RE) {                  if (tok == MAN_RE) {
                         roff_elem_alloc(man, line, ppos, ROFF_br);                          roff_elem_alloc(man, line, ppos, ROFF_br);
Line 313 
Line 313 
         }          }
   
         if (buf[*pos] != '\0')          if (buf[*pos] != '\0')
                 mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse, line,                  mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos,
                     *pos, "%s ... %s", roff_name[tok], buf + *pos);                      "%s ... %s", roff_name[tok], buf + *pos);
   
         man_unscope(man, head);          man_unscope(man, head);
         roff_body_alloc(man, line, ppos, tok);          roff_body_alloc(man, line, ppos, tok);
Line 378 
Line 378 
   
         for (;;) {          for (;;) {
                 if (buf[*pos] != '\0' && (tok == MAN_fi || tok == MAN_nf)) {                  if (buf[*pos] != '\0' && (tok == MAN_fi || tok == MAN_nf)) {
                         mandoc_vmsg(MANDOCERR_ARG_SKIP,                          mandoc_msg(MANDOCERR_ARG_SKIP, line, *pos,
                             man->parse, line, *pos, "%s %s",                              "%s %s", roff_name[tok], buf + *pos);
                             roff_name[tok], buf + *pos);  
                         break;                          break;
                 }                  }
                 if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) {                  if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) {
                         mandoc_vmsg(MANDOCERR_ARG_EXCESS,                          mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos,
                             man->parse, line, *pos, "%s ... %s",                              "%s ... %s", roff_name[tok], buf + *pos);
                             roff_name[tok], buf + *pos);  
                         break;                          break;
                 }                  }
                 la = *pos;                  la = *pos;

Legend:
Removed from v.1.96  
changed lines
  Added in v.1.97