diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-03 16:02:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-03 16:02:12 +0000 |
commit | bb8eca89831f88bbc271b59fb94e94b2db26ee1e (patch) | |
tree | a89a66e8a581c86f4a5ddb4614cdc8fe37f318a7 /term.c | |
parent | 63533c987d5ade538a926058188d4d64518a36f5 (diff) | |
download | mandoc-bb8eca89831f88bbc271b59fb94e94b2db26ee1e.tar.gz |
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
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); } |