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

Diff for /mandoc/Attic/validate.c between version 1.11 and 1.12

version 1.11, 2009/01/01 20:40:16 version 1.12, 2009/01/02 09:29:06
Line 29  typedef int (*v_args)(struct mdoc *, int, int, int, 
Line 29  typedef int (*v_args)(struct mdoc *, int, int, int, 
 typedef int     (*v_post)(struct mdoc *, int, int);  typedef int     (*v_post)(struct mdoc *, int, int);
   
 static  int       need_head_child(struct mdoc *, int, int);  static  int       need_head_child(struct mdoc *, int, int);
   static  int       no_head_child(struct mdoc *, int, int);
   
 static  int       assert_eq0(struct mdoc *, int, int, int);  static  int       assert_eq0(struct mdoc *, int, int, int);
 static  int       assert_le1(struct mdoc *, int, int, int);  static  int       assert_le1(struct mdoc *, int, int, int);
Line 59  struct valids {
Line 60  struct valids {
 };  };
   
   
   /*
    * FIXME: have arrays of function pointers in case we want multiple
    * check callbacks per macro.
    */
   
 const   struct valids mdoc_valids[MDOC_MAX] = {  const   struct valids mdoc_valids[MDOC_MAX] = {
         { NULL, NULL, NULL }, /* \" */          { NULL, NULL, NULL }, /* \" */
         { NULL, NULL, NULL }, /* Dd */ /* TODO */          { NULL, NULL, NULL }, /* Dd */ /* TODO */
Line 70  const struct valids mdoc_valids[MDOC_MAX] = {
Line 76  const struct valids mdoc_valids[MDOC_MAX] = {
         { NULL, args_blocknest, need_head_child }, /* D1 */          { NULL, args_blocknest, need_head_child }, /* D1 */
         { NULL, args_blocknest, need_head_child }, /* Dl */          { NULL, args_blocknest, need_head_child }, /* Dl */
         { NULL, args_blocknest, NULL }, /* Bd */          { NULL, args_blocknest, NULL }, /* Bd */
         { NULL, NULL, NULL }, /* Ed */          { NULL, NULL, no_head_child }, /* Ed */
         { NULL, NULL, NULL }, /* Bl */          { NULL, NULL, NULL }, /* Bl */
         { NULL, NULL, NULL }, /* El */          { NULL, NULL, no_head_child }, /* El */
         { NULL, NULL, NULL }, /* It */          { NULL, NULL, NULL }, /* It */
         { need_ge1, NULL, NULL }, /* Ad */          { need_ge1, NULL, NULL }, /* Ad */
         { NULL, NULL, NULL }, /* An */          { NULL, NULL, NULL }, /* An */
Line 238  need_ge1(struct mdoc *mdoc, int tok, int pos, int sz)
Line 244  need_ge1(struct mdoc *mdoc, int tok, int pos, int sz)
         if (sz > 0)          if (sz > 0)
                 return(1);                  return(1);
         return(mdoc_err(mdoc, tok, pos, ERR_ARGS_GE1));          return(mdoc_err(mdoc, tok, pos, ERR_ARGS_GE1));
   }
   
   
   static int
   no_head_child(struct mdoc *mdoc, int tok, int pos)
   {
   
           /* TODO */
           return(1);
 }  }
   
   

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

CVSweb