DC_BUFFER_GET_SIZE(3)

๐Ÿ“ฆ version 0.9.0, in nixos 26.05, nixpkgs unstable

๐Ÿ’– 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.

dc_buffer_new(3)


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