diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-20 19:10:58 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-20 22:08:42 +0100 |
| commit | d89f1c532f99fd19df65acffeeef2d4c19f9da62 (patch) | |
| tree | 1f56920766e9536ad669d127cdef3ae08ae6a263 /buffer.h | |
| parent | 92c90987dbf2b96c8e8dbe6af53b1352d15ca4d9 (diff) | |
| download | vis-d89f1c532f99fd19df65acffeeef2d4c19f9da62.tar.gz vis-d89f1c532f99fd19df65acffeeef2d4c19f9da62.tar.xz | |
buffer: implement buffer_capacity utility function
Diffstat (limited to 'buffer.h')
| -rw-r--r-- | buffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -50,6 +50,8 @@ bool buffer_appendf(Buffer*, const char *fmt, ...); size_t buffer_length0(Buffer*); /* return length of a buffer including possible NUL byte */ size_t buffer_length(Buffer*); +/* return current maximal capacity in bytes of this buffer */ +size_t buffer_capacity(Buffer*); /* pointer to buffer data, guaranteed to return a NUL terminated * string even if buffer is empty */ const char *buffer_content0(Buffer*); |
