buffer_fromarray(3)
π NAME π
buffer_fromarray β initialize buffer structure from array
β¨ SYNTAX β¨
#include <libowfat/array.h>
#include <libowfat/buffer.h>
void buffer_fromarray(buffer* b,array* a);
πΈ DESCRIPTION πΈ
okay bestie so buffer_fromarray makes a virtual read buffer out of an array. like, it's giving buffer energy but the data is lowkey just living in your array the whole time β¨
The buffer reading functions will be able to read until the end of the data in the array, and then β boom β they signal EOF. no drama, just done π
The buffer does not have its own buffer space, bestie. it reuses the one in the array. sharing is caring fr fr π«Ά
β οΈ Do not touch the array until you are done with the buffer! like literally hands off π the way that array is now the buffer's whole personality... don't be messing with it mid-read, i'm begging π
Reading data from the buffer will not change the stralloc. no cap, your data stays exactly where it is πβ¨
π¦ SEE ALSO π¦
and that's the whole page bestie π this little baddie came straight out of the Library Functions Manual, filed under buffer_fromarray(3) β go read the friends listed above, iykyk ππ
π¦ 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