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

Diff for /mandoc/Attic/validate.c between version 1.27 and 1.30

version 1.27, 2009/01/12 17:26:42 version 1.30, 2009/01/15 17:38:58
Line 79  const struct valids mdoc_valids[MDOC_MAX] = {
Line 79  const struct valids mdoc_valids[MDOC_MAX] = {
         { pres_prologue, NULL }, /* Os */          { pres_prologue, NULL }, /* Os */
         /* FIXME: preceding Pp. */          /* FIXME: preceding Pp. */
         /* FIXME: NAME section internal ordering. */          /* FIXME: NAME section internal ordering. */
           /* FIXME: can only be a child of root. */
         { NULL, posts_sh }, /* Sh */          { NULL, posts_sh }, /* Sh */
         /* FIXME: preceding Pp. */          /* FIXME: preceding Pp. */
           /* FIXME: can only be a child of Sh. */
         { NULL, posts_ss }, /* Ss */          { NULL, posts_ss }, /* Ss */
         /* FIXME: proceeding... */          /* FIXME: proceeding... */
         { NULL, posts_pp }, /* Pp */          { NULL, posts_pp }, /* Pp */
Line 310  pre_display(struct mdoc *mdoc, struct mdoc_node *node)
Line 312  pre_display(struct mdoc *mdoc, struct mdoc_node *node)
                                 break;                                  break;
         if (NULL == n)          if (NULL == n)
                 return(1);                  return(1);
         return(mdoc_verr(mdoc, node, ERR_SCOPE_NONEST));          return(mdoc_nerr(mdoc, node, ERR_SCOPE_NONEST));
 }  }
   
   
Line 393  pre_bd(struct mdoc *mdoc, struct mdoc_node *node)
Line 395  pre_bd(struct mdoc *mdoc, struct mdoc_node *node)
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case (MDOC_Unfilled):                  case (MDOC_Unfilled):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                   case (MDOC_Filled):
                           /* FALLTHROUGH */
                 case (MDOC_Literal):                  case (MDOC_Literal):
                         /* FALLTHROUGH */                          /* FALLTHROUGH */
                 case (MDOC_File):                  case (MDOC_File):
Line 423  pre_it(struct mdoc *mdoc, struct mdoc_node *node)
Line 427  pre_it(struct mdoc *mdoc, struct mdoc_node *node)
         assert(MDOC_It == mdoc->last->tok);          assert(MDOC_It == mdoc->last->tok);
   
         if (MDOC_BODY != mdoc->last->parent->type)          if (MDOC_BODY != mdoc->last->parent->type)
                 return(mdoc_verr(mdoc, node, ERR_SYNTAX_PARENTBAD));                  return(mdoc_nerr(mdoc, node, ERR_SYNTAX_PARENTBAD));
         if (MDOC_Bl != mdoc->last->parent->tok)          if (MDOC_Bl != mdoc->last->parent->tok)
                 return(mdoc_verr(mdoc, node, ERR_SYNTAX_PARENTBAD));                  return(mdoc_nerr(mdoc, node, ERR_SYNTAX_PARENTBAD));
   
         return(1);          return(1);
 }  }
Line 436  pre_prologue(struct mdoc *mdoc, struct mdoc_node *node
Line 440  pre_prologue(struct mdoc *mdoc, struct mdoc_node *node
 {  {
   
         if (SEC_PROLOGUE != mdoc->sec_lastn)          if (SEC_PROLOGUE != mdoc->sec_lastn)
                 return(mdoc_verr(mdoc, node, ERR_SEC_NPROLOGUE));                  return(mdoc_nerr(mdoc, node, ERR_SEC_NPROLOGUE));
         assert(MDOC_ELEM == node->type);          assert(MDOC_ELEM == node->type);
   
         /* Check for ordering. */          /* Check for ordering. */
Line 445  pre_prologue(struct mdoc *mdoc, struct mdoc_node *node
Line 449  pre_prologue(struct mdoc *mdoc, struct mdoc_node *node
         case (MDOC_Os):          case (MDOC_Os):
                 if (mdoc->meta.title[0] && mdoc->meta.date)                  if (mdoc->meta.title[0] && mdoc->meta.date)
                         break;                          break;
                 return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_OO));                  return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_OO));
         case (MDOC_Dt):          case (MDOC_Dt):
                 if (0 == mdoc->meta.title[0] && mdoc->meta.date)                  if (0 == mdoc->meta.title[0] && mdoc->meta.date)
                         break;                          break;
                 return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_OO));                  return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_OO));
         case (MDOC_Dd):          case (MDOC_Dd):
                 if (0 == mdoc->meta.title[0] && 0 == mdoc->meta.date)                  if (0 == mdoc->meta.title[0] && 0 == mdoc->meta.date)
                         break;                          break;
                 return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_OO));                  return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_OO));
         default:          default:
                 abort();                  abort();
                 /* NOTREACHED */                  /* NOTREACHED */
Line 479  pre_prologue(struct mdoc *mdoc, struct mdoc_node *node
Line 483  pre_prologue(struct mdoc *mdoc, struct mdoc_node *node
                 /* NOTREACHED */                  /* NOTREACHED */
         }          }
   
         return(mdoc_verr(mdoc, node, ERR_SEC_PROLOGUE_REP));          return(mdoc_nerr(mdoc, node, ERR_SEC_PROLOGUE_REP));
 }  }
   
   
Line 614  post_bl(struct mdoc *mdoc)
Line 618  post_bl(struct mdoc *mdoc)
         }          }
         if (NULL == n)          if (NULL == n)
                 return(1);                  return(1);
         return(mdoc_verr(mdoc, n, ERR_SYNTAX_CHILDBAD));          return(mdoc_nerr(mdoc, n, ERR_SYNTAX_CHILDBAD));
 }  }
   
   

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.30

CVSweb