[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.69 and 1.72

version 1.69, 2010/04/07 19:35:42 version 1.72, 2010/05/12 08:41:17
Line 60  static int  err_child_gt(struct mdoc *, const char *, 
Line 60  static int  err_child_gt(struct mdoc *, const char *, 
 static  int      warn_child_gt(struct mdoc *, const char *, int);  static  int      warn_child_gt(struct mdoc *, const char *, int);
 static  int      err_child_eq(struct mdoc *, const char *, int);  static  int      err_child_eq(struct mdoc *, const char *, int);
 static  int      warn_child_eq(struct mdoc *, const char *, int);  static  int      warn_child_eq(struct mdoc *, const char *, int);
 static  int      warn_print(struct mdoc *, int, int);  
 static  int      warn_count(struct mdoc *, const char *,  static  int      warn_count(struct mdoc *, const char *,
                         int, const char *, int);                          int, const char *, int);
 static  int      err_count(struct mdoc *, const char *,  static  int      err_count(struct mdoc *, const char *,
Line 323  mdoc_valid_post(struct mdoc *mdoc)
Line 322  mdoc_valid_post(struct mdoc *mdoc)
 }  }
   
   
 static int  
 warn_print(struct mdoc *m, int ln, int pos)  
 {  
   
         if (MDOC_IGN_CHARS & m->pflags)  
                 return(mdoc_pwarn(m, ln, pos, EPRINT));  
         return(mdoc_perr(m, ln, pos, EPRINT));  
 }  
   
   
 static inline int  static inline int
 warn_count(struct mdoc *m, const char *k,  warn_count(struct mdoc *m, const char *k,
                 int want, const char *v, int has)                  int want, const char *v, int has)
Line 518  check_text(struct mdoc *mdoc, int line, int pos, const
Line 507  check_text(struct mdoc *mdoc, int line, int pos, const
         for ( ; *p; p++, pos++) {          for ( ; *p; p++, pos++) {
                 if ('\t' == *p) {                  if ('\t' == *p) {
                         if ( ! (MDOC_LITERAL & mdoc->flags))                          if ( ! (MDOC_LITERAL & mdoc->flags))
                                 if ( ! warn_print(mdoc, line, pos))                                  if ( ! mdoc_pwarn(mdoc, line, pos, EPRINT))
                                         return(0);                                          return(0);
                 } else if ( ! isprint((u_char)*p))                  } else if ( ! isprint((u_char)*p))
                         if ( ! warn_print(mdoc, line, pos))                          if ( ! mdoc_pwarn(mdoc, line, pos, EPRINT))
                                 return(0);                                  return(0);
   
                 if ('\\' != *p)                  if ('\\' != *p)
Line 747  pre_sh(PRE_ARGS)
Line 736  pre_sh(PRE_ARGS)
   
         if (MDOC_BLOCK != n->type)          if (MDOC_BLOCK != n->type)
                 return(1);                  return(1);
         return(check_parent(mdoc, n, -1, MDOC_ROOT));          return(check_parent(mdoc, n, MDOC_MAX, MDOC_ROOT));
 }  }
   
   
Line 1297  post_sh_head(POST_ARGS)
Line 1286  post_sh_head(POST_ARGS)
                         return(mdoc_nerr(mdoc, n, ETOOLONG));                          return(mdoc_nerr(mdoc, n, ETOOLONG));
         }          }
   
         sec = mdoc_atosec(buf);          sec = mdoc_str2sec(buf);
   
         /*          /*
          * Check: NAME should always be first, CUSTOM has no roles,           * Check: NAME should always be first, CUSTOM has no roles,
          * non-CUSTOM has a conventional order to be followed.           * non-CUSTOM has a conventional order to be followed.
          */           */
   
         if (SEC_NAME != sec && SEC_NONE == mdoc->lastnamed &&          if (SEC_NAME != sec && SEC_NONE == mdoc->lastnamed)
                         ! mdoc_nwarn(mdoc, mdoc->last, ESECNAME))                  if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECNAME))
                 return(0);                          return(0);
   
         if (SEC_CUSTOM == sec)          if (SEC_CUSTOM == sec)
                 return(1);                  return(1);
   
         if (sec == mdoc->lastnamed)          if (sec == mdoc->lastnamed)
                 if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECREP))                  if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECREP))
                         return(0);                          return(0);
   
         if (sec < mdoc->lastnamed)          if (sec < mdoc->lastnamed)
                 if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECOOO))                  if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECOOO))
                         return(0);                          return(0);

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.72

CVSweb