aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-28 14:17:11 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-28 14:17:11 +0000
commit005bcc6b1d086c580bddac2fb6d976b3388902be (patch)
tree67613d40079cd746f01ff372fed13ffefd83cfe4 /mdoc.c
parent596c0de84c5a8a499213ec024d61c49876b11167 (diff)
downloadmandoc-005bcc6b1d086c580bddac2fb6d976b3388902be.tar.gz
mandoc-005bcc6b1d086c580bddac2fb6d976b3388902be.tar.zst
mandoc-005bcc6b1d086c580bddac2fb6d976b3388902be.zip
An implementation of `tr'. This routes allocations of TEXT nodes
through libroff, which does the appropriate translations of `tr'. This is SLOW: it uses the backend of `ds' and `de', which is a simple linear list. However, unlike `ds' and `de', it iterates over EACH CHARACTER of the entire file looking for replacements.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index 2808326a..b2018205 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.194 2011/07/27 12:43:02 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.195 2011/07/28 14:17:11 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -570,7 +570,7 @@ mdoc_word_alloc(struct mdoc *m, int line, int pos, const char *p)
struct mdoc_node *n;
n = node_alloc(m, line, pos, MDOC_MAX, MDOC_TEXT);
- n->string = mandoc_strdup(p);
+ n->string = roff_strdup(m->roff, p);
if ( ! node_append(m, n))
return(0);