[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.134 and 1.135

version 1.134, 2010/12/01 13:05:13 version 1.135, 2010/12/05 15:37:30
Line 42 
Line 42 
 #define POST_ARGS struct mdoc *mdoc  #define POST_ARGS struct mdoc *mdoc
   
 #define NUMSIZ    32  #define NUMSIZ    32
 #define DATESIZ   32  #define DATESIZE  32
   
 enum    check_ineq {  enum    check_ineq {
         CHECK_LT,          CHECK_LT,
Line 575  pre_display(PRE_ARGS)
Line 575  pre_display(PRE_ARGS)
 {  {
         struct mdoc_node *node;          struct mdoc_node *node;
   
         /* Display elements (`Bd', `D1'...) cannot be nested. */  
   
         if (MDOC_BLOCK != n->type)          if (MDOC_BLOCK != n->type)
                 return(1);                  return(1);
   
         /* LINTED */  
         for (node = mdoc->last->parent; node; node = node->parent)          for (node = mdoc->last->parent; node; node = node->parent)
                 if (MDOC_BLOCK == node->type)                  if (MDOC_BLOCK == node->type)
                         if (MDOC_Bd == node->tok)                          if (MDOC_Bd == node->tok)
                                 break;                                  break;
   
         if (NULL == node)          if (node)
                 return(1);                  mdoc_nmsg(mdoc, n, MANDOCERR_NESTEDDISP);
   
         mdoc_nmsg(mdoc, n, MANDOCERR_NESTEDDISP);          return(1);
         return(0);  
 }  }
   
   
Line 1951  pre_literal(PRE_ARGS)
Line 1947  pre_literal(PRE_ARGS)
 static int  static int
 post_dd(POST_ARGS)  post_dd(POST_ARGS)
 {  {
         char              buf[DATESIZ];          char              buf[DATESIZE];
         struct mdoc_node *n;          struct mdoc_node *n;
   
         n = mdoc->last;          n = mdoc->last;
Line 1961  post_dd(POST_ARGS)
Line 1957  post_dd(POST_ARGS)
                 return(1);                  return(1);
         }          }
   
         if ( ! concat(mdoc, buf, n->child, DATESIZ))          if ( ! concat(mdoc, buf, n->child, DATESIZE))
                 return(0);                  return(0);
   
         mdoc->meta.date = mandoc_a2time          mdoc->meta.date = mandoc_a2time

Legend:
Removed from v.1.134  
changed lines
  Added in v.1.135

CVSweb