summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-18 16:04:41 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-18 16:04:41 +0000
commit4acc328420d73769e9005abd2f350a67fe1e6ebc (patch)
tree3ba777440105dec5ac0963f448b3fba02fb4bb65 /usr.bin/mandoc/man_macro.c
parent59652e050a8311d8419f5727c476f3f1fdb9a293 (diff)
Replace the structs mdoc and man by a unified struct roff_man.
Almost completely mechanical, no functional change. Written on the train from Exeter to London returning from p2k15.
Diffstat (limited to 'usr.bin/mandoc/man_macro.c')
-rw-r--r--usr.bin/mandoc/man_macro.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c
index e187b022c3f..003cc5dbad5 100644
--- a/usr.bin/mandoc/man_macro.c
+++ b/usr.bin/mandoc/man_macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_macro.c,v 1.66 2015/04/03 23:17:09 schwarze Exp $ */
+/* $OpenBSD: man_macro.c,v 1.67 2015/04/18 16:04:40 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -33,9 +33,9 @@ static void blk_close(MACRO_PROT_ARGS);
static void blk_exp(MACRO_PROT_ARGS);
static void blk_imp(MACRO_PROT_ARGS);
static void in_line_eoln(MACRO_PROT_ARGS);
-static int man_args(struct man *, int,
+static int man_args(struct roff_man *, int,
int *, char *, char **);
-static void rew_scope(struct man *, int);
+static void rew_scope(struct roff_man *, int);
const struct man_macro __man_macros[MAN_MAX] = {
{ in_line_eoln, MAN_NSCOPED }, /* br */
@@ -82,7 +82,7 @@ const struct man_macro * const man_macros = __man_macros;
void
-man_unscope(struct man *man, const struct roff_node *to)
+man_unscope(struct roff_man *man, const struct roff_node *to)
{
struct roff_node *n;
@@ -138,7 +138,7 @@ man_unscope(struct man *man, const struct roff_node *to)
*/
man->next = (man->last == to) ?
- MAN_NEXT_CHILD : MAN_NEXT_SIBLING;
+ ROFF_NEXT_CHILD : ROFF_NEXT_SIBLING;
}
/*
@@ -147,7 +147,7 @@ man_unscope(struct man *man, const struct roff_node *to)
* scopes. When a scope is closed, it must be validated and actioned.
*/
static void
-rew_scope(struct man *man, int tok)
+rew_scope(struct roff_man *man, int tok)
{
struct roff_node *n;
@@ -375,7 +375,7 @@ in_line_eoln(MACRO_PROT_ARGS)
}
assert(man->last->type != ROFFT_ROOT);
- man->next = MAN_NEXT_SIBLING;
+ man->next = ROFF_NEXT_SIBLING;
/*
* Rewind our element scope. Note that when TH is pruned, we'll
@@ -403,14 +403,14 @@ in_line_eoln(MACRO_PROT_ARGS)
void
-man_macroend(struct man *man)
+man_macroend(struct roff_man *man)
{
man_unscope(man, man->first);
}
static int
-man_args(struct man *man, int line, int *pos, char *buf, char **v)
+man_args(struct roff_man *man, int line, int *pos, char *buf, char **v)
{
char *start;