summaryrefslogtreecommitdiffstats
path: root/mdoc_argv.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-02 22:48:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-02 22:48:17 +0000
commit9e6e3b6be0e9ffe29cf4876ce0b7ded2c3c386b9 (patch)
tree1a2bb3465096bc77a000c55dc5753148f39484ad /mdoc_argv.c
parentdd569c39747096c781c1cbec49b48a85ba29f23d (diff)
downloadmandoc-9e6e3b6be0e9ffe29cf4876ce0b7ded2c3c386b9.tar.gz
Second step towards parser unification:
Replace struct mdoc_node and struct man_node by a unified struct roff_node. To be able to use the tok member for both mdoc(7) and man(7) without defining all the macros in roff.h, sacrifice a tiny bit of type safety and make tok an int rather than an enum. Almost mechanical, no functional change. Written on the Eurostar from Bruxelles to London on the way to p2k15.
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r--mdoc_argv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 0f19f3c8..519fb9d7 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -276,7 +276,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = {
* Some flags take no argument, some one, some multiple.
*/
void
-mdoc_argv(struct mdoc *mdoc, int line, enum mdoct tok,
+mdoc_argv(struct mdoc *mdoc, int line, int tok,
struct mdoc_arg **reta, int *pos, char *buf)
{
struct mdoc_argv tmpv;
@@ -414,9 +414,9 @@ argn_free(struct mdoc_arg *p, int iarg)
enum margserr
mdoc_args(struct mdoc *mdoc, int line, int *pos,
- char *buf, enum mdoct tok, char **v)
+ char *buf, int tok, char **v)
{
- struct mdoc_node *n;
+ struct roff_node *n;
char *v_local;
enum argsflag fl;