diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-09-18 15:54:49 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-09-18 15:54:49 +0000 |
commit | 0337c5ac54faf91532e88026ce56435641d4f390 (patch) | |
tree | a7b9b2d7dc8c18b343e6a8fa8a5bf30f50056946 /usr.bin/mandoc/man.c | |
parent | 7ef814e80d0c9c0a54668956096f0618bbf932e9 (diff) |
sync to version 1.11.7 from kristaps@
main new feature: support the roff(7) .tr request
plus various bugfixes and some refactoring
regressions are so minor that it's better to get this in
and fix them in the tree
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r-- | usr.bin/mandoc/man.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c index 85d213099dd..35eaf6ab72b 100644 --- a/usr.bin/mandoc/man.c +++ b/usr.bin/mandoc/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.60 2011/09/18 10:25:28 schwarze Exp $ */ +/* $Id: man.c,v 1.61 2011/09/18 15:54:48 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -316,16 +316,9 @@ int man_word_alloc(struct man *m, int line, int pos, const char *word) { struct man_node *n; - size_t sv, len; - - len = strlen(word); n = man_node_alloc(m, line, pos, MAN_TEXT, MAN_MAX); - n->string = mandoc_malloc(len + 1); - sv = strlcpy(n->string, word, len + 1); - - /* Prohibit truncation. */ - assert(sv < len + 1); + n->string = roff_strdup(m->roff, word); if ( ! man_node_append(m, n)) return(0); |