vrb_put_all(3)
π vrb_put_all(3) π
okay so bestie, this is vrb_put_all(3) from the VRB Programmerβs Manual, and itβs giving βput all the data into a VRB or donβt botherβ energy π
β¨
πΈ NAME πΈ
vrb_put_all β put all data into a VRB
π LIBRARY π
Link with -lvrb, obviously π«Ά
β¨ SYNOPSIS β¨
#include <vrb.h>
int vrb_put_all(vrb_p vrb, char *source, size_t size);
π« DESCRIPTION π«
vrb_put_all puts caller provided data into a virtual ring buffer only if all the data will fit.
Like, itβs not doing the βmaybe a little bit fitsβ thing. Itβs all-or-nothing, and thatβs iconic π
π ARGUMENTS π
vrb_p vrbβ specifies which virtual ring buffer weβre talking about, bestie.char *sourceβ specifies the location where to copy the data from.size_t sizeβ specifies the length of data provided by the caller.
β RETURN VALUE β
intβ if the data fits and is copied,0is returned; otherwise-1is returned.
So yeah: 0 is the slay, -1 is the βnopeβ π
π₯ ERRORS π₯
If an error is returned, then errno will have one of the following values:
EINVALβ an invalid virtual ring buffer pointer was specified. That pointer is not it, fr fr πENOSPCβ the virtual ring buffer does not have enough space to hold all of the data. No room, no slay π
π¦ SEE ALSO π¦
vrb(3), vrb_capacity(3), vrb_data_len(3), vrb_data_ptr(3), vrb_destroy(3), vrb_get(3), vrb_get_min(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_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)
xoxo, source/version vrb, dated 2002-09-30 β 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