projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the new filter type in configuration example.
[apps/pfixtools.git]
/
common
/
buffer.h
diff --git
a/common/buffer.h
b/common/buffer.h
index
d044114
..
c6c11c6
100644
(file)
--- a/
common/buffer.h
+++ b/
common/buffer.h
@@
-41,7
+41,7
@@
#include "str.h"
#include "array.h"
#include "str.h"
#include "array.h"
-typedef
char_array_t
buffer_t;
+typedef
A(char)
buffer_t;
#define BUFFER_INIT {NULL, 0, 0}
#define BUFFER_INIT {NULL, 0, 0}
@@
-63,8
+63,9
@@
static inline char *buffer_unwrap(buffer_t **buf) {
return res;
}
return res;
}
+#define buffer_resize(buffer, newsize) \
+ array_ensure_exact_capacity(*(buffer), (newsize) + 1)
-void buffer_resize(buffer_t *, ssize_t newsize);
static inline void buffer_ensure(buffer_t *buf, ssize_t extra) {
assert (extra >= 0);
if (buf->len + extra >= buf->size) {
static inline void buffer_ensure(buffer_t *buf, ssize_t extra) {
assert (extra >= 0);
if (buf->len + extra >= buf->size) {