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

Diff for /mandoc/libmdoc.h between version 1.6 and 1.12

version 1.6, 2009/04/12 19:45:26 version 1.12, 2009/07/06 09:21:24
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>   * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 29  struct mdoc {
Line 29  struct mdoc {
         struct mdoc_cb    cb;          struct mdoc_cb    cb;
         void             *htab;          void             *htab;
         int               flags;          int               flags;
 #define MDOC_HALT        (1 << 0)  #define MDOC_HALT        (1 << 0)       /* Error in parse. Halt. */
 #define MDOC_LITERAL     (1 << 1)  #define MDOC_LITERAL     (1 << 1)       /* In a literal scope. */
   #define MDOC_PBODY       (1 << 2)       /* In the document body. */
         int               pflags;          int               pflags;
         enum mdoc_next    next;          enum mdoc_next    next;
         struct mdoc_node *last;          struct mdoc_node *last;
Line 55  struct mdoc_macro {
Line 56  struct mdoc_macro {
         /* Reserved words in arguments treated as text. */          /* Reserved words in arguments treated as text. */
 };  };
   
 #define mdoc_nwarn(mdoc, node, type, fmt, ...) \  
                   mdoc_vwarn((mdoc), (node)->line, \  
                   (node)->pos, (type), (fmt), ##__VA_ARGS__)  
   
 #define mdoc_nerr(mdoc, node, fmt, ...) \  
                   mdoc_verr((mdoc), (node)->line, \  
                   (node)->pos, (fmt), ##__VA_ARGS__)  
   
 #define mdoc_warn(mdoc, type, fmt, ...) \  
                   mdoc_vwarn((mdoc), (mdoc)->last->line, \  
                   (mdoc)->last->pos, (type), (fmt), ##__VA_ARGS__)  
   
 #define mdoc_err(mdoc, fmt, ...) \  
                   mdoc_verr((mdoc), (mdoc)->last->line, \  
                   (mdoc)->last->pos, (fmt), ##__VA_ARGS__)  
   
 #define mdoc_msg(mdoc, fmt, ...) \  
                   mdoc_vmsg((mdoc), (mdoc)->last->line, \  
                   (mdoc)->last->pos, (fmt), ##__VA_ARGS__)  
   
 #define mdoc_pmsg(mdoc, line, pos, fmt, ...) \  
                   mdoc_vmsg((mdoc), (line), \  
                   (pos), (fmt), ##__VA_ARGS__)  
   
 #define mdoc_pwarn(mdoc, line, pos, type, fmt, ...) \  
                   mdoc_vwarn((mdoc), (line), \  
                   (pos), (type), (fmt), ##__VA_ARGS__)  
   
 #define mdoc_perr(mdoc, line, pos, fmt, ...) \  
                   mdoc_verr((mdoc), (line), \  
                   (pos), (fmt), ##__VA_ARGS__)  
   
 extern  const struct mdoc_macro *const mdoc_macros;  extern  const struct mdoc_macro *const mdoc_macros;
   
 __BEGIN_DECLS  __BEGIN_DECLS
   
 int               mdoc_vwarn(struct mdoc *, int, int,  /*
                         enum mdoc_warn, const char *, ...);   * When GCC2 is deprecated, most of these can be reverted to #define
 void              mdoc_vmsg(struct mdoc *, int, int,   * as mdoc_vXXX using __VA_ARGS__.  Until then, use real functions.
    */
   int               mdoc_vwarn(struct mdoc *, int, int, const char *, ...);
   int               mdoc_verr(struct mdoc *, int, int, const char *, ...);
   int               mdoc_nerr(struct mdoc *, const struct mdoc_node *,
                         const char *, ...);                          const char *, ...);
 int               mdoc_verr(struct mdoc *, int, int,  int               mdoc_warn(struct mdoc *, const char *, ...);
                         const char *, ...);  int               mdoc_err(struct mdoc *, const char *, ...);
   int               mdoc_pwarn(struct mdoc *, int, int, const char *, ...);
   int               mdoc_perr(struct mdoc *, int, int, const char *, ...);
 int               mdoc_macro(MACRO_PROT_ARGS);  int               mdoc_macro(MACRO_PROT_ARGS);
 int               mdoc_word_alloc(struct mdoc *,  int               mdoc_word_alloc(struct mdoc *,
                         int, int, const char *);                          int, int, const char *);

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

CVSweb