LOWDOWN_TERM_FREE(3)
π LOWDOWN_TERM_FREE(3) π
okay so bestie, welcome to the manual page for lowdown_term_free β yes it's a Library Functions Manual entry, and yes it lives in library βliblowdownβ. it does exactly one thing and it does it flawlessly. we love a focused queen. π
β¨ NAME β¨
lowdown_term_free β free an Markdown terminal renderer π
π LIBRARY π
library βliblowdownβ β that's where she lives, that's her home, that's her whole vibe. π π
π SYNOPSIS π
like, here's how you summon her:
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
void
lowdown_term_free(void *arg);
no cap, that's the whole thing. β¨
π¦ DESCRIPTION π¦
so basically: this function frees the terminal renderer that you made earlier with lowdown_term_new(3). renderer did its job, renderer gets to rest now. retirement arc. π«Ά
and like, super important, bestie β if arg is NULL, the function does nothing. it literally just vibes. no crash, no drama, no chaos. it's giving "calm down, it's fine." πβ¨
π EXAMPLES π
here's the moment you've been waiting for β this parses b of length bsz and outputs in ANSI terminal format. iconic behaviour, honestly:
struct lowdown_buf *out;
struct lowdown_doc *doc;
struct lowdown_node *n;
void *rndr;
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL)
err(1, NULL);
if ((doc = lowdown_doc_new(NULL)) == NULL)
err(1, NULL);
if ((n = lowdown_doc_parse(doc, NULL, b, bsz, NULL)) == NULL)
err(1, NULL);
if ((out = lowdown_buf_new(256)) == NULL)
err(1, NULL);
if ((rndr = lowdown_term_new(NULL)) == NULL)
err(1, NULL);
if (!lowdown_term_rndr(out, rndr, n))
err(1, NULL);
fwrite(out->data, 1, out->size, stdout);
lowdown_term_free(rndr);
lowdown_buf_free(out);
lowdown_node_free(n);
lowdown_doc_free(doc);
see how she's at the top of the cleanup squad? lowdown_term_free(rndr) first, then lowdown_buf_free(out), then lowdown_node_free(n), then lowdown_doc_free(doc). clean up your room, bestie. π§Ήβ¨ main character energy fr fr.
π SEE ALSO π
go read those too, iykyk. π
π STANDARDS π
ANSI escape codes are described in ISO/IEC 6429, previously ECMA-48. nerd lore, but we respect it. π€β¨
and that's the whole page, bestie! this one's from the Debian crew, version$Mdocdate$, and yeah the footer saysLOWDOWN_TERM_FREE(3)because that's literally her name. slay, free your renderers, hydrate, and log off responsibly. πππ¦πΈπ«Ά
π¦ 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