Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
mchars_alloc, mchars_free, mchars_num2char, mchars_num2uc, mchars_spec2cp, mchars_spec2str — character table for mandocLIBRARY
Mandoc Macro Compiler Library (libmandoc, -lmandoc)SYNOPSIS
#include <sys/types.h>#include <mandoc.h>
mchars_alloc(void);
mchars_free(struct mchars *table);
mchars_num2char(const char *decimal, size_t sz);
mchars_num2uc(const char *hexadecimal, size_t sz);
mchars_spec2cp(const struct mchars *table, const char *name, size_t sz);
mchars_spec2str(const struct mchars *table, const char *name, size_t sz, size_t *rsz);
mchars_uc2str(int codepoint);
DESCRIPTION
These functions translate Unicode character numbers and roff(7) character names into glyphs. See mandoc_char(7) for a list of roff(7) special characters. These functions are intended for external use by programs formatting mdoc(7) and man(7) pages for output, for example the mandoc(1) output formatter modules and makewhatis(8). The decimal, hexadecimal, name, and size input arguments are usually obtained from the mandoc_escape(3) parser function.FILES
These funtions are implemented in the file chars.c.HISTORY
These functions and their predecessors have been available since the following mandoc versions:function | since | predecessor | since |
mchars_alloc() | 1.11.3 | ascii2htab() | 1.5.3 |
mchars_free() | 1.11.2 | asciifree() | 1.6.0 |
mchars_num2char() | 1.11.2 | chars_num2char() | 1.10.10 |
mchars_num2uc() | 1.11.3 | — | — |
mchars_spec2cp() | 1.11.2 | chars_spec2cp() | 1.10.5 |
mchars_spec2str() | 1.11.2 | a2ascii() | 1.5.3 |
mchars_uc2str() | 1.13.2 | — | — |