fmt_8long(3)
π fmt_8long(3) β Library Functions Manual β¨
okay so bestie, lemme put you on to something. this is fmt_8long, from the library functions manual, and she's literally the moment. no cap.
π NAME π
fmt_8long β write an octal ASCII representation of an unsigned long integer π
like... she takes your number and spells it out in octal. that's the whole gig. iconic behavior honestly.
β¨ SYNTAX β¨
#include <libowfat/fmt.h>
size_t fmt_8long(char *dest,size_t source);
that's it. two params, one header, zero drama. π
π¦ DESCRIPTION π¦
okay so here's the tea. fmt_8long writes an ASCII representation of source to dest, using the digits '0' to '7' β that's base 8, babes β and then it returns the number of bytes it wrote. slay. π
one thing though: fmt_8long does not append \0. nope. not even a little one. it's giving "you're on your own for the terminator" energy and honestly? valid. π
but wait, there's more. if dest equals FMT_LEN β which, jsyk, means it is zero β then fmt_8long returns the number of bytes it would have written. so you can literally vibe check how much space you need before committing. main character foresight fr fr. π
and for convenience?? fmt.h defines the integer FMT_8LONG to be big enough to contain every possible fmt_8long output plus \0. every single one. so if you're allocating, that's your girl. π
lowkey important: no \0, so don't be out here treating it like a C string unless you add one yourself. iykyk. π
πΈ SEE ALSO πΈ
scan_8long(3)β the other half of the duo, she reads what this one writes π«Ά
k that's the whole page bestie, go forth and format your octal numbers like the icon you are ππ
this has been fmt_8long(3) from the Library Functions Manual, out here in these streets doing octal things, brought to you by the manual itself β mwah, ily, bye!! πβ¨π
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms