DC_BUFFER_PREPEND(3)
β¨ NAME β¨
okay so bestie, welcome to dc_buffer_prepend(3) from the Library Functions Manual π. The name is literally:
dc_buffer_prepend β prepend to a binary buffer
Thatβs the whole vibe: weβre prepending to a binary buffer, no cap. π
π LIBRARY π
This one lives in the library βlibdivecomputerβ. π«Ά
πΈ SYNOPSIS πΈ
#include <libdivecomputer/buffer.h>
int
dc_buffer_prepend(dc_buffer_t *buffer, const unsigned char data[],
size_t size);
π DESCRIPTION π
Hereβs the tea: dc_buffer_prepend prepends size bytes of data to the beginning of buffer π₯. And buffer has to be one that was previously allocated with dc_buffer_new(3) β like, thatβs the whole prerequisite, iykyk. β¨
π¦ RETURN VALUES π¦
The return value is giving:
- non-zero on success π
- zero on memory exhaustion π
- zero if
bufferisNULLπ
periodt. π
π SEE ALSO π
dc_buffer_new(3)β the icon referenced by this page π
π AUTHORS π
The library βlibdivecomputerβ library was written by Jef Driesen, jef@libdivecomputer.org. π«Ά
The manpages were written by Kristaps Dzonsons, kristaps@bsd.lv. πΈ
π«Ά cute sign-off: this page came from Debian, dated January 5, 2017, and yes bestie, itβs DC_BUFFER_PREPEND(3) πβ¨
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2017 Kristaps Dzonsons <kristaps@bsd.lv>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms