diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-28 18:49:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-28 18:49:33 +0000 |
commit | cfd3120c8be71fbcacc05d872ae13324d3a3685f (patch) | |
tree | 44c213480162767ae8a95830ad3cc955e8b19f1d /term.c | |
parent | e140259c6ca1889b0dddef8b075524723b147cfe (diff) | |
download | mandoc-cfd3120c8be71fbcacc05d872ae13324d3a3685f.tar.gz |
In -Tascii mode, print "<?>" only for Unicode escapes of unknown
representation, not for character escapes with unknown names.
According to groff, the latter produce no output, and we now warn
about them.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -458,9 +458,7 @@ term_word(struct termp *p, const char *word) if (p->enc == TERMENC_ASCII) { cp = mchars_spec2str(p->symtab, seq, sz, &ssz); - if (cp == NULL) - encode(p, "<?>", 3); - else + if (cp != NULL) encode(p, cp, ssz); } else { uc = mchars_spec2cp(p->symtab, seq, sz); @@ -690,14 +688,10 @@ term_strlen(const struct termp *p, const char *cp) sz += cond_width(p, c, &skip); break; case ESCAPE_SPECIAL: - if (p->enc == TERMENC_ASCII) { + if (p->enc == TERMENC_ASCII) rhs = mchars_spec2str(p->symtab, seq, ssz, &rsz); - if (rhs == NULL) { - rhs = "<?>"; - rsz = 3; - } - } else { + else { c = mchars_spec2cp(p->symtab, seq, ssz); if (c > 0) |