Next: , Previous: Autobuf copying, Up: Automatic buffers


11.5 Concatenation onto an autobuf

— Function: int abuf_cat (Autobuf *dest, const Autobuf *src)

Concatenates a copy of the contents of src onto the end of dest. Returns 0 if the function succeeded, or -1 if there was insufficient memory.

— Function: int abuf_cat_buf (Autobuf *abuf, const unsigned char *buf, ssize_t len)

Concatenates a copy of the len bytes stored at buf onto the end of abuf. len may not be negative. Returns 0 if the function succeeded, or -1 if there was insufficient memory.

— Function: int abuf_cat_astr (Autobuf *abuf, const Autostr *astr)

Concatenates a copy of the contents of astr onto the end of abuf. Returns 0 if the function succeeded, or -1 if there was insufficient memory.

— Function: int abuf_cat_s (Autobuf *abuf, const char *chars)

Concatenates a copy of the characters referenced by chars onto the end of abuf. Returns 0 if the function succeeded, or -1 if there was insufficient memory.

— Function: int abuf_cat_c (Autobuf *abuf, unsigned char c)

Concatenates c (converted to an ‘unsigned char’) onto the end of abuf. Returns 0 if the function succeeded, or -1 if there was insufficient memory.