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

Diff for /mandoc/man_validate.c between version 1.11 and 1.12

version 1.11, 2009/06/18 10:32:00 version 1.12, 2009/06/18 10:53:58
Line 25 
Line 25 
   
 #define POSTARGS  struct man *m, const struct man_node *n  #define POSTARGS  struct man *m, const struct man_node *n
   
 enum    merr {  
         WPRINT  
 };  
   
 typedef int     (*v_post)(POSTARGS);  typedef int     (*v_post)(POSTARGS);
   
 struct  man_valid {  struct  man_valid {
Line 42  static int   check_le1(POSTARGS);
Line 38  static int   check_le1(POSTARGS);
 static  int       check_le2(POSTARGS);  static  int       check_le2(POSTARGS);
 static  int       check_le5(POSTARGS);  static  int       check_le5(POSTARGS);
 static  int       check_text(POSTARGS);  static  int       check_text(POSTARGS);
 static  int       perr(struct man *, int, int, int, enum merr);  
   
 static  v_post    posts_le1[] = { check_le1, NULL };  static  v_post    posts_le1[] = { check_le1, NULL };
 static  v_post    posts_le2[] = { check_le2, NULL };  static  v_post    posts_le2[] = { check_le2, NULL };
Line 106  man_valid_post(struct man *m)
Line 101  man_valid_post(struct man *m)
   
   
 static int  static int
 perr(struct man *m, int line, int pos,  
                 int iserr, enum merr type)  
 {  
         const char       *p;  
   
         p = NULL;  
         switch (type) {  
         case (WPRINT):  
                 p = "invalid character";  
                 break;  
         }  
         assert(p);  
   
         if (iserr)  
                 return(man_verr(m, line, pos, p));  
   
         return(man_vwarn(m, line, pos, p));  
 }  
   
   
 static int  
 check_text(POSTARGS)  check_text(POSTARGS)
 {  {
         const char      *p;          const char      *p;
Line 139  check_text(POSTARGS) 
Line 113  check_text(POSTARGS) 
                         continue;                          continue;
   
                 if (MAN_IGN_CHARS & m->pflags)                  if (MAN_IGN_CHARS & m->pflags)
                         return(perr(m, n->line, pos, 0, WPRINT));                          return(man_pwarn(m, n->line, pos, WNPRINT));
                 return(perr(m, n->line, pos, 1, WPRINT));                  return(man_perr(m, n->line, pos, WNPRINT));
         }          }
   
         return(1);          return(1);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

CVSweb