From 005bcc6b1d086c580bddac2fb6d976b3388902be Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 28 Jul 2011 14:17:11 +0000 Subject: 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. --- man.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'man.c') diff --git a/man.c b/man.c index 9d480e10..52592d4a 100644 --- a/man.c +++ b/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.110 2011/07/27 12:43:02 kristaps Exp $ */ +/* $Id: man.c,v 1.111 2011/07/28 14:17:11 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * @@ -322,7 +322,7 @@ man_word_alloc(struct man *m, int line, int pos, const char *word) struct man_node *n; n = man_node_alloc(m, line, pos, MAN_TEXT, MAN_MAX); - n->string = mandoc_strdup(word); + n->string = roff_strdup(m->roff, word); if ( ! man_node_append(m, n)) return(0); -- cgit v1.2.3