---
name: "lowdown_file_diff"
section: "3"
platform: "linux"
package: "lowdown"
version: "3.2.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/lowdown_file_diff"
---

# lowdown\_file\_diff(3)

parse and diff Markdown files into formatted output

## NAME

**lowdown\_file\_diff** – parse and diff Markdown files into formatted output

## LIBRARY

library “liblowdown”

## SYNOPSIS

**#include \<sys/queue.h\>**

**#include \<stdio.h\>**

**#include \<lowdown.h\>**

*int*\

**lowdown\_file\_diff**(*const struct lowdown\_opts \*opts*, *FILE \*fnew*, *FILE \*fold*, *char \*\*ret*, *size\_t \*retsz*);

## DESCRIPTION

Parses [lowdown(5)](/lowdown/5.md) file streams *fnew* and *fold* and produces an edit script in *ret* of size *retsz* according to configurations *opts*. The output format is specified by *opts-\>type*.

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 or on memory exhaustion. On failure, the contents of *ret* and *retsz* are undefined.

## SEE ALSO

[lowdown(3)](/lowdown/3.md)
