summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2015-04-19 14:57:16 +0000
committerschwarze <schwarze@openbsd.org>2015-04-19 14:57:16 +0000
commite32c44d44d4f28d809d0c0876ba6e1da0df21214 (patch)
tree1a4adf8046ea2a8fcb9afaa600132c91676255b4 /usr.bin/mandoc/man.c
parentBump minor, regen .pc and header (diff)
downloadwireguard-openbsd-e32c44d44d4f28d809d0c0876ba6e1da0df21214.tar.xz
wireguard-openbsd-e32c44d44d4f28d809d0c0876ba6e1da0df21214.zip
Unify trickier node handling functions.
* man_elem_alloc() -> roff_elem_alloc() * man_block_alloc() -> roff_block_alloc() The functions mdoc_elem_alloc() and mdoc_block_alloc() remain for now because they need to do mdoc(7)-specific argument processing.
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r--usr.bin/mandoc/man.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c
index 9ac96abed33..91ef0a1db51 100644
--- a/usr.bin/mandoc/man.c
+++ b/usr.bin/mandoc/man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man.c,v 1.108 2015/04/19 14:25:05 schwarze Exp $ */
+/* $OpenBSD: man.c,v 1.109 2015/04/19 14:57:16 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -72,26 +72,6 @@ man_parseln(struct roff_man *man, int ln, char *buf, int offs)
man_ptext(man, ln, buf, offs));
}
-void
-man_elem_alloc(struct roff_man *man, int line, int pos, int tok)
-{
- struct roff_node *p;
-
- p = roff_node_alloc(man, line, pos, ROFFT_ELEM, tok);
- roff_node_append(man, p);
- man->next = ROFF_NEXT_CHILD;
-}
-
-void
-man_block_alloc(struct roff_man *man, int line, int pos, int tok)
-{
- struct roff_node *p;
-
- p = roff_node_alloc(man, line, pos, ROFFT_BLOCK, tok);
- roff_node_append(man, p);
- man->next = ROFF_NEXT_CHILD;
-}
-
static void
man_descope(struct roff_man *man, int line, int offs)
{
@@ -137,7 +117,7 @@ man_ptext(struct roff_man *man, int line, char *buf, int offs)
/* Allocate a blank entry. */
if (man->last->tok != MAN_SH &&
man->last->tok != MAN_SS) {
- man_elem_alloc(man, line, offs, MAN_sp);
+ roff_elem_alloc(man, line, offs, MAN_sp);
man->next = ROFF_NEXT_SIBLING;
}
return(1);