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