version 1.33, 2009/07/20 13:45:11 |
version 1.36, 2010/01/07 19:10:09 |
|
|
.Nd mdoc macro compiler library |
.Nd mdoc macro compiler library |
.\" SECTION |
.\" SECTION |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Fd #include <mdoc.h> |
.In mdoc.h |
.Vt extern const char * const * mdoc_macronames; |
.Vt extern const char * const * mdoc_macronames; |
.Vt extern const char * const * mdoc_argnames; |
.Vt extern const char * const * mdoc_argnames; |
.Ft "struct mdoc *" |
.Ft "struct mdoc *" |
|
|
mdoc = mdoc_alloc(NULL, 0, NULL); |
mdoc = mdoc_alloc(NULL, 0, NULL); |
|
|
while ((buf = fgetln(fp, &len))) { |
while ((buf = fgetln(fp, &len))) { |
buf[len - 1] = '\\0'; |
buf[len - 1] = '\e0'; |
if ( ! mdoc_parseln(mdoc, line, buf)) |
if ( ! mdoc_parseln(mdoc, line, buf)) |
errx(1, "mdoc_parseln"); |
errx(1, "mdoc_parseln"); |
line++; |
line++; |