summaryrefslogtreecommitdiffstats
path: root/libroff.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
commit80339b751a1833d9bbbf9856e7f48f56d91ba1d3 (patch)
tree4e59124e25202b7fa3543b670ae8434c1256cd45 /libroff.h
parent7ff718a5d9d20e97b6431bb61dc4cb34a1f431c7 (diff)
downloadmandoc-80339b751a1833d9bbbf9856e7f48f56d91ba1d3.tar.gz
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 'libroff.h')
-rw-r--r--libroff.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/libroff.h b/libroff.h
index 6d236dbe..d3af0fde 100644
--- a/libroff.h
+++ b/libroff.h
@@ -27,8 +27,7 @@ enum tbl_part {
};
struct tbl_node {
- mandocmsg msg; /* status messages */
- void *data; /* privdata for messages */
+ struct mparse *parse; /* parse point */
int pos; /* invocation column */
int line; /* invocation line */
enum tbl_part part;
@@ -48,10 +47,7 @@ struct eqn_node {
struct eqn_node *next;
};
-#define TBL_MSG(tblp, type, line, col) \
- (*(tblp)->msg)((type), (tblp)->data, (line), (col), NULL)
-
-struct tbl_node *tbl_alloc(int, int, void *, mandocmsg);
+struct tbl_node *tbl_alloc(int, int, struct mparse *);
void tbl_restart(int, int, struct tbl_node *);
void tbl_free(struct tbl_node *);
void tbl_reset(struct tbl_node *);