afs.c: Get rid of unregister_tasks().
[paraslash.git] / string.h
index 84101a873f66437c2304fa1af8f2b4ecadf385cc..561ff4e8705c4d20baf0b01999503f725cadb820 100644 (file)
--- a/string.h
+++ b/string.h
@@ -12,8 +12,18 @@ struct para_buffer {
        char *buf;
        /** The size of \a buf. */
        size_t size;
        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;
        /** 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);
 };
 
 __must_check __malloc void *para_realloc(void *p, size_t size);