#include <cat.h>
int catbuf_index(cat_buffer *b, int offset);
This function, together with catbuf_ch(), cabuf_len(), and catbuf_pos(), are the low-level selectors and modifiers for data buffers.
catbuf_ch, catbuf_len, catbuf_pos