From 28dbd78db68ddebbe43fda7d4abefd2d6257d286 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 18 Jun 2009 10:53:58 +0000 Subject: Moved all formatted libman warn/error into man.c/libman.h. Converted all formatted warn/errors into regular syntax. --- libman.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libman.h') diff --git a/libman.h b/libman.h index 14484960..8d3761ef 100644 --- a/libman.h +++ b/libman.h @@ -38,8 +38,28 @@ struct man { struct man_meta meta; }; +enum merr { + WNPRINT, + WNMEM, + WMSEC, + WDATE, + WLNSCOPE, + WTSPACE, + WTQUOTE +}; + __BEGIN_DECLS +#define man_perr(m, l, p, t) \ + man_err((m), l, p, 1, (t)) +#define man_pwarn(m, l, p, t) \ + man_err((m), l, p, 0, (t)) +#define man_nerr(m, n, t) \ + man_err((m), (n)->line, (n)->pos, 1, (t)) +#define man_nwarn(m, n, t) \ + man_err((m), (n)->line, (n)->pos, 0, (t)) + +int man_err(struct man *, int, int, int, enum merr); int man_word_alloc(struct man *, int, int, const char *); int man_elem_alloc(struct man *, int, int, int); void man_node_free(struct man_node *); -- cgit