+/*
+ * Numbered character to literal character.
+ * This can only be a printable character (i.e., alnum, punct, space) so
+ * prevent the character from ruining our state (backspace, newline, and
+ * so on).
+ * If the character is illegal, returns '\0'.
+ */
+char
+mchars_num2char(const char *p, size_t sz)
+{
+ int i;
+
+ if ((i = mandoc_strntou(p, sz, 10)) < 0)
+ return('\0');
+
+ return(isprint(i) ? i : '\0');
+}