DC_BUFFER_GET_SIZE(3)

DC_BUFFER_GET_SIZE(3) | Library Functions Manual | DC_BUFFER_GET_SIZE(3)

# 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, previously allocated with dc_buffer_new(3). This shouldn't be confused with the capacity, which may be larger.

The returned value is not valid after subsequent calls to change the buffer.

# RETURN VALUES

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

# SEE ALSO

# 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)

January 5, 2017 | NetBSD 10.0