1DC_BUFFER_GET_SIZE(3)    BSD Library Functions Manual    DC_BUFFER_GET_SIZE(3)
2

NAME

4     dc_buffer_get_size — get the size used by a buffer
5

LIBRARY

7     library “libdivecomputer”
8

SYNOPSIS

10     #include <libdivecomputer/buffer.h>
11
12     size_t
13     dc_buffer_get_size(dc_buffer_t *buffer);
14

DESCRIPTION

16     Get the number of bytes currently used by buffer, previously allocated
17     with dc_buffer_new(3).  This shouldn't be confused with the capacity,
18     which may be larger.
19
20     The returned value is not valid after subsequent calls to change the buf‐
21     fer.
22

RETURN VALUES

24     Returns the number of bytes used, which may be zero, or zero if buffer is
25     NULL.
26

SEE ALSO

AUTHORS

29     The library “libdivecomputer” library was written by Jef Driesen,
30     jef@libdivecomputer.org.  The manpages were written by
31     Kristaps Dzonsons, kristaps@bsd.lv.  dc_buffer_new(3)
32
33BSD                             January 5, 2017                            BSD
Impressum