rbuf_insert(3)

rbuf_insert3

Insert a value into an rbuf

Usage

#include <roy.h>

void rbuf_insert_str (RBuf *buf, unsigned int pos, const char *val);

void rbuf_insert_rbuf (RBuf *buf, unsigned int pos, const RBuf *val);

void rbuf_insert_data (RBuf *buf, unsigned int pos, const char *val, unsigned int len);

Overview

These calls allow the programmer to insert data into the middle of buf. Any existing data located after the insert position pos in buf will be moved down buf's buffer the length of the inserted data. The buffer will be grown if needed.

If pos is zero (0) these calls to act like rbuf_prepend(3). If pos is greater then buf's length then these calls pretend that the buffer was filled with '\0's up until pos.

Return value

These calls return no value.

Errors

If pos is greater than the length of the buffer, the call will return without modifying the contents of the buffer.

Function

These calls are implemented using functions.

Releases

2 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0
  2. 3.1

From libroy-dev 1.0.8-1 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.