LOWDOWN_NROFF_FREE(3)
π LOWDOWN_NROFF_FREE(3) π
okay bestie, sit down, hydrate, and let's talk about lowdown_nroff_free β she's the cleanup queen of the Markdown roff renderer world π
and yes, she lives in the library liblowdown β¨
πΈ SYNOPSIS πΈ
like, here's how you summon her, fr fr:
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
void
lowdown_nroff_free(void *arg);
π DESCRIPTION π
So basically? She frees the roff renderer that you made earlier with lowdown_nroff_new(3). That's it. That's the whole job. And honestly? Iconic. No drama, no notes π
and ifargisNULL? She literally just does nothing. no crash, no vibe check fail, just vibes π¦
β¨ EXAMPLES β¨
here's the moment you've been waiting for β the glow-up sequence π This parses b of length bsz and outputs in groff_ms(7) 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_nroff_new(NULL)) == NULL)
err(1, NULL);
if (!lowdown_nroff_rndr(out, rndr, n))
err(1, NULL);
fwrite(out->data, 1, out->size, stdout);
lowdown_nroff_free(rndr);
lowdown_buf_free(out);
lowdown_node_free(n);
lowdown_doc_free(doc);
see how she shows up at the end to clean up? that's main character energy, that's knowing when to exit the group chat πβ¨
π«Ά SEE ALSO π«Ά
π§ a lil lore drop, bestie π§
this one uses both the original troff man macros for Version 7 AT&T UNIX, defined in man(7), and the man-ext groff extensions. and guess what β both of them are implemented in mandoc π
the troff ms macros are defined in groff_ms(7), along with the mspdf groff extensions described in "Portable Document Format Publishing with GNU Troff" by Keith Marshall. and those two? neither are implemented in mandoc π so like, know that going in, okay?
lowkey the whole thing is giving "clean up after yourself" and honestly we love a responsible queen π
and that's the tea π this page came from Debian, version $Mdocdate$ β mwah, periodt ππ
π¦ where this page comes from
- 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
- 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms