version 1.8, 2009/02/23 12:45:19 |
version 1.9, 2009/02/23 15:19:47 |
Line 99 Both functions (see |
|
Line 99 Both functions (see |
|
and variables (see |
and variables (see |
.Sx Variables ) |
.Sx Variables ) |
may use the following types: |
may use the following types: |
.Bl -ohang |
.Bl -ohang -offset "XXXX" |
.\" LIST-ITEM |
.\" LIST-ITEM |
.It Vt struct mdoc |
.It Vt struct mdoc |
An opaque type defined in |
An opaque type defined in |
|
|
.\" SUBSECTION |
.\" SUBSECTION |
.Ss Functions |
.Ss Functions |
Function descriptions follow: |
Function descriptions follow: |
.Bl -ohang |
.Bl -ohang -offset "XXXX" |
.\" LIST-ITEM |
.\" LIST-ITEM |
.It Fn mdoc_alloc |
.It Fn mdoc_alloc |
Allocates a parsing structure. The |
Allocates a parsing structure. The |
Line 165 return 0, the data will be incomplete. |
|
Line 165 return 0, the data will be incomplete. |
|
.\" SUBSECTION |
.\" SUBSECTION |
.Ss Variables |
.Ss Variables |
The following variables are also defined: |
The following variables are also defined: |
.Bl -ohang |
.Bl -ohang -offset "XXXX" |
.\" LIST-ITEM |
.\" LIST-ITEM |
.It Va mdoc_macronames |
.It Va mdoc_macronames |
An array of string-ified token names. |
An array of string-ified token names. |
|
|
The tree itself is arranged according to the following normal form, |
The tree itself is arranged according to the following normal form, |
where capitalised non-terminals represent nodes. |
where capitalised non-terminals represent nodes. |
.Pp |
.Pp |
.Bl -tag -width "ELEMENTXX" -compact |
.Bl -tag -width "ELEMENTXX" -compact -offset "XXXX" |
.\" LIST-ITEM |
.\" LIST-ITEM |
.It ROOT |
.It ROOT |
\(<- mnode+ |
\(<- mnode+ |
Line 272 Note that, if the last line of the file isn't newline- |
|
Line 272 Note that, if the last line of the file isn't newline- |
|
will truncate the file's last character (see |
will truncate the file's last character (see |
.Xr fgetln 3 ) . |
.Xr fgetln 3 ) . |
Further, this example does not error-check nor free memory upon failure. |
Further, this example does not error-check nor free memory upon failure. |
.Bd -literal |
.Bd -literal -offset "XXXX" |
struct mdoc *mdoc; |
struct mdoc *mdoc; |
struct mdoc_node *node; |
struct mdoc_node *node; |
char *buf; |
char *buf; |
|
|
.Xr groff 1 |
.Xr groff 1 |
system bundled with |
system bundled with |
.Ox . |
.Ox . |
|
.\" PARAGRAPH |
.Pp |
.Pp |
Un-implemented: the |
Un-implemented: the |
.Sq \&Xc |
.Sq \&Xc |
Line 327 macros aren't handled when used to span lines for the |
|
Line 328 macros aren't handled when used to span lines for the |
|
.Sq \&It |
.Sq \&It |
macro. Such usage is specifically discouraged in |
macro. Such usage is specifically discouraged in |
.Xr mdoc.samples 7 . |
.Xr mdoc.samples 7 . |
|
.\" PARAGRAPH |
.Pp |
.Pp |
Bugs: when |
Bugs: when |
.Sq \&It \-column |
.Sq \&It \-column |
is invoked, whitespace is not stripped around |
is invoked, whitespace is not stripped around |
.Sq \&Ta |
.Sq \&Ta |
or tab-character separators. |
or tab-character separators. |
|
.\" PARAGRAPH |
.Pp |
.Pp |
|
Bugs: elements within columns for |
|
.Sq \&It \-column |
|
are not yet supported. |
|
.\" PARAGRAPH |
|
.Pp |
Incompatible: the |
Incompatible: the |
.Sq \&At |
.Sq \&At |
macro only accepts a single parameter. Furthermore, several macros |
macro only accepts a single parameter. Furthermore, several macros |
.Pf ( Sq \&Pp , |
.Pf ( Sq \&Pp , |
.Sq \&It , |
.Sq \&It , |
and possibly others) accept multiple arguments with a warning. |
and possibly others) accept multiple arguments with a warning. |
|
.\" PARAGRAPH |
.Pp |
.Pp |
Incompatible: only those macros specified by |
Incompatible: only those macros specified by |
.Xr mdoc.samples 7 |
.Xr mdoc.samples 7 |