Back (Current repo: lowdown)

fork of lowdown from https://kristaps.bsd.lv
To clone this repository:
git clone https://git.viktor1993.net/lowdown.git
Log | Download | Files | Refs | LICENSE

lowdown_file_diff.3 (1683B)


.\"	$Id$
.\"
.\" Copyright (c) 2018, 2020 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate$
.Dt LOWDOWN_FILE_DIFF 3
.Os
.Sh NAME
.Nm lowdown_file_diff
.Nd parse and diff Markdown files into formatted output
.Sh LIBRARY
.Lb liblowdown
.Sh SYNOPSIS
.In sys/queue.h
.In stdio.h
.In lowdown.h
.Ft int
.Fo lowdown_file_diff
.Fa "const struct lowdown_opts *opts"
.Fa "FILE *fnew"
.Fa "FILE *fold"
.Fa "char **ret"
.Fa "size_t *retsz"
.Fc
.Sh DESCRIPTION
Parses
.Xr lowdown 5
file streams
.Fa fnew
and
.Fa fold
and produces an edit script in
.Fa ret
of size
.Fa retsz
according to configurations
.Fa opts .
The output format is specified by
.Fa opts->type .
.Pp
On success, the caller is responsible for freeing
.Fa ret .
.Sh RETURN VALUES
Returns zero on failure, non-zero on success.
Failure occurs when the file read failed or on memory exhaustion.
On failure, the contents of
.Fa ret
and
.Fa retsz
are undefined.
.Sh SEE ALSO
.Xr lowdown 3