diff options
Diffstat (limited to '')
| -rw-r--r-- | strbuf.h | 11 |
1 files changed, 8 insertions, 3 deletions
| @@ -13,15 +13,20 @@ typedef struct { | |||
| 13 | int length; | 13 | int length; |
| 14 | int increment; | 14 | int increment; |
| 15 | int dynamic; | 15 | int dynamic; |
| 16 | int reallocs; | ||
| 17 | int debug; | ||
| 16 | } strbuf_t; | 18 | } strbuf_t; |
| 17 | 19 | ||
| 20 | #ifndef STRBUF_DEFAULT_SIZE | ||
| 21 | #define STRBUF_DEFAULT_SIZE 1023 | ||
| 22 | #endif | ||
| 18 | #ifndef STRBUF_DEFAULT_INCREMENT | 23 | #ifndef STRBUF_DEFAULT_INCREMENT |
| 19 | #define STRBUF_DEFAULT_INCREMENT 8 | 24 | #define STRBUF_DEFAULT_INCREMENT -2 |
| 20 | #endif | 25 | #endif |
| 21 | 26 | ||
| 22 | /* Initialise */ | 27 | /* Initialise */ |
| 23 | extern strbuf_t *strbuf_new(); | 28 | extern strbuf_t *strbuf_new(int len); |
| 24 | extern void strbuf_init(strbuf_t *s); | 29 | extern void strbuf_init(strbuf_t *s, int len); |
| 25 | extern void strbuf_set_increment(strbuf_t *s, int increment); | 30 | extern void strbuf_set_increment(strbuf_t *s, int increment); |
| 26 | 31 | ||
| 27 | /* Release */ | 32 | /* Release */ |
