aboutsummaryrefslogtreecommitdiff
path: root/buffer.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-20 19:10:58 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-20 22:08:42 +0100
commitd89f1c532f99fd19df65acffeeef2d4c19f9da62 (patch)
tree1f56920766e9536ad669d127cdef3ae08ae6a263 /buffer.h
parent92c90987dbf2b96c8e8dbe6af53b1352d15ca4d9 (diff)
downloadvis-d89f1c532f99fd19df65acffeeef2d4c19f9da62.tar.gz
vis-d89f1c532f99fd19df65acffeeef2d4c19f9da62.tar.xz
buffer: implement buffer_capacity utility function
Diffstat (limited to 'buffer.h')
-rw-r--r--buffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/buffer.h b/buffer.h
index 6c6bc82..91932c6 100644
--- a/buffer.h
+++ b/buffer.h
@@ -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*);