DC_BUFFER_GET_SIZE(3)
๐ DC_BUFFER_GET_SIZE(3) ๐
Okay bestie, welcome to a Library Functions Manual page โ yes, the manual name is literally โLibrary Functions Manual,โ and this one is short, sweet, and very โsmall function, big main-character energy.โ โจ
๐ธ NAME ๐ธ
dc_buffer_get_size โ get the size used by a buffer
๐ซถ LIBRARY ๐ซถ
library โlibdivecomputerโ ๐
โจ SYNOPSIS โจ
#include <libdivecomputer/buffer.h>
size_t
dc_buffer_get_size(dc_buffer_t *buffer);
๐ฆ DESCRIPTION ๐ฆ
Get the number of bytes currently used by buffer, which was previously allocated with dc_buffer_new(3). Like, actually used, not the whole flex. ๐
This is not the same as the capacity, bestie โ capacity may be larger. No cap.
Quick vibe check: the returned value is not valid after subsequent calls to change the buffer. So donโt stash it like itโs forever, because it isnโt. ๐ญ
โญ RETURN VALUES โญ
Returns the number of bytes used, which may be zero โ or zero if buffer is NULL. Thatโs it, thatโs the whole return situation. ๐
๐ SEE ALSO ๐
This section is empty in the page, for real. The cross-reference dc_buffer_new(3) shows up at the end of AUTHORS below, so Iโm keeping it exactly there and not doing any creative rearrangement. ๐
๐ AUTHORS ๐
The library โlibdivecomputerโ library was written by Jef Driesen, jef@libdivecomputer.org.
The manpages were written by Kristaps Dzonsons, kristaps@bsd.lv.
Thatโs the whole page, bestie ๐ซถ โ cute sign-off time: this footer energy is Debian, January 5, 2017, and DC_BUFFER_GET_SIZE(3) one more time because the footer said so. ๐โจ
๐ฆ 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