KDATA_BUFFER_ALLOC(3) Library Functions Manual KDATA_BUFFER_ALLOC(3)

NAME

kdata_buffer_allocallocate immutable buffer data for plotting

LIBRARY

library “libkplot”

SYNOPSIS

#include <cairo.h>
#include <kplot.h>
struct kdata *
kdata_buffer_alloc(size_t hintsz);

DESCRIPTION

The kdata_buffer_alloc function creates a reference-counted data sources for kplot(3), initially sized to hintsz with all x-values and y-values set to zero. It's primarily used to copy other data sources into an immutable one. Bucket values are copied into this structure via kdata_buffer_copy(3).

RETURN VALUES

kdata_buffer_alloc returns NULL if memory allocation failed.

SEE ALSO

kdata_buffer_copy(3), kplot(3)
February 7, 2015 OpenBSD 5.8