=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.188 retrieving revision 1.189 diff -u -p -r1.188 -r1.189 --- mandoc/mdoc_macro.c 2015/04/05 23:04:41 1.188 +++ mandoc/mdoc_macro.c 2015/04/18 16:06:40 1.189 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.188 2015/04/05 23:04:41 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.189 2015/04/18 16:06:40 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -42,18 +42,19 @@ static void in_line_argn(MACRO_PROT_ARGS); static void in_line(MACRO_PROT_ARGS); static void phrase_ta(MACRO_PROT_ARGS); -static void append_delims(struct mdoc *, int, int *, char *); -static void dword(struct mdoc *, int, int, const char *, +static void append_delims(struct roff_man *, int, int *, char *); +static void dword(struct roff_man *, int, int, const char *, enum mdelim, int); -static int find_pending(struct mdoc *, int, int, int, +static int find_pending(struct roff_man *, int, int, int, struct roff_node *); -static int lookup(struct mdoc *, int, int, int, const char *); +static int lookup(struct roff_man *, int, int, int, const char *); static int macro_or_word(MACRO_PROT_ARGS, int); -static int parse_rest(struct mdoc *, int, int, int *, char *); +static int parse_rest(struct roff_man *, int, int, int *, char *); static int rew_alt(int); -static void rew_elem(struct mdoc *, int); -static void rew_last(struct mdoc *, const struct roff_node *); -static void rew_pending(struct mdoc *, const struct roff_node *); +static void rew_elem(struct roff_man *, int); +static void rew_last(struct roff_man *, const struct roff_node *); +static void rew_pending(struct roff_man *, + const struct roff_node *); const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { in_line_argn, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Ap */ @@ -208,7 +209,7 @@ const struct mdoc_macro * const mdoc_macros = __mdoc_m * are errors. */ void -mdoc_macroend(struct mdoc *mdoc) +mdoc_macroend(struct roff_man *mdoc) { struct roff_node *n; @@ -233,7 +234,7 @@ mdoc_macroend(struct mdoc *mdoc) * or as a line macro if from == MDOC_MAX. */ static int -lookup(struct mdoc *mdoc, int from, int line, int ppos, const char *p) +lookup(struct roff_man *mdoc, int from, int line, int ppos, const char *p) { int res; @@ -254,14 +255,14 @@ lookup(struct mdoc *mdoc, int from, int line, int ppos * Rewind up to and including a specific node. */ static void -rew_last(struct mdoc *mdoc, const struct roff_node *to) +rew_last(struct roff_man *mdoc, const struct roff_node *to) { struct roff_node *n, *np; if (to->flags & MDOC_VALID) return; - mdoc->next = MDOC_NEXT_SIBLING; + mdoc->next = ROFF_NEXT_SIBLING; while (mdoc->last != to) { /* * Save the parent here, because we may delete the @@ -283,7 +284,7 @@ rew_last(struct mdoc *mdoc, const struct roff_node *to * Rewind up to a specific block, including all blocks that broke it. */ static void -rew_pending(struct mdoc *mdoc, const struct roff_node *n) +rew_pending(struct roff_man *mdoc, const struct roff_node *n) { for (;;) { @@ -364,7 +365,7 @@ rew_alt(int tok) } static void -rew_elem(struct mdoc *mdoc, int tok) +rew_elem(struct roff_man *mdoc, int tok) { struct roff_node *n; @@ -382,7 +383,7 @@ rew_elem(struct mdoc *mdoc, int tok) * the rew_pending() call closing out the sub-block. */ static int -find_pending(struct mdoc *mdoc, int tok, int line, int ppos, +find_pending(struct roff_man *mdoc, int tok, int line, int ppos, struct roff_node *target) { struct roff_node *n; @@ -419,7 +420,7 @@ find_pending(struct mdoc *mdoc, int tok, int line, int * Punctuation consists of those tokens found in mdoc_isdelim(). */ static void -dword(struct mdoc *mdoc, int line, int col, const char *p, +dword(struct roff_man *mdoc, int line, int col, const char *p, enum mdelim d, int may_append) { @@ -453,7 +454,7 @@ dword(struct mdoc *mdoc, int line, int col, const char } static void -append_delims(struct mdoc *mdoc, int line, int *pos, char *buf) +append_delims(struct roff_man *mdoc, int line, int *pos, char *buf) { char *p; int la; @@ -617,7 +618,7 @@ blk_exp_close(MACRO_PROT_ARGS) */ if (maxargs) - mdoc->next = MDOC_NEXT_CHILD; + mdoc->next = ROFF_NEXT_CHILD; break; } @@ -1386,7 +1387,7 @@ in_line_eoln(MACRO_PROT_ARGS) if ((tok == MDOC_Pp || tok == MDOC_Lp) && ! (mdoc->flags & MDOC_SYNOPSIS)) { n = mdoc->last; - if (mdoc->next == MDOC_NEXT_SIBLING) + if (mdoc->next == ROFF_NEXT_SIBLING) n = n->parent; if (n->tok == MDOC_Nm) rew_last(mdoc, mdoc->last->parent); @@ -1412,7 +1413,7 @@ in_line_eoln(MACRO_PROT_ARGS) * or until the next macro, call that macro, and return 1. */ static int -parse_rest(struct mdoc *mdoc, int tok, int line, int *pos, char *buf) +parse_rest(struct roff_man *mdoc, int tok, int line, int *pos, char *buf) { int la;