LOWDOWN_FILE(3)

NAME
lowdown_file - parse a Markdown file into formatted output

LIBRARY
liblowdown

SYNOPSIS
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
int
lowdown_file(const struct lowdown_opts *opts, FILE *in, char **ret, size_t *retsz, struct lowdown_metaq *metaq);

DESCRIPTION
Parses a lowdown(5) file stream in into an output buffer ret of size retsz according to configuration opts. The output format is specified by opts->type. If LOWDOWN_SMARTY is set in opts->feat and metaq is not NULL, metaq is filled with metadata rendered in the given output format.

On success, the caller is responsible for freeing ret and metaq.

RETURN VALUES
Returns zero on failure, non-zero on success. Failure occurs only if the file read failed.

SEE ALSO
lowdown(3), lowdown_metaq_free(3)

CAVEATS
The lowdown_file() function will invoke exit(3) if internal memory allocation fails. There is no way to catch this condition.