[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.128 and 1.129

version 1.128, 2018/08/26 16:18:38 version 1.129, 2018/12/14 05:17:45
Line 120 
Line 120 
   
         if (buf[i] == '\0') {          if (buf[i] == '\0') {
                 if (man->flags & (MAN_ELINE | MAN_BLINE)) {                  if (man->flags & (MAN_ELINE | MAN_BLINE)) {
                         mandoc_msg(MANDOCERR_BLK_BLANK, man->parse,                          mandoc_msg(MANDOCERR_BLK_BLANK, line, 0, NULL);
                             line, 0, NULL);  
                         return 1;                          return 1;
                 }                  }
                 if (man->last->tok == MAN_SH || man->last->tok == MAN_SS)                  if (man->last->tok == MAN_SH || man->last->tok == MAN_SS)
Line 146 
Line 145 
   
         if (' ' == buf[i - 1] || '\t' == buf[i - 1]) {          if (' ' == buf[i - 1] || '\t' == buf[i - 1]) {
                 if (i > 1 && '\\' != buf[i - 2])                  if (i > 1 && '\\' != buf[i - 2])
                         mandoc_msg(MANDOCERR_SPACE_EOL, man->parse,                          mandoc_msg(MANDOCERR_SPACE_EOL, line, i - 1, NULL);
                             line, i - 1, NULL);  
   
                 for (--i; i && ' ' == buf[i]; i--)                  for (--i; i && ' ' == buf[i]; i--)
                         /* Spin back to non-space. */ ;                          /* Spin back to non-space. */ ;
Line 192 
Line 190 
         if (sz > 0 && sz < 4)          if (sz > 0 && sz < 4)
                 tok = roffhash_find(man->manmac, buf + ppos, sz);                  tok = roffhash_find(man->manmac, buf + ppos, sz);
         if (tok == TOKEN_NONE) {          if (tok == TOKEN_NONE) {
                 mandoc_msg(MANDOCERR_MACRO, man->parse,                  mandoc_msg(MANDOCERR_MACRO, ln, ppos, "%s", buf + ppos - 1);
                     ln, ppos, buf + ppos - 1);  
                 return 1;                  return 1;
         }          }
   
Line 223 
Line 220 
          */           */
   
         if (buf[offs] == '\0' && buf[offs - 1] == ' ')          if (buf[offs] == '\0' && buf[offs - 1] == ' ')
                 mandoc_msg(MANDOCERR_SPACE_EOL, man->parse,                  mandoc_msg(MANDOCERR_SPACE_EOL, ln, offs - 1, NULL);
                     ln, offs - 1, NULL);  
   
         /*          /*
          * Some macros break next-line scopes; otherwise, remember           * Some macros break next-line scopes; otherwise, remember
Line 297 
Line 293 
                      == MAN_NSCOPED)                       == MAN_NSCOPED)
                         n = n->parent;                          n = n->parent;
   
                 mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse,                  mandoc_msg(MANDOCERR_BLK_LINE, n->line, n->pos,
                     n->line, n->pos, "%s breaks %s",                      "%s breaks %s", roff_name[tok], roff_name[n->tok]);
                     roff_name[tok], roff_name[n->tok]);  
   
                 roff_node_delete(man, n);                  roff_node_delete(man, n);
                 man->flags &= ~MAN_ELINE;                  man->flags &= ~MAN_ELINE;
Line 339 
Line 334 
                 assert(n->type == ROFFT_BLOCK);                  assert(n->type == ROFFT_BLOCK);
                 assert(man_macro(n->tok)->flags & MAN_BSCOPED);                  assert(man_macro(n->tok)->flags & MAN_BSCOPED);
   
                 mandoc_vmsg(MANDOCERR_BLK_LINE, man->parse,                  mandoc_msg(MANDOCERR_BLK_LINE, n->line, n->pos,
                     n->line, n->pos, "%s breaks %s",                      "%s breaks %s", roff_name[tok], roff_name[n->tok]);
                     roff_name[tok], roff_name[n->tok]);  
   
                 roff_node_delete(man, n);                  roff_node_delete(man, n);
                 man->flags &= ~MAN_BLINE;                  man->flags &= ~MAN_BLINE;
Line 356 
Line 350 
         case MAN_nf:          case MAN_nf:
         case MAN_EX:          case MAN_EX:
                 if (man->flags & MAN_LITERAL && ! (n->flags & NODE_VALID))                  if (man->flags & MAN_LITERAL && ! (n->flags & NODE_VALID))
                         mandoc_msg(MANDOCERR_NF_SKIP, man->parse,                          mandoc_msg(MANDOCERR_NF_SKIP, n->line, n->pos, "nf");
                             n->line, n->pos, "nf");  
                 man->flags |= MAN_LITERAL;                  man->flags |= MAN_LITERAL;
                 break;                  break;
         case MAN_fi:          case MAN_fi:
         case MAN_EE:          case MAN_EE:
                 if ( ! (man->flags & MAN_LITERAL) &&                  if ( ! (man->flags & MAN_LITERAL) &&
                      ! (n->flags & NODE_VALID))                       ! (n->flags & NODE_VALID))
                         mandoc_msg(MANDOCERR_FI_SKIP, man->parse,                          mandoc_msg(MANDOCERR_FI_SKIP, n->line, n->pos, "fi");
                             n->line, n->pos, "fi");  
                 man->flags &= ~MAN_LITERAL;                  man->flags &= ~MAN_LITERAL;
                 break;                  break;
         default:          default:

Legend:
Removed from v.1.128  
changed lines
  Added in v.1.129