LOWDOWN_ODT_FREE(3)
β¨ lowdown_odt_free(3) β¨
okay bestie, this is a page from the Library Functions Manual, and it's literally just about the one little cleanup function that goes with the OpenDocument renderer π
πΈ NAME πΈ
lowdown_odt_free β bestie, this is the one that frees a Markdown OpenDocument renderer π§
π LIBRARY π
it lives in the library βliblowdownβ π«Ά
π SYNOPSIS π
like, here's how you pull it in:
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
void
lowdown_odt_free(void *arg);
π DESCRIPTION π
so basically, lowdown_odt_free frees the OpenDocument renderer that you made earlier with lowdown_odt_new(3) β¨
and if arg is NULL? it literally does nothing. no drama, no crash, just vibes π
π¦ EXAMPLES π¦
okay so here's the whole girlboss pipeline β it parses b of length bsz and spits out βflatβ OpenDocument format π
struct lowdown_buf *out;
struct lowdown_doc *doc;
struct lowdown_node *n;
void *rndr;
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_odt_new(NULL)) == NULL)
err(1, NULL);
if (!lowdown_odt_rndr(out, rndr, n))
err(1, NULL);
fwrite(out->data, 1, out->size, stdout);
lowdown_odt_free(rndr);
lowdown_buf_free(out);
lowdown_node_free(n);
lowdown_doc_free(doc);
see how everything you allocated gets freed at the end? we love a clean exit, no cap πβ¨
π SEE ALSO π
β STANDARDS β
the referenced OpenDocument standard is 1.3: https://docs.oasis-open.org/office/OpenDocument/v1.3/ π
and that's the whole page, bestie π«Ά this came from the Debian build of the manual, dated $Mdocdate$, filed under LOWDOWN_ODT_FREE(3) β go free your renderers, you icon π
β¨
π¦ 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