NAME

catbuf_insert - block write function for data buffers

SYNOPSIS

#include <cat.h>

int catbuf_insert(cat_buffer *b, int offset, int length, const void *indata);

DESCRIPTION

catbuf_insert() inserts a block of data at offset offset in buffer b. Data is copied.

The current index pointer is affected only if the data is inserted before it, in which case the pointer is incremented by the length of the inserted data.

catbuf_delete(), catbuf_insert(), and catbuf_extract() are block read/write functions for data buffers.

RETURN VALUES

This function returns 0 if successful, or a negative error code on error.

SEE ALSO

cat, catbuf, catbuf_delete, catbuf_extract