[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.159 and 1.160

version 1.159, 2011/03/15 16:23:51 version 1.160, 2011/03/17 09:22:39
Line 74  static void  check_args(struct mdoc *, struct mdoc_nod
Line 74  static void  check_args(struct mdoc *, struct mdoc_nod
   
 static  int      concat(struct mdoc *, char *,  static  int      concat(struct mdoc *, char *,
                         const struct mdoc_node *, size_t);                          const struct mdoc_node *, size_t);
   static  enum mdoc_sec a2sec(const char *);
   
 static  int      ebool(POST_ARGS);  static  int      ebool(POST_ARGS);
 static  int      berr_ge1(POST_ARGS);  static  int      berr_ge1(POST_ARGS);
Line 321  static const enum mdoct rsord[RSORD_MAX] = {
Line 322  static const enum mdoct rsord[RSORD_MAX] = {
         MDOC__U          MDOC__U
 };  };
   
   static  const char * const secnames[SEC__MAX] = {
           NULL,
           "NAME",
           "LIBRARY",
           "SYNOPSIS",
           "DESCRIPTION",
           "IMPLEMENTATION NOTES",
           "RETURN VALUES",
           "ENVIRONMENT",
           "FILES",
           "EXIT STATUS",
           "EXAMPLES",
           "DIAGNOSTICS",
           "COMPATIBILITY",
           "ERRORS",
           "SEE ALSO",
           "STANDARDS",
           "HISTORY",
           "AUTHORS",
           "CAVEATS",
           "BUGS",
           "SECURITY CONSIDERATIONS",
           NULL
   };
   
 int  int
 mdoc_valid_pre(struct mdoc *mdoc, struct mdoc_node *n)  mdoc_valid_pre(struct mdoc *mdoc, struct mdoc_node *n)
Line 1821  post_sh_head(POST_ARGS)
Line 1846  post_sh_head(POST_ARGS)
         if ( ! concat(mdoc, buf, mdoc->last->child, BUFSIZ))          if ( ! concat(mdoc, buf, mdoc->last->child, BUFSIZ))
                 return(0);                  return(0);
   
         sec = mdoc_str2sec(buf);          sec = a2sec(buf);
   
         /* The NAME should be first. */          /* The NAME should be first. */
   
Line 2253  concat(struct mdoc *m, char *p, const struct mdoc_node
Line 2278  concat(struct mdoc *m, char *p, const struct mdoc_node
         }          }
   
         return(1);          return(1);
   }
   
   static enum mdoc_sec
   a2sec(const char *p)
   {
           int              i;
   
           for (i = 0; i < (int)SEC__MAX; i++)
                   if (secnames[i] && 0 == strcmp(p, secnames[i]))
                           return((enum mdoc_sec)i);
   
           return(SEC_CUSTOM);
 }  }
   

Legend:
Removed from v.1.159  
changed lines
  Added in v.1.160

CVSweb