LOWDOWN_FILE_DIFF(3)

πŸ“¦
version 3.2.1 Β· 2 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… lowdown_file_diff β€” bestie edition

okay so this is LOWDOWN_FILE_DIFF(3), a manual page from the Library Functions Manual, and it lives in the library liblowdown. she's a diff girlie and she's about to eat. ✨


πŸ¦‹ NAME

lowdown_file_diff β€” parse and diff Markdown files into formatted output. yes bestie, both. parse AND diff. she's multitalented, it's giving main character energy fr fr. πŸ’–


πŸ“š LIBRARY

library β€œliblowdown” β€” that's the house she lives in, no cap. 🏠


✨ 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);

look at her signature, iconic. copy it exactly, don't freestyle the includes, i'm literally begging. 🫢


🌸 DESCRIPTION

so the way this works: she parses two lowdown(5) file streams, fnew and fold, and she produces an edit script in ret of size retsz, all according to the configurations in opts. it's a whole glow-up pipeline. 🧚

the output format? that's decided by opts->type. she doesn't guess, she reads the vibe check. ⭐

important bestie: on success, the caller is responsible for freeing ret. that's you. you're the caller. she's not gonna do it for you. free your girl. 😭

πŸ”₯ RETURN VALUES

  • returns zero on failure, non-zero on success. that's right, inverted from what you'd expect, and no she will not be explaining herself. πŸ™ˆ
  • failure happens when the file read failed, or on memory exhaustion. that's it, those are the two ways she goes down. πŸ’€
on failure, the contents of ret and retsz are undefined β€” do not touch, do not peek, do not build a personality around them. undefined is undefined and we respect the chaos. 🌈

πŸ‘‘ SEE ALSO

  • lowdown(3) β€” her sister, go say hi. πŸ’œ

and that's the whole page bestie, you ate. this was LOWDOWN_FILE_DIFF(3) from Debian, dated $Mdocdate$, and she's out here slaying on the daily. mwah, periodt. πŸŽ€πŸ’…πŸ¦‹βœ¨