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_ascii.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_ascii.c')
-rw-r--r-- | term_ascii.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/term_ascii.c b/term_ascii.c index 079df118..9b5921ff 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -19,6 +19,7 @@ #include <sys/types.h> +#include <assert.h> #if HAVE_WCHAR #include <locale.h> #endif @@ -337,8 +338,7 @@ ascii_uc2str(int uc) "j", "DZ", "Dz", "dz", "'\bG", "'\bg", "HV", "W", "`\bN", "`\bn", "A", "a", "'\bAE","'\bae","O", "o"}; - if (uc < 0) - return("<?>"); + assert(uc >= 0); if ((size_t)uc < sizeof(tab)/sizeof(tab[0])) return(tab[uc]); return(mchars_uc2str(uc)); |