[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.19 and 1.23

version 1.19, 2009/08/19 09:14:50 version 1.23, 2009/08/21 13:16:16
Line 36  struct man_valid {
Line 36  struct man_valid {
 };  };
   
 static  int       check_bline(CHKARGS);  static  int       check_bline(CHKARGS);
 static  int       check_eline(CHKARGS);  
 static  int       check_eq0(CHKARGS);  static  int       check_eq0(CHKARGS);
 static  int       check_eq1(CHKARGS);  static  int       check_eq1(CHKARGS);
 static  int       check_ge2(CHKARGS);  static  int       check_ge2(CHKARGS);
 static  int       check_le5(CHKARGS);  static  int       check_le5(CHKARGS);
 static  int       check_par(CHKARGS);  static  int       check_par(CHKARGS);
   static  int       check_part(CHKARGS);
 static  int       check_root(CHKARGS);  static  int       check_root(CHKARGS);
 static  int       check_sec(CHKARGS);  static  int       check_sec(CHKARGS);
 static  int       check_sp(CHKARGS);  static  int       check_sp(CHKARGS);
Line 50  static int   check_text(CHKARGS);
Line 50  static int   check_text(CHKARGS);
 static  v_check   posts_eq0[] = { check_eq0, NULL };  static  v_check   posts_eq0[] = { check_eq0, NULL };
 static  v_check   posts_ge2_le5[] = { check_ge2, check_le5, NULL };  static  v_check   posts_ge2_le5[] = { check_ge2, check_le5, NULL };
 static  v_check   posts_par[] = { check_par, NULL };  static  v_check   posts_par[] = { check_par, NULL };
   static  v_check   posts_part[] = { check_part, NULL };
 static  v_check   posts_sec[] = { check_sec, NULL };  static  v_check   posts_sec[] = { check_sec, NULL };
 static  v_check   posts_sp[] = { check_sp, NULL };  static  v_check   posts_sp[] = { check_sp, NULL };
 static  v_check   pres_eline[] = { check_eline, NULL };  
 static  v_check   pres_bline[] = { check_bline, NULL };  static  v_check   pres_bline[] = { check_bline, NULL };
   
 static  const struct man_valid man_valids[MAN_MAX] = {  static  const struct man_valid man_valids[MAN_MAX] = {
Line 66  static const struct man_valid man_valids[MAN_MAX] = {
Line 66  static const struct man_valid man_valids[MAN_MAX] = {
         { pres_bline, posts_par }, /* P */          { pres_bline, posts_par }, /* P */
         { pres_bline, posts_par }, /* IP */          { pres_bline, posts_par }, /* IP */
         { pres_bline, posts_par }, /* HP */          { pres_bline, posts_par }, /* HP */
         { pres_eline, NULL }, /* SM */          { NULL, NULL }, /* SM */
         { pres_eline, NULL }, /* SB */          { NULL, NULL }, /* SB */
         { NULL, NULL }, /* BI */          { NULL, NULL }, /* BI */
         { NULL, NULL }, /* IB */          { NULL, NULL }, /* IB */
         { NULL, NULL }, /* BR */          { NULL, NULL }, /* BR */
         { NULL, NULL }, /* RB */          { NULL, NULL }, /* RB */
         { pres_eline, NULL }, /* R */          { NULL, NULL }, /* R */
         { pres_eline, NULL }, /* B */          { NULL, NULL }, /* B */
         { pres_eline, NULL }, /* I */          { NULL, NULL }, /* I */
         { NULL, NULL }, /* IR */          { NULL, NULL }, /* IR */
         { NULL, NULL }, /* RI */          { NULL, NULL }, /* RI */
         { pres_bline, posts_eq0 }, /* na */          { pres_bline, posts_eq0 }, /* na */
Line 84  static const struct man_valid man_valids[MAN_MAX] = {
Line 84  static const struct man_valid man_valids[MAN_MAX] = {
         { pres_bline, posts_eq0 }, /* fi */          { pres_bline, posts_eq0 }, /* fi */
         { NULL, NULL }, /* r */          { NULL, NULL }, /* r */
         { NULL, NULL }, /* RE */          { NULL, NULL }, /* RE */
         { NULL, NULL }, /* RS */          { NULL, posts_part }, /* RS */
           { NULL, NULL }, /* DT */
 };  };
   
   
Line 139  static int
Line 140  static int
 check_root(CHKARGS)  check_root(CHKARGS)
 {  {
   
         /* FIXME: closing out explicit scope! */  
   
         /* XXX - make this into a warning? */  
         if (MAN_BLINE & m->flags)          if (MAN_BLINE & m->flags)
                 return(man_nerr(m, n, WEXITSCOPE));                  return(man_nwarn(m, n, WEXITSCOPE));
         /* XXX - make this into a warning? */  
         if (MAN_ELINE & m->flags)          if (MAN_ELINE & m->flags)
                 return(man_nerr(m, n, WEXITSCOPE));                  return(man_nwarn(m, n, WEXITSCOPE));
   
           m->flags &= ~MAN_BLINE;
           m->flags &= ~MAN_ELINE;
   
         if (NULL == m->first->child)          if (NULL == m->first->child)
                 return(man_nerr(m, n, WNODATA));                  return(man_nerr(m, n, WNODATA));
         if (NULL == m->meta.title)          if (NULL == m->meta.title)
Line 252  check_sec(CHKARGS)
Line 252  check_sec(CHKARGS)
   
   
 static int  static int
   check_part(CHKARGS)
   {
   
           if (MAN_BODY == n->type && 0 == n->nchild)
                   return(man_nwarn(m, n, WBODYARGS));
           return(1);
   }
   
   
   static int
 check_par(CHKARGS)  check_par(CHKARGS)
 {  {
   
Line 290  check_par(CHKARGS)
Line 300  check_par(CHKARGS)
   
   
 static int  static int
 check_eline(CHKARGS)  
 {  
   
         if (MAN_ELINE & m->flags)  
                 return(man_nerr(m, n, WLNSCOPE));  
         return(1);  
 }  
   
   
 static int  
 check_bline(CHKARGS)  check_bline(CHKARGS)
 {  {
   
           assert( ! (MAN_ELINE & m->flags));
         if (MAN_BLINE & m->flags)          if (MAN_BLINE & m->flags)
                 return(man_nerr(m, n, WLNSCOPE));  
         if (MAN_ELINE & m->flags)  
                 return(man_nerr(m, n, WLNSCOPE));                  return(man_nerr(m, n, WLNSCOPE));
         return(1);          return(1);
 }  }

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.23

CVSweb