=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/libmdoc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/mandoc/libmdoc.h 2009/06/14 23:00:57 1.3 --- src/usr.bin/mandoc/libmdoc.h 2009/06/15 02:19:32 1.4 *************** *** 1,4 **** ! /* $Id: libmdoc.h,v 1.3 2009/06/14 23:00:57 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: libmdoc.h,v 1.4 2009/06/15 02:19:32 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 55,60 **** --- 55,92 ---- /* 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; __BEGIN_DECLS *************** *** 65,81 **** const char *, ...); int mdoc_verr(struct mdoc *, int, int, const char *, ...); - int mdoc_nwarn(struct mdoc *, const struct mdoc_node *, - enum mdoc_warn, const char *, ...); - int mdoc_nerr(struct mdoc *, const struct mdoc_node *, - const char *, ...); - int mdoc_warn(struct mdoc *, enum mdoc_warn, const char *, ...); - int mdoc_err(struct mdoc *, const char *, ...); - void mdoc_msg(struct mdoc *, const char *, ...); - void mdoc_pmsg(struct mdoc *, int, int, const char *, ...); - int mdoc_pwarn(struct mdoc *, int, int, - enum mdoc_warn,const char *, ...); - int mdoc_perr(struct mdoc *, int, int, const char *, ...); int mdoc_macro(MACRO_PROT_ARGS); int mdoc_word_alloc(struct mdoc *, int, int, const char *); --- 97,102 ---- *************** *** 123,132 **** #define ARGS_QWORD (3) #define ARGS_PHRASE (4) - /* FIXME: get rid of these. */ - int xstrlcpys(char *, const struct mdoc_node *, size_t); - void *xrealloc(void *, size_t); - char *xstrdup(const char *); int mdoc_macroend(struct mdoc *); __END_DECLS --- 144,149 ----