version 1.37, 2016/07/07 19:19:01 |
version 1.39, 2017/05/17 23:39:31 |
|
|
.\" $Id$ |
.\" $Id$ |
.\" |
.\" |
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
.\" Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org> |
.\" Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org> |
.\" |
.\" |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" purpose with or without fee is hereby granted, provided that the above |
.\" purpose with or without fee is hereby granted, provided that the above |
|
|
.Nm mparse_reset , |
.Nm mparse_reset , |
.Nm mparse_result , |
.Nm mparse_result , |
.Nm mparse_strerror , |
.Nm mparse_strerror , |
.Nm mparse_strlevel |
.Nm mparse_strlevel , |
|
.Nm mparse_updaterc |
.Nd mandoc macro compiler library |
.Nd mandoc macro compiler library |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.In sys/types.h |
.In sys/types.h |
|
|
.Fo mparse_strlevel |
.Fo mparse_strlevel |
.Fa "enum mandoclevel" |
.Fa "enum mandoclevel" |
.Fc |
.Fc |
|
.Ft void |
|
.Fo mparse_updaterc |
|
.Fa "struct mparse *parse" |
|
.Fa "enum mandoclevel *rc" |
|
.Fc |
.In roff.h |
.In roff.h |
.Ft void |
.Ft void |
.Fo deroff |
.Fo deroff |
|
|
.Fn man_validate , |
.Fn man_validate , |
respectively; |
respectively; |
.It |
.It |
|
if information about the validity of the input is needed, fetch it with |
|
.Fn mparse_updaterc ; |
|
.It |
iterate over parse nodes with starting from the |
iterate over parse nodes with starting from the |
.Fa first |
.Fa first |
member of the returned |
member of the returned |
|
|
.In mandoc.h , |
.In mandoc.h , |
implemented in |
implemented in |
.Pa read.c . |
.Pa read.c . |
|
.It Fn mparse_updaterc |
|
If the highest warning or error level that occurred during the current |
|
.Fa parse |
|
is higher than |
|
.Pf * Fa rc , |
|
update |
|
.Pf * Fa rc |
|
accordingly. |
|
This is useful after calling |
|
.Fn mdoc_validate |
|
or |
|
.Fn man_validate . |
|
Declared in |
|
.In mandoc.h , |
|
implemented in |
|
.Pa read.c . |
.El |
.El |
.Ss Variables |
.Ss Variables |
.Bl -ohang |
.Bl -ohang |
Line 644 Using badly-nested blocks is |
|
Line 669 Using badly-nested blocks is |
|
.Em strongly discouraged ; |
.Em strongly discouraged ; |
for example, the |
for example, the |
.Fl T Ns Cm html |
.Fl T Ns Cm html |
and |
front-end to |
.Fl T Ns Cm xhtml |
|
front-ends to |
|
.Xr mandoc 1 |
.Xr mandoc 1 |
are unable to render them in any meaningful way. |
is unable to render them in any meaningful way. |
Furthermore, behaviour when encountering badly-nested blocks is not |
Furthermore, behaviour when encountering badly-nested blocks is not |
consistent across troff implementations, especially when using multiple |
consistent across troff implementations, especially when using multiple |
levels of badly-nested blocks. |
levels of badly-nested blocks. |