kdata_buffer_copy —
    copy immutable buffer data
#include <cairo.h>
  
  #include <kplot.h>
int
  
  kdata_buffer_copy(struct kdata
    *dst, struct kdata *src);
The kdata_buffer_copy function copies data
    from src into the buffer source
    dst that was created with
    kdata_buffer_alloc(3).
kdata_buffer_copy returns 0 if memory
    allocation failed.