![]() |
![]()
| ![]() |
![]()
NAME
LIBRARYlibrary “libkcgi” SYNOPSIS
enum kcgi_err
DESCRIPTIONAppends a character c to a buffer buf. Buffers must be initialised to zero with memset(3) prior to first use. RETURN VALUESReturns an enum kcgi_err indicating the error state.
EXAMPLESThe following creates a simple NUL-terminated buffer and outputs its contents. It does not perform any error checking. struct kcgi_buf buf; memset(&buf, 0, sizeof(struct kcgi_buf)); kcgi_buf_putc(&buf, 'f'); kcgi_buf_putc(&buf, 'o'); kcgi_buf_putc(&buf, 'o'); puts(buf.buf); /* Emits "foo" */ free(buf.buf); SEE ALSOAUTHORSWritten by Kristaps Dzonsons <kristaps@bsd.lv>.
|