diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-29 00:17:43 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-10-29 00:17:43 +0000 |
commit | ada69bce757bdb8fff8d778e0660446c440c7613 (patch) | |
tree | c855535ac67e0f62353307e69e90b8952d8ecad3 /mandoc.h | |
parent | 3e8d538cdcbed1408b260186b980e5fa4eeb81af (diff) | |
download | mandoc-ada69bce757bdb8fff8d778e0660446c440c7613.tar.gz mandoc-ada69bce757bdb8fff8d778e0660446c440c7613.tar.zst mandoc-ada69bce757bdb8fff8d778e0660446c440c7613.zip |
In terminal output, unify handling of Unicode and numbered character
escape sequences just like it was earlier implemented for -Thtml.
Do not let control characters other than ASCII 9 (horizontal tab)
propagate to the output, even though groff allows them; but that
really doesn't look like a great idea.
Let mchars_num2char() return int such that we can distinguish invalid \N
syntax from \N'0'. This also reduces the danger of signed char issues
popping up.
Diffstat (limited to 'mandoc.h')
-rw-r--r-- | mandoc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.167 2014/10/28 17:36:19 schwarze Exp $ */ +/* $Id: mandoc.h,v 1.168 2014/10/29 00:17:43 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -425,7 +425,7 @@ __BEGIN_DECLS enum mandoc_esc mandoc_escape(const char **, const char **, int *); struct mchars *mchars_alloc(void); void mchars_free(struct mchars *); -char mchars_num2char(const char *, size_t); +int mchars_num2char(const char *, size_t); const char *mchars_uc2str(int); int mchars_num2uc(const char *, size_t); int mchars_spec2cp(const struct mchars *, |