X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/89c4b06f4c8f02f6fac64246bbb71291d21f2529..4a599f470e8524900db79db76d5a05dca9ce00f7:/roff.c diff --git a/roff.c b/roff.c index 49d7cccd..33361402 100644 --- a/roff.c +++ b/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.223 2014/08/01 15:08:46 schwarze Exp $ */ +/* $Id: roff.c,v 1.226 2014/08/19 16:52:32 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -15,9 +15,9 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif + +#include #include #include @@ -27,8 +27,8 @@ #include "mandoc.h" #include "mandoc_aux.h" -#include "libroff.h" #include "libmandoc.h" +#include "libroff.h" /* Maximum number of nested if-else conditionals. */ #define RSTACK_MAX 128 @@ -1975,7 +1975,7 @@ roff_so(ROFF_ARGS) char *name; name = *bufp + pos; - mandoc_vmsg(MANDOCERR_SO, r->parse, ln, ppos, ".so %s", name); + mandoc_vmsg(MANDOCERR_SO, r->parse, ln, ppos, "so %s", name); /* * Handle `so'. Be EXTREMELY careful, as we shouldn't be @@ -2067,7 +2067,8 @@ roff_getname(struct roff *r, char **cpp, int ln, int pos) cp++; if ('\\' == *cp) continue; - mandoc_msg(MANDOCERR_NAMESC, r->parse, ln, pos, NULL); + mandoc_vmsg(MANDOCERR_NAMESC, r->parse, ln, pos, + "%.*s", (int)(cp - name + 1), name); mandoc_escape((const char **)&cp, NULL, NULL); break; }