aboutsummaryrefslogtreecommitdiff
path: root/buffer.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-02-25 16:50:30 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-02-25 17:20:00 +0100
commit301ad6d3a7a0684f4e4c14a48c6e8b8de5567ce0 (patch)
tree860854b26b571a8d578858b61baad1515b2367ab /buffer.h
parent95bae46af604f1fda07c8e7b92a278e28792c427 (diff)
downloadvis-301ad6d3a7a0684f4e4c14a48c6e8b8de5567ce0.tar.gz
vis-301ad6d3a7a0684f4e4c14a48c6e8b8de5567ce0.tar.xz
vis: ignore trailing NUL byte of register content by default
This is handy when editing registers used for macros.
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 037055b..7e3c342 100644
--- a/buffer.h
+++ b/buffer.h
@@ -38,5 +38,7 @@ bool buffer_append0(Buffer*, const char *data);
bool buffer_prepend(Buffer*, const void *data, size_t len);
/* prepend NUL-terminated data */
bool buffer_prepend0(Buffer*, const char *data);
+/* return length of a buffer without trailing NUL byte */
+size_t buffer_length0(Buffer*);
#endif