LOWDOWN_BUF_DIFF(3)
β¨ LOWDOWN_BUF_DIFF(3) β¨
okay bestie, pull up a chair π this one lives in the Library Functions Manual and it's serving from the liblowdown library. It's lowdown_buf β parse and diff Markdown buffers into formatted output. lowkey iconic. π¦
πΈ LIBRARY πΈ
It's from library βliblowdownβ, aka liblowdown. she's the moment. π
π SYNOPSIS π
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
int
lowdown_buf_diff(const struct lowdown_opts *opts, const char *new,
size_t newsz, const char *old, size_t oldsz, char **ret,
size_t *retsz);
π DESCRIPTION π
So the way this works is: it parses lowdown(5) buffers new (size newsz) and old (size oldsz), and it produces an edit script in ret of size retsz, all according to whatever configurations you put in opts. β¨
The script it gives you defines the differences from old to new. So like, old β‘οΈ new, that direction, no cap. π«Ά
The output format? That's specified by opts->type. You pick the vibe, it delivers. π
Not me forgetting this part β the caller is responsible for freeing ret. That's on you bestie, don't leak it. π
β RETURN VALUES β
- Returns zero on failure.
- Returns non-zero on success. π
Failure happens from memory exhaustion. that's the whole reason, fr fr. π
π¦ SEE ALSO π¦
that's the whole page bestie, go slay π
this one was brought to you by the Debian girlies, dated $Mdocdate$, and filed under LOWDOWN_BUF_DIFF(3) β periodt. ππ
π¦ where this page comes from
- alpine 3.24: lowdown-doc 3.0.1-r0 Β· ISC
- arch rolling: lowdown 3.2.1-1 Β· ISC
- debian trixie: liblowdown-dev 2.0.2-2 Β· ISC
- fedora 43: lowdown-libs 2.0.2-2.fc43 Β· ISC AND BSD-3-Clause AND MIT
- fedora 43: lowdown-libs 2.0.2-2.fc43 Β· ISC AND BSD-3-Clause AND MIT
- fedora 44: lowdown-libs 2.0.2-3.fc44 Β· ISC AND BSD-3-Clause AND MIT
- fedora 44: lowdown-libs 2.0.2-3.fc44 Β· ISC AND BSD-3-Clause AND MIT
- nixpkgs unstable: lowdown 3.0.1
- nixpkgs unstable: lowdown-unsandboxed 3.0.1
- opensuse-leap 16.0: lowdown-devel 1.1.0+git20231119.1200b9f-bp160.1.13 Β· ISC
- opensuse-leap 16.0: lowdown-devel 1.1.0+git20231119.1200b9f-bp160.1.13 Β· ISC
- opensuse-leap 16.0: lowdown-devel 1.1.0+git20231119.1200b9f-bp160.1.13 Β· ISC
- opensuse-leap 16.0: lowdown-devel 1.1.0+git20231119.1200b9f-bp160.1.13 Β· ISC
- ubuntu noble: liblowdown-dev 1.1.0-1 Β· ISC
- ubuntu questing: liblowdown-dev 2.0.2-2
- ubuntu resolute: liblowdown-dev 2.0.4-2 Β· ISC
- ubuntu stonking: liblowdown-dev 3.0.1-1 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms