KPLOT_DETACH(3) Library Functions Manual KPLOT_DETACH(3)

NAME

kplot_detachdetach plots from the plotting context

LIBRARY

library “libkplot”

SYNOPSIS

#include <cairo.h>
#include <kplot.h>
int
kplot_detach(struct kplot *p, const struct kdata *d);

DESCRIPTION

The kplot_detach function detaches a data source d from a plotting context p as added with kplot_attach_data(3), kplot_attach_datas(3), or kplot_attach_smooth(3). In doing so, it decrements the reference count of the data source.
If the data source is added with kplot_attach_datas(3), all of the data sources attached alongside are removed as well.

RETURN VALUES

kplot_detach returns 0 if the data source was not found or reallocation of internal structures failed due to memory exhaustion. (The latter behaviour is very unusual, as the reallocation is always to a smaller buffer.) Otherwise it returns non-zero.

SEE ALSO

kplot(3), kplot_attach_data(3), kplot_attach_datas(3), kplot_attach_smooth(3)
March 24, 2015 OpenBSD 5.8