aboutsummaryrefslogtreecommitdiff
path: root/buffer.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-08-20 16:01:22 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-08-20 16:11:19 +0200
commitc7df560b818224d9a9ca3b0ba31a54312dc7062b (patch)
tree370fc6ba645eb2506c592a76e97ac51320bc1e3b /buffer.h
parent2b4a550d432e5e570bb888ce06440a825c2e2e7c (diff)
downloadvis-c7df560b818224d9a9ca3b0ba31a54312dc7062b.tar.gz
vis-c7df560b818224d9a9ca3b0ba31a54312dc7062b.tar.xz
buffer: add buffer_remove implementation
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 d0ecd63..b095572 100644
--- a/buffer.h
+++ b/buffer.h
@@ -28,6 +28,8 @@ bool buffer_terminate(Buffer*);
bool buffer_put(Buffer*, const void *data, size_t len);
/* same but with NUL-terminated data */
bool buffer_put0(Buffer*, const char *data);
+/* remove len bytes from the buffer starting at pos */
+bool buffer_remove(Buffer*, size_t pos, size_t len);
/* insert arbitrary data of length len at pos (in [0, buf->len]) */
bool buffer_insert(Buffer*, size_t pos, const void *data, size_t len);
/* insert NUL-terminate data at pos (in [0, buf->len]) */