buffer_peekc(3)
β¨ NAME β¨
buffer_peekc β read one char from buffer π
π SYNTAX π
okay so first you gotta pull in the header, bestie:
#include <libowfat/buffer.h>
int buffer_peekc(buffer* b,char* x);
π DESCRIPTION π
So buffer_peekc(b,x) is literally the same vibe as buffer_get(b,x,1), except β and this is the whole point, the moment, the main character energy β it does not advance the buffer pointer. π«Ά
Which means if you call it again, or you call buffer_getc right after it, you get the exact same data again. It's giving "look but don't touch". It's giving window shopping. No cap. π¦
peek responsibly bestie, the pointer is staying exactly where it is πΈ
π₯ RETURN VALUE π₯
1β slay, success, you got your char π0β you've hit the end of the file, that's a wrap π₯²-1β there was an I/O error, and it setserrnoappropriately so you can go find out what went wrong π
π SEE ALSO π
and that's the tea, bestie π this lil icon lives in the Library Functions Manual, filed under buffer_peekc(3) β go peek at your buffers, but like, respectfully ππ§
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· 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 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