[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.15 and 1.16

version 1.15, 2009/06/17 14:10:09 version 1.16, 2009/06/18 20:46:19
Line 99  static int err_child_gt(struct mdoc *, const char *, i
Line 99  static int err_child_gt(struct mdoc *, const char *, i
 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     count_child(struct mdoc *);  
 static  int     warn_print(struct mdoc *, int, 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);
Line 553  err_count(struct mdoc *m, const char *k,
Line 552  err_count(struct mdoc *m, const char *k,
 }  }
   
   
 static inline int  
 count_child(struct mdoc *mdoc)  
 {  
         int               i;  
         struct mdoc_node *n;  
   
         for (i = 0, n = mdoc->last->child; n; n = n->next, i++)  
                 /* Do nothing */ ;  
   
         return(i);  
 }  
   
   
 /*  /*
  * Build these up with macros because they're basically the same check   * Build these up with macros because they're basically the same check
  * for different inequalities.  Yes, this could be done with functions,   * for different inequalities.  Yes, this could be done with functions,
Line 576  count_child(struct mdoc *mdoc)
Line 562  count_child(struct mdoc *mdoc)
 static int                                                      \  static int                                                      \
 lvl##_child_##name(struct mdoc *mdoc, const char *p, int sz)    \  lvl##_child_##name(struct mdoc *mdoc, const char *p, int sz)    \
 {                                                               \  {                                                               \
         int i;                                                  \          if (mdoc->last->nchild ineq sz)                         \
         if ((i = count_child(mdoc)) ineq sz)                    \  
                 return(1);                                      \                  return(1);                                      \
         return(lvl##_count(mdoc, #ineq, sz, p, i));             \          return(lvl##_count(mdoc, #ineq, sz, p, mdoc->last->nchild)); \
 }  }
   
 #define CHECK_BODY_DEFN(name, lvl, func, num)                   \  #define CHECK_BODY_DEFN(name, lvl, func, num)                   \

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

CVSweb