aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.c
diff options
context:
space:
mode:
Diffstat (limited to 'man.c')
-rw-r--r--man.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/man.c b/man.c
index 66c6c3e6..dedf62e7 100644
--- a/man.c
+++ b/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.141 2014/10/20 15:50:24 schwarze Exp $ */
+/* $Id: man.c,v 1.142 2014/11/03 23:18:39 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -315,6 +315,21 @@ man_word_alloc(struct man *man, int line, int pos, const char *word)
return(1);
}
+void
+man_word_append(struct man *man, const char *word)
+{
+ struct man_node *n;
+ char *addstr, *newstr;
+
+ n = man->last;
+ addstr = roff_strdup(man->roff, word);
+ mandoc_asprintf(&newstr, "%s %s", n->string, addstr);
+ free(addstr);
+ free(n->string);
+ n->string = newstr;
+ man->next = MAN_NEXT_SIBLING;
+}
+
/*
* Free all of the resources held by a node. This does NOT unlink a
* node from its context; for that, see man_node_unlink().