projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prepare useful things for policy request parsing.
[apps/pfixtools.git]
/
buffer.h
diff --git
a/buffer.h
b/buffer.h
index
e3075ba
..
87c0ad2
100644
(file)
--- a/
buffer.h
+++ b/
buffer.h
@@
-52,6
+52,10
@@
static inline void buffer_wipe(buffer_t *buf) {
DO_NEW(buffer_t, buffer);
DO_DELETE(buffer_t, buffer);
DO_NEW(buffer_t, buffer);
DO_DELETE(buffer_t, buffer);
+static inline void buffer_reset(buffer_t *buf) {
+ buf->data[buf->len = 0] = '\0';
+}
+
static inline char *buffer_unwrap(buffer_t **buf) {
char *res = (*buf)->data;
(*buf)->data = NULL;
static inline char *buffer_unwrap(buffer_t **buf) {
char *res = (*buf)->data;
(*buf)->data = NULL;
@@
-96,4
+100,6
@@
static inline void buffer_addch(buffer_t *buf, int c) {
buffer_extendch(buf, 1, c);
}
buffer_extendch(buf, 1, c);
}
+void buffer_consume(buffer_t *buf, ssize_t len);
+
#endif /* MUTT_LIB_LIB_BUFFER_H */
#endif /* MUTT_LIB_LIB_BUFFER_H */