vrb_get_min(3)
π vrb_get_min(3) β get minimum data from a VRB β¨
okay so welcome to the vrb_get_min page bestie!! this one lives in the VRB Programmer's Manual and honestly it's giving "all or nothing" main character energy π
Library: -lvrb π¦
β¨ SYNOPSIS β¨
#include <vrb.h>
size_t vrb_get_min(vrb_p vrb, char *target, size_t minsize, size_t
maxsize);
πΈ DESCRIPTION πΈ
So like, vrb_get_min grabs data out of a virtual ring buffer and copies it into the space the caller provided β but only if the minimum amount you asked for can actually be copied. If there's less data available than that minimum, then nope, zero data gets copied. Not a single byte. it's giving "if you can't commit, don't show up at all" ππ
π ARGUMENTS π
vrb_p vrbβ this is the virtual ring buffer we're working with, like, which one. π«Άchar *targetβ the location where the data gets copied to. dump it here bestie πsize_t minsizeβ the minimum length of data that has to be available for the copy to happen at all. no minimum, no deal βsize_t maxsizeβ the maximum length of data you can get out of the virtual ring buffer. the ceiling, the limit, the vibe check π
π₯ RETURN VALUE π₯
size_t
You get back the actual length of data that was copied β and it can be any value from the minimum size to the maximum size, or 0. so like, it's a range, it's flexible, it's whatever the buffer decides to give you π
π ERRORS π
If an error comes back, then errno will be set to one of these:
EINVALβ either an invalid virtual ring buffer pointer was specified, or your minimum request exceeds the buffer capacity so it can literally never be satisfied. like, not now, not ever. so sorry bb π
π¦ SEE ALSO π¦
vrb(3), vrb_capacity(3), vrb_data_len(3), vrb_data_ptr(3), vrb_destroy(3), vrb_get(3), vrb_give(3), vrb_init(3), vrb_init_opt(3), vrb_is_empty(3), vrb_is_full(3), vrb_is_not_empty(3), vrb_is_not_full(3), vrb_move(3), vrb_new(3), vrb_new_opt(3), vrb_put(3), vrb_put_all(3), vrb_read(3), vrb_read_min(3), vrb_resize(3), vrb_space_len(3), vrb_space_ptr(3), vrb_take(3), vrb_uninit(3), vrb_write(3), vrb_write_min(3)
go read all of them, i'll wait, it's a whole lore drop fr fr ππ
and that's the page!! this absolute icon of a manpage is from vrb, and it's dated 2002-09-30 π slay, bye bestie!! πβ¨
π¦ where this page comes from
- nixos 26.05: vrb 0.5.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms