aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-20 16:02:05 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-20 16:02:05 +0000
commit71ddcd873082a3c68ed2be7b7661075fb09d5849 (patch)
tree7eb75a067079e8a591b76791b56f0b7673b109d5 /mandoc.h
parent58ca7d3112e5d39b93ab732cf103b4b0b834b106 (diff)
downloadmandoc-71ddcd873082a3c68ed2be7b7661075fb09d5849.tar.gz
mandoc-71ddcd873082a3c68ed2be7b7661075fb09d5849.tar.zst
mandoc-71ddcd873082a3c68ed2be7b7661075fb09d5849.zip
Consolidate messages. Have all parse-time messages (in libmdoc,
libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the time being in libmandoc.h. This requires struct mparse to be passed into the allocation routines instead of mandocmsg and a void pointer. Then, move some of the functionality of the old mmsg() into read.c's mparse_mmsg() (check against wlevel and setting of file_status) and use main.c's mmsg() as simply a printing tool.
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/mandoc.h b/mandoc.h
index cb793543..e5c867a4 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.62 2011/03/20 11:41:24 kristaps Exp $ */
+/* $Id: mandoc.h,v 1.63 2011/03/20 16:02:05 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -339,8 +339,8 @@ enum mparset {
MPARSE_MAN /* assume -man */
};
-typedef void (*mandocmsg)(enum mandocerr, void *,
- int, int, const char *);
+typedef void (*mandocmsg)(enum mandocerr, enum mandoclevel,
+ const char *, int, int, const char *);
typedef int (*mevt_open)(void *, const char *);
typedef void (*mevt_close)(void *, const char *);
@@ -353,8 +353,8 @@ __BEGIN_DECLS
void mparse_free(struct mparse *);
void mparse_reset(struct mparse *);
struct mparse *mparse_alloc(enum mparset, mevt_open,
- mevt_close, mandocmsg, void *);
-void mparse_setstatus(struct mparse *, enum mandoclevel);
+ mevt_close,
+ enum mandoclevel, mandocmsg, void *);
enum mandoclevel mparse_readfd(struct mparse *, int, const char *);
void mparse_result(struct mparse *, struct mdoc **, struct man **);