aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-23 12:33:01 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-23 12:33:01 +0000
commit74625e09d203b8b3c31182a00609d7b437f942c7 (patch)
tree646420ad79fabfdff551e65ae3f0d88d53e6ed35 /man.c
parent59b868b33ab87a979c16a925dde7a6c778720608 (diff)
downloadmandoc-74625e09d203b8b3c31182a00609d7b437f942c7.tar.gz
mandoc-74625e09d203b8b3c31182a00609d7b437f942c7.tar.zst
mandoc-74625e09d203b8b3c31182a00609d7b437f942c7.zip
Add MAN_TAIL, which will be used by `UE' (forthcoming) and needs to be
used for `RE'.
Diffstat (limited to 'man.c')
-rw-r--r--man.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/man.c b/man.c
index 5bbaf2ba..ef37eeb2 100644
--- a/man.c
+++ b/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.105 2011/03/22 14:33:05 kristaps Exp $ */
+/* $Id: man.c,v 1.106 2011/03/23 12:33:01 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -203,6 +203,10 @@ man_node_append(struct man *man, struct man_node *p)
assert(MAN_BLOCK == p->parent->type);
p->parent->head = p;
break;
+ case (MAN_TAIL):
+ assert(MAN_BLOCK == p->parent->type);
+ p->parent->tail = p;
+ break;
case (MAN_BODY):
assert(MAN_BLOCK == p->parent->type);
p->parent->body = p;
@@ -261,6 +265,19 @@ man_elem_alloc(struct man *m, int line, int pos, enum mant tok)
int
+man_tail_alloc(struct man *m, int line, int pos, enum mant tok)
+{
+ struct man_node *p;
+
+ p = man_node_alloc(m, line, pos, MAN_TAIL, tok);
+ if ( ! man_node_append(m, p))
+ return(0);
+ m->next = MAN_NEXT_CHILD;
+ return(1);
+}
+
+
+int
man_head_alloc(struct man *m, int line, int pos, enum mant tok)
{
struct man_node *p;