projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
always enable NLS, screw'em
[apps/madmutt.git]
/
lib-lib
/
buffer.h
diff --git
a/lib-lib/buffer.h
b/lib-lib/buffer.h
index
a4d1912
..
dd9d936
100644
(file)
--- a/
lib-lib/buffer.h
+++ b/
lib-lib/buffer.h
@@
-86,6
+86,13
@@
static inline void buffer_addch(buffer_t *buf, int c) {
buffer_extendch(buf, 1, c);
}
+static inline void buffer_reset(buffer_t *buf) {
+ if (buf->len) {
+ buf->len = 0;
+ buf->data[0] = '\0';
+ }
+}
+
/****** LEGACY BUFFERS *******/