version 1.6, 2011/05/01 10:40:52 |
version 1.9, 2011/05/24 21:31:23 |
|
|
.Nm mchars_alloc , |
.Nm mchars_alloc , |
.Nm mchars_free , |
.Nm mchars_free , |
.Nm mchars_num2char , |
.Nm mchars_num2char , |
.Nm mchars_res2cp , |
.Nm mchars_num2uc , |
.Nm mchars_res2str , |
|
.Nm mchars_spec2cp , |
.Nm mchars_spec2cp , |
.Nm mchars_spec2str , |
.Nm mchars_spec2str , |
.Nm mdoc_meta , |
.Nm mdoc_meta , |
|
|
.Nm mparse_strerror , |
.Nm mparse_strerror , |
.Nm mparse_strlevel |
.Nm mparse_strlevel |
.Nd mandoc macro compiler library |
.Nd mandoc macro compiler library |
|
.Sh LIBRARY |
|
.Lb mandoc |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.In man.h |
.In man.h |
.In mdoc.h |
.In mdoc.h |
|
|
.Fn mchars_free "struct mchars *p" |
.Fn mchars_free "struct mchars *p" |
.Ft char |
.Ft char |
.Fn mchars_num2char "const char *cp" "size_t sz" |
.Fn mchars_num2char "const char *cp" "size_t sz" |
.Ft "const char *" |
|
.Fo mchars_res2str |
|
.Fa "struct mchars *p" |
|
.Fa "const char *cp" |
|
.Fa "size_t sz" |
|
.Fa "size_t *rsz" |
|
.Fc |
|
.Ft int |
.Ft int |
.Fo mchars_res2cp |
.Fn mchars_num2uc "const char *cp" "size_t sz" |
.Fa "struct mchars *p" |
|
.Fa "const char *cp" |
|
.Fa "size_t sz" |
|
.Ft "const char *" |
.Ft "const char *" |
.Fc |
|
.Ft "const char *" |
|
.Fo mchars_spec2str |
.Fo mchars_spec2str |
.Fa "struct mchars *p" |
.Fa "struct mchars *p" |
.Fa "const char *cp" |
.Fa "const char *cp" |
Line 188 library also contains routines for translating charact |
|
Line 177 library also contains routines for translating charact |
|
.Pq see Fn mchars_alloc |
.Pq see Fn mchars_alloc |
and parsing escape sequences from strings |
and parsing escape sequences from strings |
.Pq see Fn mandoc_escape . |
.Pq see Fn mandoc_escape . |
|
.Pp |
|
This library is |
|
.Ud |
.Sh REFERENCE |
.Sh REFERENCE |
This section documents the functions, types, and variables available |
This section documents the functions, types, and variables available |
via |
via |
Line 247 The object must be freed with |
|
Line 239 The object must be freed with |
|
Free an object created with |
Free an object created with |
.Fn mchars_alloc . |
.Fn mchars_alloc . |
.It Fn mchars_num2char |
.It Fn mchars_num2char |
Convert a character index as found in \eN\(aq\(aq into a printable |
Convert a character index (e.g., the \eN\(aq\(aq escape) into a |
character. |
printable ASCII character. |
Returns \e0 (the nil character) if the input sequence is malformed. |
Returns \e0 (the nil character) if the input sequence is malformed. |
.It Fn mchars_res2cp |
.It Fn mchars_num2uc |
Convert a predefined character into a valid Unicode codepoint. |
Convert a hexadecimal character index (e.g., the \e[uNNNN] escape) into |
Returns \-1 on failure and 0 if no code-point exists (if this occurs, |
a Unicode codepoint. |
the caller should fall back to |
Returns \e0 (the nil character) if the input sequence is malformed. |
.Fn mchars_res2str ) . |
|
.It Fn mchars_res2str |
|
Convert a predefined character into an ASCII string. |
|
Returns NULL on failure. |
|
.It Fn mchars_spec2cp |
.It Fn mchars_spec2cp |
Convert a special character into a valid Unicode codepoint. |
Convert a special character into a valid Unicode codepoint. |
Returns \-1 on failure and 0 if no code-point exists (if this occurs, |
Returns \-1 on failure and 0 if no code-point exists (if this occurs, |