BUF_PUTC(3) - Library Functions Manual

NAME

buf_putc - append a single character

SYNOPSIS

#include <buf.h>

int
buf_putc(struct buf *b, char c);

DESCRIPTION

Append the c character into the buffer specified by b.

This function should be avoided for performance reasons unless you reserve more storage using buf_reserve() prior to calling this function. See buf_reserve(3) for more details.

RETURN VALUE

The buf_putc() function returns -1 in case of error and errno is set to indicate the error.

ERRORS

[ENOMEM]

Couldn’t allocate more memory.

SEE ALSO

libbuf(3), buf_reserve(3)

AUTHORS

The libbuf library was written by David Demelier <markand@malikania.fr>

macOS 13.5 - October 29, 2019-2022