char *buf;
/** The size of \a buf. */
size_t size;
+ /** The maximal size this buffer may grow. Zero means unlimited. */
+ size_t max_size;
/** The next para_printf() will write at this offset. */
size_t offset;
+ /**
+ * If an attempt to print into this buffer is made that would need to
+ * grow \a buf to a size larger than \a max_size, then this function is
+ * called.
+ */
+ int (*max_size_handler)(char *buf, size_t size, void *private_data);
+ /** Passed to max_size_handler(). */
+ void *private_data;
};
__must_check __malloc void *para_realloc(void *p, size_t size);