25 #define LELY_UTIL_MEMBUF_INLINE extern inline
32 #ifndef LELY_MEMBUF_SIZE
34 #define LELY_MEMBUF_SIZE 16
61 char *begin = realloc(buf->
begin, buf_size);
This header file is part of the utilities library; it contains the native and platform-independent er...
void set_errc(int errc)
Sets the current (thread-specific) native error code to errc.
int errno2c(int errnum)
Transforms a standard C error number to a native error code.
#define MIN(a, b)
Returns the minimum of a and b.
#define LELY_MEMBUF_SIZE
The initial size (in bytes) of a memory buffer.
size_t membuf_reserve(struct membuf *buf, size_t size)
Resizes a memory buffer, if necessary, to make room for at least an additional size bytes.
void membuf_fini(struct membuf *buf)
Finalizes a memory buffer.
void membuf_flush(struct membuf *buf, size_t size)
Flushes size bytes from the beginning of a memory buffer.
This header file is part of the utilities library; it contains the memory buffer declarations.
size_t membuf_capacity(const struct membuf *buf)
Returns the number of unused bytes remaining in a memory buffer.
size_t membuf_size(const struct membuf *buf)
Returns the total number of bytes written to a memory buffer.
This is the internal header file of the utilities library.
This header file is part of the C11 and POSIX compatibility library; it includes <stdlib....
char * end
A pointer to one past the last byte in the buffer.
char * begin
A pointer to the first byte in the buffer.
char * cur
A pointer to one past the last byte written to the buffer.