buffer_putalign(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– buffer_putalign(3) πŸ’–

okay so this page comes from the Library Functions Manual β€” the header literally says buffer_putalign(3) on both sides, no cap. Let's get into it, bestie. 🫢


✨ NAME ✨

buffer_putalign β€” write binary data to buffer


🌸 SYNTAX 🌸

#include <libowfat/buffer.h>

int buffer_putalign(buffer* b,const char* x,size_t len);

πŸ¦‹ DESCRIPTION πŸ¦‹

buffer_putalign is basically buffer_put's sibling, fr fr. They're similar, but here's the glow-up:

The difference from buffer_put is all about when the flush happens. When there isn't enough space for new data, buffer_put calls buffer_flush before copying any data. But buffer_putalign? It fills all available space with data first, and only then calls buffer_flush. It's giving "use every last drop" energy. πŸ’…


πŸ‘‘ RETURN VALUE πŸ‘‘

  • 0 β€” everything is fine, we slay ✨
  • -1 β€” error, and it sets errno 😭

🌈 SEE ALSO 🌈


That's the whole vibe. The footer at the bottom is just buffer_putalign(3) again β€” no version, no date, just the name doing its little encore. Periodt. πŸ’œ