diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-14 05:18:02 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-14 05:18:02 +0000 |
commit | 7a6eb8920bdea2ecc151b308352b2a98699b2350 (patch) | |
tree | 9860a766930f3997c413b0f0aecd6ba815b80f25 /mdoc_argv.c | |
parent | 0ef6626fcc16277d2fefb32e1830dfba3df5defd (diff) | |
download | mandoc-7a6eb8920bdea2ecc151b308352b2a98699b2350.tar.gz mandoc-7a6eb8920bdea2ecc151b308352b2a98699b2350.tar.zst mandoc-7a6eb8920bdea2ecc151b308352b2a98699b2350.zip |
Almost mechanical diff to remove the "struct mparse *" argument
from mandoc_msg(), where it is no longer used.
While here, rename mandoc_vmsg() to mandoc_msg() and retire the
old version: There is really no point in having another function
merely to save "%s" in a few places.
Minus 140 lines of code.
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r-- | mdoc_argv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c index 6fae24df..1e52699a 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.116 2018/08/17 20:33:37 schwarze Exp $ */ +/* $Id: mdoc_argv.c,v 1.117 2018/12/14 05:18:02 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org> @@ -453,8 +453,7 @@ args(struct roff_man *mdoc, int line, int *pos, if (buf[*pos] == '\0') { if (mdoc->flags & MDOC_PHRASELIT && ! (mdoc->flags & MDOC_PHRASE)) { - mandoc_msg(MANDOCERR_ARG_QUOTE, - mdoc->parse, line, *pos, NULL); + mandoc_msg(MANDOCERR_ARG_QUOTE, line, *pos, NULL); mdoc->flags &= ~MDOC_PHRASELIT; } return ARGS_EOLN; @@ -505,7 +504,7 @@ args(struct roff_man *mdoc, int line, int *pos, p = strchr(*v, '\0'); if (p[-1] == ' ') mandoc_msg(MANDOCERR_SPACE_EOL, - mdoc->parse, line, *pos, NULL); + line, *pos, NULL); *pos += (int)(p - *v); } @@ -553,7 +552,7 @@ args(struct roff_man *mdoc, int line, int *pos, if (buf[*pos] == '\0') { if ( ! (mdoc->flags & MDOC_PHRASE)) mandoc_msg(MANDOCERR_ARG_QUOTE, - mdoc->parse, line, *pos, NULL); + line, *pos, NULL); return ARGS_WORD; } @@ -567,8 +566,7 @@ args(struct roff_man *mdoc, int line, int *pos, (*pos)++; if ('\0' == buf[*pos]) - mandoc_msg(MANDOCERR_SPACE_EOL, mdoc->parse, - line, *pos, NULL); + mandoc_msg(MANDOCERR_SPACE_EOL, line, *pos, NULL); return ARGS_WORD; } |