[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.106 and 1.107

version 1.106, 2010/07/02 13:12:47 version 1.107, 2010/07/02 15:03:14
Line 849  static int
Line 849  static int
 pre_an(PRE_ARGS)  pre_an(PRE_ARGS)
 {  {
   
         if (NULL == n->args || 1 == n->args->argc)          if (NULL == n->args)
                 return(1);                  return(1);
         mdoc_vmsg(mdoc, MANDOCERR_SYNTARGCOUNT,          if (n->args->argc > 1)
                                 n->line, n->pos,                  if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_ARGCOUNT))
                                 "line arguments == 1 (have %d)",                          return(0);
                                 n->args->argc);  
         return(0);          if (MDOC_Split == n->args->argv[0].arg)
                   n->data.An.auth = AUTH_split;
           else if (MDOC_Nosplit == n->args->argv[0].arg)
                   n->data.An.auth = AUTH_nosplit;
           else
                   abort();
   
           return(1);
 }  }
   
   
Line 1076  post_at(POST_ARGS)
Line 1083  post_at(POST_ARGS)
 static int  static int
 post_an(POST_ARGS)  post_an(POST_ARGS)
 {  {
           struct mdoc_node *np;
   
         if (mdoc->last->args) {          np = mdoc->last;
                 if (NULL == mdoc->last->child)          if (AUTH__NONE != np->data.An.auth && np->child)
                         return(1);                  return(mdoc_nmsg(mdoc, np, MANDOCERR_ARGCOUNT));
                 return(mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_ARGCOUNT));          if (AUTH__NONE != np->data.An.auth || np->child)
         }  
   
         if (mdoc->last->child)  
                 return(1);                  return(1);
         return(mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOARGS));          return(mdoc_nmsg(mdoc, np, MANDOCERR_NOARGS));
 }  }
   
   

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.107

CVSweb