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

Diff for /mandoc/mdoc_validate.c between version 1.35 and 1.41

version 1.35, 2009/07/17 12:27:49 version 1.41, 2009/07/25 16:03:03
Line 862  post_bf(POST_ARGS)
Line 862  post_bf(POST_ARGS)
                 return(1);                  return(1);
         else if (0 == strcmp(p, "Li"))          else if (0 == strcmp(p, "Li"))
                 return(1);                  return(1);
         else if (0 == strcmp(p, "Sm"))          else if (0 == strcmp(p, "Sy"))
                 return(1);                  return(1);
   
         return(mdoc_nerr(mdoc, head, EFONT));          return(mdoc_nerr(mdoc, head, EFONT));
Line 912  post_an(POST_ARGS)
Line 912  post_an(POST_ARGS)
         if (mdoc->last->args) {          if (mdoc->last->args) {
                 if (NULL == mdoc->last->child)                  if (NULL == mdoc->last->child)
                         return(1);                          return(1);
                 return(mdoc_nerr(mdoc, mdoc->last, ELINE));                  return(mdoc_nerr(mdoc, mdoc->last, ENOLINE));
         }          }
   
         if (mdoc->last->child)          if (mdoc->last->child)
Line 1028  post_it(POST_ARGS)
Line 1028  post_it(POST_ARGS)
                 c = mdoc->last->child;                  c = mdoc->last->child;
                 for (i = 0; c && MDOC_HEAD == c->type; c = c->next)                  for (i = 0; c && MDOC_HEAD == c->type; c = c->next)
                         i++;                          i++;
                 if (i == cols)  
                   if (i < cols || i == (cols + 1)) {
                           if ( ! mdoc_vwarn(mdoc, mdoc->last->line,
                                           mdoc->last->pos, "column "
                                           "mismatch: have %d, want %d",
                                           i, cols))
                                   return(0);
                         break;                          break;
                 return(mdoc_verr(mdoc, mdoc->last->line, mdoc->last->pos,                  } else if (i == cols)
                                 "column mismatch (have %d, want %d)",                          break;
                                 i, cols));  
                   return(mdoc_verr(mdoc, mdoc->last->line,
                                   mdoc->last->pos, "column mismatch: "
                                   "have %d, want %d", i, cols));
         default:          default:
                 break;                  break;
         }          }
Line 1138  post_sp(POST_ARGS)
Line 1147  post_sp(POST_ARGS)
   
         if (NULL == mdoc->last->child)          if (NULL == mdoc->last->child)
                 return(1);                  return(1);
           else if ( ! eerr_eq1(mdoc))
                   return(0);
   
         assert(MDOC_TEXT == mdoc->last->child->type);          assert(MDOC_TEXT == mdoc->last->child->type);
         buf = mdoc->last->child->string;          buf = mdoc->last->child->string;
Line 1150  post_sp(POST_ARGS)
Line 1161  post_sp(POST_ARGS)
                 return(mdoc_nerr(mdoc, mdoc->last->child, ENUMFMT));                  return(mdoc_nerr(mdoc, mdoc->last->child, ENUMFMT));
   
         if ((errno == ERANGE && (lval == LONG_MAX || lval == LONG_MIN)) ||          if ((errno == ERANGE && (lval == LONG_MAX || lval == LONG_MIN)) ||
                         (lval > INT_MAX || lval < INT_MIN))                          (lval > INT_MAX || lval < 0))
                 return(mdoc_nerr(mdoc, mdoc->last->child, ENUMFMT));                  return(mdoc_nerr(mdoc, mdoc->last->child, ENUMFMT));
   
         return(1);          return(1);
Line 1208  post_sh_body(POST_ARGS)
Line 1219  post_sh_body(POST_ARGS)
                         return(0);                          return(0);
         }          }
   
           assert(n);
         if (MDOC_BLOCK == n->type && MDOC_Nd == n->tok)          if (MDOC_BLOCK == n->type && MDOC_Nd == n->tok)
                 return(1);                  return(1);
         return(mdoc_nwarn(mdoc, mdoc->last, ENAMESECINC));          return(mdoc_nwarn(mdoc, mdoc->last, ENAMESECINC));

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.41

CVSweb