diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-11-27 16:54:58 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-11-27 16:54:58 +0000 |
commit | 757654bf3db3f335e31ed99eff0744a5b6d0c5d1 (patch) | |
tree | d8b27757ac79941de0a81c2532582da0a5456f07 /dummy.c | |
parent | 249f2463dcbfa8d488b51bd70a458dbe79d25724 (diff) | |
download | mandoc-757654bf3db3f335e31ed99eff0744a5b6d0c5d1.tar.gz |
Considerable fixes.
Diffstat (limited to 'dummy.c')
-rw-r--r-- | dummy.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -36,6 +36,10 @@ static int md_dummy_text_out(int); static int md_dummy_special(int); static int md_dummy_head(void); static int md_dummy_tail(void); +static void md_dummy_msg(const struct md_args *, + enum roffmsg, const char *, + const char *, const char *, + int, char *); static void dbg_prologue(const char *); static void dbg_epilogue(void); @@ -91,6 +95,7 @@ md_init_dummy(const struct md_args *args, p->cb.roffblkin = md_dummy_blk_in; p->cb.roffblkout = md_dummy_blk_out; p->cb.roffspecial = md_dummy_special; + p->cb.roffmsg = md_dummy_msg; p->tree = roff_alloc(args, mbuf, rbuf, &p->cb); @@ -210,3 +215,24 @@ md_dummy_text_out(int tok) return(1); } + + +static void +md_dummy_msg(const struct md_args *args, enum roffmsg lvl, + const char *buf, const char *pos, + const char *name, int line, char *msg) +{ + char *p; + + switch (lvl) { + case (ROFF_WARN): + p = "warning"; + break; + case (ROFF_ERROR): + p = "error"; + break; + } + + assert(pos >= buf); + (void)fprintf(stderr, "%s:%d: %s: %s\n", name, line, p, msg); +} |