aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libman.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-18 10:53:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-18 10:53:58 +0000
commit52078b04137667fec0f8506ad5417fffefd8f82d (patch)
tree206c99ff4874368c5c3874ffe02f5bee49456266 /libman.h
parente100896ec287b69a49978cc7502276f0759544b0 (diff)
downloadmandoc-52078b04137667fec0f8506ad5417fffefd8f82d.tar.gz
mandoc-52078b04137667fec0f8506ad5417fffefd8f82d.tar.zst
mandoc-52078b04137667fec0f8506ad5417fffefd8f82d.zip
Moved all formatted libman warn/error into man.c/libman.h.
Converted all formatted warn/errors into regular syntax.
Diffstat (limited to 'libman.h')
-rw-r--r--libman.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/libman.h b/libman.h
index 1a2329ea..8f1228d4 100644
--- a/libman.h
+++ b/libman.h
@@ -1,4 +1,4 @@
-/* $Id: libman.h,v 1.9 2009/06/10 20:18:43 kristaps Exp $ */
+/* $Id: libman.h,v 1.10 2009/06/18 10:53:58 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 *);