[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.162 and 1.164

version 1.162, 2011/03/17 11:30:23 version 1.164, 2011/03/20 16:02:05
Line 179  static v_pre  pres_sh[] = { pre_sh, NULL };
Line 179  static v_pre  pres_sh[] = { pre_sh, NULL };
 static  v_pre    pres_ss[] = { pre_ss, NULL };  static  v_pre    pres_ss[] = { pre_ss, NULL };
 static  v_pre    pres_std[] = { pre_std, NULL };  static  v_pre    pres_std[] = { pre_std, NULL };
   
 const   struct valids mdoc_valids[MDOC_MAX] = {  static  const struct valids mdoc_valids[MDOC_MAX] = {
         { NULL, NULL },                         /* Ap */          { NULL, NULL },                         /* Ap */
         { pres_dd, posts_dd },                  /* Dd */          { pres_dd, posts_dd },                  /* Dd */
         { pres_dt, posts_dt },                  /* Dt */          { pres_dt, posts_dt },                  /* Dt */
Line 446  check_count(struct mdoc *m, enum mdoc_type type, 
Line 446  check_count(struct mdoc *m, enum mdoc_type type, 
         }          }
   
         t = lvl == CHECK_WARN ? MANDOCERR_ARGCWARN : MANDOCERR_ARGCOUNT;          t = lvl == CHECK_WARN ? MANDOCERR_ARGCWARN : MANDOCERR_ARGCOUNT;
         mdoc_vmsg(m, t, m->last->line, m->last->pos,          mandoc_vmsg(t, m->parse, m->last->line, m->last->pos,
                         "want %s%d children (have %d)",                          "want %s%d children (have %d)",
                         p, val, m->last->nchild);                          p, val, m->last->nchild);
         return(1);          return(1);
Line 581  check_parent(PRE_ARGS, enum mdoct tok, enum mdoc_type 
Line 581  check_parent(PRE_ARGS, enum mdoct tok, enum mdoc_type 
                         (t == n->parent->type))                          (t == n->parent->type))
                 return(1);                  return(1);
   
         mdoc_vmsg(mdoc, MANDOCERR_SYNTCHILD,          mandoc_vmsg(MANDOCERR_SYNTCHILD, mdoc->parse, n->line,
                                 n->line, n->pos, "want parent %s",                          n->pos, "want parent %s", MDOC_ROOT == t ?
                                 MDOC_ROOT == t ? "<root>" :                          "<root>" : mdoc_macronames[tok]);
                                         mdoc_macronames[tok]);  
         return(0);          return(0);
 }  }
   
Line 1332  post_it(POST_ARGS)
Line 1331  post_it(POST_ARGS)
                 else                  else
                         er = MANDOCERR_SYNTARGCOUNT;                          er = MANDOCERR_SYNTARGCOUNT;
   
                 mdoc_vmsg(mdoc, er, mdoc->last->line, mdoc->last->pos,                  mandoc_vmsg(er, mdoc->parse, mdoc->last->line,
                                   mdoc->last->pos,
                                 "columns == %d (have %d)", cols, i);                                  "columns == %d (have %d)", cols, i);
                 return(MANDOCERR_ARGCOUNT == er);                  return(MANDOCERR_ARGCOUNT == er);
         default:          default:
Line 2001  post_dd(POST_ARGS)
Line 2001  post_dd(POST_ARGS)
   
         n = mdoc->last;          n = mdoc->last;
         if (NULL == n->child || '\0' == n->child->string[0]) {          if (NULL == n->child || '\0' == n->child->string[0]) {
                 mdoc->meta.date = mandoc_normdate(NULL,                  mdoc->meta.date = mandoc_normdate
                     mdoc->msg, mdoc->data, n->line, n->pos);                          (mdoc->parse, NULL, n->line, n->pos);
                 return(1);                  return(1);
         }          }
   
         if ( ! concat(mdoc, buf, n->child, DATESIZE))          if ( ! concat(mdoc, buf, n->child, DATESIZE))
                 return(0);                  return(0);
   
         mdoc->meta.date = mandoc_normdate(buf,          mdoc->meta.date = mandoc_normdate
             mdoc->msg, mdoc->data, n->line, n->pos);                  (mdoc->parse, buf, n->line, n->pos);
   
         return(1);          return(1);
 }  }

Legend:
Removed from v.1.162  
changed lines
  Added in v.1.164

CVSweb