LOWDOWN_FILE_DIFF(3)

NAME
lowdown_file_diff - parse and diff Markdown files into formatted output

LIBRARY
liblowdown

SYNOPSIS
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
int
lowdown_file(const struct lowdown_opts *otarget, FILE *ftarget, const struct lowdown_opts *oorigin, FILE *forigin, char **ret, size_t *retsz);

DESCRIPTION
The lowdown_file() function parses Markdown file streams ftarget and forigin and produces an edit script in ret of size retsz according to configurations oorigin and otarget for the origin and target, respectively. The output format is specified by otarget->type.

Internally, lowdown_file_diff() invokes lowdown_buf_diff(3) with the read contents of ftarget and forigin.

On success, the caller is responsible for freeing ret.

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

SEE ALSO
lowdown(3)

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