diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-28 14:17:11 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-28 14:17:11 +0000 |
commit | 005bcc6b1d086c580bddac2fb6d976b3388902be (patch) | |
tree | 67613d40079cd746f01ff372fed13ffefd83cfe4 /mdoc.c | |
parent | 596c0de84c5a8a499213ec024d61c49876b11167 (diff) | |
download | mandoc-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |