From d88ee3ac2243555d08d940053b987b819361b703 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 3 Jul 2010 16:02:12 +0000 Subject: Rudimentary implementation of user-defined strings; no time for more refinement right now. In particular, fixes terminfo(3) and mdoc.samples(7). ok kristaps@, who will add the HTML frontend bits --- term.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'term.c') diff --git a/term.c b/term.c index 6583f66d..02aedef6 100644 --- a/term.c +++ b/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.157 2010/07/02 10:50:50 kristaps Exp $ */ +/* $Id: term.c,v 1.158 2010/07/03 16:02:12 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -30,6 +30,7 @@ #include "mandoc.h" #include "chars.h" #include "out.h" +#include "regs.h" #include "term.h" #include "main.h" @@ -377,6 +378,11 @@ res(struct termp *p, const char *word, size_t len) size_t sz; rhs = chars_a2res(p->symtab, word, len, &sz); + if (NULL == rhs) { + rhs = roff_getstrn(word, len); + if (rhs) + sz = strlen(rhs); + } if (rhs) encode(p, rhs, sz); } -- cgit v1.2.3