diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-11-10 21:34:04 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-11-10 21:34:04 +0000 |
commit | 686b4d965f981326a795a8476888351e5cfe3ae9 (patch) | |
tree | 87840f049ebde49f20e8998f8f92ffb42b9de77e /mandoc.c | |
parent | ee4cd35f18e29bf02ffa319ff6f51e469f45a4da (diff) | |
download | mandoc-686b4d965f981326a795a8476888351e5cfe3ae9.tar.gz |
Support the alternative syntax \C'uXXXX' for Unicode characters.
It is already documented in the Heirloom troff manual,
and groff handles it as well.
Bug reported by Bjarni Ingi Gislason <bjarniig at rhi dot hi dot is>
on <bug-groff at gnu dot org>. Well, admittedly, that bug was reported
against groff, but mandoc was even more broken than groff with respect
to this syntax...
Diffstat (limited to 'mandoc.c')
-rw-r--r-- | mandoc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -93,8 +93,11 @@ mandoc_escape(const char const **end, const char const **start, int *sz) case ('C'): if ('\'' != **start) return(ESCAPE_ERROR); - gly = ESCAPE_SPECIAL; *start = ++*end; + if ('u' == (*start)[0] && '\'' != (*start)[1]) + gly = ESCAPE_UNICODE; + else + gly = ESCAPE_SPECIAL; term = '\''; break; |